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
75d1d801
Commit
75d1d801
authored
Apr 06, 2016
by
qining
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add SpecConstantOpModeGuard to GlslangToSpvTraverser::visitSymbol()
parent
40887660
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+4
-0
spv.specConstantOperations.vert.out
Test/baseResults/spv.specConstantOperations.vert.out
+4
-4
No files found.
SPIRV/GlslangToSpv.cpp
View file @
75d1d801
...
@@ -778,6 +778,10 @@ TGlslangToSpvTraverser::~TGlslangToSpvTraverser()
...
@@ -778,6 +778,10 @@ TGlslangToSpvTraverser::~TGlslangToSpvTraverser()
//
//
void
TGlslangToSpvTraverser
::
visitSymbol
(
glslang
::
TIntermSymbol
*
symbol
)
void
TGlslangToSpvTraverser
::
visitSymbol
(
glslang
::
TIntermSymbol
*
symbol
)
{
{
SpecConstantOpModeGuard
spec_constant_op_mode_setter
(
&
builder
);
if
(
symbol
->
getType
().
getQualifier
().
isSpecConstant
())
spec_constant_op_mode_setter
.
turnOnSpecConstantOpMode
();
// getSymbolId() will set up all the IO decorations on the first call.
// getSymbolId() will set up all the IO decorations on the first call.
// Formal function parameters were mapped during makeFunctions().
// Formal function parameters were mapped during makeFunctions().
spv
::
Id
id
=
getSymbolId
(
symbol
);
spv
::
Id
id
=
getSymbolId
(
symbol
);
...
...
Test/baseResults/spv.specConstantOperations.vert.out
View file @
75d1d801
...
@@ -112,15 +112,15 @@ Linked vertex stage:
...
@@ -112,15 +112,15 @@ Linked vertex stage:
98: 68(ivec4) ConstantComposite 97 97 97 97
98: 68(ivec4) ConstantComposite 97 97 97 97
99: 68(ivec4) SpecConstantOp 198 71 98
99: 68(ivec4) SpecConstantOp 198 71 98
100: 25(int) Constant 0
100: 25(int) Constant 0
101: 6(int) SpecConstantOp 81 67 0
102: TypeVector 6(int) 2
102: TypeVector 6(int) 2
103: 102(ivec2) SpecConstantOp 79 67 67 1(GLSL.std.450) 0
104: TypeVector 6(int) 3
104: TypeVector 6(int) 3
105: 104(ivec3) SpecConstantOp 79 67 67 2 1(GLSL.std.450) 0
106: 65(ivec4) SpecConstantOp 79 67 67 1(GLSL.std.450) 2 0 3
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
Return
Return
101: 6(int) CompositeExtract 67 0
103: 102(ivec2) VectorShuffle 67 67 1 0
105: 104(ivec3) VectorShuffle 67 67 2 1 0
106: 65(ivec4) VectorShuffle 67 67 1 2 0 3
FunctionEnd
FunctionEnd
8(non_const_array_size_from_spec_const(): 6(int) Function None 7
8(non_const_array_size_from_spec_const(): 6(int) Function None 7
9: Label
9: Label
...
...
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