3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp
// Merge live symbols from 'intermediate' into the existing reflection database.
//
// Returns false if the input is too malformed to do this.
Merge live symbols from 'intermediate' into the existing reflection database.
Returns false if the input is too malformed to do this.
Merge live symbols from ' intermediate ' into the existing reflection database . Returns false if the input is too malformed to do this .
bool TReflection::addStage(EShLanguage stage, const TIntermediate& intermediate)
{
    if (intermediate.getTreeRoot() == nullptr ||
        intermediate.getNumEntryPoints() != 1 ||
        intermediate.isRecursive())
        return false;
    buildAttributeReflection(stage, intermediate);
    TReflectionTraverser it(intermediate, *this);
    it.pushFunction(intermediate.getEntryPointMangledName().c_str());
    while (! it.functions.empty()) {
        TIntermNode* function = it.functions.back();
        it.functions.pop_back();
        function->traverse(&it);
    }
    buildCounterIndices();
    return true;
}
bool TReflection :: addStage ( EShLanguage stage , const TIntermediate & intermediate ) { if ( intermediate . getTreeRoot ( ) == nullptr || intermediate . getNumEntryPoints ( ) != 1 || intermediate . isRecursive ( ) ) return false ; buildAttributeReflection ( stage , intermediate ) ; TReflectionTraverser it ( intermediate , * this ) ; it . pushFunction ( intermediate . getEntryPointMangledName ( ) . c_str ( ) ) ; while ( ! it . functions . empty ( ) ) { TIntermNode * function = it . functions . back ( ) ; it . functions . pop_back ( ) ; function -> traverse ( & it ) ; } buildCounterIndices ( ) ; return true ; }
Merge live symbols from 'intermediate' into the existing reflection database.
Merge live symbols from ' intermediate ' into the existing reflection database .
// put the entry point on the list of functions to process // process all the functions