Skip to content

Commit 45fc02a

Browse files
authored
Merge pull request KhronosGroup#366 from KonstantinSeurer/main
Add SPV_AMDX_shader_enqueue
2 parents b730938 + c6e625d commit 45fc02a

File tree

10 files changed

+307
-0
lines changed

10 files changed

+307
-0
lines changed

include/spirv/unified1/spirv.bf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ namespace Spv
168168
RoundingModeRTZ = 4463,
169169
EarlyAndLateFragmentTestsAMD = 5017,
170170
StencilRefReplacingEXT = 5027,
171+
CoalescingAMDX = 5069,
172+
MaxNodeRecursionAMDX = 5071,
173+
StaticNumWorkgroupsAMDX = 5072,
174+
ShaderIndexAMDX = 5073,
175+
MaxNumWorkgroupsAMDX = 5077,
171176
StencilRefUnchangedFrontAMD = 5079,
172177
StencilRefGreaterFrontAMD = 5080,
173178
StencilRefLessFrontAMD = 5081,
@@ -219,6 +224,8 @@ namespace Spv
219224
Image = 11,
220225
StorageBuffer = 12,
221226
TileImageEXT = 4172,
227+
NodePayloadAMDX = 5068,
228+
NodeOutputPayloadAMDX = 5076,
222229
CallableDataKHR = 5328,
223230
CallableDataNV = 5328,
224231
IncomingCallableDataKHR = 5329,
@@ -521,6 +528,10 @@ namespace Spv
521528
WeightTextureQCOM = 4487,
522529
BlockMatchTextureQCOM = 4488,
523530
ExplicitInterpAMD = 4999,
531+
NodeSharesPayloadLimitsWithAMDX = 5019,
532+
NodeMaxPayloadsAMDX = 5020,
533+
TrackFinishWritingAMDX = 5078,
534+
PayloadNodeNameAMDX = 5091,
524535
OverrideCoverageNV = 5248,
525536
PassthroughNV = 5250,
526537
ViewportRelativeNV = 5252,
@@ -675,6 +686,8 @@ namespace Spv
675686
BaryCoordSmoothSampleAMD = 4997,
676687
BaryCoordPullModelAMD = 4998,
677688
FragStencilRefEXT = 5014,
689+
CoalescedInputCountAMDX = 5021,
690+
ShaderIndexAMDX = 5073,
678691
ViewportMaskNV = 5253,
679692
SecondaryPositionNV = 5257,
680693
SecondaryViewportMaskNV = 5258,
@@ -1049,6 +1062,7 @@ namespace Spv
10491062
ImageReadWriteLodAMD = 5015,
10501063
Int64ImageEXT = 5016,
10511064
ShaderClockKHR = 5055,
1065+
ShaderEnqueueAMDX = 5067,
10521066
SampleMaskOverrideCoverageNV = 5249,
10531067
GeometryShaderPassthroughNV = 5251,
10541068
ShaderViewportIndexLayerEXT = 5254,
@@ -1719,6 +1733,9 @@ namespace Spv
17191733
OpFragmentMaskFetchAMD = 5011,
17201734
OpFragmentFetchAMD = 5012,
17211735
OpReadClockKHR = 5056,
1736+
OpFinalizeNodePayloadsAMDX = 5075,
1737+
OpFinishWritingNodePayloadAMDX = 5078,
1738+
OpInitializeNodePayloadsAMDX = 5090,
17221739
OpHitObjectRecordHitMotionNV = 5249,
17231740
OpHitObjectRecordHitWithIndexMotionNV = 5250,
17241741
OpHitObjectRecordMissMotionNV = 5251,

