Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
7bf5fcc5
Commit
7bf5fcc5
authored
Nov 12, 2018
by
Rex Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parser issue: redeclare gl_FragStencilRefARB is not supported
parent
918caa7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
spv.shaderStencilExport.frag
Test/spv.shaderStencilExport.frag
+2
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+8
-0
No files found.
Test/spv.shaderStencilExport.frag
View file @
7bf5fcc5
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
#extension GL_ARB_shader_stencil_export: enable
#extension GL_ARB_shader_stencil_export: enable
out
int
gl_FragStencilRefARB
;
void
main
()
void
main
()
{
{
gl_FragStencilRefARB
=
100
;
gl_FragStencilRefARB
=
100
;
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
7bf5fcc5
...
@@ -3872,6 +3872,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
...
@@ -3872,6 +3872,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
identifier
==
"gl_BackSecondaryColor"
||
identifier
==
"gl_BackSecondaryColor"
||
identifier
==
"gl_SecondaryColor"
||
identifier
==
"gl_SecondaryColor"
||
(
identifier
==
"gl_Color"
&&
language
==
EShLangFragment
)
||
(
identifier
==
"gl_Color"
&&
language
==
EShLangFragment
)
||
(
identifier
==
"gl_FragStencilRefARB"
&&
(
nonEsRedecls
&&
version
>=
140
)
&&
language
==
EShLangFragment
)
||
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
identifier
==
"gl_SampleMask"
||
identifier
==
"gl_SampleMask"
||
identifier
==
"gl_Layer"
||
identifier
==
"gl_Layer"
||
...
@@ -3954,6 +3956,12 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
...
@@ -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
());
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
#ifdef NV_EXTENSIONS
else
if
(
identifier
==
"gl_SampleMask"
)
{
else
if
(
identifier
==
"gl_SampleMask"
)
{
if
(
!
publicType
.
layoutOverrideCoverage
)
{
if
(
!
publicType
.
layoutOverrideCoverage
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment