glslang/Test/baseResults/spv.sparseTextureClamp.frag.out
Steven Perron 33c7e30860
Don't emit duplicate decorations. (#3635)
It is invalid if the same decoration is applied to the same id multiple
times. This adds a check before adding a decoration that the decoration
is not already in the list. If it is, then the duplicate is not added.

Fixes #3627
2024-06-28 19:16:59 -04:00

467 lines
24 KiB
Plaintext

spv.sparseTextureClamp.frag
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 344
Capability Shader
Capability SampledRect
Capability SparseResidency
Capability MinLod
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 33 36 51 95 329
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_ARB_sparse_texture_clamp"
Name 4 "main"
Name 8 "resident"
Name 13 "texel"
Name 18 "itexel"
Name 23 "utexel"
Name 29 "s2D"
Name 33 "c2"
Name 36 "lodClamp"
Name 38 "ResType"
Name 47 "s3D"
Name 51 "c3"
Name 63 "isCube"
Name 67 "ResType"
Name 76 "s2DShadow"
Name 83 "ResType"
Name 92 "sCubeArrayShadow"
Name 95 "c4"
Name 154 "us2DRect"
Name 161 "ResType"
Name 170 "s2DArrayShadow"
Name 216 "sCubeShadow"
Name 232 "usCubeArray"
Name 276 "s2DRectShadow"
Name 294 "is2DArray"
Name 329 "outColor"
Decorate 29(s2D) Binding 0
Decorate 29(s2D) DescriptorSet 0
Decorate 33(c2) Location 0
Decorate 36(lodClamp) Location 3
Decorate 47(s3D) Binding 1
Decorate 47(s3D) DescriptorSet 0
Decorate 51(c3) Location 1
Decorate 63(isCube) Binding 7
Decorate 63(isCube) DescriptorSet 0
Decorate 76(s2DShadow) Binding 2
Decorate 76(s2DShadow) DescriptorSet 0
Decorate 92(sCubeArrayShadow) Binding 6
Decorate 92(sCubeArrayShadow) DescriptorSet 0
Decorate 95(c4) Location 2
Decorate 154(us2DRect) Binding 10
Decorate 154(us2DRect) DescriptorSet 0
Decorate 170(s2DArrayShadow) Binding 4
Decorate 170(s2DArrayShadow) DescriptorSet 0
Decorate 216(sCubeShadow) Binding 3
Decorate 216(sCubeShadow) DescriptorSet 0
Decorate 232(usCubeArray) Binding 9
Decorate 232(usCubeArray) DescriptorSet 0
Decorate 276(s2DRectShadow) Binding 5
Decorate 276(s2DRectShadow) DescriptorSet 0
Decorate 294(is2DArray) Binding 8
Decorate 294(is2DArray) DescriptorSet 0
Decorate 329(outColor) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
9: 6(int) Constant 0
10: TypeFloat 32
11: TypeVector 10(float) 4
12: TypePointer Function 11(fvec4)
14: 10(float) Constant 0
15: 11(fvec4) ConstantComposite 14 14 14 14
16: TypeVector 6(int) 4
17: TypePointer Function 16(ivec4)
19: 16(ivec4) ConstantComposite 9 9 9 9
20: TypeInt 32 0
21: TypeVector 20(int) 4
22: TypePointer Function 21(ivec4)
24: 20(int) Constant 0
25: 21(ivec4) ConstantComposite 24 24 24 24
26: TypeImage 10(float) 2D sampled format:Unknown
27: TypeSampledImage 26
28: TypePointer UniformConstant 27
29(s2D): 28(ptr) Variable UniformConstant
31: TypeVector 10(float) 2
32: TypePointer Input 31(fvec2)
33(c2): 32(ptr) Variable Input
35: TypePointer Input 10(float)
36(lodClamp): 35(ptr) Variable Input
38(ResType): TypeStruct 6(int) 11(fvec4)
44: TypeImage 10(float) 3D sampled format:Unknown
45: TypeSampledImage 44
46: TypePointer UniformConstant 45
47(s3D): 46(ptr) Variable UniformConstant
49: TypeVector 10(float) 3
50: TypePointer Input 49(fvec3)
51(c3): 50(ptr) Variable Input
54: 10(float) Constant 1073741824
60: TypeImage 6(int) Cube sampled format:Unknown
61: TypeSampledImage 60
62: TypePointer UniformConstant 61
63(isCube): 62(ptr) Variable UniformConstant
67(ResType): TypeStruct 6(int) 16(ivec4)
73: TypeImage 10(float) 2D depth sampled format:Unknown
74: TypeSampledImage 73
75: TypePointer UniformConstant 74
76(s2DShadow): 75(ptr) Variable UniformConstant
80: TypePointer Function 10(float)
83(ResType): TypeStruct 6(int) 10(float)
89: TypeImage 10(float) Cube depth array sampled format:Unknown
90: TypeSampledImage 89
91: TypePointer UniformConstant 90
92(sCubeArrayShadow): 91(ptr) Variable UniformConstant
94: TypePointer Input 11(fvec4)
95(c4): 94(ptr) Variable Input
97: 10(float) Constant 1065353216
142: TypeVector 6(int) 3
143: 6(int) Constant 2
144: 142(ivec3) ConstantComposite 143 143 143
151: TypeImage 20(int) Rect sampled format:Unknown
152: TypeSampledImage 151
153: TypePointer UniformConstant 152
154(us2DRect): 153(ptr) Variable UniformConstant
157: TypeVector 6(int) 2
158: 6(int) Constant 3
159: 157(ivec2) ConstantComposite 158 158
161(ResType): TypeStruct 6(int) 21(ivec4)
167: TypeImage 10(float) 2D depth array sampled format:Unknown
168: TypeSampledImage 167
169: TypePointer UniformConstant 168
170(s2DArrayShadow): 169(ptr) Variable UniformConstant
173: 6(int) Constant 5
174: 157(ivec2) ConstantComposite 173 173
176: 20(int) Constant 2
213: TypeImage 10(float) Cube depth sampled format:Unknown
214: TypeSampledImage 213
215: TypePointer UniformConstant 214
216(sCubeShadow): 215(ptr) Variable UniformConstant
221: 20(int) Constant 1
229: TypeImage 20(int) Cube array sampled format:Unknown
230: TypeSampledImage 229
231: TypePointer UniformConstant 230
232(usCubeArray): 231(ptr) Variable UniformConstant
273: TypeImage 10(float) Rect depth sampled format:Unknown
274: TypeSampledImage 273
275: TypePointer UniformConstant 274
276(s2DRectShadow): 275(ptr) Variable UniformConstant
280: 6(int) Constant 6
281: 157(ivec2) ConstantComposite 280 280
283: 20(int) Constant 3
291: TypeImage 6(int) 2D array sampled format:Unknown
292: TypeSampledImage 291
293: TypePointer UniformConstant 292
294(is2DArray): 293(ptr) Variable UniformConstant
298: 157(ivec2) ConstantComposite 143 143
328: TypePointer Output 11(fvec4)
329(outColor): 328(ptr) Variable Output
331: TypeBool
4(main): 2 Function None 3
5: Label
8(resident): 7(ptr) Variable Function
13(texel): 12(ptr) Variable Function
18(itexel): 17(ptr) Variable Function
23(utexel): 22(ptr) Variable Function
333: 12(ptr) Variable Function
Store 8(resident) 9
Store 13(texel) 15
Store 18(itexel) 19
Store 23(utexel) 25
30: 27 Load 29(s2D)
34: 31(fvec2) Load 33(c2)
37: 10(float) Load 36(lodClamp)
39: 38(ResType) ImageSparseSampleImplicitLod 30 34 MinLod 37
40: 11(fvec4) CompositeExtract 39 1
Store 13(texel) 40
41: 6(int) CompositeExtract 39 0
42: 6(int) Load 8(resident)
43: 6(int) BitwiseOr 42 41
Store 8(resident) 43
48: 45 Load 47(s3D)
52: 49(fvec3) Load 51(c3)
53: 10(float) Load 36(lodClamp)
55: 38(ResType) ImageSparseSampleImplicitLod 48 52 Bias MinLod 54 53
56: 11(fvec4) CompositeExtract 55 1
Store 13(texel) 56
57: 6(int) CompositeExtract 55 0
58: 6(int) Load 8(resident)
59: 6(int) BitwiseOr 58 57
Store 8(resident) 59
64: 61 Load 63(isCube)
65: 49(fvec3) Load 51(c3)
66: 10(float) Load 36(lodClamp)
68: 67(ResType) ImageSparseSampleImplicitLod 64 65 MinLod 66
69: 16(ivec4) CompositeExtract 68 1
Store 18(itexel) 69
70: 6(int) CompositeExtract 68 0
71: 6(int) Load 8(resident)
72: 6(int) BitwiseOr 71 70
Store 8(resident) 72
77: 74 Load 76(s2DShadow)
78: 49(fvec3) Load 51(c3)
79: 10(float) Load 36(lodClamp)
81: 80(ptr) AccessChain 13(texel) 24
82: 10(float) CompositeExtract 78 2
84: 83(ResType) ImageSparseSampleDrefImplicitLod 77 78 82 MinLod 79
85: 10(float) CompositeExtract 84 1
Store 81 85
86: 6(int) CompositeExtract 84 0
87: 6(int) Load 8(resident)
88: 6(int) BitwiseOr 87 86
Store 8(resident) 88
93: 90 Load 92(sCubeArrayShadow)
96: 11(fvec4) Load 95(c4)
98: 10(float) Load 36(lodClamp)
99: 80(ptr) AccessChain 13(texel) 24
100: 83(ResType) ImageSparseSampleDrefImplicitLod 93 96 97 MinLod 98
101: 10(float) CompositeExtract 100 1
Store 99 101
102: 6(int) CompositeExtract 100 0
103: 6(int) Load 8(resident)
104: 6(int) BitwiseOr 103 102
Store 8(resident) 104
105: 27 Load 29(s2D)
106: 31(fvec2) Load 33(c2)
107: 10(float) Load 36(lodClamp)
108: 11(fvec4) ImageSampleImplicitLod 105 106 MinLod 107
109: 11(fvec4) Load 13(texel)
110: 11(fvec4) FAdd 109 108
Store 13(texel) 110
111: 45 Load 47(s3D)
112: 49(fvec3) Load 51(c3)
113: 10(float) Load 36(lodClamp)
114: 11(fvec4) ImageSampleImplicitLod 111 112 Bias MinLod 54 113
115: 11(fvec4) Load 13(texel)
116: 11(fvec4) FAdd 115 114
Store 13(texel) 116
117: 61 Load 63(isCube)
118: 49(fvec3) Load 51(c3)
119: 10(float) Load 36(lodClamp)
120: 16(ivec4) ImageSampleImplicitLod 117 118 MinLod 119
121: 16(ivec4) Load 18(itexel)
122: 16(ivec4) IAdd 121 120
Store 18(itexel) 122
123: 74 Load 76(s2DShadow)
124: 49(fvec3) Load 51(c3)
125: 10(float) Load 36(lodClamp)
126: 10(float) CompositeExtract 124 2
127: 10(float) ImageSampleDrefImplicitLod 123 124 126 MinLod 125
128: 80(ptr) AccessChain 13(texel) 24
129: 10(float) Load 128
130: 10(float) FAdd 129 127
131: 80(ptr) AccessChain 13(texel) 24
Store 131 130
132: 90 Load 92(sCubeArrayShadow)
133: 11(fvec4) Load 95(c4)
134: 10(float) Load 36(lodClamp)
135: 10(float) ImageSampleDrefImplicitLod 132 133 97 MinLod 134
136: 80(ptr) AccessChain 13(texel) 24
137: 10(float) Load 136
138: 10(float) FAdd 137 135
139: 80(ptr) AccessChain 13(texel) 24
Store 139 138
140: 45 Load 47(s3D)
141: 49(fvec3) Load 51(c3)
145: 10(float) Load 36(lodClamp)
146: 38(ResType) ImageSparseSampleImplicitLod 140 141 Bias ConstOffset MinLod 54 144 145
147: 11(fvec4) CompositeExtract 146 1
Store 13(texel) 147
148: 6(int) CompositeExtract 146 0
149: 6(int) Load 8(resident)
150: 6(int) BitwiseOr 149 148
Store 8(resident) 150
155: 152 Load 154(us2DRect)
156: 31(fvec2) Load 33(c2)
160: 10(float) Load 36(lodClamp)
162:161(ResType) ImageSparseSampleImplicitLod 155 156 ConstOffset MinLod 159 160
163: 21(ivec4) CompositeExtract 162 1
Store 23(utexel) 163
164: 6(int) CompositeExtract 162 0
165: 6(int) Load 8(resident)
166: 6(int) BitwiseOr 165 164
Store 8(resident) 166
171: 168 Load 170(s2DArrayShadow)
172: 11(fvec4) Load 95(c4)
175: 10(float) Load 36(lodClamp)
177: 80(ptr) AccessChain 13(texel) 176
178: 10(float) CompositeExtract 172 3
179: 83(ResType) ImageSparseSampleDrefImplicitLod 171 172 178 ConstOffset MinLod 174 175
180: 10(float) CompositeExtract 179 1
Store 177 180
181: 6(int) CompositeExtract 179 0
182: 6(int) Load 8(resident)
183: 6(int) BitwiseOr 182 181
Store 8(resident) 183
184: 45 Load 47(s3D)
185: 49(fvec3) Load 51(c3)
186: 10(float) Load 36(lodClamp)
187: 11(fvec4) ImageSampleImplicitLod 184 185 Bias ConstOffset MinLod 54 144 186
188: 11(fvec4) Load 13(texel)
189: 11(fvec4) FAdd 188 187
Store 13(texel) 189
190: 152 Load 154(us2DRect)
191: 31(fvec2) Load 33(c2)
192: 10(float) Load 36(lodClamp)
193: 21(ivec4) ImageSampleImplicitLod 190 191 ConstOffset MinLod 159 192
194: 21(ivec4) Load 23(utexel)
195: 21(ivec4) IAdd 194 193
Store 23(utexel) 195
196: 168 Load 170(s2DArrayShadow)
197: 11(fvec4) Load 95(c4)
198: 10(float) Load 36(lodClamp)
199: 10(float) CompositeExtract 197 3
200: 10(float) ImageSampleDrefImplicitLod 196 197 199 ConstOffset MinLod 174 198
201: 80(ptr) AccessChain 13(texel) 176
202: 10(float) Load 201
203: 10(float) FAdd 202 200
204: 80(ptr) AccessChain 13(texel) 176
Store 204 203
205: 45 Load 47(s3D)
206: 49(fvec3) Load 51(c3)
207: 10(float) Load 36(lodClamp)
208: 38(ResType) ImageSparseSampleExplicitLod 205 206 Grad MinLod 206 206 207
209: 11(fvec4) CompositeExtract 208 1
Store 13(texel) 209
210: 6(int) CompositeExtract 208 0
211: 6(int) Load 8(resident)
212: 6(int) BitwiseOr 211 210
Store 8(resident) 212
217: 214 Load 216(sCubeShadow)
218: 11(fvec4) Load 95(c4)
219: 49(fvec3) Load 51(c3)
220: 10(float) Load 36(lodClamp)
222: 80(ptr) AccessChain 13(texel) 221
223: 10(float) CompositeExtract 218 3
224: 83(ResType) ImageSparseSampleDrefExplicitLod 217 218 223 Grad MinLod 219 219 220
225: 10(float) CompositeExtract 224 1
Store 222 225
226: 6(int) CompositeExtract 224 0
227: 6(int) Load 8(resident)
228: 6(int) BitwiseOr 227 226
Store 8(resident) 228
233: 230 Load 232(usCubeArray)
234: 11(fvec4) Load 95(c4)
235: 49(fvec3) Load 51(c3)
236: 10(float) Load 36(lodClamp)
237:161(ResType) ImageSparseSampleExplicitLod 233 234 Grad MinLod 235 235 236
238: 21(ivec4) CompositeExtract 237 1
Store 23(utexel) 238
239: 6(int) CompositeExtract 237 0
240: 6(int) Load 8(resident)
241: 6(int) BitwiseOr 240 239
Store 8(resident) 241
242: 45 Load 47(s3D)
243: 49(fvec3) Load 51(c3)
244: 10(float) Load 36(lodClamp)
245: 11(fvec4) ImageSampleExplicitLod 242 243 Grad MinLod 243 243 244
246: 11(fvec4) Load 13(texel)
247: 11(fvec4) FAdd 246 245
Store 13(texel) 247
248: 214 Load 216(sCubeShadow)
249: 11(fvec4) Load 95(c4)
250: 49(fvec3) Load 51(c3)
251: 10(float) Load 36(lodClamp)
252: 10(float) CompositeExtract 249 3
253: 10(float) ImageSampleDrefExplicitLod 248 249 252 Grad MinLod 250 250 251
254: 80(ptr) AccessChain 13(texel) 221
255: 10(float) Load 254
256: 10(float) FAdd 255 253
257: 80(ptr) AccessChain 13(texel) 221
Store 257 256
258: 230 Load 232(usCubeArray)
259: 11(fvec4) Load 95(c4)
260: 49(fvec3) Load 51(c3)
261: 10(float) Load 36(lodClamp)
262: 21(ivec4) ImageSampleExplicitLod 258 259 Grad MinLod 260 260 261
263: 21(ivec4) Load 23(utexel)
264: 21(ivec4) IAdd 263 262
Store 23(utexel) 264
265: 27 Load 29(s2D)
266: 31(fvec2) Load 33(c2)
267: 10(float) Load 36(lodClamp)
268: 38(ResType) ImageSparseSampleExplicitLod 265 266 Grad ConstOffset MinLod 266 266 174 267
269: 11(fvec4) CompositeExtract 268 1
Store 13(texel) 269
270: 6(int) CompositeExtract 268 0
271: 6(int) Load 8(resident)
272: 6(int) BitwiseOr 271 270
Store 8(resident) 272
277: 274 Load 276(s2DRectShadow)
278: 49(fvec3) Load 51(c3)
279: 31(fvec2) Load 33(c2)
282: 10(float) Load 36(lodClamp)
284: 80(ptr) AccessChain 13(texel) 283
285: 10(float) CompositeExtract 278 2
286: 83(ResType) ImageSparseSampleDrefExplicitLod 277 278 285 Grad ConstOffset MinLod 279 279 281 282
287: 10(float) CompositeExtract 286 1
Store 284 287
288: 6(int) CompositeExtract 286 0
289: 6(int) Load 8(resident)
290: 6(int) BitwiseOr 289 288
Store 8(resident) 290
295: 292 Load 294(is2DArray)
296: 49(fvec3) Load 51(c3)
297: 31(fvec2) Load 33(c2)
299: 10(float) Load 36(lodClamp)
300: 67(ResType) ImageSparseSampleExplicitLod 295 296 Grad ConstOffset MinLod 297 297 298 299
301: 16(ivec4) CompositeExtract 300 1
Store 18(itexel) 301
302: 6(int) CompositeExtract 300 0
303: 6(int) Load 8(resident)
304: 6(int) BitwiseOr 303 302
Store 8(resident) 304
305: 27 Load 29(s2D)
306: 31(fvec2) Load 33(c2)
307: 10(float) Load 36(lodClamp)
308: 11(fvec4) ImageSampleExplicitLod 305 306 Grad ConstOffset MinLod 306 306 174 307
309: 11(fvec4) Load 13(texel)
310: 11(fvec4) FAdd 309 308
Store 13(texel) 310
311: 274 Load 276(s2DRectShadow)
312: 49(fvec3) Load 51(c3)
313: 31(fvec2) Load 33(c2)
314: 10(float) Load 36(lodClamp)
315: 10(float) CompositeExtract 312 2
316: 10(float) ImageSampleDrefExplicitLod 311 312 315 Grad ConstOffset MinLod 313 313 281 314
317: 80(ptr) AccessChain 13(texel) 283
318: 10(float) Load 317
319: 10(float) FAdd 318 316
320: 80(ptr) AccessChain 13(texel) 283
Store 320 319
321: 292 Load 294(is2DArray)
322: 49(fvec3) Load 51(c3)
323: 31(fvec2) Load 33(c2)
324: 10(float) Load 36(lodClamp)
325: 16(ivec4) ImageSampleExplicitLod 321 322 Grad ConstOffset MinLod 323 323 298 324
326: 16(ivec4) Load 18(itexel)
327: 16(ivec4) IAdd 326 325
Store 18(itexel) 327
330: 6(int) Load 8(resident)
332: 331(bool) ImageSparseTexelsResident 330
SelectionMerge 335 None
BranchConditional 332 334 337
334: Label
336: 11(fvec4) Load 13(texel)
Store 333 336
Branch 335
337: Label
338: 16(ivec4) Load 18(itexel)
339: 11(fvec4) ConvertSToF 338
340: 21(ivec4) Load 23(utexel)
341: 11(fvec4) ConvertUToF 340
342: 11(fvec4) FAdd 339 341
Store 333 342
Branch 335
335: Label
343: 11(fvec4) Load 333
Store 329(outColor) 343
Return
FunctionEnd