void ShGetActiveAttrib(const ShHandle handle, int index, size_t* length, int* size, ShDataType* type, char* name, char* mappedName) { getVariableInfo(SH_ACTIVE_ATTRIBUTES, handle, index, length, size, type, name, mappedName); }
void ShGetActiveUniform(const ShHandle handle, int index, size_t* length, int* size, ShDataType* type, char* name, char* mappedName) { getVariableInfo(SH_ACTIVE_UNIFORMS, handle, index, length, size, type, name, mappedName); }
bool CollectVariables::visitAggregate(Visit, TIntermAggregate* node) { bool visitChildren = true; switch (node->getOp()) { case EOpDeclaration: { const TIntermSequence& sequence = node->getSequence(); TQualifier qualifier = sequence.front()->getAsTyped()->getQualifier(); if (qualifier == EvqAttribute || qualifier == EvqUniform || qualifier == EvqVaryingIn || qualifier == EvqVaryingOut || qualifier == EvqInvariantVaryingIn || qualifier == EvqInvariantVaryingOut) { TVariableInfoList& infoList = qualifier == EvqAttribute ? mAttribs : (qualifier == EvqUniform ? mUniforms : mVaryings); for (TIntermSequence::const_iterator i = sequence.begin(); i != sequence.end(); ++i) { const TIntermSymbol* variable = (*i)->getAsSymbolNode(); // The only case in which the sequence will not contain a // TIntermSymbol node is initialization. It will contain a // TInterBinary node in that case. Since attributes, uniforms, // and varyings cannot be initialized in a shader, we must have // only TIntermSymbol nodes in the sequence. ASSERT(variable != NULL); TString processedSymbol; if (mHashFunction == NULL) processedSymbol = variable->getSymbol(); else processedSymbol = TIntermTraverser::hash(variable->getOriginalSymbol(), mHashFunction); getVariableInfo(variable->getType(), variable->getOriginalSymbol(), processedSymbol, infoList, mHashFunction); visitChildren = false; } } break; } default: break; } return visitChildren; }