Allow 8/16-bit integer as array index

Also enable 8/16 bit int capability in SPIR-V in such cases.

Also enable 64 bit capabilities when used in operations.

Fixes #2779
This commit is contained in:
Greg Fischer 2021-10-18 18:28:01 -06:00
parent 6351fcef28
commit 82b2668d58
6 changed files with 988 additions and 924 deletions

View File

@ -111,8 +111,6 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
} }
} }
break; break;
case OpAccessChain:
case OpPtrAccessChain:
case OpCopyObject: case OpCopyObject:
break; break;
case OpFConvert: case OpFConvert:
@ -172,13 +170,30 @@ void Builder::postProcessType(const Instruction& inst, Id typeId)
break; break;
} }
break; break;
default: case OpAccessChain:
if (basicTypeOp == OpTypeFloat && width == 16) case OpPtrAccessChain:
addCapability(CapabilityFloat16); if (isPointerType(typeId))
if (basicTypeOp == OpTypeInt && width == 16) break;
if (basicTypeOp == OpTypeInt) {
if (width == 16)
addCapability(CapabilityInt16); addCapability(CapabilityInt16);
if (basicTypeOp == OpTypeInt && width == 8) else if (width == 8)
addCapability(CapabilityInt8); addCapability(CapabilityInt8);
}
default:
if (basicTypeOp == OpTypeInt) {
if (width == 16)
addCapability(CapabilityInt16);
else if (width == 8)
addCapability(CapabilityInt8);
else if (width == 64)
addCapability(CapabilityInt64);
} else if (basicTypeOp == OpTypeFloat) {
if (width == 16)
addCapability(CapabilityFloat16);
else if (width == 64)
addCapability(CapabilityFloat64);
}
break; break;
} }
} }

View File

