src/third_party/angle/src/libANGLE/renderer/glslang_wrapper_utils.cpp
// Called by transformInstruction to insert necessary instructions for casting varying
Called by transformInstruction to insert necessary instructions for casting varying
Called by transformInstruction to insert necessary instructions for casting varying
void SpirvTransformer::writeInputPreamble()
{
    for (uint32_t id = 0; id < mVariableInfoById.size(); id++)
    {
        const ShaderInterfaceVariableInfo *info = mVariableInfoById[id];
        if (info && info->useRelaxedPrecision && info->activeStages[mShaderType] &&
            !info->varyingIsOutput)
        {
            uint32_t tempVar = getNewId();
            writeOpLoad(mFixedVaryingId[id], mFixedVaryingTypeId[id], tempVar);
            writeOpStore(tempVar, id);
        }
    }
}
void SpirvTransformer :: writeInputPreamble ( ) { for ( uint32_t id = 0 ; id < mVariableInfoById . size ( ) ; id ++ ) { const ShaderInterfaceVariableInfo * info = mVariableInfoById [ id ] ; if ( info && info -> useRelaxedPrecision && info -> activeStages [ mShaderType ] && ! info -> varyingIsOutput ) { uint32_t tempVar = getNewId ( ) ; writeOpLoad ( mFixedVaryingId [ id ] , mFixedVaryingTypeId [ id ] , tempVar ) ; writeOpStore ( tempVar , id ) ; } } }
Called by transformInstruction to insert necessary instructions for casting varying
Called by transformInstruction to insert necessary instructions for casting varying
// This is an input varying, need to cast the mediump value that came from // the previous stage into a highp value that the code wants to work with. // Build OpLoad instruction to load the mediump value into a temporary // Build OpStore instruction to cast the mediump value to highp for use in // the function