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
30476568
Commit
30476568
authored
Jan 31, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AST: dump attributes along with control flow.
parent
a2858d9b
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
48 additions
and
26 deletions
+48
-26
460.frag.out
Test/baseResults/460.frag.out
+3
-3
hlsl.attribute.expression.comp.out
Test/baseResults/hlsl.attribute.expression.comp.out
+2
-2
hlsl.attribute.frag.out
Test/baseResults/hlsl.attribute.frag.out
+2
-2
hlsl.doLoop.frag.out
Test/baseResults/hlsl.doLoop.frag.out
+4
-4
hlsl.forLoop.frag.out
Test/baseResults/hlsl.forLoop.frag.out
+2
-2
hlsl.if.frag.out
Test/baseResults/hlsl.if.frag.out
+2
-2
hlsl.loopattr.frag.out
Test/baseResults/hlsl.loopattr.frag.out
+4
-4
hlsl.switch.frag.out
Test/baseResults/hlsl.switch.frag.out
+2
-2
hlsl.whileLoop.frag.out
Test/baseResults/hlsl.whileLoop.frag.out
+2
-2
intermOut.cpp
glslang/MachineIndependent/intermOut.cpp
+25
-3
No files found.
Test/baseResults/460.frag.out
View file @
30476568
...
@@ -38,7 +38,7 @@ ERROR: node is still EOpNull!
...
@@ -38,7 +38,7 @@ ERROR: node is still EOpNull!
0:22 'i' ( temp int)
0:22 'i' ( temp int)
0:22 Constant:
0:22 Constant:
0:22 0 (const int)
0:22 0 (const int)
0:22 Loop with condition tested first
0:22 Loop with condition tested first
: Dependency 4
0:22 Loop Condition
0:22 Loop Condition
0:22 Compare Less Than ( temp bool)
0:22 Compare Less Than ( temp bool)
0:22 'i' ( temp int)
0:22 'i' ( temp int)
...
@@ -48,7 +48,7 @@ ERROR: node is still EOpNull!
...
@@ -48,7 +48,7 @@ ERROR: node is still EOpNull!
0:22 Loop Terminal Expression
0:22 Loop Terminal Expression
0:22 Pre-Increment ( temp int)
0:22 Pre-Increment ( temp int)
0:22 'i' ( temp int)
0:22 'i' ( temp int)
0:23 Test condition and select ( temp void)
0:23 Test condition and select ( temp void)
: Flatten
0:23 Condition
0:23 Condition
0:23 Constant:
0:23 Constant:
0:23 true (const bool)
0:23 true (const bool)
...
@@ -56,7 +56,7 @@ ERROR: node is still EOpNull!
...
@@ -56,7 +56,7 @@ ERROR: node is still EOpNull!
0:28 Function Definition: attExt( ( global void)
0:28 Function Definition: attExt( ( global void)
0:28 Function Parameters:
0:28 Function Parameters:
0:30 Sequence
0:30 Sequence
0:30 Loop with condition not tested first
0:30 Loop with condition not tested first
: Dependency -3
0:30 Loop Condition
0:30 Loop Condition
0:30 Constant:
0:30 Constant:
0:30 true (const bool)
0:30 true (const bool)
...
...
Test/baseResults/hlsl.attribute.expression.comp.out
View file @
30476568
...
@@ -10,7 +10,7 @@ local_size = (4, 6, 8)
...
@@ -10,7 +10,7 @@ local_size = (4, 6, 8)
0:11 'x' ( temp int)
0:11 'x' ( temp int)
0:11 Constant:
0:11 Constant:
0:11 0 (const int)
0:11 0 (const int)
0:11 Loop with condition tested first
0:11 Loop with condition tested first
: Unroll
0:11 Loop Condition
0:11 Loop Condition
0:11 Compare Less Than ( temp bool)
0:11 Compare Less Than ( temp bool)
0:11 'x' ( temp int)
0:11 'x' ( temp int)
...
@@ -53,7 +53,7 @@ local_size = (4, 6, 8)
...
@@ -53,7 +53,7 @@ local_size = (4, 6, 8)
0:11 'x' ( temp int)
0:11 'x' ( temp int)
0:11 Constant:
0:11 Constant:
0:11 0 (const int)
0:11 0 (const int)
0:11 Loop with condition tested first
0:11 Loop with condition tested first
: Unroll
0:11 Loop Condition
0:11 Loop Condition
0:11 Compare Less Than ( temp bool)
0:11 Compare Less Than ( temp bool)
0:11 'x' ( temp int)
0:11 'x' ( temp int)
...
...
Test/baseResults/hlsl.attribute.frag.out
View file @
30476568
...
@@ -6,7 +6,7 @@ gl_FragCoord origin is upper left
...
@@ -6,7 +6,7 @@ gl_FragCoord origin is upper left
0:2 Function Parameters:
0:2 Function Parameters:
0:2 'input' ( in 4-component vector of float)
0:2 'input' ( in 4-component vector of float)
0:? Sequence
0:? Sequence
0:11 Test condition and select ( temp void)
0:11 Test condition and select ( temp void)
: DontFlatten
0:11 Condition
0:11 Condition
0:11 Constant:
0:11 Constant:
0:11 false (const bool)
0:11 false (const bool)
...
@@ -33,7 +33,7 @@ gl_FragCoord origin is upper left
...
@@ -33,7 +33,7 @@ gl_FragCoord origin is upper left
0:2 Function Parameters:
0:2 Function Parameters:
0:2 'input' ( in 4-component vector of float)
0:2 'input' ( in 4-component vector of float)
0:? Sequence
0:? Sequence
0:11 Test condition and select ( temp void)
0:11 Test condition and select ( temp void)
: DontFlatten
0:11 Condition
0:11 Condition
0:11 Constant:
0:11 Constant:
0:11 false (const bool)
0:11 false (const bool)
...
...
Test/baseResults/hlsl.doLoop.frag.out
View file @
30476568
...
@@ -6,12 +6,12 @@ gl_FragCoord origin is upper left
...
@@ -6,12 +6,12 @@ gl_FragCoord origin is upper left
0:2 Function Parameters:
0:2 Function Parameters:
0:2 'input' ( in float)
0:2 'input' ( in float)
0:? Sequence
0:? Sequence
0:3 Loop with condition not tested first
0:3 Loop with condition not tested first
: Unroll
0:3 Loop Condition
0:3 Loop Condition
0:3 Constant:
0:3 Constant:
0:3 false (const bool)
0:3 false (const bool)
0:3 No loop body
0:3 No loop body
0:4 Loop with condition not tested first
0:4 Loop with condition not tested first
: Unroll
0:4 Loop Condition
0:4 Loop Condition
0:4 Constant:
0:4 Constant:
0:4 false (const bool)
0:4 false (const bool)
...
@@ -80,12 +80,12 @@ gl_FragCoord origin is upper left
...
@@ -80,12 +80,12 @@ gl_FragCoord origin is upper left
0:2 Function Parameters:
0:2 Function Parameters:
0:2 'input' ( in float)
0:2 'input' ( in float)
0:? Sequence
0:? Sequence
0:3 Loop with condition not tested first
0:3 Loop with condition not tested first
: Unroll
0:3 Loop Condition
0:3 Loop Condition
0:3 Constant:
0:3 Constant:
0:3 false (const bool)
0:3 false (const bool)
0:3 No loop body
0:3 No loop body
0:4 Loop with condition not tested first
0:4 Loop with condition not tested first
: Unroll
0:4 Loop Condition
0:4 Loop Condition
0:4 Constant:
0:4 Constant:
0:4 false (const bool)
0:4 false (const bool)
...
...
Test/baseResults/hlsl.forLoop.frag.out
View file @
30476568
...
@@ -17,7 +17,7 @@ gl_FragCoord origin is upper left
...
@@ -17,7 +17,7 @@ gl_FragCoord origin is upper left
0:4 No loop condition
0:4 No loop condition
0:4 No loop body
0:4 No loop body
0:? Sequence
0:? Sequence
0:5 Loop with condition tested first
0:5 Loop with condition tested first
: Unroll
0:5 Loop Condition
0:5 Loop Condition
0:5 any ( temp bool)
0:5 any ( temp bool)
0:5 NotEqual ( temp 4-component vector of bool)
0:5 NotEqual ( temp 4-component vector of bool)
...
@@ -220,7 +220,7 @@ gl_FragCoord origin is upper left
...
@@ -220,7 +220,7 @@ gl_FragCoord origin is upper left
0:4 No loop condition
0:4 No loop condition
0:4 No loop body
0:4 No loop body
0:? Sequence
0:? Sequence
0:5 Loop with condition tested first
0:5 Loop with condition tested first
: Unroll
0:5 Loop Condition
0:5 Loop Condition
0:5 any ( temp bool)
0:5 any ( temp bool)
0:5 NotEqual ( temp 4-component vector of bool)
0:5 NotEqual ( temp 4-component vector of bool)
...
...
Test/baseResults/hlsl.if.frag.out
View file @
30476568
...
@@ -42,7 +42,7 @@ gl_FragCoord origin is upper left
...
@@ -42,7 +42,7 @@ gl_FragCoord origin is upper left
0:14 'input' ( in 4-component vector of float)
0:14 'input' ( in 4-component vector of float)
0:14 'input' ( in 4-component vector of float)
0:14 'input' ( in 4-component vector of float)
0:14 true case is null
0:14 true case is null
0:19 Test condition and select ( temp void)
0:19 Test condition and select ( temp void)
: Flatten
0:19 Condition
0:19 Condition
0:19 all ( temp bool)
0:19 all ( temp bool)
0:19 Equal ( temp 4-component vector of bool)
0:19 Equal ( temp 4-component vector of bool)
...
@@ -152,7 +152,7 @@ gl_FragCoord origin is upper left
...
@@ -152,7 +152,7 @@ gl_FragCoord origin is upper left
0:14 'input' ( in 4-component vector of float)
0:14 'input' ( in 4-component vector of float)
0:14 'input' ( in 4-component vector of float)
0:14 'input' ( in 4-component vector of float)
0:14 true case is null
0:14 true case is null
0:19 Test condition and select ( temp void)
0:19 Test condition and select ( temp void)
: Flatten
0:19 Condition
0:19 Condition
0:19 all ( temp bool)
0:19 all ( temp bool)
0:19 Equal ( temp 4-component vector of bool)
0:19 Equal ( temp 4-component vector of bool)
...
...
Test/baseResults/hlsl.loopattr.frag.out
View file @
30476568
...
@@ -10,7 +10,7 @@ gl_FragCoord origin is upper left
...
@@ -10,7 +10,7 @@ gl_FragCoord origin is upper left
0:5 'x' ( temp int)
0:5 'x' ( temp int)
0:5 Constant:
0:5 Constant:
0:5 0 (const int)
0:5 0 (const int)
0:5 Loop with condition tested first
0:5 Loop with condition tested first
: Unroll
0:5 Loop Condition
0:5 Loop Condition
0:5 Compare Less Than ( temp bool)
0:5 Compare Less Than ( temp bool)
0:5 'x' ( temp int)
0:5 'x' ( temp int)
...
@@ -25,7 +25,7 @@ gl_FragCoord origin is upper left
...
@@ -25,7 +25,7 @@ gl_FragCoord origin is upper left
0:8 'y' ( temp int)
0:8 'y' ( temp int)
0:8 Constant:
0:8 Constant:
0:8 0 (const int)
0:8 0 (const int)
0:8 Loop with condition tested first
0:8 Loop with condition tested first
: DontUnroll
0:8 Loop Condition
0:8 Loop Condition
0:8 Compare Less Than ( temp bool)
0:8 Compare Less Than ( temp bool)
0:8 'y' ( temp int)
0:8 'y' ( temp int)
...
@@ -80,7 +80,7 @@ gl_FragCoord origin is upper left
...
@@ -80,7 +80,7 @@ gl_FragCoord origin is upper left
0:5 'x' ( temp int)
0:5 'x' ( temp int)
0:5 Constant:
0:5 Constant:
0:5 0 (const int)
0:5 0 (const int)
0:5 Loop with condition tested first
0:5 Loop with condition tested first
: Unroll
0:5 Loop Condition
0:5 Loop Condition
0:5 Compare Less Than ( temp bool)
0:5 Compare Less Than ( temp bool)
0:5 'x' ( temp int)
0:5 'x' ( temp int)
...
@@ -95,7 +95,7 @@ gl_FragCoord origin is upper left
...
@@ -95,7 +95,7 @@ gl_FragCoord origin is upper left
0:8 'y' ( temp int)
0:8 'y' ( temp int)
0:8 Constant:
0:8 Constant:
0:8 0 (const int)
0:8 0 (const int)
0:8 Loop with condition tested first
0:8 Loop with condition tested first
: DontUnroll
0:8 Loop Condition
0:8 Loop Condition
0:8 Compare Less Than ( temp bool)
0:8 Compare Less Than ( temp bool)
0:8 'y' ( temp int)
0:8 'y' ( temp int)
...
...
Test/baseResults/hlsl.switch.frag.out
View file @
30476568
...
@@ -36,7 +36,7 @@ gl_FragCoord origin is upper left
...
@@ -36,7 +36,7 @@ gl_FragCoord origin is upper left
0:17 Pre-Decrement ( temp 4-component vector of float)
0:17 Pre-Decrement ( temp 4-component vector of float)
0:17 'input' ( in 4-component vector of float)
0:17 'input' ( in 4-component vector of float)
0:18 Branch: Break
0:18 Branch: Break
0:21 switch
0:21 switch
: DontFlatten
0:21 condition
0:21 condition
0:21 'c' ( in int)
0:21 'c' ( in int)
0:21 body
0:21 body
...
@@ -186,7 +186,7 @@ gl_FragCoord origin is upper left
...
@@ -186,7 +186,7 @@ gl_FragCoord origin is upper left
0:17 Pre-Decrement ( temp 4-component vector of float)
0:17 Pre-Decrement ( temp 4-component vector of float)
0:17 'input' ( in 4-component vector of float)
0:17 'input' ( in 4-component vector of float)
0:18 Branch: Break
0:18 Branch: Break
0:21 switch
0:21 switch
: DontFlatten
0:21 condition
0:21 condition
0:21 'c' ( in int)
0:21 'c' ( in int)
0:21 body
0:21 body
...
...
Test/baseResults/hlsl.whileLoop.frag.out
View file @
30476568
...
@@ -21,7 +21,7 @@ gl_FragCoord origin is upper left
...
@@ -21,7 +21,7 @@ gl_FragCoord origin is upper left
0:4 Constant:
0:4 Constant:
0:4 false (const bool)
0:4 false (const bool)
0:4 No loop body
0:4 No loop body
0:5 Loop with condition tested first
0:5 Loop with condition tested first
: Unroll
0:5 Loop Condition
0:5 Loop Condition
0:5 Constant:
0:5 Constant:
0:5 false (const bool)
0:5 false (const bool)
...
@@ -71,7 +71,7 @@ gl_FragCoord origin is upper left
...
@@ -71,7 +71,7 @@ gl_FragCoord origin is upper left
0:4 Constant:
0:4 Constant:
0:4 false (const bool)
0:4 false (const bool)
0:4 No loop body
0:4 No loop body
0:5 Loop with condition tested first
0:5 Loop with condition tested first
: Unroll
0:5 Loop Condition
0:5 Loop Condition
0:5 Constant:
0:5 Constant:
0:5 false (const bool)
0:5 false (const bool)
...
...
glslang/MachineIndependent/intermOut.cpp
View file @
30476568
...
@@ -817,7 +817,13 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node
...
@@ -817,7 +817,13 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node
OutputTreeText
(
out
,
node
,
depth
);
OutputTreeText
(
out
,
node
,
depth
);
out
.
debug
<<
"Test condition and select"
;
out
.
debug
<<
"Test condition and select"
;
out
.
debug
<<
" ("
<<
node
->
getCompleteString
()
<<
")
\n
"
;
out
.
debug
<<
" ("
<<
node
->
getCompleteString
()
<<
")"
;
if
(
node
->
getFlatten
())
out
.
debug
<<
": Flatten"
;
if
(
node
->
getDontFlatten
())
out
.
debug
<<
": DontFlatten"
;
out
.
debug
<<
"
\n
"
;
++
depth
;
++
depth
;
...
@@ -979,7 +985,17 @@ bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node)
...
@@ -979,7 +985,17 @@ bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node)
out
.
debug
<<
"Loop with condition "
;
out
.
debug
<<
"Loop with condition "
;
if
(
!
node
->
testFirst
())
if
(
!
node
->
testFirst
())
out
.
debug
<<
"not "
;
out
.
debug
<<
"not "
;
out
.
debug
<<
"tested first
\n
"
;
out
.
debug
<<
"tested first"
;
if
(
node
->
getUnroll
())
out
.
debug
<<
": Unroll"
;
if
(
node
->
getDontUnroll
())
out
.
debug
<<
": DontUnroll"
;
if
(
node
->
getLoopDependency
())
{
out
.
debug
<<
": Dependency "
;
out
.
debug
<<
node
->
getLoopDependency
();
}
out
.
debug
<<
"
\n
"
;
++
depth
;
++
depth
;
...
@@ -1040,7 +1056,13 @@ bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node)
...
@@ -1040,7 +1056,13 @@ bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node)
TInfoSink
&
out
=
infoSink
;
TInfoSink
&
out
=
infoSink
;
OutputTreeText
(
out
,
node
,
depth
);
OutputTreeText
(
out
,
node
,
depth
);
out
.
debug
<<
"switch
\n
"
;
out
.
debug
<<
"switch"
;
if
(
node
->
getFlatten
())
out
.
debug
<<
": Flatten"
;
if
(
node
->
getDontFlatten
())
out
.
debug
<<
": DontFlatten"
;
out
.
debug
<<
"
\n
"
;
OutputTreeText
(
out
,
node
,
depth
);
OutputTreeText
(
out
,
node
,
depth
);
out
.
debug
<<
"condition
\n
"
;
out
.
debug
<<
"condition
\n
"
;
...
...
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