aboutsummaryrefslogtreecommitdiff
path: root/Test
diff options
context:
space:
mode:
authorDejan Mircevski <deki@google.com>2016-01-19 21:13:38 -0500
committerDejan Mircevski <deki@google.com>2016-01-19 21:18:14 -0500
commited55bcd9f869d7017be1cb403abd4de5c6361b30 (patch)
tree389fe9076dd2139907b35d224fd0033244ab6fbe /Test
parent33782795d9c3db2703d2cdbf1637ef320e4028d3 (diff)
downloadglslang-ed55bcd9f869d7017be1cb403abd4de5c6361b30.tar.gz
Don't remove SPIR-V blocks before codegen.
A removed block releases its instructions, so Module::idToInstruction suddenly contains dangling references. The original motivation for block removal was to skip some unreachable blocks, but that's already achieved by InReadableOrder.cpp. Also updated stale comments.
Diffstat (limited to 'Test')
-rwxr-xr-xTest/baseResults/spv.100ops.frag.out2
-rwxr-xr-xTest/baseResults/spv.140.frag.out100
-rw-r--r--Test/baseResults/spv.AofA.frag.out184
-rwxr-xr-xTest/baseResults/spv.atomic.comp.out180
-rw-r--r--Test/baseResults/spv.bool.vert.out128
-rw-r--r--Test/baseResults/spv.for-notest.vert.out2
-rwxr-xr-xTest/baseResults/spv.forwardFun.frag.out10
-rwxr-xr-xTest/baseResults/spv.functionCall.frag.out130
-rwxr-xr-xTest/baseResults/spv.functionSemantics.frag.out258
-rwxr-xr-xTest/baseResults/spv.matFun.vert.out162
-rwxr-xr-xTest/baseResults/spv.precision.frag.out250
-rw-r--r--Test/baseResults/spv.shortCircuit.frag.out386
-rwxr-xr-xTest/baseResults/spv.simpleFunctionCall.frag.out26
-rwxr-xr-xTest/baseResults/spv.switch.frag.out620
14 files changed, 1220 insertions, 1218 deletions
diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out
index fa21783e..11391f6a 100755
--- a/Test/baseResults/spv.100ops.frag.out
+++ b/Test/baseResults/spv.100ops.frag.out
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 47
+// Id's are bound by 48
Capability Shader
1: ExtInstImport "GLSL.std.450"
diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out
index e54dda6c..01b2e472 100755
--- a/Test/baseResults/spv.140.frag.out
+++ b/Test/baseResults/spv.140.frag.out
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 100
+// Id's are bound by 101
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -23,40 +23,40 @@ Linked fragment stage:
Name 43 "k"
Name 55 "sampR"
Name 63 "sampB"
- Name 86 "samp2Da"
- Name 91 "bn"
- MemberName 91(bn) 0 "matra"
- MemberName 91(bn) 1 "matca"
- MemberName 91(bn) 2 "matr"
- MemberName 91(bn) 3 "matc"
- MemberName 91(bn) 4 "matrdef"
- Name 93 ""
- Name 96 "bi"
- MemberName 96(bi) 0 "v"
- Name 99 "bname"
+ Name 87 "samp2Da"
+ Name 92 "bn"
+ MemberName 92(bn) 0 "matra"
+ MemberName 92(bn) 1 "matca"
+ MemberName 92(bn) 2 "matr"
+ MemberName 92(bn) 3 "matc"
+ MemberName 92(bn) 4 "matrdef"
+ Name 94 ""
+ Name 97 "bi"
+ MemberName 97(bi) 0 "v"
+ Name 100 "bname"
Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
- Decorate 89 ArrayStride 64
Decorate 90 ArrayStride 64
- MemberDecorate 91(bn) 0 RowMajor
- MemberDecorate 91(bn) 0 Offset 0
- MemberDecorate 91(bn) 0 MatrixStride 16
- MemberDecorate 91(bn) 1 ColMajor
- MemberDecorate 91(bn) 1 Offset 256
- MemberDecorate 91(bn) 1 MatrixStride 16
- MemberDecorate 91(bn) 2 RowMajor
- MemberDecorate 91(bn) 2 Offset 512
- MemberDecorate 91(bn) 2 MatrixStride 16
- MemberDecorate 91(bn) 3 ColMajor
- MemberDecorate 91(bn) 3 Offset 576
- MemberDecorate 91(bn) 3 MatrixStride 16
- MemberDecorate 91(bn) 4 RowMajor
- MemberDecorate 91(bn) 4 Offset 640
- MemberDecorate 91(bn) 4 MatrixStride 16
- Decorate 91(bn) Block
- Decorate 95 ArrayStride 16
- MemberDecorate 96(bi) 0 Offset 0
- Decorate 96(bi) Block
+ Decorate 91 ArrayStride 64
+ MemberDecorate 92(bn) 0 RowMajor
+ MemberDecorate 92(bn) 0 Offset 0
+ MemberDecorate 92(bn) 0 MatrixStride 16
+ MemberDecorate 92(bn) 1 ColMajor
+ MemberDecorate 92(bn) 1 Offset 256
+ MemberDecorate 92(bn) 1 MatrixStride 16
+ MemberDecorate 92(bn) 2 RowMajor
+ MemberDecorate 92(bn) 2 Offset 512
+ MemberDecorate 92(bn) 2 MatrixStride 16
+ MemberDecorate 92(bn) 3 ColMajor
+ MemberDecorate 92(bn) 3 Offset 576
+ MemberDecorate 92(bn) 3 MatrixStride 16
+ MemberDecorate 92(bn) 4 RowMajor
+ MemberDecorate 92(bn) 4 Offset 640
+ MemberDecorate 92(bn) 4 MatrixStride 16
+ Decorate 92(bn) Block
+ Decorate 96 ArrayStride 16
+ MemberDecorate 97(bi) 0 Offset 0
+ Decorate 97(bi) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -100,24 +100,24 @@ Linked fragment stage:
69: TypeVector 6(float) 2
72: 6(float) Constant 1120403456
74: 29(int) Constant 3
- 82: TypeImage 6(float) 2D sampled format:Unknown
- 83: TypeSampledImage 82
- 84: TypeArray 83 74
- 85: TypePointer UniformConstant 84
- 86(samp2Da): 85(ptr) Variable UniformConstant
- 87: TypeMatrix 26(fvec4) 4
- 88: 29(int) Constant 4
- 89: TypeArray 87 88
- 90: TypeArray 87 88
- 91(bn): TypeStruct 89 90 87 87 87
- 92: TypePointer Uniform 91(bn)
- 93: 92(ptr) Variable Uniform
- 94: TypeVector 6(float) 3
- 95: TypeArray 94(fvec3) 50
- 96(bi): TypeStruct 95
- 97: TypeArray 96(bi) 88
- 98: TypePointer Uniform 97
- 99(bname): 98(ptr) Variable Uniform
+ 83: TypeImage 6(float) 2D sampled format:Unknown
+ 84: TypeSampledImage 83
+ 85: TypeArray 84 74
+ 86: TypePointer UniformConstant 85
+ 87(samp2Da): 86(ptr) Variable UniformConstant
+ 88: TypeMatrix 26(fvec4) 4
+ 89: 29(int) Constant 4
+ 90: TypeArray 88 89
+ 91: TypeArray 88 89
+ 92(bn): TypeStruct 90 91 88 88 88
+ 93: TypePointer Uniform 92(bn)
+ 94: 93(ptr) Variable Uniform
+ 95: TypeVector 6(float) 3
+ 96: TypeArray 95(fvec3) 50
+ 97(bi): TypeStruct 96
+ 98: TypeArray 97(bi) 89
+ 99: TypePointer Uniform 98
+ 100(bname): 99(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
13: 12(ptr) Variable Function
diff --git a/Test/baseResults/spv.AofA.frag.out b/Test/baseResults/spv.AofA.frag.out
index 822ad3d5..1e41c3b8 100644
--- a/Test/baseResults/spv.AofA.frag.out
+++ b/Test/baseResults/spv.AofA.frag.out
@@ -7,34 +7,34 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 103
+// Id's are bound by 104
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 38 43 77
+ EntryPoint Fragment 4 "main" 39 44 78
ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Name 4 "main"
Name 17 "foo(f1[5][7];"
Name 16 "a"
Name 20 "r"
- Name 38 "outfloat"
- Name 41 "g4"
- Name 43 "g5"
- Name 44 "param"
- Name 47 "u"
- Name 51 "param"
- Name 65 "many"
- Name 67 "i"
- Name 69 "j"
- Name 71 "k"
- Name 77 "infloat"
- Name 93 "uAofA"
- MemberName 93(uAofA) 0 "f"
- Name 97 "nameAofA"
- Decorate 93(uAofA) GLSLShared
- Decorate 93(uAofA) Block
+ Name 39 "outfloat"
+ Name 42 "g4"
+ Name 44 "g5"
+ Name 45 "param"
+ Name 48 "u"
+ Name 52 "param"
+ Name 66 "many"
+ Name 68 "i"
+ Name 70 "j"
+ Name 72 "k"
+ Name 78 "infloat"
+ Name 94 "uAofA"
+ MemberName 94(uAofA) 0 "f"
+ Name 98 "nameAofA"
+ Decorate 94(uAofA) GLSLShared
+ Decorate 94(uAofA) Block
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -53,82 +53,82 @@ Linked fragment stage:
25: 21(int) Constant 0
28: 21(int) Constant 1
32: 21(int) Constant 3
- 37: TypePointer Output 6(float)
- 38(outfloat): 37(ptr) Variable Output
- 39: 6(float) Constant 0
- 40: TypePointer Private 14
- 41(g4): 40(ptr) Variable Private
- 42: TypePointer Input 11
- 43(g5): 42(ptr) Variable Input
- 48: 6(float) Constant 1077936128
- 49: TypePointer Function 6(float)
- 54: 7(int) Constant 6
- 55: TypeArray 6(float) 54
- 56: TypeArray 55 10
- 57: TypeArray 56 13
- 58: 7(int) Constant 3
- 59: TypeArray 57 58
- 60: 7(int) Constant 2
- 61: TypeArray 59 60
- 62: 7(int) Constant 1
- 63: TypeArray 61 62
- 64: TypePointer Private 63
- 65(many): 64(ptr) Variable Private
- 66: TypePointer UniformConstant 21(int)
- 67(i): 66(ptr) Variable UniformConstant
- 69(j): 66(ptr) Variable UniformConstant
- 71(k): 66(ptr) Variable UniformConstant
- 76: TypePointer Input 6(float)
- 77(infloat): 76(ptr) Variable Input
- 79: TypePointer Private 6(float)
- 91: TypeArray 6(float) 13
- 92: TypeArray 91 60
- 93(uAofA): TypeStruct 92
- 94: TypeArray 93(uAofA) 10
- 95: TypeArray 94 58
- 96: TypePointer Uniform 95
- 97(nameAofA): 96(ptr) Variable Uniform
- 98: TypePointer Uniform 6(float)
+ 38: TypePointer Output 6(float)
+ 39(outfloat): 38(ptr) Variable Output
+ 40: 6(float) Constant 0
+ 41: TypePointer Private 14
+ 42(g4): 41(ptr) Variable Private
+ 43: TypePointer Input 11
+ 44(g5): 43(ptr) Variable Input
+ 49: 6(float) Constant 1077936128
+ 50: TypePointer Function 6(float)
+ 55: 7(int) Constant 6
+ 56: TypeArray 6(float) 55
+ 57: TypeArray 56 10
+ 58: TypeArray 57 13
+ 59: 7(int) Constant 3
+ 60: TypeArray 58 59
+ 61: 7(int) Constant 2
+ 62: TypeArray 60 61
+ 63: 7(int) Constant 1
+ 64: TypeArray 62 63
+ 65: TypePointer Private 64
+ 66(many): 65(ptr) Variable Private
+ 67: TypePointer UniformConstant 21(int)
+ 68(i): 67(ptr) Variable UniformConstant
+ 70(j): 67(ptr) Variable UniformConstant
+ 72(k): 67(ptr) Variable UniformConstant
+ 77: TypePointer Input 6(float)
+ 78(infloat): 77(ptr) Variable Input
+ 80: TypePointer Private 6(float)
+ 92: TypeArray 6(float) 13
+ 93: TypeArray 92 61
+ 94(uAofA): TypeStruct 93
+ 95: TypeArray 94(uAofA) 10
+ 96: TypeArray 95 59
+ 97: TypePointer Uniform 96
+ 98(nameAofA): 97(ptr) Variable Uniform
+ 99: TypePointer Uniform 6(float)
4(main): 2 Function None 3
5: Label
- 44(param): 12(ptr) Variable Function
- 47(u): 12(ptr) Variable Function
- 51(param): 12(ptr) Variable Function
- Store 38(outfloat) 39
- 45: 11 Load 43(g5)
- Store 44(param) 45
- 46: 14 FunctionCall 17(foo(f1[5][7];) 44(param)
- Store 41(g4) 46
- 50: 49(ptr) AccessChain 47(u) 22 22
- Store 50 48
- 52: 11 Load 47(u)
- Store 51(param) 52
- 53: 14 FunctionCall 17(foo(f1[5][7];) 51(param)
- 68: 21(int) Load 67(i)
- 70: 21(int) Load 69(j)
- 72: 21(int) Load 71(k)
- 73: 21(int) Load 67(i)
- 74: 21(int) Load 69(j)
- 75: 21(int) Load 71(k)
- 78: 6(float) Load 77(infloat)
- 80: 79(ptr) AccessChain 65(many) 68 70 72 73 74 75
- Store 80 78
- 81: 21(int) Load 69(j)
- 82: 21(int) Load 69(j)
- 83: 21(int) Load 69(j)
- 84: 21(int) Load 69(j)
- 85: 21(int) Load 69(j)
- 86: 21(int) Load 69(j)
- 87: 79(ptr) AccessChain 65(many) 81 82 83 84 85 86
- 88: 6(float) Load 87
- 89: 6(float) Load 38(outfloat)
- 90: 6(float) FAdd 89 88
- Store 38(outfloat) 90
- 99: 98(ptr) AccessChain 97(nameAofA) 28 22 25 25 32
- 100: 6(float) Load 99
- 101: 6(float) Load 38(outfloat)
- 102: 6(float) FAdd 101 100
- Store 38(outfloat) 102
+ 45(param): 12(ptr) Variable Function
+ 48(u): 12(ptr) Variable Function
+ 52(param): 12(ptr) Variable Function
+ Store 39(outfloat) 40
+ 46: 11 Load 44(g5)
+ Store 45(param) 46
+ 47: 14 FunctionCall 17(foo(f1[5][7];) 45(param)
+ Store 42(g4) 47
+ 51: 50(ptr) AccessChain 48(u) 22 22
+ Store 51 49
+ 53: 11 Load 48(u)
+ Store 52(param) 53
+ 54: 14 FunctionCall 17(foo(f1[5][7];) 52(param)
+ 69: 21(int) Load 68(i)
+ 71: 21(int) Load 70(j)
+ 73: 21(int) Load 72(k)
+ 74: 21(int) Load 68(i)
+ 75: 21(int) Load 70(j)
+ 76: 21(int) Load 72(k)
+ 79: 6(float) Load 78(infloat)
+ 81: 80(ptr) AccessChain 66(many) 69 71 73 74 75 76
+ Store 81 79
+ 82: 21(int) Load 70(j)
+ 83: 21(int) Load 70(j)
+ 84: 21(int) Load 70(j)
+ 85: 21(int) Load 70(j)
+ 86: 21(int) Load 70(j)
+ 87: 21(int) Load 70(j)
+ 88: 80(ptr) AccessChain 66(many) 82 83 84 85 86 87
+ 89: 6(float) Load 88
+ 90: 6(float) Load 39(outfloat)
+ 91: 6(float) FAdd 90 89
+ Store 39(outfloat) 91
+ 100: 99(ptr) AccessChain 98(nameAofA) 28 22 25 25 32
+ 101: 6(float) Load 100
+ 102: 6(float) Load 39(outfloat)
+ 103: 6(float) FAdd 102 101
+ Store 39(outfloat) 103
Return
FunctionEnd
17(foo(f1[5][7];): 14 Function None 15
diff --git a/Test/baseResults/spv.atomic.comp.out b/Test/baseResults/spv.atomic.comp.out
index 2ee4978f..bdf16fe5 100755
--- a/Test/baseResults/spv.atomic.comp.out
+++ b/Test/baseResults/spv.atomic.comp.out
@@ -8,7 +8,7 @@ Linked compute stage:
TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 74
+// Id's are bound by 75
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -20,28 +20,28 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
Name 10 "func(au1;"
Name 9 "c"
Name 12 "atoms("
- Name 20 "counter"
- Name 21 "param"
- Name 24 "val"
- Name 28 "countArr"
- Name 35 "origi"
- Name 37 "atomi"
- Name 40 "origu"
- Name 42 "atomu"
- Name 44 "value"
- Name 61 "dataSSB"
- MemberName 61(dataSSB) 0 "f"
- MemberName 61(dataSSB) 1 "n_frames_rendered"
- Name 63 "result"
- Name 71 "arrX"
- Name 72 "arrY"
- Name 73 "arrZ"
- Decorate 20(counter) Binding 0
- Decorate 28(countArr) Binding 0
- MemberDecorate 61(dataSSB) 0 Offset 0
- MemberDecorate 61(dataSSB) 1 Offset 16
- Decorate 61(dataSSB) BufferBlock
- Decorate 63(result) Binding 0
+ Name 21 "counter"
+ Name 22 "param"
+ Name 25 "val"
+ Name 29 "countArr"
+ Name 36 "origi"
+ Name 38 "atomi"
+ Name 41 "origu"
+ Name 43 "atomu"
+ Name 45 "value"
+ Name 62 "dataSSB"
+ MemberName 62(dataSSB) 0 "f"
+ MemberName 62(dataSSB) 1 "n_frames_rendered"
+ Name 64 "result"
+ Name 72 "arrX"
+ Name 73 "arrY"
+ Name 74 "arrZ"
+ Decorate 21(counter) Binding 0
+ Decorate 29(countArr) Binding 0
+ MemberDecorate 62(dataSSB) 0 Offset 0
+ MemberDecorate 62(dataSSB) 1 Offset 16
+ Decorate 62(dataSSB) BufferBlock
+ Decorate 64(result) Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -49,51 +49,51 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
8: TypeFunction 6(int) 7(ptr)
14: 6(int) Constant 1
15: 6(int) Constant 0
- 18: 6(int) Constant 1024
- 19: TypePointer AtomicCounter 6(int)
- 20(counter): 19(ptr) Variable AtomicCounter
- 25: 6(int) Constant 4
- 26: TypeArray 6(int) 25
- 27: TypePointer AtomicCounter 26
- 28(countArr): 27(ptr) Variable AtomicCounter
- 29: TypeInt 32 1
- 30: 29(int) Constant 2
- 34: TypePointer Function 29(int)
- 36: TypePointer Workgroup 29(int)
- 37(atomi): 36(ptr) Variable Workgroup
- 38: 29(int) Constant 3
- 41: TypePointer Workgroup 6(int)
- 42(atomu): 41(ptr) Variable Workgroup
- 43: TypePointer UniformConstant 6(int)
- 44(value): 43(ptr) Variable UniformConstant
- 47: 6(int) Constant 7
- 52: 29(int) Constant 7
- 56: 6(int) Constant 10
- 59: TypeFloat 32
- 60: TypeVector 29(int) 4
- 61(dataSSB): TypeStruct 59(float) 60(ivec4)
- 62: TypePointer Uniform 61(dataSSB)
- 63(result): 62(ptr) Variable Uniform
- 64: 29(int) Constant 1
- 65: 6(int) Constant 2
- 66: TypePointer Uniform 29(int)
- 69: TypeArray 29(int) 14
- 70: TypePointer Private 69
- 71(arrX): 70(ptr) Variable Private
- 72(arrY): 70(ptr) Variable Private
- 73(arrZ): 70(ptr) Variable Private
+ 19: 6(int) Constant 1024
+ 20: TypePointer AtomicCounter 6(int)
+ 21(counter): 20(ptr) Variable AtomicCounter
+ 26: 6(int) Constant 4
+ 27: TypeArray 6(int) 26
+ 28: TypePointer AtomicCounter 27
+ 29(countArr): 28(ptr) Variable AtomicCounter
+ 30: TypeInt 32 1
+ 31: 30(int) Constant 2
+ 35: TypePointer Function 30(int)
+ 37: TypePointer Workgroup 30(int)
+ 38(atomi): 37(ptr) Variable Workgroup
+ 39: 30(int) Constant 3
+ 42: TypePointer Workgroup 6(int)
+ 43(atomu): 42(ptr) Variable Workgroup
+ 44: TypePointer UniformConstant 6(int)
+ 45(value): 44(ptr) Variable UniformConstant
+ 48: 6(int) Constant 7
+ 53: 30(int) Constant 7
+ 57: 6(int) Constant 10
+ 60: TypeFloat 32
+ 61: TypeVector 30(int) 4
+ 62(dataSSB): TypeStruct 60(float) 61(ivec4)
+ 63: TypePointer Uniform 62(dataSSB)
+ 64(result): 63(ptr) Variable Uniform
+ 65: 30(int) Constant 1
+ 66: 6(int) Constant 2
+ 67: TypePointer Uniform 30(int)
+ 70: TypeArray 30(int) 14
+ 71: TypePointer Private 70
+ 72(arrX): 71(ptr) Variable Private
+ 73(arrY): 71(ptr) Variable Private
+ 74(arrZ): 71(ptr) Variable Private
4(main): 2 Function None 3
5: Label
- 21(param): 7(ptr) Variable Function
- 24(val): 7(ptr) Variable Function
- MemoryBarrier 14 18
- 22: 6(int) Load 20(counter)
- Store 21(param) 22
- 23: 6(int) FunctionCall 10(func(au1;) 21(param)
- 31: 19(ptr) AccessChain 28(countArr) 30
- 32: 6(int) AtomicLoad 31 14 15
- Store 24(val) 32
- 33: 6(int) AtomicIDecrement 20(counter) 14 15
+ 22(param): 7(ptr) Variable Function
+ 25(val): 7(ptr) Variable Function
+ MemoryBarrier 14 19
+ 23: 6(int) Load 21(counter)
+ Store 22(param) 23
+ 24: 6(int) FunctionCall 10(func(au1;) 22(param)
+ 32: 20(ptr) AccessChain 29(countArr) 31
+ 33: 6(int) AtomicLoad 32 14 15
+ Store 25(val) 33
+ 34: 6(int) AtomicIDecrement 21(counter) 14 15
Return
FunctionEnd
10(func(au1;): 6(int) Function None 8
@@ -104,29 +104,29 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
FunctionEnd
12(atoms(): 2 Function None 3
13: Label
- 35(origi): 34(ptr) Variable Function
- 40(origu): 7(ptr) Variable Function
- 39: 29(int) AtomicIAdd 37(atomi) 14 15 38
- Store 35(origi) 39
- 45: 6(int) Load 44(value)
- 46: 6(int) AtomicAnd 42(atomu) 14 15 45
- Store 40(origu) 46
- 48: 6(int) AtomicOr 42(atomu) 14 15 47
- Store 40(origu) 48
- 49: 6(int) AtomicXor 42(atomu) 14 15 47
- Store 40(origu) 49
- 50: 6(int) Load 44(value)
- 51: 6(int) AtomicUMin 42(atomu) 14 15 50
- Store 40(origu) 51
- 53: 29(int) AtomicSMax 37(atomi) 14 15 52
- Store 35(origi) 53
- 54: 29(int) Load 35(origi)
- 55: 29(int) AtomicExchange 37(atomi) 14 15 54
- Store 35(origi) 55
- 57: 6(int) Load 44(value)
- 58: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56
- Store 40(origu) 58
- 67: 66(ptr) AccessChain 63(result) 64 65
- 68: 29(int) AtomicIAdd 67 14 15 64
+ 36(origi): 35(ptr) Variable Function
+ 41(origu): 7(ptr) Variable Function
+ 40: 30(int) AtomicIAdd 38(atomi) 14 15 39
+ Store 36(origi) 40
+ 46: 6(int) Load 45(value)
+ 47: 6(int) AtomicAnd 43(atomu) 14 15 46
+ Store 41(origu) 47
+ 49: 6(int) AtomicOr 43(atomu) 14 15 48
+ Store 41(origu) 49
+ 50: 6(int) AtomicXor 43(atomu) 14 15 48
+ Store 41(origu) 50
+ 51: 6(int) Load 45(value)
+ 52: 6(int) AtomicUMin 43(atomu) 14 15 51
+ Store 41(origu) 52
+ 54: 30(int) AtomicSMax 38(atomi) 14 15 53
+ Store 36(origi) 54
+ 55: 30(int) Load 36(origi)
+ 56: 30(int) AtomicExchange 38(atomi) 14 15 55
+ Store 36(origi) 56
+ 58: 6(int) Load 45(value)
+ 59: 6(int) AtomicCompareExchange 43(atomu) 14 15 15 58 57
+ Store 41(origu) 59
+ 68: 67(ptr) AccessChain 64(result) 65 66
+ 69: 30(int) AtomicIAdd 68 14 15 65
Return
FunctionEnd
diff --git a/Test/baseResults/spv.bool.vert.out b/Test/baseResults/spv.bool.vert.out
index 7217ae7b..0fece207 100644
--- a/Test/baseResults/spv.bool.vert.out
+++ b/Test/baseResults/spv.bool.vert.out
@@ -7,86 +7,86 @@ Linked vertex stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 49
+// Id's are bound by 50
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4 "main" 23 47 48
+ EntryPoint Vertex 4 "main" 24 48 49
Source GLSL 450
Name 4 "main"
Name 10 "foo(b1;"
Name 9 "b"
- Name 21 "gl_PerVertex"
- MemberName 21(gl_PerVertex) 0 "gl_Position"
- MemberName 21(gl_PerVertex) 1 "gl_PointSize"
- MemberName 21(gl_PerVertex) 2 "gl_ClipDistance"
- MemberName 21(gl_PerVertex) 3 "gl_CullDistance"
- Name 23 ""
- Name 28 "ubname"
- MemberName 28(ubname) 0 "b"
- Name 30 "ubinst"
- Name 31 "param"
- Name 47 "gl_VertexID"
- Name 48 "gl_InstanceID"
- MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position
- MemberDecorate 21(gl_PerVertex) 1 BuiltIn PointSize
- MemberDecorate 21(gl_PerVertex) 2 BuiltIn ClipDistance
- MemberDecorate 21(gl_PerVertex) 3 BuiltIn CullDistance
- Decorate 21(gl_PerVertex) Block
- Decorate 28(ubname) GLSLShared
- Decorate 28(ubname) Block
- Decorate 47(gl_VertexID) BuiltIn VertexId
- Decorate 48(gl_InstanceID) BuiltIn InstanceId
+ Name 22 "gl_PerVertex"
+ MemberName 22(gl_PerVertex) 0 "gl_Position"
+ MemberName 22(gl_PerVertex) 1 "gl_PointSize"
+ MemberName 22(gl_PerVertex) 2 "gl_ClipDistance"
+ MemberName 22(gl_PerVertex) 3 "gl_CullDistance"
+ Name 24 ""
+ Name 29 "ubname"
+ MemberName 29(ubname) 0 "b"
+ Name 31 "ubinst"
+ Name 32 "param"
+ Name 48 "gl_VertexID"
+ Name 49 "gl_InstanceID"
+ MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position
+ MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize
+ MemberDecorate 22(gl_PerVertex) 2 BuiltIn ClipDistance
+ MemberDecorate 22(gl_PerVertex) 3 BuiltIn CullDistance
+ Decorate 22(gl_PerVertex) Block
+ Decorate 29(ubname) GLSLShared
+ Decorate 29(ubname) Block
+ Decorate 48(gl_VertexID) BuiltIn VertexId
+ Decorate 49(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
3: TypeFunction 2
6: TypeBool
7: TypePointer Function 6(bool)
8: TypeFunction 6(bool) 7(ptr)
13: 6(bool) ConstantFalse
- 16: TypeFloat 32
- 17: TypeVector 16(float) 4
- 18: TypeInt 32 0
- 19: 18(int) Constant 1
- 20: TypeArray 16(float) 19
-21(gl_PerVertex): TypeStruct 17(fvec4) 16(float) 20 20
- 22: TypePointer Output 21(gl_PerVertex)
- 23: 22(ptr) Variable Output
- 24: TypeInt 32 1
- 25: 24(int) Constant 0
- 26: TypePointer Function 17(fvec4)
- 28(ubname): TypeStruct 6(bool)
- 29: TypePointer Uniform 28(ubname)
- 30(ubinst): 29(ptr) Variable Uniform
- 32: TypePointer Uniform 6(bool)
- 38: 16(float) Constant 0
- 39: 17(fvec4) ConstantComposite 38 38 38 38
- 41: 16(float) Constant 1065353216
- 42: 17(fvec4) ConstantComposite 41 41 41 41
- 44: TypePointer Output 17(fvec4)
- 46: TypePointer Input 24(int)
- 47(gl_VertexID): 46(ptr) Variable Input
-48(gl_InstanceID): 46(ptr) Variable Input
+ 17: TypeFloat 32
+ 18: TypeVector 17(float) 4
+ 19: TypeInt 32 0
+ 20: 19(int) Constant 1
+ 21: TypeArray 17(float) 20
+22(gl_PerVertex): TypeStruct 18(fvec4) 17(float) 21 21
+ 23: TypePointer Output 22(gl_PerVertex)
+ 24: 23(ptr) Variable Output
+ 25: TypeInt 32 1
+ 26: 25(int) Constant 0
+ 27: TypePointer Function 18(fvec4)
+ 29(ubname): TypeStruct 6(bool)
+ 30: TypePointer Uniform 29(ubname)
+ 31(ubinst): 30(ptr) Variable Uniform
+ 33: TypePointer Uniform 6(bool)
+ 39: 17(float) Constant 0
+ 40: 18(fvec4) ConstantComposite 39 39 39 39
+ 42: 17(float) Constant 1065353216
+ 43: 18(fvec4) ConstantComposite 42 42 42 42
+ 45: TypePointer Output 18(fvec4)
+ 47: TypePointer Input 25(int)
+ 48(gl_VertexID): 47(ptr) Variable Input
+49(gl_InstanceID): 47(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 27: 26(ptr) Variable Function
- 31(param): 7(ptr) Variable Function
- 33: 32(ptr) AccessChain 30(ubinst) 25
- 34: 6(bool) Load 33
- Store 31(param) 34
- 35: 6(bool) FunctionCall 10(foo(b1;) 31(param)
- SelectionMerge 37 None
- BranchConditional 35 36 40
- 36: Label
- Store 27 39
- Branch 37
- 40: Label
- Store 27 42
- Branch 37
- 37: Label
- 43: 17(fvec4) Load 27
- 45: 44(ptr) AccessChain 23 25
- Store 45 43
+ 28: 27(ptr) Variable Function
+ 32(param): 7(ptr) Variable Function
+ 34: 33(ptr) AccessChain 31(ubinst) 26
+ 35: 6(bool) Load 34
+ Store 32(param) 35
+ 36: 6(bool) FunctionCall 10(foo(b1;) 32(param)
+ SelectionMerge 38 None
+ BranchConditional 36 37 41
+ 37: Label
+ Store 28 40
+ Branch 38
+ 41: Label
+ Store 28 43
+ Branch 38
+ 38: Label
+ 44: 18(fvec4) Load 28
+ 46: 45(ptr) AccessChain 24 26
+ Store 46 44
Return
FunctionEnd
10(foo(b1;): 6(bool) Function None 8
diff --git a/Test/baseResults/spv.for-notest.vert.out b/Test/baseResults/spv.for-notest.vert.out
index 0b77cb11..b2618c1e 100644
--- a/Test/baseResults/spv.for-notest.vert.out
+++ b/Test/baseResults/spv.for-notest.vert.out
@@ -50,4 +50,6 @@ Linked vertex stage:
19: 6(int) IAdd 17 18
Store 8(i) 19
Branch 10
+ 12: Label
+ Return
FunctionEnd
diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out
index 8d0323b9..2000a369 100755
--- a/Test/baseResults/spv.forwardFun.frag.out
+++ b/Test/baseResults/spv.forwardFun.frag.out
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 60
+// Id's are bound by 61
Capability Shader
1: ExtInstImport "GLSL.std.450"
@@ -24,13 +24,13 @@ Linked fragment stage:
Name 27 "f"
Name 30 "gl_FragColor"
Name 36 "d"
- Name 59 "bigColor"
+ Name 60 "bigColor"
Decorate 18(color) RelaxedPrecision
Decorate 20(BaseColor) RelaxedPrecision
Decorate 27(f) RelaxedPrecision
Decorate 30(gl_FragColor) RelaxedPrecision
Decorate 36(d) RelaxedPrecision
- Decorate 59(bigColor) RelaxedPrecision
+ Decorate 60(bigColor) RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
@@ -52,8 +52,8 @@ Linked fragment stage:
49: TypeInt 32 0
50: 49(int) Constant 0
53: 49(int) Constant 1
- 58: TypePointer UniformConstant 12(fvec4)
- 59(bigColor): 58(ptr) Variable UniformConstant
+ 59: TypePointer UniformConstant 12(fvec4)
+ 60(bigColor): 59(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
18(color): 13(ptr) Variable Function
diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out
index 5716f1d9..f2d381db 100755
--- a/Test/baseResults/spv.functionCall.frag.out
+++ b/Test/baseResults/spv.functionCall.frag.out
@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 76
+// Id's are bound by 77
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 57 68
+ EntryPoint Fragment 4 "main" 58 69
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Name 4 "main"
@@ -22,14 +22,14 @@ Linked fragment stage:
Name 16 "unreachableReturn("
Name 18 "missingReturn("
Name 21 "h"
- Name 34 "d"
- Name 55 "color"
- Name 57 "BaseColor"
- Name 58 "param"
- Name 63 "f"
- Name 65 "g"
- Name 68 "gl_FragColor"
- Name 75 "bigColor"
+ Name 35 "d"
+ Name 56 "color"
+ Name 58 "BaseColor"
+ Name 59 "param"
+ Name 64 "f"
+ Name 66 "g"
+ Name 69 "gl_FragColor"
+ Name 76 "bigColor"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -44,42 +44,42 @@ Linked fragment stage:
24: 23(int) Constant 0
25: TypePointer Function 6(float)
28: 23(int) Constant 1
- 33: TypePointer UniformConstant 6(float)
- 34(d): 33(ptr) Variable UniformConstant
- 36: 6(float) Constant 1082549862
- 37: TypeBool
- 41: 6(float) Constant 1067030938
- 44: 6(float) Constant 1083179008
- 52: 6(float) Constant 1081711002
- 56: TypePointer Input 7(fvec4)
- 57(BaseColor): 56(ptr) Variable Input
- 67: TypePointer Output 7(fvec4)
-68(gl_FragColor): 67(ptr) Variable Output
- 74: TypePointer UniformConstant 7(fvec4)
- 75(bigColor): 74(ptr) Variable UniformConstant
+ 34: TypePointer UniformConstant 6(float)
+ 35(d): 34(ptr) Variable UniformConstant
+ 37: 6(float) Constant 1082549862
+ 38: TypeBool
+ 42: 6(float) Constant 1067030938
+ 45: 6(float) Constant 1083179008
+ 53: 6(float) Constant 1081711002
+ 57: TypePointer Input 7(fvec4)
+ 58(BaseColor): 57(ptr) Variable Input
+ 68: TypePointer Output 7(fvec4)
+69(gl_FragColor): 68(ptr) Variable Output
+ 75: TypePointer UniformConstant 7(fvec4)
+ 76(bigColor): 75(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 55(color): 8(ptr) Variable Function
- 58(param): 8(ptr) Variable Function
- 63(f): 25(ptr) Variable Function
- 65(g): 25(ptr) Variable Function
+ 56(color): 8(ptr) Variable Function
+ 59(param): 8(ptr) Variable Function
+ 64(f): 25(ptr) Variable Function
+ 66(g): 25(ptr) Variable Function
Store 21(h) 22
- 59: 7(fvec4) Load 57(BaseColor)
- Store 58(param) 59
- 60: 6(float) FunctionCall 11(foo(vf4;) 58(param)
- 61: 7(fvec4) CompositeConstruct 60 60 60 60
- Store 55(color) 61
- 62: 2 FunctionCall 13(bar()
- 64: 6(float) FunctionCall 16(unreachableReturn()
- Store 63(f) 64
- 66: 6(float) FunctionCall 18(missingReturn()
- Store 65(g) 66
- 69: 7(fvec4) Load 55(color)
- 70: 6(float) Load 63(f)
- 71: 7(fvec4) VectorTimesScalar 69 70
- 72: 6(float) Load 21(h)
- 73: 7(fvec4) VectorTimesScalar 71 72
- Store 68(gl_FragColor) 73
+ 60: 7(fvec4) Load 58(BaseColor)
+ Store 59(param) 60
+ 61: 6(float) FunctionCall 11(foo(vf4;) 59(param)
+ 62: 7(fvec4) CompositeConstruct 61 61 61 61
+ Store 56(color) 62
+ 63: 2 FunctionCall 13(bar()
+ 65: 6(float) FunctionCall 16(unreachableReturn()
+ Store 64(f) 65
+ 67: 6(float) FunctionCall 18(missingReturn()
+ Store 66(g) 67
+ 70: 7(fvec4) Load 56(color)
+ 71: 6(float) Load 64(f)
+ 72: 7(fvec4) VectorTimesScalar 70 71
+ 73: 6(float) Load 21(h)
+ 74: 7(fvec4) VectorTimesScalar 72 73
+ Store 69(gl_FragColor) 74
Return
FunctionEnd
11(foo(vf4;): 6(float) Function None 9
@@ -98,29 +98,29 @@ Linked fragment stage:
FunctionEnd
16(unreachableReturn(): 6(float) Function None 15
17: Label
- 35: 6(float) Load 34(d)
- 38: 37(bool) FOrdLessThan 35 36
- SelectionMerge 40 None
- BranchConditional 38 39 43
- 39: Label
- ReturnValue 41
- 43: Label
- ReturnValue 44
- 40: Label
- 46: 6(float) Undef
- ReturnValue 46
+ 36: 6(float) Load 35(d)
+ 39: 38(bool) FOrdLessThan 36 37
+ SelectionMerge 41 None
+ BranchConditional 39 40 44
+ 40: Label
+ ReturnValue 42
+ 44: Label
+ ReturnValue 45
+ 41: Label
+ 47: 6(float) Undef
+ ReturnValue 47
FunctionEnd
18(missingReturn(): 6(float) Function None 15
19: Label
- 47: 6(float) Load 34(d)
- 48: 37(bool) FOrdLessThan 47 44
- SelectionMerge 50 None
- BranchConditional 48 49 50
- 49: Label
- 51: 6(float) Load 34(d)
- Store 21(h) 51
- ReturnValue 52
- 50: Label
- 54: 6(float) Undef
- ReturnValue 54
+ 48: 6(float) Load 35(d)
+ 49: 38(bool) FOrdLessThan 48 45
+ SelectionMerge 51 None
+ BranchConditional 49 50 51
+ 50: Label
+ 52: 6(float) Load 35(d)
+ Store 21(h) 52
+ ReturnValue 53
+ 51: Label
+ 55: 6(float) Undef
+ ReturnValue 55
FunctionEnd
diff --git a/Test/baseResults/spv.functionSemantics.frag.out b/Test/baseResults/spv.functionSemantics.frag.out
index 35d8100e..9978539f 100755
--- a/Test/baseResults/spv.functionSemantics.frag.out
+++ b/Test/baseResults/spv.functionSemantics.frag.out
@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 153
+// Id's are bound by 156
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 149
+ EntryPoint Fragment 4 "main" 152
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main"
@@ -29,25 +29,25 @@ Linked fragment stage:
Name 24 "r"
Name 28 "foo3("
Name 30 "sum"
- Name 74 "u"
- Name 86 "t"
- Name 89 "s"
- MemberName 89(s) 0 "t"
- Name 91 "f"
- Name 95 "color"
- Name 101 "e"
- Name 102 "param"
- Name 103 "param"
- Name 104 "param"
+ Name 76 "u"
+ Name 89 "t"
+ Name 92 "s"
+ MemberName 92(s) 0 "t"
+ Name 94 "f"
+ Name 98 "color"
+ Name 104 "e"
Name 105 "param"
- Name 120 "ret"
- Name 122 "tempReturn"
- Name 127 "tempArg"
- Name 128 "param"
- Name 129 "param"
- Name 130 "param"
- Name 133 "arg"
- Name 149 "gl_FragColor"
+ Name 106 "param"
+ Name 107 "param"
+ Name 108 "param"
+ Name 123 "ret"
+ Name 125 "tempReturn"
+ Name 130 "tempArg"
+ Name 131 "param"
+ Name 132 "param"
+ Name 133 "param"
+ Name 136 "arg"
+ Name 152 "gl_FragColor"
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@@ -61,103 +61,103 @@ Linked fragment stage:
27: TypeFunction 6(int)
38: 6(int) Constant 64
43: 6(int) Constant 1024
- 61: 17(float) Constant 1077936128
- 65: 17(float) Constant 1084227584
- 66: TypeInt 32 0
- 67: 66(int) Constant 1
- 73: TypePointer UniformConstant 17(float)
- 74(u): 73(ptr) Variable UniformConstant
- 76: 17(float) Constant 1078774989
- 77: TypeBool
- 82: 6(int) Constant 1000000
- 84: 6(int) Constant 2000000
- 87: 6(int) Constant 2
- 88: TypeVector 6(int) 4
- 89(s): TypeStruct 88(ivec4)
- 90: TypePointer Function 89(s)
- 92: 6(int) Constant 0
- 93: 6(int) Constant 32
- 96: 6(int) Constant 1
- 100: 6(int) Constant 8
- 112: 6(int) Constant 128
- 121: TypePointer Private 6(int)
- 122(tempReturn): 121(ptr) Variable Private
- 123: 17(float) Constant 1082130432
- 124: 17(float) Constant 1065353216
- 125: 17(float) Constant 1073741824
- 126: 19(fvec3) ConstantComposite 124 125 61
- 147: TypeVector 17(float) 4
- 148: TypePointer Output 147(fvec4)
-149(gl_FragColor): 148(ptr) Variable Output
+ 62: 17(float) Constant 1077936128
+ 66: 17(float) Constant 1084227584
+ 67: TypeInt 32 0
+ 68: 67(int) Constant 1
+ 75: TypePointer UniformConstant 17(float)
+ 76(u): 75(ptr) Variable UniformConstant
+ 78: 17(float) Constant 1078774989
+ 79: TypeBool
+ 84: 6(int) Constant 1000000
+ 86: 6(int) Constant 2000000
+ 90: 6(int) Constant 2
+ 91: TypeVector 6(int) 4
+ 92(s): TypeStruct 91(ivec4)
+ 93: TypePointer Function 92(s)
+ 95: 6(int) Constant 0
+ 96: 6(int) Constant 32
+ 99: 6(int) Constant 1
+ 103: 6(int) Constant 8
+ 115: 6(int) Constant 128
+ 124: TypePointer Private 6(int)
+ 125(tempReturn): 124(ptr) Variable Private
+ 126: 17(float) Constant 1082130432
+ 127: 17(float) Constant 1065353216
+ 128: 17(float) Constant 1073741824
+ 129: 19(fvec3) ConstantComposite 127 128 62
+ 150: TypeVector 17(float) 4
+ 151: TypePointer Output 150(fvec4)
+152(gl_FragColor): 151(ptr) Variable Output
4(main): 2 Function None 3
5: Label
- 86(t): 7(ptr) Variable Function
- 91(f): 90(ptr) Variable Function
- 95(color): 7(ptr) Variable Function
- 101(e): 7(ptr) Variable Function
- 102(param): 7(ptr) Variable Function
- 103(param): 7(ptr) Variable Function
- 104(param): 7(ptr) Variable Function
+ 89(t): 7(ptr) Variable Function
+ 94(f): 93(ptr) Variable Function
+ 98(color): 7(ptr) Variable Function
+ 104(e): 7(ptr) Variable Function
105(param): 7(ptr) Variable Function
- 120(ret): 18(ptr) Variable Function
- 127(tempArg): 7(ptr) Variable Function
- 128(param): 18(ptr) Variable Function
- 129(param): 20(ptr) Variable Function
- 130(param): 7(ptr) Variable Function
- 133(arg): 18(ptr) Variable Function
- Store 86(t) 87
- 94: 7(ptr) AccessChain 91(f) 92 67
- Store 94 93
- 97: 6(int) Load 86(t)
- 98: 6(int) Load 86(t)
- 99: 6(int) IAdd 97 98
- Store 102(param) 96
- Store 103(param) 99
- 106: 7(ptr) AccessChain 91(f) 92 67
- 107: 6(int) Load 106
- Store 105(param) 107
- 108: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 102(param) 87 103(param) 100 104(param) 105(param)
- 109: 6(int) Load 104(param)
- Store 101(e) 109
- 110: 6(int) Load 105(param)
- 111: 7(ptr) AccessChain 91(f) 92 67
- Store 111 110
- Store 95(color) 108
- 113: 6(int) Load 101(e)
- 114: 7(ptr) AccessChain 91(f) 92 67
- 115: 6(int) Load 114
- 116: 6(int) IAdd 113 115
- 117: 6(int) IMul 112 116
- 118: 6(int) Load 95(color)
- 119: 6(int) IAdd 118 117
- Store 95(color) 119
- Store 128(param) 123
- Store 129(param) 126
- 131: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 128(param) 129(param) 130(param)
- 132: 6(int) Load 130(param)
- Store 127(tempArg) 132
- Store 122(tempReturn) 131
- 134: 6(int) Load 127(tempArg)
- 135: 17(float) ConvertSToF 134
- Store 133(arg) 135
- 136: 6(int) Load 122(tempReturn)
- 137: 17(float) ConvertSToF 136
- Store 120(ret) 137
- 138: 17(float) Load 120(ret)
- 139: 17(float) Load 133(arg)
- 140: 17(float) FAdd 138 139
- 141: 6(int) ConvertFToS 140
- 142: 6(int) Load 95(color)
- 143: 6(int) IAdd 142 141
- Store 95(color) 143
- 144: 6(int) FunctionCall 28(foo3()
- 145: 6(int) Load 95(color)
+ 106(param): 7(ptr) Variable Function
+ 107(param): 7(ptr) Variable Function
+ 108(param): 7(ptr) Variable Function
+ 123(ret): 18(ptr) Variable Function
+ 130(tempArg): 7(ptr) Variable Function
+ 131(param): 18(ptr) Variable Function
+ 132(param): 20(ptr) Variable Function
+ 133(param): 7(ptr) Variable Function
+ 136(arg): 18(ptr) Variable Function
+ Store 89(t) 90
+ 97: 7(ptr) AccessChain 94(f) 95 68
+ Store 97 96
+ 100: 6(int) Load 89(t)
+ 101: 6(int) Load 89(t)
+ 102: 6(int) IAdd 100 101
+ Store 105(param) 99
+ Store 106(param) 102
+ 109: 7(ptr) AccessChain 94(f) 95 68
+ 110: 6(int) Load 109
+ Store 108(param) 110
+ 111: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 105(param) 90 106(param) 103 107(param) 108(param)
+ 112: 6(int) Load 107(param)
+ Store 104(e) 112
+ 113: 6(int) Load 108(param)
+ 114: 7(ptr) AccessChain 94(f) 95 68
+ Store 114 113
+ Store 98(color) 111
+ 116: 6(int) Load 104(e)
+ 117: 7(ptr) AccessChain 94(f) 95 68
+ 118: 6(int) Load 117
+ 119: 6(int) IAdd 116 118
+ 120: 6(int) IMul 115 119
+ 121: 6(int) Load 98(color)
+ 122: 6(int) IAdd 121 120
+ Store 98(color) 122
+ Store 131(param) 126
+ Store 132(param) 129
+ 134: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 131(param) 132(param) 133(param)
+ 135: 6(int) Load 133(param)
+ Store 130(tempArg) 135
+ Store 125(tempReturn) 134
+ 137: 6(int) Load 130(tempArg)
+ 138: 17(float) ConvertSToF 137
+ Store 136(arg) 138
+ 139: 6(int) Load 125(tempReturn)
+ 140: 17(float) ConvertSToF 139
+ Store 123(ret) 140
+ 141: 17(float) Load 123(ret)
+ 142: 17(float) Load 136(arg)
+ 143: 17(float) FAdd 141 142
+ 144: 6(int) ConvertFToS 143
+ 145: 6(int) Load 98(color)
146: 6(int) IAdd 145 144
- Store 95(color) 146
- 150: 6(int) Load 95(color)
- 151: 17(float) ConvertSToF 150
- 152: 147(fvec4) CompositeConstruct 151 151 151 151
- Store 149(gl_FragColor) 152
+ Store 98(color) 146
+ 147: 6(int) FunctionCall 28(foo3()
+ 148: 6(int) Load 98(color)
+ 149: 6(int) IAdd 148 147
+ Store 98(color) 149
+ 153: 6(int) Load 98(color)
+ 154: 17(float) ConvertSToF 153
+ 155: 150(fvec4) CompositeConstruct 154 154 154 154
+ Store 152(gl_FragColor) 155
Return
FunctionEnd
15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8
@@ -209,24 +209,24 @@ Linked fragment stage:
23(b): 20(ptr) FunctionParameter
24(r): 7(ptr) FunctionParameter
26: Label
- 62: 17(float) Load 22(a)
- 63: 17(float) FMul 61 62
- 64: 6(int) ConvertFToS 63
- Store 24(r) 64
- 68: 18(ptr) AccessChain 23(b) 67
- 69: 17(float) Load 68
- 70: 17(float) FMul 65 69
- 71: 6(int) ConvertFToS 70
- ReturnValue 71
+ 63: 17(float) Load 22(a)
+ 64: 17(float) FMul 62 63
+ 65: 6(int) ConvertFToS 64
+ Store 24(r) 65
+ 69: 18(ptr) AccessChain 23(b) 68
+ 70: 17(float) Load 69
+ 71: 17(float) FMul 66 70
+ 72: 6(int) ConvertFToS 71
+ ReturnValue 72
FunctionEnd
28(foo3(): 6(int) Function None 27
29: Label
- 75: 17(float) Load 74(u)
- 78: 77(bool) FOrdGreaterThan 75 76
- SelectionMerge 80 None
- BranchConditional 78 79 80
- 79: Label
+ 77: 17(float) Load 76(u)
+ 80: 79(bool) FOrdGreaterThan 77 78
+ SelectionMerge 82 None
+ BranchConditional 80 81 82
+ 81: Label
Kill
- 80: Label
- ReturnValue 84
+ 82: Label
+ ReturnValue 86
FunctionEnd
diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out
index 122adc96..bf0a3d1e 100755
--- a/Test/baseResults/spv.matFun.vert.out
+++ b/Test/baseResults/spv.matFun.vert.out
@@ -5,12 +5,12 @@ Linked vertex stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 93
+// Id's are bound by 96
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Vertex 4 "main" 69 73 92
+ EntryPoint Vertex 4 "main" 72 76 95
Source GLSL 130
Name 4 "main"
Name 14 "xf(mf33;vf3;"
@@ -21,18 +21,18 @@ Linked vertex stage:
Name 26 "mxv(mf44;vf3;"
Name 24 "m4"
Name 25 "v"
- Name 63 "param"
- Name 69 "gl_Position"
- Name 71 "m4"
- Name 73 "v3"
- Name 74 "param"
- Name 76 "param"
- Name 80 "m3"
- Name 81 "param"
- Name 83 "param"
- Name 92 "gl_VertexID"
- Decorate 69(gl_Position) BuiltIn Position
- Decorate 92(gl_VertexID) BuiltIn VertexId
+ Name 65 "param"
+ Name 72 "gl_Position"
+ Name 74 "m4"
+ Name 76 "v3"
+ Name 77 "param"
+ Name 79 "param"
+ Name 83 "m3"
+ Name 84 "param"
+ Name 86 "param"
+ Name 95 "gl_VertexID"
+ Decorate 72(gl_Position) BuiltIn Position
+ Decorate 95(gl_VertexID) BuiltIn VertexId
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -46,45 +46,45 @@ Linked vertex stage:
18: TypePointer Function 17
19: TypeFunction 8 18(ptr)
23: TypeFunction 7(fvec3) 18(ptr) 10(ptr)
- 32: TypeInt 32 1
- 33: 32(int) Constant 0
- 34: TypePointer Function 16(fvec4)
- 38: 32(int) Constant 1
- 42: 32(int) Constant 2
- 46: 6(float) Constant 1065353216
- 47: 6(float) Constant 0
- 68: TypePointer Output 16(fvec4)
- 69(gl_Position): 68(ptr) Variable Output
- 70: TypePointer UniformConstant 17
- 71(m4): 70(ptr) Variable UniformConstant
- 72: TypePointer Input 7(fvec3)
- 73(v3): 72(ptr) Variable Input
- 79: TypePointer UniformConstant 8
- 80(m3): 79(ptr) Variable UniformConstant
- 91: TypePointer Input 32(int)
- 92(gl_VertexID): 91(ptr) Variable Input
+ 33: TypeInt 32 1
+ 34: 33(int) Constant 0
+ 35: TypePointer Function 16(fvec4)
+ 39: 33(int) Constant 1
+ 43: 33(int) Constant 2
+ 47: 6(float) Constant 1065353216
+ 48: 6(float) Constant 0
+ 71: TypePointer Output 16(fvec4)
+ 72(gl_Position): 71(ptr) Variable Output
+ 73: TypePointer UniformConstant 17
+ 74(m4): 73(ptr) Variable UniformConstant
+ 75: TypePointer Input 7(fvec3)
+ 76(v3): 75(ptr) Variable Input
+ 82: TypePointer UniformConstant 8
+ 83(m3): 82(ptr) Variable UniformConstant
+ 94: TypePointer Input 33(int)
+ 95(gl_VertexID): 94(ptr) Variable Input
4(main): 2 Function None 3
5: Label
- 74(param): 18(ptr) Variable Function
- 76(param): 10(ptr) Variable Function
- 81(param): 9(ptr) Variable Function
- 83(param): 10(ptr) Variable Function
- 75: 17 Load 71(m4)
- Store 74(param) 75
- 77: 7(fvec3) Load 73(v3)
- Store 76(param) 77
- 78: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 74(param) 76(param)
- 82: 8 Load 80(m3)
- Store 81(param) 82
- 84: 7(fvec3) Load 73(v3)
- Store 83(param) 84
- 85: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 81(param) 83(param)
- 86: 7(fvec3) FAdd 78 85
- 87: 6(float) CompositeExtract 86 0
- 88: 6(float) CompositeExtract 86 1
- 89: 6(float) CompositeExtract 86 2
- 90: 16(fvec4) CompositeConstruct 87 88 89 46
- Store 69(gl_Position) 90
+ 77(param): 18(ptr) Variable Function
+ 79(param): 10(ptr) Variable Function
+ 84(param): 9(ptr) Variable Function
+ 86(param): 10(ptr) Variable Function
+ 78: 17 Load 74(m4)
+ Store 77(param) 78
+ 80: 7(fvec3) Load 76(v3)
+ Store 79(param) 80
+ 81: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 77(param) 79(param)
+ 85: 8 Load 83(m3)
+ Store 84(param) 85
+ 87: 7(fvec3) Load 76(v3)
+ Store 86(param) 87
+ 88: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 84(param) 86(param)
+ 89: 7(fvec3) FAdd 81 88
+ 90: 6(float) CompositeExtract 89 0
+ 91: 6(float) CompositeExtract 89 1
+ 92: 6(float) CompositeExtract 89 2
+ 93: 16(fvec4) CompositeConstruct 90 91 92 47
+ Store 72(gl_Position) 93
Return
FunctionEnd
14(xf(mf33;vf3;): 7(fvec3) Function None 11
@@ -99,39 +99,39 @@ Linked vertex stage:
21(Mat3(mf44;): 8 Function None 19
20(m): 18(ptr) FunctionParameter
22: Label
- 35: 34(ptr) AccessChain 20(m) 33
- 36: 16(fvec4) Load 35
- 37: 7(fvec3) VectorShuffle 36 36 0 1 2
- 39: 34(ptr) AccessChain 20(m) 38
- 40: 16(fvec4) Load 39
- 41: 7(fvec3) VectorShuffle 40 40 0 1 2
- 43: 34(ptr) AccessChain 20(m) 42
- 44: 16(fvec4) Load 43
- 45: 7(fvec3) VectorShuffle 44 44 0 1 2
- 48: 6(float) CompositeExtract 37 0
- 49: 6(float) CompositeExtract 37 1
- 50: 6(float) CompositeExtract 37 2
- 51: 6(float) CompositeExtract 41 0
- 52: 6(float) CompositeExtract 41 1
- 53: 6(float) CompositeExtract 41 2
- 54: 6(float) CompositeExtract 45 0
- 55: 6(float) CompositeExtract 45 1
- 56: 6(float) CompositeExtract 45 2
- 57: 7(fvec3) CompositeConstruct 48 49 50
- 58: 7(fvec3) CompositeConstruct 51 52 53
- 59: 7(fvec3) CompositeConstruct 54 55 56
- 60: 8 CompositeConstruct 57 58 59
- ReturnValue 60
+ 36: 35(ptr) AccessChain 20(m) 34
+ 37: 16(fvec4) Load 36
+ 38: 7(fvec3) VectorShuffle 37 37 0 1 2
+ 40: 35(ptr) AccessChain 20(m) 39
+ 41: 16(fvec4) Load 40
+ 42: 7(fvec3) VectorShuffle 41 41 0 1 2
+ 44: 35(ptr) AccessChain 20(m) 43
+ 45: 16(fvec4) Load 44
+ 46: 7(fvec3) VectorShuffle 45 45 0 1 2
+ 49: 6(float) CompositeExtract 38 0
+ 50: 6(float) CompositeExtract 38 1
+ 51: 6(float) CompositeExtract 38 2
+ 52: 6(float) CompositeExtract 42 0
+ 53: 6(float) CompositeExtract 42 1
+ 54: 6(float) CompositeExtract 42 2
+ 55: 6(float) CompositeExtract 46 0
+ 56: 6(float) CompositeExtract 46 1
+ 57: 6(float) CompositeExtract 46 2
+ 58: 7(fvec3) CompositeConstruct 49 50 51
+ 59: 7(fvec3) CompositeConstruct 52 53 54
+ 60: 7(fvec3) CompositeConstruct 55 56 57
+ 61: 8 CompositeConstruct 58 59 60
+ ReturnValue 61
FunctionEnd
26(mxv(mf44;vf3;): 7(fvec3) Function None 23
24(m4): 18(ptr) FunctionParameter
25(v): 10(ptr) FunctionParameter
27: Label
- 63(param): 18(ptr) Variable Function
- 62: 7(fvec3) Load 25(v)
- 64: 17 Load 24(m4)
- Store 63(param) 64
- 65: 8 FunctionCall 21(Mat3(mf44;) 63(param)
- 66: 7(fvec3) VectorTimesMatrix 62 65
- ReturnValue 66
+ 65(param): 18(ptr) Variable Function
+ 64: 7(fvec3) Load 25(v)
+ 66: 17 Load 24(m4)
+ Store 65(param) 66
+ 67: 8 FunctionCall 21(Mat3(mf44;) 65(param)
+ 68: 7(fvec3) VectorTimesMatrix 64 67
+ ReturnValue 68
FunctionEnd
diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out
index 8c28fed7..e120eecd 100755
--- a/Test/baseResults/spv.precision.frag.out
+++ b/Test/baseResults/spv.precision.frag.out
@@ -5,12 +5,12 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 112
+// Id's are bound by 114
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 23 57 59 71
+ EntryPoint Fragment 4 "main" 23 59 61 73
ExecutionMode 4 OriginLowerLeft
Source ESSL 300
Name 4 "main"
@@ -19,29 +19,29 @@ Linked fragment stage:
Name 19 "boolfun(vb2;"
Name 18 "bv2"
Name 23 "highfin"
- Name 36 "sum"
- Name 38 "uniform_medium"
- Name 40 "uniform_high"
- Name 46 "uniform_low"
- Name 51 "arg1"
- Name 53 "arg2"
- Name 55 "d"
- Name 57 "lowfin"
- Name 59 "mediumfin"
- Name 63 "global_highp"
- Name 67 "local_highp"
- Name 71 "mediumfout"
- Name 102 "ub2"
- Name 103 "param"
- Decorate 36(sum) RelaxedPrecision
- Decorate 38(uniform_medium) RelaxedPrecision
- Decorate 46(uniform_low) RelaxedPrecision
- Decorate 51(arg1) RelaxedPrecision
- Decorate 53(arg2) RelaxedPrecision
- Decorate 55(d) RelaxedPrecision
- Decorate 57(lowfin) RelaxedPrecision
- Decorate 59(mediumfin) RelaxedPrecision
- Decorate 71(mediumfout) RelaxedPrecision
+ Name 38 "sum"
+ Name 40 "uniform_medium"
+ Name 42 "uniform_high"
+ Name 48 "uniform_low"
+ Name 53 "arg1"
+ Name 55 "arg2"
+ Name 57 "d"
+ Name 59 "lowfin"
+ Name 61 "mediumfin"
+ Name 65 "global_highp"
+ Name 69 "local_highp"
+ Name 73 "mediumfout"
+ Name 104 "ub2"
+ Name 105 "param"
+ Decorate 38(sum) RelaxedPrecision
+ Decorate 40(uniform_medium) RelaxedPrecision
+ Decorate 48(uniform_low) RelaxedPrecision
+ Decorate 53(arg1) RelaxedPrecision
+ Decorate 55(arg2) RelaxedPrecision
+ Decorate 57(d) RelaxedPrecision
+ Decorate 59(lowfin) RelaxedPrecision
+ Decorate 61(mediumfin) RelaxedPrecision
+ Decorate 73(mediumfout) RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -56,105 +56,105 @@ Linked fragment stage:
21: TypeVector 6(float) 4
22: TypePointer Input 21(fvec4)
23(highfin): 22(ptr) Variable Input
- 28: 14(bool) ConstantFalse
- 29: 14(bool) ConstantTrue
- 30: 15(bvec2) ConstantComposite 28 29
- 34: TypeInt 32 1
- 35: TypePointer Function 34(int)
- 37: TypePointer UniformConstant 34(int)
-38(uniform_medium): 37(ptr) Variable UniformConstant
-40(uniform_high): 37(ptr) Variable UniformConstant
- 46(uniform_low): 37(ptr) Variable UniformConstant
- 50: TypePointer Function 6(float)
- 52: 6(float) Constant 1078774989
- 54: 6(float) Constant 1232730691
- 56: TypePointer Input 6(float)
- 57(lowfin): 56(ptr) Variable Input
- 59(mediumfin): 56(ptr) Variable Input
- 62: TypePointer Private 6(float)
-63(global_highp): 62(ptr) Variable Private
- 66: TypePointer Function 21(fvec4)
- 70: TypePointer Output 21(fvec4)
- 71(mediumfout): 70(ptr) Variable Output
- 80: 34(int) Constant 4
- 82: TypeVector 34(int) 2
- 90: TypeInt 32 0
- 91: 90(int) Constant 0
- 101: TypePointer UniformConstant 15(bvec2)
- 102(ub2): 101(ptr) Variable UniformConstant
- 109: 6(float) Constant 1065353216
+ 29: 14(bool) ConstantFalse
+ 30: 14(bool) ConstantTrue
+ 31: 15(bvec2) ConstantComposite 29 30
+ 36: TypeInt 32 1
+ 37: TypePointer Function 36(int)
+ 39: TypePointer UniformConstant 36(int)
+40(uniform_medium): 39(ptr) Variable UniformConstant
+42(uniform_high): 39(ptr) Variable UniformConstant
+ 48(uniform_low): 39(ptr) Variable UniformConstant
+ 52: TypePointer Function 6(float)
+ 54: 6(float) Constant 1078774989
+ 56: 6(float) Constant 1232730691
+ 58: TypePointer Input 6(float)
+ 59(lowfin): 58(ptr) Variable Input
+ 61(mediumfin): 58(ptr) Variable Input
+ 64: TypePointer Private 6(float)
+65(global_highp): 64(ptr) Variable Private
+ 68: TypePointer Function 21(fvec4)
+ 72: TypePointer Output 21(fvec4)
+ 73(mediumfout): 72(ptr) Variable Output
+ 82: 36(int) Constant 4
+ 84: TypeVector 36(int) 2
+ 92: TypeInt 32 0
+ 93: 92(int) Constant 0
+ 103: TypePointer UniformConstant 15(bvec2)
+ 104(ub2): 103(ptr) Variable UniformConstant
+ 111: 6(float) Constant 1065353216
4(main): 2 Function None 3
5: Label
- 36(sum): 35(ptr) Variable Function
- 51(arg1): 50(ptr) Variable Function
- 53(arg2): 50(ptr) Variable Function
- 55(d): 50(ptr) Variable Function
- 67(local_highp): 66(ptr) Variable Function
- 103(param): 16(ptr) Variable Function
- 39: 34(int) Load 38(uniform_medium)
- 41: 34(int) Load 40(uniform_high)
- 42: 34(int) IAdd 39 41
- Store 36(sum) 42
- 43: 34(int) Load 40(uniform_high)
- 44: 34(int) Load 36(sum)
- 45: 34(int) IAdd 44 43
- Store 36(sum) 45
- 47: 34(int) Load 46(uniform_low)
- 48: 34(int) Load 36(sum)
- 49: 34(int) IAdd 48 47
- Store 36(sum) 49
- Store 51(arg1) 52
- Store 53(arg2) 54
- 58: 6(float) Load 57(lowfin)
- 60: 6(float) Load 59(mediumfin)
- 61: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 58 60
- Store 55(d) 61
- 64: 21(fvec4) Load 23(highfin)
- 65: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 64
- Store 63(global_highp) 65
- 68: 6(float) Load 63(global_highp)
- 69: 21(fvec4) CompositeConstruct 68 68 68 68
- Store 67(local_highp) 69
- 72: 6(float) Load 55(d)
- 73: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 72
- 74: 21(fvec4) CompositeConstruct 73 73 73 73
- 75: 6(float) Load 53(arg2)
+ 38(sum): 37(ptr) Variable Function
+ 53(arg1): 52(ptr) Variable Function
+ 55(arg2): 52(ptr) Variable Function
+ 57(d): 52(ptr) Variable Function
+ 69(local_highp): 68(ptr) Variable Function
+ 105(param): 16(ptr) Variable Function
+ 41: 36(int) Load 40(uniform_medium)
+ 43: 36(int) Load 42(uniform_high)
+ 44: 36(int) IAdd 41 43
+ Store 38(sum) 44
+ 45: 36(int) Load 42(uniform_high)
+ 46: 36(int) Load 38(sum)
+ 47: 36(int) IAdd 46 45
+ Store 38(sum) 47
+ 49: 36(int) Load 48(uniform_low)
+ 50: 36(int) Load 38(sum)
+ 51: 36(int) IAdd 50 49
+ Store 38(sum) 51
+ Store 53(arg1) 54
+ Store 55(arg2) 56
+ 60: 6(float) Load 59(lowfin)
+ 62: 6(float) Load 61(mediumfin)
+ 63: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 60 62
+ Store 57(d) 63
+ 66: 21(fvec4) Load 23(highfin)
+ 67: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 66
+ Store 65(global_highp) 67
+ 70: 6(float) Load 65(global_highp)
+ 71: 21(fvec4) CompositeConstruct 70 70 70 70
+ Store 69(local_highp) 71
+ 74: 6(float) Load 57(d)
+ 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
76: 21(fvec4) CompositeConstruct 75 75 75 75
- 77: 21(fvec4) FAdd 74 76
- 78: 21(fvec4) Load 67(local_highp)
- 79: 21(fvec4) FAdd 77 78
- Store 71(mediumfout) 79
- 81: 34(int) Load 46(uniform_low)
- 83: 82(ivec2) CompositeConstruct 81 81
- 84: 34(int) Load 40(uniform_high)
- 85: 82(ivec2) CompositeConstruct 84 84
- 86: 82(ivec2) IMul 83 85
- 87: 34(int) Load 40(uniform_high)
- 88: 82(ivec2) CompositeConstruct 87 87
- 89: 82(ivec2) IAdd 86 88
- 92: 34(int) CompositeExtract 89 0
- 93: 34(int) IAdd 80 92
- 94: 34(int) Load 36(sum)
- 95: 34(int) IAdd 94 93
- Store 36(sum) 95
- 96: 34(int) Load 36(sum)
- 97: 6(float) ConvertSToF 96
- 98: 21(fvec4) CompositeConstruct 97 97 97 97
- 99: 21(fvec4) Load 71(mediumfout)
- 100: 21(fvec4) FAdd 99 98
- Store 71(mediumfout) 100
- 104: 15(bvec2) Load 102(ub2)
- Store 103(param) 104
- 105: 14(bool) FunctionCall 19(boolfun(vb2;) 103(param)
- SelectionMerge 107 None
- BranchConditional 105 106 107
- 106: Label
- 108: 21(fvec4) Load 71(mediumfout)
- 110: 21(fvec4) CompositeConstruct 109 109 109 109
- 111: 21(fvec4) FAdd 108 110
- Store 71(mediumfout) 111
- Branch 107
- 107: Label
+ 77: 6(float) Load 55(arg2)
+ 78: 21(fvec4) CompositeConstruct 77 77 77 77
+ 79: 21(fvec4) FAdd 76 78
+ 80: 21(fvec4) Load 69(local_highp)
+ 81: 21(fvec4) FAdd 79 80
+ Store 73(mediumfout) 81
+ 83: 36(int) Load 48(uniform_low)
+ 85: 84(ivec2) CompositeConstruct 83 83
+ 86: 36(int) Load 42(uniform_high)
+ 87: 84(ivec2) CompositeConstruct 86 86
+ 88: 84(ivec2) IMul 85 87
+ 89: 36(int) Load 42(uniform_high)
+ 90: 84(ivec2) CompositeConstruct 89 89
+ 91: 84(ivec2) IAdd 88 90
+ 94: 36(int) CompositeExtract 91 0
+ 95: 36(int) IAdd 82 94
+ 96: 36(int) Load 38(sum)
+ 97: 36(int) IAdd 96 95
+ Store 38(sum) 97
+ 98: 36(int) Load 38(sum)
+ 99: 6(float) ConvertSToF 98
+ 100: 21(fvec4) CompositeConstruct 99 99 99 99
+ 101: 21(fvec4) Load 73(mediumfout)
+ 102: 21(fvec4) FAdd 101 100
+ Store 73(mediumfout) 102
+ 106: 15(bvec2) Load 104(ub2)
+ Store 105(param) 106
+ 107: 14(bool) FunctionCall 19(boolfun(vb2;) 105(param)
+ SelectionMerge 109 None
+ BranchConditional 107 108 109
+ 108: Label
+ 110: 21(fvec4) Load 73(mediumfout)
+ 112: 21(fvec4) CompositeConstruct 111 111 111 111
+ 113: 21(fvec4) FAdd 110 112
+ Store 73(mediumfout) 113
+ Branch 109
+ 109: Label
Return
FunctionEnd
12(foo(vf3;): 9(fvec2) Function None 10
@@ -167,8 +167,8 @@ Linked fragment stage:
19(boolfun(vb2;): 14(bool) Function None 17
18(bv2): 16(ptr) FunctionParameter
20: Label
- 27: 15(bvec2) Load 18(bv2)
- 31: 15(bvec2) LogicalEqual 27 30
- 32: 14(bool) All 31
- ReturnValue 32
+ 28: 15(bvec2) Load 18(bv2)
+ 32: 15(bvec2) LogicalEqual 28 31
+ 33: 14(bool) All 32
+ ReturnValue 33
FunctionEnd
diff --git a/Test/baseResults/spv.shortCircuit.frag.out b/Test/baseResults/spv.shortCircuit.frag.out
index bbe719f9..008f9705 100644
--- a/Test/baseResults/spv.shortCircuit.frag.out
+++ b/Test/baseResults/spv.shortCircuit.frag.out
@@ -7,26 +7,26 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 143
+// Id's are bound by 144
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 12 23
+ EntryPoint Fragment 4 "main" 12 24
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Name 4 "main"
Name 8 "foo("
Name 12 "of1"
- Name 23 "of4"
- Name 26 "ub"
- Name 30 "ui"
- Name 40 "uba"
- Name 109 "uf"
- Name 136 "uiv4"
- Name 138 "uv4"
- Name 141 "ub41"
- Name 142 "ub42"
+ Name 24 "of4"
+ Name 27 "ub"
+ Name 31 "ui"
+ Name 41 "uba"
+ Name 110 "uf"
+ Name 137 "uiv4"
+ Name 139 "uv4"
+ Name 142 "ub41"
+ Name 143 "ub42"
2: TypeVoid
3: TypeFunction 2
6: TypeBool
@@ -36,190 +36,190 @@ Linked fragment stage:
12(of1): 11(ptr) Variable Output
14: 10(float) Constant 1065353216
17: 10(float) Constant 1092616192
- 20: 10(float) Constant 0
- 21: TypeVector 10(float) 4
- 22: TypePointer Output 21(fvec4)
- 23(of4): 22(ptr) Variable Output
- 24: 21(fvec4) ConstantComposite 20 20 20 20
- 25: TypePointer UniformConstant 6(bool)
- 26(ub): 25(ptr) Variable UniformConstant
- 28: TypeInt 32 1
- 29: TypePointer UniformConstant 28(int)
- 30(ui): 29(ptr) Variable UniformConstant
- 32: 28(int) Constant 2
- 40(uba): 25(ptr) Variable UniformConstant
- 108: TypePointer UniformConstant 10(float)
- 109(uf): 108(ptr) Variable UniformConstant
- 112: 10(float) Constant 1082130432
- 134: TypeVector 28(int) 4
- 135: TypePointer UniformConstant 134(ivec4)
- 136(uiv4): 135(ptr) Variable UniformConstant
- 137: TypePointer UniformConstant 21(fvec4)
- 138(uv4): 137(ptr) Variable UniformConstant
- 139: TypeVector 6(bool) 4
- 140: TypePointer UniformConstant 139(bvec4)
- 141(ub41): 140(ptr) Variable UniformConstant
- 142(ub42): 140(ptr) Variable UniformConstant
+ 21: 10(float) Constant 0
+ 22: TypeVector 10(float) 4
+ 23: TypePointer Output 22(fvec4)
+ 24(of4): 23(ptr) Variable Output
+ 25: 22(fvec4) ConstantComposite 21 21 21 21
+ 26: TypePointer UniformConstant 6(bool)
+ 27(ub): 26(ptr) Variable UniformConstant
+ 29: TypeInt 32 1
+ 30: TypePointer UniformConstant 29(int)
+ 31(ui): 30(ptr) Variable UniformConstant
+ 33: 29(int) Constant 2
+ 41(uba): 26(ptr) Variable UniformConstant
+ 109: TypePointer UniformConstant 10(float)
+ 110(uf): 109(ptr) Variable UniformConstant
+ 113: 10(float) Constant 1082130432
+ 135: TypeVector 29(int) 4
+ 136: TypePointer UniformConstant 135(ivec4)
+ 137(uiv4): 136(ptr) Variable UniformConstant
+ 138: TypePointer UniformConstant 22(fvec4)
+ 139(uv4): 138(ptr) Variable UniformConstant
+ 140: TypeVector 6(bool) 4
+ 141: TypePointer UniformConstant 140(bvec4)
+ 142(ub41): 141(ptr) Variable UniformConstant
+ 143(ub42): 141(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- Store 12(of1) 20
- Store 23(of4) 24
- 27: 6(bool) Load 26(ub)
- 31: 28(int) Load 30(ui)
- 33: 6(bool) SGreaterThan 31 32
- 34: 6(bool) LogicalOr 27 33
- SelectionMerge 36 None
- BranchConditional 34 35 36
- 35: Label
- 37: 10(float) Load 12(of1)
- 38: 10(float) FAdd 37 14
- Store 12(of1) 38
- Branch 36
- 36: Label
- 39: 6(bool) Load 26(ub)
- 41: 6(bool) Load 40(uba)
- 42: 6(bool) LogicalNot 41
- 43: 6(bool) LogicalAnd 39 42
- SelectionMerge 45 None
- BranchConditional 43 44 45
- 44: Label
- 46: 10(float) Load 12(of1)
- 47: 10(float) FAdd 46 14
- Store 12(of1) 47
- Branch 45
- 45: Label
- 48: 6(bool) Load 26(ub)
- 49: 6(bool) LogicalNot 48
- SelectionMerge 51 None
- BranchConditional 49 50 51
- 50: Label
- 52: 6(bool) FunctionCall 8(foo()
- Branch 51
- 51: Label
- 53: 6(bool) Phi 48 45 52 50
- SelectionMerge 55 None
- BranchConditional 53 54 55
- 54: Label
- 56: 10(float) Load 12(of1)
- 57: 10(float) FAdd 56 14
- Store 12(of1) 57
- Branch 55
- 55: Label
- 58: 6(bool) Load 26(ub)
- SelectionMerge 60 None
- BranchConditional 58 59 60
- 59: Label
- 61: 6(bool) FunctionCall 8(foo()
- Branch 60
- 60: Label
- 62: 6(bool) Phi 58 55 61 59
- SelectionMerge 64 None
- BranchConditional 62 63 64
- 63: Label
- 65: 10(float) Load 12(of1)
- 66: 10(float) FAdd 65 14
- Store 12(of1) 66
- Branch 64
- 64: Label
- 67: 6(bool) FunctionCall 8(foo()
- 68: 6(bool) Load 26(ub)
- 69: 6(bool) LogicalOr 67 68
- SelectionMerge 71 None
- BranchConditional 69 70 71
- 70: Label
- 72: 10(float) Load 12(of1)
- 73: 10(float) FAdd 72 14
- Store 12(of1) 73
- Branch 71
- 71: Label
- 74: 6(bool) FunctionCall 8(foo()
- 75: 6(bool) Load 26(ub)
- 76: 6(bool) LogicalAnd 74 75
- SelectionMerge 78 None
- BranchConditional 76 77 78
- 77: Label
- 79: 10(float) Load 12(of1)
- 80: 10(float) FAdd 79 14
- Store 12(of1) 80
- Branch 78
- 78: Label
- 81: 6(bool) Load 26(ub)
- 82: 6(bool) LogicalNot 81
- SelectionMerge 84 None
- BranchConditional 82 83 84
- 83: Label
- 85: 10(float) Load 12(of1)
- 86: 10(float) FAdd 85 14
- Store 12(of1) 86
- 87: 6(bool) FOrdGreaterThan 86 14
- Branch 84
- 84: Label
- 88: 6(bool) Phi 81 78 87 83
- SelectionMerge 90 None
- BranchConditional 88 89 90
- 89: Label
- 91: 21(fvec4) Load 23(of4)
- 92: 21(fvec4) CompositeConstruct 14 14 14 14
- 93: 21(fvec4) FAdd 91 92
- Store 23(of4) 93
- Branch 90
- 90: Label
- 94: 10(float) Load 12(of1)
- 95: 10(float) FAdd 94 14
- Store 12(of1) 95
- 96: 6(bool) FOrdGreaterThan 95 14
- 97: 6(bool) Load 26(ub)
- 98: 6(bool) LogicalOr 96 97
- SelectionMerge 100 None
- BranchConditional 98 99 100
- 99: Label
- 101: 21(fvec4) Load 23(of4)
- 102: 21(fvec4) CompositeConstruct 14 14 14 14
- 103: 21(fvec4) FAdd 101 102
- Store 23(of4) 103
- Branch 100
- 100: Label
- 104: 6(bool) Load 26(ub)
- 105: 6(bool) LogicalNot 104
- SelectionMerge 107 None
- BranchConditional 105 106 107
- 106: Label
- 110: 10(float) Load 109(uf)
- 111: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 110
- 113: 10(float) FMul 111 112
- 114: 10(float) Load 12(of1)
- 115: 6(bool) FOrdGreaterThan 113 114
- Branch 107
- 107: Label
- 116: 6(bool) Phi 104 100 115 106
- SelectionMerge 118 None
- BranchConditional 116 117 118
- 117: Label
- 119: 10(float) Load 12(of1)
- 120: 10(float) FAdd 119 14
- Store 12(of1) 120
- Branch 118
- 118: Label
- 121: 6(bool) Load 26(ub)
- SelectionMerge 123 None
- BranchConditional 121 122 123
- 122: Label
- 124: 10(float) Load 109(uf)
- 125: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 124
- 126: 10(float) FMul 125 112
- 127: 10(float) Load 12(of1)
- 128: 6(bool) FOrdGreaterThan 126 127
- Branch 123
- 123: Label
- 129: 6(bool) Phi 121 118 128 122
- SelectionMerge 131 None
- BranchConditional 129 130 131
- 130: Label
- 132: 10(float) Load 12(of1)
- 133: 10(float) FAdd 132 14
- Store 12(of1) 133
- Branch 131
- 131: Label
+ Store 12(of1) 21
+ Store 24(of4) 25
+ 28: 6(bool) Load 27(ub)
+ 32: 29(int) Load 31(ui)
+ 34: 6(bool) SGreaterThan 32 33
+ 35: 6(bool) LogicalOr 28 34
+ SelectionMerge 37 None
+ BranchConditional 35 36 37
+ 36: Label
+ 38: 10(float) Load 12(of1)
+ 39: 10(float) FAdd 38 14
+ Store 12(of1) 39
+ Branch 37
+ 37: Label
+ 40: 6(bool) Load 27(ub)
+ 42: 6(bool) Load 41(uba)
+ 43: 6(bool) LogicalNot 42
+ 44: 6(bool) LogicalAnd 40 43
+ SelectionMerge 46 None
+ BranchConditional 44 45 46
+ 45: Label
+ 47: 10(float) Load 12(of1)
+ 48: 10(float) FAdd 47 14
+ Store 12(of1) 48
+ Branch 46
+ 46: Label
+ 49: 6(bool) Load 27(ub)
+ 50: 6(bool) LogicalNot 49
+ SelectionMerge 52 None
+ BranchConditional 50 51 52
+ 51: Label
+ 53: 6(bool) FunctionCall 8(foo()
+ Branch 52
+ 52: Label
+ 54: 6(bool) Phi 49 46 53 51
+ SelectionMerge 56 None
+ BranchConditional 54 55 56
+ 55: Label
+ 57: 10(float) Load 12(of1)
+ 58: 10(float) FAdd 57 14
+ Store 12(of1) 58
+ Branch 56
+ 56: Label
+ 59: 6(bool) Load 27(ub)
+ SelectionMerge 61 None
+ BranchConditional 59 60 61
+ 60: Label
+ 62: 6(bool) FunctionCall 8(foo()
+ Branch 61
+ 61: Label
+ 63: 6(bool) Phi 59 56 62 60
+ SelectionMerge 65 None
+ BranchConditional 63 64 65
+ 64: Label
+ 66: 10(float) Load 12(of1)
+ 67: 10(float) FAdd 66 14
+ Store 12(of1) 67
+ Branch 65
+ 65: Label
+ 68: 6(bool) FunctionCall 8(foo()
+ 69: 6(bool) Load 27(ub)
+ 70: 6(bool) LogicalOr 68 69
+ SelectionMerge 72 None
+ BranchConditional 70 71 72
+ 71: Label
+ 73: 10(float) Load 12(of1)
+ 74: 10(float) FAdd 73 14
+ Store 12(of1) 74
+ Branch 72
+ 72: Label
+ 75: 6(bool) FunctionCall 8(foo()
+ 76: 6(bool) Load 27(ub)
+ 77: 6(bool) LogicalAnd 75 76
+ SelectionMerge 79 None
+ BranchConditional 77 78 79
+ 78: Label
+ 80: 10(float) Load 12(of1)
+ 81: 10(float) FAdd 80 14
+ Store 12(of1) 81
+ Branch 79
+ 79: Label
+ 82: 6(bool) Load 27(ub)
+ 83: 6(bool) LogicalNot 82
+ SelectionMerge 85 None
+ BranchConditional 83 84 85
+ 84: Label
+ 86: 10(float) Load 12(of1)
+ 87: 10(float) FAdd 86 14
+ Store 12(of1) 87
+ 88: 6(bool) FOrdGreaterThan 87 14
+ Branch 85
+ 85: Label
+ 89: 6(bool) Phi 82 79 88 84
+ SelectionMerge 91 None
+ BranchConditional 89 90 91
+ 90: Label
+ 92: 22(fvec4) Load 24(of4)
+ 93: 22(fvec4) CompositeConstruct 14 14 14 14
+ 94: 22(fvec4) FAdd 92 93
+ Store 24(of4) 94
+ Branch 91
+ 91: Label
+ 95: 10(float) Load 12(of1)
+ 96: 10(float) FAdd 95 14
+ Store 12(of1) 96
+ 97: 6(bool) FOrdGreaterThan 96 14
+ 98: 6(bool) Load 27(ub)
+ 99: 6(bool) LogicalOr 97 98
+ SelectionMerge 101 None
+ BranchConditional 99 100 101
+ 100: Label
+ 102: 22(fvec4) Load 24(of4)
+ 103: 22(fvec4) CompositeConstruct 14 14 14 14
+ 104: 22(fvec4) FAdd 102 103
+ Store 24(of4) 104
+ Branch 101
+ 101: Label
+ 105: 6(bool) Load 27(ub)
+ 106: 6(bool) LogicalNot 105
+ SelectionMerge 108 None
+ BranchConditional 106 107 108
+ 107: Label
+ 111: 10(float) Load 110(uf)
+ 112: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 111
+ 114: 10(float) FMul 112 113
+ 115: 10(float) Load 12(of1)
+ 116: 6(bool) FOrdGreaterThan 114 115
+ Branch 108
+ 108: Label
+ 117: 6(bool) Phi 105 101 116 107
+ SelectionMerge 119 None
+ BranchConditional 117 118 119
+ 118: Label
+ 120: 10(float) Load 12(of1)
+ 121: 10(float) FAdd 120 14
+ Store 12(of1) 121
+ Branch 119
+ 119: Label
+ 122: 6(bool) Load 27(ub)
+ SelectionMerge 124 None
+ BranchConditional 122 123 124
+ 123: Label
+ 125: 10(float) Load 110(uf)
+ 126: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 125
+ 127: 10(float) FMul 126 113
+ 128: 10(float) Load 12(of1)
+ 129: 6(bool) FOrdGreaterThan 127 128
+ Branch 124
+ 124: Label
+ 130: 6(bool) Phi 122 119 129 123
+ SelectionMerge 132 None
+ BranchConditional 130 131 132
+ 131: Label
+ 133: 10(float) Load 12(of1)
+ 134: 10(float) FAdd 133 14
+ Store 12(of1) 134
+ Branch 132
+ 132: Label
Return
FunctionEnd
8(foo(): 6(bool) Function None 7
diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out
index 1a41f6ad..34bdae06 100755
--- a/Test/baseResults/spv.simpleFunctionCall.frag.out
+++ b/Test/baseResults/spv.simpleFunctionCall.frag.out
@@ -7,20 +7,20 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 22
+// Id's are bound by 23
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 12 16
+ EntryPoint Fragment 4 "main" 12 17
ExecutionMode 4 OriginLowerLeft
Source GLSL 150
Name 4 "main"
Name 9 "foo("
Name 12 "BaseColor"
- Name 16 "gl_FragColor"
- Name 19 "bigColor"
- Name 21 "d"
+ Name 17 "gl_FragColor"
+ Name 20 "bigColor"
+ Name 22 "d"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -28,16 +28,16 @@ Linked fragment stage:
8: TypeFunction 7(fvec4)
11: TypePointer Input 7(fvec4)
12(BaseColor): 11(ptr) Variable Input
- 15: TypePointer Output 7(fvec4)
-16(gl_FragColor): 15(ptr) Variable Output
- 18: TypePointer UniformConstant 7(fvec4)
- 19(bigColor): 18(ptr) Variable UniformConstant
- 20: TypePointer UniformConstant 6(float)
- 21(d): 20(ptr) Variable UniformConstant
+ 16: TypePointer Output 7(fvec4)
+17(gl_FragColor): 16(ptr) Variable Output
+ 19: TypePointer UniformConstant 7(fvec4)
+ 20(bigColor): 19(ptr) Variable UniformConstant
+ 21: TypePointer UniformConstant 6(float)
+ 22(d): 21(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
- 17: 7(fvec4) FunctionCall 9(foo()
- Store 16(gl_FragColor) 17
+ 18: 7(fvec4) FunctionCall 9(foo()
+ Store 17(gl_FragColor) 18
Return
FunctionEnd
9(foo(): 7(fvec4) Function None 8
diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out
index ecee9304..efd2df07 100755
--- a/Test/baseResults/spv.switch.frag.out
+++ b/Test/baseResults/spv.switch.frag.out
@@ -10,12 +10,12 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
-// Id's are bound by 265
+// Id's are bound by 267
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
- EntryPoint Fragment 4 "main" 73 223
+ EntryPoint Fragment 4 "main" 75 225
ExecutionMode 4 OriginLowerLeft
Source ESSL 310
Name 4 "main"
@@ -27,30 +27,30 @@ Linked fragment stage:
Name 17 "v1"
Name 18 "v2"
Name 19 "i1"
- Name 58 "local"
- Name 60 "c"
- Name 71 "f"
- Name 73 "x"
- Name 127 "d"
- Name 153 "i"
- Name 172 "j"
- Name 223 "color"
- Name 229 "v"
- Name 230 "param"
+ Name 60 "local"
+ Name 62 "c"
+ Name 73 "f"
+ Name 75 "x"
+ Name 129 "d"
+ Name 155 "i"
+ Name 174 "j"
+ Name 225 "color"
+ Name 231 "v"
Name 232 "param"
Name 234 "param"
- Name 242 "param"
+ Name 236 "param"
Name 244 "param"
Name 246 "param"
- Decorate 58(local) RelaxedPrecision
- Decorate 60(c) RelaxedPrecision
- Decorate 71(f) RelaxedPrecision
- Decorate 73(x) RelaxedPrecision
- Decorate 127(d) RelaxedPrecision
- Decorate 153(i) RelaxedPrecision
- Decorate 172(j) RelaxedPrecision
- Decorate 223(color) RelaxedPrecision
- Decorate 229(v) RelaxedPrecision
+ Name 248 "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 174(j) RelaxedPrecision
+ Decorate 225(color) RelaxedPrecision
+ Decorate 231(v) RelaxedPrecision
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -61,291 +61,291 @@ Linked fragment stage:
11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr)
36: 6(float) Constant 0
37: 7(fvec4) ConstantComposite 36 36 36 36
- 47: 6(float) Constant 1065353216
- 48: 7(fvec4) ConstantComposite 47 47 47 47
- 59: TypePointer UniformConstant 9(int)
- 60(c): 59(ptr) Variable UniformConstant
- 63: 9(int) Constant 1
- 70: TypePointer Function 6(float)
- 72: TypePointer Input 6(float)
- 73(x): 72(ptr) Variable Input
- 127(d): 59(ptr) Variable UniformConstant
- 154: 9(int) Constant 0
- 160: 9(int) Constant 10
- 161: TypeBool
- 173: 9(int) Constant 20
- 179: 9(int) Constant 30
- 184: 6(float) Constant 1120429670
- 204: 6(float) Constant 1079739679
- 222: TypePointer Output 6(float)
- 223(color): 222(ptr) Variable Output
- 228: TypePointer UniformConstant 7(fvec4)
- 229(v): 228(ptr) Variable UniformConstant
- 237: TypeInt 32 0
- 238: 237(int) Constant 1
- 249: 237(int) Constant 2
+ 48: 6(float) Constant 1065353216
+ 49: 7(fvec4) ConstantComposite 48 48 48 48
+ 61: TypePointer UniformConstant 9(int)
+ 62(c): 61(ptr) Variable UniformConstant
+ 65: 9(int) Constant 1
+ 72: TypePointer Function 6(float)
+ 74: TypePointer Input 6(float)
+ 75(x): 74(ptr) Variable Input
+ 129(d): 61(ptr) Variable UniformConstant
+ 156: 9(int) Constant 0
+ 162: 9(int) Constant 10
+ 163: TypeBool
+ 175: 9(int) Constant 20
+ 181: 9(int) Constant 30
+ 186: 6(float) Constant 1120429670
+ 206: 6(float) Constant 1079739679
+ 224: TypePointer Output 6(float)
+ 225(color): 224(ptr) Variable Output
+ 230: TypePointer UniformConstant 7(fvec4)
+ 231(v): 230(ptr) Variable UniformConstant
+ 239: TypeInt 32 0
+ 240: 239(int) Constant 1
+ 251: 239(int) Constant 2
4(main): 2 Function None 3
5: Label
- 58(local): 10(ptr) Variable Function
- 71(f): 70(ptr) Variable Function
- 153(i): 10(ptr) Variable Function
- 172(j): 10(ptr) Variable Function
- 230(param): 8(ptr) Variable Function
+ 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
- 234(param): 10(ptr) Variable Function
- 242(param): 8(ptr) Variable Function
+ 234(param): 8(ptr) Variable Function
+ 236(param): 10(ptr) Variable Function
244(param): 8(ptr) Variable Function
- 246(param): 10(ptr) Variable Function
- 61: 9(int) Load 60(c)
- Store 58(local) 61
- 62: 9(int) Load 58(local)
- 64: 9(int) IAdd 62 63
- Store 58(local) 64
- 65: 9(int) Load 60(c)
- SelectionMerge 69 None
- Switch 65 68
- case 1: 66
- case 2: 67
+ 246(param): 8(ptr) Variable Function
+ 248(param): 10(ptr) Variable Function
+ 63: 9(int) Load 62(c)
+ Store 60(local) 63
+ 64: 9(int) Load 60(local)
+ 66: 9(int) IAdd 64 65
+ Store 60(local) 66
+ 67: 9(int) Load 62(c)
+ SelectionMerge 71 None
+ Switch 67 70
+ case 1: 68
+ case 2: 69
+ 70: Label
+ 82: 6(float) Load 75(x)
+ 83: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 82
+ Store 73(f) 83
+ Branch 71
68: Label
- 80: 6(float) Load 73(x)
- 81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80
- Store 71(f) 81
- Branch 69
- 66: Label
- 74: 6(float) Load 73(x)
- 75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
- Store 71(f) 75
- Branch 69
- 67: Label
- 77: 6(float) Load 73(x)
- 78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77
- Store 71(f) 78
- Branch 69
- 69: Label
- 83: 9(int) Load 60(c)
- SelectionMerge 87 None
- Switch 83 86
- case 1: 84
- case 2: 85
+ 76: 6(float) Load 75(x)
+ 77: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 76
+ Store 73(f) 77
+ Branch 71
+ 69: Label
+ 79: 6(float) Load 75(x)
+ 80: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 79
+ Store 73(f) 80
+ Branch 71
+ 71: Label
+ 85: 9(int) Load 62(c)
+ SelectionMerge 89 None
+ Switch 85 88
+ case 1: 86
+ case 2: 87
+ 88: Label
+ 99: 6(float) Load 75(x)
+ 100: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 99
+ 101: 6(float) Load 73(f)
+ 102: 6(float) FAdd 101 100
+ Store 73(f) 102
+ Branch 89
86: Label
- 97: 6(float) Load 73(x)
- 98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97
- 99: 6(float) Load 71(f)
- 100: 6(float) FAdd 99 98
- Store 71(f) 100
+ 90: 6(float) Load 75(x)
+ 91: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 90
+ 92: 6(float) Load 73(f)
+ 93: 6(float) FAdd 92 91
+ Store 73(f) 93
Branch 87
- 84: Label
- 88: 6(float) Load 73(x)
- 89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88
- 90: 6(float) Load 71(f)
- 91: 6(float) FAdd 90 89
- Store 71(f) 91
- Branch 85
- 85: Label
- 92: 6(float) Load 73(x)
- 93: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 92
- 94: 6(float) Load 71(f)
- 95: 6(float) FAdd 94 93
- Store 71(f) 95
- Branch 87
- 87: Label
- 102: 9(int) Load 60(c)
- SelectionMerge 105 None
- Switch 102 105
- case 1: 103
- case 2: 104
- 103: Label
- 106: 6(float) Load 73(x)
- 107: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 106
- 108: 6(float) Load 71(f)
- 109: 6(float) FAdd 108 107
- Store 71(f) 109
- Branch 105
- 104: Label
- 111: 6(float) Load 73(x)
- 112: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 111
- 113: 6(float) Load 71(f)
- 114: 6(float) FAdd 113 112
- Store 71(f) 114
- Branch 105
- 105: Label
- 117: 9(int) Load 60(c)
- SelectionMerge 121 None
- Switch 117 120
- case 1: 118
- case 2: 119
+ 87: Label
+ 94: 6(float) Load 75(x)
+ 95: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 94
+ 96: 6(float) Load 73(f)
+ 97: 6(float) FAdd 96 95
+ Store 73(f) 97
+ Branch 89
+ 89: Label
+ 104: 9(int) Load 62(c)
+ SelectionMerge 107 None
+ Switch 104 107
+ case 1: 105
+ case 2: 106
+ 105: Label
+ 108: 6(float) Load 75(x)
+ 109: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 108
+ 110: 6(float) Load 73(f)
+ 111: 6(float) FAdd 110 109
+ Store 73(f) 111
+ Branch 107
+ 106: Label
+ 113: 6(float) Load 75(x)
+ 114: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 113
+ 115: 6(float) Load 73(f)
+ 116: 6(float) FAdd 115 114
+ Store 73(f) 116
+ Branch 107
+ 107: Label
+ 119: 9(int) Load 62(c)
+ SelectionMerge 123 None
+ Switch 119 122
+ case 1: 120
+ case 2: 121
+ 122: Label
+ 150: 6(float) Load 75(x)
+ 151: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 150
+ 152: 6(float) Load 73(f)
+ 153: 6(float) FAdd 152 151
+ Store 73(f) 153
+ Branch 123
120: Label
- 148: 6(float) Load 73(x)
- 149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148
- 150: 6(float) Load 71(f)
- 151: 6(float) FAdd 150 149
- Store 71(f) 151
- Branch 121
- 118: Label
- 122: 6(float) Load 73(x)
- 123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122
- 124: 6(float) Load 71(f)
- 125: 6(float) FAdd 124 123
- Store 71(f) 125
- Branch 121
- 119: Label
- 128: 9(int) Load 127(d)
- SelectionMerge 131 None
- Switch 128 131
- case 1: 129
- case 2: 130
- 129: Label
- 132: 6(float) Load 73(x)
- 133: 6(float) Load 73(x)
- 134: 6(float) FMul 132 133
- 135: 6(float) Load 73(x)
+ 124: 6(float) Load 75(x)
+ 125: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 124
+ 126: 6(float) Load 73(f)
+ 127: 6(float) FAdd 126 125
+ Store 73(f) 127
+ Branch 123
+ 121: Label
+ 130: 9(int) Load 129(d)
+ SelectionMerge 133 None
+ Switch 130 133
+ case 1: 131
+ case 2: 132
+ 131: Label
+ 134: 6(float) Load 75(x)
+ 135: 6(float) Load 75(x)
136: 6(float) FMul 134 135
- 137: 6(float) Load 71(f)
- 138: 6(float) FAdd 137 136
- Store 71(f) 138
- Branch 131
- 130: Label
- 140: 6(float) Load 73(x)
- 141: 6(float) Load 73(x)
- 142: 6(float) FMul 140 141
- 143: 6(float) Load 71(f)
- 144: 6(float) FAdd 143 142
- Store 71(f) 144
- Branch 131
- 131: Label
- Branch 121
- 121: Label
- Store 153(i) 154
- Branch 155
- 155: Label
- 159: 9(int) Load 153(i)
- 162: 161(bool) SLessThan 159 160
- LoopMerge 157 158 None
- BranchConditional 162 156 157
- 156: Label
- 163: 9(int) Load 60(c)
- SelectionMerge 167 None
- Switch 163 166
- case 1: 164
- case 2: 165
+ 137: 6(float) Load 75(x)
+ 138: 6(float) FMul 136 137
+ 139: 6(float) Load 73(f)
+ 140: 6(float) FAdd 139 138
+ Store 73(f) 140
+ Branch 133
+ 132: Label
+ 142: 6(float) Load 75(x)
+ 143: 6(float) Load 75(x)
+ 144: 6(float) FMul 142 143
+ 145: 6(float) Load 73(f)
+ 146: 6(float) FAdd 145 144
+ Store 73(f) 146
+ Branch 133
+ 133: Label
+ Branch 123
+ 123: Label
+ 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
+ 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
- 198: 6(float) Load 73(x)
- 199: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 198
- 200: 6(float) Load 71(f)
- 201: 6(float) FAdd 200 199
- Store 71(f) 201
- Branch 167
- 164: Label
- 168: 6(float) Load 73(x)
- 169: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 168
- 170: 6(float) Load 71(f)
- 171: 6(float) FAdd 170 169
- Store 71(f) 171
- Store 172(j) 173
- Branch 174
- 174: Label
- 178: 9(int) Load 172(j)
- 180: 161(bool) SLessThan 178 179
- LoopMerge 176 177 None
- BranchConditional 180 175 176
- 175: Label
- 181: 6(float) Load 71(f)
- 182: 6(float) FAdd 181 47
- Store 71(f) 182
- 183: 6(float) Load 71(f)
- 185: 161(bool) FOrdLessThan 183 184
- SelectionMerge 187 None
- BranchConditional 185 186 187
- 186: Label
- Branch 176
- 187: Label
- Branch 177
- 177: Label
- 189: 9(int) Load 172(j)
- 190: 9(int) IAdd 189 63
- Store 172(j) 190
- Branch 174
+ 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
- Branch 167
- 165: Label
- 192: 6(float) Load 73(x)
- 193: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 192
- 194: 6(float) Load 71(f)
- 195: 6(float) FAdd 194 193
- Store 71(f) 195
- Branch 167
- 167: Label
- 203: 6(float) Load 71(f)
- 205: 161(bool) FOrdLessThan 203 204
- SelectionMerge 207 None
- BranchConditional 205 206 207
- 206: Label
- Branch 157
- 207: Label
- Branch 158
- 158: Label
- 209: 9(int) Load 153(i)
- 210: 9(int) IAdd 209 63
- Store 153(i) 210
- Branch 155
- 157: Label
- 211: 9(int) Load 60(c)
- SelectionMerge 214 None
- Switch 211 214
- case 1: 212
- case 2: 213
- 212: Label
- 215: 6(float) Load 73(x)
- 216: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 215
- 217: 6(float) Load 71(f)
- 218: 6(float) FAdd 217 216
- Store 71(f) 218
- Branch 214
- 213: Label
- Branch 214
- 214: Label
- 224: 6(float) Load 71(f)
- 225: 9(int) Load 58(local)
- 226: 6(float) ConvertSToF 225
- 227: 6(float) FAdd 224 226
- Store 223(color) 227
- 231: 7(fvec4) Load 229(v)
- Store 230(param) 231
- 233: 7(fvec4) Load 229(v)
+ 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
+ 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
+ Branch 159
+ 209: Label
+ Branch 160
+ 160: Label
+ 211: 9(int) Load 155(i)
+ 212: 9(int) IAdd 211 65
+ Store 155(i) 212
+ 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: 9(int) Load 60(c)
+ 235: 7(fvec4) Load 231(v)
Store 234(param) 235
- 236: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param)
- 239: 6(float) CompositeExtract 236 1
- 240: 6(float) Load 223(color)
- 241: 6(float) FAdd 240 239
- Store 223(color) 241
- 243: 7(fvec4) Load 229(v)
- Store 242(param) 243
- 245: 7(fvec4) Load 229(v)
+ 237: 9(int) Load 62(c)
+ Store 236(param) 237
+ 238: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 232(param) 234(param) 236(param)
+ 241: 6(float) CompositeExtract 238 1
+ 242: 6(float) Load 225(color)
+ 243: 6(float) FAdd 242 241
+ Store 225(color) 243
+ 245: 7(fvec4) Load 231(v)
Store 244(param) 245
- 247: 9(int) Load 60(c)
+ 247: 7(fvec4) Load 231(v)
Store 246(param) 247
- 248: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param)
- 250: 6(float) CompositeExtract 248 2
- 251: 6(float) Load 223(color)
- 252: 6(float) FAdd 251 250
- Store 223(color) 252
- 253: 9(int) Load 60(c)
- SelectionMerge 256 None
- Switch 253 255
- case 0: 254
- 255: Label
- Branch 256
- 254: Label
- Branch 256
- 256: Label
- 260: 9(int) Load 60(c)
- SelectionMerge 262 None
- Switch 260 261
- 261: Label
- Branch 262
- 262: Label
+ 249: 9(int) Load 62(c)
+ 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
Return
FunctionEnd
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
@@ -379,26 +379,26 @@ Linked fragment stage:
18(v2): 8(ptr) FunctionParameter
19(i1): 10(ptr) FunctionParameter
21: Label
- 39: 9(int) Load 19(i1)
- SelectionMerge 44 None
- Switch 39 44
- case 0: 40
- case 2: 41
- case 1: 42
- case 3: 43
- 40: Label
- 45: 7(fvec4) Load 17(v1)
- ReturnValue 45
+ 40: 9(int) Load 19(i1)
+ SelectionMerge 45 None
+ Switch 40 45
+ case 0: 41
+ case 2: 42
+ case 1: 43
+ case 3: 44
41: Label
- ReturnValue 48
+ 46: 7(fvec4) Load 17(v1)
+ ReturnValue 46
42: Label
- 50: 7(fvec4) Load 18(v2)
- ReturnValue 50
+ ReturnValue 49
43: Label
- 52: 7(fvec4) Load 17(v1)
- 53: 7(fvec4) Load 18(v2)
- 54: 7(fvec4) FMul 52 53
- ReturnValue 54
- 44: Label
+ 51: 7(fvec4) Load 18(v2)
+ ReturnValue 51
+ 44: Label
+ 53: 7(fvec4) Load 17(v1)
+ 54: 7(fvec4) Load 18(v2)
+ 55: 7(fvec4) FMul 53 54
+ ReturnValue 55
+ 45: Label
ReturnValue 37
FunctionEnd