Add support for es extension GL_EXT_blend_func_extended
* Introduces builtin variables gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT * Introduces builtin constant gl_MaxDualSourceDrawBuffersEXT * enables support for layout qualifier "index" in es profile
This commit is contained in:
parent
2c53baedbb
commit
e05cc20ec2
14 changed files with 173 additions and 65 deletions
|
|
@ -6755,6 +6755,18 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
s.append(builtInConstant);
|
||||
}
|
||||
|
||||
if (version >= 100) {
|
||||
// GL_EXT_blend_func_extended
|
||||
snprintf(builtInConstant, maxSize, "const mediump int gl_MaxDualSourceDrawBuffersEXT = %d;", resources.maxDualSourceDrawBuffersEXT);
|
||||
s.append(builtInConstant);
|
||||
// this is here instead of with the others in initialize(version, profile) due to the dependence on gl_MaxDualSourceDrawBuffersEXT
|
||||
if (language == EShLangFragment) {
|
||||
s.append(
|
||||
"mediump vec4 gl_SecondaryFragColorEXT;"
|
||||
"mediump vec4 gl_SecondaryFragDataEXT[gl_MaxDualSourceDrawBuffersEXT];"
|
||||
"\n");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// non-ES profile
|
||||
|
||||
|
|
@ -9119,6 +9131,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData));
|
||||
SpecialQualifier("gl_FragData", EvqFragColor, EbvFragData, symbolTable);
|
||||
}
|
||||
|
||||
// GL_EXT_blend_func_extended
|
||||
if (profile == EEsProfile && version >= 100) {
|
||||
symbolTable.setVariableExtensions("gl_MaxDualSourceDrawBuffersEXT", 1, &E_GL_EXT_blend_func_extended);
|
||||
symbolTable.setVariableExtensions("gl_SecondaryFragColorEXT", 1, &E_GL_EXT_blend_func_extended);
|
||||
symbolTable.setVariableExtensions("gl_SecondaryFragDataEXT", 1, &E_GL_EXT_blend_func_extended);
|
||||
SpecialQualifier("gl_SecondaryFragColorEXT", EvqVaryingOut, EbvSecondaryFragColorEXT, symbolTable);
|
||||
SpecialQualifier("gl_SecondaryFragDataEXT", EvqVaryingOut, EbvSecondaryFragDataEXT, symbolTable);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EShLangTessControl:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue