Skip to content

Commit

Permalink
SPV_EXT_replicated_composites (#431)
Browse files Browse the repository at this point in the history
* SPV_EXT_replicated_composites

Signed-off-by: Kevin Petit <[email protected]>

* Move Composite instructions to "Composite" class

* Fix instruction classes

---------

Signed-off-by: Kevin Petit <[email protected]>
  • Loading branch information
kpet authored May 29, 2024
1 parent 49a1fce commit ea77f2a
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/spirv/unified1/spirv.bf
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,7 @@ namespace Spv
DotProductKHR = 6019,
RayCullMaskKHR = 6020,
CooperativeMatrixKHR = 6022,
ReplicatedCompositesEXT = 6024,
BitInstructions = 6025,
GroupNonUniformRotateKHR = 6026,
FloatControls2 = 6029,
Expand Down Expand Up @@ -1802,6 +1803,9 @@ namespace Spv
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpConstantCompositeReplicateEXT = 4461,
OpSpecConstantCompositeReplicateEXT = 4462,
OpCompositeConstructReplicateEXT = 4463,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
Expand Down
42 changes: 42 additions & 0 deletions include/spirv/unified1/spirv.core.grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4854,6 +4854,42 @@
"capabilities" : [ "CooperativeMatrixKHR" ],
"version" : "None"
},
{
"opname" : "OpConstantCompositeReplicateEXT",
"class" : "Constant-Creation",
"opcode" : 4461,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Value'" }
],
"capabilities" : [ "ReplicatedCompositesEXT" ],
"version" : "None"
},
{
"opname" : "OpSpecConstantCompositeReplicateEXT",
"class" : "Constant-Creation",
"opcode" : 4462,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Value'" }
],
"capabilities" : [ "ReplicatedCompositesEXT" ],
"version" : "None"
},
{
"opname" : "OpCompositeConstructReplicateEXT",
"class" : "Composite",
"opcode" : 4463,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Value'" }
],
"capabilities" : [ "ReplicatedCompositesEXT" ],
"version" : "None"
},
{
"opname" : "OpTypeRayQueryKHR",
"class" : "Type-Declaration",
Expand Down Expand Up @@ -16442,6 +16478,12 @@
"extensions" : [ "SPV_KHR_cooperative_matrix" ],
"version" : "None"
},
{
"enumerant" : "ReplicatedCompositesEXT",
"value" : 6024,
"extensions" : [ "SPV_EXT_replicated_composites" ],
"version" : "None"
},
{
"enumerant" : "BitInstructions",
"value" : 6025,
Expand Down
4 changes: 4 additions & 0 deletions include/spirv/unified1/spirv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ public enum Capability
DotProductKHR = 6019,
RayCullMaskKHR = 6020,
CooperativeMatrixKHR = 6022,
ReplicatedCompositesEXT = 6024,
BitInstructions = 6025,
GroupNonUniformRotateKHR = 6026,
FloatControls2 = 6029,
Expand Down Expand Up @@ -1801,6 +1802,9 @@ public enum Op
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpConstantCompositeReplicateEXT = 4461,
OpSpecConstantCompositeReplicateEXT = 4462,
OpCompositeConstructReplicateEXT = 4463,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
Expand Down
11 changes: 11 additions & 0 deletions include/spirv/unified1/spirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ typedef enum SpvCapability_ {
SpvCapabilityDotProductKHR = 6019,
SpvCapabilityRayCullMaskKHR = 6020,
SpvCapabilityCooperativeMatrixKHR = 6022,
SpvCapabilityReplicatedCompositesEXT = 6024,
SpvCapabilityBitInstructions = 6025,
SpvCapabilityGroupNonUniformRotateKHR = 6026,
SpvCapabilityFloatControls2 = 6029,
Expand Down Expand Up @@ -1797,6 +1798,9 @@ typedef enum SpvOp_ {
SpvOpCooperativeMatrixStoreKHR = 4458,
SpvOpCooperativeMatrixMulAddKHR = 4459,
SpvOpCooperativeMatrixLengthKHR = 4460,
SpvOpConstantCompositeReplicateEXT = 4461,
SpvOpSpecConstantCompositeReplicateEXT = 4462,
SpvOpCompositeConstructReplicateEXT = 4463,
SpvOpTypeRayQueryKHR = 4472,
SpvOpRayQueryInitializeKHR = 4473,
SpvOpRayQueryTerminateKHR = 4474,
Expand Down Expand Up @@ -2535,6 +2539,9 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break;
case SpvOpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break;
case SpvOpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break;
case SpvOpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break;
case SpvOpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
Expand Down Expand Up @@ -3772,6 +3779,7 @@ inline const char* SpvCapabilityToString(SpvCapability value) {
case SpvCapabilityDotProduct: return "DotProduct";
case SpvCapabilityRayCullMaskKHR: return "RayCullMaskKHR";
case SpvCapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR";
case SpvCapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT";
case SpvCapabilityBitInstructions: return "BitInstructions";
case SpvCapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR";
case SpvCapabilityFloatControls2: return "FloatControls2";
Expand Down Expand Up @@ -4306,6 +4314,9 @@ inline const char* SpvOpToString(SpvOp value) {
case SpvOpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR";
case SpvOpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR";
case SpvOpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR";
case SpvOpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT";
case SpvOpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT";
case SpvOpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT";
case SpvOpTypeRayQueryKHR: return "OpTypeRayQueryKHR";
case SpvOpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
case SpvOpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
Expand Down
11 changes: 11 additions & 0 deletions include/spirv/unified1/spirv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ enum Capability {
CapabilityDotProductKHR = 6019,
CapabilityRayCullMaskKHR = 6020,
CapabilityCooperativeMatrixKHR = 6022,
CapabilityReplicatedCompositesEXT = 6024,
CapabilityBitInstructions = 6025,
CapabilityGroupNonUniformRotateKHR = 6026,
CapabilityFloatControls2 = 6029,
Expand Down Expand Up @@ -1793,6 +1794,9 @@ enum Op {
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpConstantCompositeReplicateEXT = 4461,
OpSpecConstantCompositeReplicateEXT = 4462,
OpCompositeConstructReplicateEXT = 4463,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
Expand Down Expand Up @@ -2531,6 +2535,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break;
case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break;
case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break;
case OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break;
case OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break;
case OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break;
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
Expand Down Expand Up @@ -3768,6 +3775,7 @@ inline const char* CapabilityToString(Capability value) {
case CapabilityDotProduct: return "DotProduct";
case CapabilityRayCullMaskKHR: return "RayCullMaskKHR";
case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR";
case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT";
case CapabilityBitInstructions: return "BitInstructions";
case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR";
case CapabilityFloatControls2: return "FloatControls2";
Expand Down Expand Up @@ -4302,6 +4310,9 @@ inline const char* OpToString(Op value) {
case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR";
case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR";
case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR";
case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT";
case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT";
case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT";
case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR";
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
Expand Down
11 changes: 11 additions & 0 deletions include/spirv/unified1/spirv.hpp11
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ enum class Capability : unsigned {
DotProductKHR = 6019,
RayCullMaskKHR = 6020,
CooperativeMatrixKHR = 6022,
ReplicatedCompositesEXT = 6024,
BitInstructions = 6025,
GroupNonUniformRotateKHR = 6026,
FloatControls2 = 6029,
Expand Down Expand Up @@ -1793,6 +1794,9 @@ enum class Op : unsigned {
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpConstantCompositeReplicateEXT = 4461,
OpSpecConstantCompositeReplicateEXT = 4462,
OpCompositeConstructReplicateEXT = 4463,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
Expand Down Expand Up @@ -2531,6 +2535,9 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break;
case Op::OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break;
case Op::OpSpecConstantCompositeReplicateEXT: *hasResult = true; *hasResultType = true; break;
case Op::OpCompositeConstructReplicateEXT: *hasResult = true; *hasResultType = true; break;
case Op::OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
case Op::OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
case Op::OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
Expand Down Expand Up @@ -3768,6 +3775,7 @@ inline const char* CapabilityToString(Capability value) {
case CapabilityDotProduct: return "DotProduct";
case CapabilityRayCullMaskKHR: return "RayCullMaskKHR";
case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR";
case CapabilityReplicatedCompositesEXT: return "ReplicatedCompositesEXT";
case CapabilityBitInstructions: return "BitInstructions";
case CapabilityGroupNonUniformRotateKHR: return "GroupNonUniformRotateKHR";
case CapabilityFloatControls2: return "FloatControls2";
Expand Down Expand Up @@ -4302,6 +4310,9 @@ inline const char* OpToString(Op value) {
case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR";
case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR";
case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR";
case OpConstantCompositeReplicateEXT: return "OpConstantCompositeReplicateEXT";
case OpSpecConstantCompositeReplicateEXT: return "OpSpecConstantCompositeReplicateEXT";
case OpCompositeConstructReplicateEXT: return "OpCompositeConstructReplicateEXT";
case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR";
case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR";
case OpRayQueryTerminateKHR: return "OpRayQueryTerminateKHR";
Expand Down
4 changes: 4 additions & 0 deletions include/spirv/unified1/spirv.json
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@
"DotProductKHR": 6019,
"RayCullMaskKHR": 6020,
"CooperativeMatrixKHR": 6022,
"ReplicatedCompositesEXT": 6024,
"BitInstructions": 6025,
"GroupNonUniformRotateKHR": 6026,
"FloatControls2": 6029,
Expand Down Expand Up @@ -1792,6 +1793,9 @@
"OpCooperativeMatrixStoreKHR": 4458,
"OpCooperativeMatrixMulAddKHR": 4459,
"OpCooperativeMatrixLengthKHR": 4460,
"OpConstantCompositeReplicateEXT": 4461,
"OpSpecConstantCompositeReplicateEXT": 4462,
"OpCompositeConstructReplicateEXT": 4463,
"OpTypeRayQueryKHR": 4472,
"OpRayQueryInitializeKHR": 4473,
"OpRayQueryTerminateKHR": 4474,
Expand Down
4 changes: 4 additions & 0 deletions include/spirv/unified1/spirv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ spv = {
DotProductKHR = 6019,
RayCullMaskKHR = 6020,
CooperativeMatrixKHR = 6022,
ReplicatedCompositesEXT = 6024,
BitInstructions = 6025,
GroupNonUniformRotateKHR = 6026,
FloatControls2 = 6029,
Expand Down Expand Up @@ -1735,6 +1736,9 @@ spv = {
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpConstantCompositeReplicateEXT = 4461,
OpSpecConstantCompositeReplicateEXT = 4462,
OpCompositeConstructReplicateEXT = 4463,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
Expand Down
4 changes: 4 additions & 0 deletions include/spirv/unified1/spirv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@
'DotProductKHR' : 6019,
'RayCullMaskKHR' : 6020,
'CooperativeMatrixKHR' : 6022,
'ReplicatedCompositesEXT' : 6024,
'BitInstructions' : 6025,
'GroupNonUniformRotateKHR' : 6026,
'FloatControls2' : 6029,
Expand Down Expand Up @@ -1735,6 +1736,9 @@
'OpCooperativeMatrixStoreKHR' : 4458,
'OpCooperativeMatrixMulAddKHR' : 4459,
'OpCooperativeMatrixLengthKHR' : 4460,
'OpConstantCompositeReplicateEXT' : 4461,
'OpSpecConstantCompositeReplicateEXT' : 4462,
'OpCompositeConstructReplicateEXT' : 4463,
'OpTypeRayQueryKHR' : 4472,
'OpRayQueryInitializeKHR' : 4473,
'OpRayQueryTerminateKHR' : 4474,
Expand Down
4 changes: 4 additions & 0 deletions include/spirv/unified1/spv.d
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,7 @@ enum Capability : uint
DotProductKHR = 6019,
RayCullMaskKHR = 6020,
CooperativeMatrixKHR = 6022,
ReplicatedCompositesEXT = 6024,
BitInstructions = 6025,
GroupNonUniformRotateKHR = 6026,
FloatControls2 = 6029,
Expand Down Expand Up @@ -1804,6 +1805,9 @@ enum Op : uint
OpCooperativeMatrixStoreKHR = 4458,
OpCooperativeMatrixMulAddKHR = 4459,
OpCooperativeMatrixLengthKHR = 4460,
OpConstantCompositeReplicateEXT = 4461,
OpSpecConstantCompositeReplicateEXT = 4462,
OpCompositeConstructReplicateEXT = 4463,
OpTypeRayQueryKHR = 4472,
OpRayQueryInitializeKHR = 4473,
OpRayQueryTerminateKHR = 4474,
Expand Down

0 comments on commit ea77f2a

Please sign in to comment.