src/third_party/angle/src/libANGLE/renderer/glslang_wrapper_utils.cpp
// Add location information for an in/out variable.
Add location information for an in/out variable.
Add location information for an in / out variable .
ShaderInterfaceVariableInfo *AddLocationInfo(ShaderInterfaceVariableInfoMap *infoMap,
                                             const std::string &varName,
                                             uint32_t location,
                                             uint32_t component,
                                             gl::ShaderType stage,
                                             uint8_t attributeComponentCount,
                                             uint8_t attributeLocationCount)
{
    ShaderInterfaceVariableInfo *info = &(*infoMap)[varName];
    ASSERT(info->descriptorSet == ShaderInterfaceVariableInfo::kInvalid);
    ASSERT(info->binding == ShaderInterfaceVariableInfo::kInvalid);
    ASSERT(info->location == ShaderInterfaceVariableInfo::kInvalid);
    ASSERT(info->component == ShaderInterfaceVariableInfo::kInvalid);
    info->location  = location;
    info->component = component;
    info->activeStages.set(stage);
    info->attributeComponentCount = attributeComponentCount;
    info->attributeLocationCount  = attributeLocationCount;
    return info;
}
ShaderInterfaceVariableInfo * AddLocationInfo ( ShaderInterfaceVariableInfoMap * infoMap , const std :: string & varName , uint32_t location , uint32_t component , gl :: ShaderType stage , uint8_t attributeComponentCount , uint8_t attributeLocationCount ) { ShaderInterfaceVariableInfo * info = & ( * infoMap ) [ varName ] ; ASSERT ( info -> descriptorSet == ShaderInterfaceVariableInfo :: kInvalid ) ; ASSERT ( info -> binding == ShaderInterfaceVariableInfo :: kInvalid ) ; ASSERT ( info -> location == ShaderInterfaceVariableInfo :: kInvalid ) ; ASSERT ( info -> component == ShaderInterfaceVariableInfo :: kInvalid ) ; info -> location = location ; info -> component = component ; info -> activeStages . set ( stage ) ; info -> attributeComponentCount = attributeComponentCount ; info -> attributeLocationCount = attributeLocationCount ; return info ; }
Add location information for an in/out variable.
Add location information for an in / out variable .
// The info map for this name may or may not exist already.  This function merges the // location/component information.