@ -1,7 +1,7 @@
spv.int16.frag spv.int16.frag
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 535 // Id's are bound by 549
Capability Shader Capability Shader
Capability Float16 Capability Float16
@ -48,53 +48,55 @@ spv.int16.frag
Name 154 "i8v" Name 154 "i8v"
Name 163 "u8v" Name 163 "u8v"
Name 176 "bv" Name 176 "bv"
Name 195 "u16v" Name 196 "arr"
Name 200 "i16" Name 204 "u16v"
Name 220 "i" Name 209 "i16"
Name 227 "uv" Name 229 "i"
Name 243 "i64" Name 236 "uv"
Name 281 "b" Name 252 "i64"
Name 343 "i16v" Name 290 "b"
Name 346 "i16" Name 353 "f"
Name 356 "u16v" Name 357 "i16v"
Name 358 "u16" Name 360 "i16"
Name 428 "i32" Name 370 "u16v"
Name 431 "i64" Name 372 "u16"
Name 434 "i16v4" Name 442 "i32"
Name 437 "u32" Name 445 "i64"
Name 438 "u16v2" Name 448 "i16v4"
Name 442 "u64" Name 451 "u32"
Name 445 "u16v4" Name 452 "u16v2"
Name 457 "bv" Name 456 "u64"
Name 530 "Block" Name 459 "u16v4"
MemberName 530(Block) 0 "i16" Name 471 "bv"
MemberName 530(Block) 1 "i16v2" Name 544 "Block"
MemberName 530(Block) 2 "i16v3" MemberName 544(Block) 0 "i16"
MemberName 530(Block) 3 "i16v4" MemberName 544(Block) 1 "i16v2"
MemberName 530(Block) 4 "u16" MemberName 544(Block) 2 "i16v3"
MemberName 530(Block) 5 "u16v2" MemberName 544(Block) 3 "i16v4"
MemberName 530(Block) 6 "u16v3" MemberName 544(Block) 4 "u16"
MemberName 530(Block) 7 "u16v4" MemberName 544(Block) 5 "u16v2"
Name 532 "block" MemberName 544(Block) 6 "u16v3"
Name 533 "si16" MemberName 544(Block) 7 "u16v4"
Name 534 "su16" Name 546 "block"
Name 547 "si16"
Name 548 "su16"
MemberDecorate 24(Uniforms) 0 Offset 0 MemberDecorate 24(Uniforms) 0 Offset 0
Decorate 24(Uniforms) Block Decorate 24(Uniforms) Block
Decorate 26 DescriptorSet 0 Decorate 26 DescriptorSet 0
Decorate 26 Binding 0 Decorate 26 Binding 0
MemberDecorate 530(Block) 0 Offset 0 MemberDecorate 544(Block) 0 Offset 0
MemberDecorate 530(Block) 1 Offset 4 MemberDecorate 544(Block) 1 Offset 4
MemberDecorate 530(Block) 2 Offset 8 MemberDecorate 544(Block) 2 Offset 8
MemberDecorate 530(Block) 3 Offset 16 MemberDecorate 544(Block) 3 Offset 16
MemberDecorate 530(Block) 4 Offset 24 MemberDecorate 544(Block) 4 Offset 24
MemberDecorate 530(Block) 5 Offset 28 MemberDecorate 544(Block) 5 Offset 28
MemberDecorate 530(Block) 6 Offset 32 MemberDecorate 544(Block) 6 Offset 32
MemberDecorate 530(Block) 7 Offset 40 MemberDecorate 544(Block) 7 Offset 40
Decorate 530(Block) Block Decorate 544(Block) Block
Decorate 532(block) DescriptorSet 0 Decorate 546(block) DescriptorSet 0
Decorate 532(block) Binding 1 Decorate 546(block) Binding 1
Decorate 533(si16) SpecId 100 Decorate 547(si16) SpecId 100
Decorate 534(su16) SpecId 101 Decorate 548(su16) SpecId 101
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
14: TypeInt 16 1 14: TypeInt 16 1
@ -160,37 +162,46 @@ spv.int16.frag
185: 36(int16_t) Constant 1 185: 36(int16_t) Constant 1
186: 57(i16vec2) ConstantComposite 184 184 186: 57(i16vec2) ConstantComposite 184 184
187: 57(i16vec2) ConstantComposite 185 185 187: 57(i16vec2) ConstantComposite 185 185
193: TypeVector 36(int16_t) 3 193: 17(int) Constant 4
194: TypePointer Function 193(i16vec3) 194: TypeArray 97(float) 193
197: TypeVector 14(int16_t) 3 195: TypePointer Function 194
219: TypePointer Function 27(int) 197: 97(float) Constant 1065353216
225: TypeVector 17(int) 3 198: 97(float) Constant 1073741824
226: TypePointer Function 225(ivec3) 199: 97(float) Constant 1077936128
242: TypePointer Function 71(int64_t) 200: 97(float) Constant 1082130432
264: 17(int) Constant 1 201: 194 ConstantComposite 197 198 199 200
270: 17(int) Constant 2 202: TypeVector 36(int16_t) 3
276: TypeVector 27(int) 3 203: TypePointer Function 202(i16vec3)
280: TypePointer Function 173(bool) 206: TypeVector 14(int16_t) 3
282: 17(int) Constant 0 228: TypePointer Function 27(int)
296: TypePointer Function 17(int) 234: TypeVector 17(int) 3
354: 52(i16vec2) ConstantComposite 21 21 235: TypePointer Function 234(ivec3)
363:193(i16vec3) ConstantComposite 184 184 184 251: TypePointer Function 71(int64_t)
405: 173(bool) ConstantTrue 273: 17(int) Constant 1
412: 173(bool) ConstantFalse 279: 17(int) Constant 2
413: 174(bvec2) ConstantComposite 412 412 285: TypeVector 27(int) 3
425: TypeVector 173(bool) 3 289: TypePointer Function 173(bool)
426: 425(bvec3) ConstantComposite 412 412 412 291: 17(int) Constant 0
432: TypeVector 14(int16_t) 4 305: TypePointer Function 17(int)
433: TypePointer Function 432(i16vec4) 352: TypePointer Function 97(float)
441: TypePointer Function 77(int64_t) 368: 52(i16vec2) ConstantComposite 21 21
443: TypeVector 36(int16_t) 4 377:202(i16vec3) ConstantComposite 184 184 184
444: TypePointer Function 443(i16vec4) 419: 173(bool) ConstantTrue
456: TypePointer Function 425(bvec3) 426: 173(bool) ConstantFalse
530(Block): TypeStruct 14(int16_t) 52(i16vec2) 197(i16vec3) 432(i16vec4) 36(int16_t) 57(i16vec2) 193(i16vec3) 443(i16vec4) 427: 174(bvec2) ConstantComposite 426 426
531: TypePointer Uniform 530(Block) 439: TypeVector 173(bool) 3
532(block): 531(ptr) Variable Uniform 440: 439(bvec3) ConstantComposite 426 426 426
533(si16): 14(int16_t) SpecConstant 4294967286 446: TypeVector 14(int16_t) 4
534(su16): 36(int16_t) SpecConstant 20 447: TypePointer Function 446(i16vec4)
455: TypePointer Function 77(int64_t)
457: TypeVector 36(int16_t) 4
458: TypePointer Function 457(i16vec4)
470: TypePointer Function 439(bvec3)
544(Block): TypeStruct 14(int16_t) 52(i16vec2) 206(i16vec3) 446(i16vec4) 36(int16_t) 57(i16vec2) 202(i16vec3) 457(i16vec4)
545: TypePointer Uniform 544(Block)
546(block): 545(ptr) Variable Uniform
547(si16): 14(int16_t) SpecConstant 4294967286
548(su16): 36(int16_t) SpecConstant 20
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
Return Return
@ -364,397 +375,404 @@ spv.int16.frag
FunctionEnd FunctionEnd
10(operators(): 2 Function None 3 10(operators(): 2 Function None 3
11: Label 11: Label
195(u16v): 194(ptr) Variable Function 196(arr): 195(ptr) Variable Function
200(i16): 15(ptr) Variable Function 204(u16v): 203(ptr) Variable Function
220(i): 219(ptr) Variable Function 209(i16): 15(ptr) Variable Function
227(uv): 226(ptr) Variable Function 229(i): 228(ptr) Variable Function
243(i64): 242(ptr) Variable Function 236(uv): 235(ptr) Variable Function
281(b): 280(ptr) Variable Function 252(i64): 251(ptr) Variable Function
196:193(i16vec3) Load 195(u16v) 290(b): 289(ptr) Variable Function
198:197(i16vec3) CompositeConstruct 179 179 179 353(f): 352(ptr) Variable Function
199:193(i16vec3) IAdd 196 198 Store 196(arr) 201
Store 195(u16v) 199 205:202(i16vec3) Load 204(u16v)
201: 14(int16_t) Load 200(i16) 207:206(i16vec3) CompositeConstruct 179 179 179
202: 14(int16_t) ISub 201 179 208:202(i16vec3) IAdd 205 207
Store 200(i16) 202 Store 204(u16v) 208
203: 14(int16_t) Load 200(i16) 210: 14(int16_t) Load 209(i16)
204: 14(int16_t) IAdd 203 179 211: 14(int16_t) ISub 210 179
Store 200(i16) 204 Store 209(i16) 211
205:193(i16vec3) Load 195(u16v) 212: 14(int16_t) Load 209(i16)
206:197(i16vec3) CompositeConstruct 179 179 179 213: 14(int16_t) IAdd 212 179
207:193(i16vec3) ISub 205 206 Store 209(i16) 213
Store 195(u16v) 207 214:202(i16vec3) Load 204(u16v)
208:193(i16vec3) Load 195(u16v) 215:206(i16vec3) CompositeConstruct 179 179 179
209:193(i16vec3) Not 208 216:202(i16vec3) ISub 214 215
Store 195(u16v) 209 Store 204(u16v) 216
210: 14(int16_t) Load 200(i16) 217:202(i16vec3) Load 204(u16v)
Store 200(i16) 210 218:202(i16vec3) Not 217
211:193(i16vec3) Load 195(u16v) Store 204(u16v) 218
212:193(i16vec3) SNegate 211 219: 14(int16_t) Load 209(i16)
Store 195(u16v) 212 Store 209(i16) 219
213: 14(int16_t) Load 200(i16) 220:202(i16vec3) Load 204(u16v)
214: 14(int16_t) Load 200(i16) 221:202(i16vec3) SNegate 220
215: 14(int16_t) IAdd 214 213 Store 204(u16v) 221
Store 200(i16) 215 222: 14(int16_t) Load 209(i16)
216:193(i16vec3) Load 195(u16v) 223: 14(int16_t) Load 209(i16)
217:193(i16vec3) Load 195(u16v) 224: 14(int16_t) IAdd 223 222
218:193(i16vec3) ISub 217 216 Store 209(i16) 224
Store 195(u16v) 218 225:202(i16vec3) Load 204(u16v)
221: 14(int16_t) Load 200(i16) 226:202(i16vec3) Load 204(u16v)
222: 27(int) SConvert 221 227:202(i16vec3) ISub 226 225
223: 27(int) Load 220(i) Store 204(u16v) 227
224: 27(int) IMul 223 222 230: 14(int16_t) Load 209(i16)
Store 220(i) 224 231: 27(int) SConvert 230
228:193(i16vec3) Load 195(u16v) 232: 27(int) Load 229(i)
229: 225(ivec3) UConvert 228 233: 27(int) IMul 232 231
230: 225(ivec3) Load 227(uv) Store 229(i) 233
231: 225(ivec3) UDiv 230 229 237:202(i16vec3) Load 204(u16v)
Store 227(uv) 231 238: 234(ivec3) UConvert 237
232: 14(int16_t) Load 200(i16) 239: 234(ivec3) Load 236(uv)
233: 27(int) SConvert 232 240: 234(ivec3) UDiv 239 238
234: 17(int) Bitcast 233 Store 236(uv) 240
235: 225(ivec3) Load 227(uv) 241: 14(int16_t) Load 209(i16)
236: 225(ivec3) CompositeConstruct 234 234 234 242: 27(int) SConvert 241
237: 225(ivec3) UMod 235 236 243: 17(int) Bitcast 242
Store 227(uv) 237 244: 234(ivec3) Load 236(uv)
238:193(i16vec3) Load 195(u16v) 245: 234(ivec3) CompositeConstruct 243 243 243
239: 225(ivec3) UConvert 238 246: 234(ivec3) UMod 244 245
240: 225(ivec3) Load 227(uv) Store 236(uv) 246
241: 225(ivec3) IAdd 239 240 247:202(i16vec3) Load 204(u16v)
Store 227(uv) 241 248: 234(ivec3) UConvert 247
244: 14(int16_t) Load 200(i16) 249: 234(ivec3) Load 236(uv)
245: 71(int64_t) SConvert 244 250: 234(ivec3) IAdd 248 249
246: 71(int64_t) Load 243(i64) Store 236(uv) 250
247: 71(int64_t) ISub 245 246 253: 14(int16_t) Load 209(i16)
Store 243(i64) 247 254: 71(int64_t) SConvert 253
248:193(i16vec3) Load 195(u16v) 255: 71(int64_t) Load 252(i64)
249: 225(ivec3) UConvert 248 256: 71(int64_t) ISub 254 255
250: 225(ivec3) Load 227(uv) Store 252(i64) 256
251: 225(ivec3) IMul 249 250 257:202(i16vec3) Load 204(u16v)
Store 227(uv) 251 258: 234(ivec3) UConvert 257
252: 14(int16_t) Load 200(i16) 259: 234(ivec3) Load 236(uv)
253: 71(int64_t) SConvert 252 260: 234(ivec3) IMul 258 259
254: 71(int64_t) Load 243(i64) Store 236(uv) 260
255: 71(int64_t) IMul 253 254 261: 14(int16_t) Load 209(i16)
Store 243(i64) 255 262: 71(int64_t) SConvert 261
256: 14(int16_t) Load 200(i16) 263: 71(int64_t) Load 252(i64)
257: 27(int) SConvert 256 264: 71(int64_t) IMul 262 263
258: 27(int) Load 220(i) Store 252(i64) 264
259: 27(int) SMod 257 258 265: 14(int16_t) Load 209(i16)
Store 220(i) 259 266: 27(int) SConvert 265
260: 14(int16_t) Load 200(i16) 267: 27(int) Load 229(i)
261:193(i16vec3) Load 195(u16v) 268: 27(int) SMod 266 267
262:197(i16vec3) CompositeConstruct 260 260 260 Store 229(i) 268
263:193(i16vec3) ShiftLeftLogical 261 262 269: 14(int16_t) Load 209(i16)
Store 195(u16v) 263 270:202(i16vec3) Load 204(u16v)
265: 37(ptr) AccessChain 195(u16v) 264 271:206(i16vec3) CompositeConstruct 269 269 269
266: 36(int16_t) Load 265 272:202(i16vec3) ShiftLeftLogical 270 271
267: 14(int16_t) Load 200(i16) Store 204(u16v) 272
268: 14(int16_t) ShiftRightArithmetic 267 266 274: 37(ptr) AccessChain 204(u16v) 273
Store 200(i16) 268 275: 36(int16_t) Load 274
269: 14(int16_t) Load 200(i16) 276: 14(int16_t) Load 209(i16)
271: 37(ptr) AccessChain 195(u16v) 270 277: 14(int16_t) ShiftRightArithmetic 276 275
272: 36(int16_t) Load 271 Store 209(i16) 277
273: 14(int16_t) ShiftLeftLogical 269 272 278: 14(int16_t) Load 209(i16)
Store 200(i16) 273 280: 37(ptr) AccessChain 204(u16v) 279
274:193(i16vec3) Load 195(u16v) 281: 36(int16_t) Load 280
275: 27(int) Load 220(i) 282: 14(int16_t) ShiftLeftLogical 278 281
277: 276(ivec3) CompositeConstruct 275 275 275 Store 209(i16) 282
278:193(i16vec3) ShiftLeftLogical 274 277 283:202(i16vec3) Load 204(u16v)
279: 225(ivec3) UConvert 278 284: 27(int) Load 229(i)
Store 227(uv) 279 286: 285(ivec3) CompositeConstruct 284 284 284
283: 37(ptr) AccessChain 195(u16v) 282 287:202(i16vec3) ShiftLeftLogical 283 286
284: 36(int16_t) Load 283 288: 234(ivec3) UConvert 287
285: 14(int16_t) Load 200(i16) Store 236(uv) 288
286: 36(int16_t) Bitcast 285 292: 37(ptr) AccessChain 204(u16v) 291
287: 173(bool) INotEqual 284 286 293: 36(int16_t) Load 292
Store 281(b) 287 294: 14(int16_t) Load 209(i16)
288: 14(int16_t) Load 200(i16) 295: 36(int16_t) Bitcast 294
289: 36(int16_t) Bitcast 288 296: 173(bool) INotEqual 293 295
290: 37(ptr) AccessChain 195(u16v) 282 Store 290(b) 296
291: 36(int16_t) Load 290 297: 14(int16_t) Load 209(i16)
292: 173(bool) IEqual 289 291 298: 36(int16_t) Bitcast 297
Store 281(b) 292 299: 37(ptr) AccessChain 204(u16v) 291
293: 37(ptr) AccessChain 195(u16v) 282 300: 36(int16_t) Load 299
294: 36(int16_t) Load 293 301: 173(bool) IEqual 298 300
295: 17(int) UConvert 294 Store 290(b) 301
297: 296(ptr) AccessChain 227(uv) 264 302: 37(ptr) AccessChain 204(u16v) 291
298: 17(int) Load 297 303: 36(int16_t) Load 302
299: 173(bool) UGreaterThan 295 298 304: 17(int) UConvert 303
Store 281(b) 299 306: 305(ptr) AccessChain 236(uv) 273
300: 14(int16_t) Load 200(i16) 307: 17(int) Load 306
301: 27(int) SConvert 300 308: 173(bool) UGreaterThan 304 307
302: 27(int) Load 220(i) Store 290(b) 308
303: 173(bool) SLessThan 301 302 309: 14(int16_t) Load 209(i16)
Store 281(b) 303 310: 27(int) SConvert 309
304: 37(ptr) AccessChain 195(u16v) 264 311: 27(int) Load 229(i)
305: 36(int16_t) Load 304 312: 173(bool) SLessThan 310 311
306: 17(int) UConvert 305 Store 290(b) 312
307: 296(ptr) AccessChain 227(uv) 282 313: 37(ptr) AccessChain 204(u16v) 273
308: 17(int) Load 307 314: 36(int16_t) Load 313
309: 173(bool) UGreaterThanEqual 306 308 315: 17(int) UConvert 314
Store 281(b) 309 316: 305(ptr) AccessChain 236(uv) 291
310: 14(int16_t) Load 200(i16) 317: 17(int) Load 316
311: 27(int) SConvert 310 318: 173(bool) UGreaterThanEqual 315 317
312: 27(int) Load 220(i) Store 290(b) 318
313: 173(bool) SLessThanEqual 311 312 319: 14(int16_t) Load 209(i16)
Store 281(b) 313 320: 27(int) SConvert 319
314: 14(int16_t) Load 200(i16) 321: 27(int) Load 229(i)
315: 27(int) SConvert 314 322: 173(bool) SLessThanEqual 320 321
316: 17(int) Bitcast 315 Store 290(b) 322
317: 225(ivec3) Load 227(uv) 323: 14(int16_t) Load 209(i16)
318: 225(ivec3) CompositeConstruct 316 316 316 324: 27(int) SConvert 323
319: 225(ivec3) BitwiseOr 317 318 325: 17(int) Bitcast 324
Store 227(uv) 319 326: 234(ivec3) Load 236(uv)
320: 14(int16_t) Load 200(i16) 327: 234(ivec3) CompositeConstruct 325 325 325
321: 27(int) SConvert 320 328: 234(ivec3) BitwiseOr 326 327
322: 27(int) Load 220(i) Store 236(uv) 328
323: 27(int) BitwiseOr 321 322 329: 14(int16_t) Load 209(i16)
Store 220(i) 323 330: 27(int) SConvert 329
324: 14(int16_t) Load 200(i16) 331: 27(int) Load 229(i)
325: 71(int64_t) SConvert 324 332: 27(int) BitwiseOr 330 331
326: 71(int64_t) Load 243(i64) Store 229(i) 332
327: 71(int64_t) BitwiseAnd 326 325 333: 14(int16_t) Load 209(i16)
Store 243(i64) 327 334: 71(int64_t) SConvert 333
328:193(i16vec3) Load 195(u16v) 335: 71(int64_t) Load 252(i64)
329: 225(ivec3) UConvert 328 336: 71(int64_t) BitwiseAnd 335 334
330: 225(ivec3) Load 227(uv) Store 252(i64) 336
331: 225(ivec3) BitwiseAnd 329 330 337:202(i16vec3) Load 204(u16v)
Store 227(uv) 331 338: 234(ivec3) UConvert 337
332: 14(int16_t) Load 200(i16) 339: 234(ivec3) Load 236(uv)
333: 27(int) SConvert 332 340: 234(ivec3) BitwiseAnd 338 339
334: 17(int) Bitcast 333 Store 236(uv) 340
335: 225(ivec3) Load 227(uv) 341: 14(int16_t) Load 209(i16)
336: 225(ivec3) CompositeConstruct 334 334 334 342: 27(int) SConvert 341
337: 225(ivec3) BitwiseXor 335 336 343: 17(int) Bitcast 342
Store 227(uv) 337 344: 234(ivec3) Load 236(uv)
338:193(i16vec3) Load 195(u16v) 345: 234(ivec3) CompositeConstruct 343 343 343
339: 14(int16_t) Load 200(i16) 346: 234(ivec3) BitwiseXor 344 345
340: 36(int16_t) Bitcast 339 Store 236(uv) 346
341:193(i16vec3) CompositeConstruct 340 340 340 347:202(i16vec3) Load 204(u16v)
342:193(i16vec3) BitwiseXor 338 341 348: 14(int16_t) Load 209(i16)
Store 195(u16v) 342 349: 36(int16_t) Bitcast 348
350:202(i16vec3) CompositeConstruct 349 349 349
351:202(i16vec3) BitwiseXor 347 350
Store 204(u16v) 351
354: 14(int16_t) Load 209(i16)
355: 352(ptr) AccessChain 196(arr) 354
356: 97(float) Load 355
Store 353(f) 356
Return Return
FunctionEnd FunctionEnd
12(builtinFuncs(): 2 Function None 3 12(builtinFuncs(): 2 Function None 3
13: Label 13: Label
343(i16v): 53(ptr) Variable Function 357(i16v): 53(ptr) Variable Function
346(i16): 15(ptr) Variable Function 360(i16): 15(ptr) Variable Function
356(u16v): 194(ptr) Variable Function 370(u16v): 203(ptr) Variable Function
358(u16): 37(ptr) Variable Function 372(u16): 37(ptr) Variable Function
428(i32): 219(ptr) Variable Function 442(i32): 228(ptr) Variable Function
431(i64): 242(ptr) Variable Function 445(i64): 251(ptr) Variable Function
434(i16v4): 433(ptr) Variable Function 448(i16v4): 447(ptr) Variable Function
437(u32): 296(ptr) Variable Function 451(u32): 305(ptr) Variable Function
438(u16v2): 58(ptr) Variable Function 452(u16v2): 58(ptr) Variable Function
442(u64): 441(ptr) Variable Function 456(u64): 455(ptr) Variable Function
445(u16v4): 444(ptr) Variable Function 459(u16v4): 458(ptr) Variable Function
457(bv): 456(ptr) Variable Function 471(bv): 470(ptr) Variable Function
344: 52(i16vec2) Load 343(i16v) 358: 52(i16vec2) Load 357(i16v)
345: 52(i16vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 344 359: 52(i16vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 358
Store 343(i16v) 345 Store 357(i16v) 359
347: 14(int16_t) Load 346(i16) 361: 14(int16_t) Load 360(i16)
348: 14(int16_t) ExtInst 1(GLSL.std.450) 7(SSign) 347 362: 14(int16_t) ExtInst 1(GLSL.std.450) 7(SSign) 361
Store 346(i16) 348 Store 360(i16) 362
349: 52(i16vec2) Load 343(i16v) 363: 52(i16vec2) Load 357(i16v)
350: 14(int16_t) Load 346(i16) 364: 14(int16_t) Load 360(i16)
351: 52(i16vec2) CompositeConstruct 350 350 365: 52(i16vec2) CompositeConstruct 364 364
352: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 349 351 366: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 363 365
Store 343(i16v) 352 Store 357(i16v) 366
353: 52(i16vec2) Load 343(i16v) 367: 52(i16vec2) Load 357(i16v)
355: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 353 354 369: 52(i16vec2) ExtInst 1(GLSL.std.450) 39(SMin) 367 368
Store 343(i16v) 355 Store 357(i16v) 369
357:193(i16vec3) Load 356(u16v) 371:202(i16vec3) Load 370(u16v)
359: 36(int16_t) Load 358(u16) 373: 36(int16_t) Load 372(u16)
360:193(i16vec3) CompositeConstruct 359 359 359 374:202(i16vec3) CompositeConstruct 373 373 373
361:193(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 357 360 375:202(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 371 374
Store 356(u16v) 361 Store 370(u16v) 375
362:193(i16vec3) Load 356(u16v) 376:202(i16vec3) Load 370(u16v)
364:193(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 362 363 378:202(i16vec3) ExtInst 1(GLSL.std.450) 38(UMin) 376 377
Store 356(u16v) 364 Store 370(u16v) 378
365: 52(i16vec2) Load 343(i16v) 379: 52(i16vec2) Load 357(i16v)
366: 14(int16_t) Load 346(i16) 380: 14(int16_t) Load 360(i16)
367: 52(i16vec2) CompositeConstruct 366 366 381: 52(i16vec2) CompositeConstruct 380 380
368: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 365 367 382: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 379 381
Store 343(i16v) 368 Store 357(i16v) 382
369: 52(i16vec2) Load 343(i16v) 383: 52(i16vec2) Load 357(i16v)
370: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 369 354 384: 52(i16vec2) ExtInst 1(GLSL.std.450) 42(SMax) 383 368
Store 343(i16v) 370 Store 357(i16v) 384
371:193(i16vec3) Load 356(u16v) 385:202(i16vec3) Load 370(u16v)
372: 36(int16_t) Load 358(u16) 386: 36(int16_t) Load 372(u16)
373:193(i16vec3) CompositeConstruct 372 372 372 387:202(i16vec3) CompositeConstruct 386 386 386
374:193(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 371 373 388:202(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 385 387
Store 356(u16v) 374 Store 370(u16v) 388
375:193(i16vec3) Load 356(u16v) 389:202(i16vec3) Load 370(u16v)
376:193(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 375 363 390:202(i16vec3) ExtInst 1(GLSL.std.450) 41(UMax) 389 377
Store 356(u16v) 376 Store 370(u16v) 390
377: 52(i16vec2) Load 343(i16v) 391: 52(i16vec2) Load 357(i16v)
378: 14(int16_t) Load 346(i16) 392: 14(int16_t) Load 360(i16)
379: 14(int16_t) SNegate 378 393: 14(int16_t) SNegate 392
380: 14(int16_t) Load 346(i16) 394: 14(int16_t) Load 360(i16)
381: 52(i16vec2) CompositeConstruct 379 379 395: 52(i16vec2) CompositeConstruct 393 393
382: 52(i16vec2) CompositeConstruct 380 380 396: 52(i16vec2) CompositeConstruct 394 394
383: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 377 381 382 397: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 391 395 396
Store 343(i16v) 383 Store 357(i16v) 397
384: 52(i16vec2) Load 343(i16v) 398: 52(i16vec2) Load 357(i16v)
385: 52(i16vec2) Load 343(i16v) 399: 52(i16vec2) Load 357(i16v)
386: 52(i16vec2) SNegate 385 400: 52(i16vec2) SNegate 399
387: 52(i16vec2) Load 343(i16v) 401: 52(i16vec2) Load 357(i16v)
388: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 384 386 387 402: 52(i16vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 398 400 401
Store 343(i16v) 388 Store 357(i16v) 402
389:193(i16vec3) Load 356(u16v) 403:202(i16vec3) Load 370(u16v)
390: 36(int16_t) Load 358(u16) 404: 36(int16_t) Load 372(u16)
391: 36(int16_t) SNegate 390 405: 36(int16_t) SNegate 404
392: 36(int16_t) Load 358(u16) 406: 36(int16_t) Load 372(u16)
393:193(i16vec3) CompositeConstruct 391 391 391 407:202(i16vec3) CompositeConstruct 405 405 405
394:193(i16vec3) CompositeConstruct 392 392 392 408:202(i16vec3) CompositeConstruct 406 406 406
395:193(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 389 393 394 409:202(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 403 407 408
Store 356(u16v) 395 Store 370(u16v) 409
396:193(i16vec3) Load 356(u16v) 410:202(i16vec3) Load 370(u16v)
397:193(i16vec3) Load 356(u16v) 411:202(i16vec3) Load 370(u16v)
398:193(i16vec3) SNegate 397 412:202(i16vec3) SNegate 411
399:193(i16vec3) Load 356(u16v) 413:202(i16vec3) Load 370(u16v)
400:193(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 396 398 399 414:202(i16vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 410 412 413
Store 356(u16v) 400 Store 370(u16v) 414
401: 15(ptr) AccessChain 343(i16v) 282 415: 15(ptr) AccessChain 357(i16v) 291
402: 14(int16_t) Load 401 416: 14(int16_t) Load 415
403: 15(ptr) AccessChain 343(i16v) 264 417: 15(ptr) AccessChain 357(i16v) 273
404: 14(int16_t) Load 403 418: 14(int16_t) Load 417
406: 14(int16_t) Select 405 404 402 420: 14(int16_t) Select 419 418 416
Store 346(i16) 406 Store 360(i16) 420
407: 14(int16_t) Load 346(i16) 421: 14(int16_t) Load 360(i16)
408: 52(i16vec2) CompositeConstruct 407 407 422: 52(i16vec2) CompositeConstruct 421 421
409: 14(int16_t) Load 346(i16) 423: 14(int16_t) Load 360(i16)
410: 14(int16_t) SNegate 409 424: 14(int16_t) SNegate 423
411: 52(i16vec2) CompositeConstruct 410 410 425: 52(i16vec2) CompositeConstruct 424 424
414: 52(i16vec2) Select 413 411 408 428: 52(i16vec2) Select 427 425 422
Store 343(i16v) 414 Store 357(i16v) 428
415: 37(ptr) AccessChain 356(u16v) 282 429: 37(ptr) AccessChain 370(u16v) 291
416: 36(int16_t) Load 415 430: 36(int16_t) Load 429
417: 37(ptr) AccessChain 356(u16v) 264 431: 37(ptr) AccessChain 370(u16v) 273
418: 36(int16_t) Load 417 432: 36(int16_t) Load 431
419: 36(int16_t) Select 405 418 416 433: 36(int16_t) Select 419 432 430
Store 358(u16) 419 Store 372(u16) 433
420: 36(int16_t) Load 358(u16) 434: 36(int16_t) Load 372(u16)
421:193(i16vec3) CompositeConstruct 420 420 420 435:202(i16vec3) CompositeConstruct 434 434 434
422: 36(int16_t) Load 358(u16) 436: 36(int16_t) Load 372(u16)
423: 36(int16_t) SNegate 422 437: 36(int16_t) SNegate 436
424:193(i16vec3) CompositeConstruct 423 423 423 438:202(i16vec3) CompositeConstruct 437 437 437
427:193(i16vec3) Select 426 424 421 441:202(i16vec3) Select 440 438 435
Store 356(u16v) 427 Store 370(u16v) 441
429: 52(i16vec2) Load 343(i16v) 443: 52(i16vec2) Load 357(i16v)
430: 27(int) Bitcast 429 444: 27(int) Bitcast 443
Store 428(i32) 430 Store 442(i32) 444
435:432(i16vec4) Load 434(i16v4) 449:446(i16vec4) Load 448(i16v4)
436: 71(int64_t) Bitcast 435 450: 71(int64_t) Bitcast 449
Store 431(i64) 436 Store 445(i64) 450
439: 57(i16vec2) Load 438(u16v2) 453: 57(i16vec2) Load 452(u16v2)
440: 17(int) Bitcast 439 454: 17(int) Bitcast 453
Store 437(u32) 440 Store 451(u32) 454
446:443(i16vec4) Load 445(u16v4) 460:457(i16vec4) Load 459(u16v4)
447: 77(int64_t) Bitcast 446 461: 77(int64_t) Bitcast 460
Store 442(u64) 447 Store 456(u64) 461
448: 27(int) Load 428(i32) 462: 27(int) Load 442(i32)
449: 52(i16vec2) Bitcast 448 463: 52(i16vec2) Bitcast 462
Store 343(i16v) 449 Store 357(i16v) 463
450: 71(int64_t) Load 431(i64) 464: 71(int64_t) Load 445(i64)
451:432(i16vec4) Bitcast 450 465:446(i16vec4) Bitcast 464
Store 434(i16v4) 451 Store 448(i16v4) 465
452: 17(int) Load 437(u32) 466: 17(int) Load 451(u32)
453: 57(i16vec2) Bitcast 452 467: 57(i16vec2) Bitcast 466
Store 438(u16v2) 453 Store 452(u16v2) 467
454: 77(int64_t) Load 442(u64) 468: 77(int64_t) Load 456(u64)
455:443(i16vec4) Bitcast 454 469:457(i16vec4) Bitcast 468
Store 445(u16v4) 455 Store 459(u16v4) 469
458:193(i16vec3) Load 356(u16v) 472:202(i16vec3) Load 370(u16v)
459: 36(int16_t) Load 358(u16) 473: 36(int16_t) Load 372(u16)
460:193(i16vec3) CompositeConstruct 459 459 459 474:202(i16vec3) CompositeConstruct 473 473 473
461: 425(bvec3) ULessThan 458 460 475: 439(bvec3) ULessThan 472 474
Store 457(bv) 461 Store 471(bv) 475
462: 52(i16vec2) Load 343(i16v) 476: 52(i16vec2) Load 357(i16v)
463: 14(int16_t) Load 346(i16) 477: 14(int16_t) Load 360(i16)
464: 52(i16vec2) CompositeConstruct 463 463 478: 52(i16vec2) CompositeConstruct 477 477
465: 174(bvec2) SLessThan 462 464 479: 174(bvec2) SLessThan 476 478
466: 280(ptr) AccessChain 457(bv) 282 480: 289(ptr) AccessChain 471(bv) 291
467: 173(bool) CompositeExtract 465 0 481: 173(bool) CompositeExtract 479 0
Store 466 467
468: 280(ptr) AccessChain 457(bv) 264
469: 173(bool) CompositeExtract 465 1
Store 468 469
470:193(i16vec3) Load 356(u16v)
471: 36(int16_t) Load 358(u16)
472:193(i16vec3) CompositeConstruct 471 471 471
473: 425(bvec3) ULessThanEqual 470 472
Store 457(bv) 473
474: 52(i16vec2) Load 343(i16v)
475: 14(int16_t) Load 346(i16)
476: 52(i16vec2) CompositeConstruct 475 475
477: 174(bvec2) SLessThanEqual 474 476
478: 280(ptr) AccessChain 457(bv) 282
479: 173(bool) CompositeExtract 477 0
Store 478 479
480: 280(ptr) AccessChain 457(bv) 264
481: 173(bool) CompositeExtract 477 1
Store 480 481 Store 480 481
482:193(i16vec3) Load 356(u16v) 482: 289(ptr) AccessChain 471(bv) 273
483: 36(int16_t) Load 358(u16) 483: 173(bool) CompositeExtract 479 1
484:193(i16vec3) CompositeConstruct 483 483 483 Store 482 483
485: 425(bvec3) UGreaterThan 482 484 484:202(i16vec3) Load 370(u16v)
Store 457(bv) 485 485: 36(int16_t) Load 372(u16)
486: 52(i16vec2) Load 343(i16v) 486:202(i16vec3) CompositeConstruct 485 485 485
487: 14(int16_t) Load 346(i16) 487: 439(bvec3) ULessThanEqual 484 486
488: 52(i16vec2) CompositeConstruct 487 487 Store 471(bv) 487
489: 174(bvec2) SGreaterThan 486 488 488: 52(i16vec2) Load 357(i16v)
490: 280(ptr) AccessChain 457(bv) 282 489: 14(int16_t) Load 360(i16)
491: 173(bool) CompositeExtract 489 0 490: 52(i16vec2) CompositeConstruct 489 489
Store 490 491 491: 174(bvec2) SLessThanEqual 488 490
492: 280(ptr) AccessChain 457(bv) 264 492: 289(ptr) AccessChain 471(bv) 291
493: 173(bool) CompositeExtract 489 1 493: 173(bool) CompositeExtract 491 0
Store 492 493 Store 492 493
494:193(i16vec3) Load 356(u16v) 494: 289(ptr) AccessChain 471(bv) 273
495: 36(int16_t) Load 358(u16) 495: 173(bool) CompositeExtract 491 1
496:193(i16vec3) CompositeConstruct 495 495 495 Store 494 495
497: 425(bvec3) UGreaterThanEqual 494 496 496:202(i16vec3) Load 370(u16v)
Store 457(bv) 497 497: 36(int16_t) Load 372(u16)
498: 52(i16vec2) Load 343(i16v) 498:202(i16vec3) CompositeConstruct 497 497 497
499: 14(int16_t) Load 346(i16) 499: 439(bvec3) UGreaterThan 496 498
500: 52(i16vec2) CompositeConstruct 499 499 Store 471(bv) 499
501: 174(bvec2) SGreaterThanEqual 498 500 500: 52(i16vec2) Load 357(i16v)
502: 280(ptr) AccessChain 457(bv) 282 501: 14(int16_t) Load 360(i16)
503: 173(bool) CompositeExtract 501 0 502: 52(i16vec2) CompositeConstruct 501 501
Store 502 503 503: 174(bvec2) SGreaterThan 500 502
504: 280(ptr) AccessChain 457(bv) 264 504: 289(ptr) AccessChain 471(bv) 291
505: 173(bool) CompositeExtract 501 1 505: 173(bool) CompositeExtract 503 0
Store 504 505 Store 504 505
506:193(i16vec3) Load 356(u16v) 506: 289(ptr) AccessChain 471(bv) 273
507: 36(int16_t) Load 358(u16) 507: 173(bool) CompositeExtract 503 1
508:193(i16vec3) CompositeConstruct 507 507 507 Store 506 507
509: 425(bvec3) IEqual 506 508 508:202(i16vec3) Load 370(u16v)
Store 457(bv) 509 509: 36(int16_t) Load 372(u16)
510: 52(i16vec2) Load 343(i16v) 510:202(i16vec3) CompositeConstruct 509 509 509
511: 14(int16_t) Load 346(i16) 511: 439(bvec3) UGreaterThanEqual 508 510
512: 52(i16vec2) CompositeConstruct 511 511 Store 471(bv) 511
513: 174(bvec2) IEqual 510 512 512: 52(i16vec2) Load 357(i16v)
514: 280(ptr) AccessChain 457(bv) 282 513: 14(int16_t) Load 360(i16)
515: 173(bool) CompositeExtract 513 0 514: 52(i16vec2) CompositeConstruct 513 513
Store 514 515 515: 174(bvec2) SGreaterThanEqual 512 514
516: 280(ptr) AccessChain 457(bv) 264 516: 289(ptr) AccessChain 471(bv) 291
517: 173(bool) CompositeExtract 513 1 517: 173(bool) CompositeExtract 515 0
Store 516 517 Store 516 517
518:193(i16vec3) Load 356(u16v) 518: 289(ptr) AccessChain 471(bv) 273
519: 36(int16_t) Load 358(u16) 519: 173(bool) CompositeExtract 515 1
520:193(i16vec3) CompositeConstruct 519 519 519 Store 518 519
521: 425(bvec3) INotEqual 518 520 520:202(i16vec3) Load 370(u16v)
Store 457(bv) 521 521: 36(int16_t) Load 372(u16)
522: 52(i16vec2) Load 343(i16v) 522:202(i16vec3) CompositeConstruct 521 521 521
523: 14(int16_t) Load 346(i16) 523: 439(bvec3) IEqual 520 522
524: 52(i16vec2) CompositeConstruct 523 523 Store 471(bv) 523
525: 174(bvec2) INotEqual 522 524 524: 52(i16vec2) Load 357(i16v)
526: 280(ptr) AccessChain 457(bv) 282 525: 14(int16_t) Load 360(i16)
527: 173(bool) CompositeExtract 525 0 526: 52(i16vec2) CompositeConstruct 525 525
Store 526 527 527: 174(bvec2) IEqual 524 526
528: 280(ptr) AccessChain 457(bv) 264 528: 289(ptr) AccessChain 471(bv) 291
529: 173(bool) CompositeExtract 525 1 529: 173(bool) CompositeExtract 527 0
Store 528 529 Store 528 529
530: 289(ptr) AccessChain 471(bv) 273
531: 173(bool) CompositeExtract 527 1
Store 530 531
532:202(i16vec3) Load 370(u16v)
533: 36(int16_t) Load 372(u16)
534:202(i16vec3) CompositeConstruct 533 533 533
535: 439(bvec3) INotEqual 532 534
Store 471(bv) 535
536: 52(i16vec2) Load 357(i16v)
537: 14(int16_t) Load 360(i16)
538: 52(i16vec2) CompositeConstruct 537 537
539: 174(bvec2) INotEqual 536 538
540: 289(ptr) AccessChain 471(bv) 291
541: 173(bool) CompositeExtract 539 0
Store 540 541
542: 289(ptr) AccessChain 471(bv) 273
543: 173(bool) CompositeExtract 539 1
Store 542 543
Return Return
FunctionEnd FunctionEnd

View File

@ -1,7 +1,7 @@
spv.int8.frag spv.int8.frag
// Module Version 10300 // Module Version 10300
// Generated by (magic number): 8000a // Generated by (magic number): 8000a
// Id's are bound by 530 // Id's are bound by 544
Capability Shader Capability Shader
Capability Float16 Capability Float16
@ -48,53 +48,55 @@ spv.int8.frag
Name 117 "f64v" Name 117 "f64v"
Name 144 "u16v" Name 144 "u16v"
Name 174 "bv" Name 174 "bv"
Name 192 "u8v" Name 193 "arr"
Name 197 "i8" Name 201 "u8v"
Name 217 "i" Name 206 "i8"
Name 224 "uv" Name 226 "i"
Name 240 "i16" Name 233 "uv"
Name 276 "b" Name 249 "i16"
Name 338 "i8v" Name 285 "b"
Name 341 "i8" Name 348 "f"
Name 351 "u8v" Name 352 "i8v"
Name 353 "u8" Name 355 "i8"
Name 423 "i16" Name 365 "u8v"
Name 426 "i32" Name 367 "u8"
Name 429 "i8v4" Name 437 "i16"
Name 433 "u16" Name 440 "i32"
Name 434 "u8v2" Name 443 "i8v4"
Name 437 "u32" Name 447 "u16"
Name 440 "u8v4" Name 448 "u8v2"
Name 452 "bv" Name 451 "u32"
Name 525 "Block" Name 454 "u8v4"
MemberName 525(Block) 0 "i8" Name 466 "bv"
MemberName 525(Block) 1 "i8v2" Name 539 "Block"
MemberName 525(Block) 2 "i8v3" MemberName 539(Block) 0 "i8"
MemberName 525(Block) 3 "i8v4" MemberName 539(Block) 1 "i8v2"
MemberName 525(Block) 4 "u8" MemberName 539(Block) 2 "i8v3"
MemberName 525(Block) 5 "u8v2" MemberName 539(Block) 3 "i8v4"
MemberName 525(Block) 6 "u8v3" MemberName 539(Block) 4 "u8"
MemberName 525(Block) 7 "u8v4" MemberName 539(Block) 5 "u8v2"
Name 527 "block" MemberName 539(Block) 6 "u8v3"
Name 528 "si8" MemberName 539(Block) 7 "u8v4"
Name 529 "su8" Name 541 "block"
Name 542 "si8"
Name 543 "su8"
MemberDecorate 24(Uniforms) 0 Offset 0 MemberDecorate 24(Uniforms) 0 Offset 0
Decorate 24(Uniforms) Block Decorate 24(Uniforms) Block
Decorate 26 DescriptorSet 0 Decorate 26 DescriptorSet 0
Decorate 26 Binding 0 Decorate 26 Binding 0
MemberDecorate 525(Block) 0 Offset 0 MemberDecorate 539(Block) 0 Offset 0
MemberDecorate 525(Block) 1 Offset 2 MemberDecorate 539(Block) 1 Offset 2
MemberDecorate 525(Block) 2 Offset 4 MemberDecorate 539(Block) 2 Offset 4
MemberDecorate 525(Block) 3 Offset 8 MemberDecorate 539(Block) 3 Offset 8
MemberDecorate 525(Block) 4 Offset 12 MemberDecorate 539(Block) 4 Offset 12
MemberDecorate 525(Block) 5 Offset 14 MemberDecorate 539(Block) 5 Offset 14
MemberDecorate 525(Block) 6 Offset 16 MemberDecorate 539(Block) 6 Offset 16
MemberDecorate 525(Block) 7 Offset 20 MemberDecorate 539(Block) 7 Offset 20
Decorate 525(Block) Block Decorate 539(Block) Block
Decorate 527(block) DescriptorSet 0 Decorate 541(block) DescriptorSet 0
Decorate 527(block) Binding 1 Decorate 541(block) Binding 1
Decorate 528(si8) SpecId 100 Decorate 542(si8) SpecId 100
Decorate 529(su8) SpecId 101 Decorate 543(su8) SpecId 101
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
14: TypeInt 8 1 14: TypeInt 8 1
@ -159,36 +161,45 @@ spv.int8.frag
182: 36(int8_t) Constant 1 182: 36(int8_t) Constant 1
183: 49(i8vec2) ConstantComposite 181 181 183: 49(i8vec2) ConstantComposite 181 181
184: 49(i8vec2) ConstantComposite 182 182 184: 49(i8vec2) ConstantComposite 182 182
190: TypeVector 36(int8_t) 3 190: 17(int) Constant 4
191: TypePointer Function 190(i8vec3) 191: TypeArray 108(float) 190
194: TypeVector 14(int8_t) 3 192: TypePointer Function 191
216: TypePointer Function 27(int) 194: 108(float) Constant 1065353216
222: TypeVector 17(int) 3 195: 108(float) Constant 1073741824
223: TypePointer Function 222(ivec3) 196: 108(float) Constant 1077936128
239: TypePointer Function 57(int16_t) 197: 108(float) Constant 1082130432
261: 17(int) Constant 1 198: 191 ConstantComposite 194 195 196 197
267: 17(int) Constant 2 199: TypeVector 36(int8_t) 3
275: TypePointer Function 171(bool) 200: TypePointer Function 199(i8vec3)
277: 17(int) Constant 0 203: TypeVector 14(int8_t) 3
291: TypePointer Function 17(int) 225: TypePointer Function 27(int)
349: 52(i8vec2) ConstantComposite 21 21 231: TypeVector 17(int) 3
358: 190(i8vec3) ConstantComposite 181 181 181 232: TypePointer Function 231(ivec3)
400: 171(bool) ConstantTrue 248: TypePointer Function 57(int16_t)
407: 171(bool) ConstantFalse 270: 17(int) Constant 1
408: 172(bvec2) ConstantComposite 407 407 276: 17(int) Constant 2
420: TypeVector 171(bool) 3 284: TypePointer Function 171(bool)
421: 420(bvec3) ConstantComposite 407 407 407 286: 17(int) Constant 0
427: TypeVector 14(int8_t) 4 300: TypePointer Function 17(int)
428: TypePointer Function 427(i8vec4) 347: TypePointer Function 108(float)
432: TypePointer Function 64(int16_t) 363: 52(i8vec2) ConstantComposite 21 21
438: TypeVector 36(int8_t) 4 372: 199(i8vec3) ConstantComposite 181 181 181
439: TypePointer Function 438(i8vec4) 414: 171(bool) ConstantTrue
451: TypePointer Function 420(bvec3) 421: 171(bool) ConstantFalse
525(Block): TypeStruct 14(int8_t) 52(i8vec2) 194(i8vec3) 427(i8vec4) 36(int8_t) 49(i8vec2) 190(i8vec3) 438(i8vec4) 422: 172(bvec2) ConstantComposite 421 421
526: TypePointer Uniform 525(Block) 434: TypeVector 171(bool) 3
527(block): 526(ptr) Variable Uniform 435: 434(bvec3) ConstantComposite 421 421 421
528(si8): 14(int8_t) SpecConstant 4294967286 441: TypeVector 14(int8_t) 4
529(su8): 36(int8_t) SpecConstant 20 442: TypePointer Function 441(i8vec4)
446: TypePointer Function 64(int16_t)
452: TypeVector 36(int8_t) 4
453: TypePointer Function 452(i8vec4)
465: TypePointer Function 434(bvec3)
539(Block): TypeStruct 14(int8_t) 52(i8vec2) 203(i8vec3) 441(i8vec4) 36(int8_t) 49(i8vec2) 199(i8vec3) 452(i8vec4)
540: TypePointer Uniform 539(Block)
541(block): 540(ptr) Variable Uniform
542(si8): 14(int8_t) SpecConstant 4294967286
543(su8): 36(int8_t) SpecConstant 20
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
Return Return
@ -360,396 +371,403 @@ spv.int8.frag
FunctionEnd FunctionEnd
10(operators(): 2 Function None 3 10(operators(): 2 Function None 3
11: Label 11: Label
192(u8v): 191(ptr) Variable Function 193(arr): 192(ptr) Variable Function
197(i8): 15(ptr) Variable Function 201(u8v): 200(ptr) Variable Function
217(i): 216(ptr) Variable Function 206(i8): 15(ptr) Variable Function
224(uv): 223(ptr) Variable Function 226(i): 225(ptr) Variable Function
240(i16): 239(ptr) Variable Function 233(uv): 232(ptr) Variable Function
276(b): 275(ptr) Variable Function 249(i16): 248(ptr) Variable Function
193: 190(i8vec3) Load 192(u8v) 285(b): 284(ptr) Variable Function
195: 194(i8vec3) CompositeConstruct 176 176 176 348(f): 347(ptr) Variable Function
196: 190(i8vec3) IAdd 193 195 Store 193(arr) 198
Store 192(u8v) 196 202: 199(i8vec3) Load 201(u8v)
198: 14(int8_t) Load 197(i8) 204: 203(i8vec3) CompositeConstruct 176 176 176
199: 14(int8_t) ISub 198 176 205: 199(i8vec3) IAdd 202 204
Store 197(i8) 199 Store 201(u8v) 205
200: 14(int8_t) Load 197(i8) 207: 14(int8_t) Load 206(i8)
201: 14(int8_t) IAdd 200 176 208: 14(int8_t) ISub 207 176
Store 197(i8) 201 Store 206(i8) 208
202: 190(i8vec3) Load 192(u8v) 209: 14(int8_t) Load 206(i8)
203: 194(i8vec3) CompositeConstruct 176 176 176 210: 14(int8_t) IAdd 209 176
204: 190(i8vec3) ISub 202 203 Store 206(i8) 210
Store 192(u8v) 204 211: 199(i8vec3) Load 201(u8v)
205: 190(i8vec3) Load 192(u8v) 212: 203(i8vec3) CompositeConstruct 176 176 176
206: 190(i8vec3) Not 205 213: 199(i8vec3) ISub 211 212
Store 192(u8v) 206 Store 201(u8v) 213
207: 14(int8_t) Load 197(i8) 214: 199(i8vec3) Load 201(u8v)
Store 197(i8) 207 215: 199(i8vec3) Not 214
208: 190(i8vec3) Load 192(u8v) Store 201(u8v) 215
209: 190(i8vec3) SNegate 208 216: 14(int8_t) Load 206(i8)
Store 192(u8v) 209 Store 206(i8) 216
210: 14(int8_t) Load 197(i8) 217: 199(i8vec3) Load 201(u8v)
211: 14(int8_t) Load 197(i8) 218: 199(i8vec3) SNegate 217
212: 14(int8_t) IAdd 211 210 Store 201(u8v) 218
Store 197(i8) 212 219: 14(int8_t) Load 206(i8)
213: 190(i8vec3) Load 192(u8v) 220: 14(int8_t) Load 206(i8)
214: 190(i8vec3) Load 192(u8v) 221: 14(int8_t) IAdd 220 219
215: 190(i8vec3) ISub 214 213 Store 206(i8) 221
Store 192(u8v) 215 222: 199(i8vec3) Load 201(u8v)
218: 14(int8_t) Load 197(i8) 223: 199(i8vec3) Load 201(u8v)
219: 27(int) SConvert 218 224: 199(i8vec3) ISub 223 222
220: 27(int) Load 217(i) Store 201(u8v) 224
221: 27(int) IMul 220 219 227: 14(int8_t) Load 206(i8)
Store 217(i) 221 228: 27(int) SConvert 227
225: 190(i8vec3) Load 192(u8v) 229: 27(int) Load 226(i)
226: 222(ivec3) UConvert 225 230: 27(int) IMul 229 228
227: 222(ivec3) Load 224(uv) Store 226(i) 230
228: 222(ivec3) UDiv 227 226 234: 199(i8vec3) Load 201(u8v)
Store 224(uv) 228 235: 231(ivec3) UConvert 234
229: 14(int8_t) Load 197(i8) 236: 231(ivec3) Load 233(uv)
230: 27(int) SConvert 229 237: 231(ivec3) UDiv 236 235
231: 17(int) Bitcast 230 Store 233(uv) 237
232: 222(ivec3) Load 224(uv) 238: 14(int8_t) Load 206(i8)
233: 222(ivec3) CompositeConstruct 231 231 231 239: 27(int) SConvert 238
234: 222(ivec3) UMod 232 233 240: 17(int) Bitcast 239
Store 224(uv) 234 241: 231(ivec3) Load 233(uv)
235: 190(i8vec3) Load 192(u8v) 242: 231(ivec3) CompositeConstruct 240 240 240
236: 222(ivec3) UConvert 235 243: 231(ivec3) UMod 241 242
237: 222(ivec3) Load 224(uv) Store 233(uv) 243
238: 222(ivec3) IAdd 236 237 244: 199(i8vec3) Load 201(u8v)
Store 224(uv) 238 245: 231(ivec3) UConvert 244
241: 14(int8_t) Load 197(i8) 246: 231(ivec3) Load 233(uv)
242: 57(int16_t) SConvert 241 247: 231(ivec3) IAdd 245 246
243: 57(int16_t) Load 240(i16) Store 233(uv) 247
244: 57(int16_t) ISub 242 243 250: 14(int8_t) Load 206(i8)
Store 240(i16) 244 251: 57(int16_t) SConvert 250
245: 190(i8vec3) Load 192(u8v) 252: 57(int16_t) Load 249(i16)
246: 222(ivec3) UConvert 245 253: 57(int16_t) ISub 251 252
247: 222(ivec3) Load 224(uv) Store 249(i16) 253
248: 222(ivec3) IMul 246 247 254: 199(i8vec3) Load 201(u8v)
Store 224(uv) 248 255: 231(ivec3) UConvert 254
249: 14(int8_t) Load 197(i8) 256: 231(ivec3) Load 233(uv)
250: 57(int16_t) SConvert 249 257: 231(ivec3) IMul 255 256
251: 57(int16_t) Load 240(i16) Store 233(uv) 257
252: 57(int16_t) IMul 250 251 258: 14(int8_t) Load 206(i8)
Store 240(i16) 252 259: 57(int16_t) SConvert 258
253: 14(int8_t) Load 197(i8) 260: 57(int16_t) Load 249(i16)
254: 27(int) SConvert 253 261: 57(int16_t) IMul 259 260
255: 27(int) Load 217(i) Store 249(i16) 261
256: 27(int) SMod 254 255 262: 14(int8_t) Load 206(i8)
Store 217(i) 256 263: 27(int) SConvert 262
257: 14(int8_t) Load 197(i8) 264: 27(int) Load 226(i)
258: 190(i8vec3) Load 192(u8v) 265: 27(int) SMod 263 264
259: 194(i8vec3) CompositeConstruct 257 257 257 Store 226(i) 265
260: 190(i8vec3) ShiftLeftLogical 258 259 266: 14(int8_t) Load 206(i8)
Store 192(u8v) 260 267: 199(i8vec3) Load 201(u8v)
262: 37(ptr) AccessChain 192(u8v) 261 268: 203(i8vec3) CompositeConstruct 266 266 266
263: 36(int8_t) Load 262 269: 199(i8vec3) ShiftLeftLogical 267 268
264: 14(int8_t) Load 197(i8) Store 201(u8v) 269
265: 14(int8_t) ShiftRightArithmetic 264 263 271: 37(ptr) AccessChain 201(u8v) 270
Store 197(i8) 265 272: 36(int8_t) Load 271
266: 14(int8_t) Load 197(i8) 273: 14(int8_t) Load 206(i8)
268: 37(ptr) AccessChain 192(u8v) 267 274: 14(int8_t) ShiftRightArithmetic 273 272
269: 36(int8_t) Load 268 Store 206(i8) 274
270: 14(int8_t) ShiftLeftLogical 266 269 275: 14(int8_t) Load 206(i8)
Store 197(i8) 270 277: 37(ptr) AccessChain 201(u8v) 276
271: 190(i8vec3) Load 192(u8v) 278: 36(int8_t) Load 277
272: 14(int8_t) Load 197(i8) 279: 14(int8_t) ShiftLeftLogical 275 278
273: 194(i8vec3) CompositeConstruct 272 272 272 Store 206(i8) 279
274: 190(i8vec3) ShiftLeftLogical 271 273 280: 199(i8vec3) Load 201(u8v)
Store 192(u8v) 274 281: 14(int8_t) Load 206(i8)
278: 37(ptr) AccessChain 192(u8v) 277 282: 203(i8vec3) CompositeConstruct 281 281 281
279: 36(int8_t) Load 278 283: 199(i8vec3) ShiftLeftLogical 280 282
280: 14(int8_t) Load 197(i8) Store 201(u8v) 283
281: 36(int8_t) Bitcast 280 287: 37(ptr) AccessChain 201(u8v) 286
282: 171(bool) INotEqual 279 281 288: 36(int8_t) Load 287
Store 276(b) 282 289: 14(int8_t) Load 206(i8)
283: 14(int8_t) Load 197(i8) 290: 36(int8_t) Bitcast 289
284: 36(int8_t) Bitcast 283 291: 171(bool) INotEqual 288 290
285: 37(ptr) AccessChain 192(u8v) 277 Store 285(b) 291
286: 36(int8_t) Load 285 292: 14(int8_t) Load 206(i8)
287: 171(bool) IEqual 284 286 293: 36(int8_t) Bitcast 292
Store 276(b) 287 294: 37(ptr) AccessChain 201(u8v) 286
288: 37(ptr) AccessChain 192(u8v) 277 295: 36(int8_t) Load 294
289: 36(int8_t) Load 288 296: 171(bool) IEqual 293 295
290: 17(int) UConvert 289 Store 285(b) 296
292: 291(ptr) AccessChain 224(uv) 261 297: 37(ptr) AccessChain 201(u8v) 286
293: 17(int) Load 292 298: 36(int8_t) Load 297
294: 171(bool) UGreaterThan 290 293 299: 17(int) UConvert 298
Store 276(b) 294 301: 300(ptr) AccessChain 233(uv) 270
295: 14(int8_t) Load 197(i8) 302: 17(int) Load 301
296: 27(int) SConvert 295 303: 171(bool) UGreaterThan 299 302
297: 27(int) Load 217(i) Store 285(b) 303
298: 171(bool) SLessThan 296 297 304: 14(int8_t) Load 206(i8)
Store 276(b) 298 305: 27(int) SConvert 304
299: 37(ptr) AccessChain 192(u8v) 261 306: 27(int) Load 226(i)
300: 36(int8_t) Load 299 307: 171(bool) SLessThan 305 306
301: 17(int) UConvert 300 Store 285(b) 307
302: 291(ptr) AccessChain 224(uv) 277 308: 37(ptr) AccessChain 201(u8v) 270
303: 17(int) Load 302 309: 36(int8_t) Load 308
304: 171(bool) UGreaterThanEqual 301 303 310: 17(int) UConvert 309
Store 276(b) 304 311: 300(ptr) AccessChain 233(uv) 286
305: 14(int8_t) Load 197(i8) 312: 17(int) Load 311
306: 27(int) SConvert 305 313: 171(bool) UGreaterThanEqual 310 312
307: 27(int) Load 217(i) Store 285(b) 313
308: 171(bool) SLessThanEqual 306 307 314: 14(int8_t) Load 206(i8)
Store 276(b) 308 315: 27(int) SConvert 314
309: 14(int8_t) Load 197(i8) 316: 27(int) Load 226(i)
310: 27(int) SConvert 309 317: 171(bool) SLessThanEqual 315 316
311: 17(int) Bitcast 310 Store 285(b) 317
312: 222(ivec3) Load 224(uv) 318: 14(int8_t) Load 206(i8)
313: 222(ivec3) CompositeConstruct 311 311 311 319: 27(int) SConvert 318
314: 222(ivec3) BitwiseOr 312 313 320: 17(int) Bitcast 319
Store 224(uv) 314 321: 231(ivec3) Load 233(uv)
315: 14(int8_t) Load 197(i8) 322: 231(ivec3) CompositeConstruct 320 320 320
316: 27(int) SConvert 315 323: 231(ivec3) BitwiseOr 321 322
317: 27(int) Load 217(i) Store 233(uv) 323
318: 27(int) BitwiseOr 316 317 324: 14(int8_t) Load 206(i8)
Store 217(i) 318 325: 27(int) SConvert 324
319: 14(int8_t) Load 197(i8) 326: 27(int) Load 226(i)
320: 57(int16_t) SConvert 319 327: 27(int) BitwiseOr 325 326
321: 57(int16_t) Load 240(i16) Store 226(i) 327
322: 57(int16_t) BitwiseAnd 321 320 328: 14(int8_t) Load 206(i8)
Store 240(i16) 322 329: 57(int16_t) SConvert 328
323: 190(i8vec3) Load 192(u8v) 330: 57(int16_t) Load 249(i16)
324: 222(ivec3) UConvert 323 331: 57(int16_t) BitwiseAnd 330 329
325: 222(ivec3) Load 224(uv) Store 249(i16) 331
326: 222(ivec3) BitwiseAnd 324 325 332: 199(i8vec3) Load 201(u8v)
Store 224(uv) 326 333: 231(ivec3) UConvert 332
327: 14(int8_t) Load 197(i8) 334: 231(ivec3) Load 233(uv)
328: 27(int) SConvert 327 335: 231(ivec3) BitwiseAnd 333 334
329: 17(int) Bitcast 328 Store 233(uv) 335
330: 222(ivec3) Load 224(uv) 336: 14(int8_t) Load 206(i8)
331: 222(ivec3) CompositeConstruct 329 329 329 337: 27(int) SConvert 336
332: 222(ivec3) BitwiseXor 330 331 338: 17(int) Bitcast 337
Store 224(uv) 332 339: 231(ivec3) Load 233(uv)
333: 190(i8vec3) Load 192(u8v) 340: 231(ivec3) CompositeConstruct 338 338 338
334: 14(int8_t) Load 197(i8) 341: 231(ivec3) BitwiseXor 339 340
335: 36(int8_t) Bitcast 334 Store 233(uv) 341
336: 190(i8vec3) CompositeConstruct 335 335 335 342: 199(i8vec3) Load 201(u8v)
337: 190(i8vec3) BitwiseXor 333 336 343: 14(int8_t) Load 206(i8)
Store 192(u8v) 337 344: 36(int8_t) Bitcast 343
345: 199(i8vec3) CompositeConstruct 344 344 344
346: 199(i8vec3) BitwiseXor 342 345
Store 201(u8v) 346
349: 14(int8_t) Load 206(i8)
350: 347(ptr) AccessChain 193(arr) 349
351: 108(float) Load 350
Store 348(f) 351
Return Return
FunctionEnd FunctionEnd
12(builtinFuncs(): 2 Function None 3 12(builtinFuncs(): 2 Function None 3
13: Label 13: Label
338(i8v): 53(ptr) Variable Function 352(i8v): 53(ptr) Variable Function
341(i8): 15(ptr) Variable Function 355(i8): 15(ptr) Variable Function
351(u8v): 191(ptr) Variable Function 365(u8v): 200(ptr) Variable Function
353(u8): 37(ptr) Variable Function 367(u8): 37(ptr) Variable Function
423(i16): 239(ptr) Variable Function 437(i16): 248(ptr) Variable Function
426(i32): 216(ptr) Variable Function 440(i32): 225(ptr) Variable Function
429(i8v4): 428(ptr) Variable Function 443(i8v4): 442(ptr) Variable Function
433(u16): 432(ptr) Variable Function 447(u16): 446(ptr) Variable Function
434(u8v2): 50(ptr) Variable Function 448(u8v2): 50(ptr) Variable Function
437(u32): 291(ptr) Variable Function 451(u32): 300(ptr) Variable Function
440(u8v4): 439(ptr) Variable Function 454(u8v4): 453(ptr) Variable Function
452(bv): 451(ptr) Variable Function 466(bv): 465(ptr) Variable Function
339: 52(i8vec2) Load 338(i8v) 353: 52(i8vec2) Load 352(i8v)
340: 52(i8vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 339 354: 52(i8vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 353
Store 338(i8v) 340 Store 352(i8v) 354
342: 14(int8_t) Load 341(i8) 356: 14(int8_t) Load 355(i8)
343: 14(int8_t) ExtInst 1(GLSL.std.450) 7(SSign) 342 357: 14(int8_t) ExtInst 1(GLSL.std.450) 7(SSign) 356
Store 341(i8) 343 Store 355(i8) 357
344: 52(i8vec2) Load 338(i8v) 358: 52(i8vec2) Load 352(i8v)
345: 14(int8_t) Load 341(i8) 359: 14(int8_t) Load 355(i8)
346: 52(i8vec2) CompositeConstruct 345 345 360: 52(i8vec2) CompositeConstruct 359 359
347: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 344 346 361: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 358 360
Store 338(i8v) 347 Store 352(i8v) 361
348: 52(i8vec2) Load 338(i8v) 362: 52(i8vec2) Load 352(i8v)
350: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 348 349 364: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 362 363
Store 338(i8v) 350 Store 352(i8v) 364
352: 190(i8vec3) Load 351(u8v) 366: 199(i8vec3) Load 365(u8v)
354: 36(int8_t) Load 353(u8) 368: 36(int8_t) Load 367(u8)
355: 190(i8vec3) CompositeConstruct 354 354 354 369: 199(i8vec3) CompositeConstruct 368 368 368
356: 190(i8vec3) ExtInst 1(GLSL.std.450) 38(UMin) 352 355 370: 199(i8vec3) ExtInst 1(GLSL.std.450) 38(UMin) 366 369
Store 351(u8v) 356 Store 365(u8v) 370
357: 190(i8vec3) Load 351(u8v) 371: 199(i8vec3) Load 365(u8v)
359: 190(i8vec3) ExtInst 1(GLSL.std.450) 38(UMin) 357 358 373: 199(i8vec3) ExtInst 1(GLSL.std.450) 38(UMin) 371 372
Store 351(u8v) 359 Store 365(u8v) 373
360: 52(i8vec2) Load 338(i8v) 374: 52(i8vec2) Load 352(i8v)
361: 14(int8_t) Load 341(i8) 375: 14(int8_t) Load 355(i8)
362: 52(i8vec2) CompositeConstruct 361 361 376: 52(i8vec2) CompositeConstruct 375 375
363: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 360 362 377: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 374 376
Store 338(i8v) 363 Store 352(i8v) 377
364: 52(i8vec2) Load 338(i8v) 378: 52(i8vec2) Load 352(i8v)
365: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 364 349 379: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 378 363
Store 338(i8v) 365 Store 352(i8v) 379
366: 190(i8vec3) Load 351(u8v) 380: 199(i8vec3) Load 365(u8v)
367: 36(int8_t) Load 353(u8) 381: 36(int8_t) Load 367(u8)
368: 190(i8vec3) CompositeConstruct 367 367 367 382: 199(i8vec3) CompositeConstruct 381 381 381
369: 190(i8vec3) ExtInst 1(GLSL.std.450) 41(UMax) 366 368 383: 199(i8vec3) ExtInst 1(GLSL.std.450) 41(UMax) 380 382
Store 351(u8v) 369 Store 365(u8v) 383
370: 190(i8vec3) Load 351(u8v) 384: 199(i8vec3) Load 365(u8v)
371: 190(i8vec3) ExtInst 1(GLSL.std.450) 41(UMax) 370 358 385: 199(i8vec3) ExtInst 1(GLSL.std.450) 41(UMax) 384 372
Store 351(u8v) 371 Store 365(u8v) 385
372: 52(i8vec2) Load 338(i8v) 386: 52(i8vec2) Load 352(i8v)
373: 14(int8_t) Load 341(i8) 387: 14(int8_t) Load 355(i8)
374: 14(int8_t) SNegate 373 388: 14(int8_t) SNegate 387
375: 14(int8_t) Load 341(i8) 389: 14(int8_t) Load 355(i8)
376: 52(i8vec2) CompositeConstruct 374 374 390: 52(i8vec2) CompositeConstruct 388 388
377: 52(i8vec2) CompositeConstruct 375 375 391: 52(i8vec2) CompositeConstruct 389 389
378: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 372 376 377 392: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 386 390 391
Store 338(i8v) 378 Store 352(i8v) 392
379: 52(i8vec2) Load 338(i8v) 393: 52(i8vec2) Load 352(i8v)
380: 52(i8vec2) Load 338(i8v) 394: 52(i8vec2) Load 352(i8v)
381: 52(i8vec2) SNegate 380 395: 52(i8vec2) SNegate 394
382: 52(i8vec2) Load 338(i8v) 396: 52(i8vec2) Load 352(i8v)
383: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 379 381 382 397: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 393 395 396
Store 338(i8v) 383 Store 352(i8v) 397
384: 190(i8vec3) Load 351(u8v) 398: 199(i8vec3) Load 365(u8v)
385: 36(int8_t) Load 353(u8) 399: 36(int8_t) Load 367(u8)
386: 36(int8_t) SNegate 385 400: 36(int8_t) SNegate 399
387: 36(int8_t) Load 353(u8) 401: 36(int8_t) Load 367(u8)
388: 190(i8vec3) CompositeConstruct 386 386 386 402: 199(i8vec3) CompositeConstruct 400 400 400
389: 190(i8vec3) CompositeConstruct 387 387 387 403: 199(i8vec3) CompositeConstruct 401 401 401
390: 190(i8vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 384 388 389 404: 199(i8vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 398 402 403
Store 351(u8v) 390 Store 365(u8v) 404
391: 190(i8vec3) Load 351(u8v) 405: 199(i8vec3) Load 365(u8v)
392: 190(i8vec3) Load 351(u8v) 406: 199(i8vec3) Load 365(u8v)
393: 190(i8vec3) SNegate 392 407: 199(i8vec3) SNegate 406
394: 190(i8vec3) Load 351(u8v) 408: 199(i8vec3) Load 365(u8v)
395: 190(i8vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 391 393 394 409: 199(i8vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 405 407 408
Store 351(u8v) 395 Store 365(u8v) 409
396: 15(ptr) AccessChain 338(i8v) 277 410: 15(ptr) AccessChain 352(i8v) 286
397: 14(int8_t) Load 396 411: 14(int8_t) Load 410
398: 15(ptr) AccessChain 338(i8v) 261 412: 15(ptr) AccessChain 352(i8v) 270
399: 14(int8_t) Load 398 413: 14(int8_t) Load 412
401: 14(int8_t) Select 400 399 397 415: 14(int8_t) Select 414 413 411
Store 341(i8) 401 Store 355(i8) 415
402: 14(int8_t) Load 341(i8) 416: 14(int8_t) Load 355(i8)
403: 52(i8vec2) CompositeConstruct 402 402 417: 52(i8vec2) CompositeConstruct 416 416
404: 14(int8_t) Load 341(i8) 418: 14(int8_t) Load 355(i8)
405: 14(int8_t) SNegate 404 419: 14(int8_t) SNegate 418
406: 52(i8vec2) CompositeConstruct 405 405 420: 52(i8vec2) CompositeConstruct 419 419
409: 52(i8vec2) Select 408 406 403 423: 52(i8vec2) Select 422 420 417
Store 338(i8v) 409 Store 352(i8v) 423
410: 37(ptr) AccessChain 351(u8v) 277 424: 37(ptr) AccessChain 365(u8v) 286
411: 36(int8_t) Load 410 425: 36(int8_t) Load 424
412: 37(ptr) AccessChain 351(u8v) 261 426: 37(ptr) AccessChain 365(u8v) 270
413: 36(int8_t) Load 412 427: 36(int8_t) Load 426
414: 36(int8_t) Select 400 413 411 428: 36(int8_t) Select 414 427 425
Store 353(u8) 414 Store 367(u8) 428
415: 36(int8_t) Load 353(u8) 429: 36(int8_t) Load 367(u8)
416: 190(i8vec3) CompositeConstruct 415 415 415 430: 199(i8vec3) CompositeConstruct 429 429 429
417: 36(int8_t) Load 353(u8) 431: 36(int8_t) Load 367(u8)
418: 36(int8_t) SNegate 417 432: 36(int8_t) SNegate 431
419: 190(i8vec3) CompositeConstruct 418 418 418 433: 199(i8vec3) CompositeConstruct 432 432 432
422: 190(i8vec3) Select 421 419 416 436: 199(i8vec3) Select 435 433 430
Store 351(u8v) 422 Store 365(u8v) 436
424: 52(i8vec2) Load 338(i8v) 438: 52(i8vec2) Load 352(i8v)
425: 57(int16_t) Bitcast 424 439: 57(int16_t) Bitcast 438
Store 423(i16) 425 Store 437(i16) 439
430: 427(i8vec4) Load 429(i8v4) 444: 441(i8vec4) Load 443(i8v4)
431: 27(int) Bitcast 430 445: 27(int) Bitcast 444
Store 426(i32) 431 Store 440(i32) 445
435: 49(i8vec2) Load 434(u8v2) 449: 49(i8vec2) Load 448(u8v2)
436: 64(int16_t) Bitcast 435 450: 64(int16_t) Bitcast 449
Store 433(u16) 436 Store 447(u16) 450
441: 438(i8vec4) Load 440(u8v4) 455: 452(i8vec4) Load 454(u8v4)
442: 17(int) Bitcast 441 456: 17(int) Bitcast 455
Store 437(u32) 442 Store 451(u32) 456
443: 57(int16_t) Load 423(i16) 457: 57(int16_t) Load 437(i16)
444: 52(i8vec2) Bitcast 443 458: 52(i8vec2) Bitcast 457
Store 338(i8v) 444 Store 352(i8v) 458
445: 27(int) Load 426(i32) 459: 27(int) Load 440(i32)
446: 427(i8vec4) Bitcast 445 460: 441(i8vec4) Bitcast 459
Store 429(i8v4) 446 Store 443(i8v4) 460
447: 64(int16_t) Load 433(u16) 461: 64(int16_t) Load 447(u16)
448: 49(i8vec2) Bitcast 447 462: 49(i8vec2) Bitcast 461
Store 434(u8v2) 448 Store 448(u8v2) 462
449: 17(int) Load 437(u32) 463: 17(int) Load 451(u32)
450: 438(i8vec4) Bitcast 449 464: 452(i8vec4) Bitcast 463
Store 440(u8v4) 450 Store 454(u8v4) 464
453: 190(i8vec3) Load 351(u8v) 467: 199(i8vec3) Load 365(u8v)
454: 36(int8_t) Load 353(u8) 468: 36(int8_t) Load 367(u8)
455: 190(i8vec3) CompositeConstruct 454 454 454 469: 199(i8vec3) CompositeConstruct 468 468 468
456: 420(bvec3) ULessThan 453 455 470: 434(bvec3) ULessThan 467 469
Store 452(bv) 456 Store 466(bv) 470
457: 52(i8vec2) Load 338(i8v) 471: 52(i8vec2) Load 352(i8v)
458: 14(int8_t) Load 341(i8) 472: 14(int8_t) Load 355(i8)
459: 52(i8vec2) CompositeConstruct 458 458 473: 52(i8vec2) CompositeConstruct 472 472
460: 172(bvec2) SLessThan 457 459 474: 172(bvec2) SLessThan 471 473
461: 275(ptr) AccessChain 452(bv) 277 475: 284(ptr) AccessChain 466(bv) 286
462: 171(bool) CompositeExtract 460 0 476: 171(bool) CompositeExtract 474 0
Store 461 462
463: 275(ptr) AccessChain 452(bv) 261
464: 171(bool) CompositeExtract 460 1
Store 463 464
465: 190(i8vec3) Load 351(u8v)
466: 36(int8_t) Load 353(u8)
467: 190(i8vec3) CompositeConstruct 466 466 466
468: 420(bvec3) ULessThanEqual 465 467
Store 452(bv) 468
469: 52(i8vec2) Load 338(i8v)
470: 14(int8_t) Load 341(i8)
471: 52(i8vec2) CompositeConstruct 470 470
472: 172(bvec2) SLessThanEqual 469 471
473: 275(ptr) AccessChain 452(bv) 277
474: 171(bool) CompositeExtract 472 0
Store 473 474
475: 275(ptr) AccessChain 452(bv) 261
476: 171(bool) CompositeExtract 472 1
Store 475 476 Store 475 476
477: 190(i8vec3) Load 351(u8v) 477: 284(ptr) AccessChain 466(bv) 270
478: 36(int8_t) Load 353(u8) 478: 171(bool) CompositeExtract 474 1
479: 190(i8vec3) CompositeConstruct 478 478 478 Store 477 478
480: 420(bvec3) UGreaterThan 477 479 479: 199(i8vec3) Load 365(u8v)
Store 452(bv) 480 480: 36(int8_t) Load 367(u8)
481: 52(i8vec2) Load 338(i8v) 481: 199(i8vec3) CompositeConstruct 480 480 480
482: 14(int8_t) Load 341(i8) 482: 434(bvec3) ULessThanEqual 479 481
483: 52(i8vec2) CompositeConstruct 482 482 Store 466(bv) 482
484: 172(bvec2) SGreaterThan 481 483 483: 52(i8vec2) Load 352(i8v)
485: 275(ptr) AccessChain 452(bv) 277 484: 14(int8_t) Load 355(i8)
486: 171(bool) CompositeExtract 484 0 485: 52(i8vec2) CompositeConstruct 484 484
Store 485 486 486: 172(bvec2) SLessThanEqual 483 485
487: 275(ptr) AccessChain 452(bv) 261 487: 284(ptr) AccessChain 466(bv) 286
488: 171(bool) CompositeExtract 484 1 488: 171(bool) CompositeExtract 486 0
Store 487 488 Store 487 488
489: 190(i8vec3) Load 351(u8v) 489: 284(ptr) AccessChain 466(bv) 270
490: 36(int8_t) Load 353(u8) 490: 171(bool) CompositeExtract 486 1
491: 190(i8vec3) CompositeConstruct 490 490 490 Store 489 490
492: 420(bvec3) UGreaterThanEqual 489 491 491: 199(i8vec3) Load 365(u8v)
Store 452(bv) 492 492: 36(int8_t) Load 367(u8)
493: 52(i8vec2) Load 338(i8v) 493: 199(i8vec3) CompositeConstruct 492 492 492
494: 14(int8_t) Load 341(i8) 494: 434(bvec3) UGreaterThan 491 493
495: 52(i8vec2) CompositeConstruct 494 494 Store 466(bv) 494
496: 172(bvec2) SGreaterThanEqual 493 495 495: 52(i8vec2) Load 352(i8v)
497: 275(ptr) AccessChain 452(bv) 277 496: 14(int8_t) Load 355(i8)
498: 171(bool) CompositeExtract 496 0 497: 52(i8vec2) CompositeConstruct 496 496
Store 497 498 498: 172(bvec2) SGreaterThan 495 497
499: 275(ptr) AccessChain 452(bv) 261 499: 284(ptr) AccessChain 466(bv) 286
500: 171(bool) CompositeExtract 496 1 500: 171(bool) CompositeExtract 498 0
Store 499 500 Store 499 500
501: 190(i8vec3) Load 351(u8v) 501: 284(ptr) AccessChain 466(bv) 270
502: 36(int8_t) Load 353(u8) 502: 171(bool) CompositeExtract 498 1
503: 190(i8vec3) CompositeConstruct 502 502 502 Store 501 502
504: 420(bvec3) IEqual 501 503 503: 199(i8vec3) Load 365(u8v)
Store 452(bv) 504 504: 36(int8_t) Load 367(u8)
505: 52(i8vec2) Load 338(i8v) 505: 199(i8vec3) CompositeConstruct 504 504 504
506: 14(int8_t) Load 341(i8) 506: 434(bvec3) UGreaterThanEqual 503 505
507: 52(i8vec2) CompositeConstruct 506 506 Store 466(bv) 506
508: 172(bvec2) IEqual 505 507 507: 52(i8vec2) Load 352(i8v)
509: 275(ptr) AccessChain 452(bv) 277 508: 14(int8_t) Load 355(i8)
510: 171(bool) CompositeExtract 508 0 509: 52(i8vec2) CompositeConstruct 508 508
Store 509 510 510: 172(bvec2) SGreaterThanEqual 507 509
511: 275(ptr) AccessChain 452(bv) 261 511: 284(ptr) AccessChain 466(bv) 286
512: 171(bool) CompositeExtract 508 1 512: 171(bool) CompositeExtract 510 0
Store 511 512 Store 511 512
513: 190(i8vec3) Load 351(u8v) 513: 284(ptr) AccessChain 466(bv) 270
514: 36(int8_t) Load 353(u8) 514: 171(bool) CompositeExtract 510 1
515: 190(i8vec3) CompositeConstruct 514 514 514 Store 513 514
516: 420(bvec3) INotEqual 513 515 515: 199(i8vec3) Load 365(u8v)
Store 452(bv) 516 516: 36(int8_t) Load 367(u8)
517: 52(i8vec2) Load 338(i8v) 517: 199(i8vec3) CompositeConstruct 516 516 516
518: 14(int8_t) Load 341(i8) 518: 434(bvec3) IEqual 515 517
519: 52(i8vec2) CompositeConstruct 518 518 Store 466(bv) 518
520: 172(bvec2) INotEqual 517 519 519: 52(i8vec2) Load 352(i8v)
521: 275(ptr) AccessChain 452(bv) 277 520: 14(int8_t) Load 355(i8)
522: 171(bool) CompositeExtract 520 0 521: 52(i8vec2) CompositeConstruct 520 520
Store 521 522 522: 172(bvec2) IEqual 519 521
523: 275(ptr) AccessChain 452(bv) 261 523: 284(ptr) AccessChain 466(bv) 286
524: 171(bool) CompositeExtract 520 1 524: 171(bool) CompositeExtract 522 0
Store 523 524 Store 523 524
525: 284(ptr) AccessChain 466(bv) 270
526: 171(bool) CompositeExtract 522 1
Store 525 526
527: 199(i8vec3) Load 365(u8v)
528: 36(int8_t) Load 367(u8)
529: 199(i8vec3) CompositeConstruct 528 528 528
530: 434(bvec3) INotEqual 527 529
Store 466(bv) 530
531: 52(i8vec2) Load 352(i8v)
532: 14(int8_t) Load 355(i8)
533: 52(i8vec2) CompositeConstruct 532 532
534: 172(bvec2) INotEqual 531 533
535: 284(ptr) AccessChain 466(bv) 286
536: 171(bool) CompositeExtract 534 0
Store 535 536
537: 284(ptr) AccessChain 466(bv) 270
538: 171(bool) CompositeExtract 534 1
Store 537 538
Return Return
FunctionEnd FunctionEnd

View File

@ -116,6 +116,8 @@ void operators()
int32_t i; int32_t i;
int64_t i64; int64_t i64;
bool b; bool b;
float f;
float arr[4] = {1.0, 2.0, 3.0, 4.0};
// Unary // Unary
u16v++; u16v++;
@ -163,6 +165,9 @@ void operators()
uv = u16v & uv; uv = u16v & uv;
uv ^= i16; uv ^= i16;
u16v = u16v ^ i16; u16v = u16v ^ i16;
// Index
f = arr[i16];
} }
void builtinFuncs() void builtinFuncs()

View File

@ -117,6 +117,8 @@ void operators()
int32_t i; int32_t i;
int16_t i16; int16_t i16;
bool b; bool b;
float arr[4] = {1.0, 2.0, 3.0, 4.0};
float f;
// Unary // Unary
u8v++; u8v++;
@ -164,6 +166,9 @@ void operators()
uv = u8v & uv; uv = u8v & uv;
uv ^= i8; uv ^= i8;
u8v = u8v ^ i8; u8v = u8v ^ i8;
// Index
f = arr[i8];
} }
void builtinFuncs() void builtinFuncs()

View File

@ -3029,11 +3029,14 @@ void TParseContext::constantValueCheck(TIntermTyped* node, const char* token)
// //
// Both test, and if necessary spit out an error, to see if the node is really // Both test, and if necessary spit out an error, to see if the node is really
// an integer. // a 32-bit integer or can implicitly convert to one.
// //
void TParseContext::integerCheck(const TIntermTyped* node, const char* token) void TParseContext::integerCheck(const TIntermTyped* node, const char* token)
{ {
if ((node->getBasicType() == EbtInt || node->getBasicType() == EbtUint) && node->isScalar()) auto from_type = node->getBasicType();
if ((from_type == EbtInt || from_type == EbtUint ||
intermediate.canImplicitlyPromote(from_type, EbtInt, EOpNull) ||
intermediate.canImplicitlyPromote(from_type, EbtUint, EOpNull)) && node->isScalar())
return; return;
error(node->getLoc(), "scalar integer expression required", token, ""); error(node->getLoc(), "scalar integer expression required", token, "");