mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
Fix parser issue: redeclare gl_FragStencilRefARB is not supported
This commit is contained in:
parent
918caa7ee4
commit
7bf5fcc541
@ -2,6 +2,8 @@
|
||||
|
||||
#extension GL_ARB_shader_stencil_export: enable
|
||||
|
||||
out int gl_FragStencilRefARB;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragStencilRefARB = 100;
|
||||
|
@ -3872,6 +3872,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
|
||||
identifier == "gl_BackSecondaryColor" ||
|
||||
identifier == "gl_SecondaryColor" ||
|
||||
(identifier == "gl_Color" && language == EShLangFragment) ||
|
||||
(identifier == "gl_FragStencilRefARB" && (nonEsRedecls && version >= 140)
|
||||
&& language == EShLangFragment) ||
|
||||
#ifdef NV_EXTENSIONS
|
||||
identifier == "gl_SampleMask" ||
|
||||
identifier == "gl_Layer" ||
|
||||
@ -3954,6 +3956,12 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
|
||||
error(loc, "all redeclarations must use the same depth layout on", "redeclaration", symbol->getName().c_str());
|
||||
}
|
||||
}
|
||||
else if (identifier == "gl_FragStencilRefARB") {
|
||||
if (qualifier.hasLayout())
|
||||
error(loc, "cannot apply layout qualifier to", "redeclaration", symbol->getName().c_str());
|
||||
if (qualifier.storage != EvqVaryingOut)
|
||||
error(loc, "cannot change output storage qualification of", "redeclaration", symbol->getName().c_str());
|
||||
}
|
||||
#ifdef NV_EXTENSIONS
|
||||
else if (identifier == "gl_SampleMask") {
|
||||
if (!publicType.layoutOverrideCoverage) {
|
||||
|
Loading…
Reference in New Issue
Block a user