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