parent
3f04389a18
commit
3d03b7822e
@ -7506,6 +7506,8 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
|
|||||||
break;
|
break;
|
||||||
case glslang::EOpReadFirstInvocation:
|
case glslang::EOpReadFirstInvocation:
|
||||||
opCode = spv::OpSubgroupFirstInvocationKHR;
|
opCode = spv::OpSubgroupFirstInvocationKHR;
|
||||||
|
if (builder.isVectorType(typeId))
|
||||||
|
return CreateInvocationsVectorOperation(opCode, groupOperation, typeId, operands);
|
||||||
break;
|
break;
|
||||||
case glslang::EOpBallot:
|
case glslang::EOpBallot:
|
||||||
{
|
{
|
||||||
@ -7630,7 +7632,7 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
|
|||||||
assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
|
assert(op == spv::OpGroupFMin || op == spv::OpGroupUMin || op == spv::OpGroupSMin ||
|
||||||
op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
|
op == spv::OpGroupFMax || op == spv::OpGroupUMax || op == spv::OpGroupSMax ||
|
||||||
op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
|
op == spv::OpGroupFAdd || op == spv::OpGroupIAdd || op == spv::OpGroupBroadcast ||
|
||||||
op == spv::OpSubgroupReadInvocationKHR ||
|
op == spv::OpSubgroupReadInvocationKHR || op == spv::OpSubgroupFirstInvocationKHR ||
|
||||||
op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD ||
|
op == spv::OpGroupFMinNonUniformAMD || op == spv::OpGroupUMinNonUniformAMD ||
|
||||||
op == spv::OpGroupSMinNonUniformAMD ||
|
op == spv::OpGroupSMinNonUniformAMD ||
|
||||||
op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD ||
|
op == spv::OpGroupFMaxNonUniformAMD || op == spv::OpGroupUMaxNonUniformAMD ||
|
||||||
@ -7659,6 +7661,8 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv
|
|||||||
spvGroupOperands.push_back(scalar);
|
spvGroupOperands.push_back(scalar);
|
||||||
spv::IdImmediate operand = { true, operands[1] };
|
spv::IdImmediate operand = { true, operands[1] };
|
||||||
spvGroupOperands.push_back(operand);
|
spvGroupOperands.push_back(operand);
|
||||||
|
} else if (op == spv::OpSubgroupFirstInvocationKHR) {
|
||||||
|
spvGroupOperands.push_back(scalar);
|
||||||
} else if (op == spv::OpGroupBroadcast) {
|
} else if (op == spv::OpGroupBroadcast) {
|
||||||
spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) };
|
spv::IdImmediate scope = { true, builder.makeUintConstant(spv::ScopeSubgroup) };
|
||||||
spvGroupOperands.push_back(scope);
|
spvGroupOperands.push_back(scope);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
spv.shaderBallot.comp
|
spv.shaderBallot.comp
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 343
|
// Id's are bound by 397
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability Int64
|
Capability Int64
|
||||||
@ -42,7 +42,7 @@ spv.shaderBallot.comp
|
|||||||
Decorate 72(Buffers) BufferBlock
|
Decorate 72(Buffers) BufferBlock
|
||||||
Decorate 75(data) DescriptorSet 0
|
Decorate 75(data) DescriptorSet 0
|
||||||
Decorate 75(data) Binding 0
|
Decorate 75(data) Binding 0
|
||||||
Decorate 342 BuiltIn WorkgroupSize
|
Decorate 396 BuiltIn WorkgroupSize
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 0
|
6: TypeInt 32 0
|
||||||
@ -89,8 +89,8 @@ spv.shaderBallot.comp
|
|||||||
196: TypePointer Uniform 6(int)
|
196: TypePointer Uniform 6(int)
|
||||||
203: TypePointer Uniform 20(ivec4)
|
203: TypePointer Uniform 20(ivec4)
|
||||||
218: TypeVector 6(int) 3
|
218: TypeVector 6(int) 3
|
||||||
341: 6(int) Constant 8
|
395: 6(int) Constant 8
|
||||||
342: 218(ivec3) ConstantComposite 341 341 100
|
396: 218(ivec3) ConstantComposite 395 395 100
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
8(invocation): 7(ptr) Variable Function
|
8(invocation): 7(ptr) Variable Function
|
||||||
@ -329,107 +329,161 @@ spv.shaderBallot.comp
|
|||||||
257: 88(ptr) AccessChain 75(data) 86 77
|
257: 88(ptr) AccessChain 75(data) 86 77
|
||||||
258: 69(fvec4) Load 257
|
258: 69(fvec4) Load 257
|
||||||
259: 87(fvec2) VectorShuffle 258 258 0 1
|
259: 87(fvec2) VectorShuffle 258 258 0 1
|
||||||
260: 87(fvec2) SubgroupFirstInvocationKHR 259
|
260: 68(float) CompositeExtract 259 0
|
||||||
261: 79(ptr) AccessChain 75(data) 256 77 78
|
261: 68(float) SubgroupFirstInvocationKHR 260
|
||||||
262: 68(float) CompositeExtract 260 0
|
262: 68(float) CompositeExtract 259 1
|
||||||
Store 261 262
|
263: 68(float) SubgroupFirstInvocationKHR 262
|
||||||
263: 79(ptr) AccessChain 75(data) 256 77 100
|
264: 87(fvec2) CompositeConstruct 261 263
|
||||||
264: 68(float) CompositeExtract 260 1
|
265: 79(ptr) AccessChain 75(data) 256 77 78
|
||||||
Store 263 264
|
266: 68(float) CompositeExtract 264 0
|
||||||
265: 6(int) Load 8(invocation)
|
Store 265 266
|
||||||
266: 88(ptr) AccessChain 75(data) 104 77
|
267: 79(ptr) AccessChain 75(data) 256 77 100
|
||||||
267: 69(fvec4) Load 266
|
268: 68(float) CompositeExtract 264 1
|
||||||
268: 105(fvec3) VectorShuffle 267 267 0 1 2
|
Store 267 268
|
||||||
269: 105(fvec3) SubgroupFirstInvocationKHR 268
|
269: 6(int) Load 8(invocation)
|
||||||
270: 79(ptr) AccessChain 75(data) 265 77 78
|
270: 88(ptr) AccessChain 75(data) 104 77
|
||||||
271: 68(float) CompositeExtract 269 0
|
271: 69(fvec4) Load 270
|
||||||
Store 270 271
|
272: 105(fvec3) VectorShuffle 271 271 0 1 2
|
||||||
272: 79(ptr) AccessChain 75(data) 265 77 100
|
273: 68(float) CompositeExtract 272 0
|
||||||
273: 68(float) CompositeExtract 269 1
|
274: 68(float) SubgroupFirstInvocationKHR 273
|
||||||
Store 272 273
|
275: 68(float) CompositeExtract 272 1
|
||||||
274: 79(ptr) AccessChain 75(data) 265 77 121
|
276: 68(float) SubgroupFirstInvocationKHR 275
|
||||||
275: 68(float) CompositeExtract 269 2
|
277: 68(float) CompositeExtract 272 2
|
||||||
Store 274 275
|
278: 68(float) SubgroupFirstInvocationKHR 277
|
||||||
276: 6(int) Load 8(invocation)
|
279: 105(fvec3) CompositeConstruct 274 276 278
|
||||||
277: 88(ptr) AccessChain 75(data) 125 77
|
280: 79(ptr) AccessChain 75(data) 269 77 78
|
||||||
278: 69(fvec4) Load 277
|
281: 68(float) CompositeExtract 279 0
|
||||||
279: 69(fvec4) SubgroupFirstInvocationKHR 278
|
Store 280 281
|
||||||
280: 88(ptr) AccessChain 75(data) 276 77
|
282: 79(ptr) AccessChain 75(data) 269 77 100
|
||||||
Store 280 279
|
283: 68(float) CompositeExtract 279 1
|
||||||
281: 6(int) Load 8(invocation)
|
Store 282 283
|
||||||
282: 140(ptr) AccessChain 75(data) 77 86 78
|
284: 79(ptr) AccessChain 75(data) 269 77 121
|
||||||
283: 70(int) Load 282
|
285: 68(float) CompositeExtract 279 2
|
||||||
284: 70(int) SubgroupFirstInvocationKHR 283
|
Store 284 285
|
||||||
285: 140(ptr) AccessChain 75(data) 281 86 78
|
|
||||||
Store 285 284
|
|
||||||
286: 6(int) Load 8(invocation)
|
286: 6(int) Load 8(invocation)
|
||||||
287: 148(ptr) AccessChain 75(data) 86 86
|
287: 88(ptr) AccessChain 75(data) 125 77
|
||||||
288: 71(ivec4) Load 287
|
288: 69(fvec4) Load 287
|
||||||
289: 147(ivec2) VectorShuffle 288 288 0 1
|
289: 68(float) CompositeExtract 288 0
|
||||||
290: 147(ivec2) SubgroupFirstInvocationKHR 289
|
290: 68(float) SubgroupFirstInvocationKHR 289
|
||||||
291: 140(ptr) AccessChain 75(data) 286 86 78
|
291: 68(float) CompositeExtract 288 1
|
||||||
292: 70(int) CompositeExtract 290 0
|
292: 68(float) SubgroupFirstInvocationKHR 291
|
||||||
Store 291 292
|
293: 68(float) CompositeExtract 288 2
|
||||||
293: 140(ptr) AccessChain 75(data) 286 86 100
|
294: 68(float) SubgroupFirstInvocationKHR 293
|
||||||
294: 70(int) CompositeExtract 290 1
|
295: 68(float) CompositeExtract 288 3
|
||||||
Store 293 294
|
296: 68(float) SubgroupFirstInvocationKHR 295
|
||||||
295: 6(int) Load 8(invocation)
|
297: 69(fvec4) CompositeConstruct 290 292 294 296
|
||||||
296: 148(ptr) AccessChain 75(data) 104 86
|
298: 88(ptr) AccessChain 75(data) 286 77
|
||||||
297: 71(ivec4) Load 296
|
Store 298 297
|
||||||
298: 163(ivec3) VectorShuffle 297 297 0 1 2
|
299: 6(int) Load 8(invocation)
|
||||||
299: 163(ivec3) SubgroupFirstInvocationKHR 298
|
300: 140(ptr) AccessChain 75(data) 77 86 78
|
||||||
300: 140(ptr) AccessChain 75(data) 295 86 78
|
301: 70(int) Load 300
|
||||||
301: 70(int) CompositeExtract 299 0
|
302: 70(int) SubgroupFirstInvocationKHR 301
|
||||||
Store 300 301
|
303: 140(ptr) AccessChain 75(data) 299 86 78
|
||||||
302: 140(ptr) AccessChain 75(data) 295 86 100
|
Store 303 302
|
||||||
303: 70(int) CompositeExtract 299 1
|
304: 6(int) Load 8(invocation)
|
||||||
Store 302 303
|
305: 148(ptr) AccessChain 75(data) 86 86
|
||||||
304: 140(ptr) AccessChain 75(data) 295 86 121
|
306: 71(ivec4) Load 305
|
||||||
305: 70(int) CompositeExtract 299 2
|
307: 147(ivec2) VectorShuffle 306 306 0 1
|
||||||
Store 304 305
|
308: 70(int) CompositeExtract 307 0
|
||||||
306: 6(int) Load 8(invocation)
|
309: 70(int) SubgroupFirstInvocationKHR 308
|
||||||
307: 148(ptr) AccessChain 75(data) 125 86
|
310: 70(int) CompositeExtract 307 1
|
||||||
308: 71(ivec4) Load 307
|
311: 70(int) SubgroupFirstInvocationKHR 310
|
||||||
309: 71(ivec4) SubgroupFirstInvocationKHR 308
|
312: 147(ivec2) CompositeConstruct 309 311
|
||||||
310: 148(ptr) AccessChain 75(data) 306 86
|
313: 140(ptr) AccessChain 75(data) 304 86 78
|
||||||
Store 310 309
|
314: 70(int) CompositeExtract 312 0
|
||||||
311: 6(int) Load 8(invocation)
|
Store 313 314
|
||||||
312: 196(ptr) AccessChain 75(data) 77 104 78
|
315: 140(ptr) AccessChain 75(data) 304 86 100
|
||||||
313: 6(int) Load 312
|
316: 70(int) CompositeExtract 312 1
|
||||||
314: 6(int) SubgroupFirstInvocationKHR 313
|
Store 315 316
|
||||||
315: 196(ptr) AccessChain 75(data) 311 104 78
|
317: 6(int) Load 8(invocation)
|
||||||
Store 315 314
|
318: 148(ptr) AccessChain 75(data) 104 86
|
||||||
316: 6(int) Load 8(invocation)
|
319: 71(ivec4) Load 318
|
||||||
317: 203(ptr) AccessChain 75(data) 86 104
|
320: 163(ivec3) VectorShuffle 319 319 0 1 2
|
||||||
318: 20(ivec4) Load 317
|
321: 70(int) CompositeExtract 320 0
|
||||||
319: 26(ivec2) VectorShuffle 318 318 0 1
|
322: 70(int) SubgroupFirstInvocationKHR 321
|
||||||
320: 26(ivec2) SubgroupFirstInvocationKHR 319
|
323: 70(int) CompositeExtract 320 1
|
||||||
321: 196(ptr) AccessChain 75(data) 316 104 78
|
324: 70(int) SubgroupFirstInvocationKHR 323
|
||||||
322: 6(int) CompositeExtract 320 0
|
325: 70(int) CompositeExtract 320 2
|
||||||
Store 321 322
|
326: 70(int) SubgroupFirstInvocationKHR 325
|
||||||
323: 196(ptr) AccessChain 75(data) 316 104 100
|
327: 163(ivec3) CompositeConstruct 322 324 326
|
||||||
324: 6(int) CompositeExtract 320 1
|
328: 140(ptr) AccessChain 75(data) 317 86 78
|
||||||
Store 323 324
|
329: 70(int) CompositeExtract 327 0
|
||||||
325: 6(int) Load 8(invocation)
|
Store 328 329
|
||||||
326: 203(ptr) AccessChain 75(data) 104 104
|
330: 140(ptr) AccessChain 75(data) 317 86 100
|
||||||
327: 20(ivec4) Load 326
|
331: 70(int) CompositeExtract 327 1
|
||||||
328: 218(ivec3) VectorShuffle 327 327 0 1 2
|
|
||||||
329: 218(ivec3) SubgroupFirstInvocationKHR 328
|
|
||||||
330: 196(ptr) AccessChain 75(data) 325 104 78
|
|
||||||
331: 6(int) CompositeExtract 329 0
|
|
||||||
Store 330 331
|
Store 330 331
|
||||||
332: 196(ptr) AccessChain 75(data) 325 104 100
|
332: 140(ptr) AccessChain 75(data) 317 86 121
|
||||||
333: 6(int) CompositeExtract 329 1
|
333: 70(int) CompositeExtract 327 2
|
||||||
Store 332 333
|
Store 332 333
|
||||||
334: 196(ptr) AccessChain 75(data) 325 104 121
|
334: 6(int) Load 8(invocation)
|
||||||
335: 6(int) CompositeExtract 329 2
|
335: 148(ptr) AccessChain 75(data) 125 86
|
||||||
Store 334 335
|
336: 71(ivec4) Load 335
|
||||||
336: 6(int) Load 8(invocation)
|
337: 70(int) CompositeExtract 336 0
|
||||||
337: 203(ptr) AccessChain 75(data) 125 104
|
338: 70(int) SubgroupFirstInvocationKHR 337
|
||||||
338: 20(ivec4) Load 337
|
339: 70(int) CompositeExtract 336 1
|
||||||
339: 20(ivec4) SubgroupFirstInvocationKHR 338
|
340: 70(int) SubgroupFirstInvocationKHR 339
|
||||||
340: 203(ptr) AccessChain 75(data) 336 104
|
341: 70(int) CompositeExtract 336 2
|
||||||
Store 340 339
|
342: 70(int) SubgroupFirstInvocationKHR 341
|
||||||
|
343: 70(int) CompositeExtract 336 3
|
||||||
|
344: 70(int) SubgroupFirstInvocationKHR 343
|
||||||
|
345: 71(ivec4) CompositeConstruct 338 340 342 344
|
||||||
|
346: 148(ptr) AccessChain 75(data) 334 86
|
||||||
|
Store 346 345
|
||||||
|
347: 6(int) Load 8(invocation)
|
||||||
|
348: 196(ptr) AccessChain 75(data) 77 104 78
|
||||||
|
349: 6(int) Load 348
|
||||||
|
350: 6(int) SubgroupFirstInvocationKHR 349
|
||||||
|
351: 196(ptr) AccessChain 75(data) 347 104 78
|
||||||
|
Store 351 350
|
||||||
|
352: 6(int) Load 8(invocation)
|
||||||
|
353: 203(ptr) AccessChain 75(data) 86 104
|
||||||
|
354: 20(ivec4) Load 353
|
||||||
|
355: 26(ivec2) VectorShuffle 354 354 0 1
|
||||||
|
356: 6(int) CompositeExtract 355 0
|
||||||
|
357: 6(int) SubgroupFirstInvocationKHR 356
|
||||||
|
358: 6(int) CompositeExtract 355 1
|
||||||
|
359: 6(int) SubgroupFirstInvocationKHR 358
|
||||||
|
360: 26(ivec2) CompositeConstruct 357 359
|
||||||
|
361: 196(ptr) AccessChain 75(data) 352 104 78
|
||||||
|
362: 6(int) CompositeExtract 360 0
|
||||||
|
Store 361 362
|
||||||
|
363: 196(ptr) AccessChain 75(data) 352 104 100
|
||||||
|
364: 6(int) CompositeExtract 360 1
|
||||||
|
Store 363 364
|
||||||
|
365: 6(int) Load 8(invocation)
|
||||||
|
366: 203(ptr) AccessChain 75(data) 104 104
|
||||||
|
367: 20(ivec4) Load 366
|
||||||
|
368: 218(ivec3) VectorShuffle 367 367 0 1 2
|
||||||
|
369: 6(int) CompositeExtract 368 0
|
||||||
|
370: 6(int) SubgroupFirstInvocationKHR 369
|
||||||
|
371: 6(int) CompositeExtract 368 1
|
||||||
|
372: 6(int) SubgroupFirstInvocationKHR 371
|
||||||
|
373: 6(int) CompositeExtract 368 2
|
||||||
|
374: 6(int) SubgroupFirstInvocationKHR 373
|
||||||
|
375: 218(ivec3) CompositeConstruct 370 372 374
|
||||||
|
376: 196(ptr) AccessChain 75(data) 365 104 78
|
||||||
|
377: 6(int) CompositeExtract 375 0
|
||||||
|
Store 376 377
|
||||||
|
378: 196(ptr) AccessChain 75(data) 365 104 100
|
||||||
|
379: 6(int) CompositeExtract 375 1
|
||||||
|
Store 378 379
|
||||||
|
380: 196(ptr) AccessChain 75(data) 365 104 121
|
||||||
|
381: 6(int) CompositeExtract 375 2
|
||||||
|
Store 380 381
|
||||||
|
382: 6(int) Load 8(invocation)
|
||||||
|
383: 203(ptr) AccessChain 75(data) 125 104
|
||||||
|
384: 20(ivec4) Load 383
|
||||||
|
385: 6(int) CompositeExtract 384 0
|
||||||
|
386: 6(int) SubgroupFirstInvocationKHR 385
|
||||||
|
387: 6(int) CompositeExtract 384 1
|
||||||
|
388: 6(int) SubgroupFirstInvocationKHR 387
|
||||||
|
389: 6(int) CompositeExtract 384 2
|
||||||
|
390: 6(int) SubgroupFirstInvocationKHR 389
|
||||||
|
391: 6(int) CompositeExtract 384 3
|
||||||
|
392: 6(int) SubgroupFirstInvocationKHR 391
|
||||||
|
393: 20(ivec4) CompositeConstruct 386 388 390 392
|
||||||
|
394: 203(ptr) AccessChain 75(data) 382 104
|
||||||
|
Store 394 393
|
||||||
Branch 67
|
Branch 67
|
||||||
67: Label
|
67: Label
|
||||||
Return
|
Return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user