Skip to content

Commit

Permalink
Adds SPV_KHR_relaxed_extended_instruction (#434)
Browse files Browse the repository at this point in the history
Adds support for [SPV_KHR_relaxed_extended_instruction](https://gitlab.khronos.org/spirv/spirv-extensions/-/merge_requests/250)

---------

Signed-off-by: Nathan Gauër <[email protected]>
  • Loading branch information
Keenuts authored May 30, 2024
1 parent ea77f2a commit ff2afc3
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/spirv/unified1/spirv.bf
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,7 @@ namespace Spv
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down
14 changes: 14 additions & 0 deletions include/spirv/unified1/spirv.core.grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4539,6 +4539,20 @@
"extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "None"
},
{
"opname" : "OpExtInstWithForwardRefs",
"class" : "Extension",
"opcode" : 4433,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Set'" },
{ "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" },
{ "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." }
],
"extensions" : [ "SPV_KHR_relaxed_extended_instruction" ],
"version": "None"
},
{
"opname" : "OpTraceRayKHR",
"class" : "Reserved",
Expand Down
1 change: 1 addition & 0 deletions include/spirv/unified1/spirv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,7 @@ public enum Op
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down
3 changes: 3 additions & 0 deletions include/spirv/unified1/spirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1776,6 +1776,7 @@ typedef enum SpvOp_ {
SpvOpSubgroupAllEqualKHR = 4430,
SpvOpGroupNonUniformRotateKHR = 4431,
SpvOpSubgroupReadInvocationKHR = 4432,
SpvOpExtInstWithForwardRefs = 4433,
SpvOpTraceRayKHR = 4445,
SpvOpExecuteCallableKHR = 4446,
SpvOpConvertUToAccelerationStructureKHR = 4447,
Expand Down Expand Up @@ -2523,6 +2524,7 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpExtInstWithForwardRefs: *hasResult = true; *hasResultType = true; break;
case SpvOpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
case SpvOpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
case SpvOpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
Expand Down Expand Up @@ -4298,6 +4300,7 @@ inline const char* SpvOpToString(SpvOp value) {
case SpvOpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR";
case SpvOpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR";
case SpvOpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR";
case SpvOpExtInstWithForwardRefs: return "OpExtInstWithForwardRefs";
case SpvOpTraceRayKHR: return "OpTraceRayKHR";
case SpvOpExecuteCallableKHR: return "OpExecuteCallableKHR";
case SpvOpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR";
Expand Down
3 changes: 3 additions & 0 deletions include/spirv/unified1/spirv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,7 @@ enum Op {
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down Expand Up @@ -2519,6 +2520,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
case OpExtInstWithForwardRefs: *hasResult = true; *hasResultType = true; break;
case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
Expand Down Expand Up @@ -4294,6 +4296,7 @@ inline const char* OpToString(Op value) {
case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR";
case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR";
case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR";
case OpExtInstWithForwardRefs: return "OpExtInstWithForwardRefs";
case OpTraceRayKHR: return "OpTraceRayKHR";
case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR";
Expand Down
3 changes: 3 additions & 0 deletions include/spirv/unified1/spirv.hpp11
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,7 @@ enum class Op : unsigned {
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down Expand Up @@ -2519,6 +2520,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpExtInstWithForwardRefs: *hasResult = true; *hasResultType = true; break;
case Op::OpTraceRayKHR: *hasResult = false; *hasResultType = false; break;
case Op::OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break;
case Op::OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break;
Expand Down Expand Up @@ -4294,6 +4296,7 @@ inline const char* OpToString(Op value) {
case OpSubgroupAllEqualKHR: return "OpSubgroupAllEqualKHR";
case OpGroupNonUniformRotateKHR: return "OpGroupNonUniformRotateKHR";
case OpSubgroupReadInvocationKHR: return "OpSubgroupReadInvocationKHR";
case OpExtInstWithForwardRefs: return "OpExtInstWithForwardRefs";
case OpTraceRayKHR: return "OpTraceRayKHR";
case OpExecuteCallableKHR: return "OpExecuteCallableKHR";
case OpConvertUToAccelerationStructureKHR: return "OpConvertUToAccelerationStructureKHR";
Expand Down
1 change: 1 addition & 0 deletions include/spirv/unified1/spirv.json
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@
"OpSubgroupAllEqualKHR": 4430,
"OpGroupNonUniformRotateKHR": 4431,
"OpSubgroupReadInvocationKHR": 4432,
"OpExtInstWithForwardRefs": 4433,
"OpTraceRayKHR": 4445,
"OpExecuteCallableKHR": 4446,
"OpConvertUToAccelerationStructureKHR": 4447,
Expand Down
1 change: 1 addition & 0 deletions include/spirv/unified1/spirv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,7 @@ spv = {
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down
1 change: 1 addition & 0 deletions include/spirv/unified1/spirv.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,7 @@
'OpSubgroupAllEqualKHR' : 4430,
'OpGroupNonUniformRotateKHR' : 4431,
'OpSubgroupReadInvocationKHR' : 4432,
'OpExtInstWithForwardRefs' : 4433,
'OpTraceRayKHR' : 4445,
'OpExecuteCallableKHR' : 4446,
'OpConvertUToAccelerationStructureKHR' : 4447,
Expand Down
1 change: 1 addition & 0 deletions include/spirv/unified1/spv.d
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,7 @@ enum Op : uint
OpSubgroupAllEqualKHR = 4430,
OpGroupNonUniformRotateKHR = 4431,
OpSubgroupReadInvocationKHR = 4432,
OpExtInstWithForwardRefs = 4433,
OpTraceRayKHR = 4445,
OpExecuteCallableKHR = 4446,
OpConvertUToAccelerationStructureKHR = 4447,
Expand Down

0 comments on commit ff2afc3

Please sign in to comment.