context/llpcGraphicsContext.cpp
const PipelineShaderInfo* GraphicsContext::GetPipelineShaderInfo(
    ShaderStage shaderStage // Shader stage
    ) const
{
    if (shaderStage == ShaderStageCopyShader)
    {
        // Treat copy shader as part of geometry shader
        shaderStage = ShaderStageGeometry;
    }

    LLPC_ASSERT(shaderStage < ShaderStageGfxCount);

    const PipelineShaderInfo* pShaderInfo = nullptr;
    switch (shaderStage)
    {
    case Llpc::ShaderStageVertex:
        pShaderInfo = &m_pPipelineInfo->vs;
        break;
    case Llpc::ShaderStageTessControl:
        pShaderInfo = &m_pPipelineInfo->tcs;
        break;
    case Llpc::ShaderStageTessEval:
        pShaderInfo = &m_pPipelineInfo->tes;
        break;
    case Llpc::ShaderStageGeometry:
        pShaderInfo = &m_pPipelineInfo->gs;
        break;
    case Llpc::ShaderStageFragment:
        pShaderInfo = &m_pPipelineInfo->fs;
        break;
    default:
        LLPC_NEVER_CALLED();
        break;
    }

    return pShaderInfo;
}
// =====================================================================================================================
// Gets pipeline shader info of the specified shader stage
Gets pipeline shader info of the specified shader stage
Gets pipeline shader info of the specified shader stage
const PipelineShaderInfo* GraphicsContext::GetPipelineShaderInfo(
    ShaderStage shaderStage 
    ) const
{
    if (shaderStage == ShaderStageCopyShader)
    {
        shaderStage = ShaderStageGeometry;
    }
    LLPC_ASSERT(shaderStage < ShaderStageGfxCount);
    const PipelineShaderInfo* pShaderInfo = nullptr;
    switch (shaderStage)
    {
    case Llpc::ShaderStageVertex:
        pShaderInfo = &m_pPipelineInfo->vs;
        break;
    case Llpc::ShaderStageTessControl:
        pShaderInfo = &m_pPipelineInfo->tcs;
        break;
    case Llpc::ShaderStageTessEval:
        pShaderInfo = &m_pPipelineInfo->tes;
        break;
    case Llpc::ShaderStageGeometry:
        pShaderInfo = &m_pPipelineInfo->gs;
        break;
    case Llpc::ShaderStageFragment:
        pShaderInfo = &m_pPipelineInfo->fs;
        break;
    default:
        LLPC_NEVER_CALLED();
        break;
    }
    return pShaderInfo;
}
const PipelineShaderInfo * GraphicsContext :: GetPipelineShaderInfo ( ShaderStage shaderStage ) const { if ( shaderStage == ShaderStageCopyShader ) { shaderStage = ShaderStageGeometry ; } LLPC_ASSERT ( shaderStage < ShaderStageGfxCount ) ; const PipelineShaderInfo * pShaderInfo = nullptr ; switch ( shaderStage ) { case Llpc :: ShaderStageVertex : pShaderInfo = & m_pPipelineInfo -> vs ; break ; case Llpc :: ShaderStageTessControl : pShaderInfo = & m_pPipelineInfo -> tcs ; break ; case Llpc :: ShaderStageTessEval : pShaderInfo = & m_pPipelineInfo -> tes ; break ; case Llpc :: ShaderStageGeometry : pShaderInfo = & m_pPipelineInfo -> gs ; break ; case Llpc :: ShaderStageFragment : pShaderInfo = & m_pPipelineInfo -> fs ; break ; default : LLPC_NEVER_CALLED ( ) ; break ; } return pShaderInfo ; }
Gets pipeline shader info of the specified shader stage
Gets pipeline shader info of the specified shader stage
// Shader stage // Treat copy shader as part of geometry shader