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 AssignInterfaceBlockBindings(const GlslangSourceOptions &options,
                                  const gl::ProgramExecutable &programExecutable,
                                  const std::vector<gl::InterfaceBlock> &blocks,
                                  const gl::ShaderType shaderType,
                                  GlslangProgramInterfaceInfo *programInterfaceInfo,
                                  ShaderMapInterfaceVariableInfoMap *variableInfoMapOut)
{
    for (const gl::InterfaceBlock &block : blocks)
    {
        if (!block.isArray || block.arrayElement == 0)
        {
            if (programExecutable.hasLinkedShaderStage(shaderType) && block.isActive(shaderType))
            {
                AddResourceInfo(&(*variableInfoMapOut)[shaderType], block.mappedName,
                                programInterfaceInfo->shaderResourceDescriptorSetIndex,
                                programInterfaceInfo->currentShaderResourceBindingIndex,
                                shaderType);
                ++programInterfaceInfo->currentShaderResourceBindingIndex;
            }
        }
    }
}
void AssignInterfaceBlockBindings ( const GlslangSourceOptions & options , const gl :: ProgramExecutable & programExecutable , const std :: vector < gl :: InterfaceBlock > & blocks , const gl :: ShaderType shaderType , GlslangProgramInterfaceInfo * programInterfaceInfo , ShaderMapInterfaceVariableInfoMap * variableInfoMapOut ) { for ( const gl :: InterfaceBlock & block : blocks ) { if ( ! block . isArray || block . arrayElement == 0 ) { if ( programExecutable . hasLinkedShaderStage ( shaderType ) && block . isActive ( shaderType ) ) { AddResourceInfo ( & ( * variableInfoMapOut ) [ shaderType ] , block . mappedName , 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 .
// TODO: http://anglebug.com/4523: All blocks should be active