src/third_party/angle/src/libANGLE/renderer/glslang_wrapper_utils.cpp
// TODO: http://anglebug.com/4512: Need to combine descriptor set bindings across
// shader stages.
anglebug.com/4512: Need to combine descriptor set bindings across
shader stages.
anglebug . com / 4512 : Need to combine descriptor set bindings across shader stages .
void AssignImageBindings(const GlslangSourceOptions &options,
                         const gl::ProgramExecutable &programExecutable,
                         const std::vector<gl::LinkedUniform> &uniforms,
                         const gl::RangeUI &imageUniformRange,
                         const gl::ShaderType shaderType,
                         GlslangProgramInterfaceInfo *programInterfaceInfo,
                         ShaderMapInterfaceVariableInfoMap *variableInfoMapOut)
{
    for (unsigned int uniformIndex : imageUniformRange)
    {
        const gl::LinkedUniform &imageUniform = uniforms[uniformIndex];
        std::string name = imageUniform.mappedName;
        if (GetImageNameWithoutIndices(&name))
        {
            if (programExecutable.hasLinkedShaderStage(shaderType))
            {
                AddResourceInfo(&(*variableInfoMapOut)[shaderType], name,
                                programInterfaceInfo->shaderResourceDescriptorSetIndex,
                                programInterfaceInfo->currentShaderResourceBindingIndex,
                                shaderType);
                ++programInterfaceInfo->currentShaderResourceBindingIndex;
            }
        }
    }
}
void AssignImageBindings ( const GlslangSourceOptions & options , const gl :: ProgramExecutable & programExecutable , const std :: vector < gl :: LinkedUniform > & uniforms , const gl :: RangeUI & imageUniformRange , const gl :: ShaderType shaderType , GlslangProgramInterfaceInfo * programInterfaceInfo , ShaderMapInterfaceVariableInfoMap * variableInfoMapOut ) { for ( unsigned int uniformIndex : imageUniformRange ) { const gl :: LinkedUniform & imageUniform = uniforms [ uniformIndex ] ; std :: string name = imageUniform . mappedName ; if ( GetImageNameWithoutIndices ( & name ) ) { if ( programExecutable . hasLinkedShaderStage ( shaderType ) ) { AddResourceInfo ( & ( * variableInfoMapOut ) [ shaderType ] , name , programInterfaceInfo -> shaderResourceDescriptorSetIndex , programInterfaceInfo -> currentShaderResourceBindingIndex , shaderType ) ; ++ programInterfaceInfo -> currentShaderResourceBindingIndex ; } } } }
TODO: http://anglebug.com/4512: Need to combine descriptor set bindings across
shader stages.
TODO : http : // anglebug . com / 4512 : Need to combine descriptor set bindings across shader stages .