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
85028e14
Commit
85028e14
authored
Jun 30, 2016
by
Cort Stratton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When parsing Vulkan GLSL, suggest gl_VertexIndex/gl_InstanceIndex instead of…
When parsing Vulkan GLSL, suggest gl_VertexIndex/gl_InstanceIndex instead of gl_VertexID/gl_InstanceID.
parent
af151f96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+7
-1
No files found.
glslang/MachineIndependent/ParseHelper.cpp
View file @
85028e14
...
@@ -1930,7 +1930,13 @@ void TParseContext::variableCheck(TIntermTyped*& nodePtr)
...
@@ -1930,7 +1930,13 @@ void TParseContext::variableCheck(TIntermTyped*& nodePtr)
return
;
return
;
if
(
symbol
->
getType
().
getBasicType
()
==
EbtVoid
)
{
if
(
symbol
->
getType
().
getBasicType
()
==
EbtVoid
)
{
error
(
symbol
->
getLoc
(),
"undeclared identifier"
,
symbol
->
getName
().
c_str
(),
""
);
const
char
*
extraInfoFormat
=
""
;
if
(
spvVersion
.
vulkan
!=
0
&&
symbol
->
getName
()
==
"gl_VertexID"
)
{
extraInfoFormat
=
"(Did you mean gl_VertexIndex?)"
;
}
else
if
(
spvVersion
.
vulkan
!=
0
&&
symbol
->
getName
()
==
"gl_InstanceID"
)
{
extraInfoFormat
=
"(Did you mean gl_InstanceIndex?)"
;
}
error
(
symbol
->
getLoc
(),
"undeclared identifier"
,
symbol
->
getName
().
c_str
(),
extraInfoFormat
);
// Add to symbol table to prevent future error messages on the same name
// Add to symbol table to prevent future error messages on the same name
if
(
symbol
->
getName
().
size
()
>
0
)
{
if
(
symbol
->
getName
().
size
()
>
0
)
{
...
...
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