From 996c5d312399581792583b1724837567dc9cb670 Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Mon, 11 Mar 2024 18:24:45 -0400 Subject: [PATCH] Add support for OpExtInstWithForwardRefs --- SPIRV/GLSL.ext.KHR.h | 1 + SPIRV/doc.cpp | 5 +++++ SPIRV/spirv.hpp | 2 ++ known_good.json | 26 +++++++++++++------------- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/SPIRV/GLSL.ext.KHR.h b/SPIRV/GLSL.ext.KHR.h index ba26708de..38d3b974b 100644 --- a/SPIRV/GLSL.ext.KHR.h +++ b/SPIRV/GLSL.ext.KHR.h @@ -62,5 +62,6 @@ static const char* const E_SPV_KHR_maximal_reconvergence = "SPV_KHR_maxim static const char* const E_SPV_KHR_subgroup_rotate = "SPV_KHR_subgroup_rotate"; static const char* const E_SPV_KHR_expect_assume = "SPV_KHR_expect_assume"; static const char* const E_SPV_EXT_replicated_composites = "SPV_EXT_replicated_composites"; +static const char* const E_SPV_KHR_relaxed_extended_instruction = "SPV_KHR_relaxed_extended_instruction"; #endif // #ifndef GLSLextKHR_H diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp index f60a89491..141fb5b71 100755 --- a/SPIRV/doc.cpp +++ b/SPIRV/doc.cpp @@ -1445,6 +1445,7 @@ const char* OpcodeString(int op) case 4429: return "OpSubgroupAnyKHR"; case 4430: return "OpSubgroupAllEqualKHR"; case 4432: return "OpSubgroupReadInvocationKHR"; + case 4433: return "OpExtInstWithForwardRefs"; case OpGroupNonUniformQuadAllKHR: return "OpGroupNonUniformQuadAllKHR"; case OpGroupNonUniformQuadAnyKHR: return "OpGroupNonUniformQuadAnyKHR"; @@ -1896,6 +1897,10 @@ void Parameterize() InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'"); InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); + InstructionDesc[OpExtInstWithForwardRefs].operands.push(OperandId, "'Set'"); + InstructionDesc[OpExtInstWithForwardRefs].operands.push(OperandLiteralNumber, "'Instruction'"); + InstructionDesc[OpExtInstWithForwardRefs].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); + InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'"); InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true); InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true); diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp index 5821eced2..0d93ba96e 100644 --- a/SPIRV/spirv.hpp +++ b/SPIRV/spirv.hpp @@ -1668,6 +1668,7 @@ enum Op { OpSubgroupAllEqualKHR = 4430, OpGroupNonUniformRotateKHR = 4431, OpSubgroupReadInvocationKHR = 4432, + OpExtInstWithForwardRefs = 4433, OpTraceRayKHR = 4445, OpExecuteCallableKHR = 4446, OpConvertUToAccelerationStructureKHR = 4447, @@ -2395,6 +2396,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpPtrEqual: *hasResult = true; *hasResultType = true; break; case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; case OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case OpExtInstWithForwardRefs: *hasResult = true; *hasResultType = true; break; case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; diff --git a/known_good.json b/known_good.json index 8dbe973df..a87331c80 100644 --- a/known_good.json +++ b/known_good.json @@ -1,19 +1,19 @@ { "commits" : [ { - "name" : "spirv-tools", - "site" : "github", - "subrepo" : "KhronosGroup/SPIRV-Tools", - "subdir" : "External/spirv-tools", - "commit": "148c97f6876e427efd76d2328122c3075eab4b8f" - }, - { - "name" : "spirv-tools/external/spirv-headers", - "site" : "github", - "subrepo" : "KhronosGroup/SPIRV-Headers", - "subdir" : "External/spirv-tools/external/spirv-headers", - "commit" : "ea77f2a826bc820cb8f57f9b2a7c7eccb681c731" - }, + "name" : "spirv-tools", + "site" : "github", + "subrepo" : "KhronosGroup/SPIRV-Tools", + "subdir" : "External/spirv-tools", + "commit": "6a2bdeee75eb35e5349c6993d33c9afe30237d79" + }, + { + "name" : "spirv-tools/external/spirv-headers", + "site" : "github", + "subrepo" : "KhronosGroup/SPIRV-Headers", + "subdir" : "External/spirv-tools/external/spirv-headers", + "commit" : "ff2afc3afc48dff4eec2a10f0212402a80708e38" + }, { "name": "googletest", "site": "github",