Don't emit debug instructions before an OpPhi
Nonsemantic instructions aren't allowed before an OpPhi, so don't emit line and debug scope instructions when the instruction being emitted is an OpPhi.
This commit is contained in:
parent
74d448cc15
commit
592aed9c20
3 changed files with 228 additions and 224 deletions
|
|
@ -1,5 +1,4 @@
|
|||
spv.debuginfo.glsl.frag
|
||||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 877
|
||||
|
|
@ -231,12 +230,12 @@ void main()
|
|||
105: String "global_var"
|
||||
120: String "shadowCoord"
|
||||
142: String "bool"
|
||||
163: String "dist"
|
||||
170: String "type.2d.image"
|
||||
171: String "@type.2d.image"
|
||||
175: String "type.sampled.image"
|
||||
176: String "@type.sampled.image"
|
||||
181: String "samplerShadowMap"
|
||||
162: String "dist"
|
||||
169: String "type.2d.image"
|
||||
170: String "@type.2d.image"
|
||||
174: String "type.sampled.image"
|
||||
175: String "@type.sampled.image"
|
||||
180: String "samplerShadowMap"
|
||||
230: String "texDim"
|
||||
242: String "scale"
|
||||
249: String "dx"
|
||||
|
|
@ -292,8 +291,8 @@ void main()
|
|||
Name 103 "global_var"
|
||||
Name 112 "shadow"
|
||||
Name 118 "shadowCoord"
|
||||
Name 161 "dist"
|
||||
Name 179 "samplerShadowMap"
|
||||
Name 160 "dist"
|
||||
Name 178 "samplerShadowMap"
|
||||
Name 228 "texDim"
|
||||
Name 240 "scale"
|
||||
Name 247 "dx"
|
||||
|
|
@ -352,8 +351,8 @@ void main()
|
|||
Name 814 "spec"
|
||||
Name 861 "param"
|
||||
Name 866 "param"
|
||||
Decorate 179(samplerShadowMap) Binding 5
|
||||
Decorate 179(samplerShadowMap) DescriptorSet 0
|
||||
Decorate 178(samplerShadowMap) Binding 5
|
||||
Decorate 178(samplerShadowMap) DescriptorSet 0
|
||||
MemberDecorate 405(Light) 0 Offset 0
|
||||
MemberDecorate 405(Light) 1 Offset 16
|
||||
MemberDecorate 405(Light) 2 Offset 32
|
||||
|
|
@ -449,21 +448,21 @@ void main()
|
|||
143: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 142 10 28 12
|
||||
146: 7(int) Constant 65
|
||||
148: 16(float) Constant 3212836864
|
||||
164: 7(int) Constant 67
|
||||
162: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 163 18 41 164 12 40 20
|
||||
168: TypeImage 16(float) 2D array sampled format:Unknown
|
||||
172: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
|
||||
169: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 170 12 41 164 12 44 171 172 13
|
||||
173: TypeSampledImage 168
|
||||
174: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 175 12 41 164 12 44 176 172 13
|
||||
177: TypePointer UniformConstant 173
|
||||
178: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 174 12 12
|
||||
179(samplerShadowMap): 177(ptr) Variable UniformConstant
|
||||
180: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 181 174 41 164 12 44 181 179(samplerShadowMap) 107
|
||||
195: 7(int) Constant 68
|
||||
197: 16(float) Constant 0
|
||||
211: 16(float) Constant 1048576000
|
||||
214: 7(int) Constant 70
|
||||
163: 7(int) Constant 67
|
||||
161: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 162 18 41 163 12 40 20
|
||||
167: TypeImage 16(float) 2D array sampled format:Unknown
|
||||
171: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone)
|
||||
168: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 41 163 12 44 170 171 13
|
||||
172: TypeSampledImage 167
|
||||
173: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 174 12 41 163 12 44 175 171 13
|
||||
176: TypePointer UniformConstant 172
|
||||
177: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 173 12 12
|
||||
178(samplerShadowMap): 176(ptr) Variable UniformConstant
|
||||
179: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 180 173 41 163 12 44 180 178(samplerShadowMap) 107
|
||||
194: 7(int) Constant 68
|
||||
196: 16(float) Constant 0
|
||||
209: 16(float) Constant 1048576000
|
||||
212: 7(int) Constant 70
|
||||
219: 7(int) Constant 73
|
||||
224: TypeVector 98(int) 2
|
||||
225: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 100 28
|
||||
|
|
@ -535,9 +534,9 @@ void main()
|
|||
478: 7(int) Constant 119
|
||||
476: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 477 75 41 478 12 96 20
|
||||
481: TypeImage 16(float) 2D sampled format:Unknown
|
||||
482: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 170 12 41 478 12 44 171 172 13
|
||||
482: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 169 12 41 478 12 44 170 171 13
|
||||
483: TypeSampledImage 481
|
||||
484: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 175 12 41 478 12 44 176 172 13
|
||||
484: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 174 12 41 478 12 44 175 171 13
|
||||
485: TypePointer UniformConstant 483
|
||||
486: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 484 12 12
|
||||
487(samplerposition): 485(ptr) Variable UniformConstant
|
||||
|
|
@ -589,7 +588,7 @@ void main()
|
|||
678: TypePointer Uniform 19(fvec4)
|
||||
679: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 21 28 12
|
||||
687: 7(int) Constant 156
|
||||
686: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 163 18 41 687 12 96 20
|
||||
686: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 162 18 41 687 12 96 20
|
||||
694: 7(int) Constant 157
|
||||
699: 7(int) Constant 160
|
||||
697: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 698 75 41 699 12 96 20
|
||||
|
|
@ -885,14 +884,14 @@ void main()
|
|||
771: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 768 767(heightAttenuation) 49
|
||||
773: 16(float) Load 725(lightRange)
|
||||
774: 16(float) Load 685(dist)
|
||||
775: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 773 197 774
|
||||
775: 16(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 773 196 774
|
||||
Store 767(heightAttenuation) 775
|
||||
781: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 779 779 12 12
|
||||
780: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 777 776(NdotL) 49
|
||||
782: 74(fvec3) Load 646(N)
|
||||
783: 74(fvec3) Load 670(L)
|
||||
784: 16(float) Dot 782 783
|
||||
785: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 197 784
|
||||
785: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 196 784
|
||||
Store 776(NdotL) 785
|
||||
791: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 789 789 12 12
|
||||
790: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 787 786(diff) 49
|
||||
|
|
@ -911,7 +910,7 @@ void main()
|
|||
810: 74(fvec3) Load 794(R)
|
||||
811: 74(fvec3) Load 696(V)
|
||||
812: 16(float) Dot 810 811
|
||||
813: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 197 812
|
||||
813: 16(float) ExtInst 3(GLSL.std.450) 40(FMax) 196 812
|
||||
Store 804(NdotR) 813
|
||||
819: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 817 817 12 12
|
||||
818: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 815 814(spec) 49
|
||||
|
|
@ -986,7 +985,7 @@ void main()
|
|||
38: Label
|
||||
112(shadow): 25(ptr) Variable Function
|
||||
118(shadowCoord): 22(ptr) Variable Function
|
||||
161(dist): 25(ptr) Variable Function
|
||||
160(dist): 25(ptr) Variable Function
|
||||
50: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
51: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 43 43 12 12
|
||||
48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 34(P) 49
|
||||
|
|
@ -1030,54 +1029,54 @@ void main()
|
|||
156: 141(bool) FOrdLessThan 155 117
|
||||
Branch 151
|
||||
151: Label
|
||||
158: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
157: 141(bool) Phi 149 38 156 150
|
||||
SelectionMerge 160 None
|
||||
BranchConditional 157 159 160
|
||||
159: Label
|
||||
166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
167: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 164 164 12 12
|
||||
165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 162 161(dist) 49
|
||||
182: 173 Load 179(samplerShadowMap)
|
||||
183: 19(fvec4) Load 118(shadowCoord)
|
||||
184: 27(fvec2) VectorShuffle 183 183 0 1
|
||||
185: 27(fvec2) Load 36(offset)
|
||||
186: 27(fvec2) FAdd 184 185
|
||||
187: 16(float) Load 35(layer)
|
||||
188: 16(float) CompositeExtract 186 0
|
||||
189: 16(float) CompositeExtract 186 1
|
||||
190: 74(fvec3) CompositeConstruct 188 189 187
|
||||
191: 19(fvec4) ImageSampleImplicitLod 182 190
|
||||
192: 16(float) CompositeExtract 191 0
|
||||
Store 161(dist) 192
|
||||
194: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 195 195 12 12
|
||||
193: 25(ptr) AccessChain 118(shadowCoord) 13
|
||||
196: 16(float) Load 193
|
||||
198: 141(bool) FOrdGreaterThan 196 197
|
||||
SelectionMerge 200 None
|
||||
BranchConditional 198 199 200
|
||||
199: Label
|
||||
202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
203: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 195 195 12 12
|
||||
201: 16(float) Load 161(dist)
|
||||
204: 25(ptr) AccessChain 118(shadowCoord) 28
|
||||
205: 16(float) Load 204
|
||||
206: 141(bool) FOrdLessThan 201 205
|
||||
Branch 200
|
||||
200: Label
|
||||
208: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
207: 141(bool) Phi 198 159 206 199
|
||||
SelectionMerge 210 None
|
||||
BranchConditional 207 209 210
|
||||
209: Label
|
||||
212: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 214 214 12 12
|
||||
Store 112(shadow) 211
|
||||
Branch 210
|
||||
210: Label
|
||||
215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
Branch 160
|
||||
160: Label
|
||||
215: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
SelectionMerge 159 None
|
||||
BranchConditional 157 158 159
|
||||
158: Label
|
||||
165: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
166: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 163 163 12 12
|
||||
164: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 161 160(dist) 49
|
||||
181: 172 Load 178(samplerShadowMap)
|
||||
182: 19(fvec4) Load 118(shadowCoord)
|
||||
183: 27(fvec2) VectorShuffle 182 182 0 1
|
||||
184: 27(fvec2) Load 36(offset)
|
||||
185: 27(fvec2) FAdd 183 184
|
||||
186: 16(float) Load 35(layer)
|
||||
187: 16(float) CompositeExtract 185 0
|
||||
188: 16(float) CompositeExtract 185 1
|
||||
189: 74(fvec3) CompositeConstruct 187 188 186
|
||||
190: 19(fvec4) ImageSampleImplicitLod 181 189
|
||||
191: 16(float) CompositeExtract 190 0
|
||||
Store 160(dist) 191
|
||||
193: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 194 194 12 12
|
||||
192: 25(ptr) AccessChain 118(shadowCoord) 13
|
||||
195: 16(float) Load 192
|
||||
197: 141(bool) FOrdGreaterThan 195 196
|
||||
SelectionMerge 199 None
|
||||
BranchConditional 197 198 199
|
||||
198: Label
|
||||
201: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
202: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 194 194 12 12
|
||||
200: 16(float) Load 160(dist)
|
||||
203: 25(ptr) AccessChain 118(shadowCoord) 28
|
||||
204: 16(float) Load 203
|
||||
205: 141(bool) FOrdLessThan 200 204
|
||||
Branch 199
|
||||
199: Label
|
||||
206: 141(bool) Phi 197 158 205 198
|
||||
213: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
SelectionMerge 208 None
|
||||
BranchConditional 206 207 208
|
||||
207: Label
|
||||
210: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
211: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 212 212 12 12
|
||||
Store 112(shadow) 209
|
||||
Branch 208
|
||||
208: Label
|
||||
214: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
Branch 159
|
||||
159: Label
|
||||
217: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 40
|
||||
218: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 219 219 12 12
|
||||
216: 16(float) Load 112(shadow)
|
||||
|
|
@ -1106,8 +1105,8 @@ void main()
|
|||
223: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 65 62(filterPCF(vf4;f1;)
|
||||
233: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 231 231 12 12
|
||||
232: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 229 228(texDim) 49
|
||||
234: 173 Load 179(samplerShadowMap)
|
||||
235: 168 Image 234
|
||||
234: 172 Load 178(samplerShadowMap)
|
||||
235: 167 Image 234
|
||||
238: 236(ivec3) ImageQuerySizeLod 235 108
|
||||
239: 224(ivec2) VectorShuffle 238 238 0 1
|
||||
Store 228(texDim) 239
|
||||
|
|
@ -1134,7 +1133,7 @@ void main()
|
|||
Store 261(dy) 272
|
||||
278: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 276 276 12 12
|
||||
277: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 274 273(shadowFactor) 49
|
||||
Store 273(shadowFactor) 197
|
||||
Store 273(shadowFactor) 196
|
||||
284: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 41 282 282 12 12
|
||||
283: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 280 279(count) 49
|
||||
Store 279(count) 108
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue