AST: Fix shift conversions, which don't require matching types.

The base and shift amount need to be integers, but not of the same type.
This fixes #1296 and replaces #1297.
This commit is contained in:
John Kessenich 2018-03-15 21:07:35 -06:00
parent 6e899be5ec
commit 647fccaf2f
9 changed files with 1475 additions and 1413 deletions

View file

@ -1,7 +1,7 @@
spv.int64.frag
// Module Version 10000
// Generated by (magic number): 80006
// Id's are bound by 483
// Id's are bound by 488
Capability Shader
Capability Float64
@ -37,38 +37,38 @@ spv.int64.frag
Name 139 "i64"
Name 159 "i"
Name 166 "uv"
Name 221 "b"
Name 281 "i64v"
Name 284 "i64"
Name 294 "u64v"
Name 296 "u64"
Name 368 "dv"
Name 387 "iv"
Name 392 "uv"
Name 396 "bv"
Name 457 "Block"
MemberName 457(Block) 0 "i64v"
MemberName 457(Block) 1 "u64"
Name 459 "block"
Name 460 "si64"
Name 461 "su64"
Name 462 "si"
Name 463 "su"
Name 464 "sb"
Name 226 "b"
Name 286 "i64v"
Name 289 "i64"
Name 299 "u64v"
Name 301 "u64"
Name 373 "dv"
Name 392 "iv"
Name 397 "uv"
Name 401 "bv"
Name 462 "Block"
MemberName 462(Block) 0 "i64v"
MemberName 462(Block) 1 "u64"
Name 464 "block"
Name 465 "si64"
Name 466 "su64"
Name 467 "si"
Name 468 "su"
Name 469 "sb"
MemberDecorate 28(Uniforms) 0 Offset 0
Decorate 28(Uniforms) Block
Decorate 30 DescriptorSet 0
Decorate 30 Binding 0
MemberDecorate 457(Block) 0 Offset 0
MemberDecorate 457(Block) 1 Offset 24
Decorate 457(Block) Block
Decorate 459(block) DescriptorSet 0
Decorate 459(block) Binding 1
Decorate 460(si64) SpecId 100
Decorate 461(su64) SpecId 101
Decorate 462(si) SpecId 102
Decorate 463(su) SpecId 103
Decorate 464(sb) SpecId 104
MemberDecorate 462(Block) 0 Offset 0
MemberDecorate 462(Block) 1 Offset 24
Decorate 462(Block) Block
Decorate 464(block) DescriptorSet 0
Decorate 464(block) Binding 1
Decorate 465(si64) SpecId 100
Decorate 466(su64) SpecId 101
Decorate 467(si) SpecId 102
Decorate 468(su) SpecId 103
Decorate 469(sb) SpecId 104
2: TypeVoid
3: TypeFunction 2
14: TypeInt 64 0
@ -128,52 +128,53 @@ spv.int64.frag
158: TypePointer Function 31(int)
164: TypeVector 21(int) 3
165: TypePointer Function 164(ivec3)
199: TypeVector 31(int) 3
203: 21(int) Constant 1
204: TypePointer Function 21(int)
212: 21(int) Constant 2
220: TypePointer Function 55(bool)
222: 21(int) Constant 0
292: 52(ivec2) ConstantComposite 25 25
301: 132(ivec3) ConstantComposite 69 69 69
343: 55(bool) ConstantTrue
350: 55(bool) ConstantFalse
351: 56(bvec2) ConstantComposite 350 350
363: TypeVector 55(bool) 3
364: 363(bvec3) ConstantComposite 350 350 350
366: TypeVector 94(float) 3
367: TypePointer Function 366(fvec3)
372: TypePointer Function 94(float)
383: 31(int) Constant 1
384: 31(int) Constant 2
385: 74(ivec2) ConstantComposite 383 384
390: 81(ivec2) ConstantComposite 212 22
395: TypePointer Function 363(bvec3)
457(Block): TypeStruct 136(ivec3) 14(int)
458: TypePointer Uniform 457(Block)
459(block): 458(ptr) Variable Uniform
460(si64): 18(int) SpecConstant 4294967286 4294967295
461(su64): 14(int) SpecConstant 20 0
462(si): 31(int) SpecConstant 4294967291
463(su): 21(int) SpecConstant 4
464(sb): 55(bool) SpecConstantTrue
465: 55(bool) SpecConstantOp 171 460(si64) 69
466: 55(bool) SpecConstantOp 171 461(su64) 69
467: 18(int) SpecConstantOp 169 464(sb) 61 60
468: 14(int) SpecConstantOp 169 464(sb) 70 69
469: 31(int) SpecConstantOp 114 460(si64)
470: 18(int) SpecConstantOp 114 462(si)
471: 21(int) SpecConstantOp 113 461(su64)
472: 14(int) SpecConstantOp 113 463(su)
473: 18(int) SpecConstantOp 128 461(su64) 69
474: 14(int) SpecConstantOp 128 460(si64) 69
475: 31(int) SpecConstantOp 113 461(su64)
476: 31(int) SpecConstantOp 128 475 222
477: 18(int) SpecConstantOp 114 462(si)
478: 14(int) SpecConstantOp 128 477 69
479: 31(int) SpecConstantOp 114 460(si64)
480: 21(int) SpecConstantOp 128 479 222
481: 18(int) SpecConstantOp 113 463(su)
482: 18(int) SpecConstantOp 128 481 69
217: 21(int) Constant 2
225: TypePointer Function 55(bool)
227: 21(int) Constant 0
297: 52(ivec2) ConstantComposite 25 25
306: 132(ivec3) ConstantComposite 69 69 69
348: 55(bool) ConstantTrue
355: 55(bool) ConstantFalse
356: 56(bvec2) ConstantComposite 355 355
368: TypeVector 55(bool) 3
369: 368(bvec3) ConstantComposite 355 355 355
371: TypeVector 94(float) 3
372: TypePointer Function 371(fvec3)
377: TypePointer Function 94(float)
388: 31(int) Constant 1
389: 31(int) Constant 2
390: 74(ivec2) ConstantComposite 388 389
395: 81(ivec2) ConstantComposite 217 22
400: TypePointer Function 368(bvec3)
462(Block): TypeStruct 136(ivec3) 14(int)
463: TypePointer Uniform 462(Block)
464(block): 463(ptr) Variable Uniform
465(si64): 18(int) SpecConstant 4294967286 4294967295
466(su64): 14(int) SpecConstant 20 0
467(si): 31(int) SpecConstant 4294967291
468(su): 21(int) SpecConstant 4
469(sb): 55(bool) SpecConstantTrue
470: 55(bool) SpecConstantOp 171 465(si64) 69
471: 55(bool) SpecConstantOp 171 466(su64) 69
472: 18(int) SpecConstantOp 169 469(sb) 61 60
473: 14(int) SpecConstantOp 169 469(sb) 70 69
474: 31(int) SpecConstantOp 114 465(si64)
475: 18(int) SpecConstantOp 114 467(si)
476: 21(int) SpecConstantOp 113 466(su64)
477: 14(int) SpecConstantOp 113 468(su)
478: 18(int) SpecConstantOp 128 466(su64) 69
479: 14(int) SpecConstantOp 128 465(si64) 69
480: 31(int) SpecConstantOp 113 466(su64)
481: 31(int) SpecConstantOp 128 480 227
482: 18(int) SpecConstantOp 114 467(si)
483: 14(int) SpecConstantOp 128 482 69
484: 31(int) SpecConstantOp 114 465(si64)
485: 21(int) SpecConstantOp 128 484 227
486: 18(int) SpecConstantOp 113 468(su)
487: 18(int) SpecConstantOp 128 486 69
4(main): 2 Function None 3
5: Label
Store 16(u64Max) 17
@ -286,7 +287,7 @@ spv.int64.frag
139(i64): 19(ptr) Variable Function
159(i): 158(ptr) Variable Function
166(uv): 165(ptr) Variable Function
221(b): 220(ptr) Variable Function
226(b): 225(ptr) Variable Function
135: 132(ivec3) Load 134(u64v)
137: 136(ivec3) CompositeConstruct 61 61 61
138: 132(ivec3) IAdd 135 137
@ -359,302 +360,308 @@ spv.int64.frag
195: 18(int) SConvert 194
196: 18(int) SMod 193 195
Store 139(i64) 196
197: 31(int) Load 159(i)
198: 18(int) SConvert 197
199: 14(int) Bitcast 198
200: 132(ivec3) Load 134(u64v)
201: 132(ivec3) CompositeConstruct 199 199 199
202: 132(ivec3) ShiftLeftLogical 200 201
Store 134(u64v) 202
197: 132(ivec3) Load 134(u64v)
198: 31(int) Load 159(i)
200: 199(ivec3) CompositeConstruct 198 198 198
201: 132(ivec3) ShiftLeftLogical 197 200
Store 134(u64v) 201
202: 18(int) Load 139(i64)
205: 204(ptr) AccessChain 166(uv) 203
206: 21(int) Load 205
207: 18(int) UConvert 206
208: 18(int) Bitcast 207
209: 18(int) Load 139(i64)
210: 18(int) ShiftRightArithmetic 209 208
Store 139(i64) 210
211: 18(int) Load 139(i64)
213: 40(ptr) AccessChain 134(u64v) 212
214: 14(int) Load 213
215: 18(int) ShiftLeftLogical 211 214
207: 18(int) ShiftRightArithmetic 202 206
Store 139(i64) 207
208: 31(int) Load 159(i)
209: 132(ivec3) Load 134(u64v)
210: 199(ivec3) CompositeConstruct 208 208 208
211: 132(ivec3) ShiftLeftLogical 209 210
Store 134(u64v) 211
212: 204(ptr) AccessChain 166(uv) 203
213: 21(int) Load 212
214: 18(int) Load 139(i64)
215: 18(int) ShiftRightArithmetic 214 213
Store 139(i64) 215
216: 132(ivec3) Load 134(u64v)
217: 18(int) Load 139(i64)
218: 136(ivec3) CompositeConstruct 217 217 217
219: 132(ivec3) ShiftLeftLogical 216 218
Store 134(u64v) 219
223: 40(ptr) AccessChain 134(u64v) 222
224: 14(int) Load 223
225: 18(int) Load 139(i64)
226: 14(int) Bitcast 225
227: 55(bool) INotEqual 224 226
Store 221(b) 227
228: 18(int) Load 139(i64)
229: 14(int) Bitcast 228
230: 40(ptr) AccessChain 134(u64v) 222
231: 14(int) Load 230
232: 55(bool) IEqual 229 231
Store 221(b) 232
233: 40(ptr) AccessChain 134(u64v) 222
234: 14(int) Load 233
235: 204(ptr) AccessChain 166(uv) 203
236: 21(int) Load 235
237: 14(int) UConvert 236
238: 55(bool) UGreaterThan 234 237
Store 221(b) 238
239: 18(int) Load 139(i64)
240: 31(int) Load 159(i)
241: 18(int) SConvert 240
242: 55(bool) SLessThan 239 241
Store 221(b) 242
243: 40(ptr) AccessChain 134(u64v) 203
244: 14(int) Load 243
245: 204(ptr) AccessChain 166(uv) 222
246: 21(int) Load 245
247: 14(int) UConvert 246
248: 55(bool) UGreaterThanEqual 244 247
Store 221(b) 248
249: 18(int) Load 139(i64)
250: 31(int) Load 159(i)
251: 18(int) SConvert 250
252: 55(bool) SLessThanEqual 249 251
Store 221(b) 252
253: 31(int) Load 159(i)
254: 18(int) SConvert 253
255: 14(int) Bitcast 254
256: 132(ivec3) Load 134(u64v)
257: 132(ivec3) CompositeConstruct 255 255 255
258: 132(ivec3) BitwiseOr 256 257
Store 134(u64v) 258
259: 18(int) Load 139(i64)
260: 31(int) Load 159(i)
261: 18(int) SConvert 260
262: 18(int) BitwiseOr 259 261
Store 139(i64) 262
263: 31(int) Load 159(i)
264: 18(int) SConvert 263
265: 18(int) Load 139(i64)
266: 18(int) BitwiseAnd 265 264
Store 139(i64) 266
267: 132(ivec3) Load 134(u64v)
268: 164(ivec3) Load 166(uv)
269: 132(ivec3) UConvert 268
270: 132(ivec3) BitwiseAnd 267 269
Store 134(u64v) 270
271: 18(int) Load 139(i64)
272: 14(int) Bitcast 271
273: 132(ivec3) Load 134(u64v)
274: 132(ivec3) CompositeConstruct 272 272 272
275: 132(ivec3) BitwiseXor 273 274
216: 18(int) Load 139(i64)
218: 40(ptr) AccessChain 134(u64v) 217
219: 14(int) Load 218
220: 18(int) ShiftLeftLogical 216 219
Store 139(i64) 220
221: 132(ivec3) Load 134(u64v)
222: 18(int) Load 139(i64)
223: 136(ivec3) CompositeConstruct 222 222 222
224: 132(ivec3) ShiftLeftLogical 221 223
Store 134(u64v) 224
228: 40(ptr) AccessChain 134(u64v) 227
229: 14(int) Load 228
230: 18(int) Load 139(i64)
231: 14(int) Bitcast 230
232: 55(bool) INotEqual 229 231
Store 226(b) 232
233: 18(int) Load 139(i64)
234: 14(int) Bitcast 233
235: 40(ptr) AccessChain 134(u64v) 227
236: 14(int) Load 235
237: 55(bool) IEqual 234 236
Store 226(b) 237
238: 40(ptr) AccessChain 134(u64v) 227
239: 14(int) Load 238
240: 204(ptr) AccessChain 166(uv) 203
241: 21(int) Load 240
242: 14(int) UConvert 241
243: 55(bool) UGreaterThan 239 242
Store 226(b) 243
244: 18(int) Load 139(i64)
245: 31(int) Load 159(i)
246: 18(int) SConvert 245
247: 55(bool) SLessThan 244 246
Store 226(b) 247
248: 40(ptr) AccessChain 134(u64v) 203
249: 14(int) Load 248
250: 204(ptr) AccessChain 166(uv) 227
251: 21(int) Load 250
252: 14(int) UConvert 251
253: 55(bool) UGreaterThanEqual 249 252
Store 226(b) 253
254: 18(int) Load 139(i64)
255: 31(int) Load 159(i)
256: 18(int) SConvert 255
257: 55(bool) SLessThanEqual 254 256
Store 226(b) 257
258: 31(int) Load 159(i)
259: 18(int) SConvert 258
260: 14(int) Bitcast 259
261: 132(ivec3) Load 134(u64v)
262: 132(ivec3) CompositeConstruct 260 260 260
263: 132(ivec3) BitwiseOr 261 262
Store 134(u64v) 263
264: 18(int) Load 139(i64)
265: 31(int) Load 159(i)
266: 18(int) SConvert 265
267: 18(int) BitwiseOr 264 266
Store 139(i64) 267
268: 31(int) Load 159(i)
269: 18(int) SConvert 268
270: 18(int) Load 139(i64)
271: 18(int) BitwiseAnd 270 269
Store 139(i64) 271
272: 132(ivec3) Load 134(u64v)
273: 164(ivec3) Load 166(uv)
274: 132(ivec3) UConvert 273
275: 132(ivec3) BitwiseAnd 272 274
Store 134(u64v) 275
276: 132(ivec3) Load 134(u64v)
277: 18(int) Load 139(i64)
278: 14(int) Bitcast 277
279: 132(ivec3) CompositeConstruct 278 278 278
280: 132(ivec3) BitwiseXor 276 279
276: 18(int) Load 139(i64)
277: 14(int) Bitcast 276
278: 132(ivec3) Load 134(u64v)
279: 132(ivec3) CompositeConstruct 277 277 277
280: 132(ivec3) BitwiseXor 278 279
Store 134(u64v) 280
281: 132(ivec3) Load 134(u64v)
282: 18(int) Load 139(i64)
283: 14(int) Bitcast 282
284: 132(ivec3) CompositeConstruct 283 283 283
285: 132(ivec3) BitwiseXor 281 284
Store 134(u64v) 285
Return
FunctionEnd
12(builtinFuncs(): 2 Function None 3
13: Label
281(i64v): 53(ptr) Variable Function
284(i64): 19(ptr) Variable Function
294(u64v): 133(ptr) Variable Function
296(u64): 40(ptr) Variable Function
368(dv): 367(ptr) Variable Function
387(iv): 75(ptr) Variable Function
392(uv): 82(ptr) Variable Function
396(bv): 395(ptr) Variable Function
282: 52(ivec2) Load 281(i64v)
283: 52(ivec2) ExtInst 1(GLSL.std.450) 5(SAbs) 282
Store 281(i64v) 283
285: 18(int) Load 284(i64)
286: 18(int) ExtInst 1(GLSL.std.450) 7(SSign) 285
Store 284(i64) 286
287: 52(ivec2) Load 281(i64v)
288: 18(int) Load 284(i64)
289: 52(ivec2) CompositeConstruct 288 288
290: 52(ivec2) ExtInst 1(GLSL.std.450) 39(SMin) 287 289
Store 281(i64v) 290
291: 52(ivec2) Load 281(i64v)
293: 52(ivec2) ExtInst 1(GLSL.std.450) 39(SMin) 291 292
Store 281(i64v) 293
295: 132(ivec3) Load 294(u64v)
297: 14(int) Load 296(u64)
298: 132(ivec3) CompositeConstruct 297 297 297
299: 132(ivec3) ExtInst 1(GLSL.std.450) 38(UMin) 295 298
Store 294(u64v) 299
300: 132(ivec3) Load 294(u64v)
302: 132(ivec3) ExtInst 1(GLSL.std.450) 38(UMin) 300 301
Store 294(u64v) 302
303: 52(ivec2) Load 281(i64v)
304: 18(int) Load 284(i64)
305: 52(ivec2) CompositeConstruct 304 304
306: 52(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 303 305
Store 281(i64v) 306
307: 52(ivec2) Load 281(i64v)
308: 52(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 307 292
Store 281(i64v) 308
309: 132(ivec3) Load 294(u64v)
310: 14(int) Load 296(u64)
311: 132(ivec3) CompositeConstruct 310 310 310
312: 132(ivec3) ExtInst 1(GLSL.std.450) 41(UMax) 309 311
Store 294(u64v) 312
313: 132(ivec3) Load 294(u64v)
314: 132(ivec3) ExtInst 1(GLSL.std.450) 41(UMax) 313 301
Store 294(u64v) 314
315: 52(ivec2) Load 281(i64v)
316: 18(int) Load 284(i64)
317: 18(int) SNegate 316
318: 18(int) Load 284(i64)
319: 52(ivec2) CompositeConstruct 317 317
320: 52(ivec2) CompositeConstruct 318 318
321: 52(ivec2) ExtInst 1(GLSL.std.450) 45(SClamp) 315 319 320
Store 281(i64v) 321
322: 52(ivec2) Load 281(i64v)
323: 52(ivec2) Load 281(i64v)
324: 52(ivec2) SNegate 323
325: 52(ivec2) Load 281(i64v)
326: 52(ivec2) ExtInst 1(GLSL.std.450) 45(SClamp) 322 324 325
Store 281(i64v) 326
327: 132(ivec3) Load 294(u64v)
328: 14(int) Load 296(u64)
329: 14(int) SNegate 328
330: 14(int) Load 296(u64)
331: 132(ivec3) CompositeConstruct 329 329 329
332: 132(ivec3) CompositeConstruct 330 330 330
333: 132(ivec3) ExtInst 1(GLSL.std.450) 44(UClamp) 327 331 332
Store 294(u64v) 333
334: 132(ivec3) Load 294(u64v)
335: 132(ivec3) Load 294(u64v)
336: 132(ivec3) SNegate 335
337: 132(ivec3) Load 294(u64v)
338: 132(ivec3) ExtInst 1(GLSL.std.450) 44(UClamp) 334 336 337
Store 294(u64v) 338
339: 19(ptr) AccessChain 281(i64v) 222
340: 18(int) Load 339
341: 19(ptr) AccessChain 281(i64v) 203
342: 18(int) Load 341
344: 18(int) Select 343 342 340
Store 284(i64) 344
345: 18(int) Load 284(i64)
346: 52(ivec2) CompositeConstruct 345 345
347: 18(int) Load 284(i64)
348: 18(int) SNegate 347
349: 52(ivec2) CompositeConstruct 348 348
352: 52(ivec2) Select 351 349 346
Store 281(i64v) 352
353: 40(ptr) AccessChain 294(u64v) 222
354: 14(int) Load 353
355: 40(ptr) AccessChain 294(u64v) 203
356: 14(int) Load 355
357: 14(int) Select 343 356 354
Store 296(u64) 357
358: 14(int) Load 296(u64)
359: 132(ivec3) CompositeConstruct 358 358 358
360: 14(int) Load 296(u64)
361: 14(int) SNegate 360
362: 132(ivec3) CompositeConstruct 361 361 361
365: 132(ivec3) Select 364 362 359
Store 294(u64v) 365
369: 366(fvec3) Load 368(dv)
370: 95(fvec2) VectorShuffle 369 369 0 1
371: 52(ivec2) Bitcast 370
Store 281(i64v) 371
373: 372(ptr) AccessChain 368(dv) 212
374: 94(float) Load 373
375: 14(int) Bitcast 374
376: 40(ptr) AccessChain 294(u64v) 222
Store 376 375
377: 52(ivec2) Load 281(i64v)
378: 95(fvec2) Bitcast 377
379: 366(fvec3) Load 368(dv)
380: 366(fvec3) VectorShuffle 379 378 3 4 2
Store 368(dv) 380
381: 132(ivec3) Load 294(u64v)
382: 366(fvec3) Bitcast 381
Store 368(dv) 382
386: 18(int) Bitcast 385
Store 284(i64) 386
388: 18(int) Load 284(i64)
389: 74(ivec2) Bitcast 388
Store 387(iv) 389
391: 14(int) Bitcast 390
Store 296(u64) 391
393: 14(int) Load 296(u64)
394: 81(ivec2) Bitcast 393
Store 392(uv) 394
397: 132(ivec3) Load 294(u64v)
398: 14(int) Load 296(u64)
399: 132(ivec3) CompositeConstruct 398 398 398
400: 363(bvec3) ULessThan 397 399
Store 396(bv) 400
401: 52(ivec2) Load 281(i64v)
402: 18(int) Load 284(i64)
403: 52(ivec2) CompositeConstruct 402 402
404: 56(bvec2) SLessThan 401 403
405: 363(bvec3) Load 396(bv)
406: 363(bvec3) VectorShuffle 405 404 3 4 2
Store 396(bv) 406
407: 132(ivec3) Load 294(u64v)
408: 14(int) Load 296(u64)
409: 132(ivec3) CompositeConstruct 408 408 408
410: 363(bvec3) ULessThanEqual 407 409
Store 396(bv) 410
411: 52(ivec2) Load 281(i64v)
412: 18(int) Load 284(i64)
413: 52(ivec2) CompositeConstruct 412 412
414: 56(bvec2) SLessThanEqual 411 413
415: 363(bvec3) Load 396(bv)
416: 363(bvec3) VectorShuffle 415 414 3 4 2
Store 396(bv) 416
417: 132(ivec3) Load 294(u64v)
418: 14(int) Load 296(u64)
419: 132(ivec3) CompositeConstruct 418 418 418
420: 363(bvec3) UGreaterThan 417 419
Store 396(bv) 420
421: 52(ivec2) Load 281(i64v)
422: 18(int) Load 284(i64)
423: 52(ivec2) CompositeConstruct 422 422
424: 56(bvec2) SGreaterThan 421 423
425: 363(bvec3) Load 396(bv)
426: 363(bvec3) VectorShuffle 425 424 3 4 2
Store 396(bv) 426
427: 132(ivec3) Load 294(u64v)
428: 14(int) Load 296(u64)
429: 132(ivec3) CompositeConstruct 428 428 428
430: 363(bvec3) UGreaterThanEqual 427 429
Store 396(bv) 430
431: 52(ivec2) Load 281(i64v)
432: 18(int) Load 284(i64)
433: 52(ivec2) CompositeConstruct 432 432
434: 56(bvec2) SGreaterThanEqual 431 433
435: 363(bvec3) Load 396(bv)
436: 363(bvec3) VectorShuffle 435 434 3 4 2
Store 396(bv) 436
437: 132(ivec3) Load 294(u64v)
438: 14(int) Load 296(u64)
439: 132(ivec3) CompositeConstruct 438 438 438
440: 363(bvec3) IEqual 437 439
Store 396(bv) 440
441: 52(ivec2) Load 281(i64v)
442: 18(int) Load 284(i64)
443: 52(ivec2) CompositeConstruct 442 442
444: 56(bvec2) IEqual 441 443
445: 363(bvec3) Load 396(bv)
446: 363(bvec3) VectorShuffle 445 444 3 4 2
Store 396(bv) 446
447: 132(ivec3) Load 294(u64v)
448: 14(int) Load 296(u64)
449: 132(ivec3) CompositeConstruct 448 448 448
450: 363(bvec3) INotEqual 447 449
Store 396(bv) 450
451: 52(ivec2) Load 281(i64v)
452: 18(int) Load 284(i64)
453: 52(ivec2) CompositeConstruct 452 452
454: 56(bvec2) INotEqual 451 453
455: 363(bvec3) Load 396(bv)
456: 363(bvec3) VectorShuffle 455 454 3 4 2
Store 396(bv) 456
286(i64v): 53(ptr) Variable Function
289(i64): 19(ptr) Variable Function
299(u64v): 133(ptr) Variable Function
301(u64): 40(ptr) Variable Function
373(dv): 372(ptr) Variable Function
392(iv): 75(ptr) Variable Function
397(uv): 82(ptr) Variable Function
401(bv): 400(ptr) Variable Function
287: 52(ivec2) Load 286(i64v)
288: 52(ivec2) ExtInst 1(GLSL.std.450) 5(SAbs) 287
Store 286(i64v) 288
290: 18(int) Load 289(i64)
291: 18(int) ExtInst 1(GLSL.std.450) 7(SSign) 290
Store 289(i64) 291
292: 52(ivec2) Load 286(i64v)
293: 18(int) Load 289(i64)
294: 52(ivec2) CompositeConstruct 293 293
295: 52(ivec2) ExtInst 1(GLSL.std.450) 39(SMin) 292 294
Store 286(i64v) 295
296: 52(ivec2) Load 286(i64v)
298: 52(ivec2) ExtInst 1(GLSL.std.450) 39(SMin) 296 297
Store 286(i64v) 298
300: 132(ivec3) Load 299(u64v)
302: 14(int) Load 301(u64)
303: 132(ivec3) CompositeConstruct 302 302 302
304: 132(ivec3) ExtInst 1(GLSL.std.450) 38(UMin) 300 303
Store 299(u64v) 304
305: 132(ivec3) Load 299(u64v)
307: 132(ivec3) ExtInst 1(GLSL.std.450) 38(UMin) 305 306
Store 299(u64v) 307
308: 52(ivec2) Load 286(i64v)
309: 18(int) Load 289(i64)
310: 52(ivec2) CompositeConstruct 309 309
311: 52(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 308 310
Store 286(i64v) 311
312: 52(ivec2) Load 286(i64v)
313: 52(ivec2) ExtInst 1(GLSL.std.450) 42(SMax) 312 297
Store 286(i64v) 313
314: 132(ivec3) Load 299(u64v)
315: 14(int) Load 301(u64)
316: 132(ivec3) CompositeConstruct 315 315 315
317: 132(ivec3) ExtInst 1(GLSL.std.450) 41(UMax) 314 316
Store 299(u64v) 317
318: 132(ivec3) Load 299(u64v)
319: 132(ivec3) ExtInst 1(GLSL.std.450) 41(UMax) 318 306
Store 299(u64v) 319
320: 52(ivec2) Load 286(i64v)
321: 18(int) Load 289(i64)
322: 18(int) SNegate 321
323: 18(int) Load 289(i64)
324: 52(ivec2) CompositeConstruct 322 322
325: 52(ivec2) CompositeConstruct 323 323
326: 52(ivec2) ExtInst 1(GLSL.std.450) 45(SClamp) 320 324 325
Store 286(i64v) 326
327: 52(ivec2) Load 286(i64v)
328: 52(ivec2) Load 286(i64v)
329: 52(ivec2) SNegate 328
330: 52(ivec2) Load 286(i64v)
331: 52(ivec2) ExtInst 1(GLSL.std.450) 45(SClamp) 327 329 330
Store 286(i64v) 331
332: 132(ivec3) Load 299(u64v)
333: 14(int) Load 301(u64)
334: 14(int) SNegate 333
335: 14(int) Load 301(u64)
336: 132(ivec3) CompositeConstruct 334 334 334
337: 132(ivec3) CompositeConstruct 335 335 335
338: 132(ivec3) ExtInst 1(GLSL.std.450) 44(UClamp) 332 336 337
Store 299(u64v) 338
339: 132(ivec3) Load 299(u64v)
340: 132(ivec3) Load 299(u64v)
341: 132(ivec3) SNegate 340
342: 132(ivec3) Load 299(u64v)
343: 132(ivec3) ExtInst 1(GLSL.std.450) 44(UClamp) 339 341 342
Store 299(u64v) 343
344: 19(ptr) AccessChain 286(i64v) 227
345: 18(int) Load 344
346: 19(ptr) AccessChain 286(i64v) 203
347: 18(int) Load 346
349: 18(int) Select 348 347 345
Store 289(i64) 349
350: 18(int) Load 289(i64)
351: 52(ivec2) CompositeConstruct 350 350
352: 18(int) Load 289(i64)
353: 18(int) SNegate 352
354: 52(ivec2) CompositeConstruct 353 353
357: 52(ivec2) Select 356 354 351
Store 286(i64v) 357
358: 40(ptr) AccessChain 299(u64v) 227
359: 14(int) Load 358
360: 40(ptr) AccessChain 299(u64v) 203
361: 14(int) Load 360
362: 14(int) Select 348 361 359
Store 301(u64) 362
363: 14(int) Load 301(u64)
364: 132(ivec3) CompositeConstruct 363 363 363
365: 14(int) Load 301(u64)
366: 14(int) SNegate 365
367: 132(ivec3) CompositeConstruct 366 366 366
370: 132(ivec3) Select 369 367 364
Store 299(u64v) 370
374: 371(fvec3) Load 373(dv)
375: 95(fvec2) VectorShuffle 374 374 0 1
376: 52(ivec2) Bitcast 375
Store 286(i64v) 376
378: 377(ptr) AccessChain 373(dv) 217
379: 94(float) Load 378
380: 14(int) Bitcast 379
381: 40(ptr) AccessChain 299(u64v) 227
Store 381 380
382: 52(ivec2) Load 286(i64v)
383: 95(fvec2) Bitcast 382
384: 371(fvec3) Load 373(dv)
385: 371(fvec3) VectorShuffle 384 383 3 4 2
Store 373(dv) 385
386: 132(ivec3) Load 299(u64v)
387: 371(fvec3) Bitcast 386
Store 373(dv) 387
391: 18(int) Bitcast 390
Store 289(i64) 391
393: 18(int) Load 289(i64)
394: 74(ivec2) Bitcast 393
Store 392(iv) 394
396: 14(int) Bitcast 395
Store 301(u64) 396
398: 14(int) Load 301(u64)
399: 81(ivec2) Bitcast 398
Store 397(uv) 399
402: 132(ivec3) Load 299(u64v)
403: 14(int) Load 301(u64)
404: 132(ivec3) CompositeConstruct 403 403 403
405: 368(bvec3) ULessThan 402 404
Store 401(bv) 405
406: 52(ivec2) Load 286(i64v)
407: 18(int) Load 289(i64)
408: 52(ivec2) CompositeConstruct 407 407
409: 56(bvec2) SLessThan 406 408
410: 368(bvec3) Load 401(bv)
411: 368(bvec3) VectorShuffle 410 409 3 4 2
Store 401(bv) 411
412: 132(ivec3) Load 299(u64v)
413: 14(int) Load 301(u64)
414: 132(ivec3) CompositeConstruct 413 413 413
415: 368(bvec3) ULessThanEqual 412 414
Store 401(bv) 415
416: 52(ivec2) Load 286(i64v)
417: 18(int) Load 289(i64)
418: 52(ivec2) CompositeConstruct 417 417
419: 56(bvec2) SLessThanEqual 416 418
420: 368(bvec3) Load 401(bv)
421: 368(bvec3) VectorShuffle 420 419 3 4 2
Store 401(bv) 421
422: 132(ivec3) Load 299(u64v)
423: 14(int) Load 301(u64)
424: 132(ivec3) CompositeConstruct 423 423 423
425: 368(bvec3) UGreaterThan 422 424
Store 401(bv) 425
426: 52(ivec2) Load 286(i64v)
427: 18(int) Load 289(i64)
428: 52(ivec2) CompositeConstruct 427 427
429: 56(bvec2) SGreaterThan 426 428
430: 368(bvec3) Load 401(bv)
431: 368(bvec3) VectorShuffle 430 429 3 4 2
Store 401(bv) 431
432: 132(ivec3) Load 299(u64v)
433: 14(int) Load 301(u64)
434: 132(ivec3) CompositeConstruct 433 433 433
435: 368(bvec3) UGreaterThanEqual 432 434
Store 401(bv) 435
436: 52(ivec2) Load 286(i64v)
437: 18(int) Load 289(i64)
438: 52(ivec2) CompositeConstruct 437 437
439: 56(bvec2) SGreaterThanEqual 436 438
440: 368(bvec3) Load 401(bv)
441: 368(bvec3) VectorShuffle 440 439 3 4 2
Store 401(bv) 441
442: 132(ivec3) Load 299(u64v)
443: 14(int) Load 301(u64)
444: 132(ivec3) CompositeConstruct 443 443 443
445: 368(bvec3) IEqual 442 444
Store 401(bv) 445
446: 52(ivec2) Load 286(i64v)
447: 18(int) Load 289(i64)
448: 52(ivec2) CompositeConstruct 447 447
449: 56(bvec2) IEqual 446 448
450: 368(bvec3) Load 401(bv)
451: 368(bvec3) VectorShuffle 450 449 3 4 2
Store 401(bv) 451
452: 132(ivec3) Load 299(u64v)
453: 14(int) Load 301(u64)
454: 132(ivec3) CompositeConstruct 453 453 453
455: 368(bvec3) INotEqual 452 454
Store 401(bv) 455
456: 52(ivec2) Load 286(i64v)
457: 18(int) Load 289(i64)
458: 52(ivec2) CompositeConstruct 457 457
459: 56(bvec2) INotEqual 456 458
460: 368(bvec3) Load 401(bv)
461: 368(bvec3) VectorShuffle 460 459 3 4 2
Store 401(bv) 461
Return
FunctionEnd