include/spirv/unified1/spirv.core.grammar.json

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4921,6 +4921,41 @@
49214921
"capabilities" : [ "ShaderClockKHR" ],
49224922
"version" : "None"
49234923
},
4924+
{
4925+
"opname" : "OpFinalizeNodePayloadsAMDX",
4926+
"class" : "Reserved",
4927+
"opcode" : 5075,
4928+
"operands" : [
4929+
{ "kind" : "IdRef", "name": "'Payload Array'" }
4930+
],
4931+
"capabilities" : [ "ShaderEnqueueAMDX" ],
4932+
"version" : "None"
4933+
},
4934+
{
4935+
"opname" : "OpFinishWritingNodePayloadAMDX",
4936+
"class" : "Reserved",
4937+
"opcode" : 5078,
4938+
"operands" : [
4939+
{ "kind" : "IdResultType" },
4940+
{ "kind" : "IdResult" },
4941+
{ "kind" : "IdRef", "name": "'Payload'" }
4942+
],
4943+
"capabilities" : [ "ShaderEnqueueAMDX" ],
4944+
"version" : "None"
4945+
},
4946+
{
4947+
"opname" : "OpInitializeNodePayloadsAMDX",
4948+
"class" : "Reserved",
4949+
"opcode" : 5090,
4950+
"operands" : [
4951+
{ "kind" : "IdRef", "name": "'Payload Array'" },
4952+
{ "kind" : "IdScope", "name": "'Visibility'" },
4953+
{ "kind" : "IdRef", "name": "'Payload Count'" },
4954+
{ "kind" : "IdRef", "name": "'Node Index'" }
4955+
],
4956+
"capabilities" : [ "ShaderEnqueueAMDX" ],
4957+
"version" : "None"
4958+
},
49244959
{
49254960
"opname" : "OpHitObjectRecordHitMotionNV",
49264961
"class" : "Reserved",
@@ -10708,6 +10743,52 @@
1070810743
"extensions" : [ "SPV_EXT_shader_stencil_export" ],
1070910744
"version" : "None"
1071010745
},
10746+
{
10747+
"enumerant" : "CoalescingAMDX",
10748+
"value" : 5069,
10749+
"capabilities" : [ "ShaderEnqueueAMDX" ],
10750+
"version" : "None"
10751+
},
10752+
{
10753+
"enumerant" : "MaxNodeRecursionAMDX",
10754+
"value" : 5071,
10755+
"capabilities" : [ "ShaderEnqueueAMDX" ],
10756+
"parameters" : [
10757+
{ "kind" : "IdRef", "name" : "'Number of recursions'" }
10758+
],
10759+
"version" : "None"
10760+
},
10761+
{
10762+
"enumerant" : "StaticNumWorkgroupsAMDX",
10763+
"value" : 5072,
10764+
"capabilities" : [ "ShaderEnqueueAMDX" ],
10765+
"parameters" : [
10766+
{ "kind" : "IdRef", "name" : "'x size'" },
10767+
{ "kind" : "IdRef", "name" : "'y size'" },
10768+
{ "kind" : "IdRef", "name" : "'z size'" }
10769+
],
10770+
"version" : "None"
10771+
},
10772+
{
10773+
"enumerant" : "ShaderIndexAMDX",
10774+
"value" : 5073,
10775+
"capabilities" : [ "ShaderEnqueueAMDX" ],
10776+
"parameters" : [
10777+
{ "kind" : "IdRef", "name" : "'Shader Index'" }
10778+
],
10779+
"version" : "None"
10780+
},
10781+
{
10782+
"enumerant" : "MaxNumWorkgroupsAMDX",
10783+
"value" : 5077,
10784+
"capabilities" : [ "ShaderEnqueueAMDX" ],
10785+
"parameters" : [
10786+
{ "kind" : "IdRef", "name" : "'x size'" },
10787+
{ "kind" : "IdRef", "name" : "'y size'" },
10788+
{ "kind" : "IdRef", "name" : "'z size'" }
10789+
],
10790+
"version" : "None"
10791+
},
1071110792
{
1071210793
"enumerant": "StencilRefUnchangedFrontAMD",
1071310794
"value": 5079,
@@ -11050,6 +11131,18 @@
1105011131
"capabilities" : [ "TileImageColorReadAccessEXT" ],
1105111132
"version" : "None"
1105211133
},
11134+
{
11135+
"enumerant" : "NodePayloadAMDX",
11136+
"value" : 5068,
11137+
"capabilities" : [ "ShaderEnqueueAMDX" ],
11138+
"version" : "None"
11139+
},
11140+
{
11141+
"enumerant" : "NodeOutputPayloadAMDX",
11142+
"value" : 5076,
11143+
"capabilities" : [ "ShaderEnqueueAMDX" ],
11144+
"version" : "None"
11145+
},
1105311146
{
1105411147
"enumerant" : "CallableDataNV",
1105511148
"value" : 5328,
@@ -12275,6 +12368,39 @@
1227512368
"extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ],
1227612369
"version" : "None"
1227712370
},
12371+
{
12372+
"enumerant" : "NodeSharesPayloadLimitsWithAMDX",
12373+
"value" : 5019,
12374+
"capabilities" : [ "ShaderEnqueueAMDX" ],
12375+
"parameters" : [
12376+
{ "kind" : "IdRef", "name" : "'Payload Array'" }
12377+
],
12378+
"version" : "None"
12379+
},
12380+
{
12381+
"enumerant" : "NodeMaxPayloadsAMDX",
12382+
"value" : 5020,
12383+
"capabilities" : [ "ShaderEnqueueAMDX" ],
12384+
"parameters" : [
12385+
{ "kind" : "IdRef", "name" : "'Max number of payloads'" }
12386+
],
12387+
"version" : "None"
12388+
},
12389+
{
12390+
"enumerant" : "TrackFinishWritingAMDX",
12391+
"value" : 5078,
12392+
"capabilities" : [ "ShaderEnqueueAMDX" ],
12393+
"version" : "None"
12394+
},
12395+
{
12396+
"enumerant" : "PayloadNodeNameAMDX",
12397+
"value" : 5091,
12398+
"capabilities" : [ "ShaderEnqueueAMDX" ],
12399+
"parameters" : [
12400+
{ "kind" : "LiteralString", "name" : "'Node Name'" }
12401+
],
12402+
"version" : "None"
12403+
},
1227812404
{
1227912405
"enumerant" : "OverrideCoverageNV",
1228012406
"value" : 5248,
@@ -13294,6 +13420,18 @@
1329413420
"extensions" : [ "SPV_EXT_shader_stencil_export" ],
1329513421
"version" : "None"
1329613422
},
13423+
{
13424+
"enumerant" : "CoalescedInputCountAMDX",
13425+
"value" : 5021,
13426+
"capabilities" : [ "ShaderEnqueueAMDX" ],
13427+
"version" : "None"
13428+
},
13429+
{
13430+
"enumerant" : "ShaderIndexAMDX",
13431+
"value" : 5073,
13432+
"capabilities" : [ "ShaderEnqueueAMDX" ],
13433+
"version" : "None"
13434+
},
1329713435
{
1329813436
"enumerant" : "ViewportMaskNV",
1329913437
"value" : 5253,
@@ -14484,6 +14622,13 @@
1448414622
"extensions" : [ "SPV_KHR_shader_clock" ],
1448514623
"version" : "None"
1448614624
},
14625+
{
14626+
"enumerant" : "ShaderEnqueueAMDX",
14627+
"value" : 5067,
14628+
"capabilities" : [ "Shader" ],
14629+
"extensions" : [ "SPV_AMDX_shader_enqueue" ],
14630+
"version" : "None"
14631+
},
1448714632
{
1448814633
"enumerant" : "SampleMaskOverrideCoverageNV",
1448914634
"value" : 5249,

include/spirv/unified1/spirv.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ public enum ExecutionMode
167167
RoundingModeRTZ = 4463,
168168
EarlyAndLateFragmentTestsAMD = 5017,
169169
StencilRefReplacingEXT = 5027,
170+
CoalescingAMDX = 5069,
171+
MaxNodeRecursionAMDX = 5071,
172+
StaticNumWorkgroupsAMDX = 5072,
173+
ShaderIndexAMDX = 5073,
174+
MaxNumWorkgroupsAMDX = 5077,
170175
StencilRefUnchangedFrontAMD = 5079,
171176
StencilRefGreaterFrontAMD = 5080,
172177
StencilRefLessFrontAMD = 5081,
@@ -218,6 +223,8 @@ public enum StorageClass
218223
Image = 11,
219224
StorageBuffer = 12,
220225
TileImageEXT = 4172,
226+
NodePayloadAMDX = 5068,
227+
NodeOutputPayloadAMDX = 5076,
221228
CallableDataKHR = 5328,
222229
CallableDataNV = 5328,
223230
IncomingCallableDataKHR = 5329,
@@ -520,6 +527,10 @@ public enum Decoration
520527
WeightTextureQCOM = 4487,
521528
BlockMatchTextureQCOM = 4488,
522529
ExplicitInterpAMD = 4999,
530+
NodeSharesPayloadLimitsWithAMDX = 5019,
531+
NodeMaxPayloadsAMDX = 5020,
532+
TrackFinishWritingAMDX = 5078,
533+
PayloadNodeNameAMDX = 5091,
523534
OverrideCoverageNV = 5248,
524535
PassthroughNV = 5250,
525536
ViewportRelativeNV = 5252,
@@ -674,6 +685,8 @@ public enum BuiltIn
674685
BaryCoordSmoothSampleAMD = 4997,
675686
BaryCoordPullModelAMD = 4998,
676687
FragStencilRefEXT = 5014,
688+
CoalescedInputCountAMDX = 5021,
689+
ShaderIndexAMDX = 5073,
677690
ViewportMaskNV = 5253,
678691
SecondaryPositionNV = 5257,
679692
SecondaryViewportMaskNV = 5258,
@@ -1048,6 +1061,7 @@ public enum Capability
10481061
ImageReadWriteLodAMD = 5015,
10491062
Int64ImageEXT = 5016,
10501063
ShaderClockKHR = 5055,
1064+
ShaderEnqueueAMDX = 5067,
10511065
SampleMaskOverrideCoverageNV = 5249,
10521066
GeometryShaderPassthroughNV = 5251,
10531067
ShaderViewportIndexLayerEXT = 5254,
@@ -1718,6 +1732,9 @@ public enum Op
17181732
OpFragmentMaskFetchAMD = 5011,
17191733
OpFragmentFetchAMD = 5012,
17201734
OpReadClockKHR = 5056,
1735+
OpFinalizeNodePayloadsAMDX = 5075,
1736+
OpFinishWritingNodePayloadAMDX = 5078,
1737+
OpInitializeNodePayloadsAMDX = 5090,
17211738
OpHitObjectRecordHitMotionNV = 5249,
17221739
OpHitObjectRecordHitWithIndexMotionNV = 5250,
17231740
OpHitObjectRecordMissMotionNV = 5251,

include/spirv/unified1/spirv.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ typedef enum SpvExecutionMode_ {
175175
SpvExecutionModeRoundingModeRTZ = 4463,
176176
SpvExecutionModeEarlyAndLateFragmentTestsAMD = 5017,
177177
SpvExecutionModeStencilRefReplacingEXT = 5027,
178+
SpvExecutionModeCoalescingAMDX = 5069,
179+
SpvExecutionModeMaxNodeRecursionAMDX = 5071,
180+
SpvExecutionModeStaticNumWorkgroupsAMDX = 5072,
181+
SpvExecutionModeShaderIndexAMDX = 5073,
182+
SpvExecutionModeMaxNumWorkgroupsAMDX = 5077,
178183
SpvExecutionModeStencilRefUnchangedFrontAMD = 5079,
179184
SpvExecutionModeStencilRefGreaterFrontAMD = 5080,
180185
SpvExecutionModeStencilRefLessFrontAMD = 5081,
@@ -226,6 +231,8 @@ typedef enum SpvStorageClass_ {
226231
SpvStorageClassImage = 11,
227232
SpvStorageClassStorageBuffer = 12,
228233
SpvStorageClassTileImageEXT = 4172,
234+
SpvStorageClassNodePayloadAMDX = 5068,
235+
SpvStorageClassNodeOutputPayloadAMDX = 5076,
229236
SpvStorageClassCallableDataKHR = 5328,
230237
SpvStorageClassCallableDataNV = 5328,
231238
SpvStorageClassIncomingCallableDataKHR = 5329,
@@ -526,6 +533,10 @@ typedef enum SpvDecoration_ {
526533
SpvDecorationWeightTextureQCOM = 4487,
527534
SpvDecorationBlockMatchTextureQCOM = 4488,
528535
SpvDecorationExplicitInterpAMD = 4999,
536+
SpvDecorationNodeSharesPayloadLimitsWithAMDX = 5019,
537+
SpvDecorationNodeMaxPayloadsAMDX = 5020,
538+
SpvDecorationTrackFinishWritingAMDX = 5078,
539+
SpvDecorationPayloadNodeNameAMDX = 5091,
529540
SpvDecorationOverrideCoverageNV = 5248,
530541
SpvDecorationPassthroughNV = 5250,
531542
SpvDecorationViewportRelativeNV = 5252,
@@ -680,6 +691,8 @@ typedef enum SpvBuiltIn_ {
680691
SpvBuiltInBaryCoordSmoothSampleAMD = 4997,
681692
SpvBuiltInBaryCoordPullModelAMD = 4998,
682693
SpvBuiltInFragStencilRefEXT = 5014,
694+
SpvBuiltInCoalescedInputCountAMDX = 5021,
695+
SpvBuiltInShaderIndexAMDX = 5073,
683696
SpvBuiltInViewportMaskNV = 5253,
684697
SpvBuiltInSecondaryPositionNV = 5257,
685698
SpvBuiltInSecondaryViewportMaskNV = 5258,
@@ -1048,6 +1061,7 @@ typedef enum SpvCapability_ {
10481061
SpvCapabilityImageReadWriteLodAMD = 5015,
10491062
SpvCapabilityInt64ImageEXT = 5016,
10501063
SpvCapabilityShaderClockKHR = 5055,
1064+
SpvCapabilityShaderEnqueueAMDX = 5067,
10511065
SpvCapabilitySampleMaskOverrideCoverageNV = 5249,
10521066
SpvCapabilityGeometryShaderPassthroughNV = 5251,
10531067
SpvCapabilityShaderViewportIndexLayerEXT = 5254,
@@ -1715,6 +1729,9 @@ typedef enum SpvOp_ {
17151729
SpvOpFragmentMaskFetchAMD = 5011,
17161730
SpvOpFragmentFetchAMD = 5012,
17171731
SpvOpReadClockKHR = 5056,
1732+
SpvOpFinalizeNodePayloadsAMDX = 5075,
1733+
SpvOpFinishWritingNodePayloadAMDX = 5078,
1734+
SpvOpInitializeNodePayloadsAMDX = 5090,
17181735
SpvOpHitObjectRecordHitMotionNV = 5249,
17191736
SpvOpHitObjectRecordHitWithIndexMotionNV = 5250,
17201737
SpvOpHitObjectRecordMissMotionNV = 5251,
@@ -2438,6 +2455,9 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
24382455
case SpvOpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
24392456
case SpvOpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
24402457
case SpvOpReadClockKHR: *hasResult = true; *hasResultType = true; break;
2458+
case SpvOpFinalizeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break;
2459+
case SpvOpFinishWritingNodePayloadAMDX: *hasResult = true; *hasResultType = true; break;
2460+
case SpvOpInitializeNodePayloadsAMDX: *hasResult = false; *hasResultType = false; break;
24412461
case SpvOpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break;
24422462
case SpvOpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break;
24432463
case SpvOpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break;

0 commit comments

Comments
 (0)