spv::Builder::Loop constructor inits all members.
After construction, the Loop is effectively const. This perturbs the IDs in SPIR-V tests because the body block is created before generating any of the loop code, rather than only when the body is first referenced.
This commit is contained in:
@@ -18,7 +18,7 @@ Linked fragment stage:
|
||||
Name 12 "BaseColor"
|
||||
Name 25 "d4"
|
||||
Name 30 "bigColor4"
|
||||
Name 83 "d13"
|
||||
Name 84 "d13"
|
||||
Name 149 "gl_FragColor"
|
||||
Name 151 "bigColor"
|
||||
Name 152 "bigColor1_1"
|
||||
@@ -115,16 +115,16 @@ Linked fragment stage:
|
||||
9: TypePointer Function 8(fvec4)
|
||||
11: TypePointer Input 8(fvec4)
|
||||
12(BaseColor): 11(ptr) Variable Input
|
||||
17: TypeBool
|
||||
18: 17(bool) ConstantTrue
|
||||
18: TypeBool
|
||||
19: 18(bool) ConstantTrue
|
||||
24: TypePointer UniformConstant 7(float)
|
||||
25(d4): 24(ptr) Variable UniformConstant
|
||||
29: TypePointer UniformConstant 8(fvec4)
|
||||
30(bigColor4): 29(ptr) Variable UniformConstant
|
||||
40: 7(float) Constant 1073741824
|
||||
54: 7(float) Constant 1065353216
|
||||
58: 17(bool) ConstantFalse
|
||||
83(d13): 24(ptr) Variable UniformConstant
|
||||
58: 18(bool) ConstantFalse
|
||||
84(d13): 24(ptr) Variable UniformConstant
|
||||
148: TypePointer Output 8(fvec4)
|
||||
149(gl_FragColor): 148(ptr) Variable Output
|
||||
151(bigColor): 29(ptr) Variable UniformConstant
|
||||
@@ -179,22 +179,22 @@ Linked fragment stage:
|
||||
Store 10(color) 13
|
||||
Branch 14
|
||||
14: Label
|
||||
16: 17(bool) Phi 18 5 58 50 58 65
|
||||
17: 18(bool) Phi 19 5 58 50 58 65
|
||||
LoopMerge 15 None
|
||||
Branch 19
|
||||
19: Label
|
||||
SelectionMerge 20 None
|
||||
BranchConditional 16 20 21
|
||||
Branch 20
|
||||
20: Label
|
||||
SelectionMerge 16 None
|
||||
BranchConditional 17 16 21
|
||||
21: Label
|
||||
22: 8(fvec4) Load 10(color)
|
||||
23: 7(float) CompositeExtract 22 2
|
||||
26: 7(float) Load 25(d4)
|
||||
27: 17(bool) FOrdLessThan 23 26
|
||||
27: 18(bool) FOrdLessThan 23 26
|
||||
SelectionMerge 28 None
|
||||
BranchConditional 27 28 15
|
||||
28: Label
|
||||
Branch 20
|
||||
20: Label
|
||||
Branch 16
|
||||
16: Label
|
||||
31: 8(fvec4) Load 30(bigColor4)
|
||||
32: 8(fvec4) Load 10(color)
|
||||
33: 8(fvec4) FAdd 32 31
|
||||
@@ -202,7 +202,7 @@ Linked fragment stage:
|
||||
34: 8(fvec4) Load 10(color)
|
||||
35: 7(float) CompositeExtract 34 0
|
||||
36: 7(float) Load 25(d4)
|
||||
37: 17(bool) FOrdLessThan 35 36
|
||||
37: 18(bool) FOrdLessThan 35 36
|
||||
SelectionMerge 39 None
|
||||
BranchConditional 37 38 39
|
||||
38: Label
|
||||
@@ -215,7 +215,7 @@ Linked fragment stage:
|
||||
46: 8(fvec4) Load 10(color)
|
||||
47: 7(float) CompositeExtract 46 2
|
||||
48: 7(float) Load 25(d4)
|
||||
49: 17(bool) FOrdLessThan 47 48
|
||||
49: 18(bool) FOrdLessThan 47 48
|
||||
SelectionMerge 51 None
|
||||
BranchConditional 49 50 51
|
||||
50: Label
|
||||
@@ -232,7 +232,7 @@ Linked fragment stage:
|
||||
60: 8(fvec4) Load 10(color)
|
||||
61: 7(float) CompositeExtract 60 1
|
||||
62: 7(float) Load 25(d4)
|
||||
63: 17(bool) FOrdLessThan 61 62
|
||||
63: 18(bool) FOrdLessThan 61 62
|
||||
SelectionMerge 65 None
|
||||
BranchConditional 63 64 72
|
||||
64: Label
|
||||
@@ -258,17 +258,17 @@ Linked fragment stage:
|
||||
15: Label
|
||||
Branch 79
|
||||
79: Label
|
||||
81: 8(fvec4) Load 10(color)
|
||||
82: 7(float) CompositeExtract 81 3
|
||||
84: 7(float) Load 83(d13)
|
||||
85: 17(bool) FOrdLessThan 82 84
|
||||
82: 8(fvec4) Load 10(color)
|
||||
83: 7(float) CompositeExtract 82 3
|
||||
85: 7(float) Load 84(d13)
|
||||
86: 18(bool) FOrdLessThan 83 85
|
||||
LoopMerge 80 None
|
||||
BranchConditional 85 86 80
|
||||
86: Label
|
||||
BranchConditional 86 81 80
|
||||
81: Label
|
||||
87: 8(fvec4) Load 10(color)
|
||||
88: 7(float) CompositeExtract 87 2
|
||||
89: 7(float) Load 83(d13)
|
||||
90: 17(bool) FOrdLessThan 88 89
|
||||
89: 7(float) Load 84(d13)
|
||||
90: 18(bool) FOrdLessThan 88 89
|
||||
SelectionMerge 92 None
|
||||
BranchConditional 90 91 96
|
||||
91: Label
|
||||
@@ -291,7 +291,7 @@ Linked fragment stage:
|
||||
103: 8(fvec4) Load 10(color)
|
||||
104: 7(float) CompositeExtract 103 0
|
||||
105: 7(float) Load 25(d4)
|
||||
106: 17(bool) FOrdLessThan 104 105
|
||||
106: 18(bool) FOrdLessThan 104 105
|
||||
SelectionMerge 108 None
|
||||
BranchConditional 106 107 108
|
||||
107: Label
|
||||
@@ -304,7 +304,7 @@ Linked fragment stage:
|
||||
114: 8(fvec4) Load 10(color)
|
||||
115: 7(float) CompositeExtract 114 2
|
||||
116: 7(float) Load 25(d4)
|
||||
117: 17(bool) FOrdLessThan 115 116
|
||||
117: 18(bool) FOrdLessThan 115 116
|
||||
SelectionMerge 119 None
|
||||
BranchConditional 117 118 119
|
||||
118: Label
|
||||
@@ -321,7 +321,7 @@ Linked fragment stage:
|
||||
126: 8(fvec4) Load 10(color)
|
||||
127: 7(float) CompositeExtract 126 1
|
||||
128: 7(float) Load 25(d4)
|
||||
129: 17(bool) FOrdLessThan 127 128
|
||||
129: 18(bool) FOrdLessThan 127 128
|
||||
SelectionMerge 131 None
|
||||
BranchConditional 129 130 138
|
||||
130: Label
|
||||
|
||||
Reference in New Issue
Block a user