From 0bcc624926a25a2a273d07877fd25a6ff5ba1cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Petit?= Date: Tue, 5 Jul 2022 14:10:51 +0100 Subject: Update clspv reflection non-semantic instruction set (#284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for: - Pointer arguments - Program scope variables - Image channel order and data type queries Signed-off-by: Kévin Petit --- .../spirv/unified1/NonSemanticClspvReflection.h | 10 ++- ...xtinst.nonsemantic.clspvreflection.grammar.json | 88 +++++++++++++++++++++- 2 files changed, 96 insertions(+), 2 deletions(-) diff --git a/include/spirv/unified1/NonSemanticClspvReflection.h b/include/spirv/unified1/NonSemanticClspvReflection.h index 380dc21..7994fd5 100644 --- a/include/spirv/unified1/NonSemanticClspvReflection.h +++ b/include/spirv/unified1/NonSemanticClspvReflection.h @@ -33,7 +33,7 @@ extern "C" { #endif enum { - NonSemanticClspvReflectionRevision = 2, + NonSemanticClspvReflectionRevision = 3, NonSemanticClspvReflectionRevision_BitWidthPadding = 0x7fffffff }; @@ -63,6 +63,14 @@ enum NonSemanticClspvReflectionInstructions { NonSemanticClspvReflectionLiteralSampler = 23, NonSemanticClspvReflectionPropertyRequiredWorkgroupSize = 24, NonSemanticClspvReflectionSpecConstantSubgroupMaxSize = 25, + NonSemanticClspvReflectionArgumentPointerPushConstant = 26, + NonSemanticClspvReflectionArgumentPointerUniform = 27, + NonSemanticClspvReflectionProgramScopeVariablesStorageBuffer = 28, + NonSemanticClspvReflectionProgramScopeVariablePointerRelocation = 29, + NonSemanticClspvReflectionImageArgumentInfoChannelOrderPushConstant = 30, + NonSemanticClspvReflectionImageArgumentInfoChannelDataTypePushConstant = 31, + NonSemanticClspvReflectionImageArgumentInfoChannelOrderUniform = 32, + NonSemanticClspvReflectionImageArgumentInfoChannelDataTypeUniform = 33, NonSemanticClspvReflectionInstructionsMax = 0x7fffffff }; diff --git a/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json b/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json index 3d153e5..c5502f9 100644 --- a/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json +++ b/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json @@ -1,5 +1,5 @@ { - "revision" : 2, + "revision" : 3, "instructions" : [ { "opname" : "Kernel", @@ -239,6 +239,92 @@ "operands" : [ { "kind" : "IdRef", "name" : "Size" } ] + }, + { + "opname" : "ArgumentPointerPushConstant", + "opcode" : 26, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ArgumentPointerUniform", + "opcode" : 27, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" }, + { "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" } + ] + }, + { + "opname" : "ProgramScopeVariablesStorageBuffer", + "opcode" : 28, + "operands": [ + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Data" } + ] + }, + { + "opname" : "ProgramScopeVariablePointerRelocation", + "opcode" : 29, + "operands": [ + { "kind" : "IdRef", "name" : "ObjectOffset" }, + { "kind" : "IdRef", "name" : "PointerOffset" }, + { "kind" : "IdRef", "name" : "PointerSize" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelOrderPushConstant", + "opcode" : 30, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelDataTypePushConstant", + "opcode" : 31, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelOrderUniform", + "opcode" : 32, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] + }, + { + "opname" : "ImageArgumentInfoChannelDataTypeUniform", + "opcode" : 33, + "operands": [ + { "kind" : "IdRef", "name" : "Kernel" }, + { "kind" : "IdRef", "name" : "Ordinal" }, + { "kind" : "IdRef", "name" : "DescriptorSet" }, + { "kind" : "IdRef", "name" : "Binding" }, + { "kind" : "IdRef", "name" : "Offset" }, + { "kind" : "IdRef", "name" : "Size" } + ] } ] } -- cgit v1.2.3