3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
// See if a variable was both a user-declared output and used.
// Note: the spec discusses writing to one, but this looks at read or write, which
// is more useful, and perhaps the spec should be changed to reflect that.
See if a variable was both a user-declared output and used.
Note: the spec discusses writing to one, but this looks at read or write, which
is more useful, and perhaps the spec should be changed to reflect that.
See if a variable was both a user - declared output and used . Note : the spec discusses writing to one but this looks at read or write which is more useful and perhaps the spec should be changed to reflect that .
bool TIntermediate::userOutputUsed() const
{
    const TIntermSequence& linkerObjects = findLinkerObjects();
    bool found = false;
    for (size_t i = 0; i < linkerObjects.size(); ++i) {
        const TIntermSymbol& symbolNode = *linkerObjects[i]->getAsSymbolNode();
        if (symbolNode.getQualifier().storage == EvqVaryingOut &&
            symbolNode.getName().compare(0, 3, "gl_") != 0 &&
            inIoAccessed(symbolNode.getName())) {
            found = true;
            break;
        }
    }
    return found;
}
bool TIntermediate :: userOutputUsed ( ) const { const TIntermSequence & linkerObjects = findLinkerObjects ( ) ; bool found = false ; for ( size_t i = 0 ; i < linkerObjects . size ( ) ; ++ i ) { const TIntermSymbol & symbolNode = * linkerObjects [ i ] -> getAsSymbolNode ( ) ; if ( symbolNode . getQualifier ( ) . storage == EvqVaryingOut && symbolNode . getName ( ) . compare ( 0 , 3 , " " ) != 0 && inIoAccessed ( symbolNode . getName ( ) ) ) { found = true ; break ; } } return found ; }
See if a variable was both a user-declared output and used.
See if a variable was both a user - declared output and used .