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
213bbbe4
Commit
213bbbe4
authored
Jan 20, 2016
by
Dejan Mircevski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split loop header from condition testing for for/while loops.
parent
7349eab0
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1863 additions
and
1786 deletions
+1863
-1786
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+12
-10
spv.dataOutIndirect.vert.out
Test/baseResults/spv.dataOutIndirect.vert.out
+39
-37
spv.for-continue-break.vert.out
Test/baseResults/spv.for-continue-break.vert.out
+57
-55
spv.for-nobody.vert.out
Test/baseResults/spv.for-nobody.vert.out
+26
-24
spv.for-simple.vert.out
Test/baseResults/spv.for-simple.vert.out
+24
-22
spv.forLoop.frag.out
Test/baseResults/spv.forLoop.frag.out
+165
-155
spv.localAggregates.frag.out
Test/baseResults/spv.localAggregates.frag.out
+78
-76
spv.loops.frag.out
Test/baseResults/spv.loops.frag.out
+1044
-998
spv.loopsArtificial.frag.out
Test/baseResults/spv.loopsArtificial.frag.out
+178
-176
spv.switch.frag.out
Test/baseResults/spv.switch.frag.out
+143
-139
spv.while-continue-break.vert.out
Test/baseResults/spv.while-continue-break.vert.out
+49
-47
spv.while-simple.vert.out
Test/baseResults/spv.while-simple.vert.out
+20
-18
spv.whileLoop.frag.out
Test/baseResults/spv.whileLoop.frag.out
+28
-26
spv.for-notest.vert
Test/spv.for-notest.vert
+0
-3
No files found.
SPIRV/GlslangToSpv.cpp
View file @
213bbbe4
...
@@ -1391,12 +1391,22 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
...
@@ -1391,12 +1391,22 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
{
{
auto
blocks
=
builder
.
makeNewLoop
();
auto
blocks
=
builder
.
makeNewLoop
();
builder
.
createBranch
(
&
blocks
.
head
);
builder
.
createBranch
(
&
blocks
.
head
);
if
(
node
->
testFirst
()
&&
node
->
getTest
())
{
// Spec requires back edges to target header blocks, and every header block
// must dominate its merge block. Make a header block first to ensure these
// conditions are met. By definition, it will contain OpLoopMerge, followed
// by a block-ending branch. But we don't want to put any other body/test
// instructions in it, since the body/test may have arbitrary instructions,
// including merges of its own.
builder
.
setBuildPoint
(
&
blocks
.
head
);
builder
.
setBuildPoint
(
&
blocks
.
head
);
builder
.
createLoopMerge
(
&
blocks
.
merge
,
&
blocks
.
continue_target
,
spv
::
LoopControlMaskNone
);
if
(
node
->
testFirst
()
&&
node
->
getTest
())
{
spv
::
Block
&
test
=
builder
.
makeNewBlock
();
builder
.
createBranch
(
&
test
);
builder
.
setBuildPoint
(
&
test
);
node
->
getTest
()
->
traverse
(
this
);
node
->
getTest
()
->
traverse
(
this
);
spv
::
Id
condition
=
spv
::
Id
condition
=
builder
.
accessChainLoad
(
convertGlslangToSpvType
(
node
->
getTest
()
->
getType
()));
builder
.
accessChainLoad
(
convertGlslangToSpvType
(
node
->
getTest
()
->
getType
()));
builder
.
createLoopMerge
(
&
blocks
.
merge
,
&
blocks
.
continue_target
,
spv
::
LoopControlMaskNone
);
builder
.
createConditionalBranch
(
condition
,
&
blocks
.
body
,
&
blocks
.
merge
);
builder
.
createConditionalBranch
(
condition
,
&
blocks
.
body
,
&
blocks
.
merge
);
builder
.
setBuildPoint
(
&
blocks
.
body
);
builder
.
setBuildPoint
(
&
blocks
.
body
);
...
@@ -1411,14 +1421,6 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
...
@@ -1411,14 +1421,6 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
node
->
getTerminal
()
->
traverse
(
this
);
node
->
getTerminal
()
->
traverse
(
this
);
builder
.
createBranch
(
&
blocks
.
head
);
builder
.
createBranch
(
&
blocks
.
head
);
}
else
{
}
else
{
// Spec requires back edges to target header blocks, and every header
// block must dominate its merge block. Make a header block first to
// ensure these conditions are met. By definition, it will contain
// OpLoopMerge, followed by a block-ending branch. But we don't want to
// put any other body instructions in it, since the body may have
// arbitrary instructions, including merges of its own.
builder
.
setBuildPoint
(
&
blocks
.
head
);
builder
.
createLoopMerge
(
&
blocks
.
merge
,
&
blocks
.
continue_target
,
spv
::
LoopControlMaskNone
);
builder
.
createBranch
(
&
blocks
.
body
);
builder
.
createBranch
(
&
blocks
.
body
);
breakForLoop
.
push
(
true
);
breakForLoop
.
push
(
true
);
...
...
Test/baseResults/spv.dataOutIndirect.vert.out
View file @
213bbbe4
...
@@ -8,66 +8,68 @@ Linked vertex stage:
...
@@ -8,66 +8,68 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by
39
// Id's are bound by
40
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 2
4 27 33 38
EntryPoint Vertex 4 "main" 2
5 28 34 39
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
Name 8 "i"
Name 8 "i"
Name 2
4
"colorOut"
Name 2
5
"colorOut"
Name 2
7
"color"
Name 2
8
"color"
Name 3
3
"gl_Position"
Name 3
4
"gl_Position"
Name 3
8
"gl_VertexID"
Name 3
9
"gl_VertexID"
Decorate 3
3
(gl_Position) BuiltIn Position
Decorate 3
4
(gl_Position) BuiltIn Position
Decorate 3
8
(gl_VertexID) BuiltIn VertexId
Decorate 3
9
(gl_VertexID) BuiltIn VertexId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
9: 6(int) Constant 1
9: 6(int) Constant 1
1
5
: 6(int) Constant 5
1
6
: 6(int) Constant 5
1
6
: TypeBool
1
7
: TypeBool
1
8
: TypeFloat 32
1
9
: TypeFloat 32
19: TypeVector 18
(float) 4
20: TypeVector 19
(float) 4
2
0
: TypeInt 32 0
2
1
: TypeInt 32 0
2
1: 20
(int) Constant 6
2
2: 21
(int) Constant 6
2
2: TypeArray 19(fvec4) 21
2
3: TypeArray 20(fvec4) 22
2
3: TypePointer Output 22
2
4: TypePointer Output 23
2
4(colorOut): 23
(ptr) Variable Output
2
5(colorOut): 24
(ptr) Variable Output
2
6: TypePointer Input 19
(fvec4)
2
7: TypePointer Input 20
(fvec4)
2
7(color): 26
(ptr) Variable Input
2
8(color): 27
(ptr) Variable Input
29: TypePointer Output 19
(fvec4)
30: TypePointer Output 20
(fvec4)
3
3(gl_Position): 29
(ptr) Variable Output
3
4(gl_Position): 30
(ptr) Variable Output
3
4
: 6(int) Constant 2
3
5
: 6(int) Constant 2
3
7
: TypePointer Input 6(int)
3
8
: TypePointer Input 6(int)
3
8(gl_VertexID): 37
(ptr) Variable Input
3
9(gl_VertexID): 38
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(i): 7(ptr) Variable Function
8(i): 7(ptr) Variable Function
Store 8(i) 9
Store 8(i) 9
Branch 10
Branch 10
10: Label
10: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 13 None
LoopMerge 12 13 None
BranchConditional 17 11 12
Branch 14
14: Label
15: 6(int) Load 8(i)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
11: Label
2
5
: 6(int) Load 8(i)
2
6
: 6(int) Load 8(i)
2
8: 19(fvec4) Load 27
(color)
2
9: 20(fvec4) Load 28
(color)
3
0: 29(ptr) AccessChain 24(colorOut) 25
3
1: 30(ptr) AccessChain 25(colorOut) 26
Store 3
0 28
Store 3
1 29
Branch 13
Branch 13
13: Label
13: Label
3
1
: 6(int) Load 8(i)
3
2
: 6(int) Load 8(i)
3
2: 6(int) IAdd 31
9
3
3: 6(int) IAdd 32
9
Store 8(i) 3
2
Store 8(i) 3
3
Branch 10
Branch 10
12: Label
12: Label
3
5: 29(ptr) AccessChain 24(colorOut) 34
3
6: 30(ptr) AccessChain 25(colorOut) 35
3
6: 19(fvec4) Load 35
3
7: 20(fvec4) Load 36
Store 3
3(gl_Position) 36
Store 3
4(gl_Position) 37
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.for-continue-break.vert.out
View file @
213bbbe4
...
@@ -5,86 +5,88 @@ Linked vertex stage:
...
@@ -5,86 +5,88 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 4
7
// Id's are bound by 4
8
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 4
5 46
EntryPoint Vertex 4 "main" 4
6 47
Source ESSL 300
Source ESSL 300
Name 4 "main"
Name 4 "main"
Name 8 "i"
Name 8 "i"
Name 1
8
"A"
Name 1
9
"A"
Name 2
6
"B"
Name 2
7
"B"
Name 2
8
"C"
Name 2
9
"C"
Name 3
5
"D"
Name 3
6
"D"
Name 3
7
"E"
Name 3
8
"E"
Name 3
8
"F"
Name 3
9
"F"
Name 4
2
"G"
Name 4
3
"G"
Name 4
5
"gl_VertexID"
Name 4
6
"gl_VertexID"
Name 4
6
"gl_InstanceID"
Name 4
7
"gl_InstanceID"
Decorate 4
5
(gl_VertexID) BuiltIn VertexId
Decorate 4
6
(gl_VertexID) BuiltIn VertexId
Decorate 4
6
(gl_InstanceID) BuiltIn InstanceId
Decorate 4
7
(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
9: 6(int) Constant 0
9: 6(int) Constant 0
1
5
: 6(int) Constant 10
1
6
: 6(int) Constant 10
1
6
: TypeBool
1
7
: TypeBool
19
: 6(int) Constant 1
20
: 6(int) Constant 1
2
1
: 6(int) Constant 2
2
2
: 6(int) Constant 2
3
0
: 6(int) Constant 3
3
1
: 6(int) Constant 3
39
: 6(int) Constant 12
40
: 6(int) Constant 12
4
3
: 6(int) Constant 99
4
4
: 6(int) Constant 99
4
4
: TypePointer Input 6(int)
4
5
: TypePointer Input 6(int)
4
5(gl_VertexID): 44
(ptr) Variable Input
4
6(gl_VertexID): 45
(ptr) Variable Input
4
6(gl_InstanceID): 44
(ptr) Variable Input
4
7(gl_InstanceID): 45
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(i): 7(ptr) Variable Function
8(i): 7(ptr) Variable Function
1
8
(A): 7(ptr) Variable Function
1
9
(A): 7(ptr) Variable Function
2
6
(B): 7(ptr) Variable Function
2
7
(B): 7(ptr) Variable Function
2
8
(C): 7(ptr) Variable Function
2
9
(C): 7(ptr) Variable Function
3
5
(D): 7(ptr) Variable Function
3
6
(D): 7(ptr) Variable Function
3
7
(E): 7(ptr) Variable Function
3
8
(E): 7(ptr) Variable Function
3
8
(F): 7(ptr) Variable Function
3
9
(F): 7(ptr) Variable Function
4
2
(G): 7(ptr) Variable Function
4
3
(G): 7(ptr) Variable Function
Store 8(i) 9
Store 8(i) 9
Branch 10
Branch 10
10: Label
10: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 13 None
LoopMerge 12 13 None
BranchConditional 17 11 12
Branch 14
14: Label
15: 6(int) Load 8(i)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
11: Label
Store 18(A) 19
Store 19(A) 20
20: 6(int) Load 8(i)
21: 6(int) Load 8(i)
22: 6(int) SMod 20 21
23: 6(int) SMod 21 22
23: 16(bool) IEqual 22 9
24: 17(bool) IEqual 23 9
SelectionMerge 25 None
SelectionMerge 26 None
BranchConditional 23 24 25
BranchConditional 24 25 26
24: Label
Store 26(B) 19
Branch 13
25: Label
25: Label
29: 6(int) Load 8(i)
Store 27(B) 20
31: 6(int) SMod 29 30
Branch 13
32: 16(bool) IEqual 31 9
26: Label
SelectionMerge 34 None
30: 6(int) Load 8(i)
BranchConditional 32 33 34
32: 6(int) SMod 30 31
33:
Label
33:
17(bool) IEqual 32 9
Store 35(D) 19
SelectionMerge 35 None
Branch 12
BranchConditional 33 34 35
34: Label
34: Label
Store 38(F) 39
Store 36(D) 20
Branch 12
35: Label
Store 39(F) 40
Branch 13
Branch 13
13: Label
13: Label
4
0
: 6(int) Load 8(i)
4
1
: 6(int) Load 8(i)
4
1: 6(int) IAdd 40 19
4
2: 6(int) IAdd 41 20
Store 8(i) 4
1
Store 8(i) 4
2
Branch 10
Branch 10
12: Label
12: Label
Store 4
2(G) 43
Store 4
3(G) 44
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.for-nobody.vert.out
View file @
213bbbe4
...
@@ -7,53 +7,55 @@ Linked vertex stage:
...
@@ -7,53 +7,55 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 2
7
// Id's are bound by 2
8
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 2
2 25 26
EntryPoint Vertex 4 "main" 2
3 26 27
Source GLSL 450
Source GLSL 450
Name 4 "main"
Name 4 "main"
Name 8 "i"
Name 8 "i"
Name 2
2
"r"
Name 2
3
"r"
Name 2
5
"gl_VertexID"
Name 2
6
"gl_VertexID"
Name 2
6
"gl_InstanceID"
Name 2
7
"gl_InstanceID"
Decorate 2
2
(r) Location 0
Decorate 2
3
(r) Location 0
Decorate 2
5
(gl_VertexID) BuiltIn VertexId
Decorate 2
6
(gl_VertexID) BuiltIn VertexId
Decorate 2
6
(gl_InstanceID) BuiltIn InstanceId
Decorate 2
7
(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
9: 6(int) Constant 0
9: 6(int) Constant 0
1
5
: 6(int) Constant 10
1
6
: 6(int) Constant 10
1
6
: TypeBool
1
7
: TypeBool
19
: 6(int) Constant 1
20
: 6(int) Constant 1
2
1
: TypePointer Output 6(int)
2
2
: TypePointer Output 6(int)
2
2(r): 21
(ptr) Variable Output
2
3(r): 22
(ptr) Variable Output
2
4
: TypePointer Input 6(int)
2
5
: TypePointer Input 6(int)
2
5(gl_VertexID): 24
(ptr) Variable Input
2
6(gl_VertexID): 25
(ptr) Variable Input
2
6(gl_InstanceID): 24
(ptr) Variable Input
2
7(gl_InstanceID): 25
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(i): 7(ptr) Variable Function
8(i): 7(ptr) Variable Function
Store 8(i) 9
Store 8(i) 9
Branch 10
Branch 10
10: Label
10: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 13 None
LoopMerge 12 13 None
BranchConditional 17 11 12
Branch 14
14: Label
15: 6(int) Load 8(i)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
11: Label
Branch 13
Branch 13
13: Label
13: Label
1
8
: 6(int) Load 8(i)
1
9
: 6(int) Load 8(i)
2
0: 6(int) IAdd 18 19
2
1: 6(int) IAdd 19 20
Store 8(i) 2
0
Store 8(i) 2
1
Branch 10
Branch 10
12: Label
12: Label
2
3
: 6(int) Load 8(i)
2
4
: 6(int) Load 8(i)
Store 2
2(r) 23
Store 2
3(r) 24
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.for-simple.vert.out
View file @
213bbbe4
...
@@ -5,50 +5,52 @@ Linked vertex stage:
...
@@ -5,50 +5,52 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 2
6
// Id's are bound by 2
7
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 2
4 25
EntryPoint Vertex 4 "main" 2
5 26
Source ESSL 300
Source ESSL 300
Name 4 "main"
Name 4 "main"
Name 8 "i"
Name 8 "i"
Name 1
8
"j"
Name 1
9
"j"
Name 2
4
"gl_VertexID"
Name 2
5
"gl_VertexID"
Name 2
5
"gl_InstanceID"
Name 2
6
"gl_InstanceID"
Decorate 2
4
(gl_VertexID) BuiltIn VertexId
Decorate 2
5
(gl_VertexID) BuiltIn VertexId
Decorate 2
5
(gl_InstanceID) BuiltIn InstanceId
Decorate 2
6
(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
9: 6(int) Constant 0
9: 6(int) Constant 0
1
5
: 6(int) Constant 10
1
6
: 6(int) Constant 10
1
6
: TypeBool
1
7
: TypeBool
19
: 6(int) Constant 12
20
: 6(int) Constant 12
2
1
: 6(int) Constant 1
2
2
: 6(int) Constant 1
2
3
: TypePointer Input 6(int)
2
4
: TypePointer Input 6(int)
2
4(gl_VertexID): 23
(ptr) Variable Input
2
5(gl_VertexID): 24
(ptr) Variable Input
2
5(gl_InstanceID): 23
(ptr) Variable Input
2
6(gl_InstanceID): 24
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(i): 7(ptr) Variable Function
8(i): 7(ptr) Variable Function
1
8
(j): 7(ptr) Variable Function
1
9
(j): 7(ptr) Variable Function
Store 8(i) 9
Store 8(i) 9
Branch 10
Branch 10
10: Label
10: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 13 None
LoopMerge 12 13 None
BranchConditional 17 11 12
Branch 14
14: Label
15: 6(int) Load 8(i)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
11: Label
Store 1
8(j) 19
Store 1
9(j) 20
Branch 13
Branch 13
13: Label
13: Label
2
0
: 6(int) Load 8(i)
2
1
: 6(int) Load 8(i)
2
2: 6(int) IAdd 20 21
2
3: 6(int) IAdd 21 22
Store 8(i) 2
2
Store 8(i) 2
3
Branch 10
Branch 10
12: Label
12: Label
Return
Return
...
...
Test/baseResults/spv.forLoop.frag.out
View file @
213bbbe4
...
@@ -5,30 +5,30 @@ Linked fragment stage:
...
@@ -5,30 +5,30 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 1
27
// Id's are bound by 1
32
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 11 3
6 101
EntryPoint Fragment 4 "main" 11 3
7 105
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
Name 9 "color"
Name 9 "color"
Name 11 "BaseColor"
Name 11 "BaseColor"
Name 15 "i"
Name 15 "i"
Name 2
3
"Count"
Name 2
4
"Count"
Name 2
8
"bigColor"
Name 2
9
"bigColor"
Name 3
6
"gl_FragColor"
Name 3
7
"gl_FragColor"
Name
39
"sum"
Name
40
"sum"
Name 4
1
"i"
Name 4
2
"i"
Name 5
2
"v4"
Name 5
4
"v4"
Name 6
2
"i"
Name 6
4
"i"
Name
69
"tv4"
Name
72
"tv4"
Name 8
6
"r"
Name 8
9
"r"
Name 9
2
"i"
Name 9
5
"i"
Name 10
1
"f"
Name 10
5
"f"
Name 11
4
"i"
Name 11
8
"i"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -39,166 +39,176 @@ Linked fragment stage:
...
@@ -39,166 +39,176 @@ Linked fragment stage:
13: TypeInt 32 1
13: TypeInt 32 1
14: TypePointer Function 13(int)
14: TypePointer Function 13(int)
16: 13(int) Constant 0
16: 13(int) Constant 0
2
2
: TypePointer UniformConstant 13(int)
2
3
: TypePointer UniformConstant 13(int)
2
3(Count): 22
(ptr) Variable UniformConstant
2
4(Count): 23
(ptr) Variable UniformConstant
2
5
: TypeBool
2
6
: TypeBool
2
7
: TypePointer UniformConstant 7(fvec4)
2
8
: TypePointer UniformConstant 7(fvec4)
2
8(bigColor): 27
(ptr) Variable UniformConstant
2
9(bigColor): 28
(ptr) Variable UniformConstant
3
3
: 13(int) Constant 1
3
4
: 13(int) Constant 1
3
5
: TypePointer Output 7(fvec4)
3
6
: TypePointer Output 7(fvec4)
3
6(gl_FragColor): 35
(ptr) Variable Output
3
7(gl_FragColor): 36
(ptr) Variable Output
3
8
: TypePointer Function 6(float)
3
9
: TypePointer Function 6(float)
4
0
: 6(float) Constant 0
4
1
: 6(float) Constant 0
4
7
: 13(int) Constant 4
4
9
: 13(int) Constant 4
49
: TypeInt 32 0
51
: TypeInt 32 0
5
0: TypeVector 49
(int) 4
5
2: TypeVector 51
(int) 4
5
1: TypePointer UniformConstant 50
(ivec4)
5
3: TypePointer UniformConstant 52
(ivec4)
5
2(v4): 51
(ptr) Variable UniformConstant
5
4(v4): 53
(ptr) Variable UniformConstant
5
4: TypePointer UniformConstant 49
(int)
5
6: TypePointer UniformConstant 51
(int)
7
4: 49
(int) Constant 4
7
7: 51
(int) Constant 4
87
: TypeVector 6(float) 3
90
: TypeVector 6(float) 3
10
0
: TypePointer Input 6(float)
10
4
: TypePointer Input 6(float)
10
1(f): 100
(ptr) Variable Input
10
5(f): 104
(ptr) Variable Input
10
3: 49
(int) Constant 3
10
7: 51
(int) Constant 3
12
0
: 13(int) Constant 16
12
5
: 13(int) Constant 16
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9(color): 8(ptr) Variable Function
9(color): 8(ptr) Variable Function
15(i): 14(ptr) Variable Function
15(i): 14(ptr) Variable Function
39(sum): 38
(ptr) Variable Function
40(sum): 39
(ptr) Variable Function
4
1
(i): 14(ptr) Variable Function
4
2
(i): 14(ptr) Variable Function
6
2
(i): 14(ptr) Variable Function
6
4
(i): 14(ptr) Variable Function
69
(tv4): 8(ptr) Variable Function
72
(tv4): 8(ptr) Variable Function
8
6
(r): 8(ptr) Variable Function
8
9
(r): 8(ptr) Variable Function
9
2
(i): 14(ptr) Variable Function
9
5
(i): 14(ptr) Variable Function
11
4
(i): 14(ptr) Variable Function
11
8
(i): 14(ptr) Variable Function
12: 7(fvec4) Load 11(BaseColor)
12: 7(fvec4) Load 11(BaseColor)
Store 9(color) 12
Store 9(color) 12
Store 15(i) 16
Store 15(i) 16
Branch 17
Branch 17
17: Label
17: Label
21: 13(int) Load 15(i)
24: 13(int) Load 23(Count)
26: 25(bool) SLessThan 21 24
LoopMerge 19 20 None
LoopMerge 19 20 None
BranchConditional 26 18 19
Branch 21
21: Label
22: 13(int) Load 15(i)
25: 13(int) Load 24(Count)
27: 26(bool) SLessThan 22 25
BranchConditional 27 18 19
18: Label
18: Label
29: 7(fvec4) Load 28
(bigColor)
30: 7(fvec4) Load 29
(bigColor)
3
0
: 7(fvec4) Load 9(color)
3
1
: 7(fvec4) Load 9(color)
3
1: 7(fvec4) FAdd 30 29
3
2: 7(fvec4) FAdd 31 30
Store 9(color) 3
1
Store 9(color) 3
2
Branch 20
Branch 20
20: Label
20: Label
3
2
: 13(int) Load 15(i)
3
3
: 13(int) Load 15(i)
3
4: 13(int) IAdd 32 33
3
5: 13(int) IAdd 33 34
Store 15(i) 3
4
Store 15(i) 3
5
Branch 17
Branch 17
19: Label
19: Label
37: 7(fvec4) Load 9(color)
38: 7(fvec4) Load 9(color)
Store 36(gl_FragColor) 37
Store 37(gl_FragColor) 38
Store 39(sum) 40
Store 40(sum) 41
Store 41(i) 16
Store 42(i) 16
Branch 42
Branch 43
42: Label
46: 13(int) Load 41(i)
48: 25(bool) SLessThan 46 47
LoopMerge 44 45 None
BranchConditional 48 43 44
43: Label
43: Label
53: 13(int) Load 41(i)
LoopMerge 45 46 None
55: 54(ptr) AccessChain 52(v4) 53
Branch 47
56: 49(int) Load 55
47: Label
57: 6(float) ConvertUToF 56
48: 13(int) Load 42(i)
58: 6(float) Load 39(sum)
50: 26(bool) SLessThan 48 49
59: 6(float) FAdd 58 57
BranchConditional 50 44 45
Store 39(sum) 59
Branch 45
45: Label
60: 13(int) Load 41(i)
61: 13(int) IAdd 60 33
Store 41(i) 61
Branch 42
44: Label
44: Label
Store 62(i) 16
55: 13(int) Load 42(i)
Branch 63
57: 56(ptr) AccessChain 54(v4) 55
63: Label
58: 51(int) Load 57
67: 13(int) Load 62(i)
59: 6(float) ConvertUToF 58
68: 25(bool) SLessThan 67 47
60: 6(float) Load 40(sum)
LoopMerge 65 66 None
61: 6(float) FAdd 60 59
BranchConditional 68 64 65
Store 40(sum) 61
64: Label
Branch 46
70: 13(int) Load 62(i)
46: Label
71: 13(int) Load 62(i)
62: 13(int) Load 42(i)
72: 54(ptr) AccessChain 52(v4) 71
63: 13(int) IAdd 62 34
73: 49(int) Load 72
Store 42(i) 63
75: 49(int) IMul 73 74
Branch 43
76: 6(float) ConvertUToF 75
45: Label
77: 38(ptr) AccessChain 69(tv4) 70
Store 64(i) 16
Store 77 76
Branch 65
Branch 66
66: Label
78: 13(int) Load 62(i)
79: 13(int) IAdd 78 33
Store 62(i) 79
Branch 63
65: Label
65: Label
80: 6(float) Load 39(sum)
LoopMerge 67 68 None
81: 7(fvec4) CompositeConstruct 80 80 80 80
Branch 69
82: 7(fvec4) Load 69(tv4)
69: Label
83: 7(fvec4) FAdd 81 82
70: 13(int) Load 64(i)
84: 7(fvec4) Load 36(gl_FragColor)
71: 26(bool) SLessThan 70 49
85: 7(fvec4) FAdd 84 83
BranchConditional 71 66 67
Store 36(gl_FragColor) 85
66: Label
88: 7(fvec4) Load 11(BaseColor)
73: 13(int) Load 64(i)
89: 87(fvec3) VectorShuffle 88 88 0 1 2
74: 13(int) Load 64(i)
90: 7(fvec4) Load 86(r)
75: 56(ptr) AccessChain 54(v4) 74
91: 7(fvec4) VectorShuffle 90 89 4 5 6 3
76: 51(int) Load 75
Store 86(r) 91
78: 51(int) IMul 76 77
Store 92(i) 16
79: 6(float) ConvertUToF 78
Branch 93
80: 39(ptr) AccessChain 72(tv4) 73
93: Label
Store 80 79
97: 13(int) Load 92(i)
Branch 68
98: 13(int) Load 23(Count)
68: Label
99: 25(bool) SLessThan 97 98
81: 13(int) Load 64(i)
LoopMerge 95 96 None
82: 13(int) IAdd 81 34
BranchConditional 99 94 95
Store 64(i) 82
94: Label
Branch 65
102: 6(float) Load 101(f)
67: Label
104: 38(ptr) AccessChain 86(r) 103
83: 6(float) Load 40(sum)
Store 104 102
84: 7(fvec4) CompositeConstruct 83 83 83 83
85: 7(fvec4) Load 72(tv4)
86: 7(fvec4) FAdd 84 85
87: 7(fvec4) Load 37(gl_FragColor)
88: 7(fvec4) FAdd 87 86
Store 37(gl_FragColor) 88
91: 7(fvec4) Load 11(BaseColor)
92: 90(fvec3) VectorShuffle 91 91 0 1 2
93: 7(fvec4) Load 89(r)
94: 7(fvec4) VectorShuffle 93 92 4 5 6 3
Store 89(r) 94
Store 95(i) 16
Branch 96
Branch 96
96: Label
96: Label
105: 13(int) Load 92(i)
LoopMerge 98 99 None
106: 13(int) IAdd 105 33
Branch 100
Store 92(i) 106
100: Label
Branch 93
101: 13(int) Load 95(i)
95: Label
102: 13(int) Load 24(Count)
107: 7(fvec4) Load 86(r)
103: 26(bool) SLessThan 101 102
108: 87(fvec3) VectorShuffle 107 107 0 1 2
BranchConditional 103 97 98
109: 7(fvec4) Load 36(gl_FragColor)
97: Label
110: 87(fvec3) VectorShuffle 109 109 0 1 2
106: 6(float) Load 105(f)
111: 87(fvec3) FAdd 110 108
108: 39(ptr) AccessChain 89(r) 107
112: 7(fvec4) Load 36(gl_FragColor)
Store 108 106
113: 7(fvec4) VectorShuffle 112 111 4 5 6 3
Branch 99
Store 36(gl_FragColor) 113
99: Label
Store 114(i) 16
109: 13(int) Load 95(i)
Branch 115
110: 13(int) IAdd 109 34
115: Label
Store 95(i) 110
119: 13(int) Load 114(i)
Branch 96
121: 25(bool) SLessThan 119 120
98: Label
LoopMerge 117 118 None
111: 7(fvec4) Load 89(r)
BranchConditional 121 116 117
112: 90(fvec3) VectorShuffle 111 111 0 1 2
116: Label
113: 7(fvec4) Load 37(gl_FragColor)
122: 6(float) Load 101(f)
114: 90(fvec3) VectorShuffle 113 113 0 1 2
123: 7(fvec4) Load 36(gl_FragColor)
115: 90(fvec3) FAdd 114 112
124: 7(fvec4) VectorTimesScalar 123 122
116: 7(fvec4) Load 37(gl_FragColor)
Store 36(gl_FragColor) 124
117: 7(fvec4) VectorShuffle 116 115 4 5 6 3
Branch 118
Store 37(gl_FragColor) 117
118: Label
Store 118(i) 16
125: 13(int) Load 114(i)
Branch 119
126: 13(int) IAdd 125 47
119: Label
Store 114(i) 126
LoopMerge 121 122 None
Branch 115
Branch 123
117: Label
123: Label
124: 13(int) Load 118(i)
126: 26(bool) SLessThan 124 125
BranchConditional 126 120 121
120: Label
127: 6(float) Load 105(f)
128: 7(fvec4) Load 37(gl_FragColor)
129: 7(fvec4) VectorTimesScalar 128 127
Store 37(gl_FragColor) 129
Branch 122
122: Label
130: 13(int) Load 118(i)
131: 13(int) IAdd 130 49
Store 118(i) 131
Branch 119
121: Label
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.localAggregates.frag.out
View file @
213bbbe4
...
@@ -8,12 +8,12 @@ Linked fragment stage:
...
@@ -8,12 +8,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 13
7
// Id's are bound by 13
8
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 40 9
7 107
EntryPoint Fragment 4 "main" 40 9
8 108
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
...
@@ -38,14 +38,14 @@ Linked fragment stage:
...
@@ -38,14 +38,14 @@ Linked fragment stage:
Name 68 "x"
Name 68 "x"
Name 70 "localArray"
Name 70 "localArray"
Name 75 "i"
Name 75 "i"
Name 8
3
"a"
Name 8
4
"a"
Name
89
"condition"
Name
90
"condition"
Name 9
7
"color"
Name 9
8
"color"
Name 10
7
"gl_FragColor"
Name 10
8
"gl_FragColor"
Name 12
7
"samp2D"
Name 12
8
"samp2D"
Name 13
3
"foo"
Name 13
4
"foo"
Name 13
4
"foo2"
Name 13
5
"foo2"
Name 13
6
"uFloatArray"
Name 13
7
"uFloatArray"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
...
@@ -80,26 +80,26 @@ Linked fragment stage:
...
@@ -80,26 +80,26 @@ Linked fragment stage:
48: TypePointer Function 47
48: TypePointer Function 47
52: TypePointer Function 6(int)
52: TypePointer Function 6(int)
69: 6(int) Constant 5
69: 6(int) Constant 5
8
1
: 6(int) Constant 16
8
2
: 6(int) Constant 16
8
5
: 7(float) Constant 0
8
6
: 7(float) Constant 0
89
(condition): 20(ptr) Variable UniformConstant
90
(condition): 20(ptr) Variable UniformConstant
9
5
: 6(int) Constant 3
9
6
: 6(int) Constant 3
9
6
: TypePointer Input 9(fvec4)
9
7
: TypePointer Input 9(fvec4)
9
7(color): 96
(ptr) Variable Input
9
8(color): 97
(ptr) Variable Input
99
: TypePointer Function 9(fvec4)
100
: TypePointer Function 9(fvec4)
10
1
: 32(int) Constant 1
10
2
: 32(int) Constant 1
10
4
: 32(int) Constant 2
10
5
: 32(int) Constant 2
10
6
: TypePointer Output 9(fvec4)
10
7
: TypePointer Output 9(fvec4)
10
7(gl_FragColor): 106
(ptr) Variable Output
10
8(gl_FragColor): 107
(ptr) Variable Output
12
4
: TypeImage 7(float) 2D sampled format:Unknown
12
5
: TypeImage 7(float) 2D sampled format:Unknown
12
5: TypeSampledImage 124
12
6: TypeSampledImage 125
12
6: TypePointer UniformConstant 125
12
7: TypePointer UniformConstant 126
12
7(samp2D): 126
(ptr) Variable UniformConstant
12
8(samp2D): 127
(ptr) Variable UniformConstant
13
2
: TypePointer UniformConstant 8(s1)
13
3
: TypePointer UniformConstant 8(s1)
13
3(foo): 132
(ptr) Variable UniformConstant
13
4(foo): 133
(ptr) Variable UniformConstant
13
4
(foo2): 17(ptr) Variable UniformConstant
13
5
(foo2): 17(ptr) Variable UniformConstant
13
5
: TypePointer UniformConstant 34
13
6
: TypePointer UniformConstant 34
13
6(uFloatArray): 135
(ptr) Variable UniformConstant
13
7(uFloatArray): 136
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
12(locals2): 11(ptr) Variable Function
12(locals2): 11(ptr) Variable Function
...
@@ -108,7 +108,7 @@ Linked fragment stage:
...
@@ -108,7 +108,7 @@ Linked fragment stage:
68(x): 52(ptr) Variable Function
68(x): 52(ptr) Variable Function
70(localArray): 35(ptr) Variable Function
70(localArray): 35(ptr) Variable Function
75(i): 52(ptr) Variable Function
75(i): 52(ptr) Variable Function
8
3
(a): 35(ptr) Variable Function
8
4
(a): 35(ptr) Variable Function
18: 17(ptr) AccessChain 15(foo3) 16
18: 17(ptr) AccessChain 15(foo3) 16
19: 10(s2) Load 18
19: 10(s2) Load 18
Store 12(locals2) 19
Store 12(locals2) 19
...
@@ -161,57 +161,59 @@ Linked fragment stage:
...
@@ -161,57 +161,59 @@ Linked fragment stage:
Store 75(i) 16
Store 75(i) 16
Branch 76
Branch 76
76: Label
76: Label
80: 6(int) Load 75(i)
82: 23(bool) SLessThan 80 81
LoopMerge 78 79 None
LoopMerge 78 79 None
BranchConditional 82 77 78
Branch 80
80: Label
81: 6(int) Load 75(i)
83: 23(bool) SLessThan 81 82
BranchConditional 83 77 78
77: Label
77: Label
8
4
: 6(int) Load 75(i)
8
5
: 6(int) Load 75(i)
8
6: 30(ptr) AccessChain 83(a) 84
8
7: 30(ptr) AccessChain 84(a) 85
Store 8
6 85
Store 8
7 86
Branch 79
Branch 79
79: Label
79: Label
8
7
: 6(int) Load 75(i)
8
8
: 6(int) Load 75(i)
8
8: 6(int) IAdd 87
28
8
9: 6(int) IAdd 88
28
Store 75(i) 8
8
Store 75(i) 8
9
Branch 76
Branch 76
78: Label
78: Label
90: 6(int) Load 89(condition)
91: 6(int) Load 90(condition)
91: 23(bool) IEqual 90 28
92: 23(bool) IEqual 91 28
SelectionMerge 93 None
SelectionMerge 94 None
BranchConditional 91 92 93
BranchConditional 92 93 94
92: Label
94: 34 Load 70(localArray)
Store 83(a) 94
Branch 93
93: Label
93: Label
98: 9(fvec4) Load 97(color)
95: 34 Load 70(localArray)
100: 99(ptr) AccessChain 12(locals2) 95
Store 84(a) 95
Store 100 98
Branch 94
102: 42(ptr) AccessChain 40(coord) 101
94: Label
103: 7(float) Load 102
99: 9(fvec4) Load 98(color)
105: 30(ptr) AccessChain 12(locals2) 95 104
101: 100(ptr) AccessChain 12(locals2) 96
Store 105 103
Store 101 99
108: 99(ptr) AccessChain 12(locals2) 95
103: 42(ptr) AccessChain 40(coord) 102
109: 9(fvec4) Load 108
104: 7(float) Load 103
110: 30(ptr) AccessChain 36(localFArray) 37
106: 30(ptr) AccessChain 12(locals2) 96 105
111: 7(float) Load 110
Store 106 104
112: 30(ptr) AccessChain 12(locals2) 27 28
109: 100(ptr) AccessChain 12(locals2) 96
113: 7(float) Load 112
110: 9(fvec4) Load 109
114: 7(float) FAdd 111 113
111: 30(ptr) AccessChain 36(localFArray) 37
115: 6(int) Load 68(x)
112: 7(float) Load 111
116: 30(ptr) AccessChain 70(localArray) 115
113: 30(ptr) AccessChain 12(locals2) 27 28
117: 7(float) Load 116
114: 7(float) Load 113
118: 7(float) FAdd 114 117
115: 7(float) FAdd 112 114
119: 6(int) Load 68(x)
116: 6(int) Load 68(x)
120: 30(ptr) AccessChain 83(a) 119
117: 30(ptr) AccessChain 70(localArray) 116
121: 7(float) Load 120
118: 7(float) Load 117
122: 7(float) FAdd 118 121
119: 7(float) FAdd 115 118
123: 9(fvec4) VectorTimesScalar 109 122
120: 6(int) Load 68(x)
128: 125 Load 127(samp2D)
121: 30(ptr) AccessChain 84(a) 120
129: 38(fvec2) Load 40(coord)
122: 7(float) Load 121
130: 9(fvec4) ImageSampleImplicitLod 128 129
123: 7(float) FAdd 119 122
131: 9(fvec4) FMul 123 130
124: 9(fvec4) VectorTimesScalar 110 123
Store 107(gl_FragColor) 131
129: 126 Load 128(samp2D)
130: 38(fvec2) Load 40(coord)
131: 9(fvec4) ImageSampleImplicitLod 129 130
132: 9(fvec4) FMul 124 131
Store 108(gl_FragColor) 132
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.loops.frag.out
View file @
213bbbe4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Test/baseResults/spv.loopsArtificial.frag.out
View file @
213bbbe4
...
@@ -7,12 +7,12 @@ Linked fragment stage:
...
@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 18
7
// Id's are bound by 18
8
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 11 14
0
EntryPoint Fragment 4 "main" 11 14
1
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
...
@@ -20,51 +20,51 @@ Linked fragment stage:
...
@@ -20,51 +20,51 @@ Linked fragment stage:
Name 11 "BaseColor"
Name 11 "BaseColor"
Name 18 "bigColor4"
Name 18 "bigColor4"
Name 28 "d4"
Name 28 "d4"
Name 8
0
"d13"
Name 8
1
"d13"
Name 14
0
"gl_FragColor"
Name 14
1
"gl_FragColor"
Name 14
2
"bigColor"
Name 14
3
"bigColor"
Name 14
3
"bigColor1_1"
Name 14
4
"bigColor1_1"
Name 14
4
"bigColor1_2"
Name 14
5
"bigColor1_2"
Name 14
5
"bigColor1_3"
Name 14
6
"bigColor1_3"
Name 14
6
"bigColor2"
Name 14
7
"bigColor2"
Name 14
7
"bigColor3"
Name 14
8
"bigColor3"
Name 14
8
"bigColor5"
Name 14
9
"bigColor5"
Name 1
49
"bigColor6"
Name 1
50
"bigColor6"
Name 15
0
"bigColor7"
Name 15
1
"bigColor7"
Name 15
1
"bigColor8"
Name 15
2
"bigColor8"
Name 15
2
"d"
Name 15
3
"d"
Name 15
3
"d2"
Name 15
4
"d2"
Name 15
4
"d3"
Name 15
5
"d3"
Name 15
5
"d5"
Name 15
6
"d5"
Name 15
6
"d6"
Name 15
7
"d6"
Name 15
7
"d7"
Name 15
8
"d7"
Name 15
8
"d8"
Name 15
9
"d8"
Name 1
59
"d9"
Name 1
60
"d9"
Name 16
0
"d10"
Name 16
1
"d10"
Name 16
1
"d11"
Name 16
2
"d11"
Name 16
2
"d12"
Name 16
3
"d12"
Name 16
3
"d14"
Name 16
4
"d14"
Name 16
4
"d15"
Name 16
5
"d15"
Name 16
5
"d16"
Name 16
6
"d16"
Name 16
6
"d17"
Name 16
7
"d17"
Name 16
7
"d18"
Name 16
8
"d18"
Name 16
8
"d19"
Name 16
9
"d19"
Name 1
69
"d20"
Name 1
70
"d20"
Name 17
0
"d21"
Name 17
1
"d21"
Name 17
1
"d22"
Name 17
2
"d22"
Name 17
2
"d23"
Name 17
3
"d23"
Name 17
3
"d24"
Name 17
4
"d24"
Name 17
4
"d25"
Name 17
5
"d25"
Name 17
5
"d26"
Name 17
6
"d26"
Name 17
6
"d27"
Name 17
7
"d27"
Name 17
7
"d28"
Name 17
8
"d28"
Name 17
8
"d29"
Name 17
9
"d29"
Name 1
79
"d30"
Name 1
80
"d30"
Name 18
0
"d31"
Name 18
1
"d31"
Name 18
1
"d32"
Name 18
2
"d32"
Name 18
2
"d33"
Name 18
3
"d33"
Name 18
3
"d34"
Name 18
4
"d34"
Name 18
6
"Count"
Name 18
7
"Count"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -84,55 +84,55 @@ Linked fragment stage:
...
@@ -84,55 +84,55 @@ Linked fragment stage:
35: 22(int) Constant 2
35: 22(int) Constant 2
48: 6(float) Constant 1065353216
48: 6(float) Constant 1065353216
51: 22(int) Constant 1
51: 22(int) Constant 1
7
7
: 22(int) Constant 3
7
8
: 22(int) Constant 3
8
0
(d13): 27(ptr) Variable UniformConstant
8
1
(d13): 27(ptr) Variable UniformConstant
1
39
: TypePointer Output 7(fvec4)
1
40
: TypePointer Output 7(fvec4)
14
0(gl_FragColor): 139
(ptr) Variable Output
14
1(gl_FragColor): 140
(ptr) Variable Output
14
2
(bigColor): 17(ptr) Variable UniformConstant
14
3
(bigColor): 17(ptr) Variable UniformConstant
14
3
(bigColor1_1): 17(ptr) Variable UniformConstant
14
4
(bigColor1_1): 17(ptr) Variable UniformConstant
14
4
(bigColor1_2): 17(ptr) Variable UniformConstant
14
5
(bigColor1_2): 17(ptr) Variable UniformConstant
14
5
(bigColor1_3): 17(ptr) Variable UniformConstant
14
6
(bigColor1_3): 17(ptr) Variable UniformConstant
14
6
(bigColor2): 17(ptr) Variable UniformConstant
14
7
(bigColor2): 17(ptr) Variable UniformConstant
14
7
(bigColor3): 17(ptr) Variable UniformConstant
14
8
(bigColor3): 17(ptr) Variable UniformConstant
14
8
(bigColor5): 17(ptr) Variable UniformConstant
14
9
(bigColor5): 17(ptr) Variable UniformConstant
1
49
(bigColor6): 17(ptr) Variable UniformConstant
1
50
(bigColor6): 17(ptr) Variable UniformConstant
15
0
(bigColor7): 17(ptr) Variable UniformConstant
15
1
(bigColor7): 17(ptr) Variable UniformConstant
15
1
(bigColor8): 17(ptr) Variable UniformConstant
15
2
(bigColor8): 17(ptr) Variable UniformConstant
15
2
(d): 27(ptr) Variable UniformConstant
15
3
(d): 27(ptr) Variable UniformConstant
15
3
(d2): 27(ptr) Variable UniformConstant
15
4
(d2): 27(ptr) Variable UniformConstant
15
4
(d3): 27(ptr) Variable UniformConstant
15
5
(d3): 27(ptr) Variable UniformConstant
15
5
(d5): 27(ptr) Variable UniformConstant
15
6
(d5): 27(ptr) Variable UniformConstant
15
6
(d6): 27(ptr) Variable UniformConstant
15
7
(d6): 27(ptr) Variable UniformConstant
15
7
(d7): 27(ptr) Variable UniformConstant
15
8
(d7): 27(ptr) Variable UniformConstant
15
8
(d8): 27(ptr) Variable UniformConstant
15
9
(d8): 27(ptr) Variable UniformConstant
1
59
(d9): 27(ptr) Variable UniformConstant
1
60
(d9): 27(ptr) Variable UniformConstant
16
0
(d10): 27(ptr) Variable UniformConstant
16
1
(d10): 27(ptr) Variable UniformConstant
16
1
(d11): 27(ptr) Variable UniformConstant
16
2
(d11): 27(ptr) Variable UniformConstant
16
2
(d12): 27(ptr) Variable UniformConstant
16
3
(d12): 27(ptr) Variable UniformConstant
16
3
(d14): 27(ptr) Variable UniformConstant
16
4
(d14): 27(ptr) Variable UniformConstant
16
4
(d15): 27(ptr) Variable UniformConstant
16
5
(d15): 27(ptr) Variable UniformConstant
16
5
(d16): 27(ptr) Variable UniformConstant
16
6
(d16): 27(ptr) Variable UniformConstant
16
6
(d17): 27(ptr) Variable UniformConstant
16
7
(d17): 27(ptr) Variable UniformConstant
16
7
(d18): 27(ptr) Variable UniformConstant
16
8
(d18): 27(ptr) Variable UniformConstant
16
8
(d19): 27(ptr) Variable UniformConstant
16
9
(d19): 27(ptr) Variable UniformConstant
1
69
(d20): 27(ptr) Variable UniformConstant
1
70
(d20): 27(ptr) Variable UniformConstant
17
0
(d21): 27(ptr) Variable UniformConstant
17
1
(d21): 27(ptr) Variable UniformConstant
17
1
(d22): 27(ptr) Variable UniformConstant
17
2
(d22): 27(ptr) Variable UniformConstant
17
2
(d23): 27(ptr) Variable UniformConstant
17
3
(d23): 27(ptr) Variable UniformConstant
17
3
(d24): 27(ptr) Variable UniformConstant
17
4
(d24): 27(ptr) Variable UniformConstant
17
4
(d25): 27(ptr) Variable UniformConstant
17
5
(d25): 27(ptr) Variable UniformConstant
17
5
(d26): 27(ptr) Variable UniformConstant
17
6
(d26): 27(ptr) Variable UniformConstant
17
6
(d27): 27(ptr) Variable UniformConstant
17
7
(d27): 27(ptr) Variable UniformConstant
17
7
(d28): 27(ptr) Variable UniformConstant
17
8
(d28): 27(ptr) Variable UniformConstant
17
8
(d29): 27(ptr) Variable UniformConstant
17
9
(d29): 27(ptr) Variable UniformConstant
1
79
(d30): 27(ptr) Variable UniformConstant
1
80
(d30): 27(ptr) Variable UniformConstant
18
0
(d31): 27(ptr) Variable UniformConstant
18
1
(d31): 27(ptr) Variable UniformConstant
18
1
(d32): 27(ptr) Variable UniformConstant
18
2
(d32): 27(ptr) Variable UniformConstant
18
2
(d33): 27(ptr) Variable UniformConstant
18
3
(d33): 27(ptr) Variable UniformConstant
18
3
(d34): 27(ptr) Variable UniformConstant
18
4
(d34): 27(ptr) Variable UniformConstant
18
4
: TypeInt 32 1
18
5
: TypeInt 32 1
18
5: TypePointer UniformConstant 184
(int)
18
6: TypePointer UniformConstant 185
(int)
18
6(Count): 185
(ptr) Variable UniformConstant
18
7(Count): 186
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9(color): 8(ptr) Variable Function
9(color): 8(ptr) Variable Function
...
@@ -207,95 +207,97 @@ Linked fragment stage:
...
@@ -207,95 +207,97 @@ Linked fragment stage:
15: Label
15: Label
Branch 73
Branch 73
73: Label
73: Label
78: 24(ptr) AccessChain 9(color) 77
79: 6(float) Load 78
81: 6(float) Load 80(d13)
82: 30(bool) FOrdLessThan 79 81
LoopMerge 75 76 None
LoopMerge 75 76 None
BranchConditional 82 74 75
Branch 77
77: Label
79: 24(ptr) AccessChain 9(color) 78
80: 6(float) Load 79
82: 6(float) Load 81(d13)
83: 30(bool) FOrdLessThan 80 82
BranchConditional 83 74 75
74: Label
74: Label
83: 24(ptr) AccessChain 9(color) 35
84: 24(ptr) AccessChain 9(color) 35
84: 6(float) Load 83
85: 6(float) Load 84
85: 6(float) Load 80(d13)
86: 6(float) Load 81(d13)
86: 30(bool) FOrdLessThan 84 85
87: 30(bool) FOrdLessThan 85 86
SelectionMerge 88 None
SelectionMerge 89 None
BranchConditional 86 87 92
BranchConditional 87 88 93
87: Label
89: 7(fvec4) Load 9(color)
90: 7(fvec4) CompositeConstruct 48 48 48 48
91: 7(fvec4) FAdd 89 90
Store 9(color) 91
Branch 88
92: Label
93: 7(fvec4) Load 9(color)
94: 7(fvec4) CompositeConstruct 48 48 48 48
95: 7(fvec4) FSub 93 94
Store 9(color) 95
Branch 88
88: Label
88: Label
96: 7(fvec4) Load 18(bigColor4)
90: 7(fvec4) Load 9(color)
97: 7(fvec4) Load 9(color)
91: 7(fvec4) CompositeConstruct 48 48 48 48
98: 7(fvec4) FAdd 97 96
92: 7(fvec4) FAdd 90 91
Store 9(color) 98
Store 9(color) 92
99: 24(ptr) AccessChain 9(color) 23
Branch 89
100: 6(float) Load 99
93: Label
101: 6(float) Load 28(d4)
94: 7(fvec4) Load 9(color)
102: 30(bool) FOrdLessThan 100 101
95: 7(fvec4) CompositeConstruct 48 48 48 48
SelectionMerge 104 None
96: 7(fvec4) FSub 94 95
BranchConditional 102 103 104
Store 9(color) 96
103: Label
Branch 89
105: 24(ptr) AccessChain 9(color) 35
89: Label
106: 6(float) Load 105
97: 7(fvec4) Load 18(bigColor4)
107: 6(float) FAdd 106 34
98: 7(fvec4) Load 9(color)
108: 24(ptr) AccessChain 9(color) 35
99: 7(fvec4) FAdd 98 97
Store 108 107
Store 9(color) 99
100: 24(ptr) AccessChain 9(color) 23
101: 6(float) Load 100
102: 6(float) Load 28(d4)
103: 30(bool) FOrdLessThan 101 102
SelectionMerge 105 None
BranchConditional 103 104 105
104: Label
106: 24(ptr) AccessChain 9(color) 35
107: 6(float) Load 106
108: 6(float) FAdd 107 34
109: 24(ptr) AccessChain 9(color) 35
109: 24(ptr) AccessChain 9(color) 35
110: 6(float) Load 109
Store 109 108
111: 6(float) Load 28(d4)
110: 24(ptr) AccessChain 9(color) 35
112: 30(bool) FOrdLessThan 110 111
111: 6(float) Load 110
SelectionMerge 114 None
112: 6(float) Load 28(d4)
BranchConditional 112 113 114
113: 30(bool) FOrdLessThan 111 112
113: Label
SelectionMerge 115 None
115: 24(ptr) AccessChain 9(color) 23
BranchConditional 113 114 115
116: 6(float) Load 115
117: 6(float) FAdd 116 48
Store 115 117
Branch 76
114: Label
114: Label
Branch 104
116: 24(ptr) AccessChain 9(color) 23
104: Label
117: 6(float) Load 116
119: 24(ptr) AccessChain 9(color) 51
118: 6(float) FAdd 117 48
120: 6(float) Load 119
Store 116 118
121: 6(float) Load 28(d4)
Branch 76
122: 30(bool) FOrdLessThan 120 121
115: Label
SelectionMerge 124 None
Branch 105
BranchConditional 122 123 130
105: Label
123: Label
120: 24(ptr) AccessChain 9(color) 51
125: 6(float) Load 28(d4)
121: 6(float) Load 120
126: 24(ptr) AccessChain 9(color) 51
122: 6(float) Load 28(d4)
127: 6(float) Load 126
123: 30(bool) FOrdLessThan 121 122
128: 6(float) FAdd 127 125
SelectionMerge 125 None
129: 24(ptr) AccessChain 9(color) 51
BranchConditional 123 124 131
Store 129 128
Branch 124
130: Label
131: 6(float) Load 28(d4)
132: 24(ptr) AccessChain 9(color) 23
133: 6(float) Load 132
134: 6(float) FAdd 133 131
135: 24(ptr) AccessChain 9(color) 23
Store 135 134
Branch 124
124: Label
124: Label
126: 6(float) Load 28(d4)
127: 24(ptr) AccessChain 9(color) 51
128: 6(float) Load 127
129: 6(float) FAdd 128 126
130: 24(ptr) AccessChain 9(color) 51
Store 130 129
Branch 125
131: Label
132: 6(float) Load 28(d4)
133: 24(ptr) AccessChain 9(color) 23
134: 6(float) Load 133
135: 6(float) FAdd 134 132
136: 24(ptr) AccessChain 9(color) 23
Store 136 135
Branch 125
125: Label
Branch 76
Branch 76
76: Label
76: Label
Branch 73
Branch 73
75: Label
75: Label
13
6
: 7(fvec4) Load 9(color)
13
7
: 7(fvec4) Load 9(color)
13
7
: 7(fvec4) CompositeConstruct 48 48 48 48
13
8
: 7(fvec4) CompositeConstruct 48 48 48 48
13
8: 7(fvec4) FAdd 136 137
13
9: 7(fvec4) FAdd 137 138
Store 9(color) 13
8
Store 9(color) 13
9
14
1
: 7(fvec4) Load 9(color)
14
2
: 7(fvec4) Load 9(color)
Store 14
0(gl_FragColor) 141
Store 14
1(gl_FragColor) 142
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.switch.frag.out
View file @
213bbbe4
...
@@ -10,12 +10,12 @@ Linked fragment stage:
...
@@ -10,12 +10,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 26
7
// Id's are bound by 26
9
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 75 22
5
EntryPoint Fragment 4 "main" 75 22
7
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source ESSL 310
Source ESSL 310
Name 4 "main"
Name 4 "main"
...
@@ -33,24 +33,24 @@ Linked fragment stage:
...
@@ -33,24 +33,24 @@ Linked fragment stage:
Name 75 "x"
Name 75 "x"
Name 129 "d"
Name 129 "d"
Name 155 "i"
Name 155 "i"
Name 174 "j"
Name 175 "j"
Name 225 "color"
Name 227 "color"
Name 231 "v"
Name 233 "v"
Name 232 "param"
Name 234 "param"
Name 234 "param"
Name 236 "param"
Name 236 "param"
Name 2
44
"param"
Name 2
38
"param"
Name 246 "param"
Name 246 "param"
Name 248 "param"
Name 248 "param"
Name 250 "param"
Decorate 60(local) RelaxedPrecision
Decorate 60(local) RelaxedPrecision
Decorate 62(c) RelaxedPrecision
Decorate 62(c) RelaxedPrecision
Decorate 73(f) RelaxedPrecision
Decorate 73(f) RelaxedPrecision
Decorate 75(x) RelaxedPrecision
Decorate 75(x) RelaxedPrecision
Decorate 129(d) RelaxedPrecision
Decorate 129(d) RelaxedPrecision
Decorate 155(i) RelaxedPrecision
Decorate 155(i) RelaxedPrecision
Decorate 17
4
(j) RelaxedPrecision
Decorate 17
5
(j) RelaxedPrecision
Decorate 22
5
(color) RelaxedPrecision
Decorate 22
7
(color) RelaxedPrecision
Decorate 23
1
(v) RelaxedPrecision
Decorate 23
3
(v) RelaxedPrecision
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -71,31 +71,31 @@ Linked fragment stage:
...
@@ -71,31 +71,31 @@ Linked fragment stage:
75(x): 74(ptr) Variable Input
75(x): 74(ptr) Variable Input
129(d): 61(ptr) Variable UniformConstant
129(d): 61(ptr) Variable UniformConstant
156: 9(int) Constant 0
156: 9(int) Constant 0
16
2
: 9(int) Constant 10
16
3
: 9(int) Constant 10
16
3
: TypeBool
16
4
: TypeBool
17
5
: 9(int) Constant 20
17
6
: 9(int) Constant 20
18
1
: 9(int) Constant 30
18
3
: 9(int) Constant 30
18
6
: 6(float) Constant 1120429670
18
8
: 6(float) Constant 1120429670
20
6
: 6(float) Constant 1079739679
20
8
: 6(float) Constant 1079739679
22
4
: TypePointer Output 6(float)
22
6
: TypePointer Output 6(float)
22
5(color): 224
(ptr) Variable Output
22
7(color): 226
(ptr) Variable Output
23
0
: TypePointer UniformConstant 7(fvec4)
23
2
: TypePointer UniformConstant 7(fvec4)
23
1(v): 230
(ptr) Variable UniformConstant
23
3(v): 232
(ptr) Variable UniformConstant
2
39
: TypeInt 32 0
2
41
: TypeInt 32 0
24
0: 239
(int) Constant 1
24
2: 241
(int) Constant 1
25
1: 239
(int) Constant 2
25
3: 241
(int) Constant 2
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
60(local): 10(ptr) Variable Function
60(local): 10(ptr) Variable Function
73(f): 72(ptr) Variable Function
73(f): 72(ptr) Variable Function
155(i): 10(ptr) Variable Function
155(i): 10(ptr) Variable Function
174(j): 10(ptr) Variable Function
175(j): 10(ptr) Variable Function
232(param): 8(ptr) Variable Function
234(param): 8(ptr) Variable Function
234(param): 8(ptr) Variable Function
236(param):
10
(ptr) Variable Function
236(param):
8
(ptr) Variable Function
2
44(param): 8
(ptr) Variable Function
2
38(param): 10
(ptr) Variable Function
246(param): 8(ptr) Variable Function
246(param): 8(ptr) Variable Function
248(param): 10(ptr) Variable Function
248(param): 8(ptr) Variable Function
250(param): 10(ptr) Variable Function
63: 9(int) Load 62(c)
63: 9(int) Load 62(c)
Store 60(local) 63
Store 60(local) 63
64: 9(int) Load 60(local)
64: 9(int) Load 60(local)
...
@@ -218,134 +218,138 @@ Linked fragment stage:
...
@@ -218,134 +218,138 @@ Linked fragment stage:
Store 155(i) 156
Store 155(i) 156
Branch 157
Branch 157
157: Label
157: Label
161: 9(int) Load 155(i)
164: 163(bool) SLessThan 161 162
LoopMerge 159 160 None
LoopMerge 159 160 None
BranchConditional 164 158 159
Branch 161
161: Label
162: 9(int) Load 155(i)
165: 164(bool) SLessThan 162 163
BranchConditional 165 158 159
158: Label
158: Label
165: 9(int) Load 62(c)
166: 9(int) Load 62(c)
SelectionMerge 169 None
SelectionMerge 170 None
Switch 165 168
Switch 166 169
case 1: 166
case 1: 167
case 2: 167
case 2: 168
168: Label
169: Label
200: 6(float) Load 75(x)
202: 6(float) Load 75(x)
201: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 200
203: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 202
202: 6(float) Load 73(f)
204: 6(float) Load 73(f)
203: 6(float) FAdd 202 201
205: 6(float) FAdd 204 203
Store 73(f) 203
Store 73(f) 205
Branch 169
Branch 170
166: Label
167: Label
170: 6(float) Load 75(x)
171: 6(float) Load 75(x)
171: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 170
172: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 171
172: 6(float) Load 73(f)
173: 6(float) Load 73(f)
173: 6(float) FAdd 172 171
174: 6(float) FAdd 173 172
Store 73(f) 173
Store 73(f) 174
Store 174(j) 175
Store 175(j) 176
Branch 176
Branch 177
176: Label
180: 9(int) Load 174(j)
182: 163(bool) SLessThan 180 181
LoopMerge 178 179 None
BranchConditional 182 177 178
177: Label
177: Label
183: 6(float) Load 73(f)
LoopMerge 179 180 None
184: 6(float) FAdd 183 48
Branch 181
Store 73(f) 184
181: Label
182: 9(int) Load 175(j)
184: 164(bool) SLessThan 182 183
BranchConditional 184 178 179
178: Label
185: 6(float) Load 73(f)
185: 6(float) Load 73(f)
187: 163(bool) FOrdLessThan 185 186
186: 6(float) FAdd 185 48
SelectionMerge 189 None
Store 73(f) 186
BranchConditional 187 188 189
187: 6(float) Load 73(f)
188: Label
189: 164(bool) FOrdLessThan 187 188
Branch 178
SelectionMerge 191 None
189: Label
BranchConditional 189 190 191
190: Label
Branch 179
Branch 179
191: Label
Branch 180
180: Label
193: 9(int) Load 175(j)
194: 9(int) IAdd 193 65
Store 175(j) 194
Branch 177
179: Label
179: Label
191: 9(int) Load 174(j)
Branch 170
192: 9(int) IAdd 191 65
168: Label
Store 174(j) 192
196: 6(float) Load 75(x)
Branch 176
197: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 196
178: Label
198: 6(float) Load 73(f)
Branch 169
199: 6(float) FAdd 198 197
167: Label
Store 73(f) 199
194: 6(float) Load 75(x)
Branch 170
195: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 194
170: Label
196: 6(float) Load 73(f)
207: 6(float) Load 73(f)
197: 6(float) FAdd 196 195
209: 164(bool) FOrdLessThan 207 208
Store 73(f) 197
SelectionMerge 211 None
Branch 169
BranchConditional 209 210 211
169: Label
210: Label
205: 6(float) Load 73(f)
207: 163(bool) FOrdLessThan 205 206
SelectionMerge 209 None
BranchConditional 207 208 209
208: Label
Branch 159
Branch 159
2
09
: Label
2
11
: Label
Branch 160
Branch 160
160: Label
160: Label
21
1
: 9(int) Load 155(i)
21
3
: 9(int) Load 155(i)
21
2: 9(int) IAdd 211
65
21
4: 9(int) IAdd 213
65
Store 155(i) 21
2
Store 155(i) 21
4
Branch 157
Branch 157
159: Label
159: Label
213: 9(int) Load 62(c)
215: 9(int) Load 62(c)
SelectionMerge 216 None
SelectionMerge 218 None
Switch 213 216
Switch 215 218
case 1: 214
case 1: 216
case 2: 215
case 2: 217
214: Label
217: 6(float) Load 75(x)
218: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 217
219: 6(float) Load 73(f)
220: 6(float) FAdd 219 218
Store 73(f) 220
Branch 216
215: Label
Branch 216
216: Label
216: Label
226: 6(float) Load 73(f)
219: 6(float) Load 75(x)
227: 9(int) Load 60(local)
220: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 219
228: 6(float) ConvertSToF 227
221: 6(float) Load 73(f)
229: 6(float) FAdd 226 228
222: 6(float) FAdd 221 220
Store 225(color) 229
Store 73(f) 222
233: 7(fvec4) Load 231(v)
Branch 218
Store 232(param) 233
217: Label
235: 7(fvec4) Load 231(v)
Branch 218
218: Label
228: 6(float) Load 73(f)
229: 9(int) Load 60(local)
230: 6(float) ConvertSToF 229
231: 6(float) FAdd 228 230
Store 227(color) 231
235: 7(fvec4) Load 233(v)
Store 234(param) 235
Store 234(param) 235
237:
9(int) Load 62(c
)
237:
7(fvec4) Load 233(v
)
Store 236(param) 237
Store 236(param) 237
23
8: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 232(param) 234(param) 236(param
)
23
9: 9(int) Load 62(c
)
241: 6(float) CompositeExtract 238 1
Store 238(param) 239
24
2: 6(float) Load 225(color
)
24
0: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 234(param) 236(param) 238(param
)
243: 6(float)
FAdd 242 24
1
243: 6(float)
CompositeExtract 240
1
Store 225(color) 243
244: 6(float) Load 227(color)
245:
7(fvec4) Load 231(v)
245:
6(float) FAdd 244 243
Store 2
44(param
) 245
Store 2
27(color
) 245
247: 7(fvec4) Load 23
1
(v)
247: 7(fvec4) Load 23
3
(v)
Store 246(param) 247
Store 246(param) 247
249:
9(int) Load 62(c
)
249:
7(fvec4) Load 233(v
)
Store 248(param) 249
Store 248(param) 249
25
0: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 244(param) 246(param) 248(param
)
25
1: 9(int) Load 62(c
)
252: 6(float) CompositeExtract 250 2
Store 250(param) 251
25
3: 6(float) Load 225(color
)
25
2: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 246(param) 248(param) 250(param
)
254: 6(float)
FAdd 253 25
2
254: 6(float)
CompositeExtract 252
2
Store 225(color) 254
255: 6(float) Load 227(color)
25
5: 9(int) Load 62(c)
25
6: 6(float) FAdd 255 254
S
electionMerge 258 None
S
tore 227(color) 256
Switch 255 257
257: 9(int) Load 62(c)
case 0: 256
SelectionMerge 260 None
257: Label
Switch 257 259
Branch
258
case 0:
258
25
6
: Label
25
9
: Label
Branch 2
58
Branch 2
60
258: Label
258: Label
262: 9(int) Load 62(c)
Branch 260
SelectionMerge 264 None
260: Label
Switch 262 263
264: 9(int) Load 62(c)
263: Label
SelectionMerge 266 None
Branch 264
Switch 264 265
264: Label
265: Label
Branch 266
266: Label
Return
Return
FunctionEnd
FunctionEnd
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
...
...
Test/baseResults/spv.while-continue-break.vert.out
View file @
213bbbe4
...
@@ -5,78 +5,80 @@ Linked vertex stage:
...
@@ -5,78 +5,80 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 4
3
// Id's are bound by 4
4
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 4
1 42
EntryPoint Vertex 4 "main" 4
2 43
Source ESSL 300
Source ESSL 300
Name 4 "main"
Name 4 "main"
Name 8 "i"
Name 8 "i"
Name 1
8
"A"
Name 1
9
"A"
Name 2
6
"B"
Name 2
7
"B"
Name 2
8
"C"
Name 2
9
"C"
Name 3
8
"D"
Name 3
9
"D"
Name 4
1
"gl_VertexID"
Name 4
2
"gl_VertexID"
Name 4
2
"gl_InstanceID"
Name 4
3
"gl_InstanceID"
Decorate 4
1
(gl_VertexID) BuiltIn VertexId
Decorate 4
2
(gl_VertexID) BuiltIn VertexId
Decorate 4
2
(gl_InstanceID) BuiltIn InstanceId
Decorate 4
3
(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
9: 6(int) Constant 0
9: 6(int) Constant 0
1
5
: 6(int) Constant 10
1
6
: 6(int) Constant 10
1
6
: TypeBool
1
7
: TypeBool
19
: 6(int) Constant 1
20
: 6(int) Constant 1
2
1
: 6(int) Constant 2
2
2
: 6(int) Constant 2
3
0
: 6(int) Constant 5
3
1
: 6(int) Constant 5
39
: 6(int) Constant 3
40
: 6(int) Constant 3
4
0
: TypePointer Input 6(int)
4
1
: TypePointer Input 6(int)
4
1(gl_VertexID): 40
(ptr) Variable Input
4
2(gl_VertexID): 41
(ptr) Variable Input
4
2(gl_InstanceID): 40
(ptr) Variable Input
4
3(gl_InstanceID): 41
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(i): 7(ptr) Variable Function
8(i): 7(ptr) Variable Function
1
8
(A): 7(ptr) Variable Function
1
9
(A): 7(ptr) Variable Function
2
6
(B): 7(ptr) Variable Function
2
7
(B): 7(ptr) Variable Function
2
8
(C): 7(ptr) Variable Function
2
9
(C): 7(ptr) Variable Function
3
8
(D): 7(ptr) Variable Function
3
9
(D): 7(ptr) Variable Function
Store 8(i) 9
Store 8(i) 9
Branch 10
Branch 10
10: Label
10: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 13 None
LoopMerge 12 13 None
BranchConditional 17 11 12
Branch 14
14: Label
15: 6(int) Load 8(i)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
11: Label
Store 18(A) 19
Store 19(A) 20
20: 6(int) Load 8(i)
21: 6(int) Load 8(i)
22: 6(int) SMod 20 21
23: 6(int) SMod 21 22
23: 16(bool) IEqual 22 9
24: 17(bool) IEqual 23 9
SelectionMerge 25 None
SelectionMerge 26 None
BranchConditional 23 24 25
BranchConditional 24 25 26
24: Label
Store 26(B) 21
Branch 13
25: Label
25: Label
29: 6(int) Load 8(i)
Store 27(B) 22
31: 6(int) SMod 29 30
Branch 13
32: 16(bool) IEqual 31 9
26: Label
SelectionMerge 34 None
30: 6(int) Load 8(i)
BranchConditional 32 33 34
32: 6(int) SMod 30 31
33:
Label
33:
17(bool) IEqual 32 9
Store 26(B) 21
SelectionMerge 35 None
Branch 12
BranchConditional 33 34 35
34: Label
34: Label
36: 6(int) Load 8(i)
Store 27(B) 22
37: 6(int) IAdd 36 19
Branch 12
Store 8(i) 37
35: Label
37: 6(int) Load 8(i)
38: 6(int) IAdd 37 20
Store 8(i) 38
Branch 13
Branch 13
13: Label
13: Label
Branch 10
Branch 10
12: Label
12: Label
Store 3
8(D) 39
Store 3
9(D) 40
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.while-simple.vert.out
View file @
213bbbe4
...
@@ -5,44 +5,46 @@ Linked vertex stage:
...
@@ -5,44 +5,46 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 2
4
// Id's are bound by 2
5
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 2
2 23
EntryPoint Vertex 4 "main" 2
3 24
Source ESSL 300
Source ESSL 300
Name 4 "main"
Name 4 "main"
Name 8 "i"
Name 8 "i"
Name 2
2
"gl_VertexID"
Name 2
3
"gl_VertexID"
Name 2
3
"gl_InstanceID"
Name 2
4
"gl_InstanceID"
Decorate 2
2
(gl_VertexID) BuiltIn VertexId
Decorate 2
3
(gl_VertexID) BuiltIn VertexId
Decorate 2
3
(gl_InstanceID) BuiltIn InstanceId
Decorate 2
4
(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Function 6(int)
7: TypePointer Function 6(int)
9: 6(int) Constant 0
9: 6(int) Constant 0
1
5
: 6(int) Constant 10
1
6
: 6(int) Constant 10
1
6
: TypeBool
1
7
: TypeBool
19
: 6(int) Constant 1
20
: 6(int) Constant 1
2
1
: TypePointer Input 6(int)
2
2
: TypePointer Input 6(int)
2
2(gl_VertexID): 21
(ptr) Variable Input
2
3(gl_VertexID): 22
(ptr) Variable Input
2
3(gl_InstanceID): 21
(ptr) Variable Input
2
4(gl_InstanceID): 22
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(i): 7(ptr) Variable Function
8(i): 7(ptr) Variable Function
Store 8(i) 9
Store 8(i) 9
Branch 10
Branch 10
10: Label
10: Label
14: 6(int) Load 8(i)
17: 16(bool) SLessThan 14 15
LoopMerge 12 13 None
LoopMerge 12 13 None
BranchConditional 17 11 12
Branch 14
14: Label
15: 6(int) Load 8(i)
18: 17(bool) SLessThan 15 16
BranchConditional 18 11 12
11: Label
11: Label
1
8
: 6(int) Load 8(i)
1
9
: 6(int) Load 8(i)
2
0: 6(int) IAdd 18 19
2
1: 6(int) IAdd 19 20
Store 8(i) 2
0
Store 8(i) 2
1
Branch 13
Branch 13
13: Label
13: Label
Branch 10
Branch 10
...
...
Test/baseResults/spv.whileLoop.frag.out
View file @
213bbbe4
...
@@ -5,20 +5,20 @@ Linked fragment stage:
...
@@ -5,20 +5,20 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 3
5
// Id's are bound by 3
6
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 11 3
3
EntryPoint Fragment 4 "main" 11 3
4
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 110
Source GLSL 110
Name 4 "main"
Name 4 "main"
Name 9 "color"
Name 9 "color"
Name 11 "BaseColor"
Name 11 "BaseColor"
Name 2
3
"d"
Name 2
4
"d"
Name 2
8
"bigColor"
Name 2
9
"bigColor"
Name 3
3
"gl_FragColor"
Name 3
4
"gl_FragColor"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -26,16 +26,16 @@ Linked fragment stage:
...
@@ -26,16 +26,16 @@ Linked fragment stage:
8: TypePointer Function 7(fvec4)
8: TypePointer Function 7(fvec4)
10: TypePointer Input 7(fvec4)
10: TypePointer Input 7(fvec4)
11(BaseColor): 10(ptr) Variable Input
11(BaseColor): 10(ptr) Variable Input
1
7
: TypeInt 32 0
1
8
: TypeInt 32 0
1
8: 17
(int) Constant 0
1
9: 18
(int) Constant 0
19
: TypePointer Function 6(float)
20
: TypePointer Function 6(float)
2
2
: TypePointer UniformConstant 6(float)
2
3
: TypePointer UniformConstant 6(float)
2
3(d): 22
(ptr) Variable UniformConstant
2
4(d): 23
(ptr) Variable UniformConstant
2
5
: TypeBool
2
6
: TypeBool
2
7
: TypePointer UniformConstant 7(fvec4)
2
8
: TypePointer UniformConstant 7(fvec4)
2
8(bigColor): 27
(ptr) Variable UniformConstant
2
9(bigColor): 28
(ptr) Variable UniformConstant
3
2
: TypePointer Output 7(fvec4)
3
3
: TypePointer Output 7(fvec4)
3
3(gl_FragColor): 32
(ptr) Variable Output
3
4(gl_FragColor): 33
(ptr) Variable Output
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9(color): 8(ptr) Variable Function
9(color): 8(ptr) Variable Function
...
@@ -43,22 +43,24 @@ Linked fragment stage:
...
@@ -43,22 +43,24 @@ Linked fragment stage:
Store 9(color) 12
Store 9(color) 12
Branch 13
Branch 13
13: Label
13: Label
20: 19(ptr) AccessChain 9(color) 18
21: 6(float) Load 20
24: 6(float) Load 23(d)
26: 25(bool) FOrdLessThan 21 24
LoopMerge 15 16 None
LoopMerge 15 16 None
BranchConditional 26 14 15
Branch 17
17: Label
21: 20(ptr) AccessChain 9(color) 19
22: 6(float) Load 21
25: 6(float) Load 24(d)
27: 26(bool) FOrdLessThan 22 25
BranchConditional 27 14 15
14: Label
14: Label
29: 7(fvec4) Load 28
(bigColor)
30: 7(fvec4) Load 29
(bigColor)
3
0
: 7(fvec4) Load 9(color)
3
1
: 7(fvec4) Load 9(color)
3
1: 7(fvec4) FAdd 30 29
3
2: 7(fvec4) FAdd 31 30
Store 9(color) 3
1
Store 9(color) 3
2
Branch 16
Branch 16
16: Label
16: Label
Branch 13
Branch 13
15: Label
15: Label
3
4
: 7(fvec4) Load 9(color)
3
5
: 7(fvec4) Load 9(color)
Store 3
3(gl_FragColor) 34
Store 3
4(gl_FragColor) 35
Return
Return
FunctionEnd
FunctionEnd
Test/spv.for-notest.vert
View file @
213bbbe4
...
@@ -2,8 +2,5 @@
...
@@ -2,8 +2,5 @@
layout
(
location
=
0
)
out
highp
int
r
;
layout
(
location
=
0
)
out
highp
int
r
;
void
main
()
{
void
main
()
{
int
i
;
int
i
;
// This infinite loop results in bad SPIR-V generated, since the merge block
// is dropped as unreachable. It is still useful for testing the rest of the
// code generation.
for
(
i
=
0
;
;
i
++
)
{
r
=
i
;
}
for
(
i
=
0
;
;
i
++
)
{
r
=
i
;
}
}
}
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