From 63fd803550542cd68341f77e2faf2fe455e539eb Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Sat, 16 Dec 2023 12:18:34 +0800 Subject: [PATCH 01/50] Disassembler init --- Cargo.lock | 7 + Cargo.toml | 1 + assets/spirv/spir-v.xml | 294 + assets/spirv/spirv.core.grammar.json | 16643 +++++++++++++++++++++++++ scripts/Update-SpirvHeader.ps1 | 2 + spirq-core/src/parse/bin.rs | 28 + spirq-dis/Cargo.toml | 21 + spirq-dis/README.md | 16 + spirq-dis/scripts/generate_code.py | 353 + spirq-dis/src/lib.rs | 39 + 10 files changed, 17404 insertions(+) create mode 100644 assets/spirv/spir-v.xml create mode 100644 assets/spirv/spirv.core.grammar.json create mode 100644 scripts/Update-SpirvHeader.ps1 create mode 100644 spirq-dis/Cargo.toml create mode 100644 spirq-dis/README.md create mode 100644 spirq-dis/scripts/generate_code.py create mode 100644 spirq-dis/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 6bdb86a..c3b6d52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -359,6 +359,13 @@ dependencies = [ "spirv", ] +[[package]] +name = "spirq-dis" +version = "0.2.3" +dependencies = [ + "spirq-core", +] + [[package]] name = "spirv" version = "0.2.0+1.5.4" diff --git a/Cargo.toml b/Cargo.toml index 72a254b..dc81831 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,5 +2,6 @@ members = [ "spirq", "spirq-core", + "spirq-dis", "shader-reflect", ] diff --git a/assets/spirv/spir-v.xml b/assets/spirv/spir-v.xml new file mode 100644 index 0000000..1305df5 --- /dev/null +++ b/assets/spirv/spir-v.xml @@ -0,0 +1,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/spirv/spirv.core.grammar.json b/assets/spirv/spirv.core.grammar.json new file mode 100644 index 0000000..4de8edc --- /dev/null +++ b/assets/spirv/spirv.core.grammar.json @@ -0,0 +1,16643 @@ +{ + "copyright" : [ + "Copyright (c) 2014-2020 The Khronos Group Inc.", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and/or associated documentation files (the \"Materials\"),", + "to deal in the Materials without restriction, including without limitation", + "the rights to use, copy, modify, merge, publish, distribute, sublicense,", + "and/or sell copies of the Materials, and to permit persons to whom the", + "Materials are furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in", + "all copies or substantial portions of the Materials.", + "", + "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS", + "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND", + "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ", + "", + "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", + "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", + "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING", + "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS", + "IN THE MATERIALS." + ], + "magic_number" : "0x07230203", + "major_version" : 1, + "minor_version" : 6, + "revision" : 1, + "instruction_printing_class" : [ + { + "tag" : "@exclude" + }, + { + "tag" : "Miscellaneous", + "heading" : "Miscellaneous Instructions" + }, + { + "tag" : "Debug", + "heading" : "Debug Instructions" + }, + { + "tag" : "Annotation", + "heading" : "Annotation Instructions" + }, + { + "tag" : "Extension", + "heading" : "Extension Instructions" + }, + { + "tag" : "Mode-Setting", + "heading" : "Mode-Setting Instructions" + }, + { + "tag" : "Type-Declaration", + "heading" : "Type-Declaration Instructions" + }, + { + "tag" : "Constant-Creation", + "heading" : "Constant-Creation Instructions" + }, + { + "tag" : "Memory", + "heading" : "Memory Instructions" + }, + { + "tag" : "Function", + "heading" : "Function Instructions" + }, + { + "tag" : "Image", + "heading" : "Image Instructions" + }, + { + "tag" : "Conversion", + "heading" : "Conversion Instructions" + }, + { + "tag" : "Composite", + "heading" : "Composite Instructions" + }, + { + "tag" : "Arithmetic", + "heading" : "Arithmetic Instructions" + }, + { + "tag" : "Bit", + "heading" : "Bit Instructions" + }, + { + "tag" : "Relational_and_Logical", + "heading" : "Relational and Logical Instructions" + }, + { + "tag" : "Derivative", + "heading" : "Derivative Instructions" + }, + { + "tag" : "Control-Flow", + "heading" : "Control-Flow Instructions" + }, + { + "tag" : "Atomic", + "heading" : "Atomic Instructions" + }, + { + "tag" : "Primitive", + "heading" : "Primitive Instructions" + }, + { + "tag" : "Barrier", + "heading" : "Barrier Instructions" + }, + { + "tag" : "Group", + "heading" : "Group and Subgroup Instructions" + }, + { + "tag" : "Device-Side_Enqueue", + "heading" : "Device-Side Enqueue Instructions" + }, + { + "tag" : "Pipe", + "heading" : "Pipe Instructions" + }, + { + "tag" : "Non-Uniform", + "heading" : "Non-Uniform Instructions" + }, + { + "tag" : "Reserved", + "heading" : "Reserved Instructions" + } + ], + "instructions" : [ + { + "opname" : "OpNop", + "class" : "Miscellaneous", + "opcode" : 0, + "version" : "1.0" + }, + { + "opname" : "OpUndef", + "class" : "Miscellaneous", + "opcode" : 1, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version" : "1.0" + }, + { + "opname" : "OpSourceContinued", + "class" : "Debug", + "opcode" : 2, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Continued Source'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSource", + "class" : "Debug", + "opcode" : 3, + "operands" : [ + { "kind" : "SourceLanguage" }, + { "kind" : "LiteralInteger", "name" : "'Version'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'File'" }, + { "kind" : "LiteralString", "quantifier" : "?", "name" : "'Source'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSourceExtension", + "class" : "Debug", + "opcode" : 4, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Extension'" } + ], + "version": "1.0" + }, + { + "opname" : "OpName", + "class" : "Debug", + "opcode" : 5, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ], + "version": "1.0" + }, + { + "opname" : "OpMemberName", + "class" : "Debug", + "opcode" : 6, + "operands" : [ + { "kind" : "IdRef", "name" : "'Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ], + "version": "1.0" + }, + { + "opname" : "OpString", + "class" : "Debug", + "opcode" : 7, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "'String'" } + ], + "version": "1.0" + }, + { + "opname" : "OpLine", + "class" : "Debug", + "opcode" : 8, + "operands" : [ + { "kind" : "IdRef", "name" : "'File'" }, + { "kind" : "LiteralInteger", "name" : "'Line'" }, + { "kind" : "LiteralInteger", "name" : "'Column'" } + ], + "version": "1.0" + }, + { + "opname" : "OpExtension", + "class" : "Extension", + "opcode" : 10, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Name'" } + ], + "version": "1.0" + }, + { + "opname" : "OpExtInstImport", + "class" : "Extension", + "opcode" : 11, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ], + "version": "1.0" + }, + { + "opname" : "OpExtInst", + "class" : "Extension", + "opcode" : 12, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Set'" }, + { "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." } + ], + "version": "1.0" + }, + { + "opname" : "OpMemoryModel", + "class" : "Mode-Setting", + "opcode" : 14, + "operands" : [ + { "kind" : "AddressingModel" }, + { "kind" : "MemoryModel" } + ], + "version": "1.0" + }, + { + "opname" : "OpEntryPoint", + "class" : "Mode-Setting", + "opcode" : 15, + "operands" : [ + { "kind" : "ExecutionModel" }, + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "LiteralString", "name" : "'Name'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Interface'" } + ], + "version": "1.0" + }, + { + "opname" : "OpExecutionMode", + "class" : "Mode-Setting", + "opcode" : 16, + "operands" : [ + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "ExecutionMode", "name" : "'Mode'" } + ], + "version": "1.0" + }, + { + "opname" : "OpCapability", + "class" : "Mode-Setting", + "opcode" : 17, + "operands" : [ + { "kind" : "Capability", "name" : "'Capability'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeVoid", + "class" : "Type-Declaration", + "opcode" : 19, + "operands" : [ + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeBool", + "class" : "Type-Declaration", + "opcode" : 20, + "operands" : [ + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeInt", + "class" : "Type-Declaration", + "opcode" : 21, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralInteger", "name" : "'Width'" }, + { "kind" : "LiteralInteger", "name" : "'Signedness'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeFloat", + "class" : "Type-Declaration", + "opcode" : 22, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralInteger", "name" : "'Width'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeVector", + "class" : "Type-Declaration", + "opcode" : 23, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Component Type'" }, + { "kind" : "LiteralInteger", "name" : "'Component Count'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeMatrix", + "class" : "Type-Declaration", + "opcode" : 24, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Column Type'" }, + { "kind" : "LiteralInteger", "name" : "'Column Count'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpTypeImage", + "class" : "Type-Declaration", + "opcode" : 25, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Type'" }, + { "kind" : "Dim" }, + { "kind" : "LiteralInteger", "name" : "'Depth'" }, + { "kind" : "LiteralInteger", "name" : "'Arrayed'" }, + { "kind" : "LiteralInteger", "name" : "'MS'" }, + { "kind" : "LiteralInteger", "name" : "'Sampled'" }, + { "kind" : "ImageFormat" }, + { "kind" : "AccessQualifier", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeSampler", + "class" : "Type-Declaration", + "opcode" : 26, + "operands" : [ + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeSampledImage", + "class" : "Type-Declaration", + "opcode" : 27, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image Type'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeArray", + "class" : "Type-Declaration", + "opcode" : 28, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Element Type'" }, + { "kind" : "IdRef", "name" : "'Length'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeRuntimeArray", + "class" : "Type-Declaration", + "opcode" : 29, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Element Type'" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpTypeStruct", + "class" : "Type-Declaration", + "opcode" : 30, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeOpaque", + "class" : "Type-Declaration", + "opcode" : 31, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "The name of the opaque type." } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpTypePointer", + "class" : "Type-Declaration", + "opcode" : 32, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "StorageClass" }, + { "kind" : "IdRef", "name" : "'Type'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeFunction", + "class" : "Type-Declaration", + "opcode" : 33, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Return Type'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..." } + ], + "version": "1.0" + }, + { + "opname" : "OpTypeEvent", + "class" : "Type-Declaration", + "opcode" : 34, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpTypeDeviceEvent", + "class" : "Type-Declaration", + "opcode" : 35, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpTypeReserveId", + "class" : "Type-Declaration", + "opcode" : 36, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpTypeQueue", + "class" : "Type-Declaration", + "opcode" : 37, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpTypePipe", + "class" : "Type-Declaration", + "opcode" : 38, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "AccessQualifier", "name" : "'Qualifier'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpTypeForwardPointer", + "class" : "Type-Declaration", + "opcode" : 39, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer Type'" }, + { "kind" : "StorageClass" } + ], + "capabilities" : [ + "Addresses", + "PhysicalStorageBufferAddresses" + ], + "version": "1.0" + }, + { + "opname" : "OpConstantTrue", + "class" : "Constant-Creation", + "opcode" : 41, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpConstantFalse", + "class" : "Constant-Creation", + "opcode" : 42, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpConstant", + "class" : "Constant-Creation", + "opcode" : 43, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpConstantComposite", + "class" : "Constant-Creation", + "opcode" : 44, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "version": "1.0" + }, + { + "opname" : "OpConstantSampler", + "class" : "Constant-Creation", + "opcode" : 45, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "SamplerAddressingMode" }, + { "kind" : "LiteralInteger", "name" : "'Param'" }, + { "kind" : "SamplerFilterMode" } + ], + "capabilities" : [ "LiteralSampler" ], + "version": "1.0" + }, + { + "opname" : "OpConstantNull", + "class" : "Constant-Creation", + "opcode" : 46, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpSpecConstantTrue", + "class" : "Constant-Creation", + "opcode" : 48, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpSpecConstantFalse", + "class" : "Constant-Creation", + "opcode" : 49, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpSpecConstant", + "class" : "Constant-Creation", + "opcode" : 50, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSpecConstantComposite", + "class" : "Constant-Creation", + "opcode" : 51, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSpecConstantOp", + "class" : "Constant-Creation", + "opcode" : 52, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralSpecConstantOpInteger", "name" : "'Opcode'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFunction", + "class" : "Function", + "opcode" : 54, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "FunctionControl" }, + { "kind" : "IdRef", "name" : "'Function Type'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFunctionParameter", + "class" : "Function", + "opcode" : 55, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpFunctionEnd", + "class" : "Function", + "opcode" : 56, + "version" : "1.0" + }, + { + "opname" : "OpFunctionCall", + "class" : "Function", + "opcode" : 57, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Function'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Argument 0', +\n'Argument 1', +\n..." } + ], + "version": "1.0" + }, + { + "opname" : "OpVariable", + "class" : "Memory", + "opcode" : 59, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "StorageClass" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Initializer'" } + ], + "version": "1.0" + }, + { + "opname" : "OpImageTexelPointer", + "class" : "Memory", + "opcode" : 60, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Sample'" } + ], + "version": "1.0" + }, + { + "opname" : "OpLoad", + "class" : "Memory", + "opcode" : 61, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpStore", + "class" : "Memory", + "opcode" : 62, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpCopyMemory", + "class" : "Memory", + "opcode" : 63, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpCopyMemorySized", + "class" : "Memory", + "opcode" : 64, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Size'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "capabilities" : [ "Addresses" ], + "version": "1.0" + }, + { + "opname" : "OpAccessChain", + "class" : "Memory", + "opcode" : 65, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ], + "version": "1.0" + }, + { + "opname" : "OpInBoundsAccessChain", + "class" : "Memory", + "opcode" : 66, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ], + "version": "1.0" + }, + { + "opname" : "OpPtrAccessChain", + "class" : "Memory", + "opcode" : 67, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Element'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ], + "capabilities" : [ + "Addresses", + "VariablePointers", + "VariablePointersStorageBuffer", + "PhysicalStorageBufferAddresses" + ], + "version": "1.0" + }, + { + "opname" : "OpArrayLength", + "class" : "Memory", + "opcode" : 68, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Structure'" }, + { "kind" : "LiteralInteger", "name" : "'Array member'" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpGenericPtrMemSemantics", + "class" : "Memory", + "opcode" : 69, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpInBoundsPtrAccessChain", + "class" : "Memory", + "opcode" : 70, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Element'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" } + ], + "capabilities" : [ "Addresses" ], + "version": "1.0" + }, + { + "opname" : "OpDecorate", + "class" : "Annotation", + "opcode" : 71, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "version": "1.0" + }, + { + "opname" : "OpMemberDecorate", + "class" : "Annotation", + "opcode" : 72, + "operands" : [ + { "kind" : "IdRef", "name" : "'Structure Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "version": "1.0" + }, + { + "opname" : "OpDecorationGroup", + "class" : "Annotation", + "opcode" : 73, + "operands" : [ + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpGroupDecorate", + "class" : "Annotation", + "opcode" : 74, + "operands" : [ + { "kind" : "IdRef", "name" : "'Decoration Group'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Targets'" } + ], + "version": "1.0" + }, + { + "opname" : "OpGroupMemberDecorate", + "class" : "Annotation", + "opcode" : 75, + "operands" : [ + { "kind" : "IdRef", "name" : "'Decoration Group'" }, + { "kind" : "PairIdRefLiteralInteger", "quantifier" : "*", "name" : "'Targets'" } + ], + "version": "1.0" + }, + { + "opname" : "OpVectorExtractDynamic", + "class" : "Composite", + "opcode" : 77, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "version": "1.0" + }, + { + "opname" : "OpVectorInsertDynamic", + "class" : "Composite", + "opcode" : 78, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Component'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "version": "1.0" + }, + { + "opname" : "OpVectorShuffle", + "class" : "Composite", + "opcode" : 79, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Components'" } + ], + "version": "1.0" + }, + { + "opname" : "OpCompositeConstruct", + "class" : "Composite", + "opcode" : 80, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "version": "1.0" + }, + { + "opname" : "OpCompositeExtract", + "class" : "Composite", + "opcode" : 81, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Composite'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" } + ], + "version": "1.0" + }, + { + "opname" : "OpCompositeInsert", + "class" : "Composite", + "opcode" : 82, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'Composite'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" } + ], + "version": "1.0" + }, + { + "opname" : "OpCopyObject", + "class" : "Composite", + "opcode" : 83, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version": "1.0" + }, + { + "opname" : "OpTranspose", + "class" : "Composite", + "opcode" : 84, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpSampledImage", + "class" : "Image", + "opcode" : 86, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Sampler'" } + ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleImplicitLod", + "class" : "Image", + "opcode" : 87, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleExplicitLod", + "class" : "Image", + "opcode" : 88, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleDrefImplicitLod", + "class" : "Image", + "opcode" : 89, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleDrefExplicitLod", + "class" : "Image", + "opcode" : 90, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleProjImplicitLod", + "class" : "Image", + "opcode" : 91, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleProjExplicitLod", + "class" : "Image", + "opcode" : 92, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleProjDrefImplicitLod", + "class" : "Image", + "opcode" : 93, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageSampleProjDrefExplicitLod", + "class" : "Image", + "opcode" : 94, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageFetch", + "class" : "Image", + "opcode" : 95, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpImageGather", + "class" : "Image", + "opcode" : 96, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Component'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageDrefGather", + "class" : "Image", + "opcode" : 97, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpImageRead", + "class" : "Image", + "opcode" : 98, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpImageWrite", + "class" : "Image", + "opcode" : 99, + "operands" : [ + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Texel'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "version": "1.0" + }, + { + "opname" : "OpImage", + "class" : "Image", + "opcode" : 100, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" } + ], + "version": "1.0" + }, + { + "opname" : "OpImageQueryFormat", + "class" : "Image", + "opcode" : 101, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpImageQueryOrder", + "class" : "Image", + "opcode" : 102, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpImageQuerySizeLod", + "class" : "Image", + "opcode" : 103, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Level of Detail'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" + }, + { + "opname" : "OpImageQuerySize", + "class" : "Image", + "opcode" : 104, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" + }, + { + "opname" : "OpImageQueryLod", + "class" : "Image", + "opcode" : 105, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "ImageQuery" ], + "version": "1.0" + }, + { + "opname" : "OpImageQueryLevels", + "class" : "Image", + "opcode" : 106, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" + }, + { + "opname" : "OpImageQuerySamples", + "class" : "Image", + "opcode" : 107, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" } + ], + "capabilities" : [ "Kernel", "ImageQuery" ], + "version": "1.0" + }, + { + "opname" : "OpConvertFToU", + "class" : "Conversion", + "opcode" : 109, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpConvertFToS", + "class" : "Conversion", + "opcode" : 110, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpConvertSToF", + "class" : "Conversion", + "opcode" : 111, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Signed Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpConvertUToF", + "class" : "Conversion", + "opcode" : 112, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Unsigned Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUConvert", + "class" : "Conversion", + "opcode" : 113, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Unsigned Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSConvert", + "class" : "Conversion", + "opcode" : 114, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Signed Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFConvert", + "class" : "Conversion", + "opcode" : 115, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpQuantizeToF16", + "class" : "Conversion", + "opcode" : 116, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpConvertPtrToU", + "class" : "Conversion", + "opcode" : 117, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ + "Addresses", + "PhysicalStorageBufferAddresses" + ], + "version": "1.0" + }, + { + "opname" : "OpSatConvertSToU", + "class" : "Conversion", + "opcode" : 118, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Signed Value'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpSatConvertUToS", + "class" : "Conversion", + "opcode" : 119, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Unsigned Value'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpConvertUToPtr", + "class" : "Conversion", + "opcode" : 120, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Integer Value'" } + ], + "capabilities" : [ + "Addresses", + "PhysicalStorageBufferAddresses" + ], + "version": "1.0" + }, + { + "opname" : "OpPtrCastToGeneric", + "class" : "Conversion", + "opcode" : 121, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpGenericCastToPtr", + "class" : "Conversion", + "opcode" : 122, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpGenericCastToPtrExplicit", + "class" : "Conversion", + "opcode" : 123, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "StorageClass", "name" : "'Storage'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpBitcast", + "class" : "Conversion", + "opcode" : 124, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSNegate", + "class" : "Arithmetic", + "opcode" : 126, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFNegate", + "class" : "Arithmetic", + "opcode" : 127, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIAdd", + "class" : "Arithmetic", + "opcode" : 128, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFAdd", + "class" : "Arithmetic", + "opcode" : 129, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpISub", + "class" : "Arithmetic", + "opcode" : 130, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFSub", + "class" : "Arithmetic", + "opcode" : 131, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIMul", + "class" : "Arithmetic", + "opcode" : 132, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFMul", + "class" : "Arithmetic", + "opcode" : 133, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUDiv", + "class" : "Arithmetic", + "opcode" : 134, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSDiv", + "class" : "Arithmetic", + "opcode" : 135, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFDiv", + "class" : "Arithmetic", + "opcode" : 136, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUMod", + "class" : "Arithmetic", + "opcode" : 137, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSRem", + "class" : "Arithmetic", + "opcode" : 138, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSMod", + "class" : "Arithmetic", + "opcode" : 139, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFRem", + "class" : "Arithmetic", + "opcode" : 140, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFMod", + "class" : "Arithmetic", + "opcode" : 141, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpVectorTimesScalar", + "class" : "Arithmetic", + "opcode" : 142, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Scalar'" } + ], + "version": "1.0" + }, + { + "opname" : "OpMatrixTimesScalar", + "class" : "Arithmetic", + "opcode" : 143, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" }, + { "kind" : "IdRef", "name" : "'Scalar'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpVectorTimesMatrix", + "class" : "Arithmetic", + "opcode" : 144, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" }, + { "kind" : "IdRef", "name" : "'Matrix'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpMatrixTimesVector", + "class" : "Arithmetic", + "opcode" : 145, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" }, + { "kind" : "IdRef", "name" : "'Vector'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpMatrixTimesMatrix", + "class" : "Arithmetic", + "opcode" : 146, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'LeftMatrix'" }, + { "kind" : "IdRef", "name" : "'RightMatrix'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpOuterProduct", + "class" : "Arithmetic", + "opcode" : 147, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" } + ], + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "opname" : "OpDot", + "class" : "Arithmetic", + "opcode" : 148, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIAddCarry", + "class" : "Arithmetic", + "opcode" : 149, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpISubBorrow", + "class" : "Arithmetic", + "opcode" : 150, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUMulExtended", + "class" : "Arithmetic", + "opcode" : 151, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSMulExtended", + "class" : "Arithmetic", + "opcode" : 152, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAny", + "class" : "Relational_and_Logical", + "opcode" : 154, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAll", + "class" : "Relational_and_Logical", + "opcode" : 155, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIsNan", + "class" : "Relational_and_Logical", + "opcode" : 156, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIsInf", + "class" : "Relational_and_Logical", + "opcode" : 157, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIsFinite", + "class" : "Relational_and_Logical", + "opcode" : 158, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpIsNormal", + "class" : "Relational_and_Logical", + "opcode" : 159, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpSignBitSet", + "class" : "Relational_and_Logical", + "opcode" : 160, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpLessOrGreater", + "class" : "Relational_and_Logical", + "opcode" : 161, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ], + "capabilities" : [ "Kernel" ], + "version" : "1.0", + "lastVersion" : "1.5" + }, + { + "opname" : "OpOrdered", + "class" : "Relational_and_Logical", + "opcode" : 162, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpUnordered", + "class" : "Relational_and_Logical", + "opcode" : 163, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'x'" }, + { "kind" : "IdRef", "name" : "'y'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpLogicalEqual", + "class" : "Relational_and_Logical", + "opcode" : 164, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpLogicalNotEqual", + "class" : "Relational_and_Logical", + "opcode" : 165, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpLogicalOr", + "class" : "Relational_and_Logical", + "opcode" : 166, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpLogicalAnd", + "class" : "Relational_and_Logical", + "opcode" : 167, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version" : "1.0" + }, + { + "opname" : "OpLogicalNot", + "class" : "Relational_and_Logical", + "opcode" : 168, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSelect", + "class" : "Relational_and_Logical", + "opcode" : 169, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Condition'" }, + { "kind" : "IdRef", "name" : "'Object 1'" }, + { "kind" : "IdRef", "name" : "'Object 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpIEqual", + "class" : "Relational_and_Logical", + "opcode" : 170, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpINotEqual", + "class" : "Relational_and_Logical", + "opcode" : 171, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUGreaterThan", + "class" : "Relational_and_Logical", + "opcode" : 172, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSGreaterThan", + "class" : "Relational_and_Logical", + "opcode" : 173, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUGreaterThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 174, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSGreaterThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 175, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpULessThan", + "class" : "Relational_and_Logical", + "opcode" : 176, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSLessThan", + "class" : "Relational_and_Logical", + "opcode" : 177, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpULessThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 178, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSLessThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 179, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFOrdEqual", + "class" : "Relational_and_Logical", + "opcode" : 180, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFUnordEqual", + "class" : "Relational_and_Logical", + "opcode" : 181, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFOrdNotEqual", + "class" : "Relational_and_Logical", + "opcode" : 182, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFUnordNotEqual", + "class" : "Relational_and_Logical", + "opcode" : 183, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFOrdLessThan", + "class" : "Relational_and_Logical", + "opcode" : 184, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFUnordLessThan", + "class" : "Relational_and_Logical", + "opcode" : 185, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFOrdGreaterThan", + "class" : "Relational_and_Logical", + "opcode" : 186, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFUnordGreaterThan", + "class" : "Relational_and_Logical", + "opcode" : 187, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFOrdLessThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 188, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFUnordLessThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 189, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFOrdGreaterThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 190, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpFUnordGreaterThanEqual", + "class" : "Relational_and_Logical", + "opcode" : 191, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpShiftRightLogical", + "class" : "Bit", + "opcode" : 194, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Shift'" } + ], + "version": "1.0" + }, + { + "opname" : "OpShiftRightArithmetic", + "class" : "Bit", + "opcode" : 195, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Shift'" } + ], + "version": "1.0" + }, + { + "opname" : "OpShiftLeftLogical", + "class" : "Bit", + "opcode" : 196, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Shift'" } + ], + "version": "1.0" + }, + { + "opname" : "OpBitwiseOr", + "class" : "Bit", + "opcode" : 197, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpBitwiseXor", + "class" : "Bit", + "opcode" : 198, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpBitwiseAnd", + "class" : "Bit", + "opcode" : 199, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version": "1.0" + }, + { + "opname" : "OpNot", + "class" : "Bit", + "opcode" : 200, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version": "1.0" + }, + { + "opname" : "OpBitFieldInsert", + "class" : "Bit", + "opcode" : 201, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Insert'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Count'" } + ], + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" + }, + { + "opname" : "OpBitFieldSExtract", + "class" : "Bit", + "opcode" : 202, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Count'" } + ], + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" + }, + { + "opname" : "OpBitFieldUExtract", + "class" : "Bit", + "opcode" : 203, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" }, + { "kind" : "IdRef", "name" : "'Offset'" }, + { "kind" : "IdRef", "name" : "'Count'" } + ], + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" + }, + { + "opname" : "OpBitReverse", + "class" : "Bit", + "opcode" : 204, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" } + ], + "capabilities" : [ "Shader", "BitInstructions" ], + "version": "1.0" + }, + { + "opname" : "OpBitCount", + "class" : "Bit", + "opcode" : 205, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Base'" } + ], + "version": "1.0" + }, + { + "opname" : "OpDPdx", + "class" : "Derivative", + "opcode" : 207, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpDPdy", + "class" : "Derivative", + "opcode" : 208, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpFwidth", + "class" : "Derivative", + "opcode" : 209, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpDPdxFine", + "class" : "Derivative", + "opcode" : 210, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" + }, + { + "opname" : "OpDPdyFine", + "class" : "Derivative", + "opcode" : 211, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" + }, + { + "opname" : "OpFwidthFine", + "class" : "Derivative", + "opcode" : 212, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" + }, + { + "opname" : "OpDPdxCoarse", + "class" : "Derivative", + "opcode" : 213, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" + }, + { + "opname" : "OpDPdyCoarse", + "class" : "Derivative", + "opcode" : 214, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" + }, + { + "opname" : "OpFwidthCoarse", + "class" : "Derivative", + "opcode" : 215, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'P'" } + ], + "capabilities" : [ "DerivativeControl" ], + "version": "1.0" + }, + { + "opname" : "OpEmitVertex", + "class" : "Primitive", + "opcode" : 218, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "opname" : "OpEndPrimitive", + "class" : "Primitive", + "opcode" : 219, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "opname" : "OpEmitStreamVertex", + "class" : "Primitive", + "opcode" : 220, + "operands" : [ + { "kind" : "IdRef", "name" : "'Stream'" } + ], + "capabilities" : [ "GeometryStreams" ], + "version": "1.0" + }, + { + "opname" : "OpEndStreamPrimitive", + "class" : "Primitive", + "opcode" : 221, + "operands" : [ + { "kind" : "IdRef", "name" : "'Stream'" } + ], + "capabilities" : [ "GeometryStreams" ], + "version": "1.0" + }, + { + "opname" : "OpControlBarrier", + "class" : "Barrier", + "opcode" : 224, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "version": "1.0" + }, + { + "opname" : "OpMemoryBarrier", + "class" : "Barrier", + "opcode" : 225, + "operands" : [ + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicLoad", + "class" : "Atomic", + "opcode" : 227, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicStore", + "class" : "Atomic", + "opcode" : 228, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicExchange", + "class" : "Atomic", + "opcode" : 229, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicCompareExchange", + "class" : "Atomic", + "opcode" : 230, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Equal'" }, + { "kind" : "IdMemorySemantics", "name" : "'Unequal'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Comparator'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicCompareExchangeWeak", + "class" : "Atomic", + "opcode" : 231, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Equal'" }, + { "kind" : "IdMemorySemantics", "name" : "'Unequal'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Comparator'" } + ], + "capabilities" : [ "Kernel" ], + "version" : "1.0", + "lastVersion" : "1.3" + }, + { + "opname" : "OpAtomicIIncrement", + "class" : "Atomic", + "opcode" : 232, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicIDecrement", + "class" : "Atomic", + "opcode" : 233, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicIAdd", + "class" : "Atomic", + "opcode" : 234, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicISub", + "class" : "Atomic", + "opcode" : 235, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicSMin", + "class" : "Atomic", + "opcode" : 236, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicUMin", + "class" : "Atomic", + "opcode" : 237, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicSMax", + "class" : "Atomic", + "opcode" : 238, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicUMax", + "class" : "Atomic", + "opcode" : 239, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicAnd", + "class" : "Atomic", + "opcode" : 240, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicOr", + "class" : "Atomic", + "opcode" : 241, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpAtomicXor", + "class" : "Atomic", + "opcode" : 242, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpPhi", + "class" : "Control-Flow", + "opcode" : 245, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "PairIdRefIdRef", "quantifier" : "*", "name" : "'Variable, Parent, ...'" } + ], + "version": "1.0" + }, + { + "opname" : "OpLoopMerge", + "class" : "Control-Flow", + "opcode" : 246, + "operands" : [ + { "kind" : "IdRef", "name" : "'Merge Block'" }, + { "kind" : "IdRef", "name" : "'Continue Target'" }, + { "kind" : "LoopControl" } + ], + "version": "1.0" + }, + { + "opname" : "OpSelectionMerge", + "class" : "Control-Flow", + "opcode" : 247, + "operands" : [ + { "kind" : "IdRef", "name" : "'Merge Block'" }, + { "kind" : "SelectionControl" } + ], + "version": "1.0" + }, + { + "opname" : "OpLabel", + "class" : "Control-Flow", + "opcode" : 248, + "operands" : [ + { "kind" : "IdResult" } + ], + "version": "1.0" + }, + { + "opname" : "OpBranch", + "class" : "Control-Flow", + "opcode" : 249, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target Label'" } + ], + "version": "1.0" + }, + { + "opname" : "OpBranchConditional", + "class" : "Control-Flow", + "opcode" : 250, + "operands" : [ + { "kind" : "IdRef", "name" : "'Condition'" }, + { "kind" : "IdRef", "name" : "'True Label'" }, + { "kind" : "IdRef", "name" : "'False Label'" }, + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Branch weights'" } + ], + "version": "1.0" + }, + { + "opname" : "OpSwitch", + "class" : "Control-Flow", + "opcode" : 251, + "operands" : [ + { "kind" : "IdRef", "name" : "'Selector'" }, + { "kind" : "IdRef", "name" : "'Default'" }, + { "kind" : "PairLiteralIntegerIdRef", "quantifier" : "*", "name" : "'Target'" } + ], + "version": "1.0" + }, + { + "opname" : "OpKill", + "class" : "Control-Flow", + "opcode" : 252, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "opname" : "OpReturn", + "class" : "Control-Flow", + "opcode" : 253, + "version" : "1.0" + }, + { + "opname" : "OpReturnValue", + "class" : "Control-Flow", + "opcode" : 254, + "operands" : [ + { "kind" : "IdRef", "name" : "'Value'" } + ], + "version": "1.0" + }, + { + "opname" : "OpUnreachable", + "class" : "Control-Flow", + "opcode" : 255, + "version" : "1.0" + }, + { + "opname" : "OpLifetimeStart", + "class" : "Control-Flow", + "opcode" : 256, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "LiteralInteger", "name" : "'Size'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpLifetimeStop", + "class" : "Control-Flow", + "opcode" : 257, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "LiteralInteger", "name" : "'Size'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpGroupAsyncCopy", + "class" : "Group", + "opcode" : 259, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Destination'" }, + { "kind" : "IdRef", "name" : "'Source'" }, + { "kind" : "IdRef", "name" : "'Num Elements'" }, + { "kind" : "IdRef", "name" : "'Stride'" }, + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpGroupWaitEvents", + "class" : "Group", + "opcode" : 260, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Num Events'" }, + { "kind" : "IdRef", "name" : "'Events List'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpGroupAll", + "class" : "Group", + "opcode" : 261, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupAny", + "class" : "Group", + "opcode" : 262, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupBroadcast", + "class" : "Group", + "opcode" : 263, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'LocalId'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupIAdd", + "class" : "Group", + "opcode" : 264, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupFAdd", + "class" : "Group", + "opcode" : 265, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupFMin", + "class" : "Group", + "opcode" : 266, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupUMin", + "class" : "Group", + "opcode" : 267, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupSMin", + "class" : "Group", + "opcode" : 268, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupFMax", + "class" : "Group", + "opcode" : 269, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupUMax", + "class" : "Group", + "opcode" : 270, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpGroupSMax", + "class" : "Group", + "opcode" : 271, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "version": "1.0" + }, + { + "opname" : "OpReadPipe", + "class" : "Pipe", + "opcode" : 274, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpWritePipe", + "class" : "Pipe", + "opcode" : 275, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpReservedReadPipe", + "class" : "Pipe", + "opcode" : 276, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Index'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpReservedWritePipe", + "class" : "Pipe", + "opcode" : 277, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Index'" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpReserveReadPipePackets", + "class" : "Pipe", + "opcode" : 278, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpReserveWritePipePackets", + "class" : "Pipe", + "opcode" : 279, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpCommitReadPipe", + "class" : "Pipe", + "opcode" : 280, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpCommitWritePipe", + "class" : "Pipe", + "opcode" : 281, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpIsValidReserveId", + "class" : "Pipe", + "opcode" : 282, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpGetNumPipePackets", + "class" : "Pipe", + "opcode" : 283, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpGetMaxPipePackets", + "class" : "Pipe", + "opcode" : 284, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpGroupReserveReadPipePackets", + "class" : "Pipe", + "opcode" : 285, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpGroupReserveWritePipePackets", + "class" : "Pipe", + "opcode" : 286, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Num Packets'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpGroupCommitReadPipe", + "class" : "Pipe", + "opcode" : 287, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpGroupCommitWritePipe", + "class" : "Pipe", + "opcode" : 288, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Pipe'" }, + { "kind" : "IdRef", "name" : "'Reserve Id'" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "Pipes" ], + "version": "1.0" + }, + { + "opname" : "OpEnqueueMarker", + "class" : "Device-Side_Enqueue", + "opcode" : 291, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Queue'" }, + { "kind" : "IdRef", "name" : "'Num Events'" }, + { "kind" : "IdRef", "name" : "'Wait Events'" }, + { "kind" : "IdRef", "name" : "'Ret Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpEnqueueKernel", + "class" : "Device-Side_Enqueue", + "opcode" : 292, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Queue'" }, + { "kind" : "IdRef", "name" : "'Flags'" }, + { "kind" : "IdRef", "name" : "'ND Range'" }, + { "kind" : "IdRef", "name" : "'Num Events'" }, + { "kind" : "IdRef", "name" : "'Wait Events'" }, + { "kind" : "IdRef", "name" : "'Ret Event'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Local Size'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpGetKernelNDrangeSubGroupCount", + "class" : "Device-Side_Enqueue", + "opcode" : 293, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'ND Range'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpGetKernelNDrangeMaxSubGroupSize", + "class" : "Device-Side_Enqueue", + "opcode" : 294, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'ND Range'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpGetKernelWorkGroupSize", + "class" : "Device-Side_Enqueue", + "opcode" : 295, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpGetKernelPreferredWorkGroupSizeMultiple", + "class" : "Device-Side_Enqueue", + "opcode" : 296, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpRetainEvent", + "class" : "Device-Side_Enqueue", + "opcode" : 297, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpReleaseEvent", + "class" : "Device-Side_Enqueue", + "opcode" : 298, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpCreateUserEvent", + "class" : "Device-Side_Enqueue", + "opcode" : 299, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpIsValidEvent", + "class" : "Device-Side_Enqueue", + "opcode" : 300, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Event'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpSetUserEventStatus", + "class" : "Device-Side_Enqueue", + "opcode" : 301, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" }, + { "kind" : "IdRef", "name" : "'Status'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpCaptureEventProfilingInfo", + "class" : "Device-Side_Enqueue", + "opcode" : 302, + "operands" : [ + { "kind" : "IdRef", "name" : "'Event'" }, + { "kind" : "IdRef", "name" : "'Profiling Info'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpGetDefaultQueue", + "class" : "Device-Side_Enqueue", + "opcode" : 303, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpBuildNDRange", + "class" : "Device-Side_Enqueue", + "opcode" : 304, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'GlobalWorkSize'" }, + { "kind" : "IdRef", "name" : "'LocalWorkSize'" }, + { "kind" : "IdRef", "name" : "'GlobalWorkOffset'" } + ], + "capabilities" : [ "DeviceEnqueue" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseSampleImplicitLod", + "class" : "Image", + "opcode" : 305, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseSampleExplicitLod", + "class" : "Image", + "opcode" : 306, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseSampleDrefImplicitLod", + "class" : "Image", + "opcode" : 307, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseSampleDrefExplicitLod", + "class" : "Image", + "opcode" : 308, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseSampleProjImplicitLod", + "class" : "Image", + "opcode" : 309, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseSampleProjExplicitLod", + "class" : "Image", + "opcode" : 310, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseSampleProjDrefImplicitLod", + "class" : "Image", + "opcode" : 311, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseSampleProjDrefExplicitLod", + "class" : "Image", + "opcode" : 312, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands" } + ], + "capabilities" : [ "SparseResidency" ], + "version" : "None" + }, + { + "opname" : "OpImageSparseFetch", + "class" : "Image", + "opcode" : 313, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseGather", + "class" : "Image", + "opcode" : 314, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Component'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseDrefGather", + "class" : "Image", + "opcode" : 315, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'D~ref~'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseTexelsResident", + "class" : "Image", + "opcode" : 316, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Resident Code'" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpNoLine", + "class" : "Debug", + "opcode" : 317, + "version" : "1.0" + }, + { + "opname" : "OpAtomicFlagTestAndSet", + "class" : "Atomic", + "opcode" : 318, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpAtomicFlagClear", + "class" : "Atomic", + "opcode" : 319, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "opname" : "OpImageSparseRead", + "class" : "Image", + "opcode" : 320, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "SparseResidency" ], + "version": "1.0" + }, + { + "opname" : "OpSizeOf", + "class" : "Miscellaneous", + "opcode" : 321, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "Addresses" ], + "version" : "1.1" + }, + { + "opname" : "OpTypePipeStorage", + "class" : "Type-Declaration", + "opcode" : 322, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "PipeStorage" ], + "version" : "1.1" + }, + { + "opname" : "OpConstantPipeStorage", + "class" : "Pipe", + "opcode" : 323, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralInteger", "name" : "'Packet Size'" }, + { "kind" : "LiteralInteger", "name" : "'Packet Alignment'" }, + { "kind" : "LiteralInteger", "name" : "'Capacity'" } + ], + "capabilities" : [ "PipeStorage" ], + "version" : "1.1" + }, + { + "opname" : "OpCreatePipeFromPipeStorage", + "class" : "Pipe", + "opcode" : 324, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pipe Storage'" } + ], + "capabilities" : [ "PipeStorage" ], + "version" : "1.1" + }, + { + "opname" : "OpGetKernelLocalSizeForSubgroupCount", + "class" : "Device-Side_Enqueue", + "opcode" : 325, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Subgroup Count'" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "SubgroupDispatch" ], + "version" : "1.1" + }, + { + "opname" : "OpGetKernelMaxNumSubgroups", + "class" : "Device-Side_Enqueue", + "opcode" : 326, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Invoke'" }, + { "kind" : "IdRef", "name" : "'Param'" }, + { "kind" : "IdRef", "name" : "'Param Size'" }, + { "kind" : "IdRef", "name" : "'Param Align'" } + ], + "capabilities" : [ "SubgroupDispatch" ], + "version" : "1.1" + }, + { + "opname" : "OpTypeNamedBarrier", + "class" : "Type-Declaration", + "opcode" : 327, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "NamedBarrier" ], + "version" : "1.1" + }, + { + "opname" : "OpNamedBarrierInitialize", + "class" : "Barrier", + "opcode" : 328, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Subgroup Count'" } + ], + "capabilities" : [ "NamedBarrier" ], + "version" : "1.1" + }, + { + "opname" : "OpMemoryNamedBarrier", + "class" : "Barrier", + "opcode" : 329, + "operands" : [ + { "kind" : "IdRef", "name" : "'Named Barrier'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "NamedBarrier" ], + "version" : "1.1" + }, + { + "opname" : "OpModuleProcessed", + "class" : "Debug", + "opcode" : 330, + "operands" : [ + { "kind" : "LiteralString", "name" : "'Process'" } + ], + "version" : "1.1" + }, + { + "opname" : "OpExecutionModeId", + "class" : "Mode-Setting", + "opcode" : 331, + "operands" : [ + { "kind" : "IdRef", "name" : "'Entry Point'" }, + { "kind" : "ExecutionMode", "name" : "'Mode'" } + ], + "version" : "1.2" + }, + { + "opname" : "OpDecorateId", + "class" : "Annotation", + "opcode" : 332, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "1.2" + }, + { + "opname" : "OpGroupNonUniformElect", + "class" : "Non-Uniform", + "opcode" : 333, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" } + ], + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformAll", + "class" : "Non-Uniform", + "opcode" : 334, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "GroupNonUniformVote" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformAny", + "class" : "Non-Uniform", + "opcode" : 335, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "GroupNonUniformVote" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformAllEqual", + "class" : "Non-Uniform", + "opcode" : 336, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformVote" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBroadcast", + "class" : "Non-Uniform", + "opcode" : 337, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Id'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBroadcastFirst", + "class" : "Non-Uniform", + "opcode" : 338, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallot", + "class" : "Non-Uniform", + "opcode" : 339, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformInverseBallot", + "class" : "Non-Uniform", + "opcode" : 340, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotBitExtract", + "class" : "Non-Uniform", + "opcode" : 341, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotBitCount", + "class" : "Non-Uniform", + "opcode" : 342, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotFindLSB", + "class" : "Non-Uniform", + "opcode" : 343, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBallotFindMSB", + "class" : "Non-Uniform", + "opcode" : 344, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffle", + "class" : "Non-Uniform", + "opcode" : 345, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Id'" } + ], + "capabilities" : [ "GroupNonUniformShuffle" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffleXor", + "class" : "Non-Uniform", + "opcode" : 346, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Mask'" } + ], + "capabilities" : [ "GroupNonUniformShuffle" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffleUp", + "class" : "Non-Uniform", + "opcode" : 347, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "GroupNonUniformShuffleRelative" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformShuffleDown", + "class" : "Non-Uniform", + "opcode" : 348, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "GroupNonUniformShuffleRelative" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformIAdd", + "class" : "Non-Uniform", + "opcode" : 349, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFAdd", + "class" : "Non-Uniform", + "opcode" : 350, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformIMul", + "class" : "Non-Uniform", + "opcode" : 351, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFMul", + "class" : "Non-Uniform", + "opcode" : 352, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformSMin", + "class" : "Non-Uniform", + "opcode" : 353, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformUMin", + "class" : "Non-Uniform", + "opcode" : 354, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFMin", + "class" : "Non-Uniform", + "opcode" : 355, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformSMax", + "class" : "Non-Uniform", + "opcode" : 356, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformUMax", + "class" : "Non-Uniform", + "opcode" : 357, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformFMax", + "class" : "Non-Uniform", + "opcode" : 358, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBitwiseAnd", + "class" : "Non-Uniform", + "opcode" : 359, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBitwiseOr", + "class" : "Non-Uniform", + "opcode" : 360, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformBitwiseXor", + "class" : "Non-Uniform", + "opcode" : 361, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformLogicalAnd", + "class" : "Non-Uniform", + "opcode" : 362, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformLogicalOr", + "class" : "Non-Uniform", + "opcode" : 363, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformLogicalXor", + "class" : "Non-Uniform", + "opcode" : 364, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformArithmetic", "GroupNonUniformClustered", "GroupNonUniformPartitionedNV" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformQuadBroadcast", + "class" : "Non-Uniform", + "opcode" : 365, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "capabilities" : [ "GroupNonUniformQuad" ], + "version" : "1.3" + }, + { + "opname" : "OpGroupNonUniformQuadSwap", + "class" : "Non-Uniform", + "opcode" : 366, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Direction'" } + ], + "capabilities" : [ "GroupNonUniformQuad" ], + "version" : "1.3" + }, + { + "opname" : "OpCopyLogical", + "class" : "Composite", + "opcode" : 400, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "version" : "1.4" + }, + { + "opname" : "OpPtrEqual", + "class" : "Memory", + "opcode" : 401, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version" : "1.4" + }, + { + "opname" : "OpPtrNotEqual", + "class" : "Memory", + "opcode" : 402, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "version" : "1.4" + }, + { + "opname" : "OpPtrDiff", + "class" : "Memory", + "opcode" : 403, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "Addresses", "VariablePointers", "VariablePointersStorageBuffer" ], + "version" : "1.4" + }, + { + "opname" : "OpColorAttachmentReadEXT", + "class" : "Image", + "opcode" : 4160, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Attachment'" }, + { "kind" : "IdRef", "name" : "'Sample'", "quantifier" : "?" } + ], + "capabilities": [ "TileImageColorReadAccessEXT" ], + "version" : "None" + }, + { + "opname" : "OpDepthAttachmentReadEXT", + "class" : "Image", + "opcode" : 4161, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sample'", "quantifier" : "?" } + ], + "capabilities" : [ "TileImageDepthReadAccessEXT" ], + "version" : "None" + }, + { + "opname" : "OpStencilAttachmentReadEXT", + "class" : "Image", + "opcode" : 4162, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sample'", "quantifier" : "?" } + ], + "capabilities" : [ "TileImageStencilReadAccessEXT" ], + "version" : "None" + }, + { + "opname" : "OpTerminateInvocation", + "class" : "Control-Flow", + "opcode" : 4416, + "extensions" : [ + "SPV_KHR_terminate_invocation" + ], + "capabilities" : [ "Shader" ], + "version" : "1.6" + }, + { + "opname" : "OpSubgroupBallotKHR", + "class" : "Group", + "opcode" : 4421, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "capabilities" : [ "SubgroupBallotKHR" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupFirstInvocationKHR", + "class" : "Group", + "opcode" : 4422, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "SubgroupBallotKHR" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAllKHR", + "class" : "Group", + "opcode" : 4428, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "extensions" : [ + "SPV_KHR_subgroup_vote" + ], + "capabilities" : [ "SubgroupVoteKHR" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAnyKHR", + "class" : "Group", + "opcode" : 4429, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "extensions" : [ + "SPV_KHR_subgroup_vote" + ], + "capabilities" : [ "SubgroupVoteKHR" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAllEqualKHR", + "class" : "Group", + "opcode" : 4430, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Predicate'" } + ], + "extensions" : [ + "SPV_KHR_subgroup_vote" + ], + "capabilities" : [ "SubgroupVoteKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupNonUniformRotateKHR", + "class" : "Group", + "opcode" : 4431, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Delta'" }, + { "kind" : "IdRef", "name" : "'ClusterSize'", "quantifier" : "?" } + ], + "capabilities" : [ "GroupNonUniformRotateKHR" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupReadInvocationKHR", + "class" : "Group", + "opcode" : 4432, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'Index'" } + ], + "capabilities" : [ "SubgroupBallotKHR" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpTraceRayKHR", + "class" : "Reserved", + "opcode" : 4445, + "operands" : [ + + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Ray Flags'" }, + { "kind" : "IdRef", "name" : "'Cull Mask'" }, + { "kind" : "IdRef", "name" : "'SBT Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Stride'" }, + { "kind" : "IdRef", "name" : "'Miss Index'" }, + { "kind" : "IdRef", "name" : "'Ray Origin'" }, + { "kind" : "IdRef", "name" : "'Ray Tmin'" }, + { "kind" : "IdRef", "name" : "'Ray Direction'" }, + { "kind" : "IdRef", "name" : "'Ray Tmax'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpExecuteCallableKHR", + "class" : "Reserved", + "opcode" : 4446, + "operands" : [ + + { "kind" : "IdRef", "name" : "'SBT Index'" }, + { "kind" : "IdRef", "name" : "'Callable Data'" } + ], + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpConvertUToAccelerationStructureKHR", + "class" : "Reserved", + "opcode" : 4447, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Accel'" } + ], + "capabilities" : [ "RayTracingKHR", "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_tracing", "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpIgnoreIntersectionKHR", + "class" : "Reserved", + "opcode" : 4448, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpTerminateRayKHR", + "class" : "Reserved", + "opcode" : 4449, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpSDot", + "class" : "Arithmetic", + "opcode" : 4450, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProduct" ], + "version" : "1.6" + }, + { + "opname" : "OpSDotKHR", + "class" : "Arithmetic", + "opcode" : 4450, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProductKHR" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "opname" : "OpUDot", + "class" : "Arithmetic", + "opcode" : 4451, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProduct" ], + "version" : "1.6" + }, + { + "opname" : "OpUDotKHR", + "class" : "Arithmetic", + "opcode" : 4451, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProductKHR" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "opname" : "OpSUDot", + "class" : "Arithmetic", + "opcode" : 4452, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProduct" ], + "version" : "1.6" + }, + { + "opname" : "OpSUDotKHR", + "class" : "Arithmetic", + "opcode" : 4452, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProductKHR" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "opname" : "OpSDotAccSat", + "class" : "Arithmetic", + "opcode" : 4453, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "IdRef", "name" : "'Accumulator'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProduct" ], + "version" : "1.6" + }, + { + "opname" : "OpSDotAccSatKHR", + "class" : "Arithmetic", + "opcode" : 4453, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "IdRef", "name" : "'Accumulator'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProductKHR" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "opname" : "OpUDotAccSat", + "class" : "Arithmetic", + "opcode" : 4454, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "IdRef", "name" : "'Accumulator'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProduct" ], + "version" : "1.6" + }, + { + "opname" : "OpUDotAccSatKHR", + "class" : "Arithmetic", + "opcode" : 4454, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "IdRef", "name" : "'Accumulator'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProductKHR" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "opname" : "OpSUDotAccSat", + "class" : "Arithmetic", + "opcode" : 4455, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "IdRef", "name" : "'Accumulator'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProduct" ], + "version" : "1.6" + }, + { + "opname" : "OpSUDotAccSatKHR", + "class" : "Arithmetic", + "opcode" : 4455, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Vector 1'" }, + { "kind" : "IdRef", "name" : "'Vector 2'" }, + { "kind" : "IdRef", "name" : "'Accumulator'" }, + { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } + ], + "capabilities" : [ "DotProductKHR" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "opname" : "OpTypeCooperativeMatrixKHR", + "class" : "Type-Declaration", + "opcode" : 4456, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Component Type'" }, + { "kind" : "IdScope", "name" : "'Scope'" }, + { "kind" : "IdRef", "name" : "'Rows'" }, + { "kind" : "IdRef", "name" : "'Columns'" }, + { "kind" : "IdRef", "name" : "'Use'" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLoadKHR", + "class" : "Memory", + "opcode" : 4457, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'MemoryLayout'" }, + { "kind" : "IdRef", "name" : "'Stride'", "quantifier": "?" }, + { "kind" : "MemoryAccess", "name" : "'Memory Operand'", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixStoreKHR", + "class" : "Memory", + "opcode" : 4458, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'MemoryLayout'" }, + { "kind" : "IdRef", "name" : "'Stride'", "quantifier": "?" }, + { "kind" : "MemoryAccess", "name" : "'Memory Operand'", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixMulAddKHR", + "class" : "Arithmetic", + "opcode" : 4459, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "IdRef", "name" : "'C'" }, + { "kind" : "CooperativeMatrixOperands", "name" : "'Cooperative Matrix Operands'", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLengthKHR", + "class" : "Miscellaneous", + "opcode" : 4460, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Type'" } + ], + "capabilities" : [ "CooperativeMatrixKHR" ], + "version" : "None" + }, + { + "opname" : "OpTypeRayQueryKHR", + "class" : "Type-Declaration", + "opcode" : 4472, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryInitializeKHR", + "class" : "Reserved", + "opcode" : 4473, + "operands" : [ + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Accel'" + }, + { + "kind" : "IdRef", + "name" : "'RayFlags'" + }, + { + "kind" : "IdRef", + "name" : "'CullMask'" + }, + { + "kind" : "IdRef", + "name" : "'RayOrigin'" + }, + { + "kind" : "IdRef", + "name" : "'RayTMin'" + }, + { + "kind" : "IdRef", + "name" : "'RayDirection'" + }, + { + "kind" : "IdRef", + "name" : "'RayTMax'" + } + + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryTerminateKHR", + "class" : "Reserved", + "opcode" : 4474, + "operands" : [ + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGenerateIntersectionKHR", + "class" : "Reserved", + "opcode" : 4475, + "operands" : [ + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'HitT'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryConfirmIntersectionKHR", + "class" : "Reserved", + "opcode" : 4476, + "operands" : [ + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryProceedKHR", + "class" : "Reserved", + "opcode" : 4477, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionTypeKHR", + "class" : "Reserved", + "opcode" : 4479, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpImageSampleWeightedQCOM", + "class" : "Image", + "opcode" : 4480, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Texture'" }, + { "kind" : "IdRef", "name" : "'Coordinates'" }, + { "kind" : "IdRef", "name" : "'Weights'" } + ], + "capabilities" : [ "TextureSampleWeightedQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBoxFilterQCOM", + "class" : "Image", + "opcode" : 4481, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Texture'" }, + { "kind" : "IdRef", "name" : "'Coordinates'" }, + { "kind" : "IdRef", "name" : "'Box Size'" } + ], + "capabilities" : [ "TextureBoxFilterQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchSSDQCOM", + "class" : "Image", + "opcode" : 4482, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatchQCOM" ], + "version" : "None" + }, + { + "opname" : "OpImageBlockMatchSADQCOM", + "class" : "Image", + "opcode" : 4483, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "IdRef", "name" : "'Target Coordinates'" }, + { "kind" : "IdRef", "name" : "'Reference'" }, + { "kind" : "IdRef", "name" : "'Reference Coordinates'" }, + { "kind" : "IdRef", "name" : "'Block Size'" } + ], + "capabilities" : [ "TextureBlockMatchQCOM" ], + "version" : "None" + }, + { + "opname" : "OpGroupIAddNonUniformAMD", + "class" : "Group", + "opcode" : 5000, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupFAddNonUniformAMD", + "class" : "Group", + "opcode" : 5001, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupFMinNonUniformAMD", + "class" : "Group", + "opcode" : 5002, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupUMinNonUniformAMD", + "class" : "Group", + "opcode" : 5003, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupSMinNonUniformAMD", + "class" : "Group", + "opcode" : 5004, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupFMaxNonUniformAMD", + "class" : "Group", + "opcode" : 5005, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupUMaxNonUniformAMD", + "class" : "Group", + "opcode" : 5006, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpGroupSMaxNonUniformAMD", + "class" : "Group", + "opcode" : 5007, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "Groups" ], + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version" : "None" + }, + { + "opname" : "OpFragmentMaskFetchAMD", + "class" : "Reserved", + "opcode" : 5011, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "FragmentMaskAMD" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "opname" : "OpFragmentFetchAMD", + "class" : "Reserved", + "opcode" : 5012, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Fragment Index'" } + ], + "capabilities" : [ "FragmentMaskAMD" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "opname" : "OpReadClockKHR", + "class" : "Reserved", + "opcode" : 5056, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Scope'" } + ], + "capabilities" : [ "ShaderClockKHR" ], + "version" : "None" + }, + { + "opname" : "OpFinalizeNodePayloadsAMDX", + "class" : "Reserved", + "opcode" : 5075, + "operands" : [ + { "kind" : "IdRef", "name": "'Payload Array'" } + ], + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "opname" : "OpFinishWritingNodePayloadAMDX", + "class" : "Reserved", + "opcode" : 5078, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name": "'Payload'" } + ], + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "opname" : "OpInitializeNodePayloadsAMDX", + "class" : "Reserved", + "opcode" : 5090, + "operands" : [ + { "kind" : "IdRef", "name": "'Payload Array'" }, + { "kind" : "IdScope", "name": "'Visibility'" }, + { "kind" : "IdRef", "name": "'Payload Count'" }, + { "kind" : "IdRef", "name": "'Node Index'" } + ], + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitMotionNV", + "class" : "Reserved", + "opcode" : 5249, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Record Stride'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'Current Time'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitWithIndexMotionNV", + "class" : "Reserved", + "opcode" : 5250, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'Current Time'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordMissMotionNV", + "class" : "Reserved", + "opcode" : 5251, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'SBT Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'Current Time'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetWorldToObjectNV", + "class" : "Reserved", + "opcode" : 5252, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetObjectToWorldNV", + "class" : "Reserved", + "opcode" : 5253, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetObjectRayDirectionNV", + "class" : "Reserved", + "opcode" : 5254, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetObjectRayOriginNV", + "class" : "Reserved", + "opcode" : 5255, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectTraceRayMotionNV", + "class" : "Reserved", + "opcode" : 5256, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'"}, + { "kind" : "IdRef", "name" : "'RayFlags'"}, + { "kind" : "IdRef", "name" : "'Cullmask'"}, + { "kind" : "IdRef", "name" : "'SBT Record Offset'"}, + { "kind" : "IdRef", "name" : "'SBT Record Stride'"}, + { "kind" : "IdRef", "name" : "'Miss Index'"}, + { "kind" : "IdRef", "name" : "'Origin'"}, + { "kind" : "IdRef", "name" : "'TMin'"}, + { "kind" : "IdRef", "name" : "'Direction'"}, + { "kind" : "IdRef", "name" : "'TMax'"}, + { "kind" : "IdRef", "name" : "'Time'"}, + { "kind" : "IdRef", "name" : "'Payload'"} + ], + "capabilities" : [ "ShaderInvocationReorderNV", "RayTracingMotionBlurNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetShaderRecordBufferHandleNV", + "class" : "Reserved", + "opcode" : 5257, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetShaderBindingTableRecordIndexNV", + "class" : "Reserved", + "opcode" : 5258, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordEmptyNV", + "class" : "Reserved", + "opcode" : 5259, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectTraceRayNV", + "class" : "Reserved", + "opcode" : 5260, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'"}, + { "kind" : "IdRef", "name" : "'RayFlags'"}, + { "kind" : "IdRef", "name" : "'Cullmask'"}, + { "kind" : "IdRef", "name" : "'SBT Record Offset'"}, + { "kind" : "IdRef", "name" : "'SBT Record Stride'"}, + { "kind" : "IdRef", "name" : "'Miss Index'"}, + { "kind" : "IdRef", "name" : "'Origin'"}, + { "kind" : "IdRef", "name" : "'TMin'"}, + { "kind" : "IdRef", "name" : "'Direction'"}, + { "kind" : "IdRef", "name" : "'TMax'"}, + { "kind" : "IdRef", "name" : "'Payload'"} + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitNV", + "class" : "Reserved", + "opcode" : 5261, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Record Stride'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordHitWithIndexNV", + "class" : "Reserved", + "opcode" : 5262, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Acceleration Structure'" }, + { "kind" : "IdRef", "name" : "'InstanceId'" }, + { "kind" : "IdRef", "name" : "'PrimitiveId'" }, + { "kind" : "IdRef", "name" : "'GeometryIndex'" }, + { "kind" : "IdRef", "name" : "'Hit Kind'" }, + { "kind" : "IdRef", "name" : "'SBT Record Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" }, + { "kind" : "IdRef", "name" : "'HitObject Attributes'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectRecordMissNV", + "class" : "Reserved", + "opcode" : 5263, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'SBT Index'" }, + { "kind" : "IdRef", "name" : "'Origin'" }, + { "kind" : "IdRef", "name" : "'TMin'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'TMax'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectExecuteShaderNV", + "class" : "Reserved", + "opcode" : 5264, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetCurrentTimeNV", + "class" : "Reserved", + "opcode" : 5265, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetAttributesNV", + "class" : "Reserved", + "opcode" : 5266, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "name" : "'Hit Object Attribute'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetHitKindNV", + "class" : "Reserved", + "opcode" : 5267, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetPrimitiveIndexNV", + "class" : "Reserved", + "opcode" : 5268, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetGeometryIndexNV", + "class" : "Reserved", + "opcode" : 5269, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetInstanceIdNV", + "class" : "Reserved", + "opcode" : 5270, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetInstanceCustomIndexNV", + "class" : "Reserved", + "opcode" : 5271, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetWorldRayDirectionNV", + "class" : "Reserved", + "opcode" : 5272, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetWorldRayOriginNV", + "class" : "Reserved", + "opcode" : 5273, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetRayTMaxNV", + "class" : "Reserved", + "opcode" : 5274, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectGetRayTMinNV", + "class" : "Reserved", + "opcode" : 5275, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectIsEmptyNV", + "class" : "Reserved", + "opcode" : 5276, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectIsHitNV", + "class" : "Reserved", + "opcode" : 5277, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpHitObjectIsMissNV", + "class" : "Reserved", + "opcode" : 5278, + "operands" : [ + { "kind" : "IdResultType"}, + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Hit Object'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpReorderThreadWithHitObjectNV", + "class" : "Reserved", + "opcode" : 5279, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hit Object'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Hint'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Bits'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpReorderThreadWithHintNV", + "class" : "Reserved", + "opcode" : 5280, + "operands" : [ + { "kind" : "IdRef", "name" : "'Hint'" }, + { "kind" : "IdRef", "name" : "'Bits'" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpTypeHitObjectNV", + "class" : "Type-Declaration", + "opcode" : 5281, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "opname" : "OpImageSampleFootprintNV", + "class" : "Image", + "opcode" : 5283, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Sampled Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Granularity'" }, + { "kind" : "IdRef", "name" : "'Coarse'" }, + { "kind" : "ImageOperands", "quantifier" : "?" } + ], + "capabilities" : [ "ImageFootprintNV" ], + "extensions" : [ "SPV_NV_shader_image_footprint" ], + "version" : "None" + }, + { + "opname" : "OpEmitMeshTasksEXT", + "class" : "Reserved", + "opcode" : 5294, + "operands" : [ + { "kind" : "IdRef", "name" : "'Group Count X'" }, + { "kind" : "IdRef", "name" : "'Group Count Y'" }, + { "kind" : "IdRef", "name" : "'Group Count Z'" }, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Payload'" } + ], + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + }, + { + "opname" : "OpSetMeshOutputsEXT", + "class" : "Reserved", + "opcode" : 5295, + "operands" : [ + { "kind" : "IdRef", "name" : "'Vertex Count'" }, + { "kind" : "IdRef", "name" : "'Primitive Count'" } + ], + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + }, + { + "opname" : "OpGroupNonUniformPartitionNV", + "class" : "Non-Uniform", + "opcode" : 5296, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "GroupNonUniformPartitionedNV" ], + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + }, + { + "opname" : "OpWritePackedPrimitiveIndices4x8NV", + "class" : "Reserved", + "opcode" : 5299, + "operands" : [ + { "kind" : "IdRef", "name" : "'Index Offset'" }, + { "kind" : "IdRef", "name" : "'Packed Indices'" } + ], + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "opname" : "OpFetchMicroTriangleVertexPositionNV", + "class" : "Reserved", + "opcode" : 5300, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Instance Id'" }, + { "kind" : "IdRef", "name" : "'Geometry Index'" }, + { "kind" : "IdRef", "name" : "'Primitive Index'" }, + { "kind" : "IdRef", "name" : "'Barycentric'" } + ], + "capabilities" : [ "DisplacementMicromapNV" ], + "version" : "None" + }, + { + "opname" : "OpFetchMicroTriangleVertexBarycentricNV", + "class" : "Reserved", + "opcode" : 5301, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Instance Id'" }, + { "kind" : "IdRef", "name" : "'Geometry Index'" }, + { "kind" : "IdRef", "name" : "'Primitive Index'" }, + { "kind" : "IdRef", "name" : "'Barycentric'" } + ], + "capabilities" : [ "DisplacementMicromapNV" ], + "version" : "None" + }, + { + "opname" : "OpReportIntersectionNV", + "class" : "Reserved", + "opcode" : 5334, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Hit'" }, + { "kind" : "IdRef", "name" : "'HitKind'" } + ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpReportIntersectionKHR", + "class" : "Reserved", + "opcode" : 5334, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Hit'" }, + { "kind" : "IdRef", "name" : "'HitKind'" } + ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpIgnoreIntersectionNV", + "class" : "Reserved", + "opcode" : 5335, + "capabilities" : [ "RayTracingNV" ], + "extensions" : [ "SPV_NV_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpTerminateRayNV", + "class" : "Reserved", + "opcode" : 5336, + "capabilities" : [ "RayTracingNV" ], + "extensions" : [ "SPV_NV_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpTraceNV", + "class" : "Reserved", + "opcode" : 5337, + "operands" : [ + + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Ray Flags'" }, + { "kind" : "IdRef", "name" : "'Cull Mask'" }, + { "kind" : "IdRef", "name" : "'SBT Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Stride'" }, + { "kind" : "IdRef", "name" : "'Miss Index'" }, + { "kind" : "IdRef", "name" : "'Ray Origin'" }, + { "kind" : "IdRef", "name" : "'Ray Tmin'" }, + { "kind" : "IdRef", "name" : "'Ray Direction'" }, + { "kind" : "IdRef", "name" : "'Ray Tmax'" }, + { "kind" : "IdRef", "name" : "'PayloadId'" } + ], + "capabilities" : [ "RayTracingNV" ], + "extensions" : [ "SPV_NV_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpTraceMotionNV", + "class" : "Reserved", + "opcode" : 5338, + "operands" : [ + + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Ray Flags'" }, + { "kind" : "IdRef", "name" : "'Cull Mask'" }, + { "kind" : "IdRef", "name" : "'SBT Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Stride'" }, + { "kind" : "IdRef", "name" : "'Miss Index'" }, + { "kind" : "IdRef", "name" : "'Ray Origin'" }, + { "kind" : "IdRef", "name" : "'Ray Tmin'" }, + { "kind" : "IdRef", "name" : "'Ray Direction'" }, + { "kind" : "IdRef", "name" : "'Ray Tmax'" }, + { "kind" : "IdRef", "name" : "'Time'" }, + { "kind" : "IdRef", "name" : "'PayloadId'" } + ], + "capabilities" : [ "RayTracingMotionBlurNV" ], + "extensions" : [ "SPV_NV_ray_tracing_motion_blur" ], + "version" : "None" + }, + { + "opname" : "OpTraceRayMotionNV", + "class" : "Reserved", + "opcode" : 5339, + "operands" : [ + + { "kind" : "IdRef", "name" : "'Accel'" }, + { "kind" : "IdRef", "name" : "'Ray Flags'" }, + { "kind" : "IdRef", "name" : "'Cull Mask'" }, + { "kind" : "IdRef", "name" : "'SBT Offset'" }, + { "kind" : "IdRef", "name" : "'SBT Stride'" }, + { "kind" : "IdRef", "name" : "'Miss Index'" }, + { "kind" : "IdRef", "name" : "'Ray Origin'" }, + { "kind" : "IdRef", "name" : "'Ray Tmin'" }, + { "kind" : "IdRef", "name" : "'Ray Direction'" }, + { "kind" : "IdRef", "name" : "'Ray Tmax'" }, + { "kind" : "IdRef", "name" : "'Time'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "RayTracingMotionBlurNV" ], + "extensions" : [ "SPV_NV_ray_tracing_motion_blur" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionTriangleVertexPositionsKHR", + "class" : "Reserved", + "opcode" : 5340, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryPositionFetchKHR" ], + "version" : "None" + }, + { + "opname" : "OpTypeAccelerationStructureNV", + "class" : "Type-Declaration", + "opcode" : 5341, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR", "RayQueryKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing", "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpTypeAccelerationStructureKHR", + "class" : "Type-Declaration", + "opcode" : 5341, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR", "RayQueryKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing", "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpExecuteCallableNV", + "class" : "Reserved", + "opcode" : 5344, + "operands" : [ + + { "kind" : "IdRef", "name" : "'SBT Index'" }, + { "kind" : "IdRef", "name" : "'Callable DataId'" } + ], + "capabilities" : [ "RayTracingNV" ], + "extensions" : [ "SPV_NV_ray_tracing" ], + "version" : "None" + }, + { + "opname" : "OpTypeCooperativeMatrixNV", + "class" : "Type-Declaration", + "opcode" : 5358, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Component Type'" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdRef", "name" : "'Rows'" }, + { "kind" : "IdRef", "name" : "'Columns'" } + ], + "capabilities" : [ "CooperativeMatrixNV" ], + "extensions" : [ "SPV_NV_cooperative_matrix" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLoadNV", + "class" : "Reserved", + "opcode" : 5359, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Stride'" }, + { "kind" : "IdRef", "name" : "'Column Major'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixNV" ], + "extensions" : [ "SPV_NV_cooperative_matrix" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixStoreNV", + "class" : "Reserved", + "opcode" : 5360, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'Stride'" }, + { "kind" : "IdRef", "name" : "'Column Major'" }, + { "kind" : "MemoryAccess", "quantifier" : "?" } + ], + "capabilities" : [ "CooperativeMatrixNV" ], + "extensions" : [ "SPV_NV_cooperative_matrix" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixMulAddNV", + "class" : "Reserved", + "opcode" : 5361, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "IdRef", "name" : "'C'" } + ], + "capabilities" : [ "CooperativeMatrixNV" ], + "extensions" : [ "SPV_NV_cooperative_matrix" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLengthNV", + "class" : "Reserved", + "opcode" : 5362, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Type'" } + ], + "capabilities" : [ "CooperativeMatrixNV" ], + "extensions" : [ "SPV_NV_cooperative_matrix" ], + "version" : "None" + }, + { + "opname" : "OpBeginInvocationInterlockEXT", + "class" : "Reserved", + "opcode" : 5364, + "capabilities" : [ "FragmentShaderSampleInterlockEXT", "FragmentShaderPixelInterlockEXT", "FragmentShaderShadingRateInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "opname" : "OpEndInvocationInterlockEXT", + "class" : "Reserved", + "opcode" : 5365, + "capabilities" : [ "FragmentShaderSampleInterlockEXT", "FragmentShaderPixelInterlockEXT", "FragmentShaderShadingRateInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "opname" : "OpDemoteToHelperInvocation", + "class" : "Control-Flow", + "opcode" : 5380, + "capabilities" : [ "DemoteToHelperInvocation" ], + "version" : "1.6" + }, + { + "opname" : "OpDemoteToHelperInvocationEXT", + "class" : "Control-Flow", + "opcode" : 5380, + "capabilities" : [ "DemoteToHelperInvocationEXT" ], + "version" : "1.6" + }, + { + "opname" : "OpIsHelperInvocationEXT", + "class" : "Reserved", + "opcode" : 5381, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "DemoteToHelperInvocationEXT" ], + "extensions" : [ "SPV_EXT_demote_to_helper_invocation" ], + "version" : "None" + }, + { + "opname" : "OpConvertUToImageNV", + "class" : "Reserved", + "opcode" : 5391, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpConvertUToSamplerNV", + "class" : "Reserved", + "opcode" : 5392, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpConvertImageToUNV", + "class" : "Reserved", + "opcode" : 5393, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpConvertSamplerToUNV", + "class" : "Reserved", + "opcode" : 5394, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpConvertUToSampledImageNV", + "class" : "Reserved", + "opcode" : 5395, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpConvertSampledImageToUNV", + "class" : "Reserved", + "opcode" : 5396, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpSamplerImageAddressingModeNV", + "class" : "Reserved", + "opcode" : 5397, + "operands" : [ + { "kind" : "LiteralInteger", "name" : "'Bit Width'" } + ], + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleINTEL", + "class" : "Group", + "opcode" : 5571, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Data'" }, + { "kind" : "IdRef", "name" : "'InvocationId'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleDownINTEL", + "class" : "Group", + "opcode" : 5572, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Current'" }, + { "kind" : "IdRef", "name" : "'Next'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleUpINTEL", + "class" : "Group", + "opcode" : 5573, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Previous'" }, + { "kind" : "IdRef", "name" : "'Current'" }, + { "kind" : "IdRef", "name" : "'Delta'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupShuffleXorINTEL", + "class" : "Group", + "opcode" : 5574, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Data'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "SubgroupShuffleINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupBlockReadINTEL", + "class" : "Group", + "opcode" : 5575, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Ptr'" } + ], + "capabilities" : [ "SubgroupBufferBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupBlockWriteINTEL", + "class" : "Group", + "opcode" : 5576, + "operands" : [ + { "kind" : "IdRef", "name" : "'Ptr'" }, + { "kind" : "IdRef", "name" : "'Data'" } + ], + "capabilities" : [ "SubgroupBufferBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupImageBlockReadINTEL", + "class" : "Group", + "opcode" : 5577, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" } + ], + "capabilities" : [ "SubgroupImageBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupImageBlockWriteINTEL", + "class" : "Group", + "opcode" : 5578, + "operands" : [ + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Data'" } + ], + "capabilities" : [ "SubgroupImageBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupImageMediaBlockReadINTEL", + "class" : "Group", + "opcode" : 5580, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Width'" }, + { "kind" : "IdRef", "name" : "'Height'" } + ], + "capabilities" : [ "SubgroupImageMediaBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupImageMediaBlockWriteINTEL", + "class" : "Group", + "opcode" : 5581, + "operands" : [ + { "kind" : "IdRef", "name" : "'Image'" }, + { "kind" : "IdRef", "name" : "'Coordinate'" }, + { "kind" : "IdRef", "name" : "'Width'" }, + { "kind" : "IdRef", "name" : "'Height'" }, + { "kind" : "IdRef", "name" : "'Data'" } + ], + "capabilities" : [ "SubgroupImageMediaBlockIOINTEL" ], + "version" : "None" + }, + { + "opname" : "OpUCountLeadingZerosINTEL", + "class" : "Reserved", + "opcode" : 5585, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpUCountTrailingZerosINTEL", + "class" : "Reserved", + "opcode" : 5586, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpAbsISubINTEL", + "class" : "Reserved", + "opcode" : 5587, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpAbsUSubINTEL", + "class" : "Reserved", + "opcode" : 5588, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpIAddSatINTEL", + "class" : "Reserved", + "opcode" : 5589, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpUAddSatINTEL", + "class" : "Reserved", + "opcode" : 5590, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpIAverageINTEL", + "class" : "Reserved", + "opcode" : 5591, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpUAverageINTEL", + "class" : "Reserved", + "opcode" : 5592, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpIAverageRoundedINTEL", + "class" : "Reserved", + "opcode" : 5593, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpUAverageRoundedINTEL", + "class" : "Reserved", + "opcode" : 5594, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpISubSatINTEL", + "class" : "Reserved", + "opcode" : 5595, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpUSubSatINTEL", + "class" : "Reserved", + "opcode" : 5596, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpIMul32x16INTEL", + "class" : "Reserved", + "opcode" : 5597, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpUMul32x16INTEL", + "class" : "Reserved", + "opcode" : 5598, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Operand 1'" }, + { "kind" : "IdRef", "name" : "'Operand 2'" } + ], + "capabilities" : [ "IntegerFunctions2INTEL" ], + "version" : "None" + }, + { + "opname" : "OpConstantFunctionPointerINTEL", + "class" : "@exclude", + "opcode" : 5600, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Function'" } + ], + "capabilities" : [ "FunctionPointersINTEL" ], + "extensions" : [ "SPV_INTEL_function_pointers" ], + "version" : "None" + }, + { + "opname" : "OpFunctionPointerCallINTEL", + "class" : "@exclude", + "opcode" : 5601, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1'" } + ], + "capabilities" : [ "FunctionPointersINTEL" ], + "extensions" : [ "SPV_INTEL_function_pointers" ], + "version" : "None" + }, + { + "opname" : "OpAsmTargetINTEL", + "class" : "@exclude", + "opcode" : 5609, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "LiteralString", "name" : "'Asm target'" } + ], + "capabilities" : [ "AsmINTEL" ], + "version" : "None" + }, + { + "opname" : "OpAsmINTEL", + "class" : "@exclude", + "opcode" : 5610, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Asm type'" }, + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "LiteralString", "name" : "'Asm instructions'" }, + { "kind" : "LiteralString", "name" : "'Constraints'" } + ], + "capabilities" : [ "AsmINTEL" ], + "version" : "None" + }, + { + "opname" : "OpAsmCallINTEL", + "class" : "@exclude", + "opcode" : 5611, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Asm'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Argument 0'" } + ], + "capabilities" : [ "AsmINTEL" ], + "version" : "None" + }, + { + "opname" : "OpAtomicFMinEXT", + "class" : "Atomic", + "opcode" : 5614, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "AtomicFloat16MinMaxEXT", "AtomicFloat32MinMaxEXT", "AtomicFloat64MinMaxEXT" ], + "version" : "None" + }, + { + "opname" : "OpAtomicFMaxEXT", + "class" : "Atomic", + "opcode" : 5615, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "AtomicFloat16MinMaxEXT", "AtomicFloat32MinMaxEXT", "AtomicFloat64MinMaxEXT" ], + "version" : "None" + }, + { + "opname" : "OpAssumeTrueKHR", + "class" : "Miscellaneous", + "opcode" : 5630, + "operands" : [ + { "kind" : "IdRef", "name" : "'Condition'" } + ], + "capabilities" : [ "ExpectAssumeKHR" ], + "extensions" : [ "SPV_KHR_expect_assume" ], + "version" : "None" + }, + { + "opname" : "OpExpectKHR", + "class" : "Miscellaneous", + "opcode" : 5631, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Value'" }, + { "kind" : "IdRef", "name" : "'ExpectedValue'" } + ], + "capabilities" : [ "ExpectAssumeKHR" ], + "extensions" : [ "SPV_KHR_expect_assume" ], + "version" : "None" + }, + { + "opname" : "OpDecorateString", + "class" : "Annotation", + "opcode" : 5632, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "1.4" + }, + { + "opname" : "OpDecorateStringGOOGLE", + "class" : "Annotation", + "opcode" : 5632, + "operands" : [ + { "kind" : "IdRef", "name" : "'Target'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "1.4" + }, + { + "opname" : "OpMemberDecorateString", + "class" : "Annotation", + "opcode" : 5633, + "operands" : [ + { "kind" : "IdRef", "name" : "'Struct Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "1.4" + }, + { + "opname" : "OpMemberDecorateStringGOOGLE", + "class" : "Annotation", + "opcode" : 5633, + "operands" : [ + { "kind" : "IdRef", "name" : "'Struct Type'" }, + { "kind" : "LiteralInteger", "name" : "'Member'" }, + { "kind" : "Decoration" } + ], + "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "1.4" + }, + { + "opname" : "OpVmeImageINTEL", + "class" : "@exclude", + "opcode" : 5699, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image Type'" }, + { "kind" : "IdRef", "name" : "'Sampler'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeVmeImageINTEL", + "class" : "@exclude", + "opcode" : 5700, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image Type'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcImePayloadINTEL", + "class" : "@exclude", + "opcode" : 5701, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcRefPayloadINTEL", + "class" : "@exclude", + "opcode" : 5702, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcSicPayloadINTEL", + "class" : "@exclude", + "opcode" : 5703, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcMcePayloadINTEL", + "class" : "@exclude", + "opcode" : 5704, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcMceResultINTEL", + "class" : "@exclude", + "opcode" : 5705, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcImeResultINTEL", + "class" : "@exclude", + "opcode" : 5706, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcImeResultSingleReferenceStreamoutINTEL", + "class" : "@exclude", + "opcode" : 5707, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcImeResultDualReferenceStreamoutINTEL", + "class" : "@exclude", + "opcode" : 5708, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcImeSingleReferenceStreaminINTEL", + "class" : "@exclude", + "opcode" : 5709, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcImeDualReferenceStreaminINTEL", + "class" : "@exclude", + "opcode" : 5710, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcRefResultINTEL", + "class" : "@exclude", + "opcode" : 5711, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeAvcSicResultINTEL", + "class" : "@exclude", + "opcode" : 5712, + "operands" : [ + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5713, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Slice Type'" }, + { "kind" : "IdRef", "name" : "'Qp'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5714, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Reference Base Penalty'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5715, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Slice Type'" }, + { "kind" : "IdRef", "name" : "'Qp'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetInterShapePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5716, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packed Shape Penalty'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", + "class" : "@exclude", + "opcode" : 5717, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Slice Type'" }, + { "kind" : "IdRef", "name" : "'Qp'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL", + "class" : "@exclude", + "opcode" : 5718, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Direction Cost'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5719, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Slice Type'" }, + { "kind" : "IdRef", "name" : "'Qp'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", + "class" : "@exclude", + "opcode" : 5720, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Slice Type'" }, + { "kind" : "IdRef", "name" : "'Qp'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL", + "class" : "@exclude", + "opcode" : 5721, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL", + "class" : "@exclude", + "opcode" : 5722, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL", + "class" : "@exclude", + "opcode" : 5723, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL", + "class" : "@exclude", + "opcode" : 5724, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packed Cost Center Delta'" }, + { "kind" : "IdRef", "name" : "'Packed Cost Table'" }, + { "kind" : "IdRef", "name" : "'Cost Precision'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5725, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Slice Type'" }, + { "kind" : "IdRef", "name" : "'Qp'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL", + "class" : "@exclude", + "opcode" : 5726, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5727, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationChromaINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetAcOnlyHaarINTEL", + "class" : "@exclude", + "opcode" : 5728, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", + "class" : "@exclude", + "opcode" : 5729, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Source Field Polarity'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", + "class" : "@exclude", + "opcode" : 5730, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Reference Field Polarity'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", + "class" : "@exclude", + "opcode" : 5731, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Forward Reference Field Polarity'" }, + { "kind" : "IdRef", "name" : "'Backward Reference Field Polarity'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceConvertToImePayloadINTEL", + "class" : "@exclude", + "opcode" : 5732, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceConvertToImeResultINTEL", + "class" : "@exclude", + "opcode" : 5733, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceConvertToRefPayloadINTEL", + "class" : "@exclude", + "opcode" : 5734, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceConvertToRefResultINTEL", + "class" : "@exclude", + "opcode" : 5735, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceConvertToSicPayloadINTEL", + "class" : "@exclude", + "opcode" : 5736, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceConvertToSicResultINTEL", + "class" : "@exclude", + "opcode" : 5737, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetMotionVectorsINTEL", + "class" : "@exclude", + "opcode" : 5738, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterDistortionsINTEL", + "class" : "@exclude", + "opcode" : 5739, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetBestInterDistortionsINTEL", + "class" : "@exclude", + "opcode" : 5740, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterMajorShapeINTEL", + "class" : "@exclude", + "opcode" : 5741, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterMinorShapeINTEL", + "class" : "@exclude", + "opcode" : 5742, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterDirectionsINTEL", + "class" : "@exclude", + "opcode" : 5743, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterMotionVectorCountINTEL", + "class" : "@exclude", + "opcode" : 5744, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterReferenceIdsINTEL", + "class" : "@exclude", + "opcode" : 5745, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", + "class" : "@exclude", + "opcode" : 5746, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packed Reference Ids'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Parameter Field Polarities'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeInitializeINTEL", + "class" : "@exclude", + "opcode" : 5747, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Coord'" }, + { "kind" : "IdRef", "name" : "'Partition Mask'" }, + { "kind" : "IdRef", "name" : "'SAD Adjustment'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeSetSingleReferenceINTEL", + "class" : "@exclude", + "opcode" : 5748, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Ref Offset'" }, + { "kind" : "IdRef", "name" : "'Search Window Config'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeSetDualReferenceINTEL", + "class" : "@exclude", + "opcode" : 5749, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Offset'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Offset'" }, + { "kind" : "IdRef", "name" : "'id> Search Window Config'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeRefWindowSizeINTEL", + "class" : "@exclude", + "opcode" : 5750, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Search Window Config'" }, + { "kind" : "IdRef", "name" : "'Dual Ref'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeAdjustRefOffsetINTEL", + "class" : "@exclude", + "opcode" : 5751, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Ref Offset'" }, + { "kind" : "IdRef", "name" : "'Src Coord'" }, + { "kind" : "IdRef", "name" : "'Ref Window Size'" }, + { "kind" : "IdRef", "name" : "'Image Size'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeConvertToMcePayloadINTEL", + "class" : "@exclude", + "opcode" : 5752, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL", + "class" : "@exclude", + "opcode" : 5753, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Max Motion Vector Count'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL", + "class" : "@exclude", + "opcode" : 5754, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", + "class" : "@exclude", + "opcode" : 5755, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Threshold'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeSetWeightedSadINTEL", + "class" : "@exclude", + "opcode" : 5756, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packed Sad Weights'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL", + "class" : "@exclude", + "opcode" : 5757, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL", + "class" : "@exclude", + "opcode" : 5758, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", + "class" : "@exclude", + "opcode" : 5759, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Streamin Components'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", + "class" : "@exclude", + "opcode" : 5760, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Streamin Components'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", + "class" : "@exclude", + "opcode" : 5761, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", + "class" : "@exclude", + "opcode" : 5762, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", + "class" : "@exclude", + "opcode" : 5763, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Streamin Components'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", + "class" : "@exclude", + "opcode" : 5764, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Streamin Components'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeConvertToMceResultINTEL", + "class" : "@exclude", + "opcode" : 5765, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL", + "class" : "@exclude", + "opcode" : 5766, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetDualReferenceStreaminINTEL", + "class" : "@exclude", + "opcode" : 5767, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL", + "class" : "@exclude", + "opcode" : 5768, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL", + "class" : "@exclude", + "opcode" : 5769, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", + "class" : "@exclude", + "opcode" : 5770, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Major Shape'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", + "class" : "@exclude", + "opcode" : 5771, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Major Shape'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", + "class" : "@exclude", + "opcode" : 5772, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Major Shape'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", + "class" : "@exclude", + "opcode" : 5773, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Major Shape'" }, + { "kind" : "IdRef", "name" : "'Direction'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", + "class" : "@exclude", + "opcode" : 5774, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Major Shape'" }, + { "kind" : "IdRef", "name" : "'Direction'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", + "class" : "@exclude", + "opcode" : 5775, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" }, + { "kind" : "IdRef", "name" : "'Major Shape'" }, + { "kind" : "IdRef", "name" : "'Direction'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetBorderReachedINTEL", + "class" : "@exclude", + "opcode" : 5776, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Image Select'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL", + "class" : "@exclude", + "opcode" : 5777, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", + "class" : "@exclude", + "opcode" : 5778, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", + "class" : "@exclude", + "opcode" : 5779, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", + "class" : "@exclude", + "opcode" : 5780, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcFmeInitializeINTEL", + "class" : "@exclude", + "opcode" : 5781, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Coord'" }, + { "kind" : "IdRef", "name" : "'Motion Vectors'" }, + { "kind" : "IdRef", "name" : "'Major Shapes'" }, + { "kind" : "IdRef", "name" : "'Minor Shapes'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'Pixel Resolution'" }, + { "kind" : "IdRef", "name" : "'Sad Adjustment'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcBmeInitializeINTEL", + "class" : "@exclude", + "opcode" : 5782, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Coord'" }, + { "kind" : "IdRef", "name" : "'Motion Vectors'" }, + { "kind" : "IdRef", "name" : "'Major Shapes'" }, + { "kind" : "IdRef", "name" : "'Minor Shapes'" }, + { "kind" : "IdRef", "name" : "'Direction'" }, + { "kind" : "IdRef", "name" : "'Pixel Resolution'" }, + { "kind" : "IdRef", "name" : "'Bidirectional Weight'" }, + { "kind" : "IdRef", "name" : "'Sad Adjustment'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefConvertToMcePayloadINTEL", + "class" : "@exclude", + "opcode" : 5783, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL", + "class" : "@exclude", + "opcode" : 5784, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefSetBilinearFilterEnableINTEL", + "class" : "@exclude", + "opcode" : 5785, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL", + "class" : "@exclude", + "opcode" : 5786, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL", + "class" : "@exclude", + "opcode" : 5787, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL", + "class" : "@exclude", + "opcode" : 5788, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Ids'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", + "class" : "@exclude", + "opcode" : 5789, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Ids'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Field Polarities'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcRefConvertToMceResultINTEL", + "class" : "@exclude", + "opcode" : 5790, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicInitializeINTEL", + "class" : "@exclude", + "opcode" : 5791, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Coord'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicConfigureSkcINTEL", + "class" : "@exclude", + "opcode" : 5792, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Skip Block Partition Type'" }, + { "kind" : "IdRef", "name" : "'Skip Motion Vector Mask'" }, + { "kind" : "IdRef", "name" : "'Motion Vectors'" }, + { "kind" : "IdRef", "name" : "'Bidirectional Weight'" }, + { "kind" : "IdRef", "name" : "'Sad Adjustment'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicConfigureIpeLumaINTEL", + "class" : "@exclude", + "opcode" : 5793, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Luma Intra Partition Mask'" }, + { "kind" : "IdRef", "name" : "'Intra Neighbour Availabilty'" }, + { "kind" : "IdRef", "name" : "'Left Edge Luma Pixels'" }, + { "kind" : "IdRef", "name" : "'Upper Left Corner Luma Pixel'" }, + { "kind" : "IdRef", "name" : "'Upper Edge Luma Pixels'" }, + { "kind" : "IdRef", "name" : "'Upper Right Edge Luma Pixels'" }, + { "kind" : "IdRef", "name" : "'Sad Adjustment'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL", + "class" : "@exclude", + "opcode" : 5794, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Luma Intra Partition Mask'" }, + { "kind" : "IdRef", "name" : "'Intra Neighbour Availabilty'" }, + { "kind" : "IdRef", "name" : "'Left Edge Luma Pixels'" }, + { "kind" : "IdRef", "name" : "'Upper Left Corner Luma Pixel'" }, + { "kind" : "IdRef", "name" : "'Upper Edge Luma Pixels'" }, + { "kind" : "IdRef", "name" : "'Upper Right Edge Luma Pixels'" }, + { "kind" : "IdRef", "name" : "'Left Edge Chroma Pixels'" }, + { "kind" : "IdRef", "name" : "'Upper Left Corner Chroma Pixel'" }, + { "kind" : "IdRef", "name" : "'Upper Edge Chroma Pixels'" }, + { "kind" : "IdRef", "name" : "'Sad Adjustment'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationChromaINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetMotionVectorMaskINTEL", + "class" : "@exclude", + "opcode" : 5795, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Skip Block Partition Type'" }, + { "kind" : "IdRef", "name" : "'Direction'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicConvertToMcePayloadINTEL", + "class" : "@exclude", + "opcode" : 5796, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL", + "class" : "@exclude", + "opcode" : 5797, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packed Shape Penalty'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", + "class" : "@exclude", + "opcode" : 5798, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Luma Mode Penalty'" }, + { "kind" : "IdRef", "name" : "'Luma Packed Neighbor Modes'" }, + { "kind" : "IdRef", "name" : "'Luma Packed Non Dc Penalty'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", + "class" : "@exclude", + "opcode" : 5799, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Chroma Mode Base Penalty'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationChromaINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicSetBilinearFilterEnableINTEL", + "class" : "@exclude", + "opcode" : 5800, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL", + "class" : "@exclude", + "opcode" : 5801, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packed Sad Coefficients'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL", + "class" : "@exclude", + "opcode" : 5802, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Block Based Skip Type'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicEvaluateIpeINTEL", + "class" : "@exclude", + "opcode" : 5803, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL", + "class" : "@exclude", + "opcode" : 5804, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL", + "class" : "@exclude", + "opcode" : 5805, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Fwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Bwd Ref Image'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL", + "class" : "@exclude", + "opcode" : 5806, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Ids'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", + "class" : "@exclude", + "opcode" : 5807, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Src Image'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Ids'" }, + { "kind" : "IdRef", "name" : "'Packed Reference Field Polarities'" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicConvertToMceResultINTEL", + "class" : "@exclude", + "opcode" : 5808, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetIpeLumaShapeINTEL", + "class" : "@exclude", + "opcode" : 5809, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL", + "class" : "@exclude", + "opcode" : 5810, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL", + "class" : "@exclude", + "opcode" : 5811, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL", + "class" : "@exclude", + "opcode" : 5812, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetIpeChromaModeINTEL", + "class" : "@exclude", + "opcode" : 5813, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationChromaINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", + "class" : "@exclude", + "opcode" : 5814, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", + "class" : "@exclude", + "opcode" : 5815, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL", "SubgroupAvcMotionEstimationIntraINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSubgroupAvcSicGetInterRawSadsINTEL", + "class" : "@exclude", + "opcode" : 5816, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Payload'" } + ], + "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ], + "version" : "None" + }, + { + "opname" : "OpVariableLengthArrayINTEL", + "class" : "@exclude", + "opcode" : 5818, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Lenght'" } + ], + "capabilities" : [ "VariableLengthArrayINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSaveMemoryINTEL", + "class" : "@exclude", + "opcode" : 5819, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "VariableLengthArrayINTEL" ], + "version" : "None" + }, + { + "opname" : "OpRestoreMemoryINTEL", + "class" : "@exclude", + "opcode" : 5820, + "operands" : [ + { "kind" : "IdRef", "name" : "'Ptr'" } + ], + "capabilities" : [ "VariableLengthArrayINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatSinCosPiINTEL", + "class" : "@exclude", + "opcode" : 5840, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'FromSign'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatCastINTEL", + "class" : "@exclude", + "opcode" : 5841, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatCastFromIntINTEL", + "class" : "@exclude", + "opcode" : 5842, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'FromSign'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatCastToIntINTEL", + "class" : "@exclude", + "opcode" : 5843, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatAddINTEL", + "class" : "@exclude", + "opcode" : 5846, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatSubINTEL", + "class" : "@exclude", + "opcode" : 5847, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatMulINTEL", + "class" : "@exclude", + "opcode" : 5848, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatDivINTEL", + "class" : "@exclude", + "opcode" : 5849, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatGTINTEL", + "class" : "@exclude", + "opcode" : 5850, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatGEINTEL", + "class" : "@exclude", + "opcode" : 5851, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatLTINTEL", + "class" : "@exclude", + "opcode" : 5852, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatLEINTEL", + "class" : "@exclude", + "opcode" : 5853, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatEQINTEL", + "class" : "@exclude", + "opcode" : 5854, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatRecipINTEL", + "class" : "@exclude", + "opcode" : 5855, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatRSqrtINTEL", + "class" : "@exclude", + "opcode" : 5856, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatCbrtINTEL", + "class" : "@exclude", + "opcode" : 5857, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatHypotINTEL", + "class" : "@exclude", + "opcode" : 5858, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatSqrtINTEL", + "class" : "@exclude", + "opcode" : 5859, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatLogINTEL", + "class" : "@exclude", + "opcode" : 5860, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatLog2INTEL", + "class" : "@exclude", + "opcode" : 5861, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatLog10INTEL", + "class" : "@exclude", + "opcode" : 5862, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatLog1pINTEL", + "class" : "@exclude", + "opcode" : 5863, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatExpINTEL", + "class" : "@exclude", + "opcode" : 5864, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatExp2INTEL", + "class" : "@exclude", + "opcode" : 5865, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatExp10INTEL", + "class" : "@exclude", + "opcode" : 5866, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatExpm1INTEL", + "class" : "@exclude", + "opcode" : 5867, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatSinINTEL", + "class" : "@exclude", + "opcode" : 5868, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatCosINTEL", + "class" : "@exclude", + "opcode" : 5869, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatSinCosINTEL", + "class" : "@exclude", + "opcode" : 5870, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatSinPiINTEL", + "class" : "@exclude", + "opcode" : 5871, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatCosPiINTEL", + "class" : "@exclude", + "opcode" : 5872, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatASinINTEL", + "class" : "@exclude", + "opcode" : 5873, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatASinPiINTEL", + "class" : "@exclude", + "opcode" : 5874, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatACosINTEL", + "class" : "@exclude", + "opcode" : 5875, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatACosPiINTEL", + "class" : "@exclude", + "opcode" : 5876, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatATanINTEL", + "class" : "@exclude", + "opcode" : 5877, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatATanPiINTEL", + "class" : "@exclude", + "opcode" : 5878, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatATan2INTEL", + "class" : "@exclude", + "opcode" : 5879, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatPowINTEL", + "class" : "@exclude", + "opcode" : 5880, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatPowRINTEL", + "class" : "@exclude", + "opcode" : 5881, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'M2'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpArbitraryFloatPowNINTEL", + "class" : "@exclude", + "opcode" : 5882, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'A'" }, + { "kind" : "LiteralInteger", "name" : "'M1'" }, + { "kind" : "IdRef", "name" : "'B'" }, + { "kind" : "LiteralInteger", "name" : "'Mout'" }, + { "kind" : "LiteralInteger", "name" : "'EnableSubnormals'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingMode'" }, + { "kind" : "LiteralInteger", "name" : "'RoundingAccuracy'" } + ], + "capabilities" : [ "ArbitraryPrecisionFloatingPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpLoopControlINTEL", + "class" : "Reserved", + "opcode" : 5887, + "operands" : [ + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Loop Control Parameters'" } + ], + "capabilities" : [ "UnstructuredLoopControlsINTEL" ], + "extensions" : [ "SPV_INTEL_unstructured_loop_controls" ], + "version" : "None" + }, + { + "opname" : "OpAliasDomainDeclINTEL", + "class" : "@exclude", + "opcode" : 5911, + "operands" : [ + { "kind" : "IdResult"}, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Name'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "opname" : "OpAliasScopeDeclINTEL", + "class" : "@exclude", + "opcode" : 5912, + "operands" : [ + { "kind" : "IdResult"}, + { "kind" : "IdRef", "name" : "'Alias Domain'"}, + { "kind" : "IdRef", "quantifier" : "?", "name" : "'Name'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "opname" : "OpAliasScopeListDeclINTEL", + "class" : "@exclude", + "opcode" : 5913, + "operands" : [ + { "kind" : "IdResult"}, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'AliasScope1, AliasScope2, ...'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "opname" : "OpFixedSqrtINTEL", + "class" : "@exclude", + "opcode" : 5923, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedRecipINTEL", + "class" : "@exclude", + "opcode" : 5924, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedRsqrtINTEL", + "class" : "@exclude", + "opcode" : 5925, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedSinINTEL", + "class" : "@exclude", + "opcode" : 5926, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedCosINTEL", + "class" : "@exclude", + "opcode" : 5927, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedSinCosINTEL", + "class" : "@exclude", + "opcode" : 5928, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedSinPiINTEL", + "class" : "@exclude", + "opcode" : 5929, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedCosPiINTEL", + "class" : "@exclude", + "opcode" : 5930, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedSinCosPiINTEL", + "class" : "@exclude", + "opcode" : 5931, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedLogINTEL", + "class" : "@exclude", + "opcode" : 5932, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpFixedExpINTEL", + "class" : "@exclude", + "opcode" : 5933, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Input Type'" }, + { "kind" : "IdRef", "name" : "'Input'" }, + { "kind" : "LiteralInteger", "name" : "'S'" }, + { "kind" : "LiteralInteger", "name" : "'I'" }, + { "kind" : "LiteralInteger", "name" : "'rI'" }, + { "kind" : "LiteralInteger", "name" : "'Q'" }, + { "kind" : "LiteralInteger", "name" : "'O'" } + ], + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL" ], + "version" : "None" + }, + { + "opname" : "OpPtrCastToCrossWorkgroupINTEL", + "class" : "@exclude", + "opcode" : 5934, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "USMStorageClassesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpCrossWorkgroupCastToPtrINTEL", + "class" : "@exclude", + "opcode" : 5938, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" } + ], + "capabilities" : [ "USMStorageClassesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpReadPipeBlockingINTEL", + "class" : "Pipe", + "opcode" : 5946, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "BlockingPipesINTEL" ], + "extensions" : [ "SPV_INTEL_blocking_pipes" ], + "version" : "None" + }, + { + "opname" : "OpWritePipeBlockingINTEL", + "class" : "Pipe", + "opcode" : 5947, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Packet Size'" }, + { "kind" : "IdRef", "name" : "'Packet Alignment'" } + ], + "capabilities" : [ "BlockingPipesINTEL" ], + "extensions" : [ "SPV_INTEL_blocking_pipes" ], + "version" : "None" + }, + { + "opname" : "OpFPGARegINTEL", + "class" : "Reserved", + "opcode" : 5949, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Result'" }, + { "kind" : "IdRef", "name" : "'Input'" } + ], + "capabilities" : [ "FPGARegINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_reg" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetRayTMinKHR", + "class" : "Reserved", + "opcode" : 6016, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetRayFlagsKHR", + "class" : "Reserved", + "opcode" : 6017, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionTKHR", + "class" : "Reserved", + "opcode" : 6018, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionInstanceCustomIndexKHR", + "class" : "Reserved", + "opcode" : 6019, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionInstanceIdKHR", + "class" : "Reserved", + "opcode" : 6020, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", + "class" : "Reserved", + "opcode" : 6021, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionGeometryIndexKHR", + "class" : "Reserved", + "opcode" : 6022, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionPrimitiveIndexKHR", + "class" : "Reserved", + "opcode" : 6023, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionBarycentricsKHR", + "class" : "Reserved", + "opcode" : 6024, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionFrontFaceKHR", + "class" : "Reserved", + "opcode" : 6025, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR", + "class" : "Reserved", + "opcode" : 6026, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionObjectRayDirectionKHR", + "class" : "Reserved", + "opcode" : 6027, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionObjectRayOriginKHR", + "class" : "Reserved", + "opcode" : 6028, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetWorldRayDirectionKHR", + "class" : "Reserved", + "opcode" : 6029, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetWorldRayOriginKHR", + "class" : "Reserved", + "opcode" : 6030, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionObjectToWorldKHR", + "class" : "Reserved", + "opcode" : 6031, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpRayQueryGetIntersectionWorldToObjectKHR", + "class" : "Reserved", + "opcode" : 6032, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { + "kind" : "IdRef", + "name" : "'RayQuery'" + }, + { + "kind" : "IdRef", + "name" : "'Intersection'" + } + ], + "capabilities" : [ "RayQueryKHR" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "opname" : "OpAtomicFAddEXT", + "class" : "Atomic", + "opcode" : 6035, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }, + { "kind" : "IdRef", "name" : "'Value'" } + ], + "capabilities" : [ "AtomicFloat16AddEXT", "AtomicFloat32AddEXT", "AtomicFloat64AddEXT" ], + "extensions" : [ "SPV_EXT_shader_atomic_float_add" ], + "version" : "None" + }, + { + "opname" : "OpTypeBufferSurfaceINTEL", + "class" : "Type-Declaration", + "opcode" : 6086, + "operands" : [ + { "kind" : "IdResult" }, + { + "kind" : "AccessQualifier", + "name" : "'AccessQualifier'" + } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "opname" : "OpTypeStructContinuedINTEL", + "class" : "Type-Declaration", + "opcode" : 6090, + "operands" : [ + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpConstantCompositeContinuedINTEL", + "class" : "Constant-Creation", + "opcode" : 6091, + "operands" : [ + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpSpecConstantCompositeContinuedINTEL", + "class" : "Constant-Creation", + "opcode" : 6092, + "operands" : [ + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version" : "None" + }, + { + "opname" : "OpCompositeConstructContinuedINTEL", + "class" : "Composite", + "opcode" : 6096, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" } + ], + "capabilities" : [ "LongCompositesINTEL" ], + "version": "None" + }, + { + "opname" : "OpConvertFToBF16INTEL", + "class" : "Conversion", + "opcode" : 6116, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Float Value'" } + ], + "capabilities" : [ "BFloat16ConversionINTEL" ], + "version" : "None" + }, + { + "opname" : "OpConvertBF16ToFINTEL", + "class" : "Conversion", + "opcode" : 6117, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'BFloat16 Value'" } + ], + "capabilities" : [ "BFloat16ConversionINTEL" ], + "version" : "None" + }, + { + "opname" : "OpControlBarrierArriveINTEL", + "class" : "Barrier", + "opcode" : 6142, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "SplitBarrierINTEL" ], + "version" : "None" + }, + { + "opname" : "OpControlBarrierWaitINTEL", + "class" : "Barrier", + "opcode" : 6143, + "operands" : [ + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "IdScope", "name" : "'Memory'" }, + { "kind" : "IdMemorySemantics", "name" : "'Semantics'" } + ], + "capabilities" : [ "SplitBarrierINTEL" ], + "version" : "None" + }, + { + "opname" : "OpGroupIMulKHR", + "class" : "Group", + "opcode" : 6401, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupFMulKHR", + "class" : "Group", + "opcode" : 6402, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupBitwiseAndKHR", + "class" : "Group", + "opcode" : 6403, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupBitwiseOrKHR", + "class" : "Group", + "opcode" : 6404, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupBitwiseXorKHR", + "class" : "Group", + "opcode" : 6405, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupLogicalAndKHR", + "class" : "Group", + "opcode" : 6406, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupLogicalOrKHR", + "class" : "Group", + "opcode" : 6407, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + }, + { + "opname" : "OpGroupLogicalXorKHR", + "class" : "Group", + "opcode" : 6408, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdScope", "name" : "'Execution'" }, + { "kind" : "GroupOperation", "name" : "'Operation'" }, + { "kind" : "IdRef", "name" : "'X'" } + ], + "capabilities" : [ "GroupUniformArithmeticKHR" ], + "version" : "None" + } + ], + "operand_kinds" : [ + { + "category" : "BitEnum", + "kind" : "ImageOperands", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000" + }, + { + "enumerant" : "Bias", + "value" : "0x0001", + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "Lod", + "value" : "0x0002", + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "Grad", + "value" : "0x0004", + "parameters" : [ + { "kind" : "IdRef" }, + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "ConstOffset", + "value" : "0x0008", + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "Offset", + "value" : "0x0010", + "capabilities" : [ "ImageGatherExtended" ], + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "ConstOffsets", + "value" : "0x0020", + "capabilities" : [ "ImageGatherExtended" ], + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "Sample", + "value" : "0x0040", + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "MinLod", + "value" : "0x0080", + "capabilities" : [ "MinLod" ], + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + }, + { + "enumerant" : "MakeTexelAvailable", + "value" : "0x0100", + "capabilities" : [ "VulkanMemoryModel" ], + "parameters" : [ + { "kind" : "IdScope" } + ], + "version" : "1.5" + }, + { + "enumerant" : "MakeTexelAvailableKHR", + "value" : "0x0100", + "capabilities" : [ "VulkanMemoryModel" ], + "parameters" : [ + { "kind" : "IdScope" } + ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "MakeTexelVisible", + "value" : "0x0200", + "capabilities" : [ "VulkanMemoryModel" ], + "parameters" : [ + { "kind" : "IdScope" } + ], + "version" : "1.5" + }, + { + "enumerant" : "MakeTexelVisibleKHR", + "value" : "0x0200", + "capabilities" : [ "VulkanMemoryModel" ], + "parameters" : [ + { "kind" : "IdScope" } + ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "NonPrivateTexel", + "value" : "0x0400", + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "NonPrivateTexelKHR", + "value" : "0x0400", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "VolatileTexel", + "value" : "0x0800", + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "VolatileTexelKHR", + "value" : "0x0800", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "SignExtend", + "value" : "0x1000", + "version" : "1.4" + }, + { + "enumerant" : "ZeroExtend", + "value" : "0x2000", + "version" : "1.4" + }, + { + "enumerant" : "Nontemporal", + "value" : "0x4000", + "version" : "1.6" + }, + { + "enumerant" : "Offsets", + "value" : "0x10000", + "parameters" : [ + { "kind" : "IdRef" } + ], + "version": "1.0" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "FPFastMathMode", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "NotNaN", + "value" : "0x0001", + "version" : "1.0" + }, + { + "enumerant" : "NotInf", + "value" : "0x0002", + "version" : "1.0" + }, + { + "enumerant" : "NSZ", + "value" : "0x0004", + "version" : "1.0" + }, + { + "enumerant" : "AllowRecip", + "value" : "0x0008", + "version" : "1.0" + }, + { + "enumerant" : "Fast", + "value" : "0x0010", + "version" : "1.0" + }, + { + "enumerant" : "AllowContractFastINTEL", + "value" : "0x10000", + "capabilities" : [ "FPFastMathModeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "AllowReassocINTEL", + "value" : "0x20000", + "capabilities" : [ "FPFastMathModeINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "SelectionControl", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "Flatten", + "value" : "0x0001", + "version" : "1.0" + }, + { + "enumerant" : "DontFlatten", + "value" : "0x0002", + "version" : "1.0" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "LoopControl", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "Unroll", + "value" : "0x0001", + "version" : "1.0" + }, + { + "enumerant" : "DontUnroll", + "value" : "0x0002", + "version" : "1.0" + }, + { + "enumerant" : "DependencyInfinite", + "value" : "0x0004", + "version" : "1.1" + }, + { + "enumerant" : "DependencyLength", + "value" : "0x0008", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.1" + }, + { + "enumerant" : "MinIterations", + "value" : "0x0010", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.4" + }, + { + "enumerant" : "MaxIterations", + "value" : "0x0020", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.4" + }, + { + "enumerant" : "IterationMultiple", + "value" : "0x0040", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.4" + }, + { + "enumerant" : "PeelCount", + "value" : "0x0080", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.4" + }, + { + "enumerant" : "PartialCount", + "value" : "0x0100", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.4" + }, + { + "enumerant" : "InitiationIntervalINTEL", + "value" : "0x10000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxConcurrencyINTEL", + "value" : "0x20000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "DependencyArrayINTEL", + "value" : "0x40000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "PipelineEnableINTEL", + "value" : "0x80000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LoopCoalesceINTEL", + "value" : "0x100000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxInterleavingINTEL", + "value" : "0x200000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "SpeculatedIterationsINTEL", + "value" : "0x400000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "NoFusionINTEL", + "value" : "0x800000", + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LoopCountINTEL", + "value" : "0x1000000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxReinvocationDelayINTEL", + "value" : "0x2000000", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "capabilities" : [ "FPGALoopControlsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "FunctionControl", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "Inline", + "value" : "0x0001", + "version" : "1.0" + }, + { + "enumerant" : "DontInline", + "value" : "0x0002", + "version" : "1.0" + }, + { + "enumerant" : "Pure", + "value" : "0x0004", + "version" : "1.0" + }, + { + "enumerant" : "Const", + "value" : "0x0008", + "version" : "1.0" + }, + { + "enumerant" : "OptNoneINTEL", + "value" : "0x10000", + "capabilities" : [ "OptNoneINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "MemorySemantics", + "enumerants" : [ + { + "enumerant" : "Relaxed", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "Acquire", + "value" : "0x0002", + "version" : "1.0" + }, + { + "enumerant" : "Release", + "value" : "0x0004", + "version" : "1.0" + }, + { + "enumerant" : "AcquireRelease", + "value" : "0x0008", + "version" : "1.0" + }, + { + "enumerant" : "SequentiallyConsistent", + "value" : "0x0010", + "version" : "1.0" + }, + { + "enumerant" : "UniformMemory", + "value" : "0x0040", + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupMemory", + "value" : "0x0080", + "version" : "1.0" + }, + { + "enumerant" : "WorkgroupMemory", + "value" : "0x0100", + "version" : "1.0" + }, + { + "enumerant" : "CrossWorkgroupMemory", + "value" : "0x0200", + "version" : "1.0" + }, + { + "enumerant" : "AtomicCounterMemory", + "value" : "0x0400", + "capabilities" : [ "AtomicStorage" ], + "version": "1.0" + }, + { + "enumerant" : "ImageMemory", + "value" : "0x0800", + "version" : "1.0" + }, + { + "enumerant" : "OutputMemory", + "value" : "0x1000", + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "OutputMemoryKHR", + "value" : "0x1000", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "MakeAvailable", + "value" : "0x2000", + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "MakeAvailableKHR", + "value" : "0x2000", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "MakeVisible", + "value" : "0x4000", + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "MakeVisibleKHR", + "value" : "0x4000", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "Volatile", + "value" : "0x8000", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "MemoryAccess", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "Volatile", + "value" : "0x0001", + "version" : "1.0" + }, + { + "enumerant" : "Aligned", + "value" : "0x0002", + "parameters" : [ + { "kind" : "LiteralInteger" } + ], + "version" : "1.0" + }, + { + "enumerant" : "Nontemporal", + "value" : "0x0004", + "version" : "1.0" + }, + { + "enumerant" : "MakePointerAvailable", + "value" : "0x0008", + "parameters" : [ + { "kind" : "IdScope" } + ], + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "MakePointerAvailableKHR", + "value" : "0x0008", + "parameters" : [ + { "kind" : "IdScope" } + ], + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "MakePointerVisible", + "value" : "0x0010", + "parameters" : [ + { "kind" : "IdScope" } + ], + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "MakePointerVisibleKHR", + "value" : "0x0010", + "parameters" : [ + { "kind" : "IdScope" } + ], + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "NonPrivatePointer", + "value" : "0x0020", + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "NonPrivatePointerKHR", + "value" : "0x0020", + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "AliasScopeINTELMask", + "value" : "0x10000", + "parameters" : [ + { "kind" : "IdRef" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "enumerant" : "NoAliasINTELMask", + "parameters" : [ + { "kind" : "IdRef" } + ], + "value" : "0x20000", + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "KernelProfilingInfo", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "1.0" + }, + { + "enumerant" : "CmdExecTime", + "value" : "0x0001", + "capabilities" : [ "Kernel" ], + "version": "1.0" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "RayFlags", + "enumerants" : [ + { + "enumerant" : "NoneKHR", + "value" : "0x0000", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "OpaqueKHR", + "value" : "0x0001", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "NoOpaqueKHR", + "value" : "0x0002", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "TerminateOnFirstHitKHR", + "value" : "0x0004", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "SkipClosestHitShaderKHR", + "value" : "0x0008", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CullBackFacingTrianglesKHR", + "value" : "0x0010", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CullFrontFacingTrianglesKHR", + "value" : "0x0020", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CullOpaqueKHR", + "value" : "0x0040", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CullNoOpaqueKHR", + "value" : "0x0080", + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "SkipTrianglesKHR", + "value" : "0x0100", + "capabilities" : [ "RayTraversalPrimitiveCullingKHR" ], + "version" : "None" + }, + { + "enumerant" : "SkipAABBsKHR", + "value" : "0x0200", + "capabilities" : [ "RayTraversalPrimitiveCullingKHR" ], + "version" : "None" + }, + { + "enumerant" : "ForceOpacityMicromap2StateEXT", + "value" : "0x0400", + "capabilities" : [ "RayTracingOpacityMicromapEXT" ], + "version" : "None" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "FragmentShadingRate", + "enumerants" : [ + { + "enumerant" : "Vertical2Pixels", + "value" : "0x0001", + "capabilities" : [ "FragmentShadingRateKHR" ], + "version" : "None" + }, + { + "enumerant" : "Vertical4Pixels", + "value" : "0x0002", + "capabilities" : [ "FragmentShadingRateKHR" ], + "version" : "None" + }, + { + "enumerant" : "Horizontal2Pixels", + "value" : "0x0004", + "capabilities" : [ "FragmentShadingRateKHR" ], + "version" : "None" + }, + { + "enumerant" : "Horizontal4Pixels", + "value" : "0x0008", + "capabilities" : [ "FragmentShadingRateKHR" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "SourceLanguage", + "enumerants" : [ + { + "enumerant" : "Unknown", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "ESSL", + "value" : 1, + "version" : "1.0" + }, + { + "enumerant" : "GLSL", + "value" : 2, + "version" : "1.0" + }, + { + "enumerant" : "OpenCL_C", + "value" : 3, + "version" : "1.0" + }, + { + "enumerant" : "OpenCL_CPP", + "value" : 4, + "version" : "1.0" + }, + { + "enumerant" : "HLSL", + "value" : 5, + "version" : "1.0" + }, + { + "enumerant" : "CPP_for_OpenCL", + "value" : 6, + "version" : "1.0" + }, + { + "enumerant" : "SYCL", + "value" : 7, + "version" : "1.0" + }, + { + "enumerant" : "HERO_C", + "value" : 8, + "version" : "1.0" + }, + { + "enumerant" : "NZSL", + "value" : 9, + "version" : "1.0" + }, + { + "enumerant" : "WGSL", + "value" : 10, + "version" : "1.0" + }, + { + "enumerant" : "Slang", + "value" : 11, + "version" : "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ExecutionModel", + "enumerants" : [ + { + "enumerant" : "Vertex", + "value" : 0, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "TessellationControl", + "value" : 1, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "TessellationEvaluation", + "value" : 2, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "Geometry", + "value" : 3, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "Fragment", + "value" : 4, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "GLCompute", + "value" : 5, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Kernel", + "value" : 6, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "TaskNV", + "value" : 5267, + "capabilities" : [ "MeshShadingNV" ], + "version" : "None" + }, + { + "enumerant" : "MeshNV", + "value" : 5268, + "capabilities" : [ "MeshShadingNV" ], + "version" : "None" + }, + { + "enumerant" : "RayGenerationNV", + "value" : 5313, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayGenerationKHR", + "value" : 5313, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "IntersectionNV", + "value" : 5314, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "IntersectionKHR", + "value" : 5314, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "AnyHitNV", + "value" : 5315, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "AnyHitKHR", + "value" : 5315, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "ClosestHitNV", + "value" : 5316, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "ClosestHitKHR", + "value" : 5316, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "MissNV", + "value" : 5317, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "MissKHR", + "value" : 5317, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CallableNV", + "value" : 5318, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CallableKHR", + "value" : 5318, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "TaskEXT", + "value" : 5364, + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + }, + { + "enumerant" : "MeshEXT", + "value" : 5365, + "capabilities" : [ "MeshShadingEXT" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "AddressingModel", + "enumerants" : [ + { + "enumerant" : "Logical", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "Physical32", + "value" : 1, + "capabilities" : [ "Addresses" ], + "version": "1.0" + }, + { + "enumerant" : "Physical64", + "value" : 2, + "capabilities" : [ "Addresses" ], + "version": "1.0" + }, + { + "enumerant" : "PhysicalStorageBuffer64", + "value" : 5348, + "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "version" : "1.5" + }, + { + "enumerant" : "PhysicalStorageBuffer64EXT", + "value" : 5348, + "extensions" : [ "SPV_EXT_physical_storage_buffer" ], + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "version" : "1.5" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "MemoryModel", + "enumerants" : [ + { + "enumerant" : "Simple", + "value" : 0, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "GLSL450", + "value" : 1, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "OpenCL", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Vulkan", + "value" : 3, + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "VulkanKHR", + "value" : 3, + "capabilities" : [ "VulkanMemoryModel" ], + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ExecutionMode", + "enumerants" : [ + { + "enumerant" : "Invocations", + "value" : 0, + "capabilities" : [ "Geometry" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Number of <>'" } + ], + "version": "1.0" + }, + { + "enumerant" : "SpacingEqual", + "value" : 1, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "SpacingFractionalEven", + "value" : 2, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "SpacingFractionalOdd", + "value" : 3, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "VertexOrderCw", + "value" : 4, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "VertexOrderCcw", + "value" : 5, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "PixelCenterInteger", + "value" : 6, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "OriginUpperLeft", + "value" : 7, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "OriginLowerLeft", + "value" : 8, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "EarlyFragmentTests", + "value" : 9, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "PointMode", + "value" : 10, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "Xfb", + "value" : 11, + "capabilities" : [ "TransformFeedback" ], + "version": "1.0" + }, + { + "enumerant" : "DepthReplacing", + "value" : 12, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "DepthGreater", + "value" : 14, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "DepthLess", + "value" : 15, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "DepthUnchanged", + "value" : 16, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "LocalSize", + "value" : 17, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'x size'" }, + { "kind" : "LiteralInteger", "name" : "'y size'" }, + { "kind" : "LiteralInteger", "name" : "'z size'" } + ], + "version": "1.0" + }, + { + "enumerant" : "LocalSizeHint", + "value" : 18, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'x size'" }, + { "kind" : "LiteralInteger", "name" : "'y size'" }, + { "kind" : "LiteralInteger", "name" : "'z size'" } + ], + "version": "1.0" + }, + { + "enumerant" : "InputPoints", + "value" : 19, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "InputLines", + "value" : 20, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "InputLinesAdjacency", + "value" : 21, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "Triangles", + "value" : 22, + "capabilities" : [ "Geometry", "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "InputTrianglesAdjacency", + "value" : 23, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "Quads", + "value" : 24, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "Isolines", + "value" : 25, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "OutputVertices", + "value" : 26, + "capabilities" : [ "Geometry", "Tessellation", "MeshShadingNV", "MeshShadingEXT" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Vertex count'" } + ], + "version": "1.0" + }, + { + "enumerant" : "OutputPoints", + "value" : 27, + "capabilities" : [ "Geometry", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" + }, + { + "enumerant" : "OutputLineStrip", + "value" : 28, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "OutputTriangleStrip", + "value" : 29, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "VecTypeHint", + "value" : 30, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Vector type'" } + ], + "version": "1.0" + }, + { + "enumerant" : "ContractionOff", + "value" : 31, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Initializer", + "value" : 33, + "capabilities" : [ "Kernel" ], + "version" : "1.1" + }, + { + "enumerant" : "Finalizer", + "value" : 34, + "capabilities" : [ "Kernel" ], + "version" : "1.1" + }, + { + "enumerant" : "SubgroupSize", + "value" : 35, + "capabilities" : [ "SubgroupDispatch" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Subgroup Size'" } + ], + "version" : "1.1" + }, + { + "enumerant" : "SubgroupsPerWorkgroup", + "value" : 36, + "capabilities" : [ "SubgroupDispatch" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Subgroups Per Workgroup'" } + ], + "version" : "1.1" + }, + { + "enumerant" : "SubgroupsPerWorkgroupId", + "value" : 37, + "capabilities" : [ "SubgroupDispatch" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Subgroups Per Workgroup'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "LocalSizeId", + "value" : 38, + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size'" }, + { "kind" : "IdRef", "name" : "'y size'" }, + { "kind" : "IdRef", "name" : "'z size'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "LocalSizeHintId", + "value" : 39, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size hint'" }, + { "kind" : "IdRef", "name" : "'y size hint'" }, + { "kind" : "IdRef", "name" : "'z size hint'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "NonCoherentColorAttachmentReadEXT", + "value" : 4169, + "capabilities" : [ "TileImageColorReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "NonCoherentDepthAttachmentReadEXT", + "value" : 4170, + "capabilities" : [ "TileImageDepthReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "NonCoherentStencilAttachmentReadEXT", + "value" : 4171, + "capabilities" : [ "TileImageStencilReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupUniformControlFlowKHR", + "value" : 4421, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_subgroup_uniform_control_flow" ], + "version" : "None" + }, + { + "enumerant" : "PostDepthCoverage", + "value" : 4446, + "capabilities" : [ "SampleMaskPostDepthCoverage" ], + "extensions" : [ "SPV_KHR_post_depth_coverage" ], + "version" : "None" + }, + { + "enumerant" : "DenormPreserve", + "value" : 4459, + "capabilities" : [ "DenormPreserve" ], + "extensions" : [ "SPV_KHR_float_controls" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "DenormFlushToZero", + "value" : 4460, + "capabilities" : [ "DenormFlushToZero" ], + "extensions" : [ "SPV_KHR_float_controls" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "SignedZeroInfNanPreserve", + "value" : 4461, + "capabilities" : [ "SignedZeroInfNanPreserve" ], + "extensions" : [ "SPV_KHR_float_controls" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "RoundingModeRTE", + "value" : 4462, + "capabilities" : [ "RoundingModeRTE" ], + "extensions" : [ "SPV_KHR_float_controls" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "RoundingModeRTZ", + "value" : 4463, + "capabilities" : [ "RoundingModeRTZ" ], + "extensions" : [ "SPV_KHR_float_controls" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "version" : "1.4" + }, + { + "enumerant": "EarlyAndLateFragmentTestsAMD", + "value": 5017, + "capabilities": [ "Shader" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests" ], + "version": "None" + }, + { + "enumerant" : "StencilRefReplacingEXT", + "value" : 5027, + "capabilities" : [ "StencilExportEXT" ], + "extensions" : [ "SPV_EXT_shader_stencil_export" ], + "version" : "None" + }, + { + "enumerant" : "CoalescingAMDX", + "value" : 5069, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "MaxNodeRecursionAMDX", + "value" : 5071, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Number of recursions'" } + ], + "version" : "None" + }, + { + "enumerant" : "StaticNumWorkgroupsAMDX", + "value" : 5072, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size'" }, + { "kind" : "IdRef", "name" : "'y size'" }, + { "kind" : "IdRef", "name" : "'z size'" } + ], + "version" : "None" + }, + { + "enumerant" : "ShaderIndexAMDX", + "value" : 5073, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Shader Index'" } + ], + "version" : "None" + }, + { + "enumerant" : "MaxNumWorkgroupsAMDX", + "value" : 5077, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'x size'" }, + { "kind" : "IdRef", "name" : "'y size'" }, + { "kind" : "IdRef", "name" : "'z size'" } + ], + "version" : "None" + }, + { + "enumerant": "StencilRefUnchangedFrontAMD", + "value": 5079, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefGreaterFrontAMD", + "value": 5080, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefLessFrontAMD", + "value": 5081, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefUnchangedBackAMD", + "value": 5082, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefGreaterBackAMD", + "value": 5083, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant": "StencilRefLessBackAMD", + "value": 5084, + "capabilities": [ "StencilExportEXT" ], + "extensions": [ "SPV_AMD_shader_early_and_late_fragment_tests", "SPV_EXT_shader_stencil_export" ], + "version": "None" + }, + { + "enumerant" : "OutputLinesNV", + "value" : 5269, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "OutputLinesEXT", + "value" : 5269, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "OutputPrimitivesNV", + "value" : 5270, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Primitive count'" } + ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "OutputPrimitivesEXT", + "value" : 5270, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Primitive count'" } + ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "DerivativeGroupQuadsNV", + "value" : 5289, + "capabilities" : [ "ComputeDerivativeGroupQuadsNV" ], + "extensions" : [ "SPV_NV_compute_shader_derivatives" ], + "version" : "None" + }, + { + "enumerant" : "DerivativeGroupLinearNV", + "value" : 5290, + "capabilities" : [ "ComputeDerivativeGroupLinearNV" ], + "extensions" : [ "SPV_NV_compute_shader_derivatives" ], + "version" : "None" + }, + { + "enumerant" : "OutputTrianglesNV", + "value" : 5298, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "OutputTrianglesEXT", + "value" : 5298, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PixelInterlockOrderedEXT", + "value" : 5366, + "capabilities" : [ "FragmentShaderPixelInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "PixelInterlockUnorderedEXT", + "value" : 5367, + "capabilities" : [ "FragmentShaderPixelInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "SampleInterlockOrderedEXT", + "value" : 5368, + "capabilities" : [ "FragmentShaderSampleInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "SampleInterlockUnorderedEXT", + "value" : 5369, + "capabilities" : [ "FragmentShaderSampleInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "ShadingRateInterlockOrderedEXT", + "value" : 5370, + "capabilities" : [ "FragmentShaderShadingRateInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "ShadingRateInterlockUnorderedEXT", + "value" : 5371, + "capabilities" : [ "FragmentShaderShadingRateInterlockEXT" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "SharedLocalMemorySizeINTEL", + "value" : 5618, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Size'" } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RoundingModeRTPINTEL", + "value" : 5620, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "capabilities" : [ "RoundToInfinityINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RoundingModeRTNINTEL", + "value" : 5621, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "capabilities" : [ "RoundToInfinityINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FloatingPointModeALTINTEL", + "value" : 5622, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "capabilities" : [ "RoundToInfinityINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FloatingPointModeIEEEINTEL", + "value" : 5623, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" } + ], + "capabilities" : [ "RoundToInfinityINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxWorkgroupSizeINTEL", + "value" : 5893, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'max_x_size'" }, + { "kind" : "LiteralInteger", "name" : "'max_y_size'" }, + { "kind" : "LiteralInteger", "name" : "'max_z_size'" } + ], + "capabilities" : [ "KernelAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "MaxWorkDimINTEL", + "value" : 5894, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'max_dimensions'" } + ], + "capabilities" : [ "KernelAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "NoGlobalOffsetINTEL", + "value" : 5895, + "capabilities" : [ "KernelAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "NumSIMDWorkitemsINTEL", + "value" : 5896, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'vector_width'" } + ], + "capabilities" : [ "FPGAKernelAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "SchedulerTargetFmaxMhzINTEL", + "value" : 5903, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'target_fmax'" } + ], + "capabilities" : [ "FPGAKernelAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StreamingInterfaceINTEL", + "value" : 6154, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'StallFreeReturn'" } + ], + "capabilities" : [ "FPGAKernelAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RegisterMapInterfaceINTEL", + "value" : 6160, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'WaitForDoneWrite'" } + ], + "capabilities" : [ "FPGAKernelAttributesv2INTEL" ], + "version" : "None" + }, + { + "enumerant" : "NamedBarrierCountINTEL", + "value" : 6417, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Barrier Count'" } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "StorageClass", + "enumerants" : [ + { + "enumerant" : "UniformConstant", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "Input", + "value" : 1, + "version" : "1.0" + }, + { + "enumerant" : "Uniform", + "value" : 2, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Output", + "value" : 3, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Workgroup", + "value" : 4, + "version" : "1.0" + }, + { + "enumerant" : "CrossWorkgroup", + "value" : 5, + "version" : "1.0" + }, + { + "enumerant" : "Private", + "value" : 6, + "capabilities" : [ "Shader", "VectorComputeINTEL" ], + "version": "1.0" + }, + { + "enumerant" : "Function", + "value" : 7, + "version" : "1.0" + }, + { + "enumerant" : "Generic", + "value" : 8, + "capabilities" : [ "GenericPointer" ], + "version": "1.0" + }, + { + "enumerant" : "PushConstant", + "value" : 9, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "AtomicCounter", + "value" : 10, + "capabilities" : [ "AtomicStorage" ], + "version": "1.0" + }, + { + "enumerant" : "Image", + "value" : 11, + "version" : "1.0" + }, + { + "enumerant" : "StorageBuffer", + "value" : 12, + "extensions" : [ + "SPV_KHR_storage_buffer_storage_class", + "SPV_KHR_variable_pointers" + ], + "capabilities" : [ "Shader" ], + "version" : "1.3" + }, + { + "enumerant" : "TileImageEXT", + "value" : 4172, + "capabilities" : [ "TileImageColorReadAccessEXT" ], + "version" : "None" + }, + { + "enumerant" : "NodePayloadAMDX", + "value" : 5068, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "NodeOutputPayloadAMDX", + "value" : 5076, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "CallableDataNV", + "value" : 5328, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "CallableDataKHR", + "value" : 5328, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "IncomingCallableDataNV", + "value" : 5329, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "IncomingCallableDataKHR", + "value" : 5329, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayPayloadNV", + "value" : 5338, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayPayloadKHR", + "value" : 5338, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "HitAttributeNV", + "value" : 5339, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "HitAttributeKHR", + "value" : 5339, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "IncomingRayPayloadNV", + "value" : 5342, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "IncomingRayPayloadKHR", + "value" : 5342, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "ShaderRecordBufferNV", + "value" : 5343, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "ShaderRecordBufferKHR", + "value" : 5343, + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "version" : "None" + }, + { + "enumerant" : "PhysicalStorageBuffer", + "value" : 5349, + "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "version" : "1.5" + }, + { + "enumerant" : "PhysicalStorageBufferEXT", + "value" : 5349, + "extensions" : [ "SPV_EXT_physical_storage_buffer" ], + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "version" : "1.5" + }, + { + "enumerant" : "HitObjectAttributeNV", + "value" : 5385, + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "enumerant" : "TaskPayloadWorkgroupEXT", + "value" : 5402, + "extensions" : [ "SPV_EXT_mesh_shader" ], + "capabilities" : [ "MeshShadingEXT" ], + "version" : "1.4" + }, + { + "enumerant" : "CodeSectionINTEL", + "value" : 5605, + "extensions" : [ "SPV_INTEL_function_pointers" ], + "capabilities" : [ "FunctionPointersINTEL" ], + "version" : "None" + }, + { + "enumerant" : "DeviceOnlyINTEL", + "value" : 5936, + "extensions" : [ + "SPV_INTEL_usm_storage_classes" + ], + "capabilities" : [ "USMStorageClassesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "HostOnlyINTEL", + "value" : 5937, + "extensions" : [ + "SPV_INTEL_usm_storage_classes" + ], + "capabilities" : [ "USMStorageClassesINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Dim", + "enumerants" : [ + { + "enumerant" : "1D", + "value" : 0, + "capabilities" : [ "Sampled1D" ], + "version": "1.0" + }, + { + "enumerant" : "2D", + "value" : 1, + "version" : "1.0" + }, + { + "enumerant" : "3D", + "value" : 2, + "version" : "1.0" + }, + { + "enumerant" : "Cube", + "value" : 3, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rect", + "value" : 4, + "capabilities" : [ "SampledRect" ], + "version": "1.0" + }, + { + "enumerant" : "Buffer", + "value" : 5, + "capabilities" : [ "SampledBuffer" ], + "version": "1.0" + }, + { + "enumerant" : "SubpassData", + "value" : 6, + "capabilities" : [ "InputAttachment" ], + "version": "1.0" + }, + { + "enumerant" : "TileImageDataEXT", + "value" : 4173, + "capabilities" : [ "TileImageColorReadAccessEXT" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "SamplerAddressingMode", + "enumerants" : [ + { + "enumerant" : "None", + "value" : 0, + "version": "1.0" + }, + { + "enumerant" : "ClampToEdge", + "value" : 1, + "version": "1.0" + }, + { + "enumerant" : "Clamp", + "value" : 2, + "version": "1.0" + }, + { + "enumerant" : "Repeat", + "value" : 3, + "version": "1.0" + }, + { + "enumerant" : "RepeatMirrored", + "value" : 4, + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "SamplerFilterMode", + "enumerants" : [ + { + "enumerant" : "Nearest", + "value" : 0, + "version": "1.0" + }, + { + "enumerant" : "Linear", + "value" : 1, + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ImageFormat", + "enumerants" : [ + { + "enumerant" : "Unknown", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "Rgba32f", + "value" : 1, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba16f", + "value" : 2, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "R32f", + "value" : 3, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba8", + "value" : 4, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba8Snorm", + "value" : 5, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rg32f", + "value" : 6, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg16f", + "value" : 7, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R11fG11fB10f", + "value" : 8, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R16f", + "value" : 9, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba16", + "value" : 10, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rgb10A2", + "value" : 11, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg16", + "value" : 12, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg8", + "value" : 13, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R16", + "value" : 14, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R8", + "value" : 15, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba16Snorm", + "value" : 16, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg16Snorm", + "value" : 17, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg8Snorm", + "value" : 18, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R16Snorm", + "value" : 19, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R8Snorm", + "value" : 20, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba32i", + "value" : 21, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba16i", + "value" : 22, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba8i", + "value" : 23, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "R32i", + "value" : 24, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rg32i", + "value" : 25, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg16i", + "value" : 26, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg8i", + "value" : 27, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R16i", + "value" : 28, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R8i", + "value" : 29, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba32ui", + "value" : 30, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba16ui", + "value" : 31, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgba8ui", + "value" : 32, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "R32ui", + "value" : 33, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Rgb10a2ui", + "value" : 34, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg32ui", + "value" : 35, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg16ui", + "value" : 36, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "Rg8ui", + "value" : 37, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R16ui", + "value" : 38, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R8ui", + "value" : 39, + "capabilities" : [ "StorageImageExtendedFormats" ], + "version": "1.0" + }, + { + "enumerant" : "R64ui", + "value" : 40, + "capabilities" : [ "Int64ImageEXT" ], + "version": "1.0" + }, + { + "enumerant" : "R64i", + "value" : 41, + "capabilities" : [ "Int64ImageEXT" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ImageChannelOrder", + "enumerants" : [ + { + "enumerant" : "R", + "value" : 0, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "A", + "value" : 1, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RG", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RA", + "value" : 3, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RGB", + "value" : 4, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RGBA", + "value" : 5, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "BGRA", + "value" : 6, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "ARGB", + "value" : 7, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Intensity", + "value" : 8, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Luminance", + "value" : 9, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Rx", + "value" : 10, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RGx", + "value" : 11, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RGBx", + "value" : 12, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Depth", + "value" : 13, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "DepthStencil", + "value" : 14, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "sRGB", + "value" : 15, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "sRGBx", + "value" : 16, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "sRGBA", + "value" : 17, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "sBGRA", + "value" : 18, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "ABGR", + "value" : 19, + "capabilities" : [ "Kernel" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "ImageChannelDataType", + "enumerants" : [ + { + "enumerant" : "SnormInt8", + "value" : 0, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "SnormInt16", + "value" : 1, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormInt8", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormInt16", + "value" : 3, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormShort565", + "value" : 4, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormShort555", + "value" : 5, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormInt101010", + "value" : 6, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "SignedInt8", + "value" : 7, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "SignedInt16", + "value" : 8, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "SignedInt32", + "value" : 9, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnsignedInt8", + "value" : 10, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnsignedInt16", + "value" : 11, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnsignedInt32", + "value" : 12, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "HalfFloat", + "value" : 13, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Float", + "value" : 14, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormInt24", + "value" : 15, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnormInt101010_2", + "value" : 16, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnsignedIntRaw10EXT", + "value" : 19, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "UnsignedIntRaw12EXT", + "value" : 20, + "capabilities" : [ "Kernel" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "FPRoundingMode", + "enumerants" : [ + { + "enumerant" : "RTE", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "RTZ", + "value" : 1, + "version" : "1.0" + }, + { + "enumerant" : "RTP", + "value" : 2, + "version" : "1.0" + }, + { + "enumerant" : "RTN", + "value" : 3, + "version" : "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "FPDenormMode", + "enumerants" : [ + { + "enumerant" : "Preserve", + "value" : 0, + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FlushToZero", + "value" : 1, + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "QuantizationModes", + "enumerants" : [ + { + "enumerant" : "TRN", + "value" : 0, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "TRN_ZERO", + "value" : 1, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "RND", + "value" : 2, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "RND_ZERO", + "value" : 3, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "RND_INF", + "value" : 4, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "RND_MIN_INF", + "value" : 5, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "RND_CONV", + "value" : 6, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "RND_CONV_ODD", + "value" : 7, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "FPOperationMode", + "enumerants" : [ + { + "enumerant" : "IEEE", + "value" : 0, + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ALT", + "value" : 1, + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "OverflowModes", + "enumerants" : [ + { + "enumerant" : "WRAP", + "value" : 0, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "SAT", + "value" : 1, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "SAT_ZERO", + "value" : 2, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + }, + { + "enumerant" : "SAT_SYM", + "value" : 3, + "capabilities" : [ "ArbitraryPrecisionFixedPointINTEL"], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "LinkageType", + "enumerants" : [ + { + "enumerant" : "Export", + "value" : 0, + "capabilities" : [ "Linkage" ], + "version": "1.0" + }, + { + "enumerant" : "Import", + "value" : 1, + "capabilities" : [ "Linkage" ], + "version": "1.0" + }, + { + "enumerant" : "LinkOnceODR", + "value" : 2, + "capabilities" : [ "Linkage" ], + "extensions" : [ "SPV_KHR_linkonce_odr" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "AccessQualifier", + "enumerants" : [ + { + "enumerant" : "ReadOnly", + "value" : 0, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "WriteOnly", + "value" : 1, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "ReadWrite", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "HostAccessQualifier", + "enumerants" : [ + { + "enumerant" : "NoneINTEL", + "value" : 0, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ReadINTEL", + "value" : 1, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WriteINTEL", + "value" : 2, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ReadWriteINTEL", + "value" : 3, + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "FunctionParameterAttribute", + "enumerants" : [ + { + "enumerant" : "Zext", + "value" : 0, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Sext", + "value" : 1, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "ByVal", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Sret", + "value" : 3, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "NoAlias", + "value" : 4, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "NoCapture", + "value" : 5, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "NoWrite", + "value" : 6, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "NoReadWrite", + "value" : 7, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "RuntimeAlignedINTEL", + "value" : 5940, + "capabilities" : [ "RuntimeAlignedAttributeINTEL" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Decoration", + "enumerants" : [ + { + "enumerant" : "RelaxedPrecision", + "value" : 0, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "SpecId", + "value" : 1, + "capabilities" : [ "Shader", "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Specialization Constant ID'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Block", + "value" : 2, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "BufferBlock", + "value" : 3, + "capabilities" : [ "Shader" ], + "version": "1.0", + "lastVersion" : "1.3" + }, + { + "enumerant" : "RowMajor", + "value" : 4, + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "enumerant" : "ColMajor", + "value" : 5, + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "enumerant" : "ArrayStride", + "value" : 6, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Array Stride'" } + ], + "version": "1.0" + }, + { + "enumerant" : "MatrixStride", + "value" : 7, + "capabilities" : [ "Matrix" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Matrix Stride'" } + ], + "version": "1.0" + }, + { + "enumerant" : "GLSLShared", + "value" : 8, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "GLSLPacked", + "value" : 9, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "CPacked", + "value" : 10, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "BuiltIn", + "value" : 11, + "parameters" : [ + { "kind" : "BuiltIn" } + ], + "version": "1.0" + }, + { + "enumerant" : "NoPerspective", + "value" : 13, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Flat", + "value" : 14, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Patch", + "value" : 15, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "Centroid", + "value" : 16, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Sample", + "value" : 17, + "capabilities" : [ "SampleRateShading" ], + "version": "1.0" + }, + { + "enumerant" : "Invariant", + "value" : 18, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Restrict", + "value" : 19, + "version" : "1.0" + }, + { + "enumerant" : "Aliased", + "value" : 20, + "version" : "1.0" + }, + { + "enumerant" : "Volatile", + "value" : 21, + "version" : "1.0" + }, + { + "enumerant" : "Constant", + "value" : 22, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Coherent", + "value" : 23, + "version": "1.0" + }, + { + "enumerant" : "NonWritable", + "value" : 24, + "version": "1.0" + }, + { + "enumerant" : "NonReadable", + "value" : 25, + "version": "1.0" + }, + { + "enumerant" : "Uniform", + "value" : 26, + "capabilities" : [ "Shader", "UniformDecoration" ], + "version": "1.0" + }, + { + "enumerant" : "UniformId", + "value" : 27, + "capabilities" : [ "Shader", "UniformDecoration" ], + "parameters" : [ + { "kind" : "IdScope", "name" : "'Execution'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "SaturatedConversion", + "value" : 28, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Stream", + "value" : 29, + "capabilities" : [ "GeometryStreams" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Stream Number'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Location", + "value" : 30, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Location'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Component", + "value" : 31, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Component'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Index", + "value" : 32, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Index'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Binding", + "value" : 33, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Binding Point'" } + ], + "version": "1.0" + }, + { + "enumerant" : "DescriptorSet", + "value" : 34, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Descriptor Set'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Offset", + "value" : 35, + "capabilities" : [ "Shader" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Byte Offset'" } + ], + "version": "1.0" + }, + { + "enumerant" : "XfbBuffer", + "value" : 36, + "capabilities" : [ "TransformFeedback" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'XFB Buffer Number'" } + ], + "version": "1.0" + }, + { + "enumerant" : "XfbStride", + "value" : 37, + "capabilities" : [ "TransformFeedback" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'XFB Stride'" } + ], + "version": "1.0" + }, + { + "enumerant" : "FuncParamAttr", + "value" : 38, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "FunctionParameterAttribute", "name" : "'Function Parameter Attribute'" } + ], + "version": "1.0" + }, + { + "enumerant" : "FPRoundingMode", + "value" : 39, + "parameters" : [ + { "kind" : "FPRoundingMode", "name" : "'Floating-Point Rounding Mode'" } + ], + "version": "1.0" + }, + { + "enumerant" : "FPFastMathMode", + "value" : 40, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "FPFastMathMode", "name" : "'Fast-Math Mode'" } + ], + "version": "1.0" + }, + { + "enumerant" : "LinkageAttributes", + "value" : 41, + "capabilities" : [ "Linkage" ], + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Name'" }, + { "kind" : "LinkageType", "name" : "'Linkage Type'" } + ], + "version": "1.0" + }, + { + "enumerant" : "NoContraction", + "value" : 42, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "InputAttachmentIndex", + "value" : 43, + "capabilities" : [ "InputAttachment" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Attachment Index'" } + ], + "version": "1.0" + }, + { + "enumerant" : "Alignment", + "value" : 44, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Alignment'" } + ], + "version": "1.0" + }, + { + "enumerant" : "MaxByteOffset", + "value" : 45, + "capabilities" : [ "Addresses" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Max Byte Offset'" } + ], + "version" : "1.1" + }, + { + "enumerant" : "AlignmentId", + "value" : 46, + "capabilities" : [ "Kernel" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Alignment'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "MaxByteOffsetId", + "value" : 47, + "capabilities" : [ "Addresses" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Max Byte Offset'" } + ], + "version" : "1.2" + }, + { + "enumerant" : "NoSignedWrap", + "value" : 4469, + "extensions" : [ "SPV_KHR_no_integer_wrap_decoration" ], + "version" : "1.4" + }, + { + "enumerant" : "NoUnsignedWrap", + "value" : 4470, + "extensions" : [ "SPV_KHR_no_integer_wrap_decoration" ], + "version" : "1.4" + }, + { + "enumerant" : "WeightTextureQCOM", + "value" : 4487, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "BlockMatchTextureQCOM", + "value" : 4488, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "ExplicitInterpAMD", + "value" : 4999, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "NodeSharesPayloadLimitsWithAMDX", + "value" : 5019, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Payload Array'" } + ], + "version" : "None" + }, + { + "enumerant" : "NodeMaxPayloadsAMDX", + "value" : 5020, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "IdRef", "name" : "'Max number of payloads'" } + ], + "version" : "None" + }, + { + "enumerant" : "TrackFinishWritingAMDX", + "value" : 5078, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "PayloadNodeNameAMDX", + "value" : 5091, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Node Name'" } + ], + "version" : "None" + }, + { + "enumerant" : "OverrideCoverageNV", + "value" : 5248, + "capabilities" : [ "SampleMaskOverrideCoverageNV" ], + "extensions" : [ "SPV_NV_sample_mask_override_coverage" ], + "version" : "None" + }, + { + "enumerant" : "PassthroughNV", + "value" : 5250, + "capabilities" : [ "GeometryShaderPassthroughNV" ], + "extensions" : [ "SPV_NV_geometry_shader_passthrough" ], + "version" : "None" + }, + { + "enumerant" : "ViewportRelativeNV", + "value" : 5252, + "capabilities" : [ "ShaderViewportMaskNV" ], + "version" : "None" + }, + { + "enumerant" : "SecondaryViewportRelativeNV", + "value" : 5256, + "capabilities" : [ "ShaderStereoViewNV" ], + "extensions" : [ "SPV_NV_stereo_view_rendering" ], + "version" : "None", + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Offset'" } + ] + }, + { + "enumerant" : "PerPrimitiveNV", + "value" : 5271, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PerPrimitiveEXT", + "value" : 5271, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PerViewNV", + "value" : 5272, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PerTaskNV", + "value" : 5273, + "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PerVertexKHR", + "value" : 5285, + "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "PerVertexNV", + "value" : 5285, + "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "NonUniform", + "value" : 5300, + "capabilities" : [ "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "NonUniformEXT", + "value" : 5300, + "capabilities" : [ "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "RestrictPointer", + "value" : 5355, + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], + "version" : "1.5" + }, + { + "enumerant" : "RestrictPointerEXT", + "value" : 5355, + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "extensions" : [ "SPV_EXT_physical_storage_buffer" ], + "version" : "1.5" + }, + { + "enumerant" : "AliasedPointer", + "value" : 5356, + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], + "version" : "1.5" + }, + { + "enumerant" : "AliasedPointerEXT", + "value" : 5356, + "capabilities" : [ "PhysicalStorageBufferAddresses" ], + "extensions" : [ "SPV_EXT_physical_storage_buffer" ], + "version" : "1.5" + }, + { + "enumerant" : "HitObjectShaderRecordBufferNV", + "value" : 5386, + "capabilities" : [ "ShaderInvocationReorderNV" ], + "version" : "None" + }, + { + "enumerant" : "BindlessSamplerNV", + "value" : 5398, + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "enumerant" : "BindlessImageNV", + "value" : 5399, + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "enumerant" : "BoundSamplerNV", + "value" : 5400, + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "enumerant" : "BoundImageNV", + "value" : 5401, + "capabilities" : [ "BindlessTextureNV" ], + "version" : "None" + }, + { + "enumerant" : "SIMTCallINTEL", + "value" : 5599, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'N'" } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ReferencedIndirectlyINTEL", + "value" : 5602, + "capabilities" : [ "IndirectReferencesINTEL" ], + "extensions" : [ "SPV_INTEL_function_pointers" ], + "version" : "None" + }, + { + "enumerant" : "ClobberINTEL", + "value" : 5607, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Register'" } + ], + "capabilities" : [ "AsmINTEL" ], + "version" : "None" + }, + { + "enumerant" : "SideEffectsINTEL", + "value" : 5608, + "capabilities" : [ "AsmINTEL" ], + "version" : "None" + }, + { + "enumerant" : "VectorComputeVariableINTEL", + "value" : 5624, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FuncParamIOKindINTEL", + "value" : 5625, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Kind'" } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "VectorComputeFunctionINTEL", + "value" : 5626, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StackCallINTEL", + "value" : 5627, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "GlobalVariableOffsetINTEL", + "value" : 5628, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Offset'" } + ], + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "CounterBuffer", + "value" : 5634, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Counter Buffer'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "HlslCounterBufferGOOGLE", + "value" : 5634, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Counter Buffer'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "None" + }, + { + "enumerant" : "UserSemantic", + "value" : 5635, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Semantic'" } + ], + "version" : "1.4" + }, + { + "enumerant" : "HlslSemanticGOOGLE", + "value" : 5635, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Semantic'" } + ], + "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], + "version" : "None" + }, + { + "enumerant" : "UserTypeGOOGLE", + "value" : 5636, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'User Type'" } + ], + "extensions" : [ "SPV_GOOGLE_user_type" ], + "version" : "None" + }, + { + "enumerant" : "FunctionRoundingModeINTEL", + "value" : 5822, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" }, + { "kind" : "FPRoundingMode", "name" : "'FP Rounding Mode'" } + ], + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FunctionDenormModeINTEL", + "value" : 5823, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" }, + { "kind" : "FPDenormMode", "name" : "'FP Denorm Mode'" } + ], + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RegisterINTEL", + "value" : 5825, + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "MemoryINTEL", + "value" : 5826, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Memory Type'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "NumbanksINTEL", + "value" : 5827, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Banks'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "BankwidthINTEL", + "value" : 5828, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Bank Width'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "MaxPrivateCopiesINTEL", + "value" : 5829, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Maximum Copies'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "SinglepumpINTEL", + "value" : 5830, + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "DoublepumpINTEL", + "value" : 5831, + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "MaxReplicatesINTEL", + "value" : 5832, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Maximum Replicates'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "SimpleDualPortINTEL", + "value" : 5833, + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "MergeINTEL", + "value" : 5834, + "parameters" : [ + { "kind" : "LiteralString", "name" : "'Merge Key'" }, + { "kind" : "LiteralString", "name" : "'Merge Type'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "BankBitsINTEL", + "value" : 5835, + "parameters" : [ + { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Bank Bits'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "ForcePow2DepthINTEL", + "value" : 5836, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Force Key'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "StridesizeINTEL", + "value" : 5883, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Stride Size'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WordsizeINTEL", + "value" : 5884, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Word Size'" } + ], + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "TrueDualPortINTEL", + "value" : 5885, + "capabilities" : [ "FPGAMemoryAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "BurstCoalesceINTEL", + "value" : 5899, + "capabilities" : [ "FPGAMemoryAccessesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "CacheSizeINTEL", + "value" : 5900, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cache Size in bytes'" } + ], + "capabilities" : [ "FPGAMemoryAccessesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "DontStaticallyCoalesceINTEL", + "value" : 5901, + "capabilities" : [ "FPGAMemoryAccessesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "PrefetchINTEL", + "value" : 5902, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Prefetcher Size in bytes'" } + ], + "capabilities" : [ "FPGAMemoryAccessesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StallEnableINTEL", + "value" : 5905, + "capabilities" : [ "FPGAClusterAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FuseLoopsInFunctionINTEL", + "value" : 5907, + "capabilities" : [ "LoopFuseINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MathOpDSPModeINTEL", + "value" : 5909, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Mode'" }, + { "kind" : "LiteralInteger", "name" : "'Propagate'" } + ], + "capabilities" : [ "FPGADSPControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "AliasScopeINTEL", + "value" : 5914, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Aliasing Scopes List'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "version" : "None" + }, + { + "enumerant" : "NoAliasINTEL", + "value" : 5915, + "parameters" : [ + { "kind" : "IdRef", "name" : "'Aliasing Scopes List'" } + ], + "capabilities" : [ "MemoryAccessAliasingINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InitiationIntervalINTEL", + "value" : 5917, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cycles'" } + ], + "capabilities" : [ "FPGAInvocationPipeliningAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MaxConcurrencyINTEL", + "value" : 5918, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Invocations'" } + ], + "capabilities" : [ "FPGAInvocationPipeliningAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "PipelineEnableINTEL", + "value" : 5919, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Enable'" } + ], + "capabilities" : [ "FPGAInvocationPipeliningAttributesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "BufferLocationINTEL", + "value" : 5921, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Buffer Location ID'" } + ], + "capabilities" : [ "FPGABufferLocationINTEL" ], + "version" : "None" + }, + { + "enumerant" : "IOPipeStorageINTEL", + "value" : 5944, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'IO Pipe ID'" } + ], + "capabilities" : [ "IOPipesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "FunctionFloatingPointModeINTEL", + "value" : 6080, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Target Width'" }, + { "kind" : "FPOperationMode", "name" : "'FP Operation Mode'" } + ], + "capabilities" : [ "FunctionFloatControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "SingleElementVectorINTEL", + "value" : 6085, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "VectorComputeCallableFunctionINTEL", + "value" : 6087, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MediaBlockIOINTEL", + "value" : 6140, + "capabilities" : [ "VectorComputeINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StallFreeINTEL", + "value" : 6151, + "capabilities" : [ "FPGAClusterAttributesV2INTEL" ], + "version" : "None" + }, + { + "enumerant" : "FPMaxErrorDecorationINTEL", + "value" : 6170, + "parameters" : [ + { "kind" : "LiteralFloat", "name" : "'Max Error'" } + ], + "capabilities" : [ "FPMaxErrorINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LatencyControlLabelINTEL", + "value" : 6172, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Latency Label'" } + ], + "capabilities" : [ "FPGALatencyControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "LatencyControlConstraintINTEL", + "value" : 6173, + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Relative To'" }, + { "kind" : "LiteralInteger", "name" : "'Control Type'" }, + { "kind" : "LiteralInteger", "name" : "'Relative Cycle'" } + ], + "capabilities" : [ "FPGALatencyControlINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ConduitKernelArgumentINTEL", + "value" : 6175, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "RegisterMapKernelArgumentINTEL", + "value" : 6176, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceAddressWidthINTEL", + "value" : 6177, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'AddressWidth'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceDataWidthINTEL", + "value" : 6178, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'DataWidth'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceLatencyINTEL", + "value" : 6179, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Latency'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceReadWriteModeINTEL", + "value" : 6180, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "AccessQualifier", "name" : "'ReadWriteMode'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceMaxBurstINTEL", + "value" : 6181, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'MaxBurstCount'" } + ], + "version" : "None" + }, + { + "enumerant" : "MMHostInterfaceWaitRequestINTEL", + "value" : 6182, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Waitrequest'" } + ], + "version" : "None" + }, + { + "enumerant" : "StableKernelArgumentINTEL", + "value" : 6183, + "capabilities" : [ "FPGAArgumentInterfacesINTEL" ], + "version" : "None" + }, + { + "enumerant" : "HostAccessINTEL", + "value" : 6188, + "parameters": [ + { "kind" : "HostAccessQualifier", "name" : "'Access'" }, + { "kind" : "LiteralString", "name" : "'Name'" } + ], + "capabilities" : [ "GlobalVariableHostAccessINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InitModeINTEL", + "value" : 6190, + "parameters": [ + { "kind" : "InitializationModeQualifier", "name" : "'Trigger'" } + ], + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ImplementInRegisterMapINTEL", + "value" : 6191, + "parameters": [ + { "kind" : "LiteralInteger", "name" : "Value" } + ], + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "CacheControlLoadINTEL", + "value" : 6442, + "capabilities" : [ "CacheControlsINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cache Level'" }, + { "kind" : "LoadCacheControl", "name" : "'Cache Control'" } + ], + "version" : "None" + }, + { + "enumerant" : "CacheControlStoreINTEL", + "value" : 6443, + "capabilities" : [ "CacheControlsINTEL" ], + "parameters" : [ + { "kind" : "LiteralInteger", "name" : "'Cache Level'" }, + { "kind" : "StoreCacheControl", "name" : "'Cache Control'" } + ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "BuiltIn", + "enumerants" : [ + { + "enumerant" : "Position", + "value" : 0, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "PointSize", + "value" : 1, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "ClipDistance", + "value" : 3, + "capabilities" : [ "ClipDistance" ], + "version": "1.0" + }, + { + "enumerant" : "CullDistance", + "value" : 4, + "capabilities" : [ "CullDistance" ], + "version": "1.0" + }, + { + "enumerant" : "VertexId", + "value" : 5, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "InstanceId", + "value" : 6, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "PrimitiveId", + "value" : 7, + "capabilities" : [ "Geometry", "Tessellation", "RayTracingNV", "RayTracingKHR", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" + }, + { + "enumerant" : "InvocationId", + "value" : 8, + "capabilities" : [ "Geometry", "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "Layer", + "value" : 9, + "capabilities" : [ "Geometry", "ShaderLayer", "ShaderViewportIndexLayerEXT", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" + }, + { + "enumerant" : "ViewportIndex", + "value" : 10, + "capabilities" : [ "MultiViewport", "ShaderViewportIndex", "ShaderViewportIndexLayerEXT", "MeshShadingNV", "MeshShadingEXT" ], + "version": "1.0" + }, + { + "enumerant" : "TessLevelOuter", + "value" : 11, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "TessLevelInner", + "value" : 12, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "TessCoord", + "value" : 13, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "PatchVertices", + "value" : 14, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "FragCoord", + "value" : 15, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "PointCoord", + "value" : 16, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "FrontFacing", + "value" : 17, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "SampleId", + "value" : 18, + "capabilities" : [ "SampleRateShading" ], + "version": "1.0" + }, + { + "enumerant" : "SamplePosition", + "value" : 19, + "capabilities" : [ "SampleRateShading" ], + "version": "1.0" + }, + { + "enumerant" : "SampleMask", + "value" : 20, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "FragDepth", + "value" : 22, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "HelperInvocation", + "value" : 23, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "NumWorkgroups", + "value" : 24, + "version" : "1.0" + }, + { + "enumerant" : "WorkgroupSize", + "value" : 25, + "version" : "1.0" + }, + { + "enumerant" : "WorkgroupId", + "value" : 26, + "version" : "1.0" + }, + { + "enumerant" : "LocalInvocationId", + "value" : 27, + "version" : "1.0" + }, + { + "enumerant" : "GlobalInvocationId", + "value" : 28, + "version" : "1.0" + }, + { + "enumerant" : "LocalInvocationIndex", + "value" : 29, + "version" : "1.0" + }, + { + "enumerant" : "WorkDim", + "value" : 30, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "GlobalSize", + "value" : 31, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "EnqueuedWorkgroupSize", + "value" : 32, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "GlobalOffset", + "value" : 33, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "GlobalLinearId", + "value" : 34, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupSize", + "value" : 36, + "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupMaxSize", + "value" : 37, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "NumSubgroups", + "value" : 38, + "capabilities" : [ "Kernel", "GroupNonUniform" ], + "version": "1.0" + }, + { + "enumerant" : "NumEnqueuedSubgroups", + "value" : 39, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupId", + "value" : 40, + "capabilities" : [ "Kernel", "GroupNonUniform" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupLocalInvocationId", + "value" : 41, + "capabilities" : [ "Kernel", "GroupNonUniform", "SubgroupBallotKHR" ], + "version": "1.0" + }, + { + "enumerant" : "VertexIndex", + "value" : 42, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "InstanceIndex", + "value" : 43, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "CoreIDARM", + "value" : 4160, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "CoreCountARM", + "value" : 4161, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "CoreMaxIDARM", + "value" : 4162, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "WarpIDARM", + "value" : 4163, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "WarpMaxIDARM", + "value" : 4164, + "capabilities" : [ "CoreBuiltinsARM" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupEqMask", + "value" : 4416, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupEqMaskKHR", + "value" : 4416, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGeMask", + "value" : 4417, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGeMaskKHR", + "value" : 4417, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGtMask", + "value" : 4418, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupGtMaskKHR", + "value" : 4418, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLeMask", + "value" : 4419, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLeMaskKHR", + "value" : 4419, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLtMask", + "value" : 4420, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "version" : "1.3" + }, + { + "enumerant" : "SubgroupLtMaskKHR", + "value" : 4420, + "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "1.3" + }, + { + "enumerant" : "BaseVertex", + "value" : 4424, + "capabilities" : [ "DrawParameters" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "BaseInstance", + "value" : 4425, + "capabilities" : [ "DrawParameters" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "DrawIndex", + "value" : 4426, + "capabilities" : [ "DrawParameters", "MeshShadingNV", "MeshShadingEXT" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters", "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], + "version" : "1.3" + }, + { + "enumerant" : "PrimitiveShadingRateKHR", + "value" : 4432, + "capabilities" : [ "FragmentShadingRateKHR" ], + "extensions" : [ "SPV_KHR_fragment_shading_rate" ], + "version" : "None" + }, + { + "enumerant" : "DeviceIndex", + "value" : 4438, + "capabilities" : [ "DeviceGroup" ], + "extensions" : [ "SPV_KHR_device_group" ], + "version" : "1.3" + }, + { + "enumerant" : "ViewIndex", + "value" : 4440, + "capabilities" : [ "MultiView" ], + "extensions" : [ "SPV_KHR_multiview" ], + "version" : "1.3" + }, + { + "enumerant" : "ShadingRateKHR", + "value" : 4444, + "capabilities" : [ "FragmentShadingRateKHR" ], + "extensions" : [ "SPV_KHR_fragment_shading_rate" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspAMD", + "value" : 4992, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspCentroidAMD", + "value" : 4993, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspSampleAMD", + "value" : 4994, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordSmoothAMD", + "value" : 4995, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordSmoothCentroidAMD", + "value" : 4996, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordSmoothSampleAMD", + "value" : 4997, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordPullModelAMD", + "value" : 4998, + "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ], + "version" : "None" + }, + { + "enumerant" : "FragStencilRefEXT", + "value" : 5014, + "capabilities" : [ "StencilExportEXT" ], + "extensions" : [ "SPV_EXT_shader_stencil_export" ], + "version" : "None" + }, + { + "enumerant" : "CoalescedInputCountAMDX", + "value" : 5021, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "ShaderIndexAMDX", + "value" : 5073, + "capabilities" : [ "ShaderEnqueueAMDX" ], + "version" : "None" + }, + { + "enumerant" : "ViewportMaskNV", + "value" : 5253, + "capabilities" : [ "ShaderViewportMaskNV", "MeshShadingNV" ], + "extensions" : [ "SPV_NV_viewport_array2", "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "SecondaryPositionNV", + "value" : 5257, + "capabilities" : [ "ShaderStereoViewNV" ], + "extensions" : [ "SPV_NV_stereo_view_rendering" ], + "version" : "None" + }, + { + "enumerant" : "SecondaryViewportMaskNV", + "value" : 5258, + "capabilities" : [ "ShaderStereoViewNV" ], + "extensions" : [ "SPV_NV_stereo_view_rendering" ], + "version" : "None" + }, + { + "enumerant" : "PositionPerViewNV", + "value" : 5261, + "capabilities" : [ "PerViewAttributesNV", "MeshShadingNV" ], + "extensions" : [ "SPV_NVX_multiview_per_view_attributes", "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "ViewportMaskPerViewNV", + "value" : 5262, + "capabilities" : [ "PerViewAttributesNV", "MeshShadingNV" ], + "extensions" : [ "SPV_NVX_multiview_per_view_attributes", "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "FullyCoveredEXT", + "value" : 5264, + "capabilities" : [ "FragmentFullyCoveredEXT" ], + "extensions" : [ "SPV_EXT_fragment_fully_covered" ], + "version" : "None" + }, + { + "enumerant" : "TaskCountNV", + "value" : 5274, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PrimitiveCountNV", + "value" : 5275, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PrimitiveIndicesNV", + "value" : 5276, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "ClipDistancePerViewNV", + "value" : 5277, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "CullDistancePerViewNV", + "value" : 5278, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "LayerPerViewNV", + "value" : 5279, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "MeshViewCountNV", + "value" : 5280, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "MeshViewIndicesNV", + "value" : 5281, + "capabilities" : [ "MeshShadingNV" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordKHR", + "value" : 5286, + "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNV", + "value" : 5286, + "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspKHR", + "value" : 5287, + "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "BaryCoordNoPerspNV", + "value" : 5287, + "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "FragSizeEXT", + "value" : 5292 , + "capabilities" : [ "FragmentDensityEXT", "ShadingRateNV" ], + "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ], + "version" : "None" + }, + { + "enumerant" : "FragmentSizeNV", + "value" : 5292 , + "capabilities" : [ "ShadingRateNV", "FragmentDensityEXT" ], + "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ], + "version" : "None" + }, + { + "enumerant" : "FragInvocationCountEXT", + "value" : 5293, + "capabilities" : [ "FragmentDensityEXT", "ShadingRateNV" ], + "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ], + "version" : "None" + }, + { + "enumerant" : "InvocationsPerPixelNV", + "value" : 5293, + "capabilities" : [ "ShadingRateNV", "FragmentDensityEXT" ], + "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ], + "version" : "None" + }, + { + "enumerant" : "PrimitivePointIndicesEXT", + "value" : 5294, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PrimitiveLineIndicesEXT", + "value" : 5295, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "PrimitiveTriangleIndicesEXT", + "value" : 5296, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "CullPrimitiveEXT", + "value" : 5299, + "capabilities" : [ "MeshShadingEXT" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "LaunchIdNV", + "value" : 5319, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "LaunchIdKHR", + "value" : 5319, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "LaunchSizeNV", + "value" : 5320, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "LaunchSizeKHR", + "value" : 5320, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WorldRayOriginNV", + "value" : 5321, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WorldRayOriginKHR", + "value" : 5321, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WorldRayDirectionNV", + "value" : 5322, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WorldRayDirectionKHR", + "value" : 5322, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "ObjectRayOriginNV", + "value" : 5323, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "ObjectRayOriginKHR", + "value" : 5323, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "ObjectRayDirectionNV", + "value" : 5324, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "ObjectRayDirectionKHR", + "value" : 5324, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTminNV", + "value" : 5325, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTminKHR", + "value" : 5325, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTmaxNV", + "value" : 5326, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTmaxKHR", + "value" : 5326, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "InstanceCustomIndexNV", + "value" : 5327, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "InstanceCustomIndexKHR", + "value" : 5327, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "ObjectToWorldNV", + "value" : 5330, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "ObjectToWorldKHR", + "value" : 5330, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WorldToObjectNV", + "value" : 5331, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WorldToObjectKHR", + "value" : 5331, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "HitTNV", + "value" : 5332, + "capabilities" : [ "RayTracingNV" ], + "extensions" : [ "SPV_NV_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "HitKindNV", + "value" : 5333, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "HitKindKHR", + "value" : 5333, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "CurrentRayTimeNV", + "value" : 5334, + "capabilities" : [ "RayTracingMotionBlurNV" ], + "extensions" : [ "SPV_NV_ray_tracing_motion_blur" ], + "version" : "None" + }, + { + "enumerant" : "HitTriangleVertexPositionsKHR", + "value" : 5335, + "capabilities" : [ "RayTracingPositionFetchKHR" ], + "version" : "None" + }, + { + "enumerant" : "HitMicroTriangleVertexPositionsNV", + "value" : 5337, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "HitMicroTriangleVertexBarycentricsNV", + "value" : 5344, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "IncomingRayFlagsNV", + "value" : 5351, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "IncomingRayFlagsKHR", + "value" : 5351, + "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], + "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayGeometryIndexKHR", + "value" : 5352, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "WarpsPerSMNV", + "value" : 5374, + "capabilities" : [ "ShaderSMBuiltinsNV" ], + "extensions" : [ "SPV_NV_shader_sm_builtins" ], + "version" : "None" + }, + { + "enumerant" : "SMCountNV", + "value" : 5375, + "capabilities" : [ "ShaderSMBuiltinsNV" ], + "extensions" : [ "SPV_NV_shader_sm_builtins" ], + "version" : "None" + }, + { + "enumerant" : "WarpIDNV", + "value" : 5376, + "capabilities" : [ "ShaderSMBuiltinsNV" ], + "extensions" : [ "SPV_NV_shader_sm_builtins" ], + "version" : "None" + }, + { + "enumerant" : "SMIDNV", + "value" : 5377, + "capabilities" : [ "ShaderSMBuiltinsNV" ], + "extensions" : [ "SPV_NV_shader_sm_builtins" ], + "version" : "None" + }, + { + "enumerant" : "HitKindFrontFacingMicroTriangleNV", + "value" : 5405, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "HitKindBackFacingMicroTriangleNV", + "value" : 5406, + "capabilities" : [ "RayTracingDisplacementMicromapNV" ], + "version" : "None" + }, + { + "enumerant" : "CullMaskKHR", + "value" : 6021, + "capabilities" : [ "RayCullMaskKHR" ], + "extensions" : [ "SPV_KHR_ray_cull_mask" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Scope", + "enumerants" : [ + { + "enumerant" : "CrossDevice", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "Device", + "value" : 1, + "version" : "1.0" + }, + { + "enumerant" : "Workgroup", + "value" : 2, + "version" : "1.0" + }, + { + "enumerant" : "Subgroup", + "value" : 3, + "version" : "1.0" + }, + { + "enumerant" : "Invocation", + "value" : 4, + "version" : "1.0" + }, + { + "enumerant" : "QueueFamily", + "value" : 5, + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "QueueFamilyKHR", + "value" : 5, + "capabilities" : [ "VulkanMemoryModel" ], + "version" : "1.5" + }, + { + "enumerant" : "ShaderCallKHR", + "value" : 6, + "capabilities" : [ "RayTracingKHR" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "GroupOperation", + "enumerants" : [ + { + "enumerant" : "Reduce", + "value" : 0, + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ], + "version": "1.0" + }, + { + "enumerant" : "InclusiveScan", + "value" : 1, + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ], + "version": "1.0" + }, + { + "enumerant" : "ExclusiveScan", + "value" : 2, + "capabilities" : [ "Kernel", "GroupNonUniformArithmetic", "GroupNonUniformBallot" ], + "version": "1.0" + }, + { + "enumerant" : "ClusteredReduce", + "value" : 3, + "capabilities" : [ "GroupNonUniformClustered" ], + "version" : "1.3" + }, + { + "enumerant" : "PartitionedReduceNV", + "value" : 6, + "capabilities" : [ "GroupNonUniformPartitionedNV" ], + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + }, + { + "enumerant" : "PartitionedInclusiveScanNV", + "value" : 7, + "capabilities" : [ "GroupNonUniformPartitionedNV" ], + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + }, + { + "enumerant" : "PartitionedExclusiveScanNV", + "value" : 8, + "capabilities" : [ "GroupNonUniformPartitionedNV" ], + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "KernelEnqueueFlags", + "enumerants" : [ + { + "enumerant" : "NoWait", + "value" : 0, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "WaitKernel", + "value" : 1, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "WaitWorkGroup", + "value" : 2, + "capabilities" : [ "Kernel" ], + "version": "1.0" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "Capability", + "enumerants" : [ + { + "enumerant" : "Matrix", + "value" : 0, + "version" : "1.0" + }, + { + "enumerant" : "Shader", + "value" : 1, + "capabilities" : [ "Matrix" ], + "version": "1.0" + }, + { + "enumerant" : "Geometry", + "value" : 2, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Tessellation", + "value" : 3, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Addresses", + "value" : 4, + "version" : "1.0" + }, + { + "enumerant" : "Linkage", + "value" : 5, + "version" : "1.0" + }, + { + "enumerant" : "Kernel", + "value" : 6, + "version" : "1.0" + }, + { + "enumerant" : "Vector16", + "value" : 7, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Float16Buffer", + "value" : 8, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Float16", + "value" : 9, + "version" : "1.0" + }, + { + "enumerant" : "Float64", + "value" : 10, + "version" : "1.0" + }, + { + "enumerant" : "Int64", + "value" : 11, + "version" : "1.0" + }, + { + "enumerant" : "Int64Atomics", + "value" : 12, + "capabilities" : [ "Int64" ], + "version": "1.0" + }, + { + "enumerant" : "ImageBasic", + "value" : 13, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "ImageReadWrite", + "value" : 14, + "capabilities" : [ "ImageBasic" ], + "version": "1.0" + }, + { + "enumerant" : "ImageMipmap", + "value" : 15, + "capabilities" : [ "ImageBasic" ], + "version": "1.0" + }, + { + "enumerant" : "Pipes", + "value" : 17, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "Groups", + "value" : 18, + "extensions" : [ "SPV_AMD_shader_ballot" ], + "version": "1.0" + }, + { + "enumerant" : "DeviceEnqueue", + "value" : 19, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "LiteralSampler", + "value" : 20, + "capabilities" : [ "Kernel" ], + "version": "1.0" + }, + { + "enumerant" : "AtomicStorage", + "value" : 21, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Int16", + "value" : 22, + "version" : "1.0" + }, + { + "enumerant" : "TessellationPointSize", + "value" : 23, + "capabilities" : [ "Tessellation" ], + "version": "1.0" + }, + { + "enumerant" : "GeometryPointSize", + "value" : 24, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "ImageGatherExtended", + "value" : 25, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "StorageImageMultisample", + "value" : 27, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "UniformBufferArrayDynamicIndexing", + "value" : 28, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "SampledImageArrayDynamicIndexing", + "value" : 29, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "StorageBufferArrayDynamicIndexing", + "value" : 30, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "StorageImageArrayDynamicIndexing", + "value" : 31, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "ClipDistance", + "value" : 32, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "CullDistance", + "value" : 33, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "ImageCubeArray", + "value" : 34, + "capabilities" : [ "SampledCubeArray" ], + "version": "1.0" + }, + { + "enumerant" : "SampleRateShading", + "value" : 35, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "ImageRect", + "value" : 36, + "capabilities" : [ "SampledRect" ], + "version": "1.0" + }, + { + "enumerant" : "SampledRect", + "value" : 37, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "GenericPointer", + "value" : 38, + "capabilities" : [ "Addresses" ], + "version": "1.0" + }, + { + "enumerant" : "Int8", + "value" : 39, + "version" : "1.0" + }, + { + "enumerant" : "InputAttachment", + "value" : 40, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "SparseResidency", + "value" : 41, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "MinLod", + "value" : 42, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "Sampled1D", + "value" : 43, + "version" : "1.0" + }, + { + "enumerant" : "Image1D", + "value" : 44, + "capabilities" : [ "Sampled1D" ], + "version": "1.0" + }, + { + "enumerant" : "SampledCubeArray", + "value" : 45, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "SampledBuffer", + "value" : 46, + "version" : "1.0" + }, + { + "enumerant" : "ImageBuffer", + "value" : 47, + "capabilities" : [ "SampledBuffer" ], + "version": "1.0" + }, + { + "enumerant" : "ImageMSArray", + "value" : 48, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "StorageImageExtendedFormats", + "value" : 49, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "ImageQuery", + "value" : 50, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "DerivativeControl", + "value" : 51, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "InterpolationFunction", + "value" : 52, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "TransformFeedback", + "value" : 53, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "GeometryStreams", + "value" : 54, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "StorageImageReadWithoutFormat", + "value" : 55, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "StorageImageWriteWithoutFormat", + "value" : 56, + "capabilities" : [ "Shader" ], + "version": "1.0" + }, + { + "enumerant" : "MultiViewport", + "value" : 57, + "capabilities" : [ "Geometry" ], + "version": "1.0" + }, + { + "enumerant" : "SubgroupDispatch", + "value" : 58, + "capabilities" : [ "DeviceEnqueue" ], + "version" : "1.1" + }, + { + "enumerant" : "NamedBarrier", + "value" : 59, + "capabilities" : [ "Kernel" ], + "version" : "1.1" + }, + { + "enumerant" : "PipeStorage", + "value" : 60, + "capabilities" : [ "Pipes" ], + "version" : "1.1" + }, + { + "enumerant" : "GroupNonUniform", + "value" : 61, + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformVote", + "value" : 62, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformArithmetic", + "value" : 63, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformBallot", + "value" : 64, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformShuffle", + "value" : 65, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformShuffleRelative", + "value" : 66, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformClustered", + "value" : 67, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "GroupNonUniformQuad", + "value" : 68, + "capabilities" : [ "GroupNonUniform" ], + "version" : "1.3" + }, + { + "enumerant" : "ShaderLayer", + "value" : 69, + "version" : "1.5" + }, + { + "enumerant" : "ShaderViewportIndex", + "value" : 70, + "version" : "1.5" + }, + { + "enumerant" : "UniformDecoration", + "value" : 71, + "version" : "1.6" + }, + { + "enumerant" : "CoreBuiltinsARM", + "value" : 4165, + "extensions" : [ "SPV_ARM_core_builtins" ], + "version": "None" + }, + { + "enumerant" : "TileImageColorReadAccessEXT", + "value" : 4166, + "extensions" : [ "SPV_EXT_shader_tile_image" ], + "version" : "None" + }, + { + "enumerant" : "TileImageDepthReadAccessEXT", + "value" : 4167, + "extensions" : [ "SPV_EXT_shader_tile_image" ], + "version" : "None" + }, + { + "enumerant" : "TileImageStencilReadAccessEXT", + "value" : 4168, + "extensions" : [ "SPV_EXT_shader_tile_image" ], + "version" : "None" + }, + { + "enumerant" : "FragmentShadingRateKHR", + "value" : 4422, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_fragment_shading_rate" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupBallotKHR", + "value" : 4423, + "extensions" : [ "SPV_KHR_shader_ballot" ], + "version" : "None" + }, + { + "enumerant" : "DrawParameters", + "value" : 4427, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_shader_draw_parameters" ], + "version" : "1.3" + }, + { + "enumerant" : "WorkgroupMemoryExplicitLayoutKHR", + "value" : 4428, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_workgroup_memory_explicit_layout" ], + "version" : "None" + }, + { + "enumerant" : "WorkgroupMemoryExplicitLayout8BitAccessKHR", + "value" : 4429, + "capabilities" : [ "WorkgroupMemoryExplicitLayoutKHR" ], + "extensions" : [ "SPV_KHR_workgroup_memory_explicit_layout" ], + "version" : "None" + }, + { + "enumerant" : "WorkgroupMemoryExplicitLayout16BitAccessKHR", + "value" : 4430, + "capabilities" : [ "WorkgroupMemoryExplicitLayoutKHR" ], + "extensions" : [ "SPV_KHR_workgroup_memory_explicit_layout" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupVoteKHR", + "value" : 4431, + "extensions" : [ "SPV_KHR_subgroup_vote" ], + "version" : "None" + }, + { + "enumerant" : "StorageBuffer16BitAccess", + "value" : 4433, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StorageUniformBufferBlock16", + "value" : 4433, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "UniformAndStorageBuffer16BitAccess", + "value" : 4434, + "capabilities" : [ + "StorageBuffer16BitAccess", + "StorageUniformBufferBlock16" + ], + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StorageUniform16", + "value" : 4434, + "capabilities" : [ + "StorageBuffer16BitAccess", + "StorageUniformBufferBlock16" + ], + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StoragePushConstant16", + "value" : 4435, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "StorageInputOutput16", + "value" : 4436, + "extensions" : [ "SPV_KHR_16bit_storage" ], + "version" : "1.3" + }, + { + "enumerant" : "DeviceGroup", + "value" : 4437, + "extensions" : [ "SPV_KHR_device_group" ], + "version" : "1.3" + }, + { + "enumerant" : "MultiView", + "value" : 4439, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_multiview" ], + "version" : "1.3" + }, + { + "enumerant" : "VariablePointersStorageBuffer", + "value" : 4441, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_variable_pointers" ], + "version" : "1.3" + }, + { + "enumerant" : "VariablePointers", + "value" : 4442, + "capabilities" : [ "VariablePointersStorageBuffer" ], + "extensions" : [ "SPV_KHR_variable_pointers" ], + "version" : "1.3" + }, + { + "enumerant" : "AtomicStorageOps", + "value" : 4445, + "extensions" : [ "SPV_KHR_shader_atomic_counter_ops" ], + "version" : "None" + }, + { + "enumerant" : "SampleMaskPostDepthCoverage", + "value" : 4447, + "extensions" : [ "SPV_KHR_post_depth_coverage" ], + "version" : "None" + }, + { + "enumerant" : "StorageBuffer8BitAccess", + "value" : 4448, + "extensions" : [ "SPV_KHR_8bit_storage" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformAndStorageBuffer8BitAccess", + "value" : 4449, + "capabilities" : [ "StorageBuffer8BitAccess" ], + "extensions" : [ "SPV_KHR_8bit_storage" ], + "version" : "1.5" + }, + { + "enumerant" : "StoragePushConstant8", + "value" : 4450, + "extensions" : [ "SPV_KHR_8bit_storage" ], + "version" : "1.5" + }, + { + "enumerant" : "DenormPreserve", + "value" : 4464, + "extensions" : [ "SPV_KHR_float_controls" ], + "version" : "1.4" + }, + { + "enumerant" : "DenormFlushToZero", + "value" : 4465, + "extensions" : [ "SPV_KHR_float_controls" ], + "version" : "1.4" + }, + { + "enumerant" : "SignedZeroInfNanPreserve", + "value" : 4466, + "extensions" : [ "SPV_KHR_float_controls" ], + "version" : "1.4" + }, + { + "enumerant" : "RoundingModeRTE", + "value" : 4467, + "extensions" : [ "SPV_KHR_float_controls" ], + "version" : "1.4" + }, + { + "enumerant" : "RoundingModeRTZ", + "value" : 4468, + "extensions" : [ "SPV_KHR_float_controls" ], + "version" : "1.4" + }, + { + "enumerant" : "RayQueryProvisionalKHR", + "value" : 4471, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "enumerant" : "RayQueryKHR", + "value" : 4472, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_query" ], + "version" : "None" + }, + { + "enumerant" : "RayTraversalPrimitiveCullingKHR", + "value" : 4478, + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "extensions" : [ "SPV_KHR_ray_query","SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingKHR", + "value" : 4479, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "TextureSampleWeightedQCOM", + "value" : 4484, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "TextureBoxFilterQCOM", + "value" : 4485, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "TextureBlockMatchQCOM", + "value" : 4486, + "extensions" : [ "SPV_QCOM_image_processing" ], + "version" : "None" + }, + { + "enumerant" : "Float16ImageAMD", + "value" : 5008, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_gpu_shader_half_float_fetch" ], + "version" : "None" + }, + { + "enumerant" : "ImageGatherBiasLodAMD", + "value" : 5009, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_texture_gather_bias_lod" ], + "version" : "None" + }, + { + "enumerant" : "FragmentMaskAMD", + "value" : 5010, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_shader_fragment_mask" ], + "version" : "None" + }, + { + "enumerant" : "StencilExportEXT", + "value" : 5013, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_shader_stencil_export" ], + "version" : "None" + }, + { + "enumerant" : "ImageReadWriteLodAMD", + "value" : 5015, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMD_shader_image_load_store_lod" ], + "version" : "None" + }, + { + "enumerant" : "Int64ImageEXT", + "value" : 5016, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_shader_image_int64" ], + "version" : "None" + }, + { + "enumerant" : "ShaderClockKHR", + "value" : 5055, + "extensions" : [ "SPV_KHR_shader_clock" ], + "version" : "None" + }, + { + "enumerant" : "ShaderEnqueueAMDX", + "value" : 5067, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_AMDX_shader_enqueue" ], + "version" : "None" + }, + { + "enumerant" : "SampleMaskOverrideCoverageNV", + "value" : 5249, + "capabilities" : [ "SampleRateShading" ], + "extensions" : [ "SPV_NV_sample_mask_override_coverage" ], + "version" : "None" + }, + { + "enumerant" : "GeometryShaderPassthroughNV", + "value" : 5251, + "capabilities" : [ "Geometry" ], + "extensions" : [ "SPV_NV_geometry_shader_passthrough" ], + "version" : "None" + }, + { + "enumerant" : "ShaderViewportIndexLayerEXT", + "value" : 5254, + "capabilities" : [ "MultiViewport" ], + "extensions" : [ "SPV_EXT_shader_viewport_index_layer" ], + "version" : "None" + }, + { + "enumerant" : "ShaderViewportIndexLayerNV", + "value" : 5254, + "capabilities" : [ "MultiViewport" ], + "extensions" : [ "SPV_NV_viewport_array2" ], + "version" : "None" + }, + { + "enumerant" : "ShaderViewportMaskNV", + "value" : 5255, + "capabilities" : [ "ShaderViewportIndexLayerNV" ], + "extensions" : [ "SPV_NV_viewport_array2" ], + "version" : "None" + }, + { + "enumerant" : "ShaderStereoViewNV", + "value" : 5259, + "capabilities" : [ "ShaderViewportMaskNV" ], + "extensions" : [ "SPV_NV_stereo_view_rendering" ], + "version" : "None" + }, + { + "enumerant" : "PerViewAttributesNV", + "value" : 5260, + "capabilities" : [ "MultiView" ], + "extensions" : [ "SPV_NVX_multiview_per_view_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FragmentFullyCoveredEXT", + "value" : 5265, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_fragment_fully_covered" ], + "version" : "None" + }, + { + "enumerant" : "MeshShadingNV", + "value" : 5266, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "ImageFootprintNV", + "value" : 5282, + "extensions" : [ "SPV_NV_shader_image_footprint" ], + "version" : "None" + }, + { + "enumerant" : "MeshShadingEXT", + "value" : 5283, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_mesh_shader" ], + "version" : "None" + }, + { + "enumerant" : "FragmentBarycentricKHR", + "value" : 5284, + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "FragmentBarycentricNV", + "value" : 5284, + "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], + "version" : "None" + }, + { + "enumerant" : "ComputeDerivativeGroupQuadsNV", + "value" : 5288, + "extensions" : [ "SPV_NV_compute_shader_derivatives" ], + "version" : "None" + }, + { + "enumerant" : "FragmentDensityEXT", + "value" : 5291, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ], + "version" : "None" + }, + { + "enumerant" : "ShadingRateNV", + "value" : 5291, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ], + "version" : "None" + }, + { + "enumerant" : "GroupNonUniformPartitionedNV", + "value" : 5297, + "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], + "version" : "None" + }, + { + "enumerant" : "ShaderNonUniform", + "value" : 5301, + "capabilities" : [ "Shader" ], + "version" : "1.5" + }, + { + "enumerant" : "ShaderNonUniformEXT", + "value" : 5301, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "RuntimeDescriptorArray", + "value" : 5302, + "capabilities" : [ "Shader" ], + "version" : "1.5" + }, + { + "enumerant" : "RuntimeDescriptorArrayEXT", + "value" : 5302, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "InputAttachmentArrayDynamicIndexing", + "value" : 5303, + "capabilities" : [ "InputAttachment" ], + "version" : "1.5" + }, + { + "enumerant" : "InputAttachmentArrayDynamicIndexingEXT", + "value" : 5303, + "capabilities" : [ "InputAttachment" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformTexelBufferArrayDynamicIndexing", + "value" : 5304, + "capabilities" : [ "SampledBuffer" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformTexelBufferArrayDynamicIndexingEXT", + "value" : 5304, + "capabilities" : [ "SampledBuffer" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageTexelBufferArrayDynamicIndexing", + "value" : 5305, + "capabilities" : [ "ImageBuffer" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageTexelBufferArrayDynamicIndexingEXT", + "value" : 5305, + "capabilities" : [ "ImageBuffer" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformBufferArrayNonUniformIndexing", + "value" : 5306, + "capabilities" : [ "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformBufferArrayNonUniformIndexingEXT", + "value" : 5306, + "capabilities" : [ "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "SampledImageArrayNonUniformIndexing", + "value" : 5307, + "capabilities" : [ "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "SampledImageArrayNonUniformIndexingEXT", + "value" : 5307, + "capabilities" : [ "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageBufferArrayNonUniformIndexing", + "value" : 5308, + "capabilities" : [ "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageBufferArrayNonUniformIndexingEXT", + "value" : 5308, + "capabilities" : [ "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageImageArrayNonUniformIndexing", + "value" : 5309, + "capabilities" : [ "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageImageArrayNonUniformIndexingEXT", + "value" : 5309, + "capabilities" : [ "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "InputAttachmentArrayNonUniformIndexing", + "value" : 5310, + "capabilities" : [ "InputAttachment", "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "InputAttachmentArrayNonUniformIndexingEXT", + "value" : 5310, + "capabilities" : [ "InputAttachment", "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformTexelBufferArrayNonUniformIndexing", + "value" : 5311, + "capabilities" : [ "SampledBuffer", "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "UniformTexelBufferArrayNonUniformIndexingEXT", + "value" : 5311, + "capabilities" : [ "SampledBuffer", "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageTexelBufferArrayNonUniformIndexing", + "value" : 5312, + "capabilities" : [ "ImageBuffer", "ShaderNonUniform" ], + "version" : "1.5" + }, + { + "enumerant" : "StorageTexelBufferArrayNonUniformIndexingEXT", + "value" : 5312, + "capabilities" : [ "ImageBuffer", "ShaderNonUniform" ], + "extensions" : [ "SPV_EXT_descriptor_indexing" ], + "version" : "1.5" + }, + { + "enumerant" : "RayTracingPositionFetchKHR", + "value" : 5336, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingNV", + "value" : 5340, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingMotionBlurNV", + "value" : 5341, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_ray_tracing_motion_blur" ], + "version" : "None" + }, + { + "enumerant" : "VulkanMemoryModel", + "value" : 5345, + "version" : "1.5" + }, + { + "enumerant" : "VulkanMemoryModelKHR", + "value" : 5345, + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "VulkanMemoryModelDeviceScope", + "value" : 5346, + "version" : "1.5" + }, + { + "enumerant" : "VulkanMemoryModelDeviceScopeKHR", + "value" : 5346, + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "1.5" + }, + { + "enumerant" : "PhysicalStorageBufferAddresses", + "value" : 5347, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], + "version" : "1.5" + }, + { + "enumerant" : "PhysicalStorageBufferAddressesEXT", + "value" : 5347, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_physical_storage_buffer" ], + "version" : "1.5" + }, + { + "enumerant" : "ComputeDerivativeGroupLinearNV", + "value" : 5350, + "extensions" : [ "SPV_NV_compute_shader_derivatives" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingProvisionalKHR", + "value" : 5353, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixNV", + "value" : 5357, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_cooperative_matrix" ], + "version" : "None" + }, + { + "enumerant" : "FragmentShaderSampleInterlockEXT", + "value" : 5363, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "FragmentShaderShadingRateInterlockEXT", + "value" : 5372, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "ShaderSMBuiltinsNV", + "value" : 5373, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_shader_sm_builtins" ], + "version" : "None" + }, + { + "enumerant" : "FragmentShaderPixelInterlockEXT", + "value" : 5378, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], + "version" : "None" + }, + { + "enumerant" : "DemoteToHelperInvocation", + "value" : 5379, + "capabilities" : [ "Shader" ], + "version" : "1.6" + }, + { + "enumerant" : "DemoteToHelperInvocationEXT", + "value" : 5379, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_EXT_demote_to_helper_invocation" ], + "version" : "1.6" + }, + { + "enumerant" : "DisplacementMicromapNV", + "value" : 5380, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_NV_displacement_micromap" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingOpacityMicromapEXT", + "value" : 5381, + "capabilities" : [ "RayQueryKHR","RayTracingKHR" ], + "extensions" : [ "SPV_EXT_opacity_micromap" ], + "version" : "None" + }, + { + "enumerant" : "ShaderInvocationReorderNV", + "value" : 5383, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_NV_shader_invocation_reorder" ], + "version" : "None" + }, + { + "enumerant" : "BindlessTextureNV", + "value" : 5390, + "extensions" : [ "SPV_NV_bindless_texture" ], + "version" : "None" + }, + { + "enumerant" : "RayQueryPositionFetchKHR", + "value" : 5391, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ], + "version" : "None" + }, + { + "enumerant" : "RayTracingDisplacementMicromapNV", + "value" : 5409, + "capabilities" : [ "RayTracingKHR" ], + "extensions" : [ "SPV_NV_displacement_micromap" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupShuffleINTEL", + "value" : 5568, + "extensions" : [ "SPV_INTEL_subgroups" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupBufferBlockIOINTEL", + "value" : 5569, + "extensions" : [ "SPV_INTEL_subgroups" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupImageBlockIOINTEL", + "value" : 5570, + "extensions" : [ "SPV_INTEL_subgroups" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupImageMediaBlockIOINTEL", + "value" : 5579, + "extensions" : [ "SPV_INTEL_media_block_io" ], + "version" : "None" + }, + { + "enumerant" : "RoundToInfinityINTEL", + "value" : 5582, + "extensions" : [ "SPV_INTEL_float_controls2" ], + "version" : "None" + }, + { + "enumerant" : "FloatingPointModeINTEL", + "value" : 5583, + "extensions" : [ "SPV_INTEL_float_controls2" ], + "version" : "None" + }, + { + "enumerant" : "IntegerFunctions2INTEL", + "value" : 5584, + "capabilities" : [ "Shader" ], + "extensions" : [ "SPV_INTEL_shader_integer_functions2" ], + "version" : "None" + }, + { + "enumerant" : "FunctionPointersINTEL", + "value" : 5603, + "extensions" : [ "SPV_INTEL_function_pointers" ], + "version" : "None" + }, + { + "enumerant" : "IndirectReferencesINTEL", + "value" : 5604, + "extensions" : [ "SPV_INTEL_function_pointers" ], + "version" : "None" + }, + { + "enumerant" : "AsmINTEL", + "value" : 5606, + "extensions" : [ "SPV_INTEL_inline_assembly" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat32MinMaxEXT", + "value" : 5612, + "extensions" : [ "SPV_EXT_shader_atomic_float_min_max" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat64MinMaxEXT", + "value" : 5613, + "extensions" : [ "SPV_EXT_shader_atomic_float_min_max" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat16MinMaxEXT", + "value" : 5616, + "extensions" : [ "SPV_EXT_shader_atomic_float_min_max" ], + "version" : "None" + }, + { + "enumerant" : "VectorComputeINTEL", + "value" : 5617, + "capabilities" : [ "VectorAnyINTEL" ], + "extensions" : [ "SPV_INTEL_vector_compute" ], + "version" : "None" + }, + { + "enumerant" : "VectorAnyINTEL", + "value" : 5619, + "extensions" : [ "SPV_INTEL_vector_compute" ], + "version" : "None" + }, + { + "enumerant" : "ExpectAssumeKHR", + "value" : 5629, + "extensions" : [ "SPV_KHR_expect_assume" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupAvcMotionEstimationINTEL", + "value" : 5696, + "extensions" : [ "SPV_INTEL_device_side_avc_motion_estimation" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupAvcMotionEstimationIntraINTEL", + "value" : 5697, + "extensions" : [ "SPV_INTEL_device_side_avc_motion_estimation" ], + "version" : "None" + }, + { + "enumerant" : "SubgroupAvcMotionEstimationChromaINTEL", + "value" : 5698, + "extensions" : [ "SPV_INTEL_device_side_avc_motion_estimation" ], + "version" : "None" + }, + { + "enumerant" : "VariableLengthArrayINTEL", + "value" : 5817, + "extensions" : [ "SPV_INTEL_variable_length_array" ], + "version" : "None" + }, + { + "enumerant" : "FunctionFloatControlINTEL", + "value" : 5821, + "extensions" : [ "SPV_INTEL_float_controls2" ], + "version" : "None" + }, + { + "enumerant" : "FPGAMemoryAttributesINTEL", + "value" : 5824, + "extensions" : [ "SPV_INTEL_fpga_memory_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPFastMathModeINTEL", + "value" : 5837, + "capabilities" : [ "Kernel" ], + "extensions" : [ "SPV_INTEL_fp_fast_math_mode" ], + "version" : "None" + }, + { + "enumerant" : "ArbitraryPrecisionIntegersINTEL", + "value" : 5844, + "extensions" : [ "SPV_INTEL_arbitrary_precision_integers" ], + "version" : "None" + }, + { + "enumerant" : "ArbitraryPrecisionFloatingPointINTEL", + "value" : 5845, + "extensions" : [ "SPV_INTEL_arbitrary_precision_floating_point" ], + "version" : "None" + }, + { + "enumerant" : "UnstructuredLoopControlsINTEL", + "value" : 5886, + "extensions" : [ "SPV_INTEL_unstructured_loop_controls" ], + "version" : "None" + }, + { + "enumerant" : "FPGALoopControlsINTEL", + "value" : 5888, + "extensions" : [ "SPV_INTEL_fpga_loop_controls" ], + "version" : "None" + }, + { + "enumerant" : "KernelAttributesINTEL", + "value" : 5892, + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPGAKernelAttributesINTEL", + "value" : 5897, + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPGAMemoryAccessesINTEL", + "value" : 5898, + "extensions" : [ "SPV_INTEL_fpga_memory_accesses" ], + "version" : "None" + }, + { + "enumerant" : "FPGAClusterAttributesINTEL", + "value" : 5904, + "extensions" : [ "SPV_INTEL_fpga_cluster_attributes" ], + "version" : "None" + }, + { + "enumerant" : "LoopFuseINTEL", + "value" : 5906, + "extensions" : [ "SPV_INTEL_loop_fuse" ], + "version" : "None" + }, + { + "enumerant" : "FPGADSPControlINTEL", + "value" : 5908, + "extensions" : [ "SPV_INTEL_fpga_dsp_control" ], + "version" : "None" + }, + { + "enumerant" : "MemoryAccessAliasingINTEL", + "value" : 5910, + "extensions" : [ "SPV_INTEL_memory_access_aliasing" ], + "version" : "None" + }, + { + "enumerant" : "FPGAInvocationPipeliningAttributesINTEL", + "value" : 5916, + "extensions" : [ "SPV_INTEL_fpga_invocation_pipelining_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPGABufferLocationINTEL", + "value" : 5920, + "extensions" : [ "SPV_INTEL_fpga_buffer_location" ], + "version" : "None" + }, + { + "enumerant" : "ArbitraryPrecisionFixedPointINTEL", + "value" : 5922, + "extensions" : [ "SPV_INTEL_arbitrary_precision_fixed_point" ], + "version" : "None" + }, + { + "enumerant" : "USMStorageClassesINTEL", + "value" : 5935, + "extensions" : [ "SPV_INTEL_usm_storage_classes" ], + "version" : "None" + }, + { + "enumerant" : "RuntimeAlignedAttributeINTEL", + "value" : 5939, + "extensions" : [ "SPV_INTEL_runtime_aligned" ], + "version" : "None" + }, + { + "enumerant" : "IOPipesINTEL", + "value" : 5943, + "extensions" : [ "SPV_INTEL_io_pipes" ], + "version" : "None" + }, + { + "enumerant" : "BlockingPipesINTEL", + "value" : 5945, + "extensions" : [ "SPV_INTEL_blocking_pipes" ], + "version" : "None" + }, + { + "enumerant" : "FPGARegINTEL", + "value" : 5948, + "extensions" : [ "SPV_INTEL_fpga_reg" ], + "version" : "None" + }, + { + "enumerant" : "DotProductInputAll", + "value" : 6016, + "version" : "1.6" + }, + { + "enumerant" : "DotProductInputAllKHR", + "value" : 6016, + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "enumerant" : "DotProductInput4x8Bit", + "value" : 6017, + "capabilities" : [ "Int8" ], + "version" : "1.6" + }, + { + "enumerant" : "DotProductInput4x8BitKHR", + "value" : 6017, + "capabilities" : [ "Int8" ], + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "enumerant" : "DotProductInput4x8BitPacked", + "value" : 6018, + "version" : "1.6" + }, + { + "enumerant" : "DotProductInput4x8BitPackedKHR", + "value" : 6018, + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "enumerant" : "DotProduct", + "value" : 6019, + "version" : "1.6" + }, + { + "enumerant" : "DotProductKHR", + "value" : 6019, + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + }, + { + "enumerant" : "RayCullMaskKHR", + "value" : 6020, + "extensions" : [ "SPV_KHR_ray_cull_mask" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixKHR", + "value" : 6022, + "extensions" : [ "SPV_KHR_cooperative_matrix" ], + "version" : "None" + }, + { + "enumerant" : "BitInstructions", + "value" : 6025, + "extensions" : [ "SPV_KHR_bit_instructions" ], + "version" : "None" + }, + { + "enumerant" : "GroupNonUniformRotateKHR", + "value" : 6026, + "capabilities" : [ "GroupNonUniform" ], + "extensions" : [ "SPV_KHR_subgroup_rotate" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat32AddEXT", + "value" : 6033, + "extensions" : [ "SPV_EXT_shader_atomic_float_add" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat64AddEXT", + "value" : 6034, + "extensions" : [ "SPV_EXT_shader_atomic_float_add" ], + "version" : "None" + }, + { + "enumerant" : "LongCompositesINTEL", + "value" : 6089, + "extensions" : [ "SPV_INTEL_long_composites" ], + "version" : "None" + }, + { + "enumerant" : "OptNoneINTEL", + "value" : 6094, + "extensions" : [ "SPV_INTEL_optnone" ], + "version" : "None" + }, + { + "enumerant" : "AtomicFloat16AddEXT", + "value" : 6095, + "extensions" : [ "SPV_EXT_shader_atomic_float16_add" ], + "version" : "None" + }, + { + "enumerant" : "DebugInfoModuleINTEL", + "value" : 6114, + "extensions" : [ "SPV_INTEL_debug_module" ], + "version" : "None" + }, + { + "enumerant" : "BFloat16ConversionINTEL", + "value" : 6115, + "extensions" : [ "SPV_INTEL_bfloat16_conversion" ], + "version" : "None" + }, + { + "enumerant" : "SplitBarrierINTEL", + "value" : 6141, + "extensions" : [ "SPV_INTEL_split_barrier" ], + "version" : "None" + }, + { + "enumerant" : "FPGAClusterAttributesV2INTEL", + "value" : 6150, + "capabilities" : [ "FPGAClusterAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_fpga_cluster_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPGAKernelAttributesv2INTEL", + "value" : 6161, + "capabilities" : [ "FPGAKernelAttributesINTEL" ], + "extensions" : [ "SPV_INTEL_kernel_attributes" ], + "version" : "None" + }, + { + "enumerant" : "FPMaxErrorINTEL", + "value" : 6169, + "extensions" : [ "SPV_INTEL_fp_max_error" ], + "version" : "None" + }, + { + "enumerant" : "FPGALatencyControlINTEL", + "value" : 6171, + "extensions" : [ "SPV_INTEL_fpga_latency_control" ], + "version" : "None" + }, + { + "enumerant" : "FPGAArgumentInterfacesINTEL", + "value" : 6174, + "extensions" : [ "SPV_INTEL_fpga_argument_interfaces" ], + "version" : "None" + }, + { + "enumerant" : "GlobalVariableHostAccessINTEL", + "value" : 6187, + "extensions": [ "SPV_INTEL_global_variable_host_access" ], + "version" : "None" + }, + { + "enumerant" : "GlobalVariableFPGADecorationsINTEL", + "value" : 6189, + "extensions": [ "SPV_INTEL_global_variable_fpga_decorations" ], + "version" : "None" + }, + { + "enumerant" : "GroupUniformArithmeticKHR", + "value" : 6400, + "extensions" : [ "SPV_KHR_uniform_group_instructions"], + "version" : "None" + }, + { + "enumerant" : "CacheControlsINTEL", + "value" : 6441, + "extensions" : [ "SPV_INTEL_cache_controls" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "RayQueryIntersection", + "enumerants" : [ + { + "enumerant" : "RayQueryCandidateIntersectionKHR", + "value" : 0, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayQueryCommittedIntersectionKHR", + "value" : 1, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "RayQueryCommittedIntersectionType", + "enumerants" : [ + { + "enumerant" : "RayQueryCommittedIntersectionNoneKHR", + "value" : 0, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayQueryCommittedIntersectionTriangleKHR", + "value" : 1, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayQueryCommittedIntersectionGeneratedKHR", + "value" : 2, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "RayQueryCandidateIntersectionType", + "enumerants" : [ + { + "enumerant" : "RayQueryCandidateIntersectionTriangleKHR", + "value" : 0, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + }, + { + "enumerant" : "RayQueryCandidateIntersectionAABBKHR", + "value" : 1, + "capabilities" : [ "RayQueryKHR" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "PackedVectorFormat", + "enumerants" : [ + { + "enumerant" : "PackedVectorFormat4x8Bit", + "value" : 0, + "version" : "1.6" + }, + { + "enumerant" : "PackedVectorFormat4x8BitKHR", + "value" : 0, + "extensions" : [ "SPV_KHR_integer_dot_product" ], + "version" : "1.6" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "CooperativeMatrixOperands", + "enumerants" : [ + { + "enumerant" : "NoneKHR", + "value" : "0x0000", + "version" : "None" + }, + { + "enumerant" : "MatrixASignedComponentsKHR", + "value" : "0x0001", + "version" : "None" + }, + { + "enumerant" : "MatrixBSignedComponentsKHR", + "value" : "0x0002", + "version" : "None" + }, + { + "enumerant" : "MatrixCSignedComponentsKHR", + "value" : "0x0004", + "version" : "None" + }, + { + "enumerant" : "MatrixResultSignedComponentsKHR", + "value" : "0x0008", + "version" : "None" + }, + { + "enumerant" : "SaturatingAccumulationKHR", + "value" : "0x0010", + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "CooperativeMatrixLayout", + "enumerants" : [ + { + "enumerant" : "RowMajorKHR", + "value" : 0, + "version" : "None" + }, + { + "enumerant" : "ColumnMajorKHR", + "value" : 1, + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "CooperativeMatrixUse", + "enumerants" : [ + { + "enumerant" : "MatrixAKHR", + "value" : 0, + "version" : "None" + }, + { + "enumerant" : "MatrixBKHR", + "value" : 1, + "version" : "None" + }, + { + "enumerant" : "MatrixAccumulatorKHR", + "value" : 2, + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "InitializationModeQualifier", + "enumerants" : [ + { + "enumerant" : "InitOnDeviceReprogramINTEL", + "value" : 0, + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InitOnDeviceResetINTEL", + "value" : 1, + "capabilities" : [ "GlobalVariableFPGADecorationsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "LoadCacheControl", + "enumerants" : [ + { + "enumerant" : "UncachedINTEL", + "value" : 0, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "CachedINTEL", + "value" : 1, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StreamingINTEL", + "value" : 2, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "InvalidateAfterReadINTEL", + "value" : 3, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "ConstCachedINTEL", + "value" : 4, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "StoreCacheControl", + "enumerants" : [ + { + "enumerant" : "UncachedINTEL", + "value" : 0, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WriteThroughINTEL", + "value" : 1, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "WriteBackINTEL", + "value" : 2, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + }, + { + "enumerant" : "StreamingINTEL", + "value" : 3, + "capabilities" : [ "CacheControlsINTEL" ], + "version" : "None" + } + ] + }, + { + "category" : "Id", + "kind" : "IdResultType", + "doc" : "Reference to an representing the result's type of the enclosing instruction" + }, + { + "category" : "Id", + "kind" : "IdResult", + "doc" : "Definition of an representing the result of the enclosing instruction" + }, + { + "category" : "Id", + "kind" : "IdMemorySemantics", + "doc" : "Reference to an representing a 32-bit integer that is a mask from the MemorySemantics operand kind" + }, + { + "category" : "Id", + "kind" : "IdScope", + "doc" : "Reference to an representing a 32-bit integer that is a mask from the Scope operand kind" + }, + { + "category" : "Id", + "kind" : "IdRef", + "doc" : "Reference to an " + }, + { + "category" : "Literal", + "kind" : "LiteralInteger", + "doc" : "An integer consuming one or more words" + }, + { + "category" : "Literal", + "kind" : "LiteralString", + "doc" : "A null-terminated stream of characters consuming an integral number of words" + }, + { + "category" : "Literal", + "kind" : "LiteralFloat", + "doc" : "A float consuming one word" + }, + { + "category" : "Literal", + "kind" : "LiteralContextDependentNumber", + "doc" : "A literal number whose size and format are determined by a previous operand in the enclosing instruction" + }, + { + "category" : "Literal", + "kind" : "LiteralExtInstInteger", + "doc" : "A 32-bit unsigned integer indicating which instruction to use and determining the layout of following operands (for OpExtInst)" + }, + { + "category" : "Literal", + "kind" : "LiteralSpecConstantOpInteger", + "doc" : "An opcode indicating the operation to be performed and determining the layout of following operands (for OpSpecConstantOp)" + }, + { + "category" : "Composite", + "kind" : "PairLiteralIntegerIdRef", + "bases" : [ "LiteralInteger", "IdRef" ] + }, + { + "category" : "Composite", + "kind" : "PairIdRefLiteralInteger", + "bases" : [ "IdRef", "LiteralInteger" ] + }, + { + "category" : "Composite", + "kind" : "PairIdRefIdRef", + "bases" : [ "IdRef", "IdRef" ] + } + ] +} diff --git a/scripts/Update-SpirvHeader.ps1 b/scripts/Update-SpirvHeader.ps1 new file mode 100644 index 0000000..ce365c3 --- /dev/null +++ b/scripts/Update-SpirvHeader.ps1 @@ -0,0 +1,2 @@ +Invoke-WebRequest "https://raw.githubusercontent.com/KhronosGroup/SPIRV-Headers/main/include/spirv/unified1/spirv.core.grammar.json" -OutFile assets/spirv/spirv.core.grammar.json +Invoke-WebRequest "https://raw.githubusercontent.com/KhronosGroup/SPIRV-Headers/main/include/spirv/spir-v.xml" -OutFile assets/spirv/spir-v.xml diff --git a/spirq-core/src/parse/bin.rs b/spirq-core/src/parse/bin.rs index 635dd9f..90510a0 100644 --- a/spirq-core/src/parse/bin.rs +++ b/spirq-core/src/parse/bin.rs @@ -1,5 +1,15 @@ use std::{convert::TryInto, iter::FromIterator}; +use super::Instrs; + +pub struct SpirvHeader { + pub magic: u32, + pub version: u32, + pub generator: u32, + pub bound: u32, + pub schema: u32, +} + /// SPIR-V program binary. #[derive(Debug, Default, Clone)] pub struct SpirvBinary(Vec); @@ -46,4 +56,22 @@ impl SpirvBinary { pub fn into_words(self) -> Vec { self.0 } + + pub fn instrs(&self) -> Instrs { + Instrs::new(self.words()) + } + + pub fn header(&self) -> Option { + let header = &self.words()[..5]; + if header.len() < 5 { + return None; + } + Some(SpirvHeader { + magic: header[0], + version: header[1], + generator: header[2], + bound: header[3], + schema: header[4], + }) + } } diff --git a/spirq-dis/Cargo.toml b/spirq-dis/Cargo.toml new file mode 100644 index 0000000..af310d8 --- /dev/null +++ b/spirq-dis/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "spirq-dis" +version = "0.2.3" +authors = ["PENGUINLIONG "] +edition = "2018" +license = "MIT OR Apache-2.0" +description = "SPIR-V disassembler" +repository = "https://github.com/PENGUINLIONG/spirq-rs" +homepage = "https://github.com/PENGUINLIONG/spirq-rs" +documentation = "https://docs.rs/spirq" +categories = ["graphics"] +readme = "README.md" +keywords = ["spirv", "vulkan", "opengl", "glsl", "hlsl"] + +[badges] +maintenance = { status = "actively-developed" } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +spirq-core = { version = "1.0.0", path = "../spirq-core" } diff --git a/spirq-dis/README.md b/spirq-dis/README.md new file mode 100644 index 0000000..38528d3 --- /dev/null +++ b/spirq-dis/README.md @@ -0,0 +1,16 @@ +# SPIR-Q Disassembler + +[![Build Status](https://travis-ci.com/PENGUINLIONG/spirq-rs.svg?branch=master)](https://travis-ci.com/PENGUINLIONG/spirq-rs) +[![Crate](https://img.shields.io/crates/v/spirq-dis)](https://crates.io/crates/spirq-dis) +[![Documentation](https://docs.rs/spirq-dis/badge.svg)](https://docs.rs/spirq-dis) + +SPIR-Q Disassembler is a SPIR-V disassembler written in pure Rust. + +## License + +This project is licensed under either of + +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. diff --git a/spirq-dis/scripts/generate_code.py b/spirq-dis/scripts/generate_code.py new file mode 100644 index 0000000..e73d527 --- /dev/null +++ b/spirq-dis/scripts/generate_code.py @@ -0,0 +1,353 @@ +import json +from typing import Any, Dict, List + +with open('spirv.core.grammar.json', 'r') as f: + J = json.load(f) + +magic_number = J['magic_number'] +major_version = J['major_version'] +minor_version = J['minor_version'] +revision = J['revision'] + +instruction_printing_class = J['instruction_printing_class'] +instructions = J['instructions'] +operand_kinds = J['operand_kinds'] +operand_kinds = {operand_kind['kind']: operand_kind for operand_kind in operand_kinds} + + +def make_header() -> List[str]: + out = [ + "// Path: src/spirv_core_grammar.rs", + "// This file is generated by generate_code.py", + "#![allow(non_camel_case_types)]", + "#![allow(non_snake_case)]", + "use bitflags::bitflags;", + "use num_traits::FromPrimitive;", + "", + f"pub const MAGIC_NUMBER: u32 = {magic_number};", + f"pub const MAJOR_VERSION: u16 = {major_version};", + f"pub const MINOR_VERSION: u16 = {minor_version};", + f"pub const REVISION: u32 = {revision};", + "", + "pub type Result = anyhow::Result;", + "", + "pub struct Instruction {", + " pub opcode: u16,", + " pub operands: Vec,", + "}", + ] + return out + + +def make_type_defs() -> List[str]: + out = [ + ] + return out + + +def as_name(x: str) -> str: + if x[0].isdigit(): + return f"_{x}" + return x + + +def make_operand_kind_typedef_BitEnum(kind: str, operand_kind: Any) -> List[str]: + out = [] + enumerants = operand_kind['enumerants'] + out += [ + f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", + f"pub struct Operand_{kind} {{", + f" pub value: spirv::{as_name(kind)},", + f"}}", + ] + out += [ + f"impl Operand_{as_name(kind)} {{", + " pub fn parse(x: &mut impl Iterator) -> Option {", + " let data = x.next()?;", + f" let value = spirv::{as_name(kind)}::from_bits_truncate(data);", + " Some(Self { value })", + " }", + "}", + "", + ] + return out + +def make_operand_kind_typedef_ValueEnum(kind: str, operand_kind: Any) -> List[str]: + out = [] + enumerants = operand_kind['enumerants'] + out += [ + f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", + f"pub struct Operand_{as_name(kind)} {{", + f" pub value: spirv::{as_name(kind)},", + f"}}", + ] + out += [ + f"impl Operand_{as_name(kind)} {{", + " pub fn parse(x: &mut impl Iterator) -> Option {", + " let data = x.next()?;", + f" let value = spirv::{as_name(kind)}::from_u32(data)?;", + " Some(Self { value })", + " }", + "}", + ] + return out + +def make_operand_kind_typedef_Id(kind: str, operand_kind: Any) -> List[str]: + out = [] + out += [ + f"#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", + f"pub struct Operand_{as_name(kind)} {{", + f" pub id: u32,", + f"}}", + ] + out += [ + f"impl Operand_{as_name(kind)} {{", + f" pub fn parse(x: &mut impl Iterator) -> Option {{", + f" let id = x.next()?;", + f" Some(Self {{ id }})", + f" }}", + f"}}", + ] + return out + +def make_operand_kind_typedef_Literal(kind: str, operand_kind: Any) -> List[str]: + out = [] + out += [ + f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", + f"pub struct Operand_{as_name(kind)} {{", + f" pub value: Vec,", + f"}}", + ] + if kind == 'LiteralContextDependentNumber': + out += [ + f"impl Operand_{as_name(kind)} {{", + f" pub fn parse(x: &mut impl Iterator) -> Option {{", + f" let mut value = Vec::new();", + f" while let Some(data) = x.next() {{", + f" value.push(data);", + f" }}", + f" Some(Self {{ value }})", + f" }}", + f"}}", + ] + else: + out += [ + f"impl Operand_{as_name(kind)} {{", + f" pub fn parse(x: &mut impl Iterator) -> Option {{", + f" if let Some(data) = x.next() {{", + f" Some(Self {{ value: vec![data] }})", + f" }} else {{", + f" None", + f" }}", + f" }}", + f"}}", + ] + return out + +def make_operand_kind_typedef_Composite(kind: str, operand_kind: Any) -> List[str]: + out = [] + operand_kind = operand_kinds[kind] + bases = operand_kind['bases'] + out += [ + f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", + f"pub struct Operand_{as_name(kind)} {{", + ] + for i, base in enumerate(bases): + out += [ + f" pub _{i}: Operand_{base},", + ] + out += [ + f"}}", + ] + out += [ + f"impl Operand_{as_name(kind)} {{", + f" pub fn parse(x: &mut impl Iterator) -> Option {{", + f" Some(Self {{", + ] + for i, base in enumerate(bases): + out += [ + f" _{i}: Operand_{base}::parse(x)?,", + ] + out += [ + f" }})", + f" }}", + f"}}", + ] + return out + +def make_operand_kind_typedef(kind: str, operand_kinds: Dict[str, Any]) -> List[str]: + out = [] + operand_kind = operand_kinds[kind] + kind = operand_kind['kind'] + category = operand_kind['category'] + if category == 'BitEnum': + out += make_operand_kind_typedef_BitEnum(kind, operand_kind) + elif category == 'ValueEnum': + out += make_operand_kind_typedef_ValueEnum(kind, operand_kind) + elif category == 'Id': + out += make_operand_kind_typedef_Id(kind, operand_kind) + elif category == 'Literal': + out += make_operand_kind_typedef_Literal(kind, operand_kind) + elif category == 'Composite': + out += make_operand_kind_typedef_Composite(kind, operand_kind) + else: + assert False, f"Unknown category: {category}" + + out += [ + f"impl Into for Operand_{as_name(kind)} {{", + f" fn into(self) -> Operand {{", + f" Operand::{kind}(self)", + f" }}", + f"}}", + "", + ] + + return out + +def make_operand_kind_section(operand_kinds: Dict[str, Any]) -> List[str]: + out = [] + + for kind in operand_kinds: + out += make_operand_kind_typedef(kind, operand_kinds) + + out += [ + "enum Operand {", + ] + for kind in operand_kinds: + out += [f" {kind}(Operand_{kind}),"] + out += [ + "}", + "", + ] + return out + +def make_parse_operand_section(operand_kinds: Dict[str, Any]) -> List[str]: + out = [] + for operand in operand_kinds.values(): + kind = operand['kind'] + quantifier = operand['quantifier'] if 'quantifier' in operand else None + out += [f"fn parse_{kind}<'a>(operands: &'a mut impl Iterator, out: &mut Vec) -> Operand<'a> {{"] + print(kind, quantifier) + if quantifier is None: + out += [ + " let data: u32 = operands.next().unwrap();", + f" out.push(Operand::{kind}(Operand_{kind}::parse(data)));", + ] + else: + print(f"{kind} is quantified with {quantifier} but parameter quantification is not allowed yet.") + continue + out += ["}"] + return out + +def parse_instruction_operand(operand: Any) -> List[str]: + out = [] + kind = operand['kind'] + quantifier = operand['quantifier'] if 'quantifier' in operand else None + if quantifier is None: + out += [ + " if operands.peek().is_some() {", + f" out_operands.push(Operand_{kind}::parse(data)?.into());", + " } else {", + f" anyhow::bail!(\"Expected operand {kind} but none found\");", + " }", + ] + elif quantifier == '?': + out += [ + " if operands.peek().is_some() {", + f" out_operands.push(Operand_{kind}::parse(data)?.into());", + " }", + ] + elif quantifier == '*': + out += [ + " while operands.peek().is_some() {", + f" out_operands.push(Operand_{kind}::parse(data)?.into());", + " }", + ] + else: + print(f"{kind} is quantified with {quantifier} but parameter quantification is not allowed yet.") + + return out + +def make_parse_instruction(instruction: Any) -> List[str]: + out = [] + opname = instruction['opname'] + clazz = instruction['class'] + opcode = instruction['opcode'] + operands = instruction['operands'] if 'operands' in instruction else [] + + out += [ + f"fn parse_{opname}<'a>(operands: &[u32], out_operands: &mut Vec) -> Result<()> {{", + f" let mut data = operands.iter().peek().copied();", + ] + for operand in operands: + out += parse_instruction_operand(operand) + out += [ + " Ok(())", + "}", + ] + + return out + +def make_parse_instructions(instructions: Any) -> List[str]: + out = [] + for instruction in instructions: + out += make_parse_instruction(instruction) + + out += [ + "fn parse_instruction(opcode: u16, operands: &[u32]) -> Result {", + " let out_operands = Vec::new();", + " match opcode {" + ] + for instruction in instructions: + opname = instruction['opname'] + opcode = instruction['opcode'] + out += [ + f" {opcode} => parse_{opname}(operands, &mut out_operands),", + ] + out += [ + f" _ => anyhow::bail!(\"Unknown opcode: {{}}\", opcode),", + " }", + " let out = Instruction {", + " opcode,", + " operands: Vec::new(),", + " };", + " Ok(Instruction {", + " opcode,", + " operands: out_operands,", + " })", + "}", + "", + ] + + out += [ + "pub fn parse(words: &[u32]) -> Result> {", + " let mut out = Vec::new();", + " let mut words = words.iter();", + " while let Some(opcode) = words.next() {", + " let word_count = (opcode >> 16) & 0xffff;", + " let opcode = opcode & 0xffff;", + " let mut operands = Vec::new();", + " for _ in 0..word_count {", + " operands.push(words.next().copied().unwrap());", + " }", + " out.push(parse_instruction(opcode, &operands)?);", + " }", + " Ok(out)", + "}", + "", + ] + + return out + + +lines = [] +lines += make_header() +lines += make_type_defs() +lines += make_operand_kind_section(operand_kinds) +#lines += make_parse_operand_section(operand_kinds) +lines += make_parse_instructions(instructions) + +lines = '\n'.join(lines) + +with open('src/spirv_core_grammar.rs', 'w') as f: + f.write(lines) diff --git a/spirq-dis/src/lib.rs b/spirq-dis/src/lib.rs new file mode 100644 index 0000000..d2df560 --- /dev/null +++ b/spirq-dis/src/lib.rs @@ -0,0 +1,39 @@ +use spirq_core::parse::{Instr, SpirvBinary, Instrs}; + +struct Disassembler { +} +impl Disassembler { + pub fn apply(self, spv: &SpirvBinary) -> String { + let mut out = String::new(); + + if let Some(header) = spv.header() { + out.push_str(&format!("; SPIR-V\n")); + let major_version = header.version >> 16; + let minor_version = header.version & 0xffff; + out.push_str(&format!("; Version: {}.{}\n", major_version, minor_version)); + out.push_str(&format!("; Generator: {:x}\n", header.generator)); + out.push_str(&format!("; Bound: {:x}\n", header.bound)); + out.push_str(&format!("; Schema: {:x}\n", header.schema)); + } + + for instr in Instrs::new(spv.words()) { + //result.push_str(&format!("{:?}\n", instr)); + } + out + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_simple() { + let spv = [ + 0x07230203, 0x00010000, 0x00000008, 0x0000001, 0x00000000 + ].iter().map(|x| *x as u32).collect::>(); + let spv = SpirvBinary::from(spv); + let out = Disassembler{}.apply(&spv); + assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0\n"); + } +} From bd76319cf8b81ad3480e31cb3d2ae845fe3c318b Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Sat, 16 Dec 2023 16:43:31 +0800 Subject: [PATCH 02/50] Tokenizer --- Cargo.lock | 9 + Cargo.toml | 1 + comp.spv | Bin 0 -> 288 bytes spirq-as/Cargo.toml | 22 +++ spirq-as/README.md | 16 ++ spirq-as/src/lib.rs | 398 +++++++++++++++++++++++++++++++++++++++++++ spirq-dis/Cargo.toml | 5 +- spirq-dis/src/lib.rs | 4 + x.comp | 5 + 9 files changed, 458 insertions(+), 2 deletions(-) create mode 100644 comp.spv create mode 100644 spirq-as/Cargo.toml create mode 100644 spirq-as/README.md create mode 100644 spirq-as/src/lib.rs create mode 100644 x.comp diff --git a/Cargo.lock b/Cargo.lock index c3b6d52..4e7d954 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,6 +348,14 @@ dependencies = [ "spirq-core", ] +[[package]] +name = "spirq-as" +version = "0.2.3" +dependencies = [ + "anyhow", + "spirq-core", +] + [[package]] name = "spirq-core" version = "1.0.0" @@ -363,6 +371,7 @@ dependencies = [ name = "spirq-dis" version = "0.2.3" dependencies = [ + "anyhow", "spirq-core", ] diff --git a/Cargo.toml b/Cargo.toml index dc81831..ed7d9bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,5 +3,6 @@ members = [ "spirq", "spirq-core", "spirq-dis", + "spirq-as", "shader-reflect", ] diff --git a/comp.spv b/comp.spv new file mode 100644 index 0000000000000000000000000000000000000000..af570d2b1810b4c5c10fd52abf8d5e0d657ff9df GIT binary patch literal 288 zcmYk0!3qIk6oro&!!U(OS(BxjD5R9E*w}f3DH{tmyoHOuiyJTXMyV6{ukHIz#GDF5IO(= literal 0 HcmV?d00001 diff --git a/spirq-as/Cargo.toml b/spirq-as/Cargo.toml new file mode 100644 index 0000000..bef0e29 --- /dev/null +++ b/spirq-as/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "spirq-as" +version = "0.2.3" +authors = ["PENGUINLIONG "] +edition = "2018" +license = "MIT OR Apache-2.0" +description = "SPIR-V assembler" +repository = "https://github.com/PENGUINLIONG/spirq-rs" +homepage = "https://github.com/PENGUINLIONG/spirq-rs" +documentation = "https://docs.rs/spirq-as" +categories = ["graphics"] +readme = "README.md" +keywords = ["spirv"] + +[badges] +maintenance = { status = "actively-developed" } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1.0" +spirq-core = { version = "1.0.0", path = "../spirq-core" } diff --git a/spirq-as/README.md b/spirq-as/README.md new file mode 100644 index 0000000..38528d3 --- /dev/null +++ b/spirq-as/README.md @@ -0,0 +1,16 @@ +# SPIR-Q Disassembler + +[![Build Status](https://travis-ci.com/PENGUINLIONG/spirq-rs.svg?branch=master)](https://travis-ci.com/PENGUINLIONG/spirq-rs) +[![Crate](https://img.shields.io/crates/v/spirq-dis)](https://crates.io/crates/spirq-dis) +[![Documentation](https://docs.rs/spirq-dis/badge.svg)](https://docs.rs/spirq-dis) + +SPIR-Q Disassembler is a SPIR-V disassembler written in pure Rust. + +## License + +This project is licensed under either of + +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs new file mode 100644 index 0000000..b77f436 --- /dev/null +++ b/spirq-as/src/lib.rs @@ -0,0 +1,398 @@ +use std::iter::Peekable; +use std::rc::Rc; +use std::str::Chars; +use std::str::FromStr; + +use anyhow::{anyhow, bail, Error, Result}; +use spirq_core::parse::{Instr, SpirvBinary, Instrs, bin::SpirvHeader}; +use spirq_core::ty::TypeRegistry; + +#[derive(Debug)] +enum Lit { + Int(i64), + // Base numeric and the exponent bias. The effect of the bias depends on the + // actual floating-point type it casts to. + Float(f64, i32), + String(String), +} + +#[derive(Debug)] +enum Token { + Comment(String), + Literal(Lit), + Ident(String), + Eq, +} + +struct Tokenizer<'a> { + chars: Box>>, +} +impl<'a> Tokenizer<'a> { + pub fn new(code: &'a str) -> Self { + Tokenizer { + chars: Box::new(code.chars().peekable()), + } + } + + pub fn tokenize_comment(&mut self) -> Result { + self.chars.next(); // Consume the initial ';'. + + let mut comment = String::new(); + while let Some(c) = self.chars.peek() { + if *c == '\n' { + break; + } + comment.push(*c); + self.chars.next(); + } + return Ok(Token::Comment(comment)); + } + + pub fn tokenize_numeric_literal_decimal(&mut self) -> Result { + let mut buf = String::new(); + buf.push('0'); // So that we can tolerate numerics failed from hexadecimal parsing. + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + let lit = match self.chars.peek() { + Some('.') => { + // Float. + buf.push('.'); + self.chars.next(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + if let Some(c) = self.chars.peek() { + if c == &'e' || c == &'E' { + // Float with exponent. + buf.push(*c); + self.chars.next(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() || c == &'+' || c == &'-' { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + } + } + Lit::Float(f64::from_str(buf.as_str())?, 0) + }, + _ => { + // Integer. + Lit::Int(i64::from_str(buf.as_str())?) + }, + }; + Ok(lit) + } + + pub fn tokenize_numeric_literal_hexadecimal(&mut self) -> Result { + let mut buf = String::new(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_hexdigit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + // In form of `0x1p0`. + let lit = if Some(&'.') == self.chars.peek() && buf == "1" { + // Float. + buf.push('.'); + + // In form of `0x1.2p0`. + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + + let mantissa = f64::from_str(buf.as_str())?; + let mut exponent_bias = 0; + + if let Some(c) = self.chars.peek() { + if c == &'p' || c == &'P' { + self.chars.next(); // Consume the 'p' or 'P'. + + // Float with exponent. + let mut exponent_bias_buf = String::new(); + match self.chars.peek() { + Some('+') => { + self.chars.next(); + }, + Some('-') => { + exponent_bias_buf.push('-'); + self.chars.next(); + }, + _ => {}, + } + loop { + if let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + exponent_bias_buf.push(*c); + self.chars.next(); + } else { + break; + } + } + } + exponent_bias = i32::from_str(&exponent_bias_buf)?; + } + } + + Lit::Float(mantissa, exponent_bias) + } else { + // Integer. + Lit::Int(i64::from_str_radix(buf.as_str(), 16)?) + }; + + Ok(lit) + } + + /// Tokenize a SPIR-V assembly numeric literal that can be decimal, hexadecimal, + /// decimal and hexadecimal numbers. + pub fn tokenize_numeric_literal(&mut self) -> Result { + let c = *self.chars.peek() + .ok_or_else(|| anyhow!("unexpected end of input"))?; + + let mantissa_sign = match c { + '+' => { + self.chars.next(); + 1 + }, + '-' => { + self.chars.next(); + -1 + }, + _ => 1, + }; + + let lit = if c == '0' { + self.chars.next(); // Consume the initial '0'. + match self.chars.peek() { + Some('x') | Some('X') => { + // Hexadecimal. + self.chars.next(); // Consume the 'x' or 'X'. + self.tokenize_numeric_literal_hexadecimal()? + }, + _ => { + // Decimal. + self.tokenize_numeric_literal_decimal()? + }, + } + } else { + // Decimal. + self.tokenize_numeric_literal_decimal()? + }; + let lit = match lit { + Lit::Int(i) => Lit::Int(i * mantissa_sign), + Lit::Float(f, e) => Lit::Float(f * mantissa_sign as f64, e), + Lit::String(_) => unreachable!(), + }; + + let token = Token::Literal(lit); + Ok(token) + } + + pub fn tokenize_string_literal(&mut self) -> Result { + self.chars.next(); // Consume the initial '"'. + + let mut string = String::new(); + let mut escape = false; + + loop { + let c = self.chars.next() + .ok_or_else(|| anyhow!("unexpected end of input"))?; + if escape { + // Escaped character. + escape = false; + string.push(c) + } else { + match c { + '\\' => { + escape = true; + continue; + }, + '"' => break, + _ => string.push(c), + } + } + } + let lit = Lit::String(string); + let token = Token::Literal(lit); + + return Ok(token); + } + + pub fn tokenize_ident(&mut self) -> Result { + let mut ident = String::new(); + let mut c = self.chars.next() + .ok_or_else(|| anyhow!("unexpected end of input"))?; + while c.is_ascii_alphanumeric() || c == '_' { + ident.push(c); + c = self.chars.next() + .ok_or_else(|| anyhow!("unexpected end of input"))?; + } + return Ok(Token::Ident(ident)); + } + + pub fn tokenize(&mut self) -> Result> { + if let Some(c) = self.chars.peek() { + // Ignore LWS. + if c.is_ascii_whitespace() { + self.chars.next(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_whitespace() { + self.chars.next(); + } else { + break; + } + } + return self.tokenize(); + } + + // Comments. + if c == &';' { + let token = self.tokenize_comment()?; + return Ok(Some(token)); + } + + // Punctuations. + if c == &'=' { + let token = Token::Eq; + return Ok(Some(token)); + } + + // Literal numerics. + if c == &'-' || c.is_ascii_digit() { + let token = self.tokenize_numeric_literal(); + return Ok(Some(token?)); + } + + // Literal string. + if c == &'"' { + let token = self.tokenize_string_literal()?; + return Ok(Some(token)); + } + + // Identifiers. + if c.is_ascii_alphabetic() || c == &'_' { + let token = self.tokenize_ident()?; + return Ok(Some(token)); + } + + bail!("unexpected character: {}", c); + + } else { + return Ok(None); + } + } +} +impl<'a> Iterator for Tokenizer<'a> { + type Item = Result; + + fn next(&mut self) -> Option { + self.tokenize().transpose() + } +} + + + +fn tokenize(code: &str) -> Result> { + let tokenizer = Tokenizer::new(code); + let tokens = tokenizer.collect::>>(); + tokens +} + + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_tokenize_nothing() { + let code = ""; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 0); + } + + #[test] + fn test_tokenize_integers() { + let code = "0 1 2 3 4 5 6 7 8 9"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 10); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Int(n)) => assert_eq!(*n, i as i64), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_floats() { + let code = "0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, i as f64), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_floats_with_exponent() { + let code = "0.0e0 1.0e1 2.0e2 3.0e3 4.0e4 5.0e5 6.0e6 7.0e7"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_floats_with_exponent_and_sign() { + let code = "0.0e+0 1.0e-1 2.0e+2 3.0e-3 4.0e+4 5.0e-5 6.0e+6 7.0e-7"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 }))), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_hexadecimal_integers() { + let code = "0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Int(n)) => assert_eq!(*n, i as i64), + _ => panic!("unexpected token: {:?}", token), + } + } + } +} diff --git a/spirq-dis/Cargo.toml b/spirq-dis/Cargo.toml index af310d8..d136bb6 100644 --- a/spirq-dis/Cargo.toml +++ b/spirq-dis/Cargo.toml @@ -7,10 +7,10 @@ license = "MIT OR Apache-2.0" description = "SPIR-V disassembler" repository = "https://github.com/PENGUINLIONG/spirq-rs" homepage = "https://github.com/PENGUINLIONG/spirq-rs" -documentation = "https://docs.rs/spirq" +documentation = "https://docs.rs/spirq-dis" categories = ["graphics"] readme = "README.md" -keywords = ["spirv", "vulkan", "opengl", "glsl", "hlsl"] +keywords = ["spirv"] [badges] maintenance = { status = "actively-developed" } @@ -18,4 +18,5 @@ maintenance = { status = "actively-developed" } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +anyhow = "1.0" spirq-core = { version = "1.0.0", path = "../spirq-core" } diff --git a/spirq-dis/src/lib.rs b/spirq-dis/src/lib.rs index d2df560..e6c8f71 100644 --- a/spirq-dis/src/lib.rs +++ b/spirq-dis/src/lib.rs @@ -36,4 +36,8 @@ mod test { let out = Disassembler{}.apply(&spv); assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0\n"); } + + #[test] + fn test_nop() { + } } diff --git a/x.comp b/x.comp new file mode 100644 index 0000000..bb24944 --- /dev/null +++ b/x.comp @@ -0,0 +1,5 @@ +#version 460 + +void main() { + double a = 1.4e32; +} From 347bcb4f88d06ef915c819ea3eb37261aaf756ae Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Sat, 16 Dec 2023 17:12:48 +0800 Subject: [PATCH 03/50] More tests --- spirq-as/src/lib.rs | 108 +++++++++++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 27 deletions(-) diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs index b77f436..6fe31a6 100644 --- a/spirq-as/src/lib.rs +++ b/spirq-as/src/lib.rs @@ -111,6 +111,7 @@ impl<'a> Tokenizer<'a> { let lit = if Some(&'.') == self.chars.peek() && buf == "1" { // Float. buf.push('.'); + self.chars.next(); // Consume the '.'. // In form of `0x1.2p0`. while let Some(c) = self.chars.peek() { @@ -123,39 +124,37 @@ impl<'a> Tokenizer<'a> { } let mantissa = f64::from_str(buf.as_str())?; - let mut exponent_bias = 0; + let mut exponent = 0; if let Some(c) = self.chars.peek() { if c == &'p' || c == &'P' { self.chars.next(); // Consume the 'p' or 'P'. // Float with exponent. - let mut exponent_bias_buf = String::new(); + let mut exponent_buf = String::new(); match self.chars.peek() { Some('+') => { self.chars.next(); }, Some('-') => { - exponent_bias_buf.push('-'); + exponent_buf.push('-'); self.chars.next(); }, _ => {}, } - loop { - if let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - exponent_bias_buf.push(*c); - self.chars.next(); - } else { - break; - } + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + exponent_buf.push(*c); + self.chars.next(); + } else { + break; } } - exponent_bias = i32::from_str(&exponent_bias_buf)?; + exponent = i32::from_str(&exponent_buf)?; } } - Lit::Float(mantissa, exponent_bias) + Lit::Float(mantissa, exponent) } else { // Integer. Lit::Int(i64::from_str_radix(buf.as_str(), 16)?) @@ -167,16 +166,14 @@ impl<'a> Tokenizer<'a> { /// Tokenize a SPIR-V assembly numeric literal that can be decimal, hexadecimal, /// decimal and hexadecimal numbers. pub fn tokenize_numeric_literal(&mut self) -> Result { - let c = *self.chars.peek() + let mut c = *self.chars.peek() .ok_or_else(|| anyhow!("unexpected end of input"))?; let mantissa_sign = match c { - '+' => { - self.chars.next(); - 1 - }, '-' => { self.chars.next(); + c = *self.chars.peek() + .ok_or_else(|| anyhow!("unexpected end of input"))?; -1 }, _ => 1, @@ -215,9 +212,7 @@ impl<'a> Tokenizer<'a> { let mut string = String::new(); let mut escape = false; - loop { - let c = self.chars.next() - .ok_or_else(|| anyhow!("unexpected end of input"))?; + while let Some(c) = self.chars.next() { if escape { // Escaped character. escape = false; @@ -241,12 +236,13 @@ impl<'a> Tokenizer<'a> { pub fn tokenize_ident(&mut self) -> Result { let mut ident = String::new(); - let mut c = self.chars.next() - .ok_or_else(|| anyhow!("unexpected end of input"))?; - while c.is_ascii_alphanumeric() || c == '_' { - ident.push(c); - c = self.chars.next() - .ok_or_else(|| anyhow!("unexpected end of input"))?; + while let Some(c) = self.chars.peek() { + if c.is_ascii_alphanumeric() || c == &'_' { + ident.push(*c); + self.chars.next(); + } else { + break; + } } return Ok(Token::Ident(ident)); } @@ -395,4 +391,62 @@ mod test { } } } + + #[test] + fn test_tokenize_hexadecimal_floats() { + let code = "0x1.0p0 0x1.1p+1 0x1.2p-2 -0x1.3p3 -0x1.4p+4 -0x1.5p-5"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 6); + for ((mantissa, exponent), token) in [(1.0, 0), (1.1, 1), (1.2, -2), (-1.3, 3), (-1.4, 4), (-1.5, -5)].iter().zip(tokens.iter()) { + match token { + Token::Literal(Lit::Float(n, e)) => { + assert_eq!(*n, *mantissa); + assert_eq!(*e, *exponent); + }, + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_string_literals() { + let code = r#""" "a" "ab" "abc" "abcd""#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 5); + let expected = ["", "a", "ab", "abc", "abcd"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::String(s)) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_string_literals_escape() { + let code = r#""\"\\\""#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 1); + let expected = r#""\""#; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::String(s)) => assert_eq!(s, expected), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_identifiers() { + let code = r#"a ab abc abcd abcd1 abcd12 abcd123"#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 7); + let expected = ["a", "ab", "abc", "abcd", "abcd1", "abcd12", "abcd123"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Ident(s) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } } From 853fdf52a671d2e431d6a999127c7c3553c9af02 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Sat, 16 Dec 2023 17:16:06 +0800 Subject: [PATCH 04/50] More tests --- spirq-as/src/lib.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs index 6fe31a6..3c87f7e 100644 --- a/spirq-as/src/lib.rs +++ b/spirq-as/src/lib.rs @@ -270,6 +270,7 @@ impl<'a> Tokenizer<'a> { // Punctuations. if c == &'=' { + self.chars.next(); // Consume the '='. let token = Token::Eq; return Ok(Some(token)); } @@ -449,4 +450,35 @@ mod test { } } } + + #[test] + fn test_tokenize_comments() { + let code = r#"; a +; ab +; abc +; abcd +; abcd1 +; abcd12 +; abcd123"#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 7); + let expected = [" a", " ab", " abc", " abcd", " abcd1", " abcd12", " abcd123"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Comment(s) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_eq() { + let code = r#"="#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 1); + match tokens[0] { + Token::Eq => {}, + _ => panic!("unexpected token: {:?}", tokens[0]), + } + } } From 92b5d63d30315eccbe79a8050c34df02e6f74c4d Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 18 Dec 2023 14:46:41 +0800 Subject: [PATCH 05/50] IdRef parsing --- spirq-as/src/lib.rs | 47 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs index 3c87f7e..6521d0e 100644 --- a/spirq-as/src/lib.rs +++ b/spirq-as/src/lib.rs @@ -21,6 +21,7 @@ enum Token { Comment(String), Literal(Lit), Ident(String), + IdRef(String), Eq, } @@ -48,6 +49,20 @@ impl<'a> Tokenizer<'a> { return Ok(Token::Comment(comment)); } + pub fn tokenize_idref(&mut self) -> Result { + self.chars.next(); // Consume the '%'. + + let mut buf = String::new(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_alphanumeric() || c == &'_' { + buf.push(*c); + } else { + break; + } + } + return Ok(Token::IdRef(buf)); + } + pub fn tokenize_numeric_literal_decimal(&mut self) -> Result { let mut buf = String::new(); buf.push('0'); // So that we can tolerate numerics failed from hexadecimal parsing. @@ -261,38 +276,44 @@ impl<'a> Tokenizer<'a> { } return self.tokenize(); } - + // Comments. if c == &';' { let token = self.tokenize_comment()?; return Ok(Some(token)); } - + // Punctuations. if c == &'=' { self.chars.next(); // Consume the '='. let token = Token::Eq; return Ok(Some(token)); } - + + // IdRefs. + if c == &'%' { + let token = self.tokenize_idref()?; + return Ok(Some(token)); + } + // Literal numerics. if c == &'-' || c.is_ascii_digit() { let token = self.tokenize_numeric_literal(); return Ok(Some(token?)); } - + // Literal string. if c == &'"' { let token = self.tokenize_string_literal()?; return Ok(Some(token)); } - + // Identifiers. if c.is_ascii_alphabetic() || c == &'_' { let token = self.tokenize_ident()?; return Ok(Some(token)); } - + bail!("unexpected character: {}", c); } else { @@ -471,6 +492,20 @@ mod test { } } + #[test] + fn test_tokenize_idref() { + let code = r#"%1 %123 %abc %abc123"#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 4); + let expected = ["1", "123", "abc", "abc123"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::IdRef(s) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + #[test] fn test_tokenize_eq() { let code = r#"="#; From 175500e0c44a5b53f3b588950f90dac45b5bdd7f Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 18 Dec 2023 15:44:11 +0800 Subject: [PATCH 06/50] Create a file for tokenizer --- spirq-as/src/lib.rs | 520 +------------------------------------- spirq-as/src/tokenizer.rs | 519 +++++++++++++++++++++++++++++++++++++ 2 files changed, 523 insertions(+), 516 deletions(-) create mode 100644 spirq-as/src/tokenizer.rs diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs index 6521d0e..27bdda7 100644 --- a/spirq-as/src/lib.rs +++ b/spirq-as/src/lib.rs @@ -1,519 +1,7 @@ -use std::iter::Peekable; -use std::rc::Rc; -use std::str::Chars; -use std::str::FromStr; +mod tokenizer; -use anyhow::{anyhow, bail, Error, Result}; -use spirq_core::parse::{Instr, SpirvBinary, Instrs, bin::SpirvHeader}; -use spirq_core::ty::TypeRegistry; +use tokenizer::{Token, Tokenizer}; -#[derive(Debug)] -enum Lit { - Int(i64), - // Base numeric and the exponent bias. The effect of the bias depends on the - // actual floating-point type it casts to. - Float(f64, i32), - String(String), -} - -#[derive(Debug)] -enum Token { - Comment(String), - Literal(Lit), - Ident(String), - IdRef(String), - Eq, -} - -struct Tokenizer<'a> { - chars: Box>>, -} -impl<'a> Tokenizer<'a> { - pub fn new(code: &'a str) -> Self { - Tokenizer { - chars: Box::new(code.chars().peekable()), - } - } - - pub fn tokenize_comment(&mut self) -> Result { - self.chars.next(); // Consume the initial ';'. - - let mut comment = String::new(); - while let Some(c) = self.chars.peek() { - if *c == '\n' { - break; - } - comment.push(*c); - self.chars.next(); - } - return Ok(Token::Comment(comment)); - } - - pub fn tokenize_idref(&mut self) -> Result { - self.chars.next(); // Consume the '%'. - - let mut buf = String::new(); - while let Some(c) = self.chars.peek() { - if c.is_ascii_alphanumeric() || c == &'_' { - buf.push(*c); - } else { - break; - } - } - return Ok(Token::IdRef(buf)); - } - - pub fn tokenize_numeric_literal_decimal(&mut self) -> Result { - let mut buf = String::new(); - buf.push('0'); // So that we can tolerate numerics failed from hexadecimal parsing. - while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - buf.push(*c); - self.chars.next(); - } else { - break; - } - } - let lit = match self.chars.peek() { - Some('.') => { - // Float. - buf.push('.'); - self.chars.next(); - while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - buf.push(*c); - self.chars.next(); - } else { - break; - } - } - if let Some(c) = self.chars.peek() { - if c == &'e' || c == &'E' { - // Float with exponent. - buf.push(*c); - self.chars.next(); - while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() || c == &'+' || c == &'-' { - buf.push(*c); - self.chars.next(); - } else { - break; - } - } - } - } - Lit::Float(f64::from_str(buf.as_str())?, 0) - }, - _ => { - // Integer. - Lit::Int(i64::from_str(buf.as_str())?) - }, - }; - Ok(lit) - } - - pub fn tokenize_numeric_literal_hexadecimal(&mut self) -> Result { - let mut buf = String::new(); - while let Some(c) = self.chars.peek() { - if c.is_ascii_hexdigit() { - buf.push(*c); - self.chars.next(); - } else { - break; - } - } - // In form of `0x1p0`. - let lit = if Some(&'.') == self.chars.peek() && buf == "1" { - // Float. - buf.push('.'); - self.chars.next(); // Consume the '.'. - - // In form of `0x1.2p0`. - while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - buf.push(*c); - self.chars.next(); - } else { - break; - } - } - - let mantissa = f64::from_str(buf.as_str())?; - let mut exponent = 0; - - if let Some(c) = self.chars.peek() { - if c == &'p' || c == &'P' { - self.chars.next(); // Consume the 'p' or 'P'. - - // Float with exponent. - let mut exponent_buf = String::new(); - match self.chars.peek() { - Some('+') => { - self.chars.next(); - }, - Some('-') => { - exponent_buf.push('-'); - self.chars.next(); - }, - _ => {}, - } - while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - exponent_buf.push(*c); - self.chars.next(); - } else { - break; - } - } - exponent = i32::from_str(&exponent_buf)?; - } - } - - Lit::Float(mantissa, exponent) - } else { - // Integer. - Lit::Int(i64::from_str_radix(buf.as_str(), 16)?) - }; - - Ok(lit) - } - - /// Tokenize a SPIR-V assembly numeric literal that can be decimal, hexadecimal, - /// decimal and hexadecimal numbers. - pub fn tokenize_numeric_literal(&mut self) -> Result { - let mut c = *self.chars.peek() - .ok_or_else(|| anyhow!("unexpected end of input"))?; - - let mantissa_sign = match c { - '-' => { - self.chars.next(); - c = *self.chars.peek() - .ok_or_else(|| anyhow!("unexpected end of input"))?; - -1 - }, - _ => 1, - }; - - let lit = if c == '0' { - self.chars.next(); // Consume the initial '0'. - match self.chars.peek() { - Some('x') | Some('X') => { - // Hexadecimal. - self.chars.next(); // Consume the 'x' or 'X'. - self.tokenize_numeric_literal_hexadecimal()? - }, - _ => { - // Decimal. - self.tokenize_numeric_literal_decimal()? - }, - } - } else { - // Decimal. - self.tokenize_numeric_literal_decimal()? - }; - let lit = match lit { - Lit::Int(i) => Lit::Int(i * mantissa_sign), - Lit::Float(f, e) => Lit::Float(f * mantissa_sign as f64, e), - Lit::String(_) => unreachable!(), - }; - - let token = Token::Literal(lit); - Ok(token) - } - - pub fn tokenize_string_literal(&mut self) -> Result { - self.chars.next(); // Consume the initial '"'. - - let mut string = String::new(); - let mut escape = false; - - while let Some(c) = self.chars.next() { - if escape { - // Escaped character. - escape = false; - string.push(c) - } else { - match c { - '\\' => { - escape = true; - continue; - }, - '"' => break, - _ => string.push(c), - } - } - } - let lit = Lit::String(string); - let token = Token::Literal(lit); - - return Ok(token); - } - - pub fn tokenize_ident(&mut self) -> Result { - let mut ident = String::new(); - while let Some(c) = self.chars.peek() { - if c.is_ascii_alphanumeric() || c == &'_' { - ident.push(*c); - self.chars.next(); - } else { - break; - } - } - return Ok(Token::Ident(ident)); - } - - pub fn tokenize(&mut self) -> Result> { - if let Some(c) = self.chars.peek() { - // Ignore LWS. - if c.is_ascii_whitespace() { - self.chars.next(); - while let Some(c) = self.chars.peek() { - if c.is_ascii_whitespace() { - self.chars.next(); - } else { - break; - } - } - return self.tokenize(); - } - - // Comments. - if c == &';' { - let token = self.tokenize_comment()?; - return Ok(Some(token)); - } - - // Punctuations. - if c == &'=' { - self.chars.next(); // Consume the '='. - let token = Token::Eq; - return Ok(Some(token)); - } - - // IdRefs. - if c == &'%' { - let token = self.tokenize_idref()?; - return Ok(Some(token)); - } - - // Literal numerics. - if c == &'-' || c.is_ascii_digit() { - let token = self.tokenize_numeric_literal(); - return Ok(Some(token?)); - } - - // Literal string. - if c == &'"' { - let token = self.tokenize_string_literal()?; - return Ok(Some(token)); - } - - // Identifiers. - if c.is_ascii_alphabetic() || c == &'_' { - let token = self.tokenize_ident()?; - return Ok(Some(token)); - } - - bail!("unexpected character: {}", c); - - } else { - return Ok(None); - } - } -} -impl<'a> Iterator for Tokenizer<'a> { - type Item = Result; - - fn next(&mut self) -> Option { - self.tokenize().transpose() - } -} - - - -fn tokenize(code: &str) -> Result> { - let tokenizer = Tokenizer::new(code); - let tokens = tokenizer.collect::>>(); - tokens -} - - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_tokenize_nothing() { - let code = ""; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 0); - } - - #[test] - fn test_tokenize_integers() { - let code = "0 1 2 3 4 5 6 7 8 9"; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 10); - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::Int(n)) => assert_eq!(*n, i as i64), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_floats() { - let code = "0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0"; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 8); - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, i as f64), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_floats_with_exponent() { - let code = "0.0e0 1.0e1 2.0e2 3.0e3 4.0e4 5.0e5 6.0e6 7.0e7"; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 8); - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_floats_with_exponent_and_sign() { - let code = "0.0e+0 1.0e-1 2.0e+2 3.0e-3 4.0e+4 5.0e-5 6.0e+6 7.0e-7"; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 8); - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 }))), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_hexadecimal_integers() { - let code = "0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7"; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 8); - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::Int(n)) => assert_eq!(*n, i as i64), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_hexadecimal_floats() { - let code = "0x1.0p0 0x1.1p+1 0x1.2p-2 -0x1.3p3 -0x1.4p+4 -0x1.5p-5"; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 6); - for ((mantissa, exponent), token) in [(1.0, 0), (1.1, 1), (1.2, -2), (-1.3, 3), (-1.4, 4), (-1.5, -5)].iter().zip(tokens.iter()) { - match token { - Token::Literal(Lit::Float(n, e)) => { - assert_eq!(*n, *mantissa); - assert_eq!(*e, *exponent); - }, - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_string_literals() { - let code = r#""" "a" "ab" "abc" "abcd""#; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 5); - let expected = ["", "a", "ab", "abc", "abcd"]; - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::String(s)) => assert_eq!(s, expected[i]), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_string_literals_escape() { - let code = r#""\"\\\""#; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 1); - let expected = r#""\""#; - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Literal(Lit::String(s)) => assert_eq!(s, expected), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_identifiers() { - let code = r#"a ab abc abcd abcd1 abcd12 abcd123"#; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 7); - let expected = ["a", "ab", "abc", "abcd", "abcd1", "abcd12", "abcd123"]; - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Ident(s) => assert_eq!(s, expected[i]), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_comments() { - let code = r#"; a -; ab -; abc -; abcd -; abcd1 -; abcd12 -; abcd123"#; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 7); - let expected = [" a", " ab", " abc", " abcd", " abcd1", " abcd12", " abcd123"]; - for (i, token) in tokens.iter().enumerate() { - match token { - Token::Comment(s) => assert_eq!(s, expected[i]), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_idref() { - let code = r#"%1 %123 %abc %abc123"#; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 4); - let expected = ["1", "123", "abc", "abc123"]; - for (i, token) in tokens.iter().enumerate() { - match token { - Token::IdRef(s) => assert_eq!(s, expected[i]), - _ => panic!("unexpected token: {:?}", token), - } - } - } - - #[test] - fn test_tokenize_eq() { - let code = r#"="#; - let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 1); - match tokens[0] { - Token::Eq => {}, - _ => panic!("unexpected token: {:?}", tokens[0]), - } - } +struct Assembler { + tokenizer: Tokenizer, } diff --git a/spirq-as/src/tokenizer.rs b/spirq-as/src/tokenizer.rs new file mode 100644 index 0000000..6521d0e --- /dev/null +++ b/spirq-as/src/tokenizer.rs @@ -0,0 +1,519 @@ +use std::iter::Peekable; +use std::rc::Rc; +use std::str::Chars; +use std::str::FromStr; + +use anyhow::{anyhow, bail, Error, Result}; +use spirq_core::parse::{Instr, SpirvBinary, Instrs, bin::SpirvHeader}; +use spirq_core::ty::TypeRegistry; + +#[derive(Debug)] +enum Lit { + Int(i64), + // Base numeric and the exponent bias. The effect of the bias depends on the + // actual floating-point type it casts to. + Float(f64, i32), + String(String), +} + +#[derive(Debug)] +enum Token { + Comment(String), + Literal(Lit), + Ident(String), + IdRef(String), + Eq, +} + +struct Tokenizer<'a> { + chars: Box>>, +} +impl<'a> Tokenizer<'a> { + pub fn new(code: &'a str) -> Self { + Tokenizer { + chars: Box::new(code.chars().peekable()), + } + } + + pub fn tokenize_comment(&mut self) -> Result { + self.chars.next(); // Consume the initial ';'. + + let mut comment = String::new(); + while let Some(c) = self.chars.peek() { + if *c == '\n' { + break; + } + comment.push(*c); + self.chars.next(); + } + return Ok(Token::Comment(comment)); + } + + pub fn tokenize_idref(&mut self) -> Result { + self.chars.next(); // Consume the '%'. + + let mut buf = String::new(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_alphanumeric() || c == &'_' { + buf.push(*c); + } else { + break; + } + } + return Ok(Token::IdRef(buf)); + } + + pub fn tokenize_numeric_literal_decimal(&mut self) -> Result { + let mut buf = String::new(); + buf.push('0'); // So that we can tolerate numerics failed from hexadecimal parsing. + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + let lit = match self.chars.peek() { + Some('.') => { + // Float. + buf.push('.'); + self.chars.next(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + if let Some(c) = self.chars.peek() { + if c == &'e' || c == &'E' { + // Float with exponent. + buf.push(*c); + self.chars.next(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() || c == &'+' || c == &'-' { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + } + } + Lit::Float(f64::from_str(buf.as_str())?, 0) + }, + _ => { + // Integer. + Lit::Int(i64::from_str(buf.as_str())?) + }, + }; + Ok(lit) + } + + pub fn tokenize_numeric_literal_hexadecimal(&mut self) -> Result { + let mut buf = String::new(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_hexdigit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + // In form of `0x1p0`. + let lit = if Some(&'.') == self.chars.peek() && buf == "1" { + // Float. + buf.push('.'); + self.chars.next(); // Consume the '.'. + + // In form of `0x1.2p0`. + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + buf.push(*c); + self.chars.next(); + } else { + break; + } + } + + let mantissa = f64::from_str(buf.as_str())?; + let mut exponent = 0; + + if let Some(c) = self.chars.peek() { + if c == &'p' || c == &'P' { + self.chars.next(); // Consume the 'p' or 'P'. + + // Float with exponent. + let mut exponent_buf = String::new(); + match self.chars.peek() { + Some('+') => { + self.chars.next(); + }, + Some('-') => { + exponent_buf.push('-'); + self.chars.next(); + }, + _ => {}, + } + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + exponent_buf.push(*c); + self.chars.next(); + } else { + break; + } + } + exponent = i32::from_str(&exponent_buf)?; + } + } + + Lit::Float(mantissa, exponent) + } else { + // Integer. + Lit::Int(i64::from_str_radix(buf.as_str(), 16)?) + }; + + Ok(lit) + } + + /// Tokenize a SPIR-V assembly numeric literal that can be decimal, hexadecimal, + /// decimal and hexadecimal numbers. + pub fn tokenize_numeric_literal(&mut self) -> Result { + let mut c = *self.chars.peek() + .ok_or_else(|| anyhow!("unexpected end of input"))?; + + let mantissa_sign = match c { + '-' => { + self.chars.next(); + c = *self.chars.peek() + .ok_or_else(|| anyhow!("unexpected end of input"))?; + -1 + }, + _ => 1, + }; + + let lit = if c == '0' { + self.chars.next(); // Consume the initial '0'. + match self.chars.peek() { + Some('x') | Some('X') => { + // Hexadecimal. + self.chars.next(); // Consume the 'x' or 'X'. + self.tokenize_numeric_literal_hexadecimal()? + }, + _ => { + // Decimal. + self.tokenize_numeric_literal_decimal()? + }, + } + } else { + // Decimal. + self.tokenize_numeric_literal_decimal()? + }; + let lit = match lit { + Lit::Int(i) => Lit::Int(i * mantissa_sign), + Lit::Float(f, e) => Lit::Float(f * mantissa_sign as f64, e), + Lit::String(_) => unreachable!(), + }; + + let token = Token::Literal(lit); + Ok(token) + } + + pub fn tokenize_string_literal(&mut self) -> Result { + self.chars.next(); // Consume the initial '"'. + + let mut string = String::new(); + let mut escape = false; + + while let Some(c) = self.chars.next() { + if escape { + // Escaped character. + escape = false; + string.push(c) + } else { + match c { + '\\' => { + escape = true; + continue; + }, + '"' => break, + _ => string.push(c), + } + } + } + let lit = Lit::String(string); + let token = Token::Literal(lit); + + return Ok(token); + } + + pub fn tokenize_ident(&mut self) -> Result { + let mut ident = String::new(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_alphanumeric() || c == &'_' { + ident.push(*c); + self.chars.next(); + } else { + break; + } + } + return Ok(Token::Ident(ident)); + } + + pub fn tokenize(&mut self) -> Result> { + if let Some(c) = self.chars.peek() { + // Ignore LWS. + if c.is_ascii_whitespace() { + self.chars.next(); + while let Some(c) = self.chars.peek() { + if c.is_ascii_whitespace() { + self.chars.next(); + } else { + break; + } + } + return self.tokenize(); + } + + // Comments. + if c == &';' { + let token = self.tokenize_comment()?; + return Ok(Some(token)); + } + + // Punctuations. + if c == &'=' { + self.chars.next(); // Consume the '='. + let token = Token::Eq; + return Ok(Some(token)); + } + + // IdRefs. + if c == &'%' { + let token = self.tokenize_idref()?; + return Ok(Some(token)); + } + + // Literal numerics. + if c == &'-' || c.is_ascii_digit() { + let token = self.tokenize_numeric_literal(); + return Ok(Some(token?)); + } + + // Literal string. + if c == &'"' { + let token = self.tokenize_string_literal()?; + return Ok(Some(token)); + } + + // Identifiers. + if c.is_ascii_alphabetic() || c == &'_' { + let token = self.tokenize_ident()?; + return Ok(Some(token)); + } + + bail!("unexpected character: {}", c); + + } else { + return Ok(None); + } + } +} +impl<'a> Iterator for Tokenizer<'a> { + type Item = Result; + + fn next(&mut self) -> Option { + self.tokenize().transpose() + } +} + + + +fn tokenize(code: &str) -> Result> { + let tokenizer = Tokenizer::new(code); + let tokens = tokenizer.collect::>>(); + tokens +} + + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_tokenize_nothing() { + let code = ""; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 0); + } + + #[test] + fn test_tokenize_integers() { + let code = "0 1 2 3 4 5 6 7 8 9"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 10); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Int(n)) => assert_eq!(*n, i as i64), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_floats() { + let code = "0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, i as f64), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_floats_with_exponent() { + let code = "0.0e0 1.0e1 2.0e2 3.0e3 4.0e4 5.0e5 6.0e6 7.0e7"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_floats_with_exponent_and_sign() { + let code = "0.0e+0 1.0e-1 2.0e+2 3.0e-3 4.0e+4 5.0e-5 6.0e+6 7.0e-7"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 }))), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_hexadecimal_integers() { + let code = "0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 8); + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::Int(n)) => assert_eq!(*n, i as i64), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_hexadecimal_floats() { + let code = "0x1.0p0 0x1.1p+1 0x1.2p-2 -0x1.3p3 -0x1.4p+4 -0x1.5p-5"; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 6); + for ((mantissa, exponent), token) in [(1.0, 0), (1.1, 1), (1.2, -2), (-1.3, 3), (-1.4, 4), (-1.5, -5)].iter().zip(tokens.iter()) { + match token { + Token::Literal(Lit::Float(n, e)) => { + assert_eq!(*n, *mantissa); + assert_eq!(*e, *exponent); + }, + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_string_literals() { + let code = r#""" "a" "ab" "abc" "abcd""#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 5); + let expected = ["", "a", "ab", "abc", "abcd"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::String(s)) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_string_literals_escape() { + let code = r#""\"\\\""#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 1); + let expected = r#""\""#; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Literal(Lit::String(s)) => assert_eq!(s, expected), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_identifiers() { + let code = r#"a ab abc abcd abcd1 abcd12 abcd123"#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 7); + let expected = ["a", "ab", "abc", "abcd", "abcd1", "abcd12", "abcd123"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Ident(s) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_comments() { + let code = r#"; a +; ab +; abc +; abcd +; abcd1 +; abcd12 +; abcd123"#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 7); + let expected = [" a", " ab", " abc", " abcd", " abcd1", " abcd12", " abcd123"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::Comment(s) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_idref() { + let code = r#"%1 %123 %abc %abc123"#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 4); + let expected = ["1", "123", "abc", "abc123"]; + for (i, token) in tokens.iter().enumerate() { + match token { + Token::IdRef(s) => assert_eq!(s, expected[i]), + _ => panic!("unexpected token: {:?}", token), + } + } + } + + #[test] + fn test_tokenize_eq() { + let code = r#"="#; + let tokens = tokenize(code).unwrap(); + assert_eq!(tokens.len(), 1); + match tokens[0] { + Token::Eq => {}, + _ => panic!("unexpected token: {:?}", tokens[0]), + } + } +} From e3216383ac8c79edb89a505e8bd4fd443cc018b3 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 18 Dec 2023 18:56:06 +0800 Subject: [PATCH 07/50] Specification based assembling --- Cargo.lock | 1 + spirq-as/Cargo.toml | 1 + spirq-as/generate_enum_from_str.py | 74 ++ spirq-as/generate_op_from_str.py | 36 + spirq-as/generate_op_has_result_id.py | 41 + spirq-as/generate_op_has_result_type_id.py | 41 + spirq-as/generate_operand_enum_type.py | 61 + spirq-as/src/generated/enum_from_str.rs | 1142 +++++++++++++++++ spirq-as/src/generated/mod.rs | 11 + spirq-as/src/generated/op_from_str.rs | 733 +++++++++++ spirq-as/src/generated/op_has_result_id.rs | 721 +++++++++++ .../src/generated/op_has_result_type_id.rs | 721 +++++++++++ spirq-as/src/generated/operand_enum_type.rs | 430 +++++++ spirq-as/src/lib.rs | 322 ++++- spirq-as/src/tokenizer.rs | 31 +- spirq-core/src/parse/instr.rs | 12 + 16 files changed, 4365 insertions(+), 13 deletions(-) create mode 100644 spirq-as/generate_enum_from_str.py create mode 100644 spirq-as/generate_op_from_str.py create mode 100644 spirq-as/generate_op_has_result_id.py create mode 100644 spirq-as/generate_op_has_result_type_id.py create mode 100644 spirq-as/generate_operand_enum_type.py create mode 100644 spirq-as/src/generated/enum_from_str.rs create mode 100644 spirq-as/src/generated/mod.rs create mode 100644 spirq-as/src/generated/op_from_str.rs create mode 100644 spirq-as/src/generated/op_has_result_id.rs create mode 100644 spirq-as/src/generated/op_has_result_type_id.rs create mode 100644 spirq-as/src/generated/operand_enum_type.rs diff --git a/Cargo.lock b/Cargo.lock index 4e7d954..c7fbffa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -353,6 +353,7 @@ name = "spirq-as" version = "0.2.3" dependencies = [ "anyhow", + "num-traits", "spirq-core", ] diff --git a/spirq-as/Cargo.toml b/spirq-as/Cargo.toml index bef0e29..dfa4170 100644 --- a/spirq-as/Cargo.toml +++ b/spirq-as/Cargo.toml @@ -19,4 +19,5 @@ maintenance = { status = "actively-developed" } [dependencies] anyhow = "1.0" +num-traits = "0.2" spirq-core = { version = "1.0.0", path = "../spirq-core" } diff --git a/spirq-as/generate_enum_from_str.py b/spirq-as/generate_enum_from_str.py new file mode 100644 index 0000000..5ae08b6 --- /dev/null +++ b/spirq-as/generate_enum_from_str.py @@ -0,0 +1,74 @@ +from collections import defaultdict +import json + +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +bit_enums = defaultdict(dict) +value_enums = defaultdict(dict) +for operand_kind in j["operand_kinds"]: + category = operand_kind["category"] + kind = operand_kind["kind"] + + if category == "BitEnum": + enumerants = operand_kind["enumerants"] + for enumerant in enumerants: + bit_enums[kind][enumerant["enumerant"]] = enumerant["value"] + elif category == "ValueEnum": + enumerants = operand_kind["enumerants"] + for enumerant in enumerants: + value_enums[kind][enumerant["enumerant"]] = enumerant["value"] + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "", + "pub fn enum_from_str(ety: &str, name: &str) -> Result {", + " let out: u32 = match ety {", +] + +# ValueEnum +for kind, enumerants in bit_enums.items(): + if len(enumerants) == 0: + continue + + out += [ + f' "{kind}" => match name {{', + ] + for name, value in enumerants.items(): + out += [ + f' "{name}" => {value},', + ] + out += [ + ' _ => bail!("unknown enum: {}::{}", ety, name)', + " }", + ] + +# BitEnum +for kind, enumerants in value_enums.items(): + if len(enumerants) == 0: + continue + + out += [ + f' "{kind}" => match name {{', + ] + for name, value in enumerants.items(): + out += [ + f' "{name}" => {value},', + ] + out += [ + ' _ => bail!("unknown enum: {}::{}", ety, name)', + " }", + ] + +out += [ + ' _ => bail!("unknown enum: {}::{}", ety, name),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-as/src/generated/enum_from_str.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-as/generate_op_from_str.py b/spirq-as/generate_op_from_str.py new file mode 100644 index 0000000..6476e5e --- /dev/null +++ b/spirq-as/generate_op_from_str.py @@ -0,0 +1,36 @@ +import json + +name2op = {} +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +for instr in j["instructions"]: + opname = instr["opname"] + opcode = instr["opcode"] + + assert opname not in name2op + name2op[opname] = opcode + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "use num_traits::FromPrimitive;", + "", + "pub fn op_from_str(opname: &str) -> Result {", + " let out: u32 = match opname {", +] + +for opname, opcode in name2op.items(): + out += [f' "{opname}" => {opcode},'] + +out += [ + ' _ => bail!("Unknown opname: {}", opname),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-as/src/generated/op_from_str.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-as/generate_op_has_result_id.py b/spirq-as/generate_op_has_result_id.py new file mode 100644 index 0000000..a07376a --- /dev/null +++ b/spirq-as/generate_op_has_result_id.py @@ -0,0 +1,41 @@ +import json + +op_has_result_id = {} +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +for instr in j["instructions"]: + opcode = instr["opcode"] + + has_result_id = False + if "operands" in instr: + operands = instr["operands"] + for operand in operands: + if operand["kind"] == "IdResult": + has_result_id = True + break + + op_has_result_id[opcode] = has_result_id + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "", + "pub fn op_has_result_id(opcode: u32) -> Result {", + " let out: bool = match opcode {", +] + +for opcode, has_result_id in op_has_result_id.items(): + out += [f' {opcode} => {"true" if has_result_id else "false"},'] + +out += [ + ' _ => bail!("Unknown opcode: {}", opcode),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-as/src/generated/op_has_result_id.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-as/generate_op_has_result_type_id.py b/spirq-as/generate_op_has_result_type_id.py new file mode 100644 index 0000000..f8b0737 --- /dev/null +++ b/spirq-as/generate_op_has_result_type_id.py @@ -0,0 +1,41 @@ +import json + +op_has_result_id = {} +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +for instr in j["instructions"]: + opcode = instr["opcode"] + + has_result_id = False + if "operands" in instr: + operands = instr["operands"] + for operand in operands: + if operand["kind"] == "IdResultType": + has_result_id = True + break + + op_has_result_id[opcode] = has_result_id + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "", + "pub fn op_has_result_type_id(opcode: u32) -> Result {", + " let out: bool = match opcode {", +] + +for opcode, has_result_id in op_has_result_id.items(): + out += [f' {opcode} => {"true" if has_result_id else "false"},'] + +out += [ + ' _ => bail!("Unknown opcode: {}", opcode),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-as/src/generated/op_has_result_type_id.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-as/generate_operand_enum_type.py b/spirq-as/generate_operand_enum_type.py new file mode 100644 index 0000000..a8fb026 --- /dev/null +++ b/spirq-as/generate_operand_enum_type.py @@ -0,0 +1,61 @@ +import json + +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +operand_kinds = {} +for instr in j["instructions"]: + opcode = instr["opcode"] + + op_operand_kinds = {} + if "operands" in instr: + operands = instr["operands"] + i = 0 + for operand in operands: + kind = operand["kind"] + if ( + kind.startswith("Id") + or kind.startswith("Literal") + or kind.startswith("Pair") + ): + continue + + op_operand_kinds[i] = operand["kind"] + i += 1 + operand_kinds[opcode] = op_operand_kinds + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "", + "pub fn operand_enum_type(opcode: u32, i: usize) -> Result<&'static str> {", + " let out: &'static str = match opcode {", +] + +for opcode, op_operand_kinds in operand_kinds.items(): + if len(op_operand_kinds) == 0: + continue + + out += [ + f" {opcode} => match i {{", + ] + for i, kind in op_operand_kinds.items(): + out += [ + f' {i} => "{kind}",', + ] + out += [ + ' _ => bail!("Unknown operand index: {}", i),', + " }", + ] + +out += [ + ' _ => bail!("{}-th operand of opcode {} is not a enum", i, opcode),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-as/src/generated/operand_enum_type.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-as/src/generated/enum_from_str.rs b/spirq-as/src/generated/enum_from_str.rs new file mode 100644 index 0000000..89a5513 --- /dev/null +++ b/spirq-as/src/generated/enum_from_str.rs @@ -0,0 +1,1142 @@ +use anyhow::{bail, Result}; + +pub fn enum_from_str(ety: &str, name: &str) -> Result { + let out: u32 = match ety { + "ImageOperands" => match name { + "None" => 0x0000, + "Bias" => 0x0001, + "Lod" => 0x0002, + "Grad" => 0x0004, + "ConstOffset" => 0x0008, + "Offset" => 0x0010, + "ConstOffsets" => 0x0020, + "Sample" => 0x0040, + "MinLod" => 0x0080, + "MakeTexelAvailable" => 0x0100, + "MakeTexelAvailableKHR" => 0x0100, + "MakeTexelVisible" => 0x0200, + "MakeTexelVisibleKHR" => 0x0200, + "NonPrivateTexel" => 0x0400, + "NonPrivateTexelKHR" => 0x0400, + "VolatileTexel" => 0x0800, + "VolatileTexelKHR" => 0x0800, + "SignExtend" => 0x1000, + "ZeroExtend" => 0x2000, + "Nontemporal" => 0x4000, + "Offsets" => 0x10000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FPFastMathMode" => match name { + "None" => 0x0000, + "NotNaN" => 0x0001, + "NotInf" => 0x0002, + "NSZ" => 0x0004, + "AllowRecip" => 0x0008, + "Fast" => 0x0010, + "AllowContractFastINTEL" => 0x10000, + "AllowReassocINTEL" => 0x20000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "SelectionControl" => match name { + "None" => 0x0000, + "Flatten" => 0x0001, + "DontFlatten" => 0x0002, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "LoopControl" => match name { + "None" => 0x0000, + "Unroll" => 0x0001, + "DontUnroll" => 0x0002, + "DependencyInfinite" => 0x0004, + "DependencyLength" => 0x0008, + "MinIterations" => 0x0010, + "MaxIterations" => 0x0020, + "IterationMultiple" => 0x0040, + "PeelCount" => 0x0080, + "PartialCount" => 0x0100, + "InitiationIntervalINTEL" => 0x10000, + "MaxConcurrencyINTEL" => 0x20000, + "DependencyArrayINTEL" => 0x40000, + "PipelineEnableINTEL" => 0x80000, + "LoopCoalesceINTEL" => 0x100000, + "MaxInterleavingINTEL" => 0x200000, + "SpeculatedIterationsINTEL" => 0x400000, + "NoFusionINTEL" => 0x800000, + "LoopCountINTEL" => 0x1000000, + "MaxReinvocationDelayINTEL" => 0x2000000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FunctionControl" => match name { + "None" => 0x0000, + "Inline" => 0x0001, + "DontInline" => 0x0002, + "Pure" => 0x0004, + "Const" => 0x0008, + "OptNoneINTEL" => 0x10000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "MemorySemantics" => match name { + "Relaxed" => 0x0000, + "None" => 0x0000, + "Acquire" => 0x0002, + "Release" => 0x0004, + "AcquireRelease" => 0x0008, + "SequentiallyConsistent" => 0x0010, + "UniformMemory" => 0x0040, + "SubgroupMemory" => 0x0080, + "WorkgroupMemory" => 0x0100, + "CrossWorkgroupMemory" => 0x0200, + "AtomicCounterMemory" => 0x0400, + "ImageMemory" => 0x0800, + "OutputMemory" => 0x1000, + "OutputMemoryKHR" => 0x1000, + "MakeAvailable" => 0x2000, + "MakeAvailableKHR" => 0x2000, + "MakeVisible" => 0x4000, + "MakeVisibleKHR" => 0x4000, + "Volatile" => 0x8000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "MemoryAccess" => match name { + "None" => 0x0000, + "Volatile" => 0x0001, + "Aligned" => 0x0002, + "Nontemporal" => 0x0004, + "MakePointerAvailable" => 0x0008, + "MakePointerAvailableKHR" => 0x0008, + "MakePointerVisible" => 0x0010, + "MakePointerVisibleKHR" => 0x0010, + "NonPrivatePointer" => 0x0020, + "NonPrivatePointerKHR" => 0x0020, + "AliasScopeINTELMask" => 0x10000, + "NoAliasINTELMask" => 0x20000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "KernelProfilingInfo" => match name { + "None" => 0x0000, + "CmdExecTime" => 0x0001, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "RayFlags" => match name { + "NoneKHR" => 0x0000, + "OpaqueKHR" => 0x0001, + "NoOpaqueKHR" => 0x0002, + "TerminateOnFirstHitKHR" => 0x0004, + "SkipClosestHitShaderKHR" => 0x0008, + "CullBackFacingTrianglesKHR" => 0x0010, + "CullFrontFacingTrianglesKHR" => 0x0020, + "CullOpaqueKHR" => 0x0040, + "CullNoOpaqueKHR" => 0x0080, + "SkipTrianglesKHR" => 0x0100, + "SkipAABBsKHR" => 0x0200, + "ForceOpacityMicromap2StateEXT" => 0x0400, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FragmentShadingRate" => match name { + "Vertical2Pixels" => 0x0001, + "Vertical4Pixels" => 0x0002, + "Horizontal2Pixels" => 0x0004, + "Horizontal4Pixels" => 0x0008, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "CooperativeMatrixOperands" => match name { + "NoneKHR" => 0x0000, + "MatrixASignedComponentsKHR" => 0x0001, + "MatrixBSignedComponentsKHR" => 0x0002, + "MatrixCSignedComponentsKHR" => 0x0004, + "MatrixResultSignedComponentsKHR" => 0x0008, + "SaturatingAccumulationKHR" => 0x0010, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "SourceLanguage" => match name { + "Unknown" => 0, + "ESSL" => 1, + "GLSL" => 2, + "OpenCL_C" => 3, + "OpenCL_CPP" => 4, + "HLSL" => 5, + "CPP_for_OpenCL" => 6, + "SYCL" => 7, + "HERO_C" => 8, + "NZSL" => 9, + "WGSL" => 10, + "Slang" => 11, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "ExecutionModel" => match name { + "Vertex" => 0, + "TessellationControl" => 1, + "TessellationEvaluation" => 2, + "Geometry" => 3, + "Fragment" => 4, + "GLCompute" => 5, + "Kernel" => 6, + "TaskNV" => 5267, + "MeshNV" => 5268, + "RayGenerationNV" => 5313, + "RayGenerationKHR" => 5313, + "IntersectionNV" => 5314, + "IntersectionKHR" => 5314, + "AnyHitNV" => 5315, + "AnyHitKHR" => 5315, + "ClosestHitNV" => 5316, + "ClosestHitKHR" => 5316, + "MissNV" => 5317, + "MissKHR" => 5317, + "CallableNV" => 5318, + "CallableKHR" => 5318, + "TaskEXT" => 5364, + "MeshEXT" => 5365, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "AddressingModel" => match name { + "Logical" => 0, + "Physical32" => 1, + "Physical64" => 2, + "PhysicalStorageBuffer64" => 5348, + "PhysicalStorageBuffer64EXT" => 5348, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "MemoryModel" => match name { + "Simple" => 0, + "GLSL450" => 1, + "OpenCL" => 2, + "Vulkan" => 3, + "VulkanKHR" => 3, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "ExecutionMode" => match name { + "Invocations" => 0, + "SpacingEqual" => 1, + "SpacingFractionalEven" => 2, + "SpacingFractionalOdd" => 3, + "VertexOrderCw" => 4, + "VertexOrderCcw" => 5, + "PixelCenterInteger" => 6, + "OriginUpperLeft" => 7, + "OriginLowerLeft" => 8, + "EarlyFragmentTests" => 9, + "PointMode" => 10, + "Xfb" => 11, + "DepthReplacing" => 12, + "DepthGreater" => 14, + "DepthLess" => 15, + "DepthUnchanged" => 16, + "LocalSize" => 17, + "LocalSizeHint" => 18, + "InputPoints" => 19, + "InputLines" => 20, + "InputLinesAdjacency" => 21, + "Triangles" => 22, + "InputTrianglesAdjacency" => 23, + "Quads" => 24, + "Isolines" => 25, + "OutputVertices" => 26, + "OutputPoints" => 27, + "OutputLineStrip" => 28, + "OutputTriangleStrip" => 29, + "VecTypeHint" => 30, + "ContractionOff" => 31, + "Initializer" => 33, + "Finalizer" => 34, + "SubgroupSize" => 35, + "SubgroupsPerWorkgroup" => 36, + "SubgroupsPerWorkgroupId" => 37, + "LocalSizeId" => 38, + "LocalSizeHintId" => 39, + "NonCoherentColorAttachmentReadEXT" => 4169, + "NonCoherentDepthAttachmentReadEXT" => 4170, + "NonCoherentStencilAttachmentReadEXT" => 4171, + "SubgroupUniformControlFlowKHR" => 4421, + "PostDepthCoverage" => 4446, + "DenormPreserve" => 4459, + "DenormFlushToZero" => 4460, + "SignedZeroInfNanPreserve" => 4461, + "RoundingModeRTE" => 4462, + "RoundingModeRTZ" => 4463, + "EarlyAndLateFragmentTestsAMD" => 5017, + "StencilRefReplacingEXT" => 5027, + "CoalescingAMDX" => 5069, + "MaxNodeRecursionAMDX" => 5071, + "StaticNumWorkgroupsAMDX" => 5072, + "ShaderIndexAMDX" => 5073, + "MaxNumWorkgroupsAMDX" => 5077, + "StencilRefUnchangedFrontAMD" => 5079, + "StencilRefGreaterFrontAMD" => 5080, + "StencilRefLessFrontAMD" => 5081, + "StencilRefUnchangedBackAMD" => 5082, + "StencilRefGreaterBackAMD" => 5083, + "StencilRefLessBackAMD" => 5084, + "OutputLinesNV" => 5269, + "OutputLinesEXT" => 5269, + "OutputPrimitivesNV" => 5270, + "OutputPrimitivesEXT" => 5270, + "DerivativeGroupQuadsNV" => 5289, + "DerivativeGroupLinearNV" => 5290, + "OutputTrianglesNV" => 5298, + "OutputTrianglesEXT" => 5298, + "PixelInterlockOrderedEXT" => 5366, + "PixelInterlockUnorderedEXT" => 5367, + "SampleInterlockOrderedEXT" => 5368, + "SampleInterlockUnorderedEXT" => 5369, + "ShadingRateInterlockOrderedEXT" => 5370, + "ShadingRateInterlockUnorderedEXT" => 5371, + "SharedLocalMemorySizeINTEL" => 5618, + "RoundingModeRTPINTEL" => 5620, + "RoundingModeRTNINTEL" => 5621, + "FloatingPointModeALTINTEL" => 5622, + "FloatingPointModeIEEEINTEL" => 5623, + "MaxWorkgroupSizeINTEL" => 5893, + "MaxWorkDimINTEL" => 5894, + "NoGlobalOffsetINTEL" => 5895, + "NumSIMDWorkitemsINTEL" => 5896, + "SchedulerTargetFmaxMhzINTEL" => 5903, + "StreamingInterfaceINTEL" => 6154, + "RegisterMapInterfaceINTEL" => 6160, + "NamedBarrierCountINTEL" => 6417, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "StorageClass" => match name { + "UniformConstant" => 0, + "Input" => 1, + "Uniform" => 2, + "Output" => 3, + "Workgroup" => 4, + "CrossWorkgroup" => 5, + "Private" => 6, + "Function" => 7, + "Generic" => 8, + "PushConstant" => 9, + "AtomicCounter" => 10, + "Image" => 11, + "StorageBuffer" => 12, + "TileImageEXT" => 4172, + "NodePayloadAMDX" => 5068, + "NodeOutputPayloadAMDX" => 5076, + "CallableDataNV" => 5328, + "CallableDataKHR" => 5328, + "IncomingCallableDataNV" => 5329, + "IncomingCallableDataKHR" => 5329, + "RayPayloadNV" => 5338, + "RayPayloadKHR" => 5338, + "HitAttributeNV" => 5339, + "HitAttributeKHR" => 5339, + "IncomingRayPayloadNV" => 5342, + "IncomingRayPayloadKHR" => 5342, + "ShaderRecordBufferNV" => 5343, + "ShaderRecordBufferKHR" => 5343, + "PhysicalStorageBuffer" => 5349, + "PhysicalStorageBufferEXT" => 5349, + "HitObjectAttributeNV" => 5385, + "TaskPayloadWorkgroupEXT" => 5402, + "CodeSectionINTEL" => 5605, + "DeviceOnlyINTEL" => 5936, + "HostOnlyINTEL" => 5937, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "Dim" => match name { + "1D" => 0, + "2D" => 1, + "3D" => 2, + "Cube" => 3, + "Rect" => 4, + "Buffer" => 5, + "SubpassData" => 6, + "TileImageDataEXT" => 4173, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "SamplerAddressingMode" => match name { + "None" => 0, + "ClampToEdge" => 1, + "Clamp" => 2, + "Repeat" => 3, + "RepeatMirrored" => 4, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "SamplerFilterMode" => match name { + "Nearest" => 0, + "Linear" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "ImageFormat" => match name { + "Unknown" => 0, + "Rgba32f" => 1, + "Rgba16f" => 2, + "R32f" => 3, + "Rgba8" => 4, + "Rgba8Snorm" => 5, + "Rg32f" => 6, + "Rg16f" => 7, + "R11fG11fB10f" => 8, + "R16f" => 9, + "Rgba16" => 10, + "Rgb10A2" => 11, + "Rg16" => 12, + "Rg8" => 13, + "R16" => 14, + "R8" => 15, + "Rgba16Snorm" => 16, + "Rg16Snorm" => 17, + "Rg8Snorm" => 18, + "R16Snorm" => 19, + "R8Snorm" => 20, + "Rgba32i" => 21, + "Rgba16i" => 22, + "Rgba8i" => 23, + "R32i" => 24, + "Rg32i" => 25, + "Rg16i" => 26, + "Rg8i" => 27, + "R16i" => 28, + "R8i" => 29, + "Rgba32ui" => 30, + "Rgba16ui" => 31, + "Rgba8ui" => 32, + "R32ui" => 33, + "Rgb10a2ui" => 34, + "Rg32ui" => 35, + "Rg16ui" => 36, + "Rg8ui" => 37, + "R16ui" => 38, + "R8ui" => 39, + "R64ui" => 40, + "R64i" => 41, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "ImageChannelOrder" => match name { + "R" => 0, + "A" => 1, + "RG" => 2, + "RA" => 3, + "RGB" => 4, + "RGBA" => 5, + "BGRA" => 6, + "ARGB" => 7, + "Intensity" => 8, + "Luminance" => 9, + "Rx" => 10, + "RGx" => 11, + "RGBx" => 12, + "Depth" => 13, + "DepthStencil" => 14, + "sRGB" => 15, + "sRGBx" => 16, + "sRGBA" => 17, + "sBGRA" => 18, + "ABGR" => 19, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "ImageChannelDataType" => match name { + "SnormInt8" => 0, + "SnormInt16" => 1, + "UnormInt8" => 2, + "UnormInt16" => 3, + "UnormShort565" => 4, + "UnormShort555" => 5, + "UnormInt101010" => 6, + "SignedInt8" => 7, + "SignedInt16" => 8, + "SignedInt32" => 9, + "UnsignedInt8" => 10, + "UnsignedInt16" => 11, + "UnsignedInt32" => 12, + "HalfFloat" => 13, + "Float" => 14, + "UnormInt24" => 15, + "UnormInt101010_2" => 16, + "UnsignedIntRaw10EXT" => 19, + "UnsignedIntRaw12EXT" => 20, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FPRoundingMode" => match name { + "RTE" => 0, + "RTZ" => 1, + "RTP" => 2, + "RTN" => 3, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FPDenormMode" => match name { + "Preserve" => 0, + "FlushToZero" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "QuantizationModes" => match name { + "TRN" => 0, + "TRN_ZERO" => 1, + "RND" => 2, + "RND_ZERO" => 3, + "RND_INF" => 4, + "RND_MIN_INF" => 5, + "RND_CONV" => 6, + "RND_CONV_ODD" => 7, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FPOperationMode" => match name { + "IEEE" => 0, + "ALT" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "OverflowModes" => match name { + "WRAP" => 0, + "SAT" => 1, + "SAT_ZERO" => 2, + "SAT_SYM" => 3, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "LinkageType" => match name { + "Export" => 0, + "Import" => 1, + "LinkOnceODR" => 2, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "AccessQualifier" => match name { + "ReadOnly" => 0, + "WriteOnly" => 1, + "ReadWrite" => 2, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "HostAccessQualifier" => match name { + "NoneINTEL" => 0, + "ReadINTEL" => 1, + "WriteINTEL" => 2, + "ReadWriteINTEL" => 3, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FunctionParameterAttribute" => match name { + "Zext" => 0, + "Sext" => 1, + "ByVal" => 2, + "Sret" => 3, + "NoAlias" => 4, + "NoCapture" => 5, + "NoWrite" => 6, + "NoReadWrite" => 7, + "RuntimeAlignedINTEL" => 5940, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "Decoration" => match name { + "RelaxedPrecision" => 0, + "SpecId" => 1, + "Block" => 2, + "BufferBlock" => 3, + "RowMajor" => 4, + "ColMajor" => 5, + "ArrayStride" => 6, + "MatrixStride" => 7, + "GLSLShared" => 8, + "GLSLPacked" => 9, + "CPacked" => 10, + "BuiltIn" => 11, + "NoPerspective" => 13, + "Flat" => 14, + "Patch" => 15, + "Centroid" => 16, + "Sample" => 17, + "Invariant" => 18, + "Restrict" => 19, + "Aliased" => 20, + "Volatile" => 21, + "Constant" => 22, + "Coherent" => 23, + "NonWritable" => 24, + "NonReadable" => 25, + "Uniform" => 26, + "UniformId" => 27, + "SaturatedConversion" => 28, + "Stream" => 29, + "Location" => 30, + "Component" => 31, + "Index" => 32, + "Binding" => 33, + "DescriptorSet" => 34, + "Offset" => 35, + "XfbBuffer" => 36, + "XfbStride" => 37, + "FuncParamAttr" => 38, + "FPRoundingMode" => 39, + "FPFastMathMode" => 40, + "LinkageAttributes" => 41, + "NoContraction" => 42, + "InputAttachmentIndex" => 43, + "Alignment" => 44, + "MaxByteOffset" => 45, + "AlignmentId" => 46, + "MaxByteOffsetId" => 47, + "NoSignedWrap" => 4469, + "NoUnsignedWrap" => 4470, + "WeightTextureQCOM" => 4487, + "BlockMatchTextureQCOM" => 4488, + "ExplicitInterpAMD" => 4999, + "NodeSharesPayloadLimitsWithAMDX" => 5019, + "NodeMaxPayloadsAMDX" => 5020, + "TrackFinishWritingAMDX" => 5078, + "PayloadNodeNameAMDX" => 5091, + "OverrideCoverageNV" => 5248, + "PassthroughNV" => 5250, + "ViewportRelativeNV" => 5252, + "SecondaryViewportRelativeNV" => 5256, + "PerPrimitiveNV" => 5271, + "PerPrimitiveEXT" => 5271, + "PerViewNV" => 5272, + "PerTaskNV" => 5273, + "PerVertexKHR" => 5285, + "PerVertexNV" => 5285, + "NonUniform" => 5300, + "NonUniformEXT" => 5300, + "RestrictPointer" => 5355, + "RestrictPointerEXT" => 5355, + "AliasedPointer" => 5356, + "AliasedPointerEXT" => 5356, + "HitObjectShaderRecordBufferNV" => 5386, + "BindlessSamplerNV" => 5398, + "BindlessImageNV" => 5399, + "BoundSamplerNV" => 5400, + "BoundImageNV" => 5401, + "SIMTCallINTEL" => 5599, + "ReferencedIndirectlyINTEL" => 5602, + "ClobberINTEL" => 5607, + "SideEffectsINTEL" => 5608, + "VectorComputeVariableINTEL" => 5624, + "FuncParamIOKindINTEL" => 5625, + "VectorComputeFunctionINTEL" => 5626, + "StackCallINTEL" => 5627, + "GlobalVariableOffsetINTEL" => 5628, + "CounterBuffer" => 5634, + "HlslCounterBufferGOOGLE" => 5634, + "UserSemantic" => 5635, + "HlslSemanticGOOGLE" => 5635, + "UserTypeGOOGLE" => 5636, + "FunctionRoundingModeINTEL" => 5822, + "FunctionDenormModeINTEL" => 5823, + "RegisterINTEL" => 5825, + "MemoryINTEL" => 5826, + "NumbanksINTEL" => 5827, + "BankwidthINTEL" => 5828, + "MaxPrivateCopiesINTEL" => 5829, + "SinglepumpINTEL" => 5830, + "DoublepumpINTEL" => 5831, + "MaxReplicatesINTEL" => 5832, + "SimpleDualPortINTEL" => 5833, + "MergeINTEL" => 5834, + "BankBitsINTEL" => 5835, + "ForcePow2DepthINTEL" => 5836, + "StridesizeINTEL" => 5883, + "WordsizeINTEL" => 5884, + "TrueDualPortINTEL" => 5885, + "BurstCoalesceINTEL" => 5899, + "CacheSizeINTEL" => 5900, + "DontStaticallyCoalesceINTEL" => 5901, + "PrefetchINTEL" => 5902, + "StallEnableINTEL" => 5905, + "FuseLoopsInFunctionINTEL" => 5907, + "MathOpDSPModeINTEL" => 5909, + "AliasScopeINTEL" => 5914, + "NoAliasINTEL" => 5915, + "InitiationIntervalINTEL" => 5917, + "MaxConcurrencyINTEL" => 5918, + "PipelineEnableINTEL" => 5919, + "BufferLocationINTEL" => 5921, + "IOPipeStorageINTEL" => 5944, + "FunctionFloatingPointModeINTEL" => 6080, + "SingleElementVectorINTEL" => 6085, + "VectorComputeCallableFunctionINTEL" => 6087, + "MediaBlockIOINTEL" => 6140, + "StallFreeINTEL" => 6151, + "FPMaxErrorDecorationINTEL" => 6170, + "LatencyControlLabelINTEL" => 6172, + "LatencyControlConstraintINTEL" => 6173, + "ConduitKernelArgumentINTEL" => 6175, + "RegisterMapKernelArgumentINTEL" => 6176, + "MMHostInterfaceAddressWidthINTEL" => 6177, + "MMHostInterfaceDataWidthINTEL" => 6178, + "MMHostInterfaceLatencyINTEL" => 6179, + "MMHostInterfaceReadWriteModeINTEL" => 6180, + "MMHostInterfaceMaxBurstINTEL" => 6181, + "MMHostInterfaceWaitRequestINTEL" => 6182, + "StableKernelArgumentINTEL" => 6183, + "HostAccessINTEL" => 6188, + "InitModeINTEL" => 6190, + "ImplementInRegisterMapINTEL" => 6191, + "CacheControlLoadINTEL" => 6442, + "CacheControlStoreINTEL" => 6443, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "BuiltIn" => match name { + "Position" => 0, + "PointSize" => 1, + "ClipDistance" => 3, + "CullDistance" => 4, + "VertexId" => 5, + "InstanceId" => 6, + "PrimitiveId" => 7, + "InvocationId" => 8, + "Layer" => 9, + "ViewportIndex" => 10, + "TessLevelOuter" => 11, + "TessLevelInner" => 12, + "TessCoord" => 13, + "PatchVertices" => 14, + "FragCoord" => 15, + "PointCoord" => 16, + "FrontFacing" => 17, + "SampleId" => 18, + "SamplePosition" => 19, + "SampleMask" => 20, + "FragDepth" => 22, + "HelperInvocation" => 23, + "NumWorkgroups" => 24, + "WorkgroupSize" => 25, + "WorkgroupId" => 26, + "LocalInvocationId" => 27, + "GlobalInvocationId" => 28, + "LocalInvocationIndex" => 29, + "WorkDim" => 30, + "GlobalSize" => 31, + "EnqueuedWorkgroupSize" => 32, + "GlobalOffset" => 33, + "GlobalLinearId" => 34, + "SubgroupSize" => 36, + "SubgroupMaxSize" => 37, + "NumSubgroups" => 38, + "NumEnqueuedSubgroups" => 39, + "SubgroupId" => 40, + "SubgroupLocalInvocationId" => 41, + "VertexIndex" => 42, + "InstanceIndex" => 43, + "CoreIDARM" => 4160, + "CoreCountARM" => 4161, + "CoreMaxIDARM" => 4162, + "WarpIDARM" => 4163, + "WarpMaxIDARM" => 4164, + "SubgroupEqMask" => 4416, + "SubgroupEqMaskKHR" => 4416, + "SubgroupGeMask" => 4417, + "SubgroupGeMaskKHR" => 4417, + "SubgroupGtMask" => 4418, + "SubgroupGtMaskKHR" => 4418, + "SubgroupLeMask" => 4419, + "SubgroupLeMaskKHR" => 4419, + "SubgroupLtMask" => 4420, + "SubgroupLtMaskKHR" => 4420, + "BaseVertex" => 4424, + "BaseInstance" => 4425, + "DrawIndex" => 4426, + "PrimitiveShadingRateKHR" => 4432, + "DeviceIndex" => 4438, + "ViewIndex" => 4440, + "ShadingRateKHR" => 4444, + "BaryCoordNoPerspAMD" => 4992, + "BaryCoordNoPerspCentroidAMD" => 4993, + "BaryCoordNoPerspSampleAMD" => 4994, + "BaryCoordSmoothAMD" => 4995, + "BaryCoordSmoothCentroidAMD" => 4996, + "BaryCoordSmoothSampleAMD" => 4997, + "BaryCoordPullModelAMD" => 4998, + "FragStencilRefEXT" => 5014, + "CoalescedInputCountAMDX" => 5021, + "ShaderIndexAMDX" => 5073, + "ViewportMaskNV" => 5253, + "SecondaryPositionNV" => 5257, + "SecondaryViewportMaskNV" => 5258, + "PositionPerViewNV" => 5261, + "ViewportMaskPerViewNV" => 5262, + "FullyCoveredEXT" => 5264, + "TaskCountNV" => 5274, + "PrimitiveCountNV" => 5275, + "PrimitiveIndicesNV" => 5276, + "ClipDistancePerViewNV" => 5277, + "CullDistancePerViewNV" => 5278, + "LayerPerViewNV" => 5279, + "MeshViewCountNV" => 5280, + "MeshViewIndicesNV" => 5281, + "BaryCoordKHR" => 5286, + "BaryCoordNV" => 5286, + "BaryCoordNoPerspKHR" => 5287, + "BaryCoordNoPerspNV" => 5287, + "FragSizeEXT" => 5292, + "FragmentSizeNV" => 5292, + "FragInvocationCountEXT" => 5293, + "InvocationsPerPixelNV" => 5293, + "PrimitivePointIndicesEXT" => 5294, + "PrimitiveLineIndicesEXT" => 5295, + "PrimitiveTriangleIndicesEXT" => 5296, + "CullPrimitiveEXT" => 5299, + "LaunchIdNV" => 5319, + "LaunchIdKHR" => 5319, + "LaunchSizeNV" => 5320, + "LaunchSizeKHR" => 5320, + "WorldRayOriginNV" => 5321, + "WorldRayOriginKHR" => 5321, + "WorldRayDirectionNV" => 5322, + "WorldRayDirectionKHR" => 5322, + "ObjectRayOriginNV" => 5323, + "ObjectRayOriginKHR" => 5323, + "ObjectRayDirectionNV" => 5324, + "ObjectRayDirectionKHR" => 5324, + "RayTminNV" => 5325, + "RayTminKHR" => 5325, + "RayTmaxNV" => 5326, + "RayTmaxKHR" => 5326, + "InstanceCustomIndexNV" => 5327, + "InstanceCustomIndexKHR" => 5327, + "ObjectToWorldNV" => 5330, + "ObjectToWorldKHR" => 5330, + "WorldToObjectNV" => 5331, + "WorldToObjectKHR" => 5331, + "HitTNV" => 5332, + "HitKindNV" => 5333, + "HitKindKHR" => 5333, + "CurrentRayTimeNV" => 5334, + "HitTriangleVertexPositionsKHR" => 5335, + "HitMicroTriangleVertexPositionsNV" => 5337, + "HitMicroTriangleVertexBarycentricsNV" => 5344, + "IncomingRayFlagsNV" => 5351, + "IncomingRayFlagsKHR" => 5351, + "RayGeometryIndexKHR" => 5352, + "WarpsPerSMNV" => 5374, + "SMCountNV" => 5375, + "WarpIDNV" => 5376, + "SMIDNV" => 5377, + "HitKindFrontFacingMicroTriangleNV" => 5405, + "HitKindBackFacingMicroTriangleNV" => 5406, + "CullMaskKHR" => 6021, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "Scope" => match name { + "CrossDevice" => 0, + "Device" => 1, + "Workgroup" => 2, + "Subgroup" => 3, + "Invocation" => 4, + "QueueFamily" => 5, + "QueueFamilyKHR" => 5, + "ShaderCallKHR" => 6, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "GroupOperation" => match name { + "Reduce" => 0, + "InclusiveScan" => 1, + "ExclusiveScan" => 2, + "ClusteredReduce" => 3, + "PartitionedReduceNV" => 6, + "PartitionedInclusiveScanNV" => 7, + "PartitionedExclusiveScanNV" => 8, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "KernelEnqueueFlags" => match name { + "NoWait" => 0, + "WaitKernel" => 1, + "WaitWorkGroup" => 2, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "Capability" => match name { + "Matrix" => 0, + "Shader" => 1, + "Geometry" => 2, + "Tessellation" => 3, + "Addresses" => 4, + "Linkage" => 5, + "Kernel" => 6, + "Vector16" => 7, + "Float16Buffer" => 8, + "Float16" => 9, + "Float64" => 10, + "Int64" => 11, + "Int64Atomics" => 12, + "ImageBasic" => 13, + "ImageReadWrite" => 14, + "ImageMipmap" => 15, + "Pipes" => 17, + "Groups" => 18, + "DeviceEnqueue" => 19, + "LiteralSampler" => 20, + "AtomicStorage" => 21, + "Int16" => 22, + "TessellationPointSize" => 23, + "GeometryPointSize" => 24, + "ImageGatherExtended" => 25, + "StorageImageMultisample" => 27, + "UniformBufferArrayDynamicIndexing" => 28, + "SampledImageArrayDynamicIndexing" => 29, + "StorageBufferArrayDynamicIndexing" => 30, + "StorageImageArrayDynamicIndexing" => 31, + "ClipDistance" => 32, + "CullDistance" => 33, + "ImageCubeArray" => 34, + "SampleRateShading" => 35, + "ImageRect" => 36, + "SampledRect" => 37, + "GenericPointer" => 38, + "Int8" => 39, + "InputAttachment" => 40, + "SparseResidency" => 41, + "MinLod" => 42, + "Sampled1D" => 43, + "Image1D" => 44, + "SampledCubeArray" => 45, + "SampledBuffer" => 46, + "ImageBuffer" => 47, + "ImageMSArray" => 48, + "StorageImageExtendedFormats" => 49, + "ImageQuery" => 50, + "DerivativeControl" => 51, + "InterpolationFunction" => 52, + "TransformFeedback" => 53, + "GeometryStreams" => 54, + "StorageImageReadWithoutFormat" => 55, + "StorageImageWriteWithoutFormat" => 56, + "MultiViewport" => 57, + "SubgroupDispatch" => 58, + "NamedBarrier" => 59, + "PipeStorage" => 60, + "GroupNonUniform" => 61, + "GroupNonUniformVote" => 62, + "GroupNonUniformArithmetic" => 63, + "GroupNonUniformBallot" => 64, + "GroupNonUniformShuffle" => 65, + "GroupNonUniformShuffleRelative" => 66, + "GroupNonUniformClustered" => 67, + "GroupNonUniformQuad" => 68, + "ShaderLayer" => 69, + "ShaderViewportIndex" => 70, + "UniformDecoration" => 71, + "CoreBuiltinsARM" => 4165, + "TileImageColorReadAccessEXT" => 4166, + "TileImageDepthReadAccessEXT" => 4167, + "TileImageStencilReadAccessEXT" => 4168, + "FragmentShadingRateKHR" => 4422, + "SubgroupBallotKHR" => 4423, + "DrawParameters" => 4427, + "WorkgroupMemoryExplicitLayoutKHR" => 4428, + "WorkgroupMemoryExplicitLayout8BitAccessKHR" => 4429, + "WorkgroupMemoryExplicitLayout16BitAccessKHR" => 4430, + "SubgroupVoteKHR" => 4431, + "StorageBuffer16BitAccess" => 4433, + "StorageUniformBufferBlock16" => 4433, + "UniformAndStorageBuffer16BitAccess" => 4434, + "StorageUniform16" => 4434, + "StoragePushConstant16" => 4435, + "StorageInputOutput16" => 4436, + "DeviceGroup" => 4437, + "MultiView" => 4439, + "VariablePointersStorageBuffer" => 4441, + "VariablePointers" => 4442, + "AtomicStorageOps" => 4445, + "SampleMaskPostDepthCoverage" => 4447, + "StorageBuffer8BitAccess" => 4448, + "UniformAndStorageBuffer8BitAccess" => 4449, + "StoragePushConstant8" => 4450, + "DenormPreserve" => 4464, + "DenormFlushToZero" => 4465, + "SignedZeroInfNanPreserve" => 4466, + "RoundingModeRTE" => 4467, + "RoundingModeRTZ" => 4468, + "RayQueryProvisionalKHR" => 4471, + "RayQueryKHR" => 4472, + "RayTraversalPrimitiveCullingKHR" => 4478, + "RayTracingKHR" => 4479, + "TextureSampleWeightedQCOM" => 4484, + "TextureBoxFilterQCOM" => 4485, + "TextureBlockMatchQCOM" => 4486, + "Float16ImageAMD" => 5008, + "ImageGatherBiasLodAMD" => 5009, + "FragmentMaskAMD" => 5010, + "StencilExportEXT" => 5013, + "ImageReadWriteLodAMD" => 5015, + "Int64ImageEXT" => 5016, + "ShaderClockKHR" => 5055, + "ShaderEnqueueAMDX" => 5067, + "SampleMaskOverrideCoverageNV" => 5249, + "GeometryShaderPassthroughNV" => 5251, + "ShaderViewportIndexLayerEXT" => 5254, + "ShaderViewportIndexLayerNV" => 5254, + "ShaderViewportMaskNV" => 5255, + "ShaderStereoViewNV" => 5259, + "PerViewAttributesNV" => 5260, + "FragmentFullyCoveredEXT" => 5265, + "MeshShadingNV" => 5266, + "ImageFootprintNV" => 5282, + "MeshShadingEXT" => 5283, + "FragmentBarycentricKHR" => 5284, + "FragmentBarycentricNV" => 5284, + "ComputeDerivativeGroupQuadsNV" => 5288, + "FragmentDensityEXT" => 5291, + "ShadingRateNV" => 5291, + "GroupNonUniformPartitionedNV" => 5297, + "ShaderNonUniform" => 5301, + "ShaderNonUniformEXT" => 5301, + "RuntimeDescriptorArray" => 5302, + "RuntimeDescriptorArrayEXT" => 5302, + "InputAttachmentArrayDynamicIndexing" => 5303, + "InputAttachmentArrayDynamicIndexingEXT" => 5303, + "UniformTexelBufferArrayDynamicIndexing" => 5304, + "UniformTexelBufferArrayDynamicIndexingEXT" => 5304, + "StorageTexelBufferArrayDynamicIndexing" => 5305, + "StorageTexelBufferArrayDynamicIndexingEXT" => 5305, + "UniformBufferArrayNonUniformIndexing" => 5306, + "UniformBufferArrayNonUniformIndexingEXT" => 5306, + "SampledImageArrayNonUniformIndexing" => 5307, + "SampledImageArrayNonUniformIndexingEXT" => 5307, + "StorageBufferArrayNonUniformIndexing" => 5308, + "StorageBufferArrayNonUniformIndexingEXT" => 5308, + "StorageImageArrayNonUniformIndexing" => 5309, + "StorageImageArrayNonUniformIndexingEXT" => 5309, + "InputAttachmentArrayNonUniformIndexing" => 5310, + "InputAttachmentArrayNonUniformIndexingEXT" => 5310, + "UniformTexelBufferArrayNonUniformIndexing" => 5311, + "UniformTexelBufferArrayNonUniformIndexingEXT" => 5311, + "StorageTexelBufferArrayNonUniformIndexing" => 5312, + "StorageTexelBufferArrayNonUniformIndexingEXT" => 5312, + "RayTracingPositionFetchKHR" => 5336, + "RayTracingNV" => 5340, + "RayTracingMotionBlurNV" => 5341, + "VulkanMemoryModel" => 5345, + "VulkanMemoryModelKHR" => 5345, + "VulkanMemoryModelDeviceScope" => 5346, + "VulkanMemoryModelDeviceScopeKHR" => 5346, + "PhysicalStorageBufferAddresses" => 5347, + "PhysicalStorageBufferAddressesEXT" => 5347, + "ComputeDerivativeGroupLinearNV" => 5350, + "RayTracingProvisionalKHR" => 5353, + "CooperativeMatrixNV" => 5357, + "FragmentShaderSampleInterlockEXT" => 5363, + "FragmentShaderShadingRateInterlockEXT" => 5372, + "ShaderSMBuiltinsNV" => 5373, + "FragmentShaderPixelInterlockEXT" => 5378, + "DemoteToHelperInvocation" => 5379, + "DemoteToHelperInvocationEXT" => 5379, + "DisplacementMicromapNV" => 5380, + "RayTracingOpacityMicromapEXT" => 5381, + "ShaderInvocationReorderNV" => 5383, + "BindlessTextureNV" => 5390, + "RayQueryPositionFetchKHR" => 5391, + "RayTracingDisplacementMicromapNV" => 5409, + "SubgroupShuffleINTEL" => 5568, + "SubgroupBufferBlockIOINTEL" => 5569, + "SubgroupImageBlockIOINTEL" => 5570, + "SubgroupImageMediaBlockIOINTEL" => 5579, + "RoundToInfinityINTEL" => 5582, + "FloatingPointModeINTEL" => 5583, + "IntegerFunctions2INTEL" => 5584, + "FunctionPointersINTEL" => 5603, + "IndirectReferencesINTEL" => 5604, + "AsmINTEL" => 5606, + "AtomicFloat32MinMaxEXT" => 5612, + "AtomicFloat64MinMaxEXT" => 5613, + "AtomicFloat16MinMaxEXT" => 5616, + "VectorComputeINTEL" => 5617, + "VectorAnyINTEL" => 5619, + "ExpectAssumeKHR" => 5629, + "SubgroupAvcMotionEstimationINTEL" => 5696, + "SubgroupAvcMotionEstimationIntraINTEL" => 5697, + "SubgroupAvcMotionEstimationChromaINTEL" => 5698, + "VariableLengthArrayINTEL" => 5817, + "FunctionFloatControlINTEL" => 5821, + "FPGAMemoryAttributesINTEL" => 5824, + "FPFastMathModeINTEL" => 5837, + "ArbitraryPrecisionIntegersINTEL" => 5844, + "ArbitraryPrecisionFloatingPointINTEL" => 5845, + "UnstructuredLoopControlsINTEL" => 5886, + "FPGALoopControlsINTEL" => 5888, + "KernelAttributesINTEL" => 5892, + "FPGAKernelAttributesINTEL" => 5897, + "FPGAMemoryAccessesINTEL" => 5898, + "FPGAClusterAttributesINTEL" => 5904, + "LoopFuseINTEL" => 5906, + "FPGADSPControlINTEL" => 5908, + "MemoryAccessAliasingINTEL" => 5910, + "FPGAInvocationPipeliningAttributesINTEL" => 5916, + "FPGABufferLocationINTEL" => 5920, + "ArbitraryPrecisionFixedPointINTEL" => 5922, + "USMStorageClassesINTEL" => 5935, + "RuntimeAlignedAttributeINTEL" => 5939, + "IOPipesINTEL" => 5943, + "BlockingPipesINTEL" => 5945, + "FPGARegINTEL" => 5948, + "DotProductInputAll" => 6016, + "DotProductInputAllKHR" => 6016, + "DotProductInput4x8Bit" => 6017, + "DotProductInput4x8BitKHR" => 6017, + "DotProductInput4x8BitPacked" => 6018, + "DotProductInput4x8BitPackedKHR" => 6018, + "DotProduct" => 6019, + "DotProductKHR" => 6019, + "RayCullMaskKHR" => 6020, + "CooperativeMatrixKHR" => 6022, + "BitInstructions" => 6025, + "GroupNonUniformRotateKHR" => 6026, + "AtomicFloat32AddEXT" => 6033, + "AtomicFloat64AddEXT" => 6034, + "LongCompositesINTEL" => 6089, + "OptNoneINTEL" => 6094, + "AtomicFloat16AddEXT" => 6095, + "DebugInfoModuleINTEL" => 6114, + "BFloat16ConversionINTEL" => 6115, + "SplitBarrierINTEL" => 6141, + "FPGAClusterAttributesV2INTEL" => 6150, + "FPGAKernelAttributesv2INTEL" => 6161, + "FPMaxErrorINTEL" => 6169, + "FPGALatencyControlINTEL" => 6171, + "FPGAArgumentInterfacesINTEL" => 6174, + "GlobalVariableHostAccessINTEL" => 6187, + "GlobalVariableFPGADecorationsINTEL" => 6189, + "GroupUniformArithmeticKHR" => 6400, + "CacheControlsINTEL" => 6441, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "RayQueryIntersection" => match name { + "RayQueryCandidateIntersectionKHR" => 0, + "RayQueryCommittedIntersectionKHR" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "RayQueryCommittedIntersectionType" => match name { + "RayQueryCommittedIntersectionNoneKHR" => 0, + "RayQueryCommittedIntersectionTriangleKHR" => 1, + "RayQueryCommittedIntersectionGeneratedKHR" => 2, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "RayQueryCandidateIntersectionType" => match name { + "RayQueryCandidateIntersectionTriangleKHR" => 0, + "RayQueryCandidateIntersectionAABBKHR" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "PackedVectorFormat" => match name { + "PackedVectorFormat4x8Bit" => 0, + "PackedVectorFormat4x8BitKHR" => 0, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "CooperativeMatrixLayout" => match name { + "RowMajorKHR" => 0, + "ColumnMajorKHR" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "CooperativeMatrixUse" => match name { + "MatrixAKHR" => 0, + "MatrixBKHR" => 1, + "MatrixAccumulatorKHR" => 2, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "InitializationModeQualifier" => match name { + "InitOnDeviceReprogramINTEL" => 0, + "InitOnDeviceResetINTEL" => 1, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "LoadCacheControl" => match name { + "UncachedINTEL" => 0, + "CachedINTEL" => 1, + "StreamingINTEL" => 2, + "InvalidateAfterReadINTEL" => 3, + "ConstCachedINTEL" => 4, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "StoreCacheControl" => match name { + "UncachedINTEL" => 0, + "WriteThroughINTEL" => 1, + "WriteBackINTEL" => 2, + "StreamingINTEL" => 3, + _ => bail!("unknown enum: {}::{}", ety, name) + } + _ => bail!("unknown enum: {}::{}", ety, name), + }; + Ok(out) +} diff --git a/spirq-as/src/generated/mod.rs b/spirq-as/src/generated/mod.rs new file mode 100644 index 0000000..4652eeb --- /dev/null +++ b/spirq-as/src/generated/mod.rs @@ -0,0 +1,11 @@ +mod op_from_str; +mod op_has_result_id; +mod op_has_result_type_id; +mod operand_enum_type; +mod enum_from_str; + +pub use op_from_str::op_from_str; +pub use op_has_result_id::op_has_result_id; +pub use op_has_result_type_id::op_has_result_type_id; +pub use operand_enum_type::operand_enum_type; +pub use enum_from_str::enum_from_str; diff --git a/spirq-as/src/generated/op_from_str.rs b/spirq-as/src/generated/op_from_str.rs new file mode 100644 index 0000000..dcd245a --- /dev/null +++ b/spirq-as/src/generated/op_from_str.rs @@ -0,0 +1,733 @@ +use anyhow::{bail, Result}; +use num_traits::FromPrimitive; + +pub fn op_from_str(opname: &str) -> Result { + let out: u32 = match opname { + "OpNop" => 0, + "OpUndef" => 1, + "OpSourceContinued" => 2, + "OpSource" => 3, + "OpSourceExtension" => 4, + "OpName" => 5, + "OpMemberName" => 6, + "OpString" => 7, + "OpLine" => 8, + "OpExtension" => 10, + "OpExtInstImport" => 11, + "OpExtInst" => 12, + "OpMemoryModel" => 14, + "OpEntryPoint" => 15, + "OpExecutionMode" => 16, + "OpCapability" => 17, + "OpTypeVoid" => 19, + "OpTypeBool" => 20, + "OpTypeInt" => 21, + "OpTypeFloat" => 22, + "OpTypeVector" => 23, + "OpTypeMatrix" => 24, + "OpTypeImage" => 25, + "OpTypeSampler" => 26, + "OpTypeSampledImage" => 27, + "OpTypeArray" => 28, + "OpTypeRuntimeArray" => 29, + "OpTypeStruct" => 30, + "OpTypeOpaque" => 31, + "OpTypePointer" => 32, + "OpTypeFunction" => 33, + "OpTypeEvent" => 34, + "OpTypeDeviceEvent" => 35, + "OpTypeReserveId" => 36, + "OpTypeQueue" => 37, + "OpTypePipe" => 38, + "OpTypeForwardPointer" => 39, + "OpConstantTrue" => 41, + "OpConstantFalse" => 42, + "OpConstant" => 43, + "OpConstantComposite" => 44, + "OpConstantSampler" => 45, + "OpConstantNull" => 46, + "OpSpecConstantTrue" => 48, + "OpSpecConstantFalse" => 49, + "OpSpecConstant" => 50, + "OpSpecConstantComposite" => 51, + "OpSpecConstantOp" => 52, + "OpFunction" => 54, + "OpFunctionParameter" => 55, + "OpFunctionEnd" => 56, + "OpFunctionCall" => 57, + "OpVariable" => 59, + "OpImageTexelPointer" => 60, + "OpLoad" => 61, + "OpStore" => 62, + "OpCopyMemory" => 63, + "OpCopyMemorySized" => 64, + "OpAccessChain" => 65, + "OpInBoundsAccessChain" => 66, + "OpPtrAccessChain" => 67, + "OpArrayLength" => 68, + "OpGenericPtrMemSemantics" => 69, + "OpInBoundsPtrAccessChain" => 70, + "OpDecorate" => 71, + "OpMemberDecorate" => 72, + "OpDecorationGroup" => 73, + "OpGroupDecorate" => 74, + "OpGroupMemberDecorate" => 75, + "OpVectorExtractDynamic" => 77, + "OpVectorInsertDynamic" => 78, + "OpVectorShuffle" => 79, + "OpCompositeConstruct" => 80, + "OpCompositeExtract" => 81, + "OpCompositeInsert" => 82, + "OpCopyObject" => 83, + "OpTranspose" => 84, + "OpSampledImage" => 86, + "OpImageSampleImplicitLod" => 87, + "OpImageSampleExplicitLod" => 88, + "OpImageSampleDrefImplicitLod" => 89, + "OpImageSampleDrefExplicitLod" => 90, + "OpImageSampleProjImplicitLod" => 91, + "OpImageSampleProjExplicitLod" => 92, + "OpImageSampleProjDrefImplicitLod" => 93, + "OpImageSampleProjDrefExplicitLod" => 94, + "OpImageFetch" => 95, + "OpImageGather" => 96, + "OpImageDrefGather" => 97, + "OpImageRead" => 98, + "OpImageWrite" => 99, + "OpImage" => 100, + "OpImageQueryFormat" => 101, + "OpImageQueryOrder" => 102, + "OpImageQuerySizeLod" => 103, + "OpImageQuerySize" => 104, + "OpImageQueryLod" => 105, + "OpImageQueryLevels" => 106, + "OpImageQuerySamples" => 107, + "OpConvertFToU" => 109, + "OpConvertFToS" => 110, + "OpConvertSToF" => 111, + "OpConvertUToF" => 112, + "OpUConvert" => 113, + "OpSConvert" => 114, + "OpFConvert" => 115, + "OpQuantizeToF16" => 116, + "OpConvertPtrToU" => 117, + "OpSatConvertSToU" => 118, + "OpSatConvertUToS" => 119, + "OpConvertUToPtr" => 120, + "OpPtrCastToGeneric" => 121, + "OpGenericCastToPtr" => 122, + "OpGenericCastToPtrExplicit" => 123, + "OpBitcast" => 124, + "OpSNegate" => 126, + "OpFNegate" => 127, + "OpIAdd" => 128, + "OpFAdd" => 129, + "OpISub" => 130, + "OpFSub" => 131, + "OpIMul" => 132, + "OpFMul" => 133, + "OpUDiv" => 134, + "OpSDiv" => 135, + "OpFDiv" => 136, + "OpUMod" => 137, + "OpSRem" => 138, + "OpSMod" => 139, + "OpFRem" => 140, + "OpFMod" => 141, + "OpVectorTimesScalar" => 142, + "OpMatrixTimesScalar" => 143, + "OpVectorTimesMatrix" => 144, + "OpMatrixTimesVector" => 145, + "OpMatrixTimesMatrix" => 146, + "OpOuterProduct" => 147, + "OpDot" => 148, + "OpIAddCarry" => 149, + "OpISubBorrow" => 150, + "OpUMulExtended" => 151, + "OpSMulExtended" => 152, + "OpAny" => 154, + "OpAll" => 155, + "OpIsNan" => 156, + "OpIsInf" => 157, + "OpIsFinite" => 158, + "OpIsNormal" => 159, + "OpSignBitSet" => 160, + "OpLessOrGreater" => 161, + "OpOrdered" => 162, + "OpUnordered" => 163, + "OpLogicalEqual" => 164, + "OpLogicalNotEqual" => 165, + "OpLogicalOr" => 166, + "OpLogicalAnd" => 167, + "OpLogicalNot" => 168, + "OpSelect" => 169, + "OpIEqual" => 170, + "OpINotEqual" => 171, + "OpUGreaterThan" => 172, + "OpSGreaterThan" => 173, + "OpUGreaterThanEqual" => 174, + "OpSGreaterThanEqual" => 175, + "OpULessThan" => 176, + "OpSLessThan" => 177, + "OpULessThanEqual" => 178, + "OpSLessThanEqual" => 179, + "OpFOrdEqual" => 180, + "OpFUnordEqual" => 181, + "OpFOrdNotEqual" => 182, + "OpFUnordNotEqual" => 183, + "OpFOrdLessThan" => 184, + "OpFUnordLessThan" => 185, + "OpFOrdGreaterThan" => 186, + "OpFUnordGreaterThan" => 187, + "OpFOrdLessThanEqual" => 188, + "OpFUnordLessThanEqual" => 189, + "OpFOrdGreaterThanEqual" => 190, + "OpFUnordGreaterThanEqual" => 191, + "OpShiftRightLogical" => 194, + "OpShiftRightArithmetic" => 195, + "OpShiftLeftLogical" => 196, + "OpBitwiseOr" => 197, + "OpBitwiseXor" => 198, + "OpBitwiseAnd" => 199, + "OpNot" => 200, + "OpBitFieldInsert" => 201, + "OpBitFieldSExtract" => 202, + "OpBitFieldUExtract" => 203, + "OpBitReverse" => 204, + "OpBitCount" => 205, + "OpDPdx" => 207, + "OpDPdy" => 208, + "OpFwidth" => 209, + "OpDPdxFine" => 210, + "OpDPdyFine" => 211, + "OpFwidthFine" => 212, + "OpDPdxCoarse" => 213, + "OpDPdyCoarse" => 214, + "OpFwidthCoarse" => 215, + "OpEmitVertex" => 218, + "OpEndPrimitive" => 219, + "OpEmitStreamVertex" => 220, + "OpEndStreamPrimitive" => 221, + "OpControlBarrier" => 224, + "OpMemoryBarrier" => 225, + "OpAtomicLoad" => 227, + "OpAtomicStore" => 228, + "OpAtomicExchange" => 229, + "OpAtomicCompareExchange" => 230, + "OpAtomicCompareExchangeWeak" => 231, + "OpAtomicIIncrement" => 232, + "OpAtomicIDecrement" => 233, + "OpAtomicIAdd" => 234, + "OpAtomicISub" => 235, + "OpAtomicSMin" => 236, + "OpAtomicUMin" => 237, + "OpAtomicSMax" => 238, + "OpAtomicUMax" => 239, + "OpAtomicAnd" => 240, + "OpAtomicOr" => 241, + "OpAtomicXor" => 242, + "OpPhi" => 245, + "OpLoopMerge" => 246, + "OpSelectionMerge" => 247, + "OpLabel" => 248, + "OpBranch" => 249, + "OpBranchConditional" => 250, + "OpSwitch" => 251, + "OpKill" => 252, + "OpReturn" => 253, + "OpReturnValue" => 254, + "OpUnreachable" => 255, + "OpLifetimeStart" => 256, + "OpLifetimeStop" => 257, + "OpGroupAsyncCopy" => 259, + "OpGroupWaitEvents" => 260, + "OpGroupAll" => 261, + "OpGroupAny" => 262, + "OpGroupBroadcast" => 263, + "OpGroupIAdd" => 264, + "OpGroupFAdd" => 265, + "OpGroupFMin" => 266, + "OpGroupUMin" => 267, + "OpGroupSMin" => 268, + "OpGroupFMax" => 269, + "OpGroupUMax" => 270, + "OpGroupSMax" => 271, + "OpReadPipe" => 274, + "OpWritePipe" => 275, + "OpReservedReadPipe" => 276, + "OpReservedWritePipe" => 277, + "OpReserveReadPipePackets" => 278, + "OpReserveWritePipePackets" => 279, + "OpCommitReadPipe" => 280, + "OpCommitWritePipe" => 281, + "OpIsValidReserveId" => 282, + "OpGetNumPipePackets" => 283, + "OpGetMaxPipePackets" => 284, + "OpGroupReserveReadPipePackets" => 285, + "OpGroupReserveWritePipePackets" => 286, + "OpGroupCommitReadPipe" => 287, + "OpGroupCommitWritePipe" => 288, + "OpEnqueueMarker" => 291, + "OpEnqueueKernel" => 292, + "OpGetKernelNDrangeSubGroupCount" => 293, + "OpGetKernelNDrangeMaxSubGroupSize" => 294, + "OpGetKernelWorkGroupSize" => 295, + "OpGetKernelPreferredWorkGroupSizeMultiple" => 296, + "OpRetainEvent" => 297, + "OpReleaseEvent" => 298, + "OpCreateUserEvent" => 299, + "OpIsValidEvent" => 300, + "OpSetUserEventStatus" => 301, + "OpCaptureEventProfilingInfo" => 302, + "OpGetDefaultQueue" => 303, + "OpBuildNDRange" => 304, + "OpImageSparseSampleImplicitLod" => 305, + "OpImageSparseSampleExplicitLod" => 306, + "OpImageSparseSampleDrefImplicitLod" => 307, + "OpImageSparseSampleDrefExplicitLod" => 308, + "OpImageSparseSampleProjImplicitLod" => 309, + "OpImageSparseSampleProjExplicitLod" => 310, + "OpImageSparseSampleProjDrefImplicitLod" => 311, + "OpImageSparseSampleProjDrefExplicitLod" => 312, + "OpImageSparseFetch" => 313, + "OpImageSparseGather" => 314, + "OpImageSparseDrefGather" => 315, + "OpImageSparseTexelsResident" => 316, + "OpNoLine" => 317, + "OpAtomicFlagTestAndSet" => 318, + "OpAtomicFlagClear" => 319, + "OpImageSparseRead" => 320, + "OpSizeOf" => 321, + "OpTypePipeStorage" => 322, + "OpConstantPipeStorage" => 323, + "OpCreatePipeFromPipeStorage" => 324, + "OpGetKernelLocalSizeForSubgroupCount" => 325, + "OpGetKernelMaxNumSubgroups" => 326, + "OpTypeNamedBarrier" => 327, + "OpNamedBarrierInitialize" => 328, + "OpMemoryNamedBarrier" => 329, + "OpModuleProcessed" => 330, + "OpExecutionModeId" => 331, + "OpDecorateId" => 332, + "OpGroupNonUniformElect" => 333, + "OpGroupNonUniformAll" => 334, + "OpGroupNonUniformAny" => 335, + "OpGroupNonUniformAllEqual" => 336, + "OpGroupNonUniformBroadcast" => 337, + "OpGroupNonUniformBroadcastFirst" => 338, + "OpGroupNonUniformBallot" => 339, + "OpGroupNonUniformInverseBallot" => 340, + "OpGroupNonUniformBallotBitExtract" => 341, + "OpGroupNonUniformBallotBitCount" => 342, + "OpGroupNonUniformBallotFindLSB" => 343, + "OpGroupNonUniformBallotFindMSB" => 344, + "OpGroupNonUniformShuffle" => 345, + "OpGroupNonUniformShuffleXor" => 346, + "OpGroupNonUniformShuffleUp" => 347, + "OpGroupNonUniformShuffleDown" => 348, + "OpGroupNonUniformIAdd" => 349, + "OpGroupNonUniformFAdd" => 350, + "OpGroupNonUniformIMul" => 351, + "OpGroupNonUniformFMul" => 352, + "OpGroupNonUniformSMin" => 353, + "OpGroupNonUniformUMin" => 354, + "OpGroupNonUniformFMin" => 355, + "OpGroupNonUniformSMax" => 356, + "OpGroupNonUniformUMax" => 357, + "OpGroupNonUniformFMax" => 358, + "OpGroupNonUniformBitwiseAnd" => 359, + "OpGroupNonUniformBitwiseOr" => 360, + "OpGroupNonUniformBitwiseXor" => 361, + "OpGroupNonUniformLogicalAnd" => 362, + "OpGroupNonUniformLogicalOr" => 363, + "OpGroupNonUniformLogicalXor" => 364, + "OpGroupNonUniformQuadBroadcast" => 365, + "OpGroupNonUniformQuadSwap" => 366, + "OpCopyLogical" => 400, + "OpPtrEqual" => 401, + "OpPtrNotEqual" => 402, + "OpPtrDiff" => 403, + "OpColorAttachmentReadEXT" => 4160, + "OpDepthAttachmentReadEXT" => 4161, + "OpStencilAttachmentReadEXT" => 4162, + "OpTerminateInvocation" => 4416, + "OpSubgroupBallotKHR" => 4421, + "OpSubgroupFirstInvocationKHR" => 4422, + "OpSubgroupAllKHR" => 4428, + "OpSubgroupAnyKHR" => 4429, + "OpSubgroupAllEqualKHR" => 4430, + "OpGroupNonUniformRotateKHR" => 4431, + "OpSubgroupReadInvocationKHR" => 4432, + "OpTraceRayKHR" => 4445, + "OpExecuteCallableKHR" => 4446, + "OpConvertUToAccelerationStructureKHR" => 4447, + "OpIgnoreIntersectionKHR" => 4448, + "OpTerminateRayKHR" => 4449, + "OpSDot" => 4450, + "OpSDotKHR" => 4450, + "OpUDot" => 4451, + "OpUDotKHR" => 4451, + "OpSUDot" => 4452, + "OpSUDotKHR" => 4452, + "OpSDotAccSat" => 4453, + "OpSDotAccSatKHR" => 4453, + "OpUDotAccSat" => 4454, + "OpUDotAccSatKHR" => 4454, + "OpSUDotAccSat" => 4455, + "OpSUDotAccSatKHR" => 4455, + "OpTypeCooperativeMatrixKHR" => 4456, + "OpCooperativeMatrixLoadKHR" => 4457, + "OpCooperativeMatrixStoreKHR" => 4458, + "OpCooperativeMatrixMulAddKHR" => 4459, + "OpCooperativeMatrixLengthKHR" => 4460, + "OpTypeRayQueryKHR" => 4472, + "OpRayQueryInitializeKHR" => 4473, + "OpRayQueryTerminateKHR" => 4474, + "OpRayQueryGenerateIntersectionKHR" => 4475, + "OpRayQueryConfirmIntersectionKHR" => 4476, + "OpRayQueryProceedKHR" => 4477, + "OpRayQueryGetIntersectionTypeKHR" => 4479, + "OpImageSampleWeightedQCOM" => 4480, + "OpImageBoxFilterQCOM" => 4481, + "OpImageBlockMatchSSDQCOM" => 4482, + "OpImageBlockMatchSADQCOM" => 4483, + "OpGroupIAddNonUniformAMD" => 5000, + "OpGroupFAddNonUniformAMD" => 5001, + "OpGroupFMinNonUniformAMD" => 5002, + "OpGroupUMinNonUniformAMD" => 5003, + "OpGroupSMinNonUniformAMD" => 5004, + "OpGroupFMaxNonUniformAMD" => 5005, + "OpGroupUMaxNonUniformAMD" => 5006, + "OpGroupSMaxNonUniformAMD" => 5007, + "OpFragmentMaskFetchAMD" => 5011, + "OpFragmentFetchAMD" => 5012, + "OpReadClockKHR" => 5056, + "OpFinalizeNodePayloadsAMDX" => 5075, + "OpFinishWritingNodePayloadAMDX" => 5078, + "OpInitializeNodePayloadsAMDX" => 5090, + "OpHitObjectRecordHitMotionNV" => 5249, + "OpHitObjectRecordHitWithIndexMotionNV" => 5250, + "OpHitObjectRecordMissMotionNV" => 5251, + "OpHitObjectGetWorldToObjectNV" => 5252, + "OpHitObjectGetObjectToWorldNV" => 5253, + "OpHitObjectGetObjectRayDirectionNV" => 5254, + "OpHitObjectGetObjectRayOriginNV" => 5255, + "OpHitObjectTraceRayMotionNV" => 5256, + "OpHitObjectGetShaderRecordBufferHandleNV" => 5257, + "OpHitObjectGetShaderBindingTableRecordIndexNV" => 5258, + "OpHitObjectRecordEmptyNV" => 5259, + "OpHitObjectTraceRayNV" => 5260, + "OpHitObjectRecordHitNV" => 5261, + "OpHitObjectRecordHitWithIndexNV" => 5262, + "OpHitObjectRecordMissNV" => 5263, + "OpHitObjectExecuteShaderNV" => 5264, + "OpHitObjectGetCurrentTimeNV" => 5265, + "OpHitObjectGetAttributesNV" => 5266, + "OpHitObjectGetHitKindNV" => 5267, + "OpHitObjectGetPrimitiveIndexNV" => 5268, + "OpHitObjectGetGeometryIndexNV" => 5269, + "OpHitObjectGetInstanceIdNV" => 5270, + "OpHitObjectGetInstanceCustomIndexNV" => 5271, + "OpHitObjectGetWorldRayDirectionNV" => 5272, + "OpHitObjectGetWorldRayOriginNV" => 5273, + "OpHitObjectGetRayTMaxNV" => 5274, + "OpHitObjectGetRayTMinNV" => 5275, + "OpHitObjectIsEmptyNV" => 5276, + "OpHitObjectIsHitNV" => 5277, + "OpHitObjectIsMissNV" => 5278, + "OpReorderThreadWithHitObjectNV" => 5279, + "OpReorderThreadWithHintNV" => 5280, + "OpTypeHitObjectNV" => 5281, + "OpImageSampleFootprintNV" => 5283, + "OpEmitMeshTasksEXT" => 5294, + "OpSetMeshOutputsEXT" => 5295, + "OpGroupNonUniformPartitionNV" => 5296, + "OpWritePackedPrimitiveIndices4x8NV" => 5299, + "OpFetchMicroTriangleVertexPositionNV" => 5300, + "OpFetchMicroTriangleVertexBarycentricNV" => 5301, + "OpReportIntersectionNV" => 5334, + "OpReportIntersectionKHR" => 5334, + "OpIgnoreIntersectionNV" => 5335, + "OpTerminateRayNV" => 5336, + "OpTraceNV" => 5337, + "OpTraceMotionNV" => 5338, + "OpTraceRayMotionNV" => 5339, + "OpRayQueryGetIntersectionTriangleVertexPositionsKHR" => 5340, + "OpTypeAccelerationStructureNV" => 5341, + "OpTypeAccelerationStructureKHR" => 5341, + "OpExecuteCallableNV" => 5344, + "OpTypeCooperativeMatrixNV" => 5358, + "OpCooperativeMatrixLoadNV" => 5359, + "OpCooperativeMatrixStoreNV" => 5360, + "OpCooperativeMatrixMulAddNV" => 5361, + "OpCooperativeMatrixLengthNV" => 5362, + "OpBeginInvocationInterlockEXT" => 5364, + "OpEndInvocationInterlockEXT" => 5365, + "OpDemoteToHelperInvocation" => 5380, + "OpDemoteToHelperInvocationEXT" => 5380, + "OpIsHelperInvocationEXT" => 5381, + "OpConvertUToImageNV" => 5391, + "OpConvertUToSamplerNV" => 5392, + "OpConvertImageToUNV" => 5393, + "OpConvertSamplerToUNV" => 5394, + "OpConvertUToSampledImageNV" => 5395, + "OpConvertSampledImageToUNV" => 5396, + "OpSamplerImageAddressingModeNV" => 5397, + "OpSubgroupShuffleINTEL" => 5571, + "OpSubgroupShuffleDownINTEL" => 5572, + "OpSubgroupShuffleUpINTEL" => 5573, + "OpSubgroupShuffleXorINTEL" => 5574, + "OpSubgroupBlockReadINTEL" => 5575, + "OpSubgroupBlockWriteINTEL" => 5576, + "OpSubgroupImageBlockReadINTEL" => 5577, + "OpSubgroupImageBlockWriteINTEL" => 5578, + "OpSubgroupImageMediaBlockReadINTEL" => 5580, + "OpSubgroupImageMediaBlockWriteINTEL" => 5581, + "OpUCountLeadingZerosINTEL" => 5585, + "OpUCountTrailingZerosINTEL" => 5586, + "OpAbsISubINTEL" => 5587, + "OpAbsUSubINTEL" => 5588, + "OpIAddSatINTEL" => 5589, + "OpUAddSatINTEL" => 5590, + "OpIAverageINTEL" => 5591, + "OpUAverageINTEL" => 5592, + "OpIAverageRoundedINTEL" => 5593, + "OpUAverageRoundedINTEL" => 5594, + "OpISubSatINTEL" => 5595, + "OpUSubSatINTEL" => 5596, + "OpIMul32x16INTEL" => 5597, + "OpUMul32x16INTEL" => 5598, + "OpConstantFunctionPointerINTEL" => 5600, + "OpFunctionPointerCallINTEL" => 5601, + "OpAsmTargetINTEL" => 5609, + "OpAsmINTEL" => 5610, + "OpAsmCallINTEL" => 5611, + "OpAtomicFMinEXT" => 5614, + "OpAtomicFMaxEXT" => 5615, + "OpAssumeTrueKHR" => 5630, + "OpExpectKHR" => 5631, + "OpDecorateString" => 5632, + "OpDecorateStringGOOGLE" => 5632, + "OpMemberDecorateString" => 5633, + "OpMemberDecorateStringGOOGLE" => 5633, + "OpVmeImageINTEL" => 5699, + "OpTypeVmeImageINTEL" => 5700, + "OpTypeAvcImePayloadINTEL" => 5701, + "OpTypeAvcRefPayloadINTEL" => 5702, + "OpTypeAvcSicPayloadINTEL" => 5703, + "OpTypeAvcMcePayloadINTEL" => 5704, + "OpTypeAvcMceResultINTEL" => 5705, + "OpTypeAvcImeResultINTEL" => 5706, + "OpTypeAvcImeResultSingleReferenceStreamoutINTEL" => 5707, + "OpTypeAvcImeResultDualReferenceStreamoutINTEL" => 5708, + "OpTypeAvcImeSingleReferenceStreaminINTEL" => 5709, + "OpTypeAvcImeDualReferenceStreaminINTEL" => 5710, + "OpTypeAvcRefResultINTEL" => 5711, + "OpTypeAvcSicResultINTEL" => 5712, + "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL" => 5713, + "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL" => 5714, + "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL" => 5715, + "OpSubgroupAvcMceSetInterShapePenaltyINTEL" => 5716, + "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL" => 5717, + "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL" => 5718, + "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL" => 5719, + "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL" => 5720, + "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL" => 5721, + "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL" => 5722, + "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL" => 5723, + "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL" => 5724, + "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL" => 5725, + "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL" => 5726, + "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL" => 5727, + "OpSubgroupAvcMceSetAcOnlyHaarINTEL" => 5728, + "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL" => 5729, + "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL" => 5730, + "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL" => 5731, + "OpSubgroupAvcMceConvertToImePayloadINTEL" => 5732, + "OpSubgroupAvcMceConvertToImeResultINTEL" => 5733, + "OpSubgroupAvcMceConvertToRefPayloadINTEL" => 5734, + "OpSubgroupAvcMceConvertToRefResultINTEL" => 5735, + "OpSubgroupAvcMceConvertToSicPayloadINTEL" => 5736, + "OpSubgroupAvcMceConvertToSicResultINTEL" => 5737, + "OpSubgroupAvcMceGetMotionVectorsINTEL" => 5738, + "OpSubgroupAvcMceGetInterDistortionsINTEL" => 5739, + "OpSubgroupAvcMceGetBestInterDistortionsINTEL" => 5740, + "OpSubgroupAvcMceGetInterMajorShapeINTEL" => 5741, + "OpSubgroupAvcMceGetInterMinorShapeINTEL" => 5742, + "OpSubgroupAvcMceGetInterDirectionsINTEL" => 5743, + "OpSubgroupAvcMceGetInterMotionVectorCountINTEL" => 5744, + "OpSubgroupAvcMceGetInterReferenceIdsINTEL" => 5745, + "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL" => 5746, + "OpSubgroupAvcImeInitializeINTEL" => 5747, + "OpSubgroupAvcImeSetSingleReferenceINTEL" => 5748, + "OpSubgroupAvcImeSetDualReferenceINTEL" => 5749, + "OpSubgroupAvcImeRefWindowSizeINTEL" => 5750, + "OpSubgroupAvcImeAdjustRefOffsetINTEL" => 5751, + "OpSubgroupAvcImeConvertToMcePayloadINTEL" => 5752, + "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL" => 5753, + "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL" => 5754, + "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL" => 5755, + "OpSubgroupAvcImeSetWeightedSadINTEL" => 5756, + "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL" => 5757, + "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL" => 5758, + "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL" => 5759, + "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL" => 5760, + "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL" => 5761, + "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL" => 5762, + "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL" => 5763, + "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL" => 5764, + "OpSubgroupAvcImeConvertToMceResultINTEL" => 5765, + "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL" => 5766, + "OpSubgroupAvcImeGetDualReferenceStreaminINTEL" => 5767, + "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL" => 5768, + "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL" => 5769, + "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL" => 5770, + "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL" => 5771, + "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL" => 5772, + "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL" => 5773, + "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL" => 5774, + "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL" => 5775, + "OpSubgroupAvcImeGetBorderReachedINTEL" => 5776, + "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL" => 5777, + "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL" => 5778, + "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL" => 5779, + "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL" => 5780, + "OpSubgroupAvcFmeInitializeINTEL" => 5781, + "OpSubgroupAvcBmeInitializeINTEL" => 5782, + "OpSubgroupAvcRefConvertToMcePayloadINTEL" => 5783, + "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL" => 5784, + "OpSubgroupAvcRefSetBilinearFilterEnableINTEL" => 5785, + "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL" => 5786, + "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL" => 5787, + "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL" => 5788, + "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL" => 5789, + "OpSubgroupAvcRefConvertToMceResultINTEL" => 5790, + "OpSubgroupAvcSicInitializeINTEL" => 5791, + "OpSubgroupAvcSicConfigureSkcINTEL" => 5792, + "OpSubgroupAvcSicConfigureIpeLumaINTEL" => 5793, + "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL" => 5794, + "OpSubgroupAvcSicGetMotionVectorMaskINTEL" => 5795, + "OpSubgroupAvcSicConvertToMcePayloadINTEL" => 5796, + "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL" => 5797, + "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL" => 5798, + "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL" => 5799, + "OpSubgroupAvcSicSetBilinearFilterEnableINTEL" => 5800, + "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL" => 5801, + "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL" => 5802, + "OpSubgroupAvcSicEvaluateIpeINTEL" => 5803, + "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL" => 5804, + "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL" => 5805, + "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL" => 5806, + "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL" => 5807, + "OpSubgroupAvcSicConvertToMceResultINTEL" => 5808, + "OpSubgroupAvcSicGetIpeLumaShapeINTEL" => 5809, + "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL" => 5810, + "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL" => 5811, + "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL" => 5812, + "OpSubgroupAvcSicGetIpeChromaModeINTEL" => 5813, + "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL" => 5814, + "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL" => 5815, + "OpSubgroupAvcSicGetInterRawSadsINTEL" => 5816, + "OpVariableLengthArrayINTEL" => 5818, + "OpSaveMemoryINTEL" => 5819, + "OpRestoreMemoryINTEL" => 5820, + "OpArbitraryFloatSinCosPiINTEL" => 5840, + "OpArbitraryFloatCastINTEL" => 5841, + "OpArbitraryFloatCastFromIntINTEL" => 5842, + "OpArbitraryFloatCastToIntINTEL" => 5843, + "OpArbitraryFloatAddINTEL" => 5846, + "OpArbitraryFloatSubINTEL" => 5847, + "OpArbitraryFloatMulINTEL" => 5848, + "OpArbitraryFloatDivINTEL" => 5849, + "OpArbitraryFloatGTINTEL" => 5850, + "OpArbitraryFloatGEINTEL" => 5851, + "OpArbitraryFloatLTINTEL" => 5852, + "OpArbitraryFloatLEINTEL" => 5853, + "OpArbitraryFloatEQINTEL" => 5854, + "OpArbitraryFloatRecipINTEL" => 5855, + "OpArbitraryFloatRSqrtINTEL" => 5856, + "OpArbitraryFloatCbrtINTEL" => 5857, + "OpArbitraryFloatHypotINTEL" => 5858, + "OpArbitraryFloatSqrtINTEL" => 5859, + "OpArbitraryFloatLogINTEL" => 5860, + "OpArbitraryFloatLog2INTEL" => 5861, + "OpArbitraryFloatLog10INTEL" => 5862, + "OpArbitraryFloatLog1pINTEL" => 5863, + "OpArbitraryFloatExpINTEL" => 5864, + "OpArbitraryFloatExp2INTEL" => 5865, + "OpArbitraryFloatExp10INTEL" => 5866, + "OpArbitraryFloatExpm1INTEL" => 5867, + "OpArbitraryFloatSinINTEL" => 5868, + "OpArbitraryFloatCosINTEL" => 5869, + "OpArbitraryFloatSinCosINTEL" => 5870, + "OpArbitraryFloatSinPiINTEL" => 5871, + "OpArbitraryFloatCosPiINTEL" => 5872, + "OpArbitraryFloatASinINTEL" => 5873, + "OpArbitraryFloatASinPiINTEL" => 5874, + "OpArbitraryFloatACosINTEL" => 5875, + "OpArbitraryFloatACosPiINTEL" => 5876, + "OpArbitraryFloatATanINTEL" => 5877, + "OpArbitraryFloatATanPiINTEL" => 5878, + "OpArbitraryFloatATan2INTEL" => 5879, + "OpArbitraryFloatPowINTEL" => 5880, + "OpArbitraryFloatPowRINTEL" => 5881, + "OpArbitraryFloatPowNINTEL" => 5882, + "OpLoopControlINTEL" => 5887, + "OpAliasDomainDeclINTEL" => 5911, + "OpAliasScopeDeclINTEL" => 5912, + "OpAliasScopeListDeclINTEL" => 5913, + "OpFixedSqrtINTEL" => 5923, + "OpFixedRecipINTEL" => 5924, + "OpFixedRsqrtINTEL" => 5925, + "OpFixedSinINTEL" => 5926, + "OpFixedCosINTEL" => 5927, + "OpFixedSinCosINTEL" => 5928, + "OpFixedSinPiINTEL" => 5929, + "OpFixedCosPiINTEL" => 5930, + "OpFixedSinCosPiINTEL" => 5931, + "OpFixedLogINTEL" => 5932, + "OpFixedExpINTEL" => 5933, + "OpPtrCastToCrossWorkgroupINTEL" => 5934, + "OpCrossWorkgroupCastToPtrINTEL" => 5938, + "OpReadPipeBlockingINTEL" => 5946, + "OpWritePipeBlockingINTEL" => 5947, + "OpFPGARegINTEL" => 5949, + "OpRayQueryGetRayTMinKHR" => 6016, + "OpRayQueryGetRayFlagsKHR" => 6017, + "OpRayQueryGetIntersectionTKHR" => 6018, + "OpRayQueryGetIntersectionInstanceCustomIndexKHR" => 6019, + "OpRayQueryGetIntersectionInstanceIdKHR" => 6020, + "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR" => 6021, + "OpRayQueryGetIntersectionGeometryIndexKHR" => 6022, + "OpRayQueryGetIntersectionPrimitiveIndexKHR" => 6023, + "OpRayQueryGetIntersectionBarycentricsKHR" => 6024, + "OpRayQueryGetIntersectionFrontFaceKHR" => 6025, + "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR" => 6026, + "OpRayQueryGetIntersectionObjectRayDirectionKHR" => 6027, + "OpRayQueryGetIntersectionObjectRayOriginKHR" => 6028, + "OpRayQueryGetWorldRayDirectionKHR" => 6029, + "OpRayQueryGetWorldRayOriginKHR" => 6030, + "OpRayQueryGetIntersectionObjectToWorldKHR" => 6031, + "OpRayQueryGetIntersectionWorldToObjectKHR" => 6032, + "OpAtomicFAddEXT" => 6035, + "OpTypeBufferSurfaceINTEL" => 6086, + "OpTypeStructContinuedINTEL" => 6090, + "OpConstantCompositeContinuedINTEL" => 6091, + "OpSpecConstantCompositeContinuedINTEL" => 6092, + "OpCompositeConstructContinuedINTEL" => 6096, + "OpConvertFToBF16INTEL" => 6116, + "OpConvertBF16ToFINTEL" => 6117, + "OpControlBarrierArriveINTEL" => 6142, + "OpControlBarrierWaitINTEL" => 6143, + "OpGroupIMulKHR" => 6401, + "OpGroupFMulKHR" => 6402, + "OpGroupBitwiseAndKHR" => 6403, + "OpGroupBitwiseOrKHR" => 6404, + "OpGroupBitwiseXorKHR" => 6405, + "OpGroupLogicalAndKHR" => 6406, + "OpGroupLogicalOrKHR" => 6407, + "OpGroupLogicalXorKHR" => 6408, + _ => bail!("Unknown opname: {}", opname), + }; + Ok(out) +} diff --git a/spirq-as/src/generated/op_has_result_id.rs b/spirq-as/src/generated/op_has_result_id.rs new file mode 100644 index 0000000..bf09615 --- /dev/null +++ b/spirq-as/src/generated/op_has_result_id.rs @@ -0,0 +1,721 @@ +use anyhow::{bail, Result}; + +pub fn op_has_result_id(opcode: u32) -> Result { + let out: bool = match opcode { + 0 => false, + 1 => true, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => true, + 8 => false, + 10 => false, + 11 => true, + 12 => true, + 14 => false, + 15 => false, + 16 => false, + 17 => false, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true, + 30 => true, + 31 => true, + 32 => true, + 33 => true, + 34 => true, + 35 => true, + 36 => true, + 37 => true, + 38 => true, + 39 => false, + 41 => true, + 42 => true, + 43 => true, + 44 => true, + 45 => true, + 46 => true, + 48 => true, + 49 => true, + 50 => true, + 51 => true, + 52 => true, + 54 => true, + 55 => true, + 56 => false, + 57 => true, + 59 => true, + 60 => true, + 61 => true, + 62 => false, + 63 => false, + 64 => false, + 65 => true, + 66 => true, + 67 => true, + 68 => true, + 69 => true, + 70 => true, + 71 => false, + 72 => false, + 73 => true, + 74 => false, + 75 => false, + 77 => true, + 78 => true, + 79 => true, + 80 => true, + 81 => true, + 82 => true, + 83 => true, + 84 => true, + 86 => true, + 87 => true, + 88 => true, + 89 => true, + 90 => true, + 91 => true, + 92 => true, + 93 => true, + 94 => true, + 95 => true, + 96 => true, + 97 => true, + 98 => true, + 99 => false, + 100 => true, + 101 => true, + 102 => true, + 103 => true, + 104 => true, + 105 => true, + 106 => true, + 107 => true, + 109 => true, + 110 => true, + 111 => true, + 112 => true, + 113 => true, + 114 => true, + 115 => true, + 116 => true, + 117 => true, + 118 => true, + 119 => true, + 120 => true, + 121 => true, + 122 => true, + 123 => true, + 124 => true, + 126 => true, + 127 => true, + 128 => true, + 129 => true, + 130 => true, + 131 => true, + 132 => true, + 133 => true, + 134 => true, + 135 => true, + 136 => true, + 137 => true, + 138 => true, + 139 => true, + 140 => true, + 141 => true, + 142 => true, + 143 => true, + 144 => true, + 145 => true, + 146 => true, + 147 => true, + 148 => true, + 149 => true, + 150 => true, + 151 => true, + 152 => true, + 154 => true, + 155 => true, + 156 => true, + 157 => true, + 158 => true, + 159 => true, + 160 => true, + 161 => true, + 162 => true, + 163 => true, + 164 => true, + 165 => true, + 166 => true, + 167 => true, + 168 => true, + 169 => true, + 170 => true, + 171 => true, + 172 => true, + 173 => true, + 174 => true, + 175 => true, + 176 => true, + 177 => true, + 178 => true, + 179 => true, + 180 => true, + 181 => true, + 182 => true, + 183 => true, + 184 => true, + 185 => true, + 186 => true, + 187 => true, + 188 => true, + 189 => true, + 190 => true, + 191 => true, + 194 => true, + 195 => true, + 196 => true, + 197 => true, + 198 => true, + 199 => true, + 200 => true, + 201 => true, + 202 => true, + 203 => true, + 204 => true, + 205 => true, + 207 => true, + 208 => true, + 209 => true, + 210 => true, + 211 => true, + 212 => true, + 213 => true, + 214 => true, + 215 => true, + 218 => false, + 219 => false, + 220 => false, + 221 => false, + 224 => false, + 225 => false, + 227 => true, + 228 => false, + 229 => true, + 230 => true, + 231 => true, + 232 => true, + 233 => true, + 234 => true, + 235 => true, + 236 => true, + 237 => true, + 238 => true, + 239 => true, + 240 => true, + 241 => true, + 242 => true, + 245 => true, + 246 => false, + 247 => false, + 248 => true, + 249 => false, + 250 => false, + 251 => false, + 252 => false, + 253 => false, + 254 => false, + 255 => false, + 256 => false, + 257 => false, + 259 => true, + 260 => false, + 261 => true, + 262 => true, + 263 => true, + 264 => true, + 265 => true, + 266 => true, + 267 => true, + 268 => true, + 269 => true, + 270 => true, + 271 => true, + 274 => true, + 275 => true, + 276 => true, + 277 => true, + 278 => true, + 279 => true, + 280 => false, + 281 => false, + 282 => true, + 283 => true, + 284 => true, + 285 => true, + 286 => true, + 287 => false, + 288 => false, + 291 => true, + 292 => true, + 293 => true, + 294 => true, + 295 => true, + 296 => true, + 297 => false, + 298 => false, + 299 => true, + 300 => true, + 301 => false, + 302 => false, + 303 => true, + 304 => true, + 305 => true, + 306 => true, + 307 => true, + 308 => true, + 309 => true, + 310 => true, + 311 => true, + 312 => true, + 313 => true, + 314 => true, + 315 => true, + 316 => true, + 317 => false, + 318 => true, + 319 => false, + 320 => true, + 321 => true, + 322 => true, + 323 => true, + 324 => true, + 325 => true, + 326 => true, + 327 => true, + 328 => true, + 329 => false, + 330 => false, + 331 => false, + 332 => false, + 333 => true, + 334 => true, + 335 => true, + 336 => true, + 337 => true, + 338 => true, + 339 => true, + 340 => true, + 341 => true, + 342 => true, + 343 => true, + 344 => true, + 345 => true, + 346 => true, + 347 => true, + 348 => true, + 349 => true, + 350 => true, + 351 => true, + 352 => true, + 353 => true, + 354 => true, + 355 => true, + 356 => true, + 357 => true, + 358 => true, + 359 => true, + 360 => true, + 361 => true, + 362 => true, + 363 => true, + 364 => true, + 365 => true, + 366 => true, + 400 => true, + 401 => true, + 402 => true, + 403 => true, + 4160 => true, + 4161 => true, + 4162 => true, + 4416 => false, + 4421 => true, + 4422 => true, + 4428 => true, + 4429 => true, + 4430 => true, + 4431 => true, + 4432 => true, + 4445 => false, + 4446 => false, + 4447 => true, + 4448 => false, + 4449 => false, + 4450 => true, + 4451 => true, + 4452 => true, + 4453 => true, + 4454 => true, + 4455 => true, + 4456 => true, + 4457 => true, + 4458 => false, + 4459 => true, + 4460 => true, + 4472 => true, + 4473 => false, + 4474 => false, + 4475 => false, + 4476 => false, + 4477 => true, + 4479 => true, + 4480 => true, + 4481 => true, + 4482 => true, + 4483 => true, + 5000 => true, + 5001 => true, + 5002 => true, + 5003 => true, + 5004 => true, + 5005 => true, + 5006 => true, + 5007 => true, + 5011 => true, + 5012 => true, + 5056 => true, + 5075 => false, + 5078 => true, + 5090 => false, + 5249 => false, + 5250 => false, + 5251 => false, + 5252 => true, + 5253 => true, + 5254 => true, + 5255 => true, + 5256 => false, + 5257 => true, + 5258 => true, + 5259 => false, + 5260 => false, + 5261 => false, + 5262 => false, + 5263 => false, + 5264 => false, + 5265 => true, + 5266 => false, + 5267 => true, + 5268 => true, + 5269 => true, + 5270 => true, + 5271 => true, + 5272 => true, + 5273 => true, + 5274 => true, + 5275 => true, + 5276 => true, + 5277 => true, + 5278 => true, + 5279 => false, + 5280 => false, + 5281 => true, + 5283 => true, + 5294 => false, + 5295 => false, + 5296 => true, + 5299 => false, + 5300 => true, + 5301 => true, + 5334 => true, + 5335 => false, + 5336 => false, + 5337 => false, + 5338 => false, + 5339 => false, + 5340 => true, + 5341 => true, + 5344 => false, + 5358 => true, + 5359 => true, + 5360 => false, + 5361 => true, + 5362 => true, + 5364 => false, + 5365 => false, + 5380 => false, + 5381 => true, + 5391 => true, + 5392 => true, + 5393 => true, + 5394 => true, + 5395 => true, + 5396 => true, + 5397 => false, + 5571 => true, + 5572 => true, + 5573 => true, + 5574 => true, + 5575 => true, + 5576 => false, + 5577 => true, + 5578 => false, + 5580 => true, + 5581 => false, + 5585 => true, + 5586 => true, + 5587 => true, + 5588 => true, + 5589 => true, + 5590 => true, + 5591 => true, + 5592 => true, + 5593 => true, + 5594 => true, + 5595 => true, + 5596 => true, + 5597 => true, + 5598 => true, + 5600 => true, + 5601 => true, + 5609 => true, + 5610 => true, + 5611 => true, + 5614 => true, + 5615 => true, + 5630 => false, + 5631 => true, + 5632 => false, + 5633 => false, + 5699 => true, + 5700 => true, + 5701 => true, + 5702 => true, + 5703 => true, + 5704 => true, + 5705 => true, + 5706 => true, + 5707 => true, + 5708 => true, + 5709 => true, + 5710 => true, + 5711 => true, + 5712 => true, + 5713 => true, + 5714 => true, + 5715 => true, + 5716 => true, + 5717 => true, + 5718 => true, + 5719 => true, + 5720 => true, + 5721 => true, + 5722 => true, + 5723 => true, + 5724 => true, + 5725 => true, + 5726 => true, + 5727 => true, + 5728 => true, + 5729 => true, + 5730 => true, + 5731 => true, + 5732 => true, + 5733 => true, + 5734 => true, + 5735 => true, + 5736 => true, + 5737 => true, + 5738 => true, + 5739 => true, + 5740 => true, + 5741 => true, + 5742 => true, + 5743 => true, + 5744 => true, + 5745 => true, + 5746 => true, + 5747 => true, + 5748 => true, + 5749 => true, + 5750 => true, + 5751 => true, + 5752 => true, + 5753 => true, + 5754 => true, + 5755 => true, + 5756 => true, + 5757 => true, + 5758 => true, + 5759 => true, + 5760 => true, + 5761 => true, + 5762 => true, + 5763 => true, + 5764 => true, + 5765 => true, + 5766 => true, + 5767 => true, + 5768 => true, + 5769 => true, + 5770 => true, + 5771 => true, + 5772 => true, + 5773 => true, + 5774 => true, + 5775 => true, + 5776 => true, + 5777 => true, + 5778 => true, + 5779 => true, + 5780 => true, + 5781 => true, + 5782 => true, + 5783 => true, + 5784 => true, + 5785 => true, + 5786 => true, + 5787 => true, + 5788 => true, + 5789 => true, + 5790 => true, + 5791 => true, + 5792 => true, + 5793 => true, + 5794 => true, + 5795 => true, + 5796 => true, + 5797 => true, + 5798 => true, + 5799 => true, + 5800 => true, + 5801 => true, + 5802 => true, + 5803 => true, + 5804 => true, + 5805 => true, + 5806 => true, + 5807 => true, + 5808 => true, + 5809 => true, + 5810 => true, + 5811 => true, + 5812 => true, + 5813 => true, + 5814 => true, + 5815 => true, + 5816 => true, + 5818 => true, + 5819 => true, + 5820 => false, + 5840 => true, + 5841 => true, + 5842 => true, + 5843 => true, + 5846 => true, + 5847 => true, + 5848 => true, + 5849 => true, + 5850 => true, + 5851 => true, + 5852 => true, + 5853 => true, + 5854 => true, + 5855 => true, + 5856 => true, + 5857 => true, + 5858 => true, + 5859 => true, + 5860 => true, + 5861 => true, + 5862 => true, + 5863 => true, + 5864 => true, + 5865 => true, + 5866 => true, + 5867 => true, + 5868 => true, + 5869 => true, + 5870 => true, + 5871 => true, + 5872 => true, + 5873 => true, + 5874 => true, + 5875 => true, + 5876 => true, + 5877 => true, + 5878 => true, + 5879 => true, + 5880 => true, + 5881 => true, + 5882 => true, + 5887 => false, + 5911 => true, + 5912 => true, + 5913 => true, + 5923 => true, + 5924 => true, + 5925 => true, + 5926 => true, + 5927 => true, + 5928 => true, + 5929 => true, + 5930 => true, + 5931 => true, + 5932 => true, + 5933 => true, + 5934 => true, + 5938 => true, + 5946 => true, + 5947 => true, + 5949 => true, + 6016 => true, + 6017 => true, + 6018 => true, + 6019 => true, + 6020 => true, + 6021 => true, + 6022 => true, + 6023 => true, + 6024 => true, + 6025 => true, + 6026 => true, + 6027 => true, + 6028 => true, + 6029 => true, + 6030 => true, + 6031 => true, + 6032 => true, + 6035 => true, + 6086 => true, + 6090 => false, + 6091 => false, + 6092 => false, + 6096 => true, + 6116 => true, + 6117 => true, + 6142 => false, + 6143 => false, + 6401 => true, + 6402 => true, + 6403 => true, + 6404 => true, + 6405 => true, + 6406 => true, + 6407 => true, + 6408 => true, + _ => bail!("Unknown opcode: {}", opcode), + }; + Ok(out) +} diff --git a/spirq-as/src/generated/op_has_result_type_id.rs b/spirq-as/src/generated/op_has_result_type_id.rs new file mode 100644 index 0000000..fa5d35b --- /dev/null +++ b/spirq-as/src/generated/op_has_result_type_id.rs @@ -0,0 +1,721 @@ +use anyhow::{bail, Result}; + +pub fn op_has_result_type_id(opcode: u32) -> Result { + let out: bool = match opcode { + 0 => false, + 1 => true, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 10 => false, + 11 => false, + 12 => true, + 14 => false, + 15 => false, + 16 => false, + 17 => false, + 19 => false, + 20 => false, + 21 => false, + 22 => false, + 23 => false, + 24 => false, + 25 => false, + 26 => false, + 27 => false, + 28 => false, + 29 => false, + 30 => false, + 31 => false, + 32 => false, + 33 => false, + 34 => false, + 35 => false, + 36 => false, + 37 => false, + 38 => false, + 39 => false, + 41 => true, + 42 => true, + 43 => true, + 44 => true, + 45 => true, + 46 => true, + 48 => true, + 49 => true, + 50 => true, + 51 => true, + 52 => true, + 54 => true, + 55 => true, + 56 => false, + 57 => true, + 59 => true, + 60 => true, + 61 => true, + 62 => false, + 63 => false, + 64 => false, + 65 => true, + 66 => true, + 67 => true, + 68 => true, + 69 => true, + 70 => true, + 71 => false, + 72 => false, + 73 => false, + 74 => false, + 75 => false, + 77 => true, + 78 => true, + 79 => true, + 80 => true, + 81 => true, + 82 => true, + 83 => true, + 84 => true, + 86 => true, + 87 => true, + 88 => true, + 89 => true, + 90 => true, + 91 => true, + 92 => true, + 93 => true, + 94 => true, + 95 => true, + 96 => true, + 97 => true, + 98 => true, + 99 => false, + 100 => true, + 101 => true, + 102 => true, + 103 => true, + 104 => true, + 105 => true, + 106 => true, + 107 => true, + 109 => true, + 110 => true, + 111 => true, + 112 => true, + 113 => true, + 114 => true, + 115 => true, + 116 => true, + 117 => true, + 118 => true, + 119 => true, + 120 => true, + 121 => true, + 122 => true, + 123 => true, + 124 => true, + 126 => true, + 127 => true, + 128 => true, + 129 => true, + 130 => true, + 131 => true, + 132 => true, + 133 => true, + 134 => true, + 135 => true, + 136 => true, + 137 => true, + 138 => true, + 139 => true, + 140 => true, + 141 => true, + 142 => true, + 143 => true, + 144 => true, + 145 => true, + 146 => true, + 147 => true, + 148 => true, + 149 => true, + 150 => true, + 151 => true, + 152 => true, + 154 => true, + 155 => true, + 156 => true, + 157 => true, + 158 => true, + 159 => true, + 160 => true, + 161 => true, + 162 => true, + 163 => true, + 164 => true, + 165 => true, + 166 => true, + 167 => true, + 168 => true, + 169 => true, + 170 => true, + 171 => true, + 172 => true, + 173 => true, + 174 => true, + 175 => true, + 176 => true, + 177 => true, + 178 => true, + 179 => true, + 180 => true, + 181 => true, + 182 => true, + 183 => true, + 184 => true, + 185 => true, + 186 => true, + 187 => true, + 188 => true, + 189 => true, + 190 => true, + 191 => true, + 194 => true, + 195 => true, + 196 => true, + 197 => true, + 198 => true, + 199 => true, + 200 => true, + 201 => true, + 202 => true, + 203 => true, + 204 => true, + 205 => true, + 207 => true, + 208 => true, + 209 => true, + 210 => true, + 211 => true, + 212 => true, + 213 => true, + 214 => true, + 215 => true, + 218 => false, + 219 => false, + 220 => false, + 221 => false, + 224 => false, + 225 => false, + 227 => true, + 228 => false, + 229 => true, + 230 => true, + 231 => true, + 232 => true, + 233 => true, + 234 => true, + 235 => true, + 236 => true, + 237 => true, + 238 => true, + 239 => true, + 240 => true, + 241 => true, + 242 => true, + 245 => true, + 246 => false, + 247 => false, + 248 => false, + 249 => false, + 250 => false, + 251 => false, + 252 => false, + 253 => false, + 254 => false, + 255 => false, + 256 => false, + 257 => false, + 259 => true, + 260 => false, + 261 => true, + 262 => true, + 263 => true, + 264 => true, + 265 => true, + 266 => true, + 267 => true, + 268 => true, + 269 => true, + 270 => true, + 271 => true, + 274 => true, + 275 => true, + 276 => true, + 277 => true, + 278 => true, + 279 => true, + 280 => false, + 281 => false, + 282 => true, + 283 => true, + 284 => true, + 285 => true, + 286 => true, + 287 => false, + 288 => false, + 291 => true, + 292 => true, + 293 => true, + 294 => true, + 295 => true, + 296 => true, + 297 => false, + 298 => false, + 299 => true, + 300 => true, + 301 => false, + 302 => false, + 303 => true, + 304 => true, + 305 => true, + 306 => true, + 307 => true, + 308 => true, + 309 => true, + 310 => true, + 311 => true, + 312 => true, + 313 => true, + 314 => true, + 315 => true, + 316 => true, + 317 => false, + 318 => true, + 319 => false, + 320 => true, + 321 => true, + 322 => false, + 323 => true, + 324 => true, + 325 => true, + 326 => true, + 327 => false, + 328 => true, + 329 => false, + 330 => false, + 331 => false, + 332 => false, + 333 => true, + 334 => true, + 335 => true, + 336 => true, + 337 => true, + 338 => true, + 339 => true, + 340 => true, + 341 => true, + 342 => true, + 343 => true, + 344 => true, + 345 => true, + 346 => true, + 347 => true, + 348 => true, + 349 => true, + 350 => true, + 351 => true, + 352 => true, + 353 => true, + 354 => true, + 355 => true, + 356 => true, + 357 => true, + 358 => true, + 359 => true, + 360 => true, + 361 => true, + 362 => true, + 363 => true, + 364 => true, + 365 => true, + 366 => true, + 400 => true, + 401 => true, + 402 => true, + 403 => true, + 4160 => true, + 4161 => true, + 4162 => true, + 4416 => false, + 4421 => true, + 4422 => true, + 4428 => true, + 4429 => true, + 4430 => true, + 4431 => true, + 4432 => true, + 4445 => false, + 4446 => false, + 4447 => true, + 4448 => false, + 4449 => false, + 4450 => true, + 4451 => true, + 4452 => true, + 4453 => true, + 4454 => true, + 4455 => true, + 4456 => false, + 4457 => true, + 4458 => false, + 4459 => true, + 4460 => true, + 4472 => false, + 4473 => false, + 4474 => false, + 4475 => false, + 4476 => false, + 4477 => true, + 4479 => true, + 4480 => true, + 4481 => true, + 4482 => true, + 4483 => true, + 5000 => true, + 5001 => true, + 5002 => true, + 5003 => true, + 5004 => true, + 5005 => true, + 5006 => true, + 5007 => true, + 5011 => true, + 5012 => true, + 5056 => true, + 5075 => false, + 5078 => true, + 5090 => false, + 5249 => false, + 5250 => false, + 5251 => false, + 5252 => true, + 5253 => true, + 5254 => true, + 5255 => true, + 5256 => false, + 5257 => true, + 5258 => true, + 5259 => false, + 5260 => false, + 5261 => false, + 5262 => false, + 5263 => false, + 5264 => false, + 5265 => true, + 5266 => false, + 5267 => true, + 5268 => true, + 5269 => true, + 5270 => true, + 5271 => true, + 5272 => true, + 5273 => true, + 5274 => true, + 5275 => true, + 5276 => true, + 5277 => true, + 5278 => true, + 5279 => false, + 5280 => false, + 5281 => false, + 5283 => true, + 5294 => false, + 5295 => false, + 5296 => true, + 5299 => false, + 5300 => true, + 5301 => true, + 5334 => true, + 5335 => false, + 5336 => false, + 5337 => false, + 5338 => false, + 5339 => false, + 5340 => true, + 5341 => false, + 5344 => false, + 5358 => false, + 5359 => true, + 5360 => false, + 5361 => true, + 5362 => true, + 5364 => false, + 5365 => false, + 5380 => false, + 5381 => true, + 5391 => true, + 5392 => true, + 5393 => true, + 5394 => true, + 5395 => true, + 5396 => true, + 5397 => false, + 5571 => true, + 5572 => true, + 5573 => true, + 5574 => true, + 5575 => true, + 5576 => false, + 5577 => true, + 5578 => false, + 5580 => true, + 5581 => false, + 5585 => true, + 5586 => true, + 5587 => true, + 5588 => true, + 5589 => true, + 5590 => true, + 5591 => true, + 5592 => true, + 5593 => true, + 5594 => true, + 5595 => true, + 5596 => true, + 5597 => true, + 5598 => true, + 5600 => true, + 5601 => true, + 5609 => true, + 5610 => true, + 5611 => true, + 5614 => true, + 5615 => true, + 5630 => false, + 5631 => true, + 5632 => false, + 5633 => false, + 5699 => true, + 5700 => false, + 5701 => false, + 5702 => false, + 5703 => false, + 5704 => false, + 5705 => false, + 5706 => false, + 5707 => false, + 5708 => false, + 5709 => false, + 5710 => false, + 5711 => false, + 5712 => false, + 5713 => true, + 5714 => true, + 5715 => true, + 5716 => true, + 5717 => true, + 5718 => true, + 5719 => true, + 5720 => true, + 5721 => true, + 5722 => true, + 5723 => true, + 5724 => true, + 5725 => true, + 5726 => true, + 5727 => true, + 5728 => true, + 5729 => true, + 5730 => true, + 5731 => true, + 5732 => true, + 5733 => true, + 5734 => true, + 5735 => true, + 5736 => true, + 5737 => true, + 5738 => true, + 5739 => true, + 5740 => true, + 5741 => true, + 5742 => true, + 5743 => true, + 5744 => true, + 5745 => true, + 5746 => true, + 5747 => true, + 5748 => true, + 5749 => true, + 5750 => true, + 5751 => true, + 5752 => true, + 5753 => true, + 5754 => true, + 5755 => true, + 5756 => true, + 5757 => true, + 5758 => true, + 5759 => true, + 5760 => true, + 5761 => true, + 5762 => true, + 5763 => true, + 5764 => true, + 5765 => true, + 5766 => true, + 5767 => true, + 5768 => true, + 5769 => true, + 5770 => true, + 5771 => true, + 5772 => true, + 5773 => true, + 5774 => true, + 5775 => true, + 5776 => true, + 5777 => true, + 5778 => true, + 5779 => true, + 5780 => true, + 5781 => true, + 5782 => true, + 5783 => true, + 5784 => true, + 5785 => true, + 5786 => true, + 5787 => true, + 5788 => true, + 5789 => true, + 5790 => true, + 5791 => true, + 5792 => true, + 5793 => true, + 5794 => true, + 5795 => true, + 5796 => true, + 5797 => true, + 5798 => true, + 5799 => true, + 5800 => true, + 5801 => true, + 5802 => true, + 5803 => true, + 5804 => true, + 5805 => true, + 5806 => true, + 5807 => true, + 5808 => true, + 5809 => true, + 5810 => true, + 5811 => true, + 5812 => true, + 5813 => true, + 5814 => true, + 5815 => true, + 5816 => true, + 5818 => true, + 5819 => true, + 5820 => false, + 5840 => true, + 5841 => true, + 5842 => true, + 5843 => true, + 5846 => true, + 5847 => true, + 5848 => true, + 5849 => true, + 5850 => true, + 5851 => true, + 5852 => true, + 5853 => true, + 5854 => true, + 5855 => true, + 5856 => true, + 5857 => true, + 5858 => true, + 5859 => true, + 5860 => true, + 5861 => true, + 5862 => true, + 5863 => true, + 5864 => true, + 5865 => true, + 5866 => true, + 5867 => true, + 5868 => true, + 5869 => true, + 5870 => true, + 5871 => true, + 5872 => true, + 5873 => true, + 5874 => true, + 5875 => true, + 5876 => true, + 5877 => true, + 5878 => true, + 5879 => true, + 5880 => true, + 5881 => true, + 5882 => true, + 5887 => false, + 5911 => false, + 5912 => false, + 5913 => false, + 5923 => true, + 5924 => true, + 5925 => true, + 5926 => true, + 5927 => true, + 5928 => true, + 5929 => true, + 5930 => true, + 5931 => true, + 5932 => true, + 5933 => true, + 5934 => true, + 5938 => true, + 5946 => true, + 5947 => true, + 5949 => true, + 6016 => true, + 6017 => true, + 6018 => true, + 6019 => true, + 6020 => true, + 6021 => true, + 6022 => true, + 6023 => true, + 6024 => true, + 6025 => true, + 6026 => true, + 6027 => true, + 6028 => true, + 6029 => true, + 6030 => true, + 6031 => true, + 6032 => true, + 6035 => true, + 6086 => false, + 6090 => false, + 6091 => false, + 6092 => false, + 6096 => true, + 6116 => true, + 6117 => true, + 6142 => false, + 6143 => false, + 6401 => true, + 6402 => true, + 6403 => true, + 6404 => true, + 6405 => true, + 6406 => true, + 6407 => true, + 6408 => true, + _ => bail!("Unknown opcode: {}", opcode), + }; + Ok(out) +} diff --git a/spirq-as/src/generated/operand_enum_type.rs b/spirq-as/src/generated/operand_enum_type.rs new file mode 100644 index 0000000..2616401 --- /dev/null +++ b/spirq-as/src/generated/operand_enum_type.rs @@ -0,0 +1,430 @@ +use anyhow::{bail, Result}; + +pub fn operand_enum_type(opcode: u32, i: usize) -> Result<&'static str> { + let out: &'static str = match opcode { + 3 => match i { + 0 => "SourceLanguage", + _ => bail!("Unknown operand index: {}", i), + } + 14 => match i { + 0 => "AddressingModel", + 1 => "MemoryModel", + _ => bail!("Unknown operand index: {}", i), + } + 15 => match i { + 0 => "ExecutionModel", + _ => bail!("Unknown operand index: {}", i), + } + 16 => match i { + 0 => "ExecutionMode", + _ => bail!("Unknown operand index: {}", i), + } + 17 => match i { + 0 => "Capability", + _ => bail!("Unknown operand index: {}", i), + } + 25 => match i { + 0 => "Dim", + 1 => "ImageFormat", + 2 => "AccessQualifier", + _ => bail!("Unknown operand index: {}", i), + } + 32 => match i { + 0 => "StorageClass", + _ => bail!("Unknown operand index: {}", i), + } + 38 => match i { + 0 => "AccessQualifier", + _ => bail!("Unknown operand index: {}", i), + } + 39 => match i { + 0 => "StorageClass", + _ => bail!("Unknown operand index: {}", i), + } + 45 => match i { + 0 => "SamplerAddressingMode", + 1 => "SamplerFilterMode", + _ => bail!("Unknown operand index: {}", i), + } + 54 => match i { + 0 => "FunctionControl", + _ => bail!("Unknown operand index: {}", i), + } + 59 => match i { + 0 => "StorageClass", + _ => bail!("Unknown operand index: {}", i), + } + 61 => match i { + 0 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 62 => match i { + 0 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 63 => match i { + 0 => "MemoryAccess", + 1 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 64 => match i { + 0 => "MemoryAccess", + 1 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 71 => match i { + 0 => "Decoration", + _ => bail!("Unknown operand index: {}", i), + } + 72 => match i { + 0 => "Decoration", + _ => bail!("Unknown operand index: {}", i), + } + 87 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 88 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 89 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 90 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 91 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 92 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 93 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 94 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 95 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 96 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 97 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 98 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 99 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 123 => match i { + 0 => "StorageClass", + _ => bail!("Unknown operand index: {}", i), + } + 246 => match i { + 0 => "LoopControl", + _ => bail!("Unknown operand index: {}", i), + } + 247 => match i { + 0 => "SelectionControl", + _ => bail!("Unknown operand index: {}", i), + } + 264 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 265 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 266 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 267 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 268 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 269 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 270 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 271 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 305 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 306 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 307 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 308 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 309 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 310 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 311 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 312 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 313 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 314 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 315 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 320 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 331 => match i { + 0 => "ExecutionMode", + _ => bail!("Unknown operand index: {}", i), + } + 332 => match i { + 0 => "Decoration", + _ => bail!("Unknown operand index: {}", i), + } + 342 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 349 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 350 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 351 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 352 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 353 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 354 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 355 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 356 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 357 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 358 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 359 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 360 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 361 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 362 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 363 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 364 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 4450 => match i { + 0 => "PackedVectorFormat", + _ => bail!("Unknown operand index: {}", i), + } + 4451 => match i { + 0 => "PackedVectorFormat", + _ => bail!("Unknown operand index: {}", i), + } + 4452 => match i { + 0 => "PackedVectorFormat", + _ => bail!("Unknown operand index: {}", i), + } + 4453 => match i { + 0 => "PackedVectorFormat", + _ => bail!("Unknown operand index: {}", i), + } + 4454 => match i { + 0 => "PackedVectorFormat", + _ => bail!("Unknown operand index: {}", i), + } + 4455 => match i { + 0 => "PackedVectorFormat", + _ => bail!("Unknown operand index: {}", i), + } + 4457 => match i { + 0 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 4458 => match i { + 0 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 4459 => match i { + 0 => "CooperativeMatrixOperands", + _ => bail!("Unknown operand index: {}", i), + } + 5000 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5001 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5002 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5003 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5004 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5005 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5006 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5007 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 5283 => match i { + 0 => "ImageOperands", + _ => bail!("Unknown operand index: {}", i), + } + 5359 => match i { + 0 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 5360 => match i { + 0 => "MemoryAccess", + _ => bail!("Unknown operand index: {}", i), + } + 5632 => match i { + 0 => "Decoration", + _ => bail!("Unknown operand index: {}", i), + } + 5633 => match i { + 0 => "Decoration", + _ => bail!("Unknown operand index: {}", i), + } + 6086 => match i { + 0 => "AccessQualifier", + _ => bail!("Unknown operand index: {}", i), + } + 6401 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6402 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6403 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6404 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6405 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6406 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6407 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + 6408 => match i { + 0 => "GroupOperation", + _ => bail!("Unknown operand index: {}", i), + } + _ => bail!("{}-th operand of opcode {} is not a enum", i, opcode), + }; + Ok(out) +} diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs index 27bdda7..b3b9c81 100644 --- a/spirq-as/src/lib.rs +++ b/spirq-as/src/lib.rs @@ -1,7 +1,325 @@ mod tokenizer; -use tokenizer::{Token, Tokenizer}; +use std::{iter::Peekable, collections::{HashMap, HashSet}}; +use anyhow::{anyhow, bail, Result}; +use num_traits::FromPrimitive; +use spirq_core::{spirv::Op, parse::{Instr, InstructionBuilder}}; +use tokenizer::{Token, Tokenizer, Lit}; + +mod generated; + + +enum IdRef { + Name(String), + Id(u32), +} +enum Operand { + IdRef(IdRef), + Literal(Lit), + Ident(String), +} + +struct Instruction { + result_id: Option, + opcode: u32, + operands: Vec, +} + +struct TokenStream<'a> { + tokenizer: Tokenizer<'a>, + cache: Option, +} +impl<'a> TokenStream<'a> { + fn peek(&mut self) -> Option<&Token> { + self.cache.as_ref() + } + fn next(&mut self) -> Result> { + self.cache = self.tokenizer.next().transpose()?; + self.tokenizer.next().transpose() + } +} + +#[derive(Default)] struct Assembler { - tokenizer: Tokenizer, + name2id: HashMap, + used_ids: HashSet, + next_id: u32, +} +impl Assembler { + fn new() -> Self { + Self::default() + } + + fn parse_opcode(&self, s: &mut TokenStream) -> Result { + let token = s.next()?.ok_or_else(|| anyhow!("expected opcode"))?; + match token { + Token::Ident(ident) => { + generated::op_from_str(&ident) + } + _ => Err(anyhow!("expected opcode")), + } + } + fn parse_idref(&self, s: &mut TokenStream) -> Result { + let token = s.next()?.ok_or_else(|| anyhow!("expected idref"))?; + match token { + Token::IdRef(id) => { + if let Some(id) = id.parse::().ok() { + Ok(IdRef::Id(id)) + } else { + Ok(IdRef::Name(id)) + } + } + _ => Err(anyhow!("expected idref")), + } + } + + fn parse_operand(&self, s: &mut TokenStream) -> Result { + let token = s.next()?.ok_or_else(|| anyhow!("expected operand"))?; + match token { + Token::IdRef(id) => { + let idref = self.parse_idref(s)?; + Ok(Operand::IdRef(idref)) + } + Token::Literal(lit) => { + Ok(Operand::Literal(lit)) + } + Token::Ident(ident) => { + Ok(Operand::Ident(ident)) + } + _ => Err(anyhow!("expected operand, but {:?}", s.peek())), + } + } + + fn parse_instr_with_result_id(&self, s: &mut TokenStream) -> Result { + let result_id = self.parse_idref(s)?; + let eq_token = s.next()?.ok_or_else(|| anyhow!("expected '='"))?; + if !matches!(eq_token, Token::Eq) { + bail!("expected '='"); + } + let opcode = self.parse_opcode(s)?; + + let mut operands = Vec::new(); + while let Some(token) = s.next()? { + match token { + Token::Comment(_) => {}, + Token::NewLine => break, + _ => { + let operand = self.parse_operand(s)?; + operands.push(operand); + }, + }; + } + + let out = Instruction { + result_id: Some(result_id), + opcode, + operands, + }; + Ok(out) + } + fn parse_instr_without_result_id(&self, s: &mut TokenStream) -> Result { + let opcode = self.parse_opcode(s)?; + let mut operands = Vec::new(); + + while let Some(token) = s.next()? { + match token { + Token::Comment(_) => {}, + Token::NewLine => break, + _ => { + let operand = self.parse_operand(s)?; + operands.push(operand); + }, + }; + } + + let out = Instruction { + result_id: None, + opcode, + operands, + }; + Ok(out) + } + + fn parse_instr(&self, s: &mut TokenStream) -> Result> { + while let Some(token) = s.peek() { + match token.clone() { + Token::Comment(_) => {} + Token::NewLine => {}, + Token::Ident(ident) => { + let instr = self.parse_instr_without_result_id(s)?; + return Ok(Some(instr)); + } + Token::IdRef(id) => { + let instr = self.parse_instr_with_result_id(s)?; + return Ok(Some(instr)); + } + _ => { + bail!("unexpected token {:?}", token); + } + } + } + Ok(None) + } + + fn parse_instrs(&self, s: &mut TokenStream) -> Result> { + let mut instrs = Vec::new(); + while let Some(instr) = self.parse_instr(s)? { + instrs.push(instr); + } + Ok(instrs) + } + + fn parse(&self, input: &str) -> Result> { + let mut tokenizer = Tokenizer::new(input); + let mut s = TokenStream { + tokenizer, + cache: None, + }; + self.parse_instrs(&mut s) + } + + fn mark_id(&mut self, id: u32) { + self.used_ids.insert(id); + } + fn acquire_id(&mut self, name: &str) -> u32 { + if let Some(id) = self.name2id.get(name) { + return *id; + } + let mut id = self.next_id; + while self.used_ids.contains(&id) { + id += 1; + } + self.next_id = id + 1; + self.name2id.insert(name.to_owned(), id); + self.used_ids.insert(id); + id + } + fn process_idref(&mut self, idref: &IdRef) -> Result { + let out = match idref { + IdRef::Name(name) => { + let id = self.acquire_id(name); + IdRef::Id(id) + } + IdRef::Id(id) => { + self.mark_id(*id); + IdRef::Id(*id) + } + }; + Ok(out) + } + + fn assemble(&mut self, input: &str) -> Result> { + let mut instrs = self.parse(input)?; + + // Transform name refs to id refs. + for instr in &mut instrs { + let result_id = if let Some(result_id) = &mut instr.result_id { + let idref = self.process_idref(result_id)?; + Some(idref) + } else { + None + }; + + for operand in &mut instr.operands { + match operand { + Operand::IdRef(idref) => { + let idref = self.process_idref(idref)?; + *operand = Operand::IdRef(idref); + } + _ => {} + } + } + } + + let mut out = Vec::new(); + for instr in instrs { + let opcode = Op::from_u32(instr.opcode) + .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; + let mut builder = InstructionBuilder::new(opcode); + + let mut operands = instr.operands.iter(); + if generated::op_has_result_type_id(instr.opcode)? { + // The first operand in spvasm is the result type id (if the op + // has one). + match operands.next() { + Some(Operand::IdRef(IdRef::Id(id))) => { + builder = builder.push(*id); + } + _ => bail!("expected result type id"), + } + } + + if generated::op_has_result_id(instr.opcode)? { + // The second operand in spvasm is the result id (if the op has one). + match instr.result_id { + Some(IdRef::Id(id)) => { + builder = builder.push(id); + } + _ => bail!("expected result id"), + } + } else { + if instr.result_id.is_some() { + bail!("unexpected result id"); + } + } + + for (i, operand) in operands.enumerate() { + match operand { + Operand::IdRef(IdRef::Name(name)) => unreachable!(), + Operand::IdRef(IdRef::Id(id)) => { + builder = builder.push(*id); + } + Operand::Literal(lit) => { + match lit { + Lit::Int(i) => { + if *i < 0 { + if let Some(i) = i32::from_i64(*i) { + builder = builder.push(i as u32); + } else { + bail!("literal integer out of range"); + } + } else { + if let Some(i) = u32::from_i64(*i) { + builder = builder.push(i); + } else { + bail!("literal integer out of range"); + } + } + }, + Lit::Float(f, exponent_bias) => { + // First cast to f32. + let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + // Then bit cast to u32. + let u = f.to_bits(); + builder = builder.push(u); + }, + Lit::String(s) => { + let id = self.acquire_id(&s); + builder = builder.push(id); + }, + } + } + Operand::Ident(ident) => { + let ety = generated::operand_enum_type(instr.opcode, i)?; + let e = generated::enum_from_str(ety, &ident)?; + builder = builder.push(e); + } + } + } + + out.push(builder.build()); + } + Ok(out) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_assemble() { + + } } diff --git a/spirq-as/src/tokenizer.rs b/spirq-as/src/tokenizer.rs index 6521d0e..fc8b1b6 100644 --- a/spirq-as/src/tokenizer.rs +++ b/spirq-as/src/tokenizer.rs @@ -8,7 +8,7 @@ use spirq_core::parse::{Instr, SpirvBinary, Instrs, bin::SpirvHeader}; use spirq_core::ty::TypeRegistry; #[derive(Debug)] -enum Lit { +pub enum Lit { Int(i64), // Base numeric and the exponent bias. The effect of the bias depends on the // actual floating-point type it casts to. @@ -17,15 +17,16 @@ enum Lit { } #[derive(Debug)] -enum Token { +pub enum Token { Comment(String), Literal(Lit), Ident(String), IdRef(String), Eq, + NewLine, } -struct Tokenizer<'a> { +pub struct Tokenizer<'a> { chars: Box>>, } impl<'a> Tokenizer<'a> { @@ -266,9 +267,11 @@ impl<'a> Tokenizer<'a> { if let Some(c) = self.chars.peek() { // Ignore LWS. if c.is_ascii_whitespace() { - self.chars.next(); while let Some(c) = self.chars.peek() { - if c.is_ascii_whitespace() { + if *c == '\n' { + self.chars.next(); + return Ok(Some(Token::NewLine)); + } else if c.is_ascii_whitespace() { self.chars.next(); } else { break; @@ -330,8 +333,7 @@ impl<'a> Iterator for Tokenizer<'a> { } - -fn tokenize(code: &str) -> Result> { +pub fn tokenize(code: &str) -> Result> { let tokenizer = Tokenizer::new(code); let tokens = tokenizer.collect::>>(); tokens @@ -482,12 +484,19 @@ mod test { ; abcd12 ; abcd123"#; let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 7); + assert_eq!(tokens.len(), 13); let expected = [" a", " ab", " abc", " abcd", " abcd1", " abcd12", " abcd123"]; for (i, token) in tokens.iter().enumerate() { - match token { - Token::Comment(s) => assert_eq!(s, expected[i]), - _ => panic!("unexpected token: {:?}", token), + if i % 2 == 0 { + match token { + Token::Comment(s) => assert_eq!(s, expected[i / 2]), + _ => panic!("unexpected token: {:?}", token), + } + } else { + match token { + Token::NewLine => {}, + _ => panic!("unexpected token: {:?}", token), + } } } } diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 25e3549..2b343f0 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -130,6 +130,17 @@ impl InstructionBuilder { self.inner.extend_from_slice(x); self } + pub fn push_str(mut self, x: &str) -> Self { + // FIXME: (penguinliong) Avoid unsafe code. + use std::ffi::CString; + let cstr = CString::new(x).unwrap(); + let bytes = cstr.as_bytes_with_nul(); + let words = bytes.len() / 4 + 1; + let ptr = cstr.as_ptr() as *const u32; + let slice = unsafe { std::slice::from_raw_parts(ptr, words) }; + self.inner.extend_from_slice(slice); + self + } pub fn build(mut self) -> Instruction { self.inner[0] |= (self.inner.len() as u32) << 16; Instruction::from(self.inner) @@ -150,6 +161,7 @@ impl<'a> Operands<'a> { } } pub fn read_str(&mut self) -> Result<&'a str> { + // FIXME: (penguinliong) Avoid unsafe code. use std::ffi::CStr; use std::os::raw::c_char; let ptr = self.0.as_ptr() as *const c_char; From 40fe74a3766454e1b946cd6633f9788e71a65a93 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 18 Dec 2023 18:57:27 +0800 Subject: [PATCH 08/50] Fixed infinite loop --- spirq-as/src/tokenizer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/spirq-as/src/tokenizer.rs b/spirq-as/src/tokenizer.rs index fc8b1b6..ef4fd5b 100644 --- a/spirq-as/src/tokenizer.rs +++ b/spirq-as/src/tokenizer.rs @@ -57,6 +57,7 @@ impl<'a> Tokenizer<'a> { while let Some(c) = self.chars.peek() { if c.is_ascii_alphanumeric() || c == &'_' { buf.push(*c); + self.chars.next(); } else { break; } From 01d6d39f6208182d35f1d0f7479877d570894dd3 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 18 Dec 2023 20:38:36 +0800 Subject: [PATCH 09/50] Reorganize --- Cargo.lock | 9 + Cargo.toml | 1 + spirq-as/src/lib.rs | 325 ------------------ spirq-spvasm/Cargo.toml | 23 ++ spirq-spvasm/README.md | 15 + .../scripts}/generate_enum_from_str.py | 2 +- .../scripts}/generate_op_from_str.py | 2 +- .../scripts}/generate_op_has_result_id.py | 2 +- .../generate_op_has_result_type_id.py | 2 +- .../scripts}/generate_operand_enum_type.py | 2 +- spirq-spvasm/src/asm/assembler.rs | 312 +++++++++++++++++ .../src/asm}/generated/enum_from_str.rs | 0 .../src/asm}/generated/mod.rs | 0 .../src/asm}/generated/op_from_str.rs | 0 .../src/asm}/generated/op_has_result_id.rs | 0 .../asm}/generated/op_has_result_type_id.rs | 0 .../src/asm}/generated/operand_enum_type.rs | 0 spirq-spvasm/src/asm/mod.rs | 5 + .../src => spirq-spvasm/src/asm}/tokenizer.rs | 0 spirq-spvasm/src/dis/mod.rs | 0 spirq-spvasm/src/lib.rs | 2 + 21 files changed, 372 insertions(+), 330 deletions(-) create mode 100644 spirq-spvasm/Cargo.toml create mode 100644 spirq-spvasm/README.md rename {spirq-as => spirq-spvasm/scripts}/generate_enum_from_str.py (96%) rename {spirq-as => spirq-spvasm/scripts}/generate_op_from_str.py (90%) rename {spirq-as => spirq-spvasm/scripts}/generate_op_has_result_id.py (92%) rename {spirq-as => spirq-spvasm/scripts}/generate_op_has_result_type_id.py (91%) rename {spirq-as => spirq-spvasm/scripts}/generate_operand_enum_type.py (94%) create mode 100644 spirq-spvasm/src/asm/assembler.rs rename {spirq-as/src => spirq-spvasm/src/asm}/generated/enum_from_str.rs (100%) rename {spirq-as/src => spirq-spvasm/src/asm}/generated/mod.rs (100%) rename {spirq-as/src => spirq-spvasm/src/asm}/generated/op_from_str.rs (100%) rename {spirq-as/src => spirq-spvasm/src/asm}/generated/op_has_result_id.rs (100%) rename {spirq-as/src => spirq-spvasm/src/asm}/generated/op_has_result_type_id.rs (100%) rename {spirq-as/src => spirq-spvasm/src/asm}/generated/operand_enum_type.rs (100%) create mode 100644 spirq-spvasm/src/asm/mod.rs rename {spirq-as/src => spirq-spvasm/src/asm}/tokenizer.rs (100%) create mode 100644 spirq-spvasm/src/dis/mod.rs create mode 100644 spirq-spvasm/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index c7fbffa..ad02788 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -376,6 +376,15 @@ dependencies = [ "spirq-core", ] +[[package]] +name = "spirq-spvasm" +version = "0.1.0" +dependencies = [ + "anyhow", + "num-traits", + "spirq-core", +] + [[package]] name = "spirv" version = "0.2.0+1.5.4" diff --git a/Cargo.toml b/Cargo.toml index ed7d9bd..ebd9d1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "spirq", "spirq-core", + "spirq-spvasm", "spirq-dis", "spirq-as", "shader-reflect", diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs index b3b9c81..e69de29 100644 --- a/spirq-as/src/lib.rs +++ b/spirq-as/src/lib.rs @@ -1,325 +0,0 @@ -mod tokenizer; - -use std::{iter::Peekable, collections::{HashMap, HashSet}}; - -use anyhow::{anyhow, bail, Result}; -use num_traits::FromPrimitive; -use spirq_core::{spirv::Op, parse::{Instr, InstructionBuilder}}; -use tokenizer::{Token, Tokenizer, Lit}; - -mod generated; - - -enum IdRef { - Name(String), - Id(u32), -} -enum Operand { - IdRef(IdRef), - Literal(Lit), - Ident(String), -} - -struct Instruction { - result_id: Option, - opcode: u32, - operands: Vec, -} - -struct TokenStream<'a> { - tokenizer: Tokenizer<'a>, - cache: Option, -} -impl<'a> TokenStream<'a> { - fn peek(&mut self) -> Option<&Token> { - self.cache.as_ref() - } - fn next(&mut self) -> Result> { - self.cache = self.tokenizer.next().transpose()?; - self.tokenizer.next().transpose() - } -} - -#[derive(Default)] -struct Assembler { - name2id: HashMap, - used_ids: HashSet, - next_id: u32, -} -impl Assembler { - fn new() -> Self { - Self::default() - } - - fn parse_opcode(&self, s: &mut TokenStream) -> Result { - let token = s.next()?.ok_or_else(|| anyhow!("expected opcode"))?; - match token { - Token::Ident(ident) => { - generated::op_from_str(&ident) - } - _ => Err(anyhow!("expected opcode")), - } - } - fn parse_idref(&self, s: &mut TokenStream) -> Result { - let token = s.next()?.ok_or_else(|| anyhow!("expected idref"))?; - match token { - Token::IdRef(id) => { - if let Some(id) = id.parse::().ok() { - Ok(IdRef::Id(id)) - } else { - Ok(IdRef::Name(id)) - } - } - _ => Err(anyhow!("expected idref")), - } - } - - fn parse_operand(&self, s: &mut TokenStream) -> Result { - let token = s.next()?.ok_or_else(|| anyhow!("expected operand"))?; - match token { - Token::IdRef(id) => { - let idref = self.parse_idref(s)?; - Ok(Operand::IdRef(idref)) - } - Token::Literal(lit) => { - Ok(Operand::Literal(lit)) - } - Token::Ident(ident) => { - Ok(Operand::Ident(ident)) - } - _ => Err(anyhow!("expected operand, but {:?}", s.peek())), - } - } - - fn parse_instr_with_result_id(&self, s: &mut TokenStream) -> Result { - let result_id = self.parse_idref(s)?; - let eq_token = s.next()?.ok_or_else(|| anyhow!("expected '='"))?; - if !matches!(eq_token, Token::Eq) { - bail!("expected '='"); - } - let opcode = self.parse_opcode(s)?; - - let mut operands = Vec::new(); - while let Some(token) = s.next()? { - match token { - Token::Comment(_) => {}, - Token::NewLine => break, - _ => { - let operand = self.parse_operand(s)?; - operands.push(operand); - }, - }; - } - - let out = Instruction { - result_id: Some(result_id), - opcode, - operands, - }; - Ok(out) - } - fn parse_instr_without_result_id(&self, s: &mut TokenStream) -> Result { - let opcode = self.parse_opcode(s)?; - let mut operands = Vec::new(); - - while let Some(token) = s.next()? { - match token { - Token::Comment(_) => {}, - Token::NewLine => break, - _ => { - let operand = self.parse_operand(s)?; - operands.push(operand); - }, - }; - } - - let out = Instruction { - result_id: None, - opcode, - operands, - }; - Ok(out) - } - - fn parse_instr(&self, s: &mut TokenStream) -> Result> { - while let Some(token) = s.peek() { - match token.clone() { - Token::Comment(_) => {} - Token::NewLine => {}, - Token::Ident(ident) => { - let instr = self.parse_instr_without_result_id(s)?; - return Ok(Some(instr)); - } - Token::IdRef(id) => { - let instr = self.parse_instr_with_result_id(s)?; - return Ok(Some(instr)); - } - _ => { - bail!("unexpected token {:?}", token); - } - } - } - Ok(None) - } - - fn parse_instrs(&self, s: &mut TokenStream) -> Result> { - let mut instrs = Vec::new(); - while let Some(instr) = self.parse_instr(s)? { - instrs.push(instr); - } - Ok(instrs) - } - - fn parse(&self, input: &str) -> Result> { - let mut tokenizer = Tokenizer::new(input); - let mut s = TokenStream { - tokenizer, - cache: None, - }; - self.parse_instrs(&mut s) - } - - fn mark_id(&mut self, id: u32) { - self.used_ids.insert(id); - } - fn acquire_id(&mut self, name: &str) -> u32 { - if let Some(id) = self.name2id.get(name) { - return *id; - } - let mut id = self.next_id; - while self.used_ids.contains(&id) { - id += 1; - } - self.next_id = id + 1; - self.name2id.insert(name.to_owned(), id); - self.used_ids.insert(id); - id - } - fn process_idref(&mut self, idref: &IdRef) -> Result { - let out = match idref { - IdRef::Name(name) => { - let id = self.acquire_id(name); - IdRef::Id(id) - } - IdRef::Id(id) => { - self.mark_id(*id); - IdRef::Id(*id) - } - }; - Ok(out) - } - - fn assemble(&mut self, input: &str) -> Result> { - let mut instrs = self.parse(input)?; - - // Transform name refs to id refs. - for instr in &mut instrs { - let result_id = if let Some(result_id) = &mut instr.result_id { - let idref = self.process_idref(result_id)?; - Some(idref) - } else { - None - }; - - for operand in &mut instr.operands { - match operand { - Operand::IdRef(idref) => { - let idref = self.process_idref(idref)?; - *operand = Operand::IdRef(idref); - } - _ => {} - } - } - } - - let mut out = Vec::new(); - for instr in instrs { - let opcode = Op::from_u32(instr.opcode) - .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; - let mut builder = InstructionBuilder::new(opcode); - - let mut operands = instr.operands.iter(); - if generated::op_has_result_type_id(instr.opcode)? { - // The first operand in spvasm is the result type id (if the op - // has one). - match operands.next() { - Some(Operand::IdRef(IdRef::Id(id))) => { - builder = builder.push(*id); - } - _ => bail!("expected result type id"), - } - } - - if generated::op_has_result_id(instr.opcode)? { - // The second operand in spvasm is the result id (if the op has one). - match instr.result_id { - Some(IdRef::Id(id)) => { - builder = builder.push(id); - } - _ => bail!("expected result id"), - } - } else { - if instr.result_id.is_some() { - bail!("unexpected result id"); - } - } - - for (i, operand) in operands.enumerate() { - match operand { - Operand::IdRef(IdRef::Name(name)) => unreachable!(), - Operand::IdRef(IdRef::Id(id)) => { - builder = builder.push(*id); - } - Operand::Literal(lit) => { - match lit { - Lit::Int(i) => { - if *i < 0 { - if let Some(i) = i32::from_i64(*i) { - builder = builder.push(i as u32); - } else { - bail!("literal integer out of range"); - } - } else { - if let Some(i) = u32::from_i64(*i) { - builder = builder.push(i); - } else { - bail!("literal integer out of range"); - } - } - }, - Lit::Float(f, exponent_bias) => { - // First cast to f32. - let f = (*f as f32) * 2.0f32.powi(*exponent_bias); - // Then bit cast to u32. - let u = f.to_bits(); - builder = builder.push(u); - }, - Lit::String(s) => { - let id = self.acquire_id(&s); - builder = builder.push(id); - }, - } - } - Operand::Ident(ident) => { - let ety = generated::operand_enum_type(instr.opcode, i)?; - let e = generated::enum_from_str(ety, &ident)?; - builder = builder.push(e); - } - } - } - - out.push(builder.build()); - } - Ok(out) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_assemble() { - - } -} diff --git a/spirq-spvasm/Cargo.toml b/spirq-spvasm/Cargo.toml new file mode 100644 index 0000000..19cc5ed --- /dev/null +++ b/spirq-spvasm/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "spirq-spvasm" +version = "0.1.0" +authors = ["PENGUINLIONG "] +edition = "2018" +license = "MIT OR Apache-2.0" +description = "Tools for SPIR-V Assembly interaction." +repository = "https://github.com/PENGUINLIONG/spirq-rs" +homepage = "https://github.com/PENGUINLIONG/spirq-rs" +documentation = "https://docs.rs/spirq-spvasm" +categories = ["graphics"] +readme = "README.md" +keywords = ["spirv", "spvasm"] + +[badges] +maintenance = { status = "actively-developed" } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +anyhow = "1.0" +num-traits = "0.2" +spirq-core = { version = "1.0.0", path = "../spirq-core" } diff --git a/spirq-spvasm/README.md b/spirq-spvasm/README.md new file mode 100644 index 0000000..2032476 --- /dev/null +++ b/spirq-spvasm/README.md @@ -0,0 +1,15 @@ +# SPIR-Q Tools for SPIR-V Assembly + +[![Crate](https://img.shields.io/crates/v/spirq-spvasm)](https://crates.io/crates/spirq-spvasm) +[![Documentation](https://docs.rs/spirq-spvasm/badge.svg)](https://docs.rs/spirq-spvasm) + +SPIR-Q tools for SPIR-V Assembly provides useful auxiliaries for shader and shader tool development. + +## License + +This project is licensed under either of + +* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) +* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + +at your option. diff --git a/spirq-as/generate_enum_from_str.py b/spirq-spvasm/scripts/generate_enum_from_str.py similarity index 96% rename from spirq-as/generate_enum_from_str.py rename to spirq-spvasm/scripts/generate_enum_from_str.py index 5ae08b6..eff721b 100644 --- a/spirq-as/generate_enum_from_str.py +++ b/spirq-spvasm/scripts/generate_enum_from_str.py @@ -70,5 +70,5 @@ "", ] -with open("spirq-as/src/generated/enum_from_str.rs", "w") as f: +with open("spirq-spvasm/src/asm/generated/enum_from_str.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-as/generate_op_from_str.py b/spirq-spvasm/scripts/generate_op_from_str.py similarity index 90% rename from spirq-as/generate_op_from_str.py rename to spirq-spvasm/scripts/generate_op_from_str.py index 6476e5e..229e318 100644 --- a/spirq-as/generate_op_from_str.py +++ b/spirq-spvasm/scripts/generate_op_from_str.py @@ -32,5 +32,5 @@ "", ] -with open("spirq-as/src/generated/op_from_str.rs", "w") as f: +with open("spirq-spvasm/src/asm/generated/op_from_str.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-as/generate_op_has_result_id.py b/spirq-spvasm/scripts/generate_op_has_result_id.py similarity index 92% rename from spirq-as/generate_op_has_result_id.py rename to spirq-spvasm/scripts/generate_op_has_result_id.py index a07376a..6ff53cb 100644 --- a/spirq-as/generate_op_has_result_id.py +++ b/spirq-spvasm/scripts/generate_op_has_result_id.py @@ -37,5 +37,5 @@ "", ] -with open("spirq-as/src/generated/op_has_result_id.rs", "w") as f: +with open("spirq-spvasm/src/asm/generated/op_has_result_id.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-as/generate_op_has_result_type_id.py b/spirq-spvasm/scripts/generate_op_has_result_type_id.py similarity index 91% rename from spirq-as/generate_op_has_result_type_id.py rename to spirq-spvasm/scripts/generate_op_has_result_type_id.py index f8b0737..b02d717 100644 --- a/spirq-as/generate_op_has_result_type_id.py +++ b/spirq-spvasm/scripts/generate_op_has_result_type_id.py @@ -37,5 +37,5 @@ "", ] -with open("spirq-as/src/generated/op_has_result_type_id.rs", "w") as f: +with open("spirq-spvasm/src/asm/generated/op_has_result_type_id.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-as/generate_operand_enum_type.py b/spirq-spvasm/scripts/generate_operand_enum_type.py similarity index 94% rename from spirq-as/generate_operand_enum_type.py rename to spirq-spvasm/scripts/generate_operand_enum_type.py index a8fb026..53a7474 100644 --- a/spirq-as/generate_operand_enum_type.py +++ b/spirq-spvasm/scripts/generate_operand_enum_type.py @@ -57,5 +57,5 @@ "", ] -with open("spirq-as/src/generated/operand_enum_type.rs", "w") as f: +with open("spirq-spvasm/src/asm/generated/operand_enum_type.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs new file mode 100644 index 0000000..eaa7e13 --- /dev/null +++ b/spirq-spvasm/src/asm/assembler.rs @@ -0,0 +1,312 @@ +use std::{iter::Peekable, collections::{HashMap, HashSet}}; + +use anyhow::{anyhow, bail, Result}; +use num_traits::FromPrimitive; +use spirq_core::{spirv::Op, parse::{Instr, InstructionBuilder}}; +use super::tokenizer::{Token, Tokenizer, Lit}; +use super::generated; + + +enum IdRef { + Name(String), + Id(u32), +} +enum Operand { + IdRef(IdRef), + Literal(Lit), + Ident(String), +} + +struct Instruction { + result_id: Option, + opcode: u32, + operands: Vec, +} + +struct TokenStream<'a> { + tokenizer: Tokenizer<'a>, + cache: Option, +} +impl<'a> TokenStream<'a> { + fn peek(&mut self) -> Option<&Token> { + self.cache.as_ref() + } + fn next(&mut self) -> Result> { + self.cache = self.tokenizer.next().transpose()?; + self.tokenizer.next().transpose() + } +} + +#[derive(Default)] +pub struct Assembler { + name2id: HashMap, + used_ids: HashSet, + next_id: u32, +} +impl Assembler { + pub fn new() -> Self { + Self::default() + } + + fn parse_opcode(&self, s: &mut TokenStream) -> Result { + let token = s.next()?.ok_or_else(|| anyhow!("expected opcode"))?; + match token { + Token::Ident(ident) => { + generated::op_from_str(&ident) + } + _ => Err(anyhow!("expected opcode")), + } + } + fn parse_idref(&self, s: &mut TokenStream) -> Result { + let token = s.next()?.ok_or_else(|| anyhow!("expected idref"))?; + match token { + Token::IdRef(id) => { + if let Some(id) = id.parse::().ok() { + Ok(IdRef::Id(id)) + } else { + Ok(IdRef::Name(id)) + } + } + _ => Err(anyhow!("expected idref")), + } + } + + fn parse_operand(&self, s: &mut TokenStream) -> Result { + let token = s.next()?.ok_or_else(|| anyhow!("expected operand"))?; + match token { + Token::IdRef(id) => { + let idref = self.parse_idref(s)?; + Ok(Operand::IdRef(idref)) + } + Token::Literal(lit) => { + Ok(Operand::Literal(lit)) + } + Token::Ident(ident) => { + Ok(Operand::Ident(ident)) + } + _ => Err(anyhow!("expected operand, but {:?}", s.peek())), + } + } + + fn parse_instr_with_result_id(&self, s: &mut TokenStream) -> Result { + let result_id = self.parse_idref(s)?; + let eq_token = s.next()?.ok_or_else(|| anyhow!("expected '='"))?; + if !matches!(eq_token, Token::Eq) { + bail!("expected '='"); + } + let opcode = self.parse_opcode(s)?; + + let mut operands = Vec::new(); + while let Some(token) = s.next()? { + match token { + Token::Comment(_) => {}, + Token::NewLine => break, + _ => { + let operand = self.parse_operand(s)?; + operands.push(operand); + }, + }; + } + + let out = Instruction { + result_id: Some(result_id), + opcode, + operands, + }; + Ok(out) + } + fn parse_instr_without_result_id(&self, s: &mut TokenStream) -> Result { + let opcode = self.parse_opcode(s)?; + let mut operands = Vec::new(); + + while let Some(token) = s.next()? { + match token { + Token::Comment(_) => {}, + Token::NewLine => break, + _ => { + let operand = self.parse_operand(s)?; + operands.push(operand); + }, + }; + } + + let out = Instruction { + result_id: None, + opcode, + operands, + }; + Ok(out) + } + + fn parse_instr(&self, s: &mut TokenStream) -> Result> { + while let Some(token) = s.peek() { + match token.clone() { + Token::Comment(_) => {} + Token::NewLine => {}, + Token::Ident(ident) => { + let instr = self.parse_instr_without_result_id(s)?; + return Ok(Some(instr)); + } + Token::IdRef(id) => { + let instr = self.parse_instr_with_result_id(s)?; + return Ok(Some(instr)); + } + _ => { + bail!("unexpected token {:?}", token); + } + } + } + Ok(None) + } + + fn parse_instrs(&self, s: &mut TokenStream) -> Result> { + let mut instrs = Vec::new(); + while let Some(instr) = self.parse_instr(s)? { + instrs.push(instr); + } + Ok(instrs) + } + + fn parse(&self, input: &str) -> Result> { + let mut tokenizer = Tokenizer::new(input); + let mut s = TokenStream { + tokenizer, + cache: None, + }; + self.parse_instrs(&mut s) + } + + fn mark_id(&mut self, id: u32) { + self.used_ids.insert(id); + } + fn acquire_id(&mut self, name: &str) -> u32 { + if let Some(id) = self.name2id.get(name) { + return *id; + } + let mut id = self.next_id; + while self.used_ids.contains(&id) { + id += 1; + } + self.next_id = id + 1; + self.name2id.insert(name.to_owned(), id); + self.used_ids.insert(id); + id + } + fn process_idref(&mut self, idref: &IdRef) -> Result { + let out = match idref { + IdRef::Name(name) => { + let id = self.acquire_id(name); + IdRef::Id(id) + } + IdRef::Id(id) => { + self.mark_id(*id); + IdRef::Id(*id) + } + }; + Ok(out) + } + + pub fn assemble(&mut self, input: &str) -> Result> { + let mut instrs = self.parse(input)?; + + // Transform name refs to id refs. + for instr in &mut instrs { + let result_id = if let Some(result_id) = &mut instr.result_id { + let idref = self.process_idref(result_id)?; + Some(idref) + } else { + None + }; + + for operand in &mut instr.operands { + match operand { + Operand::IdRef(idref) => { + let idref = self.process_idref(idref)?; + *operand = Operand::IdRef(idref); + } + _ => {} + } + } + } + + let mut out = Vec::new(); + for instr in instrs { + let opcode = Op::from_u32(instr.opcode) + .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; + let mut builder = InstructionBuilder::new(opcode); + + let mut operands = instr.operands.iter(); + if generated::op_has_result_type_id(instr.opcode)? { + // The first operand in spvasm is the result type id (if the op + // has one). + match operands.next() { + Some(Operand::IdRef(IdRef::Id(id))) => { + builder = builder.push(*id); + } + _ => bail!("expected result type id"), + } + } + + if generated::op_has_result_id(instr.opcode)? { + // The second operand in spvasm is the result id (if the op has one). + match instr.result_id { + Some(IdRef::Id(id)) => { + builder = builder.push(id); + } + _ => bail!("expected result id"), + } + } else { + if instr.result_id.is_some() { + bail!("unexpected result id"); + } + } + + for (i, operand) in operands.enumerate() { + match operand { + Operand::IdRef(IdRef::Name(name)) => unreachable!(), + Operand::IdRef(IdRef::Id(id)) => { + builder = builder.push(*id); + } + Operand::Literal(lit) => { + match lit { + Lit::Int(i) => { + if *i < 0 { + if let Some(i) = i32::from_i64(*i) { + builder = builder.push(i as u32); + } else { + bail!("literal integer out of range"); + } + } else { + if let Some(i) = u32::from_i64(*i) { + builder = builder.push(i); + } else { + bail!("literal integer out of range"); + } + } + }, + Lit::Float(f, exponent_bias) => { + // First cast to f32. + let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + // Then bit cast to u32. + let u = f.to_bits(); + builder = builder.push(u); + }, + Lit::String(s) => { + let id = self.acquire_id(&s); + builder = builder.push(id); + }, + } + } + Operand::Ident(ident) => { + let ety = generated::operand_enum_type(instr.opcode, i)?; + let e = generated::enum_from_str(ety, &ident)?; + builder = builder.push(e); + } + } + } + + out.push(builder.build()); + } + Ok(out) + } +} diff --git a/spirq-as/src/generated/enum_from_str.rs b/spirq-spvasm/src/asm/generated/enum_from_str.rs similarity index 100% rename from spirq-as/src/generated/enum_from_str.rs rename to spirq-spvasm/src/asm/generated/enum_from_str.rs diff --git a/spirq-as/src/generated/mod.rs b/spirq-spvasm/src/asm/generated/mod.rs similarity index 100% rename from spirq-as/src/generated/mod.rs rename to spirq-spvasm/src/asm/generated/mod.rs diff --git a/spirq-as/src/generated/op_from_str.rs b/spirq-spvasm/src/asm/generated/op_from_str.rs similarity index 100% rename from spirq-as/src/generated/op_from_str.rs rename to spirq-spvasm/src/asm/generated/op_from_str.rs diff --git a/spirq-as/src/generated/op_has_result_id.rs b/spirq-spvasm/src/asm/generated/op_has_result_id.rs similarity index 100% rename from spirq-as/src/generated/op_has_result_id.rs rename to spirq-spvasm/src/asm/generated/op_has_result_id.rs diff --git a/spirq-as/src/generated/op_has_result_type_id.rs b/spirq-spvasm/src/asm/generated/op_has_result_type_id.rs similarity index 100% rename from spirq-as/src/generated/op_has_result_type_id.rs rename to spirq-spvasm/src/asm/generated/op_has_result_type_id.rs diff --git a/spirq-as/src/generated/operand_enum_type.rs b/spirq-spvasm/src/asm/generated/operand_enum_type.rs similarity index 100% rename from spirq-as/src/generated/operand_enum_type.rs rename to spirq-spvasm/src/asm/generated/operand_enum_type.rs diff --git a/spirq-spvasm/src/asm/mod.rs b/spirq-spvasm/src/asm/mod.rs new file mode 100644 index 0000000..93703e9 --- /dev/null +++ b/spirq-spvasm/src/asm/mod.rs @@ -0,0 +1,5 @@ +mod tokenizer; +mod assembler; +mod generated; + +pub use assembler::Assembler; diff --git a/spirq-as/src/tokenizer.rs b/spirq-spvasm/src/asm/tokenizer.rs similarity index 100% rename from spirq-as/src/tokenizer.rs rename to spirq-spvasm/src/asm/tokenizer.rs diff --git a/spirq-spvasm/src/dis/mod.rs b/spirq-spvasm/src/dis/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/spirq-spvasm/src/lib.rs b/spirq-spvasm/src/lib.rs new file mode 100644 index 0000000..64416f7 --- /dev/null +++ b/spirq-spvasm/src/lib.rs @@ -0,0 +1,2 @@ +pub mod asm; +pub mod dis; From f3e059de46fcdc9fd2a267b40e17c5ded507284c Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Tue, 19 Dec 2023 17:04:04 +0800 Subject: [PATCH 10/50] Disassembler --- spirq-core/src/parse/instr.rs | 13 + spirq-dis/src/lib.rs | 43 - .../scripts/generate_enum_from_str.py | 6 +- spirq-spvasm/scripts/generate_enum_to_str.py | 69 + spirq-spvasm/scripts/generate_op_from_str.py | 3 +- .../scripts/generate_op_has_result_id.py | 2 +- .../scripts/generate_op_has_result_type_id.py | 2 +- spirq-spvasm/scripts/generate_op_to_str.py | 36 + .../scripts/generate_operand_enum_type.py | 2 +- spirq-spvasm/scripts/generate_read_operand.py | 175 + spirq-spvasm/src/asm/assembler.rs | 52 +- spirq-spvasm/src/asm/mod.rs | 1 - spirq-spvasm/src/asm/tokenizer.rs | 22 +- spirq-spvasm/src/dis/disassembler.rs | 99 + spirq-spvasm/src/dis/mod.rs | 3 + .../src/{asm => }/generated/enum_from_str.rs | 292 +- spirq-spvasm/src/generated/enum_to_str.rs | 1040 +++ spirq-spvasm/src/{asm => }/generated/mod.rs | 10 +- .../src/{asm => }/generated/op_from_str.rs | 1 - .../{asm => }/generated/op_has_result_id.rs | 0 .../generated/op_has_result_type_id.rs | 0 spirq-spvasm/src/generated/op_to_str.rs | 733 ++ .../{asm => }/generated/operand_enum_type.rs | 0 spirq-spvasm/src/generated/print_operand.rs | 6048 +++++++++++++++++ spirq-spvasm/src/lib.rs | 1 + 25 files changed, 8413 insertions(+), 240 deletions(-) create mode 100644 spirq-spvasm/scripts/generate_enum_to_str.py create mode 100644 spirq-spvasm/scripts/generate_op_to_str.py create mode 100644 spirq-spvasm/scripts/generate_read_operand.py create mode 100644 spirq-spvasm/src/dis/disassembler.rs rename spirq-spvasm/src/{asm => }/generated/enum_from_str.rs (100%) create mode 100644 spirq-spvasm/src/generated/enum_to_str.rs rename spirq-spvasm/src/{asm => }/generated/mod.rs (67%) rename spirq-spvasm/src/{asm => }/generated/op_from_str.rs (99%) rename spirq-spvasm/src/{asm => }/generated/op_has_result_id.rs (100%) rename spirq-spvasm/src/{asm => }/generated/op_has_result_type_id.rs (100%) create mode 100644 spirq-spvasm/src/generated/op_to_str.rs rename spirq-spvasm/src/{asm => }/generated/operand_enum_type.rs (100%) create mode 100644 spirq-spvasm/src/generated/print_operand.rs diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 2b343f0..e79c98a 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -149,6 +149,13 @@ impl InstructionBuilder { pub struct Operands<'a>(&'a [u32]); impl<'a> Operands<'a> { + pub fn len(&self) -> usize { + self.0.len() + } + pub fn is_empty(&self) -> bool { + self.0.is_empty() + } + pub fn read_bool(&mut self) -> Result { self.read_u32().map(|x| x != 0) } @@ -160,6 +167,12 @@ impl<'a> Operands<'a> { Err(anyhow!("operand is too short")) } } + pub fn read_f32(&mut self) -> Result { + self.read_u32().map(|x| f32::from_ne_bytes(x.to_ne_bytes())) + } + pub fn read_id(&mut self) -> Result { + self.read_u32() + } pub fn read_str(&mut self) -> Result<&'a str> { // FIXME: (penguinliong) Avoid unsafe code. use std::ffi::CStr; diff --git a/spirq-dis/src/lib.rs b/spirq-dis/src/lib.rs index e6c8f71..e69de29 100644 --- a/spirq-dis/src/lib.rs +++ b/spirq-dis/src/lib.rs @@ -1,43 +0,0 @@ -use spirq_core::parse::{Instr, SpirvBinary, Instrs}; - -struct Disassembler { -} -impl Disassembler { - pub fn apply(self, spv: &SpirvBinary) -> String { - let mut out = String::new(); - - if let Some(header) = spv.header() { - out.push_str(&format!("; SPIR-V\n")); - let major_version = header.version >> 16; - let minor_version = header.version & 0xffff; - out.push_str(&format!("; Version: {}.{}\n", major_version, minor_version)); - out.push_str(&format!("; Generator: {:x}\n", header.generator)); - out.push_str(&format!("; Bound: {:x}\n", header.bound)); - out.push_str(&format!("; Schema: {:x}\n", header.schema)); - } - - for instr in Instrs::new(spv.words()) { - //result.push_str(&format!("{:?}\n", instr)); - } - out - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn test_simple() { - let spv = [ - 0x07230203, 0x00010000, 0x00000008, 0x0000001, 0x00000000 - ].iter().map(|x| *x as u32).collect::>(); - let spv = SpirvBinary::from(spv); - let out = Disassembler{}.apply(&spv); - assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0\n"); - } - - #[test] - fn test_nop() { - } -} diff --git a/spirq-spvasm/scripts/generate_enum_from_str.py b/spirq-spvasm/scripts/generate_enum_from_str.py index eff721b..4ced7c0 100644 --- a/spirq-spvasm/scripts/generate_enum_from_str.py +++ b/spirq-spvasm/scripts/generate_enum_from_str.py @@ -29,7 +29,7 @@ ] # ValueEnum -for kind, enumerants in bit_enums.items(): +for kind, enumerants in value_enums.items(): if len(enumerants) == 0: continue @@ -46,7 +46,7 @@ ] # BitEnum -for kind, enumerants in value_enums.items(): +for kind, enumerants in bit_enums.items(): if len(enumerants) == 0: continue @@ -70,5 +70,5 @@ "", ] -with open("spirq-spvasm/src/asm/generated/enum_from_str.rs", "w") as f: +with open("spirq-spvasm/src/generated/enum_from_str.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_enum_to_str.py b/spirq-spvasm/scripts/generate_enum_to_str.py new file mode 100644 index 0000000..03b4485 --- /dev/null +++ b/spirq-spvasm/scripts/generate_enum_to_str.py @@ -0,0 +1,69 @@ +from collections import defaultdict +import json + +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +bit_enums = defaultdict(dict) +value_enums = defaultdict(dict) +for operand_kind in j["operand_kinds"]: + category = operand_kind["category"] + kind = operand_kind["kind"] + + if category == "BitEnum": + enumerants = operand_kind["enumerants"] + for enumerant in enumerants: + bit_enums[kind][enumerant["enumerant"]] = enumerant["value"] + elif category == "ValueEnum": + enumerants = operand_kind["enumerants"] + for enumerant in enumerants: + value_enums[kind][enumerant["enumerant"]] = enumerant["value"] + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "", + "pub fn enum_to_str(ety: &str, value: u32) -> Result {", + " let out: String = match ety {", +] + +# ValueEnum +for kind, enumerants in value_enums.items(): + if len(enumerants) == 0: + continue + + out += [ + f' "{kind}" => match value {{', + ] + for name, value in enumerants.items(): + out += [ + f' {value} => "{name}".to_owned(),', + ] + out += [ + " _ => value.to_string(),", + " }", + ] + +# BitEnum +for kind, enumerants in bit_enums.items(): + if len(enumerants) == 0: + continue + + out += [ + f' "{kind}" => match value {{', + ' 0 => "None".to_owned(),', + " _ => value.to_string(),", + " }", + ] + +out += [ + ' _ => bail!("unknown enum: {}", ety),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-spvasm/src/generated/enum_to_str.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_op_from_str.py b/spirq-spvasm/scripts/generate_op_from_str.py index 229e318..fc577e4 100644 --- a/spirq-spvasm/scripts/generate_op_from_str.py +++ b/spirq-spvasm/scripts/generate_op_from_str.py @@ -15,7 +15,6 @@ out += [ "use anyhow::{bail, Result};", - "use num_traits::FromPrimitive;", "", "pub fn op_from_str(opname: &str) -> Result {", " let out: u32 = match opname {", @@ -32,5 +31,5 @@ "", ] -with open("spirq-spvasm/src/asm/generated/op_from_str.rs", "w") as f: +with open("spirq-spvasm/src/generated/op_from_str.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_op_has_result_id.py b/spirq-spvasm/scripts/generate_op_has_result_id.py index 6ff53cb..e8d4580 100644 --- a/spirq-spvasm/scripts/generate_op_has_result_id.py +++ b/spirq-spvasm/scripts/generate_op_has_result_id.py @@ -37,5 +37,5 @@ "", ] -with open("spirq-spvasm/src/asm/generated/op_has_result_id.rs", "w") as f: +with open("spirq-spvasm/src/generated/op_has_result_id.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_op_has_result_type_id.py b/spirq-spvasm/scripts/generate_op_has_result_type_id.py index b02d717..1855c13 100644 --- a/spirq-spvasm/scripts/generate_op_has_result_type_id.py +++ b/spirq-spvasm/scripts/generate_op_has_result_type_id.py @@ -37,5 +37,5 @@ "", ] -with open("spirq-spvasm/src/asm/generated/op_has_result_type_id.rs", "w") as f: +with open("spirq-spvasm/src/generated/op_has_result_type_id.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_op_to_str.py b/spirq-spvasm/scripts/generate_op_to_str.py new file mode 100644 index 0000000..4a55770 --- /dev/null +++ b/spirq-spvasm/scripts/generate_op_to_str.py @@ -0,0 +1,36 @@ +import json + +name2op = {} +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +for instr in j["instructions"]: + opname = instr["opname"] + opcode = instr["opcode"] + + assert opname not in name2op + name2op[opname] = opcode + +out = [] + +out += [ + "#![allow(unreachable_patterns)]", + "use anyhow::{bail, Result};", + "", + "pub fn op_to_str(opcode: u32) -> Result<&'static str> {", + " let out: &'static str = match opcode {", +] + +for opname, opcode in name2op.items(): + out += [f' {opcode} => "{opname}",'] + +out += [ + ' _ => bail!("Unknown opcode: {}", opcode),', + " };", + " Ok(out)", + "}", + "", +] + +with open("spirq-spvasm/src/generated/op_to_str.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_operand_enum_type.py b/spirq-spvasm/scripts/generate_operand_enum_type.py index 53a7474..6cc97ee 100644 --- a/spirq-spvasm/scripts/generate_operand_enum_type.py +++ b/spirq-spvasm/scripts/generate_operand_enum_type.py @@ -57,5 +57,5 @@ "", ] -with open("spirq-spvasm/src/asm/generated/operand_enum_type.rs", "w") as f: +with open("spirq-spvasm/src/generated/operand_enum_type.rs", "w") as f: f.write("\n".join(out)) diff --git a/spirq-spvasm/scripts/generate_read_operand.py b/spirq-spvasm/scripts/generate_read_operand.py new file mode 100644 index 0000000..4ae8355 --- /dev/null +++ b/spirq-spvasm/scripts/generate_read_operand.py @@ -0,0 +1,175 @@ +import json + +with open("assets/spirv/spirv.core.grammar.json") as f: + j = json.load(f) + +operand_kinds = {} +for instr in j["instructions"]: + opcode = instr["opcode"] + opname = instr["opname"] + + op_operand_kinds = [] + if "operands" in instr: + operands = instr["operands"] + for operand in operands: + kind = operand["kind"] + quantifier = operand["quantifier"] if "quantifier" in operand else None + op_operand_kinds.append((kind, quantifier)) + operand_kinds[opcode] = opname, op_operand_kinds + +out = [] + +out += [ + "use anyhow::{bail, Result};", + "use spirq_core::parse::Operands;", + "use super::enum_to_str::enum_to_str;", + "", + "fn print_id(operands: &mut Operands) -> Result {", + ' Ok(format!("%{}", operands.read_u32()?))', + "}", + "fn print_u32(operands: &mut Operands) -> Result {", + " Ok(operands.read_u32()?.to_string())", + "}", + "fn print_f32(operands: &mut Operands) -> Result {", + " Ok(operands.read_f32()?.to_string())", + "}", + "fn print_str(operands: &mut Operands) -> Result {", + ' Ok(format!(r#""{}""#, operands.read_str()?))', + "}", + "fn print_list(operands: &mut Operands) -> Result> {", + " let out = operands.read_list()?", + " .iter()", + " .map(|x| x.to_string())", + " .collect::>();", + " Ok(out)", + "}", + "fn print_pair_id_id_list(operands: &mut Operands) -> Result> {", + " let mut out = Vec::new();", + " for pair in operands.read_list()?.chunks(2) {", + " if pair.len() != 2 {", + ' bail!("operands does not pair up");', + " }", + ' let seg = format!("%{} %{}", pair[0], pair[1]);', + " out.push(seg);", + " }", + " Ok(out)", + "}", + "fn print_pair_id_u32_list(operands: &mut Operands) -> Result> {", + " let mut out = Vec::new();", + " for pair in operands.read_list()?.chunks(2) {", + " if pair.len() != 2 {", + ' bail!("operands does not pair up");', + " }", + ' let seg = format!("%{} {}", pair[0], pair[1]);', + " out.push(seg);", + " }", + " Ok(out)", + "}", + "fn print_pair_u32_id_list(operands: &mut Operands) -> Result> {", + " let mut out = Vec::new();", + " for pair in operands.read_list()?.chunks(2) {", + " if pair.len() != 2 {", + ' bail!("operands does not pair up");', + " }", + ' let seg = format!("{} %{}", pair[0], pair[1]);', + " out.push(seg);", + " }", + " Ok(out)", + "}", + "", + "pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> {", + " let mut out: Vec = Vec::new();", + " match opcode {", +] + +for opcode, (opname, op_operand_kinds) in operand_kinds.items(): + if len(op_operand_kinds) == 0: + continue + + out += [ + f" // {opname}", + f" {opcode} => {{", + ] + for kind, quantifier in op_operand_kinds: + padding = " " * 12 + + if kind in ["IdResult", "IdResultType"]: + continue + + out += [ + padding + f"// {kind}" + (f" {quantifier}" if quantifier else ""), + ] + + if quantifier == "*": + out += [ + padding + "while !operands.is_empty() {", + ] + padding += " " + elif quantifier == "?": + out += [ + padding + "if !operands.is_empty() {", + ] + padding += " " + elif quantifier is None: + pass + else: + raise RuntimeError(f"unknown quantifier {quantifier}") + + # Literal + if kind == "LiteralInteger": + out += [padding + "out.push(print_u32(operands)?);"] + elif kind == "LiteralFloat": + out += [padding + "out.push(print_f32(operands)?);"] + elif kind == "LiteralString": + out += [padding + "out.push(print_str(operands)?);"] + elif kind == "LiteralContextDependentNumber": + out += [padding + "out.extend(print_list(operands)?);"] + elif kind.startswith("Literal"): + out += [padding + "out.push(print_u32(operands)?);"] + # Id + elif kind.startswith("Id"): + out += [padding + "out.push(print_id(operands)?);"] + # Pair + elif kind == "PairIdRefIdRef": + out += [padding + "out.extend(print_pair_id_id_list(operands)?);"] + elif kind == "PairIdRefLiteralInteger": + out += [padding + "out.extend(print_pair_id_u32_list(operands)?);"] + elif kind == "PairLiteralIntegerIdRef": + out += [padding + "out.extend(print_pair_u32_id_list(operands)?);"] + # Enum + else: + out += [ + padding + f'out.push(enum_to_str("{kind}", operands.read_u32()?)?);' + ] + + if quantifier == "*": + out += [ + padding[:-4] + "}", + ] + elif quantifier == "?": + out += [ + padding[:-4] + "}", + ] + elif quantifier is None: + pass + else: + raise RuntimeError(f"unknown quantifier {quantifier}") + + # Deal with extra operands. We don't know what they are but we can print them as u32 anyway. + out += [ + " }", + ] + +out += [ + ' _ => bail!("unsupported opcode {}", opcode),', + " };", + " while !operands.is_empty() {", + ' out.push(format!("!{}", operands.read_u32()?));', + " }", + " Ok(out)", + "}", + "", +] + +with open("spirq-spvasm/src/generated/print_operand.rs", "w") as f: + f.write("\n".join(out)) diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index eaa7e13..1edbf0e 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -1,10 +1,10 @@ -use std::{iter::Peekable, collections::{HashMap, HashSet}}; +use std::collections::{HashMap, HashSet}; use anyhow::{anyhow, bail, Result}; use num_traits::FromPrimitive; -use spirq_core::{spirv::Op, parse::{Instr, InstructionBuilder}}; +use spirq_core::{spirv::Op, parse::InstructionBuilder}; use super::tokenizer::{Token, Tokenizer, Lit}; -use super::generated; +use crate::generated; enum IdRef { @@ -57,32 +57,35 @@ impl Assembler { _ => Err(anyhow!("expected opcode")), } } + + fn str2idref(&self, id: String) -> IdRef { + if let Some(id) = id.parse::().ok() { + IdRef::Id(id) + } else { + IdRef::Name(id) + } + } fn parse_idref(&self, s: &mut TokenStream) -> Result { let token = s.next()?.ok_or_else(|| anyhow!("expected idref"))?; - match token { - Token::IdRef(id) => { - if let Some(id) = id.parse::().ok() { - Ok(IdRef::Id(id)) - } else { - Ok(IdRef::Name(id)) - } - } - _ => Err(anyhow!("expected idref")), - } + let idref = match token { + Token::IdRef(id) => self.str2idref(id), + _ => unreachable!(), + }; + Ok(idref) } fn parse_operand(&self, s: &mut TokenStream) -> Result { let token = s.next()?.ok_or_else(|| anyhow!("expected operand"))?; match token { Token::IdRef(id) => { - let idref = self.parse_idref(s)?; + let idref = self.str2idref(id); Ok(Operand::IdRef(idref)) } Token::Literal(lit) => { - Ok(Operand::Literal(lit)) + Ok(Operand::Literal(lit.clone())) } Token::Ident(ident) => { - Ok(Operand::Ident(ident)) + Ok(Operand::Ident(ident.clone())) } _ => Err(anyhow!("expected operand, but {:?}", s.peek())), } @@ -140,14 +143,14 @@ impl Assembler { fn parse_instr(&self, s: &mut TokenStream) -> Result> { while let Some(token) = s.peek() { - match token.clone() { + match token { Token::Comment(_) => {} Token::NewLine => {}, - Token::Ident(ident) => { + Token::Ident(_) => { let instr = self.parse_instr_without_result_id(s)?; return Ok(Some(instr)); } - Token::IdRef(id) => { + Token::IdRef(_) => { let instr = self.parse_instr_with_result_id(s)?; return Ok(Some(instr)); } @@ -168,7 +171,7 @@ impl Assembler { } fn parse(&self, input: &str) -> Result> { - let mut tokenizer = Tokenizer::new(input); + let tokenizer = Tokenizer::new(input); let mut s = TokenStream { tokenizer, cache: None, @@ -211,11 +214,8 @@ impl Assembler { // Transform name refs to id refs. for instr in &mut instrs { - let result_id = if let Some(result_id) = &mut instr.result_id { - let idref = self.process_idref(result_id)?; - Some(idref) - } else { - None + if let Some(result_id) = &mut instr.result_id { + *result_id = self.process_idref(&result_id)?; }; for operand in &mut instr.operands { @@ -263,7 +263,7 @@ impl Assembler { for (i, operand) in operands.enumerate() { match operand { - Operand::IdRef(IdRef::Name(name)) => unreachable!(), + Operand::IdRef(IdRef::Name(_)) => unreachable!(), Operand::IdRef(IdRef::Id(id)) => { builder = builder.push(*id); } diff --git a/spirq-spvasm/src/asm/mod.rs b/spirq-spvasm/src/asm/mod.rs index 93703e9..7605c5c 100644 --- a/spirq-spvasm/src/asm/mod.rs +++ b/spirq-spvasm/src/asm/mod.rs @@ -1,5 +1,4 @@ mod tokenizer; mod assembler; -mod generated; pub use assembler::Assembler; diff --git a/spirq-spvasm/src/asm/tokenizer.rs b/spirq-spvasm/src/asm/tokenizer.rs index ef4fd5b..e60da69 100644 --- a/spirq-spvasm/src/asm/tokenizer.rs +++ b/spirq-spvasm/src/asm/tokenizer.rs @@ -1,13 +1,10 @@ use std::iter::Peekable; -use std::rc::Rc; use std::str::Chars; use std::str::FromStr; -use anyhow::{anyhow, bail, Error, Result}; -use spirq_core::parse::{Instr, SpirvBinary, Instrs, bin::SpirvHeader}; -use spirq_core::ty::TypeRegistry; +use anyhow::{anyhow, bail, Result}; -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum Lit { Int(i64), // Base numeric and the exponent bias. The effect of the bias depends on the @@ -334,17 +331,16 @@ impl<'a> Iterator for Tokenizer<'a> { } -pub fn tokenize(code: &str) -> Result> { - let tokenizer = Tokenizer::new(code); - let tokens = tokenizer.collect::>>(); - tokens -} - - #[cfg(test)] mod test { use super::*; + pub fn tokenize(code: &str) -> Result> { + let tokenizer = Tokenizer::new(code); + let tokens = tokenizer.collect::>>(); + tokens + } + #[test] fn test_tokenize_nothing() { let code = ""; @@ -453,7 +449,7 @@ mod test { let tokens = tokenize(code).unwrap(); assert_eq!(tokens.len(), 1); let expected = r#""\""#; - for (i, token) in tokens.iter().enumerate() { + for (_, token) in tokens.iter().enumerate() { match token { Token::Literal(Lit::String(s)) => assert_eq!(s, expected), _ => panic!("unexpected token: {:?}", token), diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs new file mode 100644 index 0000000..cb8b74f --- /dev/null +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -0,0 +1,99 @@ +use anyhow::Result; +use spirq_core::parse::{Instr, SpirvBinary, Instrs}; +use crate::generated; + +pub struct Disassembler { + print_header: bool +} +impl Disassembler { + pub fn new() -> Self { + Self { + print_header: true, + } + } + + pub fn print_header(mut self, value: bool) -> Self { + self.print_header = value; + return self + } + + fn print_operands(&self, instr: &Instr) -> Result { + let operands = generated::print_operand(instr.opcode(), &mut instr.operands())?; + let out = operands.join(" "); + Ok(out) + } + fn print_opcode(&self, opcode: u32) -> Result { + let opname = generated::op_to_str(opcode)?.to_owned(); + Ok(opname) + } + + fn print_line(&self, instr: &Instr) -> Result { + let mut operands = instr.operands(); + let opcode = instr.opcode(); + let result_type_id = if generated::op_has_result_type_id(opcode)? { + Some(operands.read_id()?) + } else { + None + }; + let result_id = if generated::op_has_result_id(opcode)? { + Some(operands.read_id()?) + } else { + None + }; + + let mut out = String::new(); + if let Some(result_id) = result_id { + out = format!("%{} = ", result_id); + } + out.push_str(&self.print_opcode(opcode).unwrap()); + if let Some(result_type_id) = result_type_id { + out.push_str(&format!(" %{}", result_type_id)); + } + out.push_str(&self.print_operands(instr)?); + + Ok(out) + } + fn print_lines(&self, instrs: &mut Instrs) -> Result> { + let mut out = Vec::new(); + for instr in instrs { + out.push(self.print_line(instr)?); + } + Ok(out) + } + pub fn disassemble(self, spv: &SpirvBinary) -> Result { + let mut out = Vec::new(); + + if let Some(header) = spv.header() { + out.push(format!("; SPIR-V")); + let major_version = header.version >> 16; + let minor_version = header.version & 0xffff; + out.push(format!("; Version: {}.{}", major_version, minor_version)); + out.push(format!("; Generator: {:x}", header.generator)); + out.push(format!("; Bound: {:x}", header.bound)); + out.push(format!("; Schema: {:x}", header.schema)); + } + + let instrs = self.print_lines(&mut spv.instrs())?; + out.extend(instrs); + Ok(out.join("\n")) + } +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn test_simple() { + let spv = [ + 0x07230203, 0x00010000, 0x00000008, 0x0000001, 0x00000000 + ].iter().map(|x| *x as u32).collect::>(); + let spv = SpirvBinary::from(spv); + let out = Disassembler::new().disassemble(&spv).unwrap(); + assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0"); + } + + #[test] + fn test_nop() { + } +} diff --git a/spirq-spvasm/src/dis/mod.rs b/spirq-spvasm/src/dis/mod.rs index e69de29..8492a5d 100644 --- a/spirq-spvasm/src/dis/mod.rs +++ b/spirq-spvasm/src/dis/mod.rs @@ -0,0 +1,3 @@ +mod disassembler; + +pub use disassembler::Disassembler; diff --git a/spirq-spvasm/src/asm/generated/enum_from_str.rs b/spirq-spvasm/src/generated/enum_from_str.rs similarity index 100% rename from spirq-spvasm/src/asm/generated/enum_from_str.rs rename to spirq-spvasm/src/generated/enum_from_str.rs index 89a5513..f0e499a 100644 --- a/spirq-spvasm/src/asm/generated/enum_from_str.rs +++ b/spirq-spvasm/src/generated/enum_from_str.rs @@ -2,152 +2,6 @@ use anyhow::{bail, Result}; pub fn enum_from_str(ety: &str, name: &str) -> Result { let out: u32 = match ety { - "ImageOperands" => match name { - "None" => 0x0000, - "Bias" => 0x0001, - "Lod" => 0x0002, - "Grad" => 0x0004, - "ConstOffset" => 0x0008, - "Offset" => 0x0010, - "ConstOffsets" => 0x0020, - "Sample" => 0x0040, - "MinLod" => 0x0080, - "MakeTexelAvailable" => 0x0100, - "MakeTexelAvailableKHR" => 0x0100, - "MakeTexelVisible" => 0x0200, - "MakeTexelVisibleKHR" => 0x0200, - "NonPrivateTexel" => 0x0400, - "NonPrivateTexelKHR" => 0x0400, - "VolatileTexel" => 0x0800, - "VolatileTexelKHR" => 0x0800, - "SignExtend" => 0x1000, - "ZeroExtend" => 0x2000, - "Nontemporal" => 0x4000, - "Offsets" => 0x10000, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "FPFastMathMode" => match name { - "None" => 0x0000, - "NotNaN" => 0x0001, - "NotInf" => 0x0002, - "NSZ" => 0x0004, - "AllowRecip" => 0x0008, - "Fast" => 0x0010, - "AllowContractFastINTEL" => 0x10000, - "AllowReassocINTEL" => 0x20000, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "SelectionControl" => match name { - "None" => 0x0000, - "Flatten" => 0x0001, - "DontFlatten" => 0x0002, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "LoopControl" => match name { - "None" => 0x0000, - "Unroll" => 0x0001, - "DontUnroll" => 0x0002, - "DependencyInfinite" => 0x0004, - "DependencyLength" => 0x0008, - "MinIterations" => 0x0010, - "MaxIterations" => 0x0020, - "IterationMultiple" => 0x0040, - "PeelCount" => 0x0080, - "PartialCount" => 0x0100, - "InitiationIntervalINTEL" => 0x10000, - "MaxConcurrencyINTEL" => 0x20000, - "DependencyArrayINTEL" => 0x40000, - "PipelineEnableINTEL" => 0x80000, - "LoopCoalesceINTEL" => 0x100000, - "MaxInterleavingINTEL" => 0x200000, - "SpeculatedIterationsINTEL" => 0x400000, - "NoFusionINTEL" => 0x800000, - "LoopCountINTEL" => 0x1000000, - "MaxReinvocationDelayINTEL" => 0x2000000, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "FunctionControl" => match name { - "None" => 0x0000, - "Inline" => 0x0001, - "DontInline" => 0x0002, - "Pure" => 0x0004, - "Const" => 0x0008, - "OptNoneINTEL" => 0x10000, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "MemorySemantics" => match name { - "Relaxed" => 0x0000, - "None" => 0x0000, - "Acquire" => 0x0002, - "Release" => 0x0004, - "AcquireRelease" => 0x0008, - "SequentiallyConsistent" => 0x0010, - "UniformMemory" => 0x0040, - "SubgroupMemory" => 0x0080, - "WorkgroupMemory" => 0x0100, - "CrossWorkgroupMemory" => 0x0200, - "AtomicCounterMemory" => 0x0400, - "ImageMemory" => 0x0800, - "OutputMemory" => 0x1000, - "OutputMemoryKHR" => 0x1000, - "MakeAvailable" => 0x2000, - "MakeAvailableKHR" => 0x2000, - "MakeVisible" => 0x4000, - "MakeVisibleKHR" => 0x4000, - "Volatile" => 0x8000, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "MemoryAccess" => match name { - "None" => 0x0000, - "Volatile" => 0x0001, - "Aligned" => 0x0002, - "Nontemporal" => 0x0004, - "MakePointerAvailable" => 0x0008, - "MakePointerAvailableKHR" => 0x0008, - "MakePointerVisible" => 0x0010, - "MakePointerVisibleKHR" => 0x0010, - "NonPrivatePointer" => 0x0020, - "NonPrivatePointerKHR" => 0x0020, - "AliasScopeINTELMask" => 0x10000, - "NoAliasINTELMask" => 0x20000, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "KernelProfilingInfo" => match name { - "None" => 0x0000, - "CmdExecTime" => 0x0001, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "RayFlags" => match name { - "NoneKHR" => 0x0000, - "OpaqueKHR" => 0x0001, - "NoOpaqueKHR" => 0x0002, - "TerminateOnFirstHitKHR" => 0x0004, - "SkipClosestHitShaderKHR" => 0x0008, - "CullBackFacingTrianglesKHR" => 0x0010, - "CullFrontFacingTrianglesKHR" => 0x0020, - "CullOpaqueKHR" => 0x0040, - "CullNoOpaqueKHR" => 0x0080, - "SkipTrianglesKHR" => 0x0100, - "SkipAABBsKHR" => 0x0200, - "ForceOpacityMicromap2StateEXT" => 0x0400, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "FragmentShadingRate" => match name { - "Vertical2Pixels" => 0x0001, - "Vertical4Pixels" => 0x0002, - "Horizontal2Pixels" => 0x0004, - "Horizontal4Pixels" => 0x0008, - _ => bail!("unknown enum: {}::{}", ety, name) - } - "CooperativeMatrixOperands" => match name { - "NoneKHR" => 0x0000, - "MatrixASignedComponentsKHR" => 0x0001, - "MatrixBSignedComponentsKHR" => 0x0002, - "MatrixCSignedComponentsKHR" => 0x0004, - "MatrixResultSignedComponentsKHR" => 0x0008, - "SaturatingAccumulationKHR" => 0x0010, - _ => bail!("unknown enum: {}::{}", ety, name) - } "SourceLanguage" => match name { "Unknown" => 0, "ESSL" => 1, @@ -1136,6 +990,152 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "StreamingINTEL" => 3, _ => bail!("unknown enum: {}::{}", ety, name) } + "ImageOperands" => match name { + "None" => 0x0000, + "Bias" => 0x0001, + "Lod" => 0x0002, + "Grad" => 0x0004, + "ConstOffset" => 0x0008, + "Offset" => 0x0010, + "ConstOffsets" => 0x0020, + "Sample" => 0x0040, + "MinLod" => 0x0080, + "MakeTexelAvailable" => 0x0100, + "MakeTexelAvailableKHR" => 0x0100, + "MakeTexelVisible" => 0x0200, + "MakeTexelVisibleKHR" => 0x0200, + "NonPrivateTexel" => 0x0400, + "NonPrivateTexelKHR" => 0x0400, + "VolatileTexel" => 0x0800, + "VolatileTexelKHR" => 0x0800, + "SignExtend" => 0x1000, + "ZeroExtend" => 0x2000, + "Nontemporal" => 0x4000, + "Offsets" => 0x10000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FPFastMathMode" => match name { + "None" => 0x0000, + "NotNaN" => 0x0001, + "NotInf" => 0x0002, + "NSZ" => 0x0004, + "AllowRecip" => 0x0008, + "Fast" => 0x0010, + "AllowContractFastINTEL" => 0x10000, + "AllowReassocINTEL" => 0x20000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "SelectionControl" => match name { + "None" => 0x0000, + "Flatten" => 0x0001, + "DontFlatten" => 0x0002, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "LoopControl" => match name { + "None" => 0x0000, + "Unroll" => 0x0001, + "DontUnroll" => 0x0002, + "DependencyInfinite" => 0x0004, + "DependencyLength" => 0x0008, + "MinIterations" => 0x0010, + "MaxIterations" => 0x0020, + "IterationMultiple" => 0x0040, + "PeelCount" => 0x0080, + "PartialCount" => 0x0100, + "InitiationIntervalINTEL" => 0x10000, + "MaxConcurrencyINTEL" => 0x20000, + "DependencyArrayINTEL" => 0x40000, + "PipelineEnableINTEL" => 0x80000, + "LoopCoalesceINTEL" => 0x100000, + "MaxInterleavingINTEL" => 0x200000, + "SpeculatedIterationsINTEL" => 0x400000, + "NoFusionINTEL" => 0x800000, + "LoopCountINTEL" => 0x1000000, + "MaxReinvocationDelayINTEL" => 0x2000000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FunctionControl" => match name { + "None" => 0x0000, + "Inline" => 0x0001, + "DontInline" => 0x0002, + "Pure" => 0x0004, + "Const" => 0x0008, + "OptNoneINTEL" => 0x10000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "MemorySemantics" => match name { + "Relaxed" => 0x0000, + "None" => 0x0000, + "Acquire" => 0x0002, + "Release" => 0x0004, + "AcquireRelease" => 0x0008, + "SequentiallyConsistent" => 0x0010, + "UniformMemory" => 0x0040, + "SubgroupMemory" => 0x0080, + "WorkgroupMemory" => 0x0100, + "CrossWorkgroupMemory" => 0x0200, + "AtomicCounterMemory" => 0x0400, + "ImageMemory" => 0x0800, + "OutputMemory" => 0x1000, + "OutputMemoryKHR" => 0x1000, + "MakeAvailable" => 0x2000, + "MakeAvailableKHR" => 0x2000, + "MakeVisible" => 0x4000, + "MakeVisibleKHR" => 0x4000, + "Volatile" => 0x8000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "MemoryAccess" => match name { + "None" => 0x0000, + "Volatile" => 0x0001, + "Aligned" => 0x0002, + "Nontemporal" => 0x0004, + "MakePointerAvailable" => 0x0008, + "MakePointerAvailableKHR" => 0x0008, + "MakePointerVisible" => 0x0010, + "MakePointerVisibleKHR" => 0x0010, + "NonPrivatePointer" => 0x0020, + "NonPrivatePointerKHR" => 0x0020, + "AliasScopeINTELMask" => 0x10000, + "NoAliasINTELMask" => 0x20000, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "KernelProfilingInfo" => match name { + "None" => 0x0000, + "CmdExecTime" => 0x0001, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "RayFlags" => match name { + "NoneKHR" => 0x0000, + "OpaqueKHR" => 0x0001, + "NoOpaqueKHR" => 0x0002, + "TerminateOnFirstHitKHR" => 0x0004, + "SkipClosestHitShaderKHR" => 0x0008, + "CullBackFacingTrianglesKHR" => 0x0010, + "CullFrontFacingTrianglesKHR" => 0x0020, + "CullOpaqueKHR" => 0x0040, + "CullNoOpaqueKHR" => 0x0080, + "SkipTrianglesKHR" => 0x0100, + "SkipAABBsKHR" => 0x0200, + "ForceOpacityMicromap2StateEXT" => 0x0400, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "FragmentShadingRate" => match name { + "Vertical2Pixels" => 0x0001, + "Vertical4Pixels" => 0x0002, + "Horizontal2Pixels" => 0x0004, + "Horizontal4Pixels" => 0x0008, + _ => bail!("unknown enum: {}::{}", ety, name) + } + "CooperativeMatrixOperands" => match name { + "NoneKHR" => 0x0000, + "MatrixASignedComponentsKHR" => 0x0001, + "MatrixBSignedComponentsKHR" => 0x0002, + "MatrixCSignedComponentsKHR" => 0x0004, + "MatrixResultSignedComponentsKHR" => 0x0008, + "SaturatingAccumulationKHR" => 0x0010, + _ => bail!("unknown enum: {}::{}", ety, name) + } _ => bail!("unknown enum: {}::{}", ety, name), }; Ok(out) diff --git a/spirq-spvasm/src/generated/enum_to_str.rs b/spirq-spvasm/src/generated/enum_to_str.rs new file mode 100644 index 0000000..018e471 --- /dev/null +++ b/spirq-spvasm/src/generated/enum_to_str.rs @@ -0,0 +1,1040 @@ +use anyhow::{bail, Result}; + +pub fn enum_to_str(ety: &str, value: u32) -> Result { + let out: String = match ety { + "SourceLanguage" => match value { + 0 => "Unknown".to_owned(), + 1 => "ESSL".to_owned(), + 2 => "GLSL".to_owned(), + 3 => "OpenCL_C".to_owned(), + 4 => "OpenCL_CPP".to_owned(), + 5 => "HLSL".to_owned(), + 6 => "CPP_for_OpenCL".to_owned(), + 7 => "SYCL".to_owned(), + 8 => "HERO_C".to_owned(), + 9 => "NZSL".to_owned(), + 10 => "WGSL".to_owned(), + 11 => "Slang".to_owned(), + _ => value.to_string(), + } + "ExecutionModel" => match value { + 0 => "Vertex".to_owned(), + 1 => "TessellationControl".to_owned(), + 2 => "TessellationEvaluation".to_owned(), + 3 => "Geometry".to_owned(), + 4 => "Fragment".to_owned(), + 5 => "GLCompute".to_owned(), + 6 => "Kernel".to_owned(), + 5267 => "TaskNV".to_owned(), + 5268 => "MeshNV".to_owned(), + 5313 => "RayGenerationNV".to_owned(), + 5313 => "RayGenerationKHR".to_owned(), + 5314 => "IntersectionNV".to_owned(), + 5314 => "IntersectionKHR".to_owned(), + 5315 => "AnyHitNV".to_owned(), + 5315 => "AnyHitKHR".to_owned(), + 5316 => "ClosestHitNV".to_owned(), + 5316 => "ClosestHitKHR".to_owned(), + 5317 => "MissNV".to_owned(), + 5317 => "MissKHR".to_owned(), + 5318 => "CallableNV".to_owned(), + 5318 => "CallableKHR".to_owned(), + 5364 => "TaskEXT".to_owned(), + 5365 => "MeshEXT".to_owned(), + _ => value.to_string(), + } + "AddressingModel" => match value { + 0 => "Logical".to_owned(), + 1 => "Physical32".to_owned(), + 2 => "Physical64".to_owned(), + 5348 => "PhysicalStorageBuffer64".to_owned(), + 5348 => "PhysicalStorageBuffer64EXT".to_owned(), + _ => value.to_string(), + } + "MemoryModel" => match value { + 0 => "Simple".to_owned(), + 1 => "GLSL450".to_owned(), + 2 => "OpenCL".to_owned(), + 3 => "Vulkan".to_owned(), + 3 => "VulkanKHR".to_owned(), + _ => value.to_string(), + } + "ExecutionMode" => match value { + 0 => "Invocations".to_owned(), + 1 => "SpacingEqual".to_owned(), + 2 => "SpacingFractionalEven".to_owned(), + 3 => "SpacingFractionalOdd".to_owned(), + 4 => "VertexOrderCw".to_owned(), + 5 => "VertexOrderCcw".to_owned(), + 6 => "PixelCenterInteger".to_owned(), + 7 => "OriginUpperLeft".to_owned(), + 8 => "OriginLowerLeft".to_owned(), + 9 => "EarlyFragmentTests".to_owned(), + 10 => "PointMode".to_owned(), + 11 => "Xfb".to_owned(), + 12 => "DepthReplacing".to_owned(), + 14 => "DepthGreater".to_owned(), + 15 => "DepthLess".to_owned(), + 16 => "DepthUnchanged".to_owned(), + 17 => "LocalSize".to_owned(), + 18 => "LocalSizeHint".to_owned(), + 19 => "InputPoints".to_owned(), + 20 => "InputLines".to_owned(), + 21 => "InputLinesAdjacency".to_owned(), + 22 => "Triangles".to_owned(), + 23 => "InputTrianglesAdjacency".to_owned(), + 24 => "Quads".to_owned(), + 25 => "Isolines".to_owned(), + 26 => "OutputVertices".to_owned(), + 27 => "OutputPoints".to_owned(), + 28 => "OutputLineStrip".to_owned(), + 29 => "OutputTriangleStrip".to_owned(), + 30 => "VecTypeHint".to_owned(), + 31 => "ContractionOff".to_owned(), + 33 => "Initializer".to_owned(), + 34 => "Finalizer".to_owned(), + 35 => "SubgroupSize".to_owned(), + 36 => "SubgroupsPerWorkgroup".to_owned(), + 37 => "SubgroupsPerWorkgroupId".to_owned(), + 38 => "LocalSizeId".to_owned(), + 39 => "LocalSizeHintId".to_owned(), + 4169 => "NonCoherentColorAttachmentReadEXT".to_owned(), + 4170 => "NonCoherentDepthAttachmentReadEXT".to_owned(), + 4171 => "NonCoherentStencilAttachmentReadEXT".to_owned(), + 4421 => "SubgroupUniformControlFlowKHR".to_owned(), + 4446 => "PostDepthCoverage".to_owned(), + 4459 => "DenormPreserve".to_owned(), + 4460 => "DenormFlushToZero".to_owned(), + 4461 => "SignedZeroInfNanPreserve".to_owned(), + 4462 => "RoundingModeRTE".to_owned(), + 4463 => "RoundingModeRTZ".to_owned(), + 5017 => "EarlyAndLateFragmentTestsAMD".to_owned(), + 5027 => "StencilRefReplacingEXT".to_owned(), + 5069 => "CoalescingAMDX".to_owned(), + 5071 => "MaxNodeRecursionAMDX".to_owned(), + 5072 => "StaticNumWorkgroupsAMDX".to_owned(), + 5073 => "ShaderIndexAMDX".to_owned(), + 5077 => "MaxNumWorkgroupsAMDX".to_owned(), + 5079 => "StencilRefUnchangedFrontAMD".to_owned(), + 5080 => "StencilRefGreaterFrontAMD".to_owned(), + 5081 => "StencilRefLessFrontAMD".to_owned(), + 5082 => "StencilRefUnchangedBackAMD".to_owned(), + 5083 => "StencilRefGreaterBackAMD".to_owned(), + 5084 => "StencilRefLessBackAMD".to_owned(), + 5269 => "OutputLinesNV".to_owned(), + 5269 => "OutputLinesEXT".to_owned(), + 5270 => "OutputPrimitivesNV".to_owned(), + 5270 => "OutputPrimitivesEXT".to_owned(), + 5289 => "DerivativeGroupQuadsNV".to_owned(), + 5290 => "DerivativeGroupLinearNV".to_owned(), + 5298 => "OutputTrianglesNV".to_owned(), + 5298 => "OutputTrianglesEXT".to_owned(), + 5366 => "PixelInterlockOrderedEXT".to_owned(), + 5367 => "PixelInterlockUnorderedEXT".to_owned(), + 5368 => "SampleInterlockOrderedEXT".to_owned(), + 5369 => "SampleInterlockUnorderedEXT".to_owned(), + 5370 => "ShadingRateInterlockOrderedEXT".to_owned(), + 5371 => "ShadingRateInterlockUnorderedEXT".to_owned(), + 5618 => "SharedLocalMemorySizeINTEL".to_owned(), + 5620 => "RoundingModeRTPINTEL".to_owned(), + 5621 => "RoundingModeRTNINTEL".to_owned(), + 5622 => "FloatingPointModeALTINTEL".to_owned(), + 5623 => "FloatingPointModeIEEEINTEL".to_owned(), + 5893 => "MaxWorkgroupSizeINTEL".to_owned(), + 5894 => "MaxWorkDimINTEL".to_owned(), + 5895 => "NoGlobalOffsetINTEL".to_owned(), + 5896 => "NumSIMDWorkitemsINTEL".to_owned(), + 5903 => "SchedulerTargetFmaxMhzINTEL".to_owned(), + 6154 => "StreamingInterfaceINTEL".to_owned(), + 6160 => "RegisterMapInterfaceINTEL".to_owned(), + 6417 => "NamedBarrierCountINTEL".to_owned(), + _ => value.to_string(), + } + "StorageClass" => match value { + 0 => "UniformConstant".to_owned(), + 1 => "Input".to_owned(), + 2 => "Uniform".to_owned(), + 3 => "Output".to_owned(), + 4 => "Workgroup".to_owned(), + 5 => "CrossWorkgroup".to_owned(), + 6 => "Private".to_owned(), + 7 => "Function".to_owned(), + 8 => "Generic".to_owned(), + 9 => "PushConstant".to_owned(), + 10 => "AtomicCounter".to_owned(), + 11 => "Image".to_owned(), + 12 => "StorageBuffer".to_owned(), + 4172 => "TileImageEXT".to_owned(), + 5068 => "NodePayloadAMDX".to_owned(), + 5076 => "NodeOutputPayloadAMDX".to_owned(), + 5328 => "CallableDataNV".to_owned(), + 5328 => "CallableDataKHR".to_owned(), + 5329 => "IncomingCallableDataNV".to_owned(), + 5329 => "IncomingCallableDataKHR".to_owned(), + 5338 => "RayPayloadNV".to_owned(), + 5338 => "RayPayloadKHR".to_owned(), + 5339 => "HitAttributeNV".to_owned(), + 5339 => "HitAttributeKHR".to_owned(), + 5342 => "IncomingRayPayloadNV".to_owned(), + 5342 => "IncomingRayPayloadKHR".to_owned(), + 5343 => "ShaderRecordBufferNV".to_owned(), + 5343 => "ShaderRecordBufferKHR".to_owned(), + 5349 => "PhysicalStorageBuffer".to_owned(), + 5349 => "PhysicalStorageBufferEXT".to_owned(), + 5385 => "HitObjectAttributeNV".to_owned(), + 5402 => "TaskPayloadWorkgroupEXT".to_owned(), + 5605 => "CodeSectionINTEL".to_owned(), + 5936 => "DeviceOnlyINTEL".to_owned(), + 5937 => "HostOnlyINTEL".to_owned(), + _ => value.to_string(), + } + "Dim" => match value { + 0 => "1D".to_owned(), + 1 => "2D".to_owned(), + 2 => "3D".to_owned(), + 3 => "Cube".to_owned(), + 4 => "Rect".to_owned(), + 5 => "Buffer".to_owned(), + 6 => "SubpassData".to_owned(), + 4173 => "TileImageDataEXT".to_owned(), + _ => value.to_string(), + } + "SamplerAddressingMode" => match value { + 0 => "None".to_owned(), + 1 => "ClampToEdge".to_owned(), + 2 => "Clamp".to_owned(), + 3 => "Repeat".to_owned(), + 4 => "RepeatMirrored".to_owned(), + _ => value.to_string(), + } + "SamplerFilterMode" => match value { + 0 => "Nearest".to_owned(), + 1 => "Linear".to_owned(), + _ => value.to_string(), + } + "ImageFormat" => match value { + 0 => "Unknown".to_owned(), + 1 => "Rgba32f".to_owned(), + 2 => "Rgba16f".to_owned(), + 3 => "R32f".to_owned(), + 4 => "Rgba8".to_owned(), + 5 => "Rgba8Snorm".to_owned(), + 6 => "Rg32f".to_owned(), + 7 => "Rg16f".to_owned(), + 8 => "R11fG11fB10f".to_owned(), + 9 => "R16f".to_owned(), + 10 => "Rgba16".to_owned(), + 11 => "Rgb10A2".to_owned(), + 12 => "Rg16".to_owned(), + 13 => "Rg8".to_owned(), + 14 => "R16".to_owned(), + 15 => "R8".to_owned(), + 16 => "Rgba16Snorm".to_owned(), + 17 => "Rg16Snorm".to_owned(), + 18 => "Rg8Snorm".to_owned(), + 19 => "R16Snorm".to_owned(), + 20 => "R8Snorm".to_owned(), + 21 => "Rgba32i".to_owned(), + 22 => "Rgba16i".to_owned(), + 23 => "Rgba8i".to_owned(), + 24 => "R32i".to_owned(), + 25 => "Rg32i".to_owned(), + 26 => "Rg16i".to_owned(), + 27 => "Rg8i".to_owned(), + 28 => "R16i".to_owned(), + 29 => "R8i".to_owned(), + 30 => "Rgba32ui".to_owned(), + 31 => "Rgba16ui".to_owned(), + 32 => "Rgba8ui".to_owned(), + 33 => "R32ui".to_owned(), + 34 => "Rgb10a2ui".to_owned(), + 35 => "Rg32ui".to_owned(), + 36 => "Rg16ui".to_owned(), + 37 => "Rg8ui".to_owned(), + 38 => "R16ui".to_owned(), + 39 => "R8ui".to_owned(), + 40 => "R64ui".to_owned(), + 41 => "R64i".to_owned(), + _ => value.to_string(), + } + "ImageChannelOrder" => match value { + 0 => "R".to_owned(), + 1 => "A".to_owned(), + 2 => "RG".to_owned(), + 3 => "RA".to_owned(), + 4 => "RGB".to_owned(), + 5 => "RGBA".to_owned(), + 6 => "BGRA".to_owned(), + 7 => "ARGB".to_owned(), + 8 => "Intensity".to_owned(), + 9 => "Luminance".to_owned(), + 10 => "Rx".to_owned(), + 11 => "RGx".to_owned(), + 12 => "RGBx".to_owned(), + 13 => "Depth".to_owned(), + 14 => "DepthStencil".to_owned(), + 15 => "sRGB".to_owned(), + 16 => "sRGBx".to_owned(), + 17 => "sRGBA".to_owned(), + 18 => "sBGRA".to_owned(), + 19 => "ABGR".to_owned(), + _ => value.to_string(), + } + "ImageChannelDataType" => match value { + 0 => "SnormInt8".to_owned(), + 1 => "SnormInt16".to_owned(), + 2 => "UnormInt8".to_owned(), + 3 => "UnormInt16".to_owned(), + 4 => "UnormShort565".to_owned(), + 5 => "UnormShort555".to_owned(), + 6 => "UnormInt101010".to_owned(), + 7 => "SignedInt8".to_owned(), + 8 => "SignedInt16".to_owned(), + 9 => "SignedInt32".to_owned(), + 10 => "UnsignedInt8".to_owned(), + 11 => "UnsignedInt16".to_owned(), + 12 => "UnsignedInt32".to_owned(), + 13 => "HalfFloat".to_owned(), + 14 => "Float".to_owned(), + 15 => "UnormInt24".to_owned(), + 16 => "UnormInt101010_2".to_owned(), + 19 => "UnsignedIntRaw10EXT".to_owned(), + 20 => "UnsignedIntRaw12EXT".to_owned(), + _ => value.to_string(), + } + "FPRoundingMode" => match value { + 0 => "RTE".to_owned(), + 1 => "RTZ".to_owned(), + 2 => "RTP".to_owned(), + 3 => "RTN".to_owned(), + _ => value.to_string(), + } + "FPDenormMode" => match value { + 0 => "Preserve".to_owned(), + 1 => "FlushToZero".to_owned(), + _ => value.to_string(), + } + "QuantizationModes" => match value { + 0 => "TRN".to_owned(), + 1 => "TRN_ZERO".to_owned(), + 2 => "RND".to_owned(), + 3 => "RND_ZERO".to_owned(), + 4 => "RND_INF".to_owned(), + 5 => "RND_MIN_INF".to_owned(), + 6 => "RND_CONV".to_owned(), + 7 => "RND_CONV_ODD".to_owned(), + _ => value.to_string(), + } + "FPOperationMode" => match value { + 0 => "IEEE".to_owned(), + 1 => "ALT".to_owned(), + _ => value.to_string(), + } + "OverflowModes" => match value { + 0 => "WRAP".to_owned(), + 1 => "SAT".to_owned(), + 2 => "SAT_ZERO".to_owned(), + 3 => "SAT_SYM".to_owned(), + _ => value.to_string(), + } + "LinkageType" => match value { + 0 => "Export".to_owned(), + 1 => "Import".to_owned(), + 2 => "LinkOnceODR".to_owned(), + _ => value.to_string(), + } + "AccessQualifier" => match value { + 0 => "ReadOnly".to_owned(), + 1 => "WriteOnly".to_owned(), + 2 => "ReadWrite".to_owned(), + _ => value.to_string(), + } + "HostAccessQualifier" => match value { + 0 => "NoneINTEL".to_owned(), + 1 => "ReadINTEL".to_owned(), + 2 => "WriteINTEL".to_owned(), + 3 => "ReadWriteINTEL".to_owned(), + _ => value.to_string(), + } + "FunctionParameterAttribute" => match value { + 0 => "Zext".to_owned(), + 1 => "Sext".to_owned(), + 2 => "ByVal".to_owned(), + 3 => "Sret".to_owned(), + 4 => "NoAlias".to_owned(), + 5 => "NoCapture".to_owned(), + 6 => "NoWrite".to_owned(), + 7 => "NoReadWrite".to_owned(), + 5940 => "RuntimeAlignedINTEL".to_owned(), + _ => value.to_string(), + } + "Decoration" => match value { + 0 => "RelaxedPrecision".to_owned(), + 1 => "SpecId".to_owned(), + 2 => "Block".to_owned(), + 3 => "BufferBlock".to_owned(), + 4 => "RowMajor".to_owned(), + 5 => "ColMajor".to_owned(), + 6 => "ArrayStride".to_owned(), + 7 => "MatrixStride".to_owned(), + 8 => "GLSLShared".to_owned(), + 9 => "GLSLPacked".to_owned(), + 10 => "CPacked".to_owned(), + 11 => "BuiltIn".to_owned(), + 13 => "NoPerspective".to_owned(), + 14 => "Flat".to_owned(), + 15 => "Patch".to_owned(), + 16 => "Centroid".to_owned(), + 17 => "Sample".to_owned(), + 18 => "Invariant".to_owned(), + 19 => "Restrict".to_owned(), + 20 => "Aliased".to_owned(), + 21 => "Volatile".to_owned(), + 22 => "Constant".to_owned(), + 23 => "Coherent".to_owned(), + 24 => "NonWritable".to_owned(), + 25 => "NonReadable".to_owned(), + 26 => "Uniform".to_owned(), + 27 => "UniformId".to_owned(), + 28 => "SaturatedConversion".to_owned(), + 29 => "Stream".to_owned(), + 30 => "Location".to_owned(), + 31 => "Component".to_owned(), + 32 => "Index".to_owned(), + 33 => "Binding".to_owned(), + 34 => "DescriptorSet".to_owned(), + 35 => "Offset".to_owned(), + 36 => "XfbBuffer".to_owned(), + 37 => "XfbStride".to_owned(), + 38 => "FuncParamAttr".to_owned(), + 39 => "FPRoundingMode".to_owned(), + 40 => "FPFastMathMode".to_owned(), + 41 => "LinkageAttributes".to_owned(), + 42 => "NoContraction".to_owned(), + 43 => "InputAttachmentIndex".to_owned(), + 44 => "Alignment".to_owned(), + 45 => "MaxByteOffset".to_owned(), + 46 => "AlignmentId".to_owned(), + 47 => "MaxByteOffsetId".to_owned(), + 4469 => "NoSignedWrap".to_owned(), + 4470 => "NoUnsignedWrap".to_owned(), + 4487 => "WeightTextureQCOM".to_owned(), + 4488 => "BlockMatchTextureQCOM".to_owned(), + 4999 => "ExplicitInterpAMD".to_owned(), + 5019 => "NodeSharesPayloadLimitsWithAMDX".to_owned(), + 5020 => "NodeMaxPayloadsAMDX".to_owned(), + 5078 => "TrackFinishWritingAMDX".to_owned(), + 5091 => "PayloadNodeNameAMDX".to_owned(), + 5248 => "OverrideCoverageNV".to_owned(), + 5250 => "PassthroughNV".to_owned(), + 5252 => "ViewportRelativeNV".to_owned(), + 5256 => "SecondaryViewportRelativeNV".to_owned(), + 5271 => "PerPrimitiveNV".to_owned(), + 5271 => "PerPrimitiveEXT".to_owned(), + 5272 => "PerViewNV".to_owned(), + 5273 => "PerTaskNV".to_owned(), + 5285 => "PerVertexKHR".to_owned(), + 5285 => "PerVertexNV".to_owned(), + 5300 => "NonUniform".to_owned(), + 5300 => "NonUniformEXT".to_owned(), + 5355 => "RestrictPointer".to_owned(), + 5355 => "RestrictPointerEXT".to_owned(), + 5356 => "AliasedPointer".to_owned(), + 5356 => "AliasedPointerEXT".to_owned(), + 5386 => "HitObjectShaderRecordBufferNV".to_owned(), + 5398 => "BindlessSamplerNV".to_owned(), + 5399 => "BindlessImageNV".to_owned(), + 5400 => "BoundSamplerNV".to_owned(), + 5401 => "BoundImageNV".to_owned(), + 5599 => "SIMTCallINTEL".to_owned(), + 5602 => "ReferencedIndirectlyINTEL".to_owned(), + 5607 => "ClobberINTEL".to_owned(), + 5608 => "SideEffectsINTEL".to_owned(), + 5624 => "VectorComputeVariableINTEL".to_owned(), + 5625 => "FuncParamIOKindINTEL".to_owned(), + 5626 => "VectorComputeFunctionINTEL".to_owned(), + 5627 => "StackCallINTEL".to_owned(), + 5628 => "GlobalVariableOffsetINTEL".to_owned(), + 5634 => "CounterBuffer".to_owned(), + 5634 => "HlslCounterBufferGOOGLE".to_owned(), + 5635 => "UserSemantic".to_owned(), + 5635 => "HlslSemanticGOOGLE".to_owned(), + 5636 => "UserTypeGOOGLE".to_owned(), + 5822 => "FunctionRoundingModeINTEL".to_owned(), + 5823 => "FunctionDenormModeINTEL".to_owned(), + 5825 => "RegisterINTEL".to_owned(), + 5826 => "MemoryINTEL".to_owned(), + 5827 => "NumbanksINTEL".to_owned(), + 5828 => "BankwidthINTEL".to_owned(), + 5829 => "MaxPrivateCopiesINTEL".to_owned(), + 5830 => "SinglepumpINTEL".to_owned(), + 5831 => "DoublepumpINTEL".to_owned(), + 5832 => "MaxReplicatesINTEL".to_owned(), + 5833 => "SimpleDualPortINTEL".to_owned(), + 5834 => "MergeINTEL".to_owned(), + 5835 => "BankBitsINTEL".to_owned(), + 5836 => "ForcePow2DepthINTEL".to_owned(), + 5883 => "StridesizeINTEL".to_owned(), + 5884 => "WordsizeINTEL".to_owned(), + 5885 => "TrueDualPortINTEL".to_owned(), + 5899 => "BurstCoalesceINTEL".to_owned(), + 5900 => "CacheSizeINTEL".to_owned(), + 5901 => "DontStaticallyCoalesceINTEL".to_owned(), + 5902 => "PrefetchINTEL".to_owned(), + 5905 => "StallEnableINTEL".to_owned(), + 5907 => "FuseLoopsInFunctionINTEL".to_owned(), + 5909 => "MathOpDSPModeINTEL".to_owned(), + 5914 => "AliasScopeINTEL".to_owned(), + 5915 => "NoAliasINTEL".to_owned(), + 5917 => "InitiationIntervalINTEL".to_owned(), + 5918 => "MaxConcurrencyINTEL".to_owned(), + 5919 => "PipelineEnableINTEL".to_owned(), + 5921 => "BufferLocationINTEL".to_owned(), + 5944 => "IOPipeStorageINTEL".to_owned(), + 6080 => "FunctionFloatingPointModeINTEL".to_owned(), + 6085 => "SingleElementVectorINTEL".to_owned(), + 6087 => "VectorComputeCallableFunctionINTEL".to_owned(), + 6140 => "MediaBlockIOINTEL".to_owned(), + 6151 => "StallFreeINTEL".to_owned(), + 6170 => "FPMaxErrorDecorationINTEL".to_owned(), + 6172 => "LatencyControlLabelINTEL".to_owned(), + 6173 => "LatencyControlConstraintINTEL".to_owned(), + 6175 => "ConduitKernelArgumentINTEL".to_owned(), + 6176 => "RegisterMapKernelArgumentINTEL".to_owned(), + 6177 => "MMHostInterfaceAddressWidthINTEL".to_owned(), + 6178 => "MMHostInterfaceDataWidthINTEL".to_owned(), + 6179 => "MMHostInterfaceLatencyINTEL".to_owned(), + 6180 => "MMHostInterfaceReadWriteModeINTEL".to_owned(), + 6181 => "MMHostInterfaceMaxBurstINTEL".to_owned(), + 6182 => "MMHostInterfaceWaitRequestINTEL".to_owned(), + 6183 => "StableKernelArgumentINTEL".to_owned(), + 6188 => "HostAccessINTEL".to_owned(), + 6190 => "InitModeINTEL".to_owned(), + 6191 => "ImplementInRegisterMapINTEL".to_owned(), + 6442 => "CacheControlLoadINTEL".to_owned(), + 6443 => "CacheControlStoreINTEL".to_owned(), + _ => value.to_string(), + } + "BuiltIn" => match value { + 0 => "Position".to_owned(), + 1 => "PointSize".to_owned(), + 3 => "ClipDistance".to_owned(), + 4 => "CullDistance".to_owned(), + 5 => "VertexId".to_owned(), + 6 => "InstanceId".to_owned(), + 7 => "PrimitiveId".to_owned(), + 8 => "InvocationId".to_owned(), + 9 => "Layer".to_owned(), + 10 => "ViewportIndex".to_owned(), + 11 => "TessLevelOuter".to_owned(), + 12 => "TessLevelInner".to_owned(), + 13 => "TessCoord".to_owned(), + 14 => "PatchVertices".to_owned(), + 15 => "FragCoord".to_owned(), + 16 => "PointCoord".to_owned(), + 17 => "FrontFacing".to_owned(), + 18 => "SampleId".to_owned(), + 19 => "SamplePosition".to_owned(), + 20 => "SampleMask".to_owned(), + 22 => "FragDepth".to_owned(), + 23 => "HelperInvocation".to_owned(), + 24 => "NumWorkgroups".to_owned(), + 25 => "WorkgroupSize".to_owned(), + 26 => "WorkgroupId".to_owned(), + 27 => "LocalInvocationId".to_owned(), + 28 => "GlobalInvocationId".to_owned(), + 29 => "LocalInvocationIndex".to_owned(), + 30 => "WorkDim".to_owned(), + 31 => "GlobalSize".to_owned(), + 32 => "EnqueuedWorkgroupSize".to_owned(), + 33 => "GlobalOffset".to_owned(), + 34 => "GlobalLinearId".to_owned(), + 36 => "SubgroupSize".to_owned(), + 37 => "SubgroupMaxSize".to_owned(), + 38 => "NumSubgroups".to_owned(), + 39 => "NumEnqueuedSubgroups".to_owned(), + 40 => "SubgroupId".to_owned(), + 41 => "SubgroupLocalInvocationId".to_owned(), + 42 => "VertexIndex".to_owned(), + 43 => "InstanceIndex".to_owned(), + 4160 => "CoreIDARM".to_owned(), + 4161 => "CoreCountARM".to_owned(), + 4162 => "CoreMaxIDARM".to_owned(), + 4163 => "WarpIDARM".to_owned(), + 4164 => "WarpMaxIDARM".to_owned(), + 4416 => "SubgroupEqMask".to_owned(), + 4416 => "SubgroupEqMaskKHR".to_owned(), + 4417 => "SubgroupGeMask".to_owned(), + 4417 => "SubgroupGeMaskKHR".to_owned(), + 4418 => "SubgroupGtMask".to_owned(), + 4418 => "SubgroupGtMaskKHR".to_owned(), + 4419 => "SubgroupLeMask".to_owned(), + 4419 => "SubgroupLeMaskKHR".to_owned(), + 4420 => "SubgroupLtMask".to_owned(), + 4420 => "SubgroupLtMaskKHR".to_owned(), + 4424 => "BaseVertex".to_owned(), + 4425 => "BaseInstance".to_owned(), + 4426 => "DrawIndex".to_owned(), + 4432 => "PrimitiveShadingRateKHR".to_owned(), + 4438 => "DeviceIndex".to_owned(), + 4440 => "ViewIndex".to_owned(), + 4444 => "ShadingRateKHR".to_owned(), + 4992 => "BaryCoordNoPerspAMD".to_owned(), + 4993 => "BaryCoordNoPerspCentroidAMD".to_owned(), + 4994 => "BaryCoordNoPerspSampleAMD".to_owned(), + 4995 => "BaryCoordSmoothAMD".to_owned(), + 4996 => "BaryCoordSmoothCentroidAMD".to_owned(), + 4997 => "BaryCoordSmoothSampleAMD".to_owned(), + 4998 => "BaryCoordPullModelAMD".to_owned(), + 5014 => "FragStencilRefEXT".to_owned(), + 5021 => "CoalescedInputCountAMDX".to_owned(), + 5073 => "ShaderIndexAMDX".to_owned(), + 5253 => "ViewportMaskNV".to_owned(), + 5257 => "SecondaryPositionNV".to_owned(), + 5258 => "SecondaryViewportMaskNV".to_owned(), + 5261 => "PositionPerViewNV".to_owned(), + 5262 => "ViewportMaskPerViewNV".to_owned(), + 5264 => "FullyCoveredEXT".to_owned(), + 5274 => "TaskCountNV".to_owned(), + 5275 => "PrimitiveCountNV".to_owned(), + 5276 => "PrimitiveIndicesNV".to_owned(), + 5277 => "ClipDistancePerViewNV".to_owned(), + 5278 => "CullDistancePerViewNV".to_owned(), + 5279 => "LayerPerViewNV".to_owned(), + 5280 => "MeshViewCountNV".to_owned(), + 5281 => "MeshViewIndicesNV".to_owned(), + 5286 => "BaryCoordKHR".to_owned(), + 5286 => "BaryCoordNV".to_owned(), + 5287 => "BaryCoordNoPerspKHR".to_owned(), + 5287 => "BaryCoordNoPerspNV".to_owned(), + 5292 => "FragSizeEXT".to_owned(), + 5292 => "FragmentSizeNV".to_owned(), + 5293 => "FragInvocationCountEXT".to_owned(), + 5293 => "InvocationsPerPixelNV".to_owned(), + 5294 => "PrimitivePointIndicesEXT".to_owned(), + 5295 => "PrimitiveLineIndicesEXT".to_owned(), + 5296 => "PrimitiveTriangleIndicesEXT".to_owned(), + 5299 => "CullPrimitiveEXT".to_owned(), + 5319 => "LaunchIdNV".to_owned(), + 5319 => "LaunchIdKHR".to_owned(), + 5320 => "LaunchSizeNV".to_owned(), + 5320 => "LaunchSizeKHR".to_owned(), + 5321 => "WorldRayOriginNV".to_owned(), + 5321 => "WorldRayOriginKHR".to_owned(), + 5322 => "WorldRayDirectionNV".to_owned(), + 5322 => "WorldRayDirectionKHR".to_owned(), + 5323 => "ObjectRayOriginNV".to_owned(), + 5323 => "ObjectRayOriginKHR".to_owned(), + 5324 => "ObjectRayDirectionNV".to_owned(), + 5324 => "ObjectRayDirectionKHR".to_owned(), + 5325 => "RayTminNV".to_owned(), + 5325 => "RayTminKHR".to_owned(), + 5326 => "RayTmaxNV".to_owned(), + 5326 => "RayTmaxKHR".to_owned(), + 5327 => "InstanceCustomIndexNV".to_owned(), + 5327 => "InstanceCustomIndexKHR".to_owned(), + 5330 => "ObjectToWorldNV".to_owned(), + 5330 => "ObjectToWorldKHR".to_owned(), + 5331 => "WorldToObjectNV".to_owned(), + 5331 => "WorldToObjectKHR".to_owned(), + 5332 => "HitTNV".to_owned(), + 5333 => "HitKindNV".to_owned(), + 5333 => "HitKindKHR".to_owned(), + 5334 => "CurrentRayTimeNV".to_owned(), + 5335 => "HitTriangleVertexPositionsKHR".to_owned(), + 5337 => "HitMicroTriangleVertexPositionsNV".to_owned(), + 5344 => "HitMicroTriangleVertexBarycentricsNV".to_owned(), + 5351 => "IncomingRayFlagsNV".to_owned(), + 5351 => "IncomingRayFlagsKHR".to_owned(), + 5352 => "RayGeometryIndexKHR".to_owned(), + 5374 => "WarpsPerSMNV".to_owned(), + 5375 => "SMCountNV".to_owned(), + 5376 => "WarpIDNV".to_owned(), + 5377 => "SMIDNV".to_owned(), + 5405 => "HitKindFrontFacingMicroTriangleNV".to_owned(), + 5406 => "HitKindBackFacingMicroTriangleNV".to_owned(), + 6021 => "CullMaskKHR".to_owned(), + _ => value.to_string(), + } + "Scope" => match value { + 0 => "CrossDevice".to_owned(), + 1 => "Device".to_owned(), + 2 => "Workgroup".to_owned(), + 3 => "Subgroup".to_owned(), + 4 => "Invocation".to_owned(), + 5 => "QueueFamily".to_owned(), + 5 => "QueueFamilyKHR".to_owned(), + 6 => "ShaderCallKHR".to_owned(), + _ => value.to_string(), + } + "GroupOperation" => match value { + 0 => "Reduce".to_owned(), + 1 => "InclusiveScan".to_owned(), + 2 => "ExclusiveScan".to_owned(), + 3 => "ClusteredReduce".to_owned(), + 6 => "PartitionedReduceNV".to_owned(), + 7 => "PartitionedInclusiveScanNV".to_owned(), + 8 => "PartitionedExclusiveScanNV".to_owned(), + _ => value.to_string(), + } + "KernelEnqueueFlags" => match value { + 0 => "NoWait".to_owned(), + 1 => "WaitKernel".to_owned(), + 2 => "WaitWorkGroup".to_owned(), + _ => value.to_string(), + } + "Capability" => match value { + 0 => "Matrix".to_owned(), + 1 => "Shader".to_owned(), + 2 => "Geometry".to_owned(), + 3 => "Tessellation".to_owned(), + 4 => "Addresses".to_owned(), + 5 => "Linkage".to_owned(), + 6 => "Kernel".to_owned(), + 7 => "Vector16".to_owned(), + 8 => "Float16Buffer".to_owned(), + 9 => "Float16".to_owned(), + 10 => "Float64".to_owned(), + 11 => "Int64".to_owned(), + 12 => "Int64Atomics".to_owned(), + 13 => "ImageBasic".to_owned(), + 14 => "ImageReadWrite".to_owned(), + 15 => "ImageMipmap".to_owned(), + 17 => "Pipes".to_owned(), + 18 => "Groups".to_owned(), + 19 => "DeviceEnqueue".to_owned(), + 20 => "LiteralSampler".to_owned(), + 21 => "AtomicStorage".to_owned(), + 22 => "Int16".to_owned(), + 23 => "TessellationPointSize".to_owned(), + 24 => "GeometryPointSize".to_owned(), + 25 => "ImageGatherExtended".to_owned(), + 27 => "StorageImageMultisample".to_owned(), + 28 => "UniformBufferArrayDynamicIndexing".to_owned(), + 29 => "SampledImageArrayDynamicIndexing".to_owned(), + 30 => "StorageBufferArrayDynamicIndexing".to_owned(), + 31 => "StorageImageArrayDynamicIndexing".to_owned(), + 32 => "ClipDistance".to_owned(), + 33 => "CullDistance".to_owned(), + 34 => "ImageCubeArray".to_owned(), + 35 => "SampleRateShading".to_owned(), + 36 => "ImageRect".to_owned(), + 37 => "SampledRect".to_owned(), + 38 => "GenericPointer".to_owned(), + 39 => "Int8".to_owned(), + 40 => "InputAttachment".to_owned(), + 41 => "SparseResidency".to_owned(), + 42 => "MinLod".to_owned(), + 43 => "Sampled1D".to_owned(), + 44 => "Image1D".to_owned(), + 45 => "SampledCubeArray".to_owned(), + 46 => "SampledBuffer".to_owned(), + 47 => "ImageBuffer".to_owned(), + 48 => "ImageMSArray".to_owned(), + 49 => "StorageImageExtendedFormats".to_owned(), + 50 => "ImageQuery".to_owned(), + 51 => "DerivativeControl".to_owned(), + 52 => "InterpolationFunction".to_owned(), + 53 => "TransformFeedback".to_owned(), + 54 => "GeometryStreams".to_owned(), + 55 => "StorageImageReadWithoutFormat".to_owned(), + 56 => "StorageImageWriteWithoutFormat".to_owned(), + 57 => "MultiViewport".to_owned(), + 58 => "SubgroupDispatch".to_owned(), + 59 => "NamedBarrier".to_owned(), + 60 => "PipeStorage".to_owned(), + 61 => "GroupNonUniform".to_owned(), + 62 => "GroupNonUniformVote".to_owned(), + 63 => "GroupNonUniformArithmetic".to_owned(), + 64 => "GroupNonUniformBallot".to_owned(), + 65 => "GroupNonUniformShuffle".to_owned(), + 66 => "GroupNonUniformShuffleRelative".to_owned(), + 67 => "GroupNonUniformClustered".to_owned(), + 68 => "GroupNonUniformQuad".to_owned(), + 69 => "ShaderLayer".to_owned(), + 70 => "ShaderViewportIndex".to_owned(), + 71 => "UniformDecoration".to_owned(), + 4165 => "CoreBuiltinsARM".to_owned(), + 4166 => "TileImageColorReadAccessEXT".to_owned(), + 4167 => "TileImageDepthReadAccessEXT".to_owned(), + 4168 => "TileImageStencilReadAccessEXT".to_owned(), + 4422 => "FragmentShadingRateKHR".to_owned(), + 4423 => "SubgroupBallotKHR".to_owned(), + 4427 => "DrawParameters".to_owned(), + 4428 => "WorkgroupMemoryExplicitLayoutKHR".to_owned(), + 4429 => "WorkgroupMemoryExplicitLayout8BitAccessKHR".to_owned(), + 4430 => "WorkgroupMemoryExplicitLayout16BitAccessKHR".to_owned(), + 4431 => "SubgroupVoteKHR".to_owned(), + 4433 => "StorageBuffer16BitAccess".to_owned(), + 4433 => "StorageUniformBufferBlock16".to_owned(), + 4434 => "UniformAndStorageBuffer16BitAccess".to_owned(), + 4434 => "StorageUniform16".to_owned(), + 4435 => "StoragePushConstant16".to_owned(), + 4436 => "StorageInputOutput16".to_owned(), + 4437 => "DeviceGroup".to_owned(), + 4439 => "MultiView".to_owned(), + 4441 => "VariablePointersStorageBuffer".to_owned(), + 4442 => "VariablePointers".to_owned(), + 4445 => "AtomicStorageOps".to_owned(), + 4447 => "SampleMaskPostDepthCoverage".to_owned(), + 4448 => "StorageBuffer8BitAccess".to_owned(), + 4449 => "UniformAndStorageBuffer8BitAccess".to_owned(), + 4450 => "StoragePushConstant8".to_owned(), + 4464 => "DenormPreserve".to_owned(), + 4465 => "DenormFlushToZero".to_owned(), + 4466 => "SignedZeroInfNanPreserve".to_owned(), + 4467 => "RoundingModeRTE".to_owned(), + 4468 => "RoundingModeRTZ".to_owned(), + 4471 => "RayQueryProvisionalKHR".to_owned(), + 4472 => "RayQueryKHR".to_owned(), + 4478 => "RayTraversalPrimitiveCullingKHR".to_owned(), + 4479 => "RayTracingKHR".to_owned(), + 4484 => "TextureSampleWeightedQCOM".to_owned(), + 4485 => "TextureBoxFilterQCOM".to_owned(), + 4486 => "TextureBlockMatchQCOM".to_owned(), + 5008 => "Float16ImageAMD".to_owned(), + 5009 => "ImageGatherBiasLodAMD".to_owned(), + 5010 => "FragmentMaskAMD".to_owned(), + 5013 => "StencilExportEXT".to_owned(), + 5015 => "ImageReadWriteLodAMD".to_owned(), + 5016 => "Int64ImageEXT".to_owned(), + 5055 => "ShaderClockKHR".to_owned(), + 5067 => "ShaderEnqueueAMDX".to_owned(), + 5249 => "SampleMaskOverrideCoverageNV".to_owned(), + 5251 => "GeometryShaderPassthroughNV".to_owned(), + 5254 => "ShaderViewportIndexLayerEXT".to_owned(), + 5254 => "ShaderViewportIndexLayerNV".to_owned(), + 5255 => "ShaderViewportMaskNV".to_owned(), + 5259 => "ShaderStereoViewNV".to_owned(), + 5260 => "PerViewAttributesNV".to_owned(), + 5265 => "FragmentFullyCoveredEXT".to_owned(), + 5266 => "MeshShadingNV".to_owned(), + 5282 => "ImageFootprintNV".to_owned(), + 5283 => "MeshShadingEXT".to_owned(), + 5284 => "FragmentBarycentricKHR".to_owned(), + 5284 => "FragmentBarycentricNV".to_owned(), + 5288 => "ComputeDerivativeGroupQuadsNV".to_owned(), + 5291 => "FragmentDensityEXT".to_owned(), + 5291 => "ShadingRateNV".to_owned(), + 5297 => "GroupNonUniformPartitionedNV".to_owned(), + 5301 => "ShaderNonUniform".to_owned(), + 5301 => "ShaderNonUniformEXT".to_owned(), + 5302 => "RuntimeDescriptorArray".to_owned(), + 5302 => "RuntimeDescriptorArrayEXT".to_owned(), + 5303 => "InputAttachmentArrayDynamicIndexing".to_owned(), + 5303 => "InputAttachmentArrayDynamicIndexingEXT".to_owned(), + 5304 => "UniformTexelBufferArrayDynamicIndexing".to_owned(), + 5304 => "UniformTexelBufferArrayDynamicIndexingEXT".to_owned(), + 5305 => "StorageTexelBufferArrayDynamicIndexing".to_owned(), + 5305 => "StorageTexelBufferArrayDynamicIndexingEXT".to_owned(), + 5306 => "UniformBufferArrayNonUniformIndexing".to_owned(), + 5306 => "UniformBufferArrayNonUniformIndexingEXT".to_owned(), + 5307 => "SampledImageArrayNonUniformIndexing".to_owned(), + 5307 => "SampledImageArrayNonUniformIndexingEXT".to_owned(), + 5308 => "StorageBufferArrayNonUniformIndexing".to_owned(), + 5308 => "StorageBufferArrayNonUniformIndexingEXT".to_owned(), + 5309 => "StorageImageArrayNonUniformIndexing".to_owned(), + 5309 => "StorageImageArrayNonUniformIndexingEXT".to_owned(), + 5310 => "InputAttachmentArrayNonUniformIndexing".to_owned(), + 5310 => "InputAttachmentArrayNonUniformIndexingEXT".to_owned(), + 5311 => "UniformTexelBufferArrayNonUniformIndexing".to_owned(), + 5311 => "UniformTexelBufferArrayNonUniformIndexingEXT".to_owned(), + 5312 => "StorageTexelBufferArrayNonUniformIndexing".to_owned(), + 5312 => "StorageTexelBufferArrayNonUniformIndexingEXT".to_owned(), + 5336 => "RayTracingPositionFetchKHR".to_owned(), + 5340 => "RayTracingNV".to_owned(), + 5341 => "RayTracingMotionBlurNV".to_owned(), + 5345 => "VulkanMemoryModel".to_owned(), + 5345 => "VulkanMemoryModelKHR".to_owned(), + 5346 => "VulkanMemoryModelDeviceScope".to_owned(), + 5346 => "VulkanMemoryModelDeviceScopeKHR".to_owned(), + 5347 => "PhysicalStorageBufferAddresses".to_owned(), + 5347 => "PhysicalStorageBufferAddressesEXT".to_owned(), + 5350 => "ComputeDerivativeGroupLinearNV".to_owned(), + 5353 => "RayTracingProvisionalKHR".to_owned(), + 5357 => "CooperativeMatrixNV".to_owned(), + 5363 => "FragmentShaderSampleInterlockEXT".to_owned(), + 5372 => "FragmentShaderShadingRateInterlockEXT".to_owned(), + 5373 => "ShaderSMBuiltinsNV".to_owned(), + 5378 => "FragmentShaderPixelInterlockEXT".to_owned(), + 5379 => "DemoteToHelperInvocation".to_owned(), + 5379 => "DemoteToHelperInvocationEXT".to_owned(), + 5380 => "DisplacementMicromapNV".to_owned(), + 5381 => "RayTracingOpacityMicromapEXT".to_owned(), + 5383 => "ShaderInvocationReorderNV".to_owned(), + 5390 => "BindlessTextureNV".to_owned(), + 5391 => "RayQueryPositionFetchKHR".to_owned(), + 5409 => "RayTracingDisplacementMicromapNV".to_owned(), + 5568 => "SubgroupShuffleINTEL".to_owned(), + 5569 => "SubgroupBufferBlockIOINTEL".to_owned(), + 5570 => "SubgroupImageBlockIOINTEL".to_owned(), + 5579 => "SubgroupImageMediaBlockIOINTEL".to_owned(), + 5582 => "RoundToInfinityINTEL".to_owned(), + 5583 => "FloatingPointModeINTEL".to_owned(), + 5584 => "IntegerFunctions2INTEL".to_owned(), + 5603 => "FunctionPointersINTEL".to_owned(), + 5604 => "IndirectReferencesINTEL".to_owned(), + 5606 => "AsmINTEL".to_owned(), + 5612 => "AtomicFloat32MinMaxEXT".to_owned(), + 5613 => "AtomicFloat64MinMaxEXT".to_owned(), + 5616 => "AtomicFloat16MinMaxEXT".to_owned(), + 5617 => "VectorComputeINTEL".to_owned(), + 5619 => "VectorAnyINTEL".to_owned(), + 5629 => "ExpectAssumeKHR".to_owned(), + 5696 => "SubgroupAvcMotionEstimationINTEL".to_owned(), + 5697 => "SubgroupAvcMotionEstimationIntraINTEL".to_owned(), + 5698 => "SubgroupAvcMotionEstimationChromaINTEL".to_owned(), + 5817 => "VariableLengthArrayINTEL".to_owned(), + 5821 => "FunctionFloatControlINTEL".to_owned(), + 5824 => "FPGAMemoryAttributesINTEL".to_owned(), + 5837 => "FPFastMathModeINTEL".to_owned(), + 5844 => "ArbitraryPrecisionIntegersINTEL".to_owned(), + 5845 => "ArbitraryPrecisionFloatingPointINTEL".to_owned(), + 5886 => "UnstructuredLoopControlsINTEL".to_owned(), + 5888 => "FPGALoopControlsINTEL".to_owned(), + 5892 => "KernelAttributesINTEL".to_owned(), + 5897 => "FPGAKernelAttributesINTEL".to_owned(), + 5898 => "FPGAMemoryAccessesINTEL".to_owned(), + 5904 => "FPGAClusterAttributesINTEL".to_owned(), + 5906 => "LoopFuseINTEL".to_owned(), + 5908 => "FPGADSPControlINTEL".to_owned(), + 5910 => "MemoryAccessAliasingINTEL".to_owned(), + 5916 => "FPGAInvocationPipeliningAttributesINTEL".to_owned(), + 5920 => "FPGABufferLocationINTEL".to_owned(), + 5922 => "ArbitraryPrecisionFixedPointINTEL".to_owned(), + 5935 => "USMStorageClassesINTEL".to_owned(), + 5939 => "RuntimeAlignedAttributeINTEL".to_owned(), + 5943 => "IOPipesINTEL".to_owned(), + 5945 => "BlockingPipesINTEL".to_owned(), + 5948 => "FPGARegINTEL".to_owned(), + 6016 => "DotProductInputAll".to_owned(), + 6016 => "DotProductInputAllKHR".to_owned(), + 6017 => "DotProductInput4x8Bit".to_owned(), + 6017 => "DotProductInput4x8BitKHR".to_owned(), + 6018 => "DotProductInput4x8BitPacked".to_owned(), + 6018 => "DotProductInput4x8BitPackedKHR".to_owned(), + 6019 => "DotProduct".to_owned(), + 6019 => "DotProductKHR".to_owned(), + 6020 => "RayCullMaskKHR".to_owned(), + 6022 => "CooperativeMatrixKHR".to_owned(), + 6025 => "BitInstructions".to_owned(), + 6026 => "GroupNonUniformRotateKHR".to_owned(), + 6033 => "AtomicFloat32AddEXT".to_owned(), + 6034 => "AtomicFloat64AddEXT".to_owned(), + 6089 => "LongCompositesINTEL".to_owned(), + 6094 => "OptNoneINTEL".to_owned(), + 6095 => "AtomicFloat16AddEXT".to_owned(), + 6114 => "DebugInfoModuleINTEL".to_owned(), + 6115 => "BFloat16ConversionINTEL".to_owned(), + 6141 => "SplitBarrierINTEL".to_owned(), + 6150 => "FPGAClusterAttributesV2INTEL".to_owned(), + 6161 => "FPGAKernelAttributesv2INTEL".to_owned(), + 6169 => "FPMaxErrorINTEL".to_owned(), + 6171 => "FPGALatencyControlINTEL".to_owned(), + 6174 => "FPGAArgumentInterfacesINTEL".to_owned(), + 6187 => "GlobalVariableHostAccessINTEL".to_owned(), + 6189 => "GlobalVariableFPGADecorationsINTEL".to_owned(), + 6400 => "GroupUniformArithmeticKHR".to_owned(), + 6441 => "CacheControlsINTEL".to_owned(), + _ => value.to_string(), + } + "RayQueryIntersection" => match value { + 0 => "RayQueryCandidateIntersectionKHR".to_owned(), + 1 => "RayQueryCommittedIntersectionKHR".to_owned(), + _ => value.to_string(), + } + "RayQueryCommittedIntersectionType" => match value { + 0 => "RayQueryCommittedIntersectionNoneKHR".to_owned(), + 1 => "RayQueryCommittedIntersectionTriangleKHR".to_owned(), + 2 => "RayQueryCommittedIntersectionGeneratedKHR".to_owned(), + _ => value.to_string(), + } + "RayQueryCandidateIntersectionType" => match value { + 0 => "RayQueryCandidateIntersectionTriangleKHR".to_owned(), + 1 => "RayQueryCandidateIntersectionAABBKHR".to_owned(), + _ => value.to_string(), + } + "PackedVectorFormat" => match value { + 0 => "PackedVectorFormat4x8Bit".to_owned(), + 0 => "PackedVectorFormat4x8BitKHR".to_owned(), + _ => value.to_string(), + } + "CooperativeMatrixLayout" => match value { + 0 => "RowMajorKHR".to_owned(), + 1 => "ColumnMajorKHR".to_owned(), + _ => value.to_string(), + } + "CooperativeMatrixUse" => match value { + 0 => "MatrixAKHR".to_owned(), + 1 => "MatrixBKHR".to_owned(), + 2 => "MatrixAccumulatorKHR".to_owned(), + _ => value.to_string(), + } + "InitializationModeQualifier" => match value { + 0 => "InitOnDeviceReprogramINTEL".to_owned(), + 1 => "InitOnDeviceResetINTEL".to_owned(), + _ => value.to_string(), + } + "LoadCacheControl" => match value { + 0 => "UncachedINTEL".to_owned(), + 1 => "CachedINTEL".to_owned(), + 2 => "StreamingINTEL".to_owned(), + 3 => "InvalidateAfterReadINTEL".to_owned(), + 4 => "ConstCachedINTEL".to_owned(), + _ => value.to_string(), + } + "StoreCacheControl" => match value { + 0 => "UncachedINTEL".to_owned(), + 1 => "WriteThroughINTEL".to_owned(), + 2 => "WriteBackINTEL".to_owned(), + 3 => "StreamingINTEL".to_owned(), + _ => value.to_string(), + } + "ImageOperands" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "FPFastMathMode" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "SelectionControl" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "LoopControl" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "FunctionControl" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "MemorySemantics" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "MemoryAccess" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "KernelProfilingInfo" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "RayFlags" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "FragmentShadingRate" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + "CooperativeMatrixOperands" => match value { + 0 => "None".to_owned(), + _ => value.to_string(), + } + _ => bail!("unknown enum: {}", ety), + }; + Ok(out) +} diff --git a/spirq-spvasm/src/asm/generated/mod.rs b/spirq-spvasm/src/generated/mod.rs similarity index 67% rename from spirq-spvasm/src/asm/generated/mod.rs rename to spirq-spvasm/src/generated/mod.rs index 4652eeb..5ac2ff9 100644 --- a/spirq-spvasm/src/asm/generated/mod.rs +++ b/spirq-spvasm/src/generated/mod.rs @@ -1,11 +1,17 @@ +mod enum_from_str; +mod enum_to_str; mod op_from_str; +mod op_to_str; mod op_has_result_id; mod op_has_result_type_id; mod operand_enum_type; -mod enum_from_str; +mod print_operand; +pub use enum_from_str::enum_from_str; +pub use enum_to_str::enum_to_str; pub use op_from_str::op_from_str; +pub use op_to_str::op_to_str; pub use op_has_result_id::op_has_result_id; pub use op_has_result_type_id::op_has_result_type_id; pub use operand_enum_type::operand_enum_type; -pub use enum_from_str::enum_from_str; +pub use print_operand::print_operand; diff --git a/spirq-spvasm/src/asm/generated/op_from_str.rs b/spirq-spvasm/src/generated/op_from_str.rs similarity index 99% rename from spirq-spvasm/src/asm/generated/op_from_str.rs rename to spirq-spvasm/src/generated/op_from_str.rs index dcd245a..3fcbb37 100644 --- a/spirq-spvasm/src/asm/generated/op_from_str.rs +++ b/spirq-spvasm/src/generated/op_from_str.rs @@ -1,5 +1,4 @@ use anyhow::{bail, Result}; -use num_traits::FromPrimitive; pub fn op_from_str(opname: &str) -> Result { let out: u32 = match opname { diff --git a/spirq-spvasm/src/asm/generated/op_has_result_id.rs b/spirq-spvasm/src/generated/op_has_result_id.rs similarity index 100% rename from spirq-spvasm/src/asm/generated/op_has_result_id.rs rename to spirq-spvasm/src/generated/op_has_result_id.rs diff --git a/spirq-spvasm/src/asm/generated/op_has_result_type_id.rs b/spirq-spvasm/src/generated/op_has_result_type_id.rs similarity index 100% rename from spirq-spvasm/src/asm/generated/op_has_result_type_id.rs rename to spirq-spvasm/src/generated/op_has_result_type_id.rs diff --git a/spirq-spvasm/src/generated/op_to_str.rs b/spirq-spvasm/src/generated/op_to_str.rs new file mode 100644 index 0000000..1465f77 --- /dev/null +++ b/spirq-spvasm/src/generated/op_to_str.rs @@ -0,0 +1,733 @@ +#![allow(unreachable_patterns)] +use anyhow::{bail, Result}; + +pub fn op_to_str(opcode: u32) -> Result<&'static str> { + let out: &'static str = match opcode { + 0 => "OpNop", + 1 => "OpUndef", + 2 => "OpSourceContinued", + 3 => "OpSource", + 4 => "OpSourceExtension", + 5 => "OpName", + 6 => "OpMemberName", + 7 => "OpString", + 8 => "OpLine", + 10 => "OpExtension", + 11 => "OpExtInstImport", + 12 => "OpExtInst", + 14 => "OpMemoryModel", + 15 => "OpEntryPoint", + 16 => "OpExecutionMode", + 17 => "OpCapability", + 19 => "OpTypeVoid", + 20 => "OpTypeBool", + 21 => "OpTypeInt", + 22 => "OpTypeFloat", + 23 => "OpTypeVector", + 24 => "OpTypeMatrix", + 25 => "OpTypeImage", + 26 => "OpTypeSampler", + 27 => "OpTypeSampledImage", + 28 => "OpTypeArray", + 29 => "OpTypeRuntimeArray", + 30 => "OpTypeStruct", + 31 => "OpTypeOpaque", + 32 => "OpTypePointer", + 33 => "OpTypeFunction", + 34 => "OpTypeEvent", + 35 => "OpTypeDeviceEvent", + 36 => "OpTypeReserveId", + 37 => "OpTypeQueue", + 38 => "OpTypePipe", + 39 => "OpTypeForwardPointer", + 41 => "OpConstantTrue", + 42 => "OpConstantFalse", + 43 => "OpConstant", + 44 => "OpConstantComposite", + 45 => "OpConstantSampler", + 46 => "OpConstantNull", + 48 => "OpSpecConstantTrue", + 49 => "OpSpecConstantFalse", + 50 => "OpSpecConstant", + 51 => "OpSpecConstantComposite", + 52 => "OpSpecConstantOp", + 54 => "OpFunction", + 55 => "OpFunctionParameter", + 56 => "OpFunctionEnd", + 57 => "OpFunctionCall", + 59 => "OpVariable", + 60 => "OpImageTexelPointer", + 61 => "OpLoad", + 62 => "OpStore", + 63 => "OpCopyMemory", + 64 => "OpCopyMemorySized", + 65 => "OpAccessChain", + 66 => "OpInBoundsAccessChain", + 67 => "OpPtrAccessChain", + 68 => "OpArrayLength", + 69 => "OpGenericPtrMemSemantics", + 70 => "OpInBoundsPtrAccessChain", + 71 => "OpDecorate", + 72 => "OpMemberDecorate", + 73 => "OpDecorationGroup", + 74 => "OpGroupDecorate", + 75 => "OpGroupMemberDecorate", + 77 => "OpVectorExtractDynamic", + 78 => "OpVectorInsertDynamic", + 79 => "OpVectorShuffle", + 80 => "OpCompositeConstruct", + 81 => "OpCompositeExtract", + 82 => "OpCompositeInsert", + 83 => "OpCopyObject", + 84 => "OpTranspose", + 86 => "OpSampledImage", + 87 => "OpImageSampleImplicitLod", + 88 => "OpImageSampleExplicitLod", + 89 => "OpImageSampleDrefImplicitLod", + 90 => "OpImageSampleDrefExplicitLod", + 91 => "OpImageSampleProjImplicitLod", + 92 => "OpImageSampleProjExplicitLod", + 93 => "OpImageSampleProjDrefImplicitLod", + 94 => "OpImageSampleProjDrefExplicitLod", + 95 => "OpImageFetch", + 96 => "OpImageGather", + 97 => "OpImageDrefGather", + 98 => "OpImageRead", + 99 => "OpImageWrite", + 100 => "OpImage", + 101 => "OpImageQueryFormat", + 102 => "OpImageQueryOrder", + 103 => "OpImageQuerySizeLod", + 104 => "OpImageQuerySize", + 105 => "OpImageQueryLod", + 106 => "OpImageQueryLevels", + 107 => "OpImageQuerySamples", + 109 => "OpConvertFToU", + 110 => "OpConvertFToS", + 111 => "OpConvertSToF", + 112 => "OpConvertUToF", + 113 => "OpUConvert", + 114 => "OpSConvert", + 115 => "OpFConvert", + 116 => "OpQuantizeToF16", + 117 => "OpConvertPtrToU", + 118 => "OpSatConvertSToU", + 119 => "OpSatConvertUToS", + 120 => "OpConvertUToPtr", + 121 => "OpPtrCastToGeneric", + 122 => "OpGenericCastToPtr", + 123 => "OpGenericCastToPtrExplicit", + 124 => "OpBitcast", + 126 => "OpSNegate", + 127 => "OpFNegate", + 128 => "OpIAdd", + 129 => "OpFAdd", + 130 => "OpISub", + 131 => "OpFSub", + 132 => "OpIMul", + 133 => "OpFMul", + 134 => "OpUDiv", + 135 => "OpSDiv", + 136 => "OpFDiv", + 137 => "OpUMod", + 138 => "OpSRem", + 139 => "OpSMod", + 140 => "OpFRem", + 141 => "OpFMod", + 142 => "OpVectorTimesScalar", + 143 => "OpMatrixTimesScalar", + 144 => "OpVectorTimesMatrix", + 145 => "OpMatrixTimesVector", + 146 => "OpMatrixTimesMatrix", + 147 => "OpOuterProduct", + 148 => "OpDot", + 149 => "OpIAddCarry", + 150 => "OpISubBorrow", + 151 => "OpUMulExtended", + 152 => "OpSMulExtended", + 154 => "OpAny", + 155 => "OpAll", + 156 => "OpIsNan", + 157 => "OpIsInf", + 158 => "OpIsFinite", + 159 => "OpIsNormal", + 160 => "OpSignBitSet", + 161 => "OpLessOrGreater", + 162 => "OpOrdered", + 163 => "OpUnordered", + 164 => "OpLogicalEqual", + 165 => "OpLogicalNotEqual", + 166 => "OpLogicalOr", + 167 => "OpLogicalAnd", + 168 => "OpLogicalNot", + 169 => "OpSelect", + 170 => "OpIEqual", + 171 => "OpINotEqual", + 172 => "OpUGreaterThan", + 173 => "OpSGreaterThan", + 174 => "OpUGreaterThanEqual", + 175 => "OpSGreaterThanEqual", + 176 => "OpULessThan", + 177 => "OpSLessThan", + 178 => "OpULessThanEqual", + 179 => "OpSLessThanEqual", + 180 => "OpFOrdEqual", + 181 => "OpFUnordEqual", + 182 => "OpFOrdNotEqual", + 183 => "OpFUnordNotEqual", + 184 => "OpFOrdLessThan", + 185 => "OpFUnordLessThan", + 186 => "OpFOrdGreaterThan", + 187 => "OpFUnordGreaterThan", + 188 => "OpFOrdLessThanEqual", + 189 => "OpFUnordLessThanEqual", + 190 => "OpFOrdGreaterThanEqual", + 191 => "OpFUnordGreaterThanEqual", + 194 => "OpShiftRightLogical", + 195 => "OpShiftRightArithmetic", + 196 => "OpShiftLeftLogical", + 197 => "OpBitwiseOr", + 198 => "OpBitwiseXor", + 199 => "OpBitwiseAnd", + 200 => "OpNot", + 201 => "OpBitFieldInsert", + 202 => "OpBitFieldSExtract", + 203 => "OpBitFieldUExtract", + 204 => "OpBitReverse", + 205 => "OpBitCount", + 207 => "OpDPdx", + 208 => "OpDPdy", + 209 => "OpFwidth", + 210 => "OpDPdxFine", + 211 => "OpDPdyFine", + 212 => "OpFwidthFine", + 213 => "OpDPdxCoarse", + 214 => "OpDPdyCoarse", + 215 => "OpFwidthCoarse", + 218 => "OpEmitVertex", + 219 => "OpEndPrimitive", + 220 => "OpEmitStreamVertex", + 221 => "OpEndStreamPrimitive", + 224 => "OpControlBarrier", + 225 => "OpMemoryBarrier", + 227 => "OpAtomicLoad", + 228 => "OpAtomicStore", + 229 => "OpAtomicExchange", + 230 => "OpAtomicCompareExchange", + 231 => "OpAtomicCompareExchangeWeak", + 232 => "OpAtomicIIncrement", + 233 => "OpAtomicIDecrement", + 234 => "OpAtomicIAdd", + 235 => "OpAtomicISub", + 236 => "OpAtomicSMin", + 237 => "OpAtomicUMin", + 238 => "OpAtomicSMax", + 239 => "OpAtomicUMax", + 240 => "OpAtomicAnd", + 241 => "OpAtomicOr", + 242 => "OpAtomicXor", + 245 => "OpPhi", + 246 => "OpLoopMerge", + 247 => "OpSelectionMerge", + 248 => "OpLabel", + 249 => "OpBranch", + 250 => "OpBranchConditional", + 251 => "OpSwitch", + 252 => "OpKill", + 253 => "OpReturn", + 254 => "OpReturnValue", + 255 => "OpUnreachable", + 256 => "OpLifetimeStart", + 257 => "OpLifetimeStop", + 259 => "OpGroupAsyncCopy", + 260 => "OpGroupWaitEvents", + 261 => "OpGroupAll", + 262 => "OpGroupAny", + 263 => "OpGroupBroadcast", + 264 => "OpGroupIAdd", + 265 => "OpGroupFAdd", + 266 => "OpGroupFMin", + 267 => "OpGroupUMin", + 268 => "OpGroupSMin", + 269 => "OpGroupFMax", + 270 => "OpGroupUMax", + 271 => "OpGroupSMax", + 274 => "OpReadPipe", + 275 => "OpWritePipe", + 276 => "OpReservedReadPipe", + 277 => "OpReservedWritePipe", + 278 => "OpReserveReadPipePackets", + 279 => "OpReserveWritePipePackets", + 280 => "OpCommitReadPipe", + 281 => "OpCommitWritePipe", + 282 => "OpIsValidReserveId", + 283 => "OpGetNumPipePackets", + 284 => "OpGetMaxPipePackets", + 285 => "OpGroupReserveReadPipePackets", + 286 => "OpGroupReserveWritePipePackets", + 287 => "OpGroupCommitReadPipe", + 288 => "OpGroupCommitWritePipe", + 291 => "OpEnqueueMarker", + 292 => "OpEnqueueKernel", + 293 => "OpGetKernelNDrangeSubGroupCount", + 294 => "OpGetKernelNDrangeMaxSubGroupSize", + 295 => "OpGetKernelWorkGroupSize", + 296 => "OpGetKernelPreferredWorkGroupSizeMultiple", + 297 => "OpRetainEvent", + 298 => "OpReleaseEvent", + 299 => "OpCreateUserEvent", + 300 => "OpIsValidEvent", + 301 => "OpSetUserEventStatus", + 302 => "OpCaptureEventProfilingInfo", + 303 => "OpGetDefaultQueue", + 304 => "OpBuildNDRange", + 305 => "OpImageSparseSampleImplicitLod", + 306 => "OpImageSparseSampleExplicitLod", + 307 => "OpImageSparseSampleDrefImplicitLod", + 308 => "OpImageSparseSampleDrefExplicitLod", + 309 => "OpImageSparseSampleProjImplicitLod", + 310 => "OpImageSparseSampleProjExplicitLod", + 311 => "OpImageSparseSampleProjDrefImplicitLod", + 312 => "OpImageSparseSampleProjDrefExplicitLod", + 313 => "OpImageSparseFetch", + 314 => "OpImageSparseGather", + 315 => "OpImageSparseDrefGather", + 316 => "OpImageSparseTexelsResident", + 317 => "OpNoLine", + 318 => "OpAtomicFlagTestAndSet", + 319 => "OpAtomicFlagClear", + 320 => "OpImageSparseRead", + 321 => "OpSizeOf", + 322 => "OpTypePipeStorage", + 323 => "OpConstantPipeStorage", + 324 => "OpCreatePipeFromPipeStorage", + 325 => "OpGetKernelLocalSizeForSubgroupCount", + 326 => "OpGetKernelMaxNumSubgroups", + 327 => "OpTypeNamedBarrier", + 328 => "OpNamedBarrierInitialize", + 329 => "OpMemoryNamedBarrier", + 330 => "OpModuleProcessed", + 331 => "OpExecutionModeId", + 332 => "OpDecorateId", + 333 => "OpGroupNonUniformElect", + 334 => "OpGroupNonUniformAll", + 335 => "OpGroupNonUniformAny", + 336 => "OpGroupNonUniformAllEqual", + 337 => "OpGroupNonUniformBroadcast", + 338 => "OpGroupNonUniformBroadcastFirst", + 339 => "OpGroupNonUniformBallot", + 340 => "OpGroupNonUniformInverseBallot", + 341 => "OpGroupNonUniformBallotBitExtract", + 342 => "OpGroupNonUniformBallotBitCount", + 343 => "OpGroupNonUniformBallotFindLSB", + 344 => "OpGroupNonUniformBallotFindMSB", + 345 => "OpGroupNonUniformShuffle", + 346 => "OpGroupNonUniformShuffleXor", + 347 => "OpGroupNonUniformShuffleUp", + 348 => "OpGroupNonUniformShuffleDown", + 349 => "OpGroupNonUniformIAdd", + 350 => "OpGroupNonUniformFAdd", + 351 => "OpGroupNonUniformIMul", + 352 => "OpGroupNonUniformFMul", + 353 => "OpGroupNonUniformSMin", + 354 => "OpGroupNonUniformUMin", + 355 => "OpGroupNonUniformFMin", + 356 => "OpGroupNonUniformSMax", + 357 => "OpGroupNonUniformUMax", + 358 => "OpGroupNonUniformFMax", + 359 => "OpGroupNonUniformBitwiseAnd", + 360 => "OpGroupNonUniformBitwiseOr", + 361 => "OpGroupNonUniformBitwiseXor", + 362 => "OpGroupNonUniformLogicalAnd", + 363 => "OpGroupNonUniformLogicalOr", + 364 => "OpGroupNonUniformLogicalXor", + 365 => "OpGroupNonUniformQuadBroadcast", + 366 => "OpGroupNonUniformQuadSwap", + 400 => "OpCopyLogical", + 401 => "OpPtrEqual", + 402 => "OpPtrNotEqual", + 403 => "OpPtrDiff", + 4160 => "OpColorAttachmentReadEXT", + 4161 => "OpDepthAttachmentReadEXT", + 4162 => "OpStencilAttachmentReadEXT", + 4416 => "OpTerminateInvocation", + 4421 => "OpSubgroupBallotKHR", + 4422 => "OpSubgroupFirstInvocationKHR", + 4428 => "OpSubgroupAllKHR", + 4429 => "OpSubgroupAnyKHR", + 4430 => "OpSubgroupAllEqualKHR", + 4431 => "OpGroupNonUniformRotateKHR", + 4432 => "OpSubgroupReadInvocationKHR", + 4445 => "OpTraceRayKHR", + 4446 => "OpExecuteCallableKHR", + 4447 => "OpConvertUToAccelerationStructureKHR", + 4448 => "OpIgnoreIntersectionKHR", + 4449 => "OpTerminateRayKHR", + 4450 => "OpSDot", + 4450 => "OpSDotKHR", + 4451 => "OpUDot", + 4451 => "OpUDotKHR", + 4452 => "OpSUDot", + 4452 => "OpSUDotKHR", + 4453 => "OpSDotAccSat", + 4453 => "OpSDotAccSatKHR", + 4454 => "OpUDotAccSat", + 4454 => "OpUDotAccSatKHR", + 4455 => "OpSUDotAccSat", + 4455 => "OpSUDotAccSatKHR", + 4456 => "OpTypeCooperativeMatrixKHR", + 4457 => "OpCooperativeMatrixLoadKHR", + 4458 => "OpCooperativeMatrixStoreKHR", + 4459 => "OpCooperativeMatrixMulAddKHR", + 4460 => "OpCooperativeMatrixLengthKHR", + 4472 => "OpTypeRayQueryKHR", + 4473 => "OpRayQueryInitializeKHR", + 4474 => "OpRayQueryTerminateKHR", + 4475 => "OpRayQueryGenerateIntersectionKHR", + 4476 => "OpRayQueryConfirmIntersectionKHR", + 4477 => "OpRayQueryProceedKHR", + 4479 => "OpRayQueryGetIntersectionTypeKHR", + 4480 => "OpImageSampleWeightedQCOM", + 4481 => "OpImageBoxFilterQCOM", + 4482 => "OpImageBlockMatchSSDQCOM", + 4483 => "OpImageBlockMatchSADQCOM", + 5000 => "OpGroupIAddNonUniformAMD", + 5001 => "OpGroupFAddNonUniformAMD", + 5002 => "OpGroupFMinNonUniformAMD", + 5003 => "OpGroupUMinNonUniformAMD", + 5004 => "OpGroupSMinNonUniformAMD", + 5005 => "OpGroupFMaxNonUniformAMD", + 5006 => "OpGroupUMaxNonUniformAMD", + 5007 => "OpGroupSMaxNonUniformAMD", + 5011 => "OpFragmentMaskFetchAMD", + 5012 => "OpFragmentFetchAMD", + 5056 => "OpReadClockKHR", + 5075 => "OpFinalizeNodePayloadsAMDX", + 5078 => "OpFinishWritingNodePayloadAMDX", + 5090 => "OpInitializeNodePayloadsAMDX", + 5249 => "OpHitObjectRecordHitMotionNV", + 5250 => "OpHitObjectRecordHitWithIndexMotionNV", + 5251 => "OpHitObjectRecordMissMotionNV", + 5252 => "OpHitObjectGetWorldToObjectNV", + 5253 => "OpHitObjectGetObjectToWorldNV", + 5254 => "OpHitObjectGetObjectRayDirectionNV", + 5255 => "OpHitObjectGetObjectRayOriginNV", + 5256 => "OpHitObjectTraceRayMotionNV", + 5257 => "OpHitObjectGetShaderRecordBufferHandleNV", + 5258 => "OpHitObjectGetShaderBindingTableRecordIndexNV", + 5259 => "OpHitObjectRecordEmptyNV", + 5260 => "OpHitObjectTraceRayNV", + 5261 => "OpHitObjectRecordHitNV", + 5262 => "OpHitObjectRecordHitWithIndexNV", + 5263 => "OpHitObjectRecordMissNV", + 5264 => "OpHitObjectExecuteShaderNV", + 5265 => "OpHitObjectGetCurrentTimeNV", + 5266 => "OpHitObjectGetAttributesNV", + 5267 => "OpHitObjectGetHitKindNV", + 5268 => "OpHitObjectGetPrimitiveIndexNV", + 5269 => "OpHitObjectGetGeometryIndexNV", + 5270 => "OpHitObjectGetInstanceIdNV", + 5271 => "OpHitObjectGetInstanceCustomIndexNV", + 5272 => "OpHitObjectGetWorldRayDirectionNV", + 5273 => "OpHitObjectGetWorldRayOriginNV", + 5274 => "OpHitObjectGetRayTMaxNV", + 5275 => "OpHitObjectGetRayTMinNV", + 5276 => "OpHitObjectIsEmptyNV", + 5277 => "OpHitObjectIsHitNV", + 5278 => "OpHitObjectIsMissNV", + 5279 => "OpReorderThreadWithHitObjectNV", + 5280 => "OpReorderThreadWithHintNV", + 5281 => "OpTypeHitObjectNV", + 5283 => "OpImageSampleFootprintNV", + 5294 => "OpEmitMeshTasksEXT", + 5295 => "OpSetMeshOutputsEXT", + 5296 => "OpGroupNonUniformPartitionNV", + 5299 => "OpWritePackedPrimitiveIndices4x8NV", + 5300 => "OpFetchMicroTriangleVertexPositionNV", + 5301 => "OpFetchMicroTriangleVertexBarycentricNV", + 5334 => "OpReportIntersectionNV", + 5334 => "OpReportIntersectionKHR", + 5335 => "OpIgnoreIntersectionNV", + 5336 => "OpTerminateRayNV", + 5337 => "OpTraceNV", + 5338 => "OpTraceMotionNV", + 5339 => "OpTraceRayMotionNV", + 5340 => "OpRayQueryGetIntersectionTriangleVertexPositionsKHR", + 5341 => "OpTypeAccelerationStructureNV", + 5341 => "OpTypeAccelerationStructureKHR", + 5344 => "OpExecuteCallableNV", + 5358 => "OpTypeCooperativeMatrixNV", + 5359 => "OpCooperativeMatrixLoadNV", + 5360 => "OpCooperativeMatrixStoreNV", + 5361 => "OpCooperativeMatrixMulAddNV", + 5362 => "OpCooperativeMatrixLengthNV", + 5364 => "OpBeginInvocationInterlockEXT", + 5365 => "OpEndInvocationInterlockEXT", + 5380 => "OpDemoteToHelperInvocation", + 5380 => "OpDemoteToHelperInvocationEXT", + 5381 => "OpIsHelperInvocationEXT", + 5391 => "OpConvertUToImageNV", + 5392 => "OpConvertUToSamplerNV", + 5393 => "OpConvertImageToUNV", + 5394 => "OpConvertSamplerToUNV", + 5395 => "OpConvertUToSampledImageNV", + 5396 => "OpConvertSampledImageToUNV", + 5397 => "OpSamplerImageAddressingModeNV", + 5571 => "OpSubgroupShuffleINTEL", + 5572 => "OpSubgroupShuffleDownINTEL", + 5573 => "OpSubgroupShuffleUpINTEL", + 5574 => "OpSubgroupShuffleXorINTEL", + 5575 => "OpSubgroupBlockReadINTEL", + 5576 => "OpSubgroupBlockWriteINTEL", + 5577 => "OpSubgroupImageBlockReadINTEL", + 5578 => "OpSubgroupImageBlockWriteINTEL", + 5580 => "OpSubgroupImageMediaBlockReadINTEL", + 5581 => "OpSubgroupImageMediaBlockWriteINTEL", + 5585 => "OpUCountLeadingZerosINTEL", + 5586 => "OpUCountTrailingZerosINTEL", + 5587 => "OpAbsISubINTEL", + 5588 => "OpAbsUSubINTEL", + 5589 => "OpIAddSatINTEL", + 5590 => "OpUAddSatINTEL", + 5591 => "OpIAverageINTEL", + 5592 => "OpUAverageINTEL", + 5593 => "OpIAverageRoundedINTEL", + 5594 => "OpUAverageRoundedINTEL", + 5595 => "OpISubSatINTEL", + 5596 => "OpUSubSatINTEL", + 5597 => "OpIMul32x16INTEL", + 5598 => "OpUMul32x16INTEL", + 5600 => "OpConstantFunctionPointerINTEL", + 5601 => "OpFunctionPointerCallINTEL", + 5609 => "OpAsmTargetINTEL", + 5610 => "OpAsmINTEL", + 5611 => "OpAsmCallINTEL", + 5614 => "OpAtomicFMinEXT", + 5615 => "OpAtomicFMaxEXT", + 5630 => "OpAssumeTrueKHR", + 5631 => "OpExpectKHR", + 5632 => "OpDecorateString", + 5632 => "OpDecorateStringGOOGLE", + 5633 => "OpMemberDecorateString", + 5633 => "OpMemberDecorateStringGOOGLE", + 5699 => "OpVmeImageINTEL", + 5700 => "OpTypeVmeImageINTEL", + 5701 => "OpTypeAvcImePayloadINTEL", + 5702 => "OpTypeAvcRefPayloadINTEL", + 5703 => "OpTypeAvcSicPayloadINTEL", + 5704 => "OpTypeAvcMcePayloadINTEL", + 5705 => "OpTypeAvcMceResultINTEL", + 5706 => "OpTypeAvcImeResultINTEL", + 5707 => "OpTypeAvcImeResultSingleReferenceStreamoutINTEL", + 5708 => "OpTypeAvcImeResultDualReferenceStreamoutINTEL", + 5709 => "OpTypeAvcImeSingleReferenceStreaminINTEL", + 5710 => "OpTypeAvcImeDualReferenceStreaminINTEL", + 5711 => "OpTypeAvcRefResultINTEL", + 5712 => "OpTypeAvcSicResultINTEL", + 5713 => "OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL", + 5714 => "OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL", + 5715 => "OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL", + 5716 => "OpSubgroupAvcMceSetInterShapePenaltyINTEL", + 5717 => "OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL", + 5718 => "OpSubgroupAvcMceSetInterDirectionPenaltyINTEL", + 5719 => "OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL", + 5720 => "OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL", + 5721 => "OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL", + 5722 => "OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL", + 5723 => "OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL", + 5724 => "OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL", + 5725 => "OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL", + 5726 => "OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL", + 5727 => "OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL", + 5728 => "OpSubgroupAvcMceSetAcOnlyHaarINTEL", + 5729 => "OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL", + 5730 => "OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL", + 5731 => "OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL", + 5732 => "OpSubgroupAvcMceConvertToImePayloadINTEL", + 5733 => "OpSubgroupAvcMceConvertToImeResultINTEL", + 5734 => "OpSubgroupAvcMceConvertToRefPayloadINTEL", + 5735 => "OpSubgroupAvcMceConvertToRefResultINTEL", + 5736 => "OpSubgroupAvcMceConvertToSicPayloadINTEL", + 5737 => "OpSubgroupAvcMceConvertToSicResultINTEL", + 5738 => "OpSubgroupAvcMceGetMotionVectorsINTEL", + 5739 => "OpSubgroupAvcMceGetInterDistortionsINTEL", + 5740 => "OpSubgroupAvcMceGetBestInterDistortionsINTEL", + 5741 => "OpSubgroupAvcMceGetInterMajorShapeINTEL", + 5742 => "OpSubgroupAvcMceGetInterMinorShapeINTEL", + 5743 => "OpSubgroupAvcMceGetInterDirectionsINTEL", + 5744 => "OpSubgroupAvcMceGetInterMotionVectorCountINTEL", + 5745 => "OpSubgroupAvcMceGetInterReferenceIdsINTEL", + 5746 => "OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL", + 5747 => "OpSubgroupAvcImeInitializeINTEL", + 5748 => "OpSubgroupAvcImeSetSingleReferenceINTEL", + 5749 => "OpSubgroupAvcImeSetDualReferenceINTEL", + 5750 => "OpSubgroupAvcImeRefWindowSizeINTEL", + 5751 => "OpSubgroupAvcImeAdjustRefOffsetINTEL", + 5752 => "OpSubgroupAvcImeConvertToMcePayloadINTEL", + 5753 => "OpSubgroupAvcImeSetMaxMotionVectorCountINTEL", + 5754 => "OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL", + 5755 => "OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL", + 5756 => "OpSubgroupAvcImeSetWeightedSadINTEL", + 5757 => "OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL", + 5758 => "OpSubgroupAvcImeEvaluateWithDualReferenceINTEL", + 5759 => "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL", + 5760 => "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL", + 5761 => "OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL", + 5762 => "OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL", + 5763 => "OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL", + 5764 => "OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL", + 5765 => "OpSubgroupAvcImeConvertToMceResultINTEL", + 5766 => "OpSubgroupAvcImeGetSingleReferenceStreaminINTEL", + 5767 => "OpSubgroupAvcImeGetDualReferenceStreaminINTEL", + 5768 => "OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL", + 5769 => "OpSubgroupAvcImeStripDualReferenceStreamoutINTEL", + 5770 => "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL", + 5771 => "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL", + 5772 => "OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL", + 5773 => "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL", + 5774 => "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL", + 5775 => "OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL", + 5776 => "OpSubgroupAvcImeGetBorderReachedINTEL", + 5777 => "OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL", + 5778 => "OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL", + 5779 => "OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL", + 5780 => "OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL", + 5781 => "OpSubgroupAvcFmeInitializeINTEL", + 5782 => "OpSubgroupAvcBmeInitializeINTEL", + 5783 => "OpSubgroupAvcRefConvertToMcePayloadINTEL", + 5784 => "OpSubgroupAvcRefSetBidirectionalMixDisableINTEL", + 5785 => "OpSubgroupAvcRefSetBilinearFilterEnableINTEL", + 5786 => "OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL", + 5787 => "OpSubgroupAvcRefEvaluateWithDualReferenceINTEL", + 5788 => "OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL", + 5789 => "OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL", + 5790 => "OpSubgroupAvcRefConvertToMceResultINTEL", + 5791 => "OpSubgroupAvcSicInitializeINTEL", + 5792 => "OpSubgroupAvcSicConfigureSkcINTEL", + 5793 => "OpSubgroupAvcSicConfigureIpeLumaINTEL", + 5794 => "OpSubgroupAvcSicConfigureIpeLumaChromaINTEL", + 5795 => "OpSubgroupAvcSicGetMotionVectorMaskINTEL", + 5796 => "OpSubgroupAvcSicConvertToMcePayloadINTEL", + 5797 => "OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL", + 5798 => "OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL", + 5799 => "OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL", + 5800 => "OpSubgroupAvcSicSetBilinearFilterEnableINTEL", + 5801 => "OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL", + 5802 => "OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL", + 5803 => "OpSubgroupAvcSicEvaluateIpeINTEL", + 5804 => "OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL", + 5805 => "OpSubgroupAvcSicEvaluateWithDualReferenceINTEL", + 5806 => "OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL", + 5807 => "OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL", + 5808 => "OpSubgroupAvcSicConvertToMceResultINTEL", + 5809 => "OpSubgroupAvcSicGetIpeLumaShapeINTEL", + 5810 => "OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL", + 5811 => "OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL", + 5812 => "OpSubgroupAvcSicGetPackedIpeLumaModesINTEL", + 5813 => "OpSubgroupAvcSicGetIpeChromaModeINTEL", + 5814 => "OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL", + 5815 => "OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL", + 5816 => "OpSubgroupAvcSicGetInterRawSadsINTEL", + 5818 => "OpVariableLengthArrayINTEL", + 5819 => "OpSaveMemoryINTEL", + 5820 => "OpRestoreMemoryINTEL", + 5840 => "OpArbitraryFloatSinCosPiINTEL", + 5841 => "OpArbitraryFloatCastINTEL", + 5842 => "OpArbitraryFloatCastFromIntINTEL", + 5843 => "OpArbitraryFloatCastToIntINTEL", + 5846 => "OpArbitraryFloatAddINTEL", + 5847 => "OpArbitraryFloatSubINTEL", + 5848 => "OpArbitraryFloatMulINTEL", + 5849 => "OpArbitraryFloatDivINTEL", + 5850 => "OpArbitraryFloatGTINTEL", + 5851 => "OpArbitraryFloatGEINTEL", + 5852 => "OpArbitraryFloatLTINTEL", + 5853 => "OpArbitraryFloatLEINTEL", + 5854 => "OpArbitraryFloatEQINTEL", + 5855 => "OpArbitraryFloatRecipINTEL", + 5856 => "OpArbitraryFloatRSqrtINTEL", + 5857 => "OpArbitraryFloatCbrtINTEL", + 5858 => "OpArbitraryFloatHypotINTEL", + 5859 => "OpArbitraryFloatSqrtINTEL", + 5860 => "OpArbitraryFloatLogINTEL", + 5861 => "OpArbitraryFloatLog2INTEL", + 5862 => "OpArbitraryFloatLog10INTEL", + 5863 => "OpArbitraryFloatLog1pINTEL", + 5864 => "OpArbitraryFloatExpINTEL", + 5865 => "OpArbitraryFloatExp2INTEL", + 5866 => "OpArbitraryFloatExp10INTEL", + 5867 => "OpArbitraryFloatExpm1INTEL", + 5868 => "OpArbitraryFloatSinINTEL", + 5869 => "OpArbitraryFloatCosINTEL", + 5870 => "OpArbitraryFloatSinCosINTEL", + 5871 => "OpArbitraryFloatSinPiINTEL", + 5872 => "OpArbitraryFloatCosPiINTEL", + 5873 => "OpArbitraryFloatASinINTEL", + 5874 => "OpArbitraryFloatASinPiINTEL", + 5875 => "OpArbitraryFloatACosINTEL", + 5876 => "OpArbitraryFloatACosPiINTEL", + 5877 => "OpArbitraryFloatATanINTEL", + 5878 => "OpArbitraryFloatATanPiINTEL", + 5879 => "OpArbitraryFloatATan2INTEL", + 5880 => "OpArbitraryFloatPowINTEL", + 5881 => "OpArbitraryFloatPowRINTEL", + 5882 => "OpArbitraryFloatPowNINTEL", + 5887 => "OpLoopControlINTEL", + 5911 => "OpAliasDomainDeclINTEL", + 5912 => "OpAliasScopeDeclINTEL", + 5913 => "OpAliasScopeListDeclINTEL", + 5923 => "OpFixedSqrtINTEL", + 5924 => "OpFixedRecipINTEL", + 5925 => "OpFixedRsqrtINTEL", + 5926 => "OpFixedSinINTEL", + 5927 => "OpFixedCosINTEL", + 5928 => "OpFixedSinCosINTEL", + 5929 => "OpFixedSinPiINTEL", + 5930 => "OpFixedCosPiINTEL", + 5931 => "OpFixedSinCosPiINTEL", + 5932 => "OpFixedLogINTEL", + 5933 => "OpFixedExpINTEL", + 5934 => "OpPtrCastToCrossWorkgroupINTEL", + 5938 => "OpCrossWorkgroupCastToPtrINTEL", + 5946 => "OpReadPipeBlockingINTEL", + 5947 => "OpWritePipeBlockingINTEL", + 5949 => "OpFPGARegINTEL", + 6016 => "OpRayQueryGetRayTMinKHR", + 6017 => "OpRayQueryGetRayFlagsKHR", + 6018 => "OpRayQueryGetIntersectionTKHR", + 6019 => "OpRayQueryGetIntersectionInstanceCustomIndexKHR", + 6020 => "OpRayQueryGetIntersectionInstanceIdKHR", + 6021 => "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR", + 6022 => "OpRayQueryGetIntersectionGeometryIndexKHR", + 6023 => "OpRayQueryGetIntersectionPrimitiveIndexKHR", + 6024 => "OpRayQueryGetIntersectionBarycentricsKHR", + 6025 => "OpRayQueryGetIntersectionFrontFaceKHR", + 6026 => "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR", + 6027 => "OpRayQueryGetIntersectionObjectRayDirectionKHR", + 6028 => "OpRayQueryGetIntersectionObjectRayOriginKHR", + 6029 => "OpRayQueryGetWorldRayDirectionKHR", + 6030 => "OpRayQueryGetWorldRayOriginKHR", + 6031 => "OpRayQueryGetIntersectionObjectToWorldKHR", + 6032 => "OpRayQueryGetIntersectionWorldToObjectKHR", + 6035 => "OpAtomicFAddEXT", + 6086 => "OpTypeBufferSurfaceINTEL", + 6090 => "OpTypeStructContinuedINTEL", + 6091 => "OpConstantCompositeContinuedINTEL", + 6092 => "OpSpecConstantCompositeContinuedINTEL", + 6096 => "OpCompositeConstructContinuedINTEL", + 6116 => "OpConvertFToBF16INTEL", + 6117 => "OpConvertBF16ToFINTEL", + 6142 => "OpControlBarrierArriveINTEL", + 6143 => "OpControlBarrierWaitINTEL", + 6401 => "OpGroupIMulKHR", + 6402 => "OpGroupFMulKHR", + 6403 => "OpGroupBitwiseAndKHR", + 6404 => "OpGroupBitwiseOrKHR", + 6405 => "OpGroupBitwiseXorKHR", + 6406 => "OpGroupLogicalAndKHR", + 6407 => "OpGroupLogicalOrKHR", + 6408 => "OpGroupLogicalXorKHR", + _ => bail!("Unknown opcode: {}", opcode), + }; + Ok(out) +} diff --git a/spirq-spvasm/src/asm/generated/operand_enum_type.rs b/spirq-spvasm/src/generated/operand_enum_type.rs similarity index 100% rename from spirq-spvasm/src/asm/generated/operand_enum_type.rs rename to spirq-spvasm/src/generated/operand_enum_type.rs diff --git a/spirq-spvasm/src/generated/print_operand.rs b/spirq-spvasm/src/generated/print_operand.rs new file mode 100644 index 0000000..2151117 --- /dev/null +++ b/spirq-spvasm/src/generated/print_operand.rs @@ -0,0 +1,6048 @@ +use anyhow::{bail, Result}; +use spirq_core::parse::Operands; +use super::enum_to_str::enum_to_str; + +fn print_id(operands: &mut Operands) -> Result { + Ok(format!("%{}", operands.read_u32()?)) +} +fn print_u32(operands: &mut Operands) -> Result { + Ok(operands.read_u32()?.to_string()) +} +fn print_f32(operands: &mut Operands) -> Result { + Ok(operands.read_f32()?.to_string()) +} +fn print_str(operands: &mut Operands) -> Result { + Ok(format!(r#""{}""#, operands.read_str()?)) +} +fn print_list(operands: &mut Operands) -> Result> { + let out = operands.read_list()? + .iter() + .map(|x| x.to_string()) + .collect::>(); + Ok(out) +} +fn print_pair_id_id_list(operands: &mut Operands) -> Result> { + let mut out = Vec::new(); + for pair in operands.read_list()?.chunks(2) { + if pair.len() != 2 { + bail!("operands does not pair up"); + } + let seg = format!("%{} %{}", pair[0], pair[1]); + out.push(seg); + } + Ok(out) +} +fn print_pair_id_u32_list(operands: &mut Operands) -> Result> { + let mut out = Vec::new(); + for pair in operands.read_list()?.chunks(2) { + if pair.len() != 2 { + bail!("operands does not pair up"); + } + let seg = format!("%{} {}", pair[0], pair[1]); + out.push(seg); + } + Ok(out) +} +fn print_pair_u32_id_list(operands: &mut Operands) -> Result> { + let mut out = Vec::new(); + for pair in operands.read_list()?.chunks(2) { + if pair.len() != 2 { + bail!("operands does not pair up"); + } + let seg = format!("{} %{}", pair[0], pair[1]); + out.push(seg); + } + Ok(out) +} + +pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> { + let mut out: Vec = Vec::new(); + match opcode { + // OpUndef + 1 => { + } + // OpSourceContinued + 2 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpSource + 3 => { + // SourceLanguage + out.push(enum_to_str("SourceLanguage", operands.read_u32()?)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + // LiteralString ? + if !operands.is_empty() { + out.push(print_str(operands)?); + } + } + // OpSourceExtension + 4 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpName + 5 => { + // IdRef + out.push(print_id(operands)?); + // LiteralString + out.push(print_str(operands)?); + } + // OpMemberName + 6 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralString + out.push(print_str(operands)?); + } + // OpString + 7 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpLine + 8 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpExtension + 10 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpExtInstImport + 11 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpExtInst + 12 => { + // IdRef + out.push(print_id(operands)?); + // LiteralExtInstInteger + out.push(print_u32(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpMemoryModel + 14 => { + // AddressingModel + out.push(enum_to_str("AddressingModel", operands.read_u32()?)?); + // MemoryModel + out.push(enum_to_str("MemoryModel", operands.read_u32()?)?); + } + // OpEntryPoint + 15 => { + // ExecutionModel + out.push(enum_to_str("ExecutionModel", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // LiteralString + out.push(print_str(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpExecutionMode + 16 => { + // IdRef + out.push(print_id(operands)?); + // ExecutionMode + out.push(enum_to_str("ExecutionMode", operands.read_u32()?)?); + } + // OpCapability + 17 => { + // Capability + out.push(enum_to_str("Capability", operands.read_u32()?)?); + } + // OpTypeVoid + 19 => { + } + // OpTypeBool + 20 => { + } + // OpTypeInt + 21 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpTypeFloat + 22 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpTypeVector + 23 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpTypeMatrix + 24 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpTypeImage + 25 => { + // IdRef + out.push(print_id(operands)?); + // Dim + out.push(enum_to_str("Dim", operands.read_u32()?)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // ImageFormat + out.push(enum_to_str("ImageFormat", operands.read_u32()?)?); + // AccessQualifier ? + if !operands.is_empty() { + out.push(enum_to_str("AccessQualifier", operands.read_u32()?)?); + } + } + // OpTypeSampler + 26 => { + } + // OpTypeSampledImage + 27 => { + // IdRef + out.push(print_id(operands)?); + } + // OpTypeArray + 28 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeRuntimeArray + 29 => { + // IdRef + out.push(print_id(operands)?); + } + // OpTypeStruct + 30 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpTypeOpaque + 31 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpTypePointer + 32 => { + // StorageClass + out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeFunction + 33 => { + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpTypeEvent + 34 => { + } + // OpTypeDeviceEvent + 35 => { + } + // OpTypeReserveId + 36 => { + } + // OpTypeQueue + 37 => { + } + // OpTypePipe + 38 => { + // AccessQualifier + out.push(enum_to_str("AccessQualifier", operands.read_u32()?)?); + } + // OpTypeForwardPointer + 39 => { + // IdRef + out.push(print_id(operands)?); + // StorageClass + out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + } + // OpConstantTrue + 41 => { + } + // OpConstantFalse + 42 => { + } + // OpConstant + 43 => { + // LiteralContextDependentNumber + out.extend(print_list(operands)?); + } + // OpConstantComposite + 44 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpConstantSampler + 45 => { + // SamplerAddressingMode + out.push(enum_to_str("SamplerAddressingMode", operands.read_u32()?)?); + // LiteralInteger + out.push(print_u32(operands)?); + // SamplerFilterMode + out.push(enum_to_str("SamplerFilterMode", operands.read_u32()?)?); + } + // OpConstantNull + 46 => { + } + // OpSpecConstantTrue + 48 => { + } + // OpSpecConstantFalse + 49 => { + } + // OpSpecConstant + 50 => { + // LiteralContextDependentNumber + out.extend(print_list(operands)?); + } + // OpSpecConstantComposite + 51 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpSpecConstantOp + 52 => { + // LiteralSpecConstantOpInteger + out.push(print_u32(operands)?); + } + // OpFunction + 54 => { + // FunctionControl + out.push(enum_to_str("FunctionControl", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFunctionParameter + 55 => { + } + // OpFunctionCall + 57 => { + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpVariable + 59 => { + // StorageClass + out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpImageTexelPointer + 60 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpLoad + 61 => { + // IdRef + out.push(print_id(operands)?); + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpStore + 62 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpCopyMemory + 63 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpCopyMemorySized + 64 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpAccessChain + 65 => { + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpInBoundsAccessChain + 66 => { + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpPtrAccessChain + 67 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpArrayLength + 68 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpGenericPtrMemSemantics + 69 => { + // IdRef + out.push(print_id(operands)?); + } + // OpInBoundsPtrAccessChain + 70 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpDecorate + 71 => { + // IdRef + out.push(print_id(operands)?); + // Decoration + out.push(enum_to_str("Decoration", operands.read_u32()?)?); + } + // OpMemberDecorate + 72 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // Decoration + out.push(enum_to_str("Decoration", operands.read_u32()?)?); + } + // OpDecorationGroup + 73 => { + } + // OpGroupDecorate + 74 => { + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupMemberDecorate + 75 => { + // IdRef + out.push(print_id(operands)?); + // PairIdRefLiteralInteger * + while !operands.is_empty() { + out.extend(print_pair_id_u32_list(operands)?); + } + } + // OpVectorExtractDynamic + 77 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpVectorInsertDynamic + 78 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpVectorShuffle + 79 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger * + while !operands.is_empty() { + out.push(print_u32(operands)?); + } + } + // OpCompositeConstruct + 80 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpCompositeExtract + 81 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger * + while !operands.is_empty() { + out.push(print_u32(operands)?); + } + } + // OpCompositeInsert + 82 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger * + while !operands.is_empty() { + out.push(print_u32(operands)?); + } + } + // OpCopyObject + 83 => { + // IdRef + out.push(print_id(operands)?); + } + // OpTranspose + 84 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSampledImage + 86 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageSampleImplicitLod + 87 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSampleExplicitLod + 88 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSampleDrefImplicitLod + 89 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSampleDrefExplicitLod + 90 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSampleProjImplicitLod + 91 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSampleProjExplicitLod + 92 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSampleProjDrefImplicitLod + 93 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSampleProjDrefExplicitLod + 94 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageFetch + 95 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageGather + 96 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageDrefGather + 97 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageRead + 98 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageWrite + 99 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImage + 100 => { + // IdRef + out.push(print_id(operands)?); + } + // OpImageQueryFormat + 101 => { + // IdRef + out.push(print_id(operands)?); + } + // OpImageQueryOrder + 102 => { + // IdRef + out.push(print_id(operands)?); + } + // OpImageQuerySizeLod + 103 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageQuerySize + 104 => { + // IdRef + out.push(print_id(operands)?); + } + // OpImageQueryLod + 105 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageQueryLevels + 106 => { + // IdRef + out.push(print_id(operands)?); + } + // OpImageQuerySamples + 107 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertFToU + 109 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertFToS + 110 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertSToF + 111 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertUToF + 112 => { + // IdRef + out.push(print_id(operands)?); + } + // OpUConvert + 113 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSConvert + 114 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFConvert + 115 => { + // IdRef + out.push(print_id(operands)?); + } + // OpQuantizeToF16 + 116 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertPtrToU + 117 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSatConvertSToU + 118 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSatConvertUToS + 119 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertUToPtr + 120 => { + // IdRef + out.push(print_id(operands)?); + } + // OpPtrCastToGeneric + 121 => { + // IdRef + out.push(print_id(operands)?); + } + // OpGenericCastToPtr + 122 => { + // IdRef + out.push(print_id(operands)?); + } + // OpGenericCastToPtrExplicit + 123 => { + // IdRef + out.push(print_id(operands)?); + // StorageClass + out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + } + // OpBitcast + 124 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSNegate + 126 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFNegate + 127 => { + // IdRef + out.push(print_id(operands)?); + } + // OpIAdd + 128 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFAdd + 129 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpISub + 130 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFSub + 131 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIMul + 132 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFMul + 133 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUDiv + 134 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSDiv + 135 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFDiv + 136 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUMod + 137 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSRem + 138 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSMod + 139 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFRem + 140 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFMod + 141 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpVectorTimesScalar + 142 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpMatrixTimesScalar + 143 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpVectorTimesMatrix + 144 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpMatrixTimesVector + 145 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpMatrixTimesMatrix + 146 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpOuterProduct + 147 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpDot + 148 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIAddCarry + 149 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpISubBorrow + 150 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUMulExtended + 151 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSMulExtended + 152 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAny + 154 => { + // IdRef + out.push(print_id(operands)?); + } + // OpAll + 155 => { + // IdRef + out.push(print_id(operands)?); + } + // OpIsNan + 156 => { + // IdRef + out.push(print_id(operands)?); + } + // OpIsInf + 157 => { + // IdRef + out.push(print_id(operands)?); + } + // OpIsFinite + 158 => { + // IdRef + out.push(print_id(operands)?); + } + // OpIsNormal + 159 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSignBitSet + 160 => { + // IdRef + out.push(print_id(operands)?); + } + // OpLessOrGreater + 161 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpOrdered + 162 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUnordered + 163 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpLogicalEqual + 164 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpLogicalNotEqual + 165 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpLogicalOr + 166 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpLogicalAnd + 167 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpLogicalNot + 168 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSelect + 169 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIEqual + 170 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpINotEqual + 171 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUGreaterThan + 172 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSGreaterThan + 173 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUGreaterThanEqual + 174 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSGreaterThanEqual + 175 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpULessThan + 176 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSLessThan + 177 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpULessThanEqual + 178 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSLessThanEqual + 179 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFOrdEqual + 180 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFUnordEqual + 181 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFOrdNotEqual + 182 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFUnordNotEqual + 183 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFOrdLessThan + 184 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFUnordLessThan + 185 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFOrdGreaterThan + 186 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFUnordGreaterThan + 187 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFOrdLessThanEqual + 188 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFUnordLessThanEqual + 189 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFOrdGreaterThanEqual + 190 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFUnordGreaterThanEqual + 191 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpShiftRightLogical + 194 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpShiftRightArithmetic + 195 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpShiftLeftLogical + 196 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpBitwiseOr + 197 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpBitwiseXor + 198 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpBitwiseAnd + 199 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpNot + 200 => { + // IdRef + out.push(print_id(operands)?); + } + // OpBitFieldInsert + 201 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpBitFieldSExtract + 202 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpBitFieldUExtract + 203 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpBitReverse + 204 => { + // IdRef + out.push(print_id(operands)?); + } + // OpBitCount + 205 => { + // IdRef + out.push(print_id(operands)?); + } + // OpDPdx + 207 => { + // IdRef + out.push(print_id(operands)?); + } + // OpDPdy + 208 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFwidth + 209 => { + // IdRef + out.push(print_id(operands)?); + } + // OpDPdxFine + 210 => { + // IdRef + out.push(print_id(operands)?); + } + // OpDPdyFine + 211 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFwidthFine + 212 => { + // IdRef + out.push(print_id(operands)?); + } + // OpDPdxCoarse + 213 => { + // IdRef + out.push(print_id(operands)?); + } + // OpDPdyCoarse + 214 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFwidthCoarse + 215 => { + // IdRef + out.push(print_id(operands)?); + } + // OpEmitStreamVertex + 220 => { + // IdRef + out.push(print_id(operands)?); + } + // OpEndStreamPrimitive + 221 => { + // IdRef + out.push(print_id(operands)?); + } + // OpControlBarrier + 224 => { + // IdScope + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpMemoryBarrier + 225 => { + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpAtomicLoad + 227 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpAtomicStore + 228 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicExchange + 229 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicCompareExchange + 230 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicCompareExchangeWeak + 231 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicIIncrement + 232 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpAtomicIDecrement + 233 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpAtomicIAdd + 234 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicISub + 235 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicSMin + 236 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicUMin + 237 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicSMax + 238 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicUMax + 239 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicAnd + 240 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicOr + 241 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicXor + 242 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpPhi + 245 => { + // PairIdRefIdRef * + while !operands.is_empty() { + out.extend(print_pair_id_id_list(operands)?); + } + } + // OpLoopMerge + 246 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LoopControl + out.push(enum_to_str("LoopControl", operands.read_u32()?)?); + } + // OpSelectionMerge + 247 => { + // IdRef + out.push(print_id(operands)?); + // SelectionControl + out.push(enum_to_str("SelectionControl", operands.read_u32()?)?); + } + // OpLabel + 248 => { + } + // OpBranch + 249 => { + // IdRef + out.push(print_id(operands)?); + } + // OpBranchConditional + 250 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger * + while !operands.is_empty() { + out.push(print_u32(operands)?); + } + } + // OpSwitch + 251 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PairLiteralIntegerIdRef * + while !operands.is_empty() { + out.extend(print_pair_u32_id_list(operands)?); + } + } + // OpReturnValue + 254 => { + // IdRef + out.push(print_id(operands)?); + } + // OpLifetimeStart + 256 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpLifetimeStop + 257 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpGroupAsyncCopy + 259 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupWaitEvents + 260 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupAll + 261 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupAny + 262 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupBroadcast + 263 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupIAdd + 264 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFAdd + 265 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFMin + 266 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupUMin + 267 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupSMin + 268 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFMax + 269 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupUMax + 270 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupSMax + 271 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReadPipe + 274 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpWritePipe + 275 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReservedReadPipe + 276 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReservedWritePipe + 277 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReserveReadPipePackets + 278 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReserveWritePipePackets + 279 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCommitReadPipe + 280 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCommitWritePipe + 281 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIsValidReserveId + 282 => { + // IdRef + out.push(print_id(operands)?); + } + // OpGetNumPipePackets + 283 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGetMaxPipePackets + 284 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupReserveReadPipePackets + 285 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupReserveWritePipePackets + 286 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupCommitReadPipe + 287 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupCommitWritePipe + 288 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpEnqueueMarker + 291 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpEnqueueKernel + 292 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGetKernelNDrangeSubGroupCount + 293 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGetKernelNDrangeMaxSubGroupSize + 294 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGetKernelWorkGroupSize + 295 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGetKernelPreferredWorkGroupSizeMultiple + 296 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRetainEvent + 297 => { + // IdRef + out.push(print_id(operands)?); + } + // OpReleaseEvent + 298 => { + // IdRef + out.push(print_id(operands)?); + } + // OpCreateUserEvent + 299 => { + } + // OpIsValidEvent + 300 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSetUserEventStatus + 301 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCaptureEventProfilingInfo + 302 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGetDefaultQueue + 303 => { + } + // OpBuildNDRange + 304 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageSparseSampleImplicitLod + 305 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseSampleExplicitLod + 306 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSparseSampleDrefImplicitLod + 307 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseSampleDrefExplicitLod + 308 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSparseSampleProjImplicitLod + 309 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseSampleProjExplicitLod + 310 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSparseSampleProjDrefImplicitLod + 311 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseSampleProjDrefExplicitLod + 312 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + // OpImageSparseFetch + 313 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseGather + 314 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseDrefGather + 315 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpImageSparseTexelsResident + 316 => { + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicFlagTestAndSet + 318 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpAtomicFlagClear + 319 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpImageSparseRead + 320 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpSizeOf + 321 => { + // IdRef + out.push(print_id(operands)?); + } + // OpTypePipeStorage + 322 => { + } + // OpConstantPipeStorage + 323 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpCreatePipeFromPipeStorage + 324 => { + // IdRef + out.push(print_id(operands)?); + } + // OpGetKernelLocalSizeForSubgroupCount + 325 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGetKernelMaxNumSubgroups + 326 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeNamedBarrier + 327 => { + } + // OpNamedBarrierInitialize + 328 => { + // IdRef + out.push(print_id(operands)?); + } + // OpMemoryNamedBarrier + 329 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpModuleProcessed + 330 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpExecutionModeId + 331 => { + // IdRef + out.push(print_id(operands)?); + // ExecutionMode + out.push(enum_to_str("ExecutionMode", operands.read_u32()?)?); + } + // OpDecorateId + 332 => { + // IdRef + out.push(print_id(operands)?); + // Decoration + out.push(enum_to_str("Decoration", operands.read_u32()?)?); + } + // OpGroupNonUniformElect + 333 => { + // IdScope + out.push(print_id(operands)?); + } + // OpGroupNonUniformAll + 334 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformAny + 335 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformAllEqual + 336 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBroadcast + 337 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBroadcastFirst + 338 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBallot + 339 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformInverseBallot + 340 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBallotBitExtract + 341 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBallotBitCount + 342 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBallotFindLSB + 343 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformBallotFindMSB + 344 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformShuffle + 345 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformShuffleXor + 346 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformShuffleUp + 347 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformShuffleDown + 348 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformIAdd + 349 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformFAdd + 350 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformIMul + 351 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformFMul + 352 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformSMin + 353 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformUMin + 354 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformFMin + 355 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformSMax + 356 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformUMax + 357 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformFMax + 358 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformBitwiseAnd + 359 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformBitwiseOr + 360 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformBitwiseXor + 361 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformLogicalAnd + 362 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformLogicalOr + 363 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformLogicalXor + 364 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpGroupNonUniformQuadBroadcast + 365 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformQuadSwap + 366 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCopyLogical + 400 => { + // IdRef + out.push(print_id(operands)?); + } + // OpPtrEqual + 401 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpPtrNotEqual + 402 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpPtrDiff + 403 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpColorAttachmentReadEXT + 4160 => { + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpDepthAttachmentReadEXT + 4161 => { + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpStencilAttachmentReadEXT + 4162 => { + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpSubgroupBallotKHR + 4421 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupFirstInvocationKHR + 4422 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAllKHR + 4428 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAnyKHR + 4429 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAllEqualKHR + 4430 => { + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformRotateKHR + 4431 => { + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpSubgroupReadInvocationKHR + 4432 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTraceRayKHR + 4445 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpExecuteCallableKHR + 4446 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpConvertUToAccelerationStructureKHR + 4447 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSDotKHR + 4450 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PackedVectorFormat ? + if !operands.is_empty() { + out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + } + } + // OpUDotKHR + 4451 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PackedVectorFormat ? + if !operands.is_empty() { + out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + } + } + // OpSUDotKHR + 4452 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PackedVectorFormat ? + if !operands.is_empty() { + out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + } + } + // OpSDotAccSatKHR + 4453 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PackedVectorFormat ? + if !operands.is_empty() { + out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + } + } + // OpUDotAccSatKHR + 4454 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PackedVectorFormat ? + if !operands.is_empty() { + out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + } + } + // OpSUDotAccSatKHR + 4455 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // PackedVectorFormat ? + if !operands.is_empty() { + out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + } + } + // OpTypeCooperativeMatrixKHR + 4456 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCooperativeMatrixLoadKHR + 4457 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpCooperativeMatrixStoreKHR + 4458 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpCooperativeMatrixMulAddKHR + 4459 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // CooperativeMatrixOperands ? + if !operands.is_empty() { + out.push(enum_to_str("CooperativeMatrixOperands", operands.read_u32()?)?); + } + } + // OpCooperativeMatrixLengthKHR + 4460 => { + // IdRef + out.push(print_id(operands)?); + } + // OpTypeRayQueryKHR + 4472 => { + } + // OpRayQueryInitializeKHR + 4473 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryTerminateKHR + 4474 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGenerateIntersectionKHR + 4475 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryConfirmIntersectionKHR + 4476 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryProceedKHR + 4477 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionTypeKHR + 4479 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageSampleWeightedQCOM + 4480 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageBoxFilterQCOM + 4481 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageBlockMatchSSDQCOM + 4482 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpImageBlockMatchSADQCOM + 4483 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupIAddNonUniformAMD + 5000 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFAddNonUniformAMD + 5001 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFMinNonUniformAMD + 5002 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupUMinNonUniformAMD + 5003 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupSMinNonUniformAMD + 5004 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFMaxNonUniformAMD + 5005 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupUMaxNonUniformAMD + 5006 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupSMaxNonUniformAMD + 5007 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFragmentMaskFetchAMD + 5011 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFragmentFetchAMD + 5012 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReadClockKHR + 5056 => { + // IdScope + out.push(print_id(operands)?); + } + // OpFinalizeNodePayloadsAMDX + 5075 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFinishWritingNodePayloadAMDX + 5078 => { + // IdRef + out.push(print_id(operands)?); + } + // OpInitializeNodePayloadsAMDX + 5090 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordHitMotionNV + 5249 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordHitWithIndexMotionNV + 5250 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordMissMotionNV + 5251 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetWorldToObjectNV + 5252 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetObjectToWorldNV + 5253 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetObjectRayDirectionNV + 5254 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetObjectRayOriginNV + 5255 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectTraceRayMotionNV + 5256 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetShaderRecordBufferHandleNV + 5257 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetShaderBindingTableRecordIndexNV + 5258 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordEmptyNV + 5259 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectTraceRayNV + 5260 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordHitNV + 5261 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordHitWithIndexNV + 5262 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectRecordMissNV + 5263 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectExecuteShaderNV + 5264 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetCurrentTimeNV + 5265 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetAttributesNV + 5266 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetHitKindNV + 5267 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetPrimitiveIndexNV + 5268 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetGeometryIndexNV + 5269 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetInstanceIdNV + 5270 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetInstanceCustomIndexNV + 5271 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetWorldRayDirectionNV + 5272 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetWorldRayOriginNV + 5273 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetRayTMaxNV + 5274 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectGetRayTMinNV + 5275 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectIsEmptyNV + 5276 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectIsHitNV + 5277 => { + // IdRef + out.push(print_id(operands)?); + } + // OpHitObjectIsMissNV + 5278 => { + // IdRef + out.push(print_id(operands)?); + } + // OpReorderThreadWithHitObjectNV + 5279 => { + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpReorderThreadWithHintNV + 5280 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeHitObjectNV + 5281 => { + } + // OpImageSampleFootprintNV + 5283 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // ImageOperands ? + if !operands.is_empty() { + out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + } + } + // OpEmitMeshTasksEXT + 5294 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpSetMeshOutputsEXT + 5295 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupNonUniformPartitionNV + 5296 => { + // IdRef + out.push(print_id(operands)?); + } + // OpWritePackedPrimitiveIndices4x8NV + 5299 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFetchMicroTriangleVertexPositionNV + 5300 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFetchMicroTriangleVertexBarycentricNV + 5301 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpReportIntersectionKHR + 5334 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTraceNV + 5337 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTraceMotionNV + 5338 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTraceRayMotionNV + 5339 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionTriangleVertexPositionsKHR + 5340 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeAccelerationStructureKHR + 5341 => { + } + // OpExecuteCallableNV + 5344 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeCooperativeMatrixNV + 5358 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCooperativeMatrixLoadNV + 5359 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpCooperativeMatrixStoreNV + 5360 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // MemoryAccess ? + if !operands.is_empty() { + out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + } + } + // OpCooperativeMatrixMulAddNV + 5361 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpCooperativeMatrixLengthNV + 5362 => { + // IdRef + out.push(print_id(operands)?); + } + // OpIsHelperInvocationEXT + 5381 => { + } + // OpConvertUToImageNV + 5391 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertUToSamplerNV + 5392 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertImageToUNV + 5393 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertSamplerToUNV + 5394 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertUToSampledImageNV + 5395 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertSampledImageToUNV + 5396 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSamplerImageAddressingModeNV + 5397 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpSubgroupShuffleINTEL + 5571 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupShuffleDownINTEL + 5572 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupShuffleUpINTEL + 5573 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupShuffleXorINTEL + 5574 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupBlockReadINTEL + 5575 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupBlockWriteINTEL + 5576 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupImageBlockReadINTEL + 5577 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupImageBlockWriteINTEL + 5578 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupImageMediaBlockReadINTEL + 5580 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupImageMediaBlockWriteINTEL + 5581 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUCountLeadingZerosINTEL + 5585 => { + // IdRef + out.push(print_id(operands)?); + } + // OpUCountTrailingZerosINTEL + 5586 => { + // IdRef + out.push(print_id(operands)?); + } + // OpAbsISubINTEL + 5587 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAbsUSubINTEL + 5588 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIAddSatINTEL + 5589 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUAddSatINTEL + 5590 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIAverageINTEL + 5591 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUAverageINTEL + 5592 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIAverageRoundedINTEL + 5593 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUAverageRoundedINTEL + 5594 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpISubSatINTEL + 5595 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUSubSatINTEL + 5596 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpIMul32x16INTEL + 5597 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpUMul32x16INTEL + 5598 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpConstantFunctionPointerINTEL + 5600 => { + // IdRef + out.push(print_id(operands)?); + } + // OpFunctionPointerCallINTEL + 5601 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpAsmTargetINTEL + 5609 => { + // LiteralString + out.push(print_str(operands)?); + } + // OpAsmINTEL + 5610 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralString + out.push(print_str(operands)?); + // LiteralString + out.push(print_str(operands)?); + } + // OpAsmCallINTEL + 5611 => { + // IdRef + out.push(print_id(operands)?); + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpAtomicFMinEXT + 5614 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicFMaxEXT + 5615 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAssumeTrueKHR + 5630 => { + // IdRef + out.push(print_id(operands)?); + } + // OpExpectKHR + 5631 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpDecorateStringGOOGLE + 5632 => { + // IdRef + out.push(print_id(operands)?); + // Decoration + out.push(enum_to_str("Decoration", operands.read_u32()?)?); + } + // OpMemberDecorateStringGOOGLE + 5633 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // Decoration + out.push(enum_to_str("Decoration", operands.read_u32()?)?); + } + // OpVmeImageINTEL + 5699 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeVmeImageINTEL + 5700 => { + // IdRef + out.push(print_id(operands)?); + } + // OpTypeAvcImePayloadINTEL + 5701 => { + } + // OpTypeAvcRefPayloadINTEL + 5702 => { + } + // OpTypeAvcSicPayloadINTEL + 5703 => { + } + // OpTypeAvcMcePayloadINTEL + 5704 => { + } + // OpTypeAvcMceResultINTEL + 5705 => { + } + // OpTypeAvcImeResultINTEL + 5706 => { + } + // OpTypeAvcImeResultSingleReferenceStreamoutINTEL + 5707 => { + } + // OpTypeAvcImeResultDualReferenceStreamoutINTEL + 5708 => { + } + // OpTypeAvcImeSingleReferenceStreaminINTEL + 5709 => { + } + // OpTypeAvcImeDualReferenceStreaminINTEL + 5710 => { + } + // OpTypeAvcRefResultINTEL + 5711 => { + } + // OpTypeAvcSicResultINTEL + 5712 => { + } + // OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL + 5713 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL + 5714 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL + 5715 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceSetInterShapePenaltyINTEL + 5716 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL + 5717 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceSetInterDirectionPenaltyINTEL + 5718 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL + 5719 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL + 5720 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL + 5721 => { + } + // OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL + 5722 => { + } + // OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL + 5723 => { + } + // OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL + 5724 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL + 5725 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL + 5726 => { + } + // OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL + 5727 => { + } + // OpSubgroupAvcMceSetAcOnlyHaarINTEL + 5728 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL + 5729 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL + 5730 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL + 5731 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceConvertToImePayloadINTEL + 5732 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceConvertToImeResultINTEL + 5733 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceConvertToRefPayloadINTEL + 5734 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceConvertToRefResultINTEL + 5735 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceConvertToSicPayloadINTEL + 5736 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceConvertToSicResultINTEL + 5737 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetMotionVectorsINTEL + 5738 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterDistortionsINTEL + 5739 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetBestInterDistortionsINTEL + 5740 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterMajorShapeINTEL + 5741 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterMinorShapeINTEL + 5742 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterDirectionsINTEL + 5743 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterMotionVectorCountINTEL + 5744 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterReferenceIdsINTEL + 5745 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL + 5746 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeInitializeINTEL + 5747 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeSetSingleReferenceINTEL + 5748 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeSetDualReferenceINTEL + 5749 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeRefWindowSizeINTEL + 5750 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeAdjustRefOffsetINTEL + 5751 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeConvertToMcePayloadINTEL + 5752 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeSetMaxMotionVectorCountINTEL + 5753 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL + 5754 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL + 5755 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeSetWeightedSadINTEL + 5756 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL + 5757 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithDualReferenceINTEL + 5758 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL + 5759 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL + 5760 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL + 5761 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL + 5762 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL + 5763 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL + 5764 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeConvertToMceResultINTEL + 5765 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetSingleReferenceStreaminINTEL + 5766 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetDualReferenceStreaminINTEL + 5767 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL + 5768 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeStripDualReferenceStreamoutINTEL + 5769 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL + 5770 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL + 5771 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL + 5772 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL + 5773 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL + 5774 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL + 5775 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetBorderReachedINTEL + 5776 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL + 5777 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL + 5778 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL + 5779 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL + 5780 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcFmeInitializeINTEL + 5781 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcBmeInitializeINTEL + 5782 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefConvertToMcePayloadINTEL + 5783 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefSetBidirectionalMixDisableINTEL + 5784 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefSetBilinearFilterEnableINTEL + 5785 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL + 5786 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefEvaluateWithDualReferenceINTEL + 5787 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL + 5788 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL + 5789 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcRefConvertToMceResultINTEL + 5790 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicInitializeINTEL + 5791 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicConfigureSkcINTEL + 5792 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicConfigureIpeLumaINTEL + 5793 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicConfigureIpeLumaChromaINTEL + 5794 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetMotionVectorMaskINTEL + 5795 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicConvertToMcePayloadINTEL + 5796 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL + 5797 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL + 5798 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL + 5799 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicSetBilinearFilterEnableINTEL + 5800 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL + 5801 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL + 5802 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicEvaluateIpeINTEL + 5803 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL + 5804 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicEvaluateWithDualReferenceINTEL + 5805 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL + 5806 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL + 5807 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicConvertToMceResultINTEL + 5808 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetIpeLumaShapeINTEL + 5809 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL + 5810 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL + 5811 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetPackedIpeLumaModesINTEL + 5812 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetIpeChromaModeINTEL + 5813 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL + 5814 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL + 5815 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSubgroupAvcSicGetInterRawSadsINTEL + 5816 => { + // IdRef + out.push(print_id(operands)?); + } + // OpVariableLengthArrayINTEL + 5818 => { + // IdRef + out.push(print_id(operands)?); + } + // OpSaveMemoryINTEL + 5819 => { + } + // OpRestoreMemoryINTEL + 5820 => { + // IdRef + out.push(print_id(operands)?); + } + // OpArbitraryFloatSinCosPiINTEL + 5840 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatCastINTEL + 5841 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatCastFromIntINTEL + 5842 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatCastToIntINTEL + 5843 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatAddINTEL + 5846 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatSubINTEL + 5847 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatMulINTEL + 5848 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatDivINTEL + 5849 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatGTINTEL + 5850 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatGEINTEL + 5851 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatLTINTEL + 5852 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatLEINTEL + 5853 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatEQINTEL + 5854 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatRecipINTEL + 5855 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatRSqrtINTEL + 5856 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatCbrtINTEL + 5857 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatHypotINTEL + 5858 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatSqrtINTEL + 5859 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatLogINTEL + 5860 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatLog2INTEL + 5861 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatLog10INTEL + 5862 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatLog1pINTEL + 5863 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatExpINTEL + 5864 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatExp2INTEL + 5865 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatExp10INTEL + 5866 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatExpm1INTEL + 5867 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatSinINTEL + 5868 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatCosINTEL + 5869 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatSinCosINTEL + 5870 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatSinPiINTEL + 5871 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatCosPiINTEL + 5872 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatASinINTEL + 5873 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatASinPiINTEL + 5874 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatACosINTEL + 5875 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatACosPiINTEL + 5876 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatATanINTEL + 5877 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatATanPiINTEL + 5878 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatATan2INTEL + 5879 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatPowINTEL + 5880 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatPowRINTEL + 5881 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpArbitraryFloatPowNINTEL + 5882 => { + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpLoopControlINTEL + 5887 => { + // LiteralInteger * + while !operands.is_empty() { + out.push(print_u32(operands)?); + } + } + // OpAliasDomainDeclINTEL + 5911 => { + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpAliasScopeDeclINTEL + 5912 => { + // IdRef + out.push(print_id(operands)?); + // IdRef ? + if !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpAliasScopeListDeclINTEL + 5913 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpFixedSqrtINTEL + 5923 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedRecipINTEL + 5924 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedRsqrtINTEL + 5925 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedSinINTEL + 5926 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedCosINTEL + 5927 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedSinCosINTEL + 5928 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedSinPiINTEL + 5929 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedCosPiINTEL + 5930 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedSinCosPiINTEL + 5931 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedLogINTEL + 5932 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpFixedExpINTEL + 5933 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // OpPtrCastToCrossWorkgroupINTEL + 5934 => { + // IdRef + out.push(print_id(operands)?); + } + // OpCrossWorkgroupCastToPtrINTEL + 5938 => { + // IdRef + out.push(print_id(operands)?); + } + // OpReadPipeBlockingINTEL + 5946 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpWritePipeBlockingINTEL + 5947 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpFPGARegINTEL + 5949 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetRayTMinKHR + 6016 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetRayFlagsKHR + 6017 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionTKHR + 6018 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionInstanceCustomIndexKHR + 6019 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionInstanceIdKHR + 6020 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR + 6021 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionGeometryIndexKHR + 6022 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionPrimitiveIndexKHR + 6023 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionBarycentricsKHR + 6024 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionFrontFaceKHR + 6025 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionCandidateAABBOpaqueKHR + 6026 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionObjectRayDirectionKHR + 6027 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionObjectRayOriginKHR + 6028 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetWorldRayDirectionKHR + 6029 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetWorldRayOriginKHR + 6030 => { + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionObjectToWorldKHR + 6031 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpRayQueryGetIntersectionWorldToObjectKHR + 6032 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpAtomicFAddEXT + 6035 => { + // IdRef + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // OpTypeBufferSurfaceINTEL + 6086 => { + // AccessQualifier + out.push(enum_to_str("AccessQualifier", operands.read_u32()?)?); + } + // OpTypeStructContinuedINTEL + 6090 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpConstantCompositeContinuedINTEL + 6091 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpSpecConstantCompositeContinuedINTEL + 6092 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpCompositeConstructContinuedINTEL + 6096 => { + // IdRef * + while !operands.is_empty() { + out.push(print_id(operands)?); + } + } + // OpConvertFToBF16INTEL + 6116 => { + // IdRef + out.push(print_id(operands)?); + } + // OpConvertBF16ToFINTEL + 6117 => { + // IdRef + out.push(print_id(operands)?); + } + // OpControlBarrierArriveINTEL + 6142 => { + // IdScope + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpControlBarrierWaitINTEL + 6143 => { + // IdScope + out.push(print_id(operands)?); + // IdScope + out.push(print_id(operands)?); + // IdMemorySemantics + out.push(print_id(operands)?); + } + // OpGroupIMulKHR + 6401 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupFMulKHR + 6402 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupBitwiseAndKHR + 6403 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupBitwiseOrKHR + 6404 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupBitwiseXorKHR + 6405 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupLogicalAndKHR + 6406 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupLogicalOrKHR + 6407 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + // OpGroupLogicalXorKHR + 6408 => { + // IdScope + out.push(print_id(operands)?); + // GroupOperation + out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + // IdRef + out.push(print_id(operands)?); + } + _ => bail!("unsupported opcode {}", opcode), + }; + while !operands.is_empty() { + out.push(format!("!{}", operands.read_u32()?)); + } + Ok(out) +} diff --git a/spirq-spvasm/src/lib.rs b/spirq-spvasm/src/lib.rs index 64416f7..a0616af 100644 --- a/spirq-spvasm/src/lib.rs +++ b/spirq-spvasm/src/lib.rs @@ -1,2 +1,3 @@ pub mod asm; pub mod dis; +mod generated; From 950a9881d8ffa72ebcc57bfd4d5839a353a1600a Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Tue, 19 Dec 2023 17:06:02 +0800 Subject: [PATCH 11/50] Suppress warnings --- spirq-spvasm/scripts/generate_enum_to_str.py | 1 + .../{generate_read_operand.py => generate_print_operand.py} | 0 spirq-spvasm/src/generated/enum_to_str.rs | 1 + spirq-spvasm/src/generated/print_operand.rs | 1 + 4 files changed, 3 insertions(+) rename spirq-spvasm/scripts/{generate_read_operand.py => generate_print_operand.py} (100%) diff --git a/spirq-spvasm/scripts/generate_enum_to_str.py b/spirq-spvasm/scripts/generate_enum_to_str.py index 03b4485..dcfa622 100644 --- a/spirq-spvasm/scripts/generate_enum_to_str.py +++ b/spirq-spvasm/scripts/generate_enum_to_str.py @@ -22,6 +22,7 @@ out = [] out += [ + "#[allow(unreachable_patterns)]", "use anyhow::{bail, Result};", "", "pub fn enum_to_str(ety: &str, value: u32) -> Result {", diff --git a/spirq-spvasm/scripts/generate_read_operand.py b/spirq-spvasm/scripts/generate_print_operand.py similarity index 100% rename from spirq-spvasm/scripts/generate_read_operand.py rename to spirq-spvasm/scripts/generate_print_operand.py diff --git a/spirq-spvasm/src/generated/enum_to_str.rs b/spirq-spvasm/src/generated/enum_to_str.rs index 018e471..0d032d2 100644 --- a/spirq-spvasm/src/generated/enum_to_str.rs +++ b/spirq-spvasm/src/generated/enum_to_str.rs @@ -1,3 +1,4 @@ +#[allow(unreachable_patterns)] use anyhow::{bail, Result}; pub fn enum_to_str(ety: &str, value: u32) -> Result { diff --git a/spirq-spvasm/src/generated/print_operand.rs b/spirq-spvasm/src/generated/print_operand.rs index 2151117..c49c428 100644 --- a/spirq-spvasm/src/generated/print_operand.rs +++ b/spirq-spvasm/src/generated/print_operand.rs @@ -8,6 +8,7 @@ fn print_id(operands: &mut Operands) -> Result { fn print_u32(operands: &mut Operands) -> Result { Ok(operands.read_u32()?.to_string()) } +#[allow(dead_code)] fn print_f32(operands: &mut Operands) -> Result { Ok(operands.read_f32()?.to_string()) } From 1265b0ff6873c2a362131e44018205987be28d9e Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Tue, 19 Dec 2023 17:06:46 +0800 Subject: [PATCH 12/50] Suppress warnings --- spirq-spvasm/scripts/generate_enum_to_str.py | 2 +- spirq-spvasm/src/generated/enum_to_str.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spirq-spvasm/scripts/generate_enum_to_str.py b/spirq-spvasm/scripts/generate_enum_to_str.py index dcfa622..07e65d4 100644 --- a/spirq-spvasm/scripts/generate_enum_to_str.py +++ b/spirq-spvasm/scripts/generate_enum_to_str.py @@ -22,7 +22,7 @@ out = [] out += [ - "#[allow(unreachable_patterns)]", + "#![allow(unreachable_patterns)]", "use anyhow::{bail, Result};", "", "pub fn enum_to_str(ety: &str, value: u32) -> Result {", diff --git a/spirq-spvasm/src/generated/enum_to_str.rs b/spirq-spvasm/src/generated/enum_to_str.rs index 0d032d2..8b99383 100644 --- a/spirq-spvasm/src/generated/enum_to_str.rs +++ b/spirq-spvasm/src/generated/enum_to_str.rs @@ -1,4 +1,4 @@ -#[allow(unreachable_patterns)] +#![allow(unreachable_patterns)] use anyhow::{bail, Result}; pub fn enum_to_str(ety: &str, value: u32) -> Result { From bd8824e5a6b4385ac6380705ba03ff7f4dd54cb9 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Tue, 19 Dec 2023 18:20:24 +0800 Subject: [PATCH 13/50] Test OpNop --- spirq-core/src/parse/bin.rs | 6 +- spirq-core/src/parse/instr.rs | 63 ++++++++++------ .../scripts/generate_print_operand.py | 4 +- spirq-spvasm/src/dis/disassembler.rs | 11 ++- spirq-spvasm/src/generated/print_operand.rs | 48 +++++++++++++ spirq/src/reflect.rs | 71 ++++++++++++------- 6 files changed, 146 insertions(+), 57 deletions(-) diff --git a/spirq-core/src/parse/bin.rs b/spirq-core/src/parse/bin.rs index 90510a0..f586f78 100644 --- a/spirq-core/src/parse/bin.rs +++ b/spirq-core/src/parse/bin.rs @@ -1,3 +1,4 @@ +use anyhow::Result; use std::{convert::TryInto, iter::FromIterator}; use super::Instrs; @@ -57,8 +58,9 @@ impl SpirvBinary { self.0 } - pub fn instrs(&self) -> Instrs { - Instrs::new(self.words()) + pub fn instrs(&self) -> Result { + const HEADER_LEN: usize = 5; + Instrs::new(&self.words()[HEADER_LEN..]) } pub fn header(&self) -> Option { diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index e79c98a..462cd69 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -1,40 +1,57 @@ //! SPIR-V instruction parser. +use anyhow::bail; use num_traits::FromPrimitive; use spirv::Op; use std::{borrow::Borrow, fmt, ops::Deref}; use crate::error::{anyhow, Result}; -pub struct Instrs<'a>(&'a [u32]); +pub struct Instrs<'a> { + inner: &'a [u32], + cache: Option<&'a Instr>, +} impl<'a> Instrs<'a> { - pub fn new(spv: &'a [u32]) -> Instrs<'a> { - const HEADER_LEN: usize = 5; - if spv.len() < HEADER_LEN { - return Instrs(&[] as &[u32]); - } - Instrs(&spv[HEADER_LEN..]) + pub fn new(spv: &'a [u32]) -> Result> { + let mut out = Instrs { + inner: &spv, + cache: None, + }; + out.load_next()?; + Ok(out) } -} -impl<'a> Iterator for Instrs<'a> { - type Item = &'a Instr; - fn next(&mut self) -> Option { - while let Some(head) = self.0.first() { - // Ignore nops. - let opcode = head & 0xFFFF; - if opcode == 0 { - continue; - } + fn load_next(&mut self) -> Result<()> { + let mut new_cache = None; + while let Some(head) = self.inner.first() { let len = ((*head as u32) >> 16) as usize; - if len <= self.0.len() { - let instr = Instr::new(&self.0[..len]); - self.0 = &self.0[len..]; - return Some(instr.unwrap()); + // Report zero-length instructions. + if len == 0 { + bail!("instruction length is zero"); + } + + if len <= self.inner.len() { + let instr = Instr::new(&self.inner[..len])?; + self.inner = &self.inner[len..]; + new_cache = Some(instr); } else { - return None; + if len < self.inner.len() { + bail!("instruction is truncated"); + } } + break; } - None + + self.cache = new_cache; + Ok(()) + } + + pub fn peek(&self) -> Option<&'a Instr> { + self.cache.clone() + } + pub fn next(&mut self) -> Result> { + let last_cache = self.cache.take(); + self.load_next()?; + return Ok(last_cache); } } diff --git a/spirq-spvasm/scripts/generate_print_operand.py b/spirq-spvasm/scripts/generate_print_operand.py index 4ae8355..941c131 100644 --- a/spirq-spvasm/scripts/generate_print_operand.py +++ b/spirq-spvasm/scripts/generate_print_operand.py @@ -30,6 +30,7 @@ "fn print_u32(operands: &mut Operands) -> Result {", " Ok(operands.read_u32()?.to_string())", "}", + "#[allow(dead_code)]", "fn print_f32(operands: &mut Operands) -> Result {", " Ok(operands.read_f32()?.to_string())", "}", @@ -83,9 +84,6 @@ ] for opcode, (opname, op_operand_kinds) in operand_kinds.items(): - if len(op_operand_kinds) == 0: - continue - out += [ f" // {opname}", f" {opcode} => {{", diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index cb8b74f..861ffab 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -55,7 +55,7 @@ impl Disassembler { } fn print_lines(&self, instrs: &mut Instrs) -> Result> { let mut out = Vec::new(); - for instr in instrs { + while let Some(instr) = instrs.next()? { out.push(self.print_line(instr)?); } Ok(out) @@ -73,7 +73,7 @@ impl Disassembler { out.push(format!("; Schema: {:x}", header.schema)); } - let instrs = self.print_lines(&mut spv.instrs())?; + let instrs = self.print_lines(&mut spv.instrs()?)?; out.extend(instrs); Ok(out.join("\n")) } @@ -95,5 +95,12 @@ mod test { #[test] fn test_nop() { + let spv = [ + 0x07230203, 0x00010000, 0x00000008, 0x0000001, 0x00000000, + 0x00010000 + ].iter().map(|x| *x as u32).collect::>(); + let spv = SpirvBinary::from(spv); + let out = Disassembler::new().disassemble(&spv).unwrap(); + assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0\nOpNop"); } } diff --git a/spirq-spvasm/src/generated/print_operand.rs b/spirq-spvasm/src/generated/print_operand.rs index c49c428..6d5878a 100644 --- a/spirq-spvasm/src/generated/print_operand.rs +++ b/spirq-spvasm/src/generated/print_operand.rs @@ -59,6 +59,9 @@ fn print_pair_u32_id_list(operands: &mut Operands) -> Result> { pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> { let mut out: Vec = Vec::new(); match opcode { + // OpNop + 0 => { + } // OpUndef 1 => { } @@ -358,6 +361,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFunctionParameter 55 => { } + // OpFunctionEnd + 56 => { + } // OpFunctionCall 57 => { // IdRef @@ -1440,6 +1446,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); } + // OpEmitVertex + 218 => { + } + // OpEndPrimitive + 219 => { + } // OpEmitStreamVertex 220 => { // IdRef @@ -1699,11 +1711,20 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.extend(print_pair_u32_id_list(operands)?); } } + // OpKill + 252 => { + } + // OpReturn + 253 => { + } // OpReturnValue 254 => { // IdRef out.push(print_id(operands)?); } + // OpUnreachable + 255 => { + } // OpLifetimeStart 256 => { // IdRef @@ -2270,6 +2291,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); } + // OpNoLine + 317 => { + } // OpAtomicFlagTestAndSet 318 => { // IdRef @@ -2780,6 +2804,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); } } + // OpTerminateInvocation + 4416 => { + } // OpSubgroupBallotKHR 4421 => { // IdRef @@ -2862,6 +2889,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); } + // OpIgnoreIntersectionKHR + 4448 => { + } + // OpTerminateRayKHR + 4449 => { + } // OpSDotKHR 4450 => { // IdRef @@ -3627,6 +3660,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); } + // OpIgnoreIntersectionNV + 5335 => { + } + // OpTerminateRayNV + 5336 => { + } // OpTraceNV 5337 => { // IdRef @@ -3776,6 +3815,15 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); } + // OpBeginInvocationInterlockEXT + 5364 => { + } + // OpEndInvocationInterlockEXT + 5365 => { + } + // OpDemoteToHelperInvocationEXT + 5380 => { + } // OpIsHelperInvocationEXT 5381 => { } diff --git a/spirq/src/reflect.rs b/spirq/src/reflect.rs index 5f99819..538eff8 100644 --- a/spirq/src/reflect.rs +++ b/spirq/src/reflect.rs @@ -4,6 +4,7 @@ use std::convert::TryFrom; use fnv::{FnvHashMap as HashMap, FnvHashSet as HashSet}; use num_traits::FromPrimitive; +use spirq_core::parse::Instrs; use crate::{ annotation::{DecorationRegistry, NameRegistry}, @@ -14,7 +15,7 @@ use crate::{ func::{ExecutionMode, Function, FunctionRegistry}, inspect::Inspector, instr::*, - parse::{Instr, Instrs}, + parse::Instr, reflect_cfg::ReflectConfig, spirv::{self, Op}, ty::{ @@ -666,45 +667,60 @@ impl Inspector for FunctionInspector { } } +struct NopFilter<'a>(Instrs<'a>); +impl<'a> NopFilter<'a> { + fn next(&mut self) -> Result> { + while let Some(instr) = self.0.next()? { + if instr.op() != Op::Nop { + return Ok(Some(instr)); + } + } + Ok(None) + } + fn peek(&self) -> Option<&'a Instr> { + self.0.peek() + } +} + pub fn reflect<'a, I: Inspector>( itm: &mut ReflectIntermediate<'a>, mut inspector: I, ) -> Result> { // Don't change the order. See _2.4 Logical Layout of a Module_ of the // SPIR-V specification for more information. - let mut instrs = Instrs::new(itm.cfg.spv.words()).peekable(); + let mut instrs = NopFilter(itm.cfg.spv.instrs()?); let mut entry_point_declrs = HashMap::default(); // 1. All OpCapability instructions. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::Capability { - instrs.next(); + instrs.next()?; } else { break; } } // 2. Optional OpExtension instructions (extensions to SPIR-V). - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::Extension { - instrs.next(); + instrs.next()?; } else { break; } } // 3. Optional OpExtInstImport instructions. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::ExtInstImport { let op = OpExtInstImport::try_from(instr)?; itm.interp .import_ext_instr_set(op.instr_set_id, op.name.to_owned())?; - instrs.next(); + instrs.next()?; } else { break; } } // 4. The single required OpMemoryModel instruction. - if let Some(instr) = instrs.next() { + if let Some(instr) = instrs.peek() { if instr.op() == Op::MemoryModel { let op = OpMemoryModel::try_from(instr)?; match op.addr_model { @@ -717,6 +733,7 @@ pub fn reflect<'a, I: Inspector>( spirv::MemoryModel::Vulkan => {} _ => return Err(anyhow!("unsupported memory model")), } + instrs.next()?; } else { return Err(anyhow!("expected OpMemoryModel, but got {:?}", instr.op())); } @@ -724,7 +741,7 @@ pub fn reflect<'a, I: Inspector>( return Err(anyhow!("expected OpMemoryModel, but got nothing")); } // 5. All entry point declarations, using OpEntryPoint. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::EntryPoint { let op = OpEntryPoint::try_from(instr)?; let entry_point_declr = EntryPointDeclartion { @@ -739,14 +756,14 @@ pub fn reflect<'a, I: Inspector>( e.insert(entry_point_declr); } } - instrs.next(); + instrs.next()?; } else { break; } } // 6. All execution-mode declarations, using OpExecutionMode or // OpExecutionModeId. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { let op = instr.op(); match op { Op::ExecutionMode | Op::ExecutionModeId => { @@ -774,7 +791,7 @@ pub fn reflect<'a, I: Inspector>( .ok_or(anyhow!("execution mode for non-existing entry point"))? .exec_modes .push(exec_mode_declr); - instrs.next(); + instrs.next()?; } _ => break, } @@ -785,14 +802,14 @@ pub fn reflect<'a, I: Inspector>( // OpSourceContinued, without forward references. // b. All OpName and all OpMemberName. // c. All OpModuleProcessed instructions. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { match instr.op() { Op::String | Op::SourceExtension | Op::Source | Op::SourceContinued | Op::ModuleProcessed => { - instrs.next(); + instrs.next()?; } Op::Name => { let op = OpName::try_from(instr)?; @@ -800,7 +817,7 @@ pub fn reflect<'a, I: Inspector>( // Ignore empty names. itm.name_reg.set(op.target_id, op.name); } - instrs.next(); + instrs.next()?; } Op::MemberName => { let op = OpMemberName::try_from(instr)?; @@ -808,27 +825,27 @@ pub fn reflect<'a, I: Inspector>( itm.name_reg .set_member(op.target_id, op.member_idx, op.name); } - instrs.next(); + instrs.next()?; } _ => break, } } // 8. All annotation instructions: // a. All decoration instructions. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { match instr.op() { Op::Decorate => { let op = OpDecorate::try_from(instr)?; let deco = op.deco; itm.deco_reg.set(op.target_id, deco, op.params)?; - instrs.next(); + instrs.next()?; } Op::MemberDecorate => { let op = OpMemberDecorate::try_from(instr)?; let deco = op.deco; itm.deco_reg .set_member(op.target_id, op.member_idx, deco, op.params)?; - instrs.next(); + instrs.next()?; } Op::DecorationGroup | Op::GroupDecorate @@ -836,7 +853,7 @@ pub fn reflect<'a, I: Inspector>( | Op::DecorateId | Op::DecorateString | Op::MemberDecorateString => { - instrs.next(); + instrs.next()?; } _ => break, }; @@ -850,10 +867,10 @@ pub fn reflect<'a, I: Inspector>( // order. This section is the first section to allow use of: // a. OpLine and OpNoLine debug information. // b. Non-semantic instructions with OpExtInst. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { let opcode = instr.op(); if let Op::Line | Op::NoLine = opcode { - instrs.next(); + instrs.next()?; continue; } if is_ty_op(opcode) { @@ -865,7 +882,7 @@ pub fn reflect<'a, I: Inspector>( } else { break; } - instrs.next(); + instrs.next()?; } // 10. All function declarations ("declarations" are functions without a // body; there is no forward declaration to a function with a body). @@ -881,14 +898,14 @@ pub fn reflect<'a, I: Inspector>( // d. Block. // e. ... // f. Function end, using OpFunctionEnd. - while let Some(instr) = instrs.peek().cloned() { + while let Some(instr) = instrs.peek() { let opcode = instr.op(); if let Op::Line | Op::NoLine = opcode { - instrs.next(); + instrs.next()?; continue; } inspector.inspect(itm, instr)?; - instrs.next(); + instrs.next()?; } itm.collect_entry_points(entry_point_declrs) From 89dacdc704a35ecf36f621066f70e14d17d0f56b Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 15:14:10 +0800 Subject: [PATCH 14/50] Fixed disassembler --- Cargo.lock | 24 + spirq-spvasm/Cargo.toml | 4 + .../scripts/generate_print_operand.py | 205 +- spirq-spvasm/src/dis/disassembler.rs | 15 +- spirq-spvasm/src/dis/mod.rs | 2 + spirq-spvasm/src/dis/test.rs | 235 + spirq-spvasm/src/generated/print_operand.rs | 3795 ++++++++++++++++- 7 files changed, 4107 insertions(+), 173 deletions(-) create mode 100644 spirq-spvasm/src/dis/test.rs diff --git a/Cargo.lock b/Cargo.lock index ad02788..5f360a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,6 +84,12 @@ dependencies = [ "cc", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "errno" version = "0.3.5" @@ -223,6 +229,16 @@ version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -381,7 +397,9 @@ name = "spirq-spvasm" version = "0.1.0" dependencies = [ "anyhow", + "inline-spirv", "num-traits", + "pretty_assertions", "spirq-core", ] @@ -621,3 +639,9 @@ name = "windows_x86_64_msvc" version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" diff --git a/spirq-spvasm/Cargo.toml b/spirq-spvasm/Cargo.toml index 19cc5ed..070b253 100644 --- a/spirq-spvasm/Cargo.toml +++ b/spirq-spvasm/Cargo.toml @@ -21,3 +21,7 @@ maintenance = { status = "actively-developed" } anyhow = "1.0" num-traits = "0.2" spirq-core = { version = "1.0.0", path = "../spirq-core" } + +[dev-dependencies] +inline-spirv = "0.1" +pretty_assertions = "1.4" diff --git a/spirq-spvasm/scripts/generate_print_operand.py b/spirq-spvasm/scripts/generate_print_operand.py index 941c131..ed489d4 100644 --- a/spirq-spvasm/scripts/generate_print_operand.py +++ b/spirq-spvasm/scripts/generate_print_operand.py @@ -1,9 +1,10 @@ import json +from typing import List, Optional with open("assets/spirv/spirv.core.grammar.json") as f: j = json.load(f) -operand_kinds = {} +ops = {} for instr in j["instructions"]: opcode = instr["opcode"] opname = instr["opname"] @@ -15,7 +16,38 @@ kind = operand["kind"] quantifier = operand["quantifier"] if "quantifier" in operand else None op_operand_kinds.append((kind, quantifier)) - operand_kinds[opcode] = opname, op_operand_kinds + ops[opcode] = opname, op_operand_kinds + +operand_parameters = {} +for operand_kind in j["operand_kinds"]: + category = operand_kind["category"] + kind = operand_kind["kind"] + + enum_parameters = {} + if category == "BitEnum": + enumerants = operand_kind["enumerants"] + for enumerant in enumerants: + value = enumerant["value"] + parameter_name = enumerant["enumerant"] + if "parameters" in enumerant: + parameters = [p["kind"] for p in enumerant["parameters"]] + else: + parameters = [] + enum_parameters[value] = parameter_name, parameters + elif category == "ValueEnum": + enumerants = operand_kind["enumerants"] + for enumerant in enumerants: + value = enumerant["value"] + parameter_name = enumerant["enumerant"] + if "parameters" in enumerant: + parameters = [p["kind"] for p in enumerant["parameters"]] + else: + parameters = [] + enum_parameters[value] = parameter_name, parameters + else: + continue + operand_parameters[kind] = category, enum_parameters + out = [] @@ -78,81 +110,138 @@ " Ok(out)", "}", "", - "pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> {", - " let mut out: Vec = Vec::new();", - " match opcode {", ] -for opcode, (opname, op_operand_kinds) in operand_kinds.items(): + +def print_operand(kind: str, quantifier: Optional[str], indent: int) -> List[str]: + padding = " " * (indent * 4) + + out = [] out += [ - f" // {opname}", - f" {opcode} => {{", + padding + f"// {kind}" + (f" {quantifier}" if quantifier else ""), ] - for kind, quantifier in op_operand_kinds: - padding = " " * 12 - if kind in ["IdResult", "IdResultType"]: - continue + if quantifier == "*": + out += [ + padding + "while !operands.is_empty() {", + ] + padding += " " + elif quantifier == "?": + out += [ + padding + "if !operands.is_empty() {", + ] + padding += " " + elif quantifier is None: + pass + else: + raise RuntimeError(f"unknown quantifier {quantifier}") + + # Literal + if kind == "LiteralInteger": + out += [padding + "out.push(print_u32(operands)?);"] + elif kind == "LiteralFloat": + out += [padding + "out.push(print_f32(operands)?);"] + elif kind == "LiteralString": + out += [padding + "out.push(print_str(operands)?);"] + elif kind == "LiteralContextDependentNumber": + out += [padding + "out.extend(print_list(operands)?);"] + elif kind.startswith("Literal"): + out += [padding + "out.push(print_u32(operands)?);"] + # Id + elif kind.startswith("Id"): + out += [padding + "out.push(print_id(operands)?);"] + # Pair + elif kind == "PairIdRefIdRef": + out += [padding + "out.extend(print_pair_id_id_list(operands)?);"] + elif kind == "PairIdRefLiteralInteger": + out += [padding + "out.extend(print_pair_id_u32_list(operands)?);"] + elif kind == "PairLiteralIntegerIdRef": + out += [padding + "out.extend(print_pair_u32_id_list(operands)?);"] + # Enum + else: + out += [padding + f"out.extend(print_enum_{kind}(operands)?);"] + if quantifier == "*": out += [ - padding + f"// {kind}" + (f" {quantifier}" if quantifier else ""), + padding[:-4] + "}", ] + elif quantifier == "?": + out += [ + padding[:-4] + "}", + ] + elif quantifier is None: + pass + else: + raise RuntimeError(f"unknown quantifier {quantifier}") + + return out - if quantifier == "*": + +for kind, (category, parameters) in operand_parameters.items(): + out += [ + "#[allow(non_snake_case)]", + "#[allow(dead_code)]", + f"fn print_enum_{kind}(operands: &mut Operands) -> Result> {{", + " let value = operands.read_u32()?;", + " #[allow(unused_mut)]", + f' let mut out = vec![enum_to_str(&"{kind}", value)?];', + ] + if category == "ValueEnum": + out += [ + " match value {", + ] + for value, (parameter_name, params) in parameters.items(): out += [ - padding + "while !operands.is_empty() {", + f" // {parameter_name}", + f" {value} => {{", ] - padding += " " - elif quantifier == "?": + for i, param in enumerate(params): + out += print_operand(param, None, 3) + out += [ - padding + "if !operands.is_empty() {", + " }", ] - padding += " " - elif quantifier is None: - pass - else: - raise RuntimeError(f"unknown quantifier {quantifier}") - - # Literal - if kind == "LiteralInteger": - out += [padding + "out.push(print_u32(operands)?);"] - elif kind == "LiteralFloat": - out += [padding + "out.push(print_f32(operands)?);"] - elif kind == "LiteralString": - out += [padding + "out.push(print_str(operands)?);"] - elif kind == "LiteralContextDependentNumber": - out += [padding + "out.extend(print_list(operands)?);"] - elif kind.startswith("Literal"): - out += [padding + "out.push(print_u32(operands)?);"] - # Id - elif kind.startswith("Id"): - out += [padding + "out.push(print_id(operands)?);"] - # Pair - elif kind == "PairIdRefIdRef": - out += [padding + "out.extend(print_pair_id_id_list(operands)?);"] - elif kind == "PairIdRefLiteralInteger": - out += [padding + "out.extend(print_pair_id_u32_list(operands)?);"] - elif kind == "PairLiteralIntegerIdRef": - out += [padding + "out.extend(print_pair_u32_id_list(operands)?);"] - # Enum - else: + out += [ + " _ => {},", + " }", + ] + elif category == "BitEnum": + for value, (parameter_name, params) in parameters.items(): out += [ - padding + f'out.push(enum_to_str("{kind}", operands.read_u32()?)?);' + f" // {parameter_name}", + f" if value & {value} != 0 {{", ] + for i, param in enumerate(params): + out += print_operand(param, None, 2) - if quantifier == "*": - out += [ - padding[:-4] + "}", - ] - elif quantifier == "?": out += [ - padding[:-4] + "}", + " }", ] - elif quantifier is None: - pass - else: - raise RuntimeError(f"unknown quantifier {quantifier}") + else: + raise RuntimeError(f"unsupported enum category: {category}") + + out += [ + " Ok(out)", + "}", + "", + ] + +out += [ + "pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> {", + " let mut out: Vec = Vec::new();", + " match opcode {", +] + +for opcode, (opname, op_operand_kinds) in ops.items(): + out += [ + f" // {opname}", + f" {opcode} => {{", + ] + for kind, quantifier in op_operand_kinds: + if kind in ["IdResult", "IdResultType"]: + continue + out += print_operand(kind, quantifier, 3) # Deal with extra operands. We don't know what they are but we can print them as u32 anyway. out += [ " }", diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 861ffab..462ffcf 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use spirq_core::parse::{Instr, SpirvBinary, Instrs}; +use spirq_core::{parse::{Instr, SpirvBinary, Instrs, Operands}, spirv::Op}; use crate::generated; pub struct Disassembler { @@ -17,8 +17,8 @@ impl Disassembler { return self } - fn print_operands(&self, instr: &Instr) -> Result { - let operands = generated::print_operand(instr.opcode(), &mut instr.operands())?; + fn print_operands(&self, opcode: u32, operands: &mut Operands<'_>) -> Result { + let operands = generated::print_operand(opcode, operands)?; let out = operands.join(" "); Ok(out) } @@ -45,12 +45,17 @@ impl Disassembler { if let Some(result_id) = result_id { out = format!("%{} = ", result_id); } - out.push_str(&self.print_opcode(opcode).unwrap()); + out.push_str(&self.print_opcode(opcode)?); if let Some(result_type_id) = result_type_id { out.push_str(&format!(" %{}", result_type_id)); } - out.push_str(&self.print_operands(instr)?); + let operands_ = self.print_operands(opcode, &mut operands)?; + if !operands_.is_empty() { + out.push(' '); + out.push_str(&operands_); + } + dbg!(&out); Ok(out) } fn print_lines(&self, instrs: &mut Instrs) -> Result> { diff --git a/spirq-spvasm/src/dis/mod.rs b/spirq-spvasm/src/dis/mod.rs index 8492a5d..05ccffb 100644 --- a/spirq-spvasm/src/dis/mod.rs +++ b/spirq-spvasm/src/dis/mod.rs @@ -1,3 +1,5 @@ mod disassembler; +#[cfg(test)] +mod test; pub use disassembler::Disassembler; diff --git a/spirq-spvasm/src/dis/test.rs b/spirq-spvasm/src/dis/test.rs new file mode 100644 index 0000000..6e862c6 --- /dev/null +++ b/spirq-spvasm/src/dis/test.rs @@ -0,0 +1,235 @@ +use super::Disassembler; +use inline_spirv::include_spirv; +use pretty_assertions::assert_eq; +use spirq_core::parse::SpirvBinary; + +#[test] +fn test_disassembler() { + let actual = Disassembler::new(); + let spv = include_bytes!("../../../assets/moon.spv"); + let spvasm = actual.disassemble(&SpirvBinary::from(spv.as_ref())).unwrap(); + println!("{}", spvasm); + let expect = r#"OpCapability Shader +OpCapability RuntimeDescriptorArray +OpExtension "SPV_EXT_descriptor_indexing" +%1 = OpExtInstImport "GLSL.std.450" +OpMemoryModel Logical GLSL450 +OpEntryPoint Fragment %PSMain "PSMain" %in_var_POSITION0 %in_var_TEXCOORD0 %in_var_NORMAL0 %in_var_TEXCOORD1 %out_var_SV_Target0 +OpExecutionMode %PSMain OriginUpperLeft +OpSource HLSL 660 +OpName %type_PushConstant_PushConstant "type.PushConstant.PushConstant" +OpMemberName %type_PushConstant_PushConstant 0 "combined_matrix" +OpMemberName %type_PushConstant_PushConstant 1 "camera_pos" +OpName %constant "constant" +OpName %type_2d_image "type.2d.image" +OpName %tex "tex" +OpName %type_sampler "type.sampler" +OpName %samp "samp" +OpName %type_StructuredBuffer_MaterialInfo "type.StructuredBuffer.MaterialInfo" +OpName %MaterialInfo "MaterialInfo" +OpMemberName %MaterialInfo 0 "base_color_factor" +OpMemberName %MaterialInfo 1 "emissive_factor" +OpMemberName %MaterialInfo 2 "metallic_factor" +OpMemberName %MaterialInfo 3 "roughness_factor" +OpMemberName %MaterialInfo 4 "albedo_texture" +OpMemberName %MaterialInfo 5 "normal_texture" +OpMemberName %MaterialInfo 6 "emissive_texture" +OpName %infos "infos" +OpName %in_var_POSITION0 "in.var.POSITION0" +OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" +OpName %in_var_NORMAL0 "in.var.NORMAL0" +OpName %in_var_TEXCOORD1 "in.var.TEXCOORD1" +OpName %out_var_SV_Target0 "out.var.SV_Target0" +OpName %PSMain "PSMain" +OpName %type_sampled_image "type.sampled.image" +OpDecorate %in_var_TEXCOORD1 Flat +OpDecorate %in_var_POSITION0 Location 0 +OpDecorate %in_var_TEXCOORD0 Location 1 +OpDecorate %in_var_NORMAL0 Location 2 +OpDecorate %in_var_TEXCOORD1 Location 3 +OpDecorate %out_var_SV_Target0 Location 0 +OpDecorate %tex DescriptorSet 0 +OpDecorate %tex Binding 0 +OpDecorate %samp DescriptorSet 0 +OpDecorate %samp Binding 1 +OpDecorate %infos DescriptorSet 0 +OpDecorate %infos Binding 2 +OpMemberDecorate %type_PushConstant_PushConstant 0 Offset 0 +OpMemberDecorate %type_PushConstant_PushConstant 0 MatrixStride 16 +OpMemberDecorate %type_PushConstant_PushConstant 0 RowMajor +OpMemberDecorate %type_PushConstant_PushConstant 1 Offset 64 +OpDecorate %type_PushConstant_PushConstant Block +OpMemberDecorate %MaterialInfo 0 Offset 0 +OpMemberDecorate %MaterialInfo 1 Offset 16 +OpMemberDecorate %MaterialInfo 2 Offset 28 +OpMemberDecorate %MaterialInfo 3 Offset 32 +OpMemberDecorate %MaterialInfo 4 Offset 36 +OpMemberDecorate %MaterialInfo 5 Offset 40 +OpMemberDecorate %MaterialInfo 6 Offset 44 +OpDecorate %_runtimearr_MaterialInfo ArrayStride 48 +OpMemberDecorate %type_StructuredBuffer_MaterialInfo 0 Offset 0 +OpMemberDecorate %type_StructuredBuffer_MaterialInfo 0 NonWritable +OpDecorate %type_StructuredBuffer_MaterialInfo BufferBlock +%uint = OpTypeInt 32 0 +%uint_4294967295 = OpConstant %uint 4294967295 +%int = OpTypeInt 32 1 +%int_0 = OpConstant %int 0 +%int_1 = OpConstant %int 1 +%float = OpTypeFloat 32 +%float_255 = OpConstant %float 255 +%v3float = OpTypeVector %float 3 +%float_1 = OpConstant %float 1 +%28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%float_0 = OpConstant %float 0 +%v4float = OpTypeVector %float 4 +%mat4v4float = OpTypeMatrix %v4float 4 +%type_PushConstant_PushConstant = OpTypeStruct %mat4v4float %v3float +%_ptr_PushConstant_type_PushConstant_PushConstant = OpTypePointer PushConstant %type_PushConstant_PushConstant +%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown +%_runtimearr_type_2d_image = OpTypeRuntimeArray %type_2d_image +%_ptr_UniformConstant__runtimearr_type_2d_image = OpTypePointer UniformConstant %_runtimearr_type_2d_image +%type_sampler = OpTypeSampler +%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler +%MaterialInfo = OpTypeStruct %v4float %v3float %float %float %uint %uint %uint +%_runtimearr_MaterialInfo = OpTypeRuntimeArray %MaterialInfo +%type_StructuredBuffer_MaterialInfo = OpTypeStruct %_runtimearr_MaterialInfo +%_ptr_Uniform_type_StructuredBuffer_MaterialInfo = OpTypePointer Uniform %type_StructuredBuffer_MaterialInfo +%_ptr_Input_v3float = OpTypePointer Input %v3float +%v2float = OpTypeVector %float 2 +%_ptr_Input_v2float = OpTypePointer Input %v2float +%_ptr_Input_uint = OpTypePointer Input %uint +%_ptr_Output_v4float = OpTypePointer Output %v4float +%void = OpTypeVoid +%43 = OpTypeFunction %void +%mat3v3float = OpTypeMatrix %v3float 3 +%_ptr_Uniform_MaterialInfo = OpTypePointer Uniform %MaterialInfo +%_ptr_PushConstant_v3float = OpTypePointer PushConstant %v3float +%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image +%type_sampled_image = OpTypeSampledImage %type_2d_image +%bool = OpTypeBool +%constant = OpVariable %_ptr_PushConstant_type_PushConstant_PushConstant PushConstant +%tex = OpVariable %_ptr_UniformConstant__runtimearr_type_2d_image UniformConstant +%samp = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant +%infos = OpVariable %_ptr_Uniform_type_StructuredBuffer_MaterialInfo Uniform +%in_var_POSITION0 = OpVariable %_ptr_Input_v3float Input +%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input +%in_var_NORMAL0 = OpVariable %_ptr_Input_v3float Input +%in_var_TEXCOORD1 = OpVariable %_ptr_Input_uint Input +%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output +%float_0_00787401572 = OpConstant %float 0.00787401572 +%50 = OpConstantComposite %v3float %float_0_00787401572 %float_0_00787401572 %float_0_00787401572 +%float_n1_00787401 = OpConstant %float -1.00787401 +%52 = OpConstantComposite %v3float %float_n1_00787401 %float_n1_00787401 %float_n1_00787401 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float +%uint_0 = OpConstant %uint 0 +%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float +%uint_1 = OpConstant %uint 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint +%uint_4 = OpConstant %uint 4 +%uint_5 = OpConstant %uint 5 +%uint_6 = OpConstant %uint 6 +%PSMain = OpFunction %void None %43 +%61 = OpLabel +%62 = OpLoad %v3float %in_var_POSITION0 +%63 = OpLoad %v2float %in_var_TEXCOORD0 +%64 = OpLoad %v3float %in_var_NORMAL0 +%65 = OpLoad %uint %in_var_TEXCOORD1 +%66 = OpAccessChain %_ptr_Uniform_MaterialInfo %infos %int_0 %65 +%67 = OpAccessChain %_ptr_Uniform_v4float %66 %uint_0 +%68 = OpLoad %v4float %67 +%69 = OpAccessChain %_ptr_Uniform_v3float %66 %uint_1 +%70 = OpLoad %v3float %69 +%71 = OpAccessChain %_ptr_Uniform_uint %66 %uint_4 +%72 = OpLoad %uint %71 +%73 = OpAccessChain %_ptr_Uniform_uint %66 %uint_5 +%74 = OpLoad %uint %73 +%75 = OpAccessChain %_ptr_Uniform_uint %66 %uint_6 +%76 = OpLoad %uint %75 +%77 = OpExtInst %v3float %1 Normalize %64 +%78 = OpAccessChain %_ptr_PushConstant_v3float %constant %int_1 +%79 = OpLoad %v3float %78 +%80 = OpFSub %v3float %79 %62 +%81 = OpAccessChain %_ptr_UniformConstant_type_2d_image %tex %74 +%82 = OpLoad %type_2d_image %81 +%83 = OpLoad %type_sampler %samp +%84 = OpSampledImage %type_sampled_image %82 %83 +%85 = OpImageSampleImplicitLod %v4float %84 %63 None +%86 = OpVectorShuffle %v3float %85 %85 0 1 2 +%87 = OpVectorTimesScalar %v3float %86 %float_255 +%88 = OpExtInst %v3float %1 Fma %87 %50 %52 +%89 = OpAccessChain %_ptr_UniformConstant_type_2d_image %tex %72 +%90 = OpLoad %type_2d_image %89 +%91 = OpSampledImage %type_sampled_image %90 %83 +%92 = OpImageSampleImplicitLod %v4float %91 %63 None +%93 = OpVectorShuffle %v3float %92 %92 0 1 2 +%94 = OpAccessChain %_ptr_UniformConstant_type_2d_image %tex %76 +%95 = OpLoad %type_2d_image %94 +%96 = OpSampledImage %type_sampled_image %95 %83 +%97 = OpImageSampleImplicitLod %v4float %96 %63 None +%98 = OpVectorShuffle %v3float %97 %97 0 1 2 +%99 = OpFNegate %v3float %80 +%100 = OpDPdx %v3float %99 +%101 = OpDPdy %v3float %99 +%102 = OpDPdx %v2float %63 +%103 = OpDPdy %v2float %63 +%104 = OpExtInst %v3float %1 Cross %101 %77 +%105 = OpExtInst %v3float %1 Cross %77 %100 +%106 = OpCompositeExtract %float %102 0 +%107 = OpVectorTimesScalar %v3float %104 %106 +%108 = OpCompositeExtract %float %103 0 +%109 = OpVectorTimesScalar %v3float %105 %108 +%110 = OpFAdd %v3float %107 %109 +%111 = OpCompositeExtract %float %102 1 +%112 = OpVectorTimesScalar %v3float %104 %111 +%113 = OpCompositeExtract %float %103 1 +%114 = OpVectorTimesScalar %v3float %105 %113 +%115 = OpFAdd %v3float %112 %114 +%116 = OpDot %float %110 %110 +%117 = OpDot %float %115 %115 +%118 = OpExtInst %float %1 NMax %116 %117 +%119 = OpExtInst %float %1 Sqrt %118 +%120 = OpFDiv %float %float_1 %119 +%121 = OpVectorTimesScalar %v3float %110 %120 +%122 = OpVectorTimesScalar %v3float %115 %120 +%123 = OpCompositeConstruct %mat3v3float %121 %122 %77 +%124 = OpTranspose %mat3v3float %123 +%125 = OpINotEqual %bool %74 %uint_4294967295 +OpSelectionMerge %126 None +OpBranchConditional %125 %127 %126 +%127 = OpLabel +%128 = OpVectorTimesMatrix %v3float %88 %124 +%129 = OpExtInst %v3float %1 Normalize %128 +OpBranch %126 +%126 = OpLabel +%130 = OpPhi %v3float %77 %61 %129 %127 +%131 = OpExtInst %v3float %1 Normalize %28 +%132 = OpDot %float %130 %131 +%133 = OpExtInst %float %1 NMax %132 %float_0 +%134 = OpVectorShuffle %v3float %68 %68 0 1 2 +%135 = OpINotEqual %bool %72 %uint_4294967295 +OpSelectionMerge %136 None +OpBranchConditional %135 %137 %136 +%137 = OpLabel +%138 = OpFMul %v3float %134 %93 +OpBranch %136 +%136 = OpLabel +%139 = OpPhi %v3float %134 %126 %138 %137 +%140 = OpINotEqual %bool %76 %uint_4294967295 +OpSelectionMerge %141 None +OpBranchConditional %140 %142 %141 +%142 = OpLabel +%143 = OpFMul %v3float %70 %98 +OpBranch %141 +%141 = OpLabel +%144 = OpPhi %v3float %70 %136 %143 %142 +%145 = OpVectorTimesScalar %v3float %139 %133 +%146 = OpFAdd %v3float %145 %144 +%147 = OpCompositeExtract %float %146 0 +%148 = OpCompositeExtract %float %146 1 +%149 = OpCompositeExtract %float %146 2 +%150 = OpCompositeConstruct %v4float %147 %148 %149 %float_1 +OpStore %out_var_SV_Target0 %150 +OpReturn +OpFunctionEnd"#; + assert_eq!(expect, spvasm); +} diff --git a/spirq-spvasm/src/generated/print_operand.rs b/spirq-spvasm/src/generated/print_operand.rs index 6d5878a..f1b1aca 100644 --- a/spirq-spvasm/src/generated/print_operand.rs +++ b/spirq-spvasm/src/generated/print_operand.rs @@ -56,6 +56,3581 @@ fn print_pair_u32_id_list(operands: &mut Operands) -> Result> { Ok(out) } +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_ImageOperands(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"ImageOperands", value)?]; + // None + if value & 0x0000 != 0 { + } + // Bias + if value & 0x0001 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // Lod + if value & 0x0002 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // Grad + if value & 0x0004 != 0 { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // ConstOffset + if value & 0x0008 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // Offset + if value & 0x0010 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // ConstOffsets + if value & 0x0020 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // Sample + if value & 0x0040 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // MinLod + if value & 0x0080 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // MakeTexelAvailableKHR + if value & 0x0100 != 0 { + // IdScope + out.push(print_id(operands)?); + } + // MakeTexelVisibleKHR + if value & 0x0200 != 0 { + // IdScope + out.push(print_id(operands)?); + } + // NonPrivateTexelKHR + if value & 0x0400 != 0 { + } + // VolatileTexelKHR + if value & 0x0800 != 0 { + } + // SignExtend + if value & 0x1000 != 0 { + } + // ZeroExtend + if value & 0x2000 != 0 { + } + // Nontemporal + if value & 0x4000 != 0 { + } + // Offsets + if value & 0x10000 != 0 { + // IdRef + out.push(print_id(operands)?); + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FPFastMathMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FPFastMathMode", value)?]; + // None + if value & 0x0000 != 0 { + } + // NotNaN + if value & 0x0001 != 0 { + } + // NotInf + if value & 0x0002 != 0 { + } + // NSZ + if value & 0x0004 != 0 { + } + // AllowRecip + if value & 0x0008 != 0 { + } + // Fast + if value & 0x0010 != 0 { + } + // AllowContractFastINTEL + if value & 0x10000 != 0 { + } + // AllowReassocINTEL + if value & 0x20000 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_SelectionControl(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"SelectionControl", value)?]; + // None + if value & 0x0000 != 0 { + } + // Flatten + if value & 0x0001 != 0 { + } + // DontFlatten + if value & 0x0002 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_LoopControl(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"LoopControl", value)?]; + // None + if value & 0x0000 != 0 { + } + // Unroll + if value & 0x0001 != 0 { + } + // DontUnroll + if value & 0x0002 != 0 { + } + // DependencyInfinite + if value & 0x0004 != 0 { + } + // DependencyLength + if value & 0x0008 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MinIterations + if value & 0x0010 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxIterations + if value & 0x0020 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // IterationMultiple + if value & 0x0040 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // PeelCount + if value & 0x0080 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // PartialCount + if value & 0x0100 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // InitiationIntervalINTEL + if value & 0x10000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxConcurrencyINTEL + if value & 0x20000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // DependencyArrayINTEL + if value & 0x40000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // PipelineEnableINTEL + if value & 0x80000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // LoopCoalesceINTEL + if value & 0x100000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxInterleavingINTEL + if value & 0x200000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SpeculatedIterationsINTEL + if value & 0x400000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // NoFusionINTEL + if value & 0x800000 != 0 { + } + // LoopCountINTEL + if value & 0x1000000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxReinvocationDelayINTEL + if value & 0x2000000 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FunctionControl(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FunctionControl", value)?]; + // None + if value & 0x0000 != 0 { + } + // Inline + if value & 0x0001 != 0 { + } + // DontInline + if value & 0x0002 != 0 { + } + // Pure + if value & 0x0004 != 0 { + } + // Const + if value & 0x0008 != 0 { + } + // OptNoneINTEL + if value & 0x10000 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_MemorySemantics(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"MemorySemantics", value)?]; + // None + if value & 0x0000 != 0 { + } + // Acquire + if value & 0x0002 != 0 { + } + // Release + if value & 0x0004 != 0 { + } + // AcquireRelease + if value & 0x0008 != 0 { + } + // SequentiallyConsistent + if value & 0x0010 != 0 { + } + // UniformMemory + if value & 0x0040 != 0 { + } + // SubgroupMemory + if value & 0x0080 != 0 { + } + // WorkgroupMemory + if value & 0x0100 != 0 { + } + // CrossWorkgroupMemory + if value & 0x0200 != 0 { + } + // AtomicCounterMemory + if value & 0x0400 != 0 { + } + // ImageMemory + if value & 0x0800 != 0 { + } + // OutputMemoryKHR + if value & 0x1000 != 0 { + } + // MakeAvailableKHR + if value & 0x2000 != 0 { + } + // MakeVisibleKHR + if value & 0x4000 != 0 { + } + // Volatile + if value & 0x8000 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_MemoryAccess(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"MemoryAccess", value)?]; + // None + if value & 0x0000 != 0 { + } + // Volatile + if value & 0x0001 != 0 { + } + // Aligned + if value & 0x0002 != 0 { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Nontemporal + if value & 0x0004 != 0 { + } + // MakePointerAvailableKHR + if value & 0x0008 != 0 { + // IdScope + out.push(print_id(operands)?); + } + // MakePointerVisibleKHR + if value & 0x0010 != 0 { + // IdScope + out.push(print_id(operands)?); + } + // NonPrivatePointerKHR + if value & 0x0020 != 0 { + } + // AliasScopeINTELMask + if value & 0x10000 != 0 { + // IdRef + out.push(print_id(operands)?); + } + // NoAliasINTELMask + if value & 0x20000 != 0 { + // IdRef + out.push(print_id(operands)?); + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_KernelProfilingInfo(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"KernelProfilingInfo", value)?]; + // None + if value & 0x0000 != 0 { + } + // CmdExecTime + if value & 0x0001 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_RayFlags(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"RayFlags", value)?]; + // NoneKHR + if value & 0x0000 != 0 { + } + // OpaqueKHR + if value & 0x0001 != 0 { + } + // NoOpaqueKHR + if value & 0x0002 != 0 { + } + // TerminateOnFirstHitKHR + if value & 0x0004 != 0 { + } + // SkipClosestHitShaderKHR + if value & 0x0008 != 0 { + } + // CullBackFacingTrianglesKHR + if value & 0x0010 != 0 { + } + // CullFrontFacingTrianglesKHR + if value & 0x0020 != 0 { + } + // CullOpaqueKHR + if value & 0x0040 != 0 { + } + // CullNoOpaqueKHR + if value & 0x0080 != 0 { + } + // SkipTrianglesKHR + if value & 0x0100 != 0 { + } + // SkipAABBsKHR + if value & 0x0200 != 0 { + } + // ForceOpacityMicromap2StateEXT + if value & 0x0400 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FragmentShadingRate(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FragmentShadingRate", value)?]; + // Vertical2Pixels + if value & 0x0001 != 0 { + } + // Vertical4Pixels + if value & 0x0002 != 0 { + } + // Horizontal2Pixels + if value & 0x0004 != 0 { + } + // Horizontal4Pixels + if value & 0x0008 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_SourceLanguage(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"SourceLanguage", value)?]; + match value { + // Unknown + 0 => { + } + // ESSL + 1 => { + } + // GLSL + 2 => { + } + // OpenCL_C + 3 => { + } + // OpenCL_CPP + 4 => { + } + // HLSL + 5 => { + } + // CPP_for_OpenCL + 6 => { + } + // SYCL + 7 => { + } + // HERO_C + 8 => { + } + // NZSL + 9 => { + } + // WGSL + 10 => { + } + // Slang + 11 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_ExecutionModel(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"ExecutionModel", value)?]; + match value { + // Vertex + 0 => { + } + // TessellationControl + 1 => { + } + // TessellationEvaluation + 2 => { + } + // Geometry + 3 => { + } + // Fragment + 4 => { + } + // GLCompute + 5 => { + } + // Kernel + 6 => { + } + // TaskNV + 5267 => { + } + // MeshNV + 5268 => { + } + // RayGenerationKHR + 5313 => { + } + // IntersectionKHR + 5314 => { + } + // AnyHitKHR + 5315 => { + } + // ClosestHitKHR + 5316 => { + } + // MissKHR + 5317 => { + } + // CallableKHR + 5318 => { + } + // TaskEXT + 5364 => { + } + // MeshEXT + 5365 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_AddressingModel(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"AddressingModel", value)?]; + match value { + // Logical + 0 => { + } + // Physical32 + 1 => { + } + // Physical64 + 2 => { + } + // PhysicalStorageBuffer64EXT + 5348 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_MemoryModel(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"MemoryModel", value)?]; + match value { + // Simple + 0 => { + } + // GLSL450 + 1 => { + } + // OpenCL + 2 => { + } + // VulkanKHR + 3 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_ExecutionMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"ExecutionMode", value)?]; + match value { + // Invocations + 0 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SpacingEqual + 1 => { + } + // SpacingFractionalEven + 2 => { + } + // SpacingFractionalOdd + 3 => { + } + // VertexOrderCw + 4 => { + } + // VertexOrderCcw + 5 => { + } + // PixelCenterInteger + 6 => { + } + // OriginUpperLeft + 7 => { + } + // OriginLowerLeft + 8 => { + } + // EarlyFragmentTests + 9 => { + } + // PointMode + 10 => { + } + // Xfb + 11 => { + } + // DepthReplacing + 12 => { + } + // DepthGreater + 14 => { + } + // DepthLess + 15 => { + } + // DepthUnchanged + 16 => { + } + // LocalSize + 17 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // LocalSizeHint + 18 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // InputPoints + 19 => { + } + // InputLines + 20 => { + } + // InputLinesAdjacency + 21 => { + } + // Triangles + 22 => { + } + // InputTrianglesAdjacency + 23 => { + } + // Quads + 24 => { + } + // Isolines + 25 => { + } + // OutputVertices + 26 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // OutputPoints + 27 => { + } + // OutputLineStrip + 28 => { + } + // OutputTriangleStrip + 29 => { + } + // VecTypeHint + 30 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // ContractionOff + 31 => { + } + // Initializer + 33 => { + } + // Finalizer + 34 => { + } + // SubgroupSize + 35 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SubgroupsPerWorkgroup + 36 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SubgroupsPerWorkgroupId + 37 => { + // IdRef + out.push(print_id(operands)?); + } + // LocalSizeId + 38 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // LocalSizeHintId + 39 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // NonCoherentColorAttachmentReadEXT + 4169 => { + } + // NonCoherentDepthAttachmentReadEXT + 4170 => { + } + // NonCoherentStencilAttachmentReadEXT + 4171 => { + } + // SubgroupUniformControlFlowKHR + 4421 => { + } + // PostDepthCoverage + 4446 => { + } + // DenormPreserve + 4459 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // DenormFlushToZero + 4460 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SignedZeroInfNanPreserve + 4461 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // RoundingModeRTE + 4462 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // RoundingModeRTZ + 4463 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // EarlyAndLateFragmentTestsAMD + 5017 => { + } + // StencilRefReplacingEXT + 5027 => { + } + // CoalescingAMDX + 5069 => { + } + // MaxNodeRecursionAMDX + 5071 => { + // IdRef + out.push(print_id(operands)?); + } + // StaticNumWorkgroupsAMDX + 5072 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // ShaderIndexAMDX + 5073 => { + // IdRef + out.push(print_id(operands)?); + } + // MaxNumWorkgroupsAMDX + 5077 => { + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + // IdRef + out.push(print_id(operands)?); + } + // StencilRefUnchangedFrontAMD + 5079 => { + } + // StencilRefGreaterFrontAMD + 5080 => { + } + // StencilRefLessFrontAMD + 5081 => { + } + // StencilRefUnchangedBackAMD + 5082 => { + } + // StencilRefGreaterBackAMD + 5083 => { + } + // StencilRefLessBackAMD + 5084 => { + } + // OutputLinesEXT + 5269 => { + } + // OutputPrimitivesEXT + 5270 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // DerivativeGroupQuadsNV + 5289 => { + } + // DerivativeGroupLinearNV + 5290 => { + } + // OutputTrianglesEXT + 5298 => { + } + // PixelInterlockOrderedEXT + 5366 => { + } + // PixelInterlockUnorderedEXT + 5367 => { + } + // SampleInterlockOrderedEXT + 5368 => { + } + // SampleInterlockUnorderedEXT + 5369 => { + } + // ShadingRateInterlockOrderedEXT + 5370 => { + } + // ShadingRateInterlockUnorderedEXT + 5371 => { + } + // SharedLocalMemorySizeINTEL + 5618 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // RoundingModeRTPINTEL + 5620 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // RoundingModeRTNINTEL + 5621 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // FloatingPointModeALTINTEL + 5622 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // FloatingPointModeIEEEINTEL + 5623 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxWorkgroupSizeINTEL + 5893 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxWorkDimINTEL + 5894 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // NoGlobalOffsetINTEL + 5895 => { + } + // NumSIMDWorkitemsINTEL + 5896 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SchedulerTargetFmaxMhzINTEL + 5903 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // StreamingInterfaceINTEL + 6154 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // RegisterMapInterfaceINTEL + 6160 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // NamedBarrierCountINTEL + 6417 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_StorageClass(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"StorageClass", value)?]; + match value { + // UniformConstant + 0 => { + } + // Input + 1 => { + } + // Uniform + 2 => { + } + // Output + 3 => { + } + // Workgroup + 4 => { + } + // CrossWorkgroup + 5 => { + } + // Private + 6 => { + } + // Function + 7 => { + } + // Generic + 8 => { + } + // PushConstant + 9 => { + } + // AtomicCounter + 10 => { + } + // Image + 11 => { + } + // StorageBuffer + 12 => { + } + // TileImageEXT + 4172 => { + } + // NodePayloadAMDX + 5068 => { + } + // NodeOutputPayloadAMDX + 5076 => { + } + // CallableDataKHR + 5328 => { + } + // IncomingCallableDataKHR + 5329 => { + } + // RayPayloadKHR + 5338 => { + } + // HitAttributeKHR + 5339 => { + } + // IncomingRayPayloadKHR + 5342 => { + } + // ShaderRecordBufferKHR + 5343 => { + } + // PhysicalStorageBufferEXT + 5349 => { + } + // HitObjectAttributeNV + 5385 => { + } + // TaskPayloadWorkgroupEXT + 5402 => { + } + // CodeSectionINTEL + 5605 => { + } + // DeviceOnlyINTEL + 5936 => { + } + // HostOnlyINTEL + 5937 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_Dim(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"Dim", value)?]; + match value { + // 1D + 0 => { + } + // 2D + 1 => { + } + // 3D + 2 => { + } + // Cube + 3 => { + } + // Rect + 4 => { + } + // Buffer + 5 => { + } + // SubpassData + 6 => { + } + // TileImageDataEXT + 4173 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_SamplerAddressingMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"SamplerAddressingMode", value)?]; + match value { + // None + 0 => { + } + // ClampToEdge + 1 => { + } + // Clamp + 2 => { + } + // Repeat + 3 => { + } + // RepeatMirrored + 4 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_SamplerFilterMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"SamplerFilterMode", value)?]; + match value { + // Nearest + 0 => { + } + // Linear + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_ImageFormat(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"ImageFormat", value)?]; + match value { + // Unknown + 0 => { + } + // Rgba32f + 1 => { + } + // Rgba16f + 2 => { + } + // R32f + 3 => { + } + // Rgba8 + 4 => { + } + // Rgba8Snorm + 5 => { + } + // Rg32f + 6 => { + } + // Rg16f + 7 => { + } + // R11fG11fB10f + 8 => { + } + // R16f + 9 => { + } + // Rgba16 + 10 => { + } + // Rgb10A2 + 11 => { + } + // Rg16 + 12 => { + } + // Rg8 + 13 => { + } + // R16 + 14 => { + } + // R8 + 15 => { + } + // Rgba16Snorm + 16 => { + } + // Rg16Snorm + 17 => { + } + // Rg8Snorm + 18 => { + } + // R16Snorm + 19 => { + } + // R8Snorm + 20 => { + } + // Rgba32i + 21 => { + } + // Rgba16i + 22 => { + } + // Rgba8i + 23 => { + } + // R32i + 24 => { + } + // Rg32i + 25 => { + } + // Rg16i + 26 => { + } + // Rg8i + 27 => { + } + // R16i + 28 => { + } + // R8i + 29 => { + } + // Rgba32ui + 30 => { + } + // Rgba16ui + 31 => { + } + // Rgba8ui + 32 => { + } + // R32ui + 33 => { + } + // Rgb10a2ui + 34 => { + } + // Rg32ui + 35 => { + } + // Rg16ui + 36 => { + } + // Rg8ui + 37 => { + } + // R16ui + 38 => { + } + // R8ui + 39 => { + } + // R64ui + 40 => { + } + // R64i + 41 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_ImageChannelOrder(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"ImageChannelOrder", value)?]; + match value { + // R + 0 => { + } + // A + 1 => { + } + // RG + 2 => { + } + // RA + 3 => { + } + // RGB + 4 => { + } + // RGBA + 5 => { + } + // BGRA + 6 => { + } + // ARGB + 7 => { + } + // Intensity + 8 => { + } + // Luminance + 9 => { + } + // Rx + 10 => { + } + // RGx + 11 => { + } + // RGBx + 12 => { + } + // Depth + 13 => { + } + // DepthStencil + 14 => { + } + // sRGB + 15 => { + } + // sRGBx + 16 => { + } + // sRGBA + 17 => { + } + // sBGRA + 18 => { + } + // ABGR + 19 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_ImageChannelDataType(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"ImageChannelDataType", value)?]; + match value { + // SnormInt8 + 0 => { + } + // SnormInt16 + 1 => { + } + // UnormInt8 + 2 => { + } + // UnormInt16 + 3 => { + } + // UnormShort565 + 4 => { + } + // UnormShort555 + 5 => { + } + // UnormInt101010 + 6 => { + } + // SignedInt8 + 7 => { + } + // SignedInt16 + 8 => { + } + // SignedInt32 + 9 => { + } + // UnsignedInt8 + 10 => { + } + // UnsignedInt16 + 11 => { + } + // UnsignedInt32 + 12 => { + } + // HalfFloat + 13 => { + } + // Float + 14 => { + } + // UnormInt24 + 15 => { + } + // UnormInt101010_2 + 16 => { + } + // UnsignedIntRaw10EXT + 19 => { + } + // UnsignedIntRaw12EXT + 20 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FPRoundingMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FPRoundingMode", value)?]; + match value { + // RTE + 0 => { + } + // RTZ + 1 => { + } + // RTP + 2 => { + } + // RTN + 3 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FPDenormMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FPDenormMode", value)?]; + match value { + // Preserve + 0 => { + } + // FlushToZero + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_QuantizationModes(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"QuantizationModes", value)?]; + match value { + // TRN + 0 => { + } + // TRN_ZERO + 1 => { + } + // RND + 2 => { + } + // RND_ZERO + 3 => { + } + // RND_INF + 4 => { + } + // RND_MIN_INF + 5 => { + } + // RND_CONV + 6 => { + } + // RND_CONV_ODD + 7 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FPOperationMode(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FPOperationMode", value)?]; + match value { + // IEEE + 0 => { + } + // ALT + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_OverflowModes(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"OverflowModes", value)?]; + match value { + // WRAP + 0 => { + } + // SAT + 1 => { + } + // SAT_ZERO + 2 => { + } + // SAT_SYM + 3 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_LinkageType(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"LinkageType", value)?]; + match value { + // Export + 0 => { + } + // Import + 1 => { + } + // LinkOnceODR + 2 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_AccessQualifier(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"AccessQualifier", value)?]; + match value { + // ReadOnly + 0 => { + } + // WriteOnly + 1 => { + } + // ReadWrite + 2 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_HostAccessQualifier(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"HostAccessQualifier", value)?]; + match value { + // NoneINTEL + 0 => { + } + // ReadINTEL + 1 => { + } + // WriteINTEL + 2 => { + } + // ReadWriteINTEL + 3 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_FunctionParameterAttribute(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"FunctionParameterAttribute", value)?]; + match value { + // Zext + 0 => { + } + // Sext + 1 => { + } + // ByVal + 2 => { + } + // Sret + 3 => { + } + // NoAlias + 4 => { + } + // NoCapture + 5 => { + } + // NoWrite + 6 => { + } + // NoReadWrite + 7 => { + } + // RuntimeAlignedINTEL + 5940 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_Decoration(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"Decoration", value)?]; + match value { + // RelaxedPrecision + 0 => { + } + // SpecId + 1 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Block + 2 => { + } + // BufferBlock + 3 => { + } + // RowMajor + 4 => { + } + // ColMajor + 5 => { + } + // ArrayStride + 6 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MatrixStride + 7 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // GLSLShared + 8 => { + } + // GLSLPacked + 9 => { + } + // CPacked + 10 => { + } + // BuiltIn + 11 => { + // BuiltIn + out.extend(print_enum_BuiltIn(operands)?); + } + // NoPerspective + 13 => { + } + // Flat + 14 => { + } + // Patch + 15 => { + } + // Centroid + 16 => { + } + // Sample + 17 => { + } + // Invariant + 18 => { + } + // Restrict + 19 => { + } + // Aliased + 20 => { + } + // Volatile + 21 => { + } + // Constant + 22 => { + } + // Coherent + 23 => { + } + // NonWritable + 24 => { + } + // NonReadable + 25 => { + } + // Uniform + 26 => { + } + // UniformId + 27 => { + // IdScope + out.push(print_id(operands)?); + } + // SaturatedConversion + 28 => { + } + // Stream + 29 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Location + 30 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Component + 31 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Index + 32 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Binding + 33 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // DescriptorSet + 34 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Offset + 35 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // XfbBuffer + 36 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // XfbStride + 37 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // FuncParamAttr + 38 => { + // FunctionParameterAttribute + out.extend(print_enum_FunctionParameterAttribute(operands)?); + } + // FPRoundingMode + 39 => { + // FPRoundingMode + out.extend(print_enum_FPRoundingMode(operands)?); + } + // FPFastMathMode + 40 => { + // FPFastMathMode + out.extend(print_enum_FPFastMathMode(operands)?); + } + // LinkageAttributes + 41 => { + // LiteralString + out.push(print_str(operands)?); + // LinkageType + out.extend(print_enum_LinkageType(operands)?); + } + // NoContraction + 42 => { + } + // InputAttachmentIndex + 43 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // Alignment + 44 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxByteOffset + 45 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // AlignmentId + 46 => { + // IdRef + out.push(print_id(operands)?); + } + // MaxByteOffsetId + 47 => { + // IdRef + out.push(print_id(operands)?); + } + // NoSignedWrap + 4469 => { + } + // NoUnsignedWrap + 4470 => { + } + // WeightTextureQCOM + 4487 => { + } + // BlockMatchTextureQCOM + 4488 => { + } + // ExplicitInterpAMD + 4999 => { + } + // NodeSharesPayloadLimitsWithAMDX + 5019 => { + // IdRef + out.push(print_id(operands)?); + } + // NodeMaxPayloadsAMDX + 5020 => { + // IdRef + out.push(print_id(operands)?); + } + // TrackFinishWritingAMDX + 5078 => { + } + // PayloadNodeNameAMDX + 5091 => { + // LiteralString + out.push(print_str(operands)?); + } + // OverrideCoverageNV + 5248 => { + } + // PassthroughNV + 5250 => { + } + // ViewportRelativeNV + 5252 => { + } + // SecondaryViewportRelativeNV + 5256 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // PerPrimitiveEXT + 5271 => { + } + // PerViewNV + 5272 => { + } + // PerTaskNV + 5273 => { + } + // PerVertexNV + 5285 => { + } + // NonUniformEXT + 5300 => { + } + // RestrictPointerEXT + 5355 => { + } + // AliasedPointerEXT + 5356 => { + } + // HitObjectShaderRecordBufferNV + 5386 => { + } + // BindlessSamplerNV + 5398 => { + } + // BindlessImageNV + 5399 => { + } + // BoundSamplerNV + 5400 => { + } + // BoundImageNV + 5401 => { + } + // SIMTCallINTEL + 5599 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // ReferencedIndirectlyINTEL + 5602 => { + } + // ClobberINTEL + 5607 => { + // LiteralString + out.push(print_str(operands)?); + } + // SideEffectsINTEL + 5608 => { + } + // VectorComputeVariableINTEL + 5624 => { + } + // FuncParamIOKindINTEL + 5625 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // VectorComputeFunctionINTEL + 5626 => { + } + // StackCallINTEL + 5627 => { + } + // GlobalVariableOffsetINTEL + 5628 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // HlslCounterBufferGOOGLE + 5634 => { + // IdRef + out.push(print_id(operands)?); + } + // HlslSemanticGOOGLE + 5635 => { + // LiteralString + out.push(print_str(operands)?); + } + // UserTypeGOOGLE + 5636 => { + // LiteralString + out.push(print_str(operands)?); + } + // FunctionRoundingModeINTEL + 5822 => { + // LiteralInteger + out.push(print_u32(operands)?); + // FPRoundingMode + out.extend(print_enum_FPRoundingMode(operands)?); + } + // FunctionDenormModeINTEL + 5823 => { + // LiteralInteger + out.push(print_u32(operands)?); + // FPDenormMode + out.extend(print_enum_FPDenormMode(operands)?); + } + // RegisterINTEL + 5825 => { + } + // MemoryINTEL + 5826 => { + // LiteralString + out.push(print_str(operands)?); + } + // NumbanksINTEL + 5827 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // BankwidthINTEL + 5828 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxPrivateCopiesINTEL + 5829 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SinglepumpINTEL + 5830 => { + } + // DoublepumpINTEL + 5831 => { + } + // MaxReplicatesINTEL + 5832 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // SimpleDualPortINTEL + 5833 => { + } + // MergeINTEL + 5834 => { + // LiteralString + out.push(print_str(operands)?); + // LiteralString + out.push(print_str(operands)?); + } + // BankBitsINTEL + 5835 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // ForcePow2DepthINTEL + 5836 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // StridesizeINTEL + 5883 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // WordsizeINTEL + 5884 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // TrueDualPortINTEL + 5885 => { + } + // BurstCoalesceINTEL + 5899 => { + } + // CacheSizeINTEL + 5900 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // DontStaticallyCoalesceINTEL + 5901 => { + } + // PrefetchINTEL + 5902 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // StallEnableINTEL + 5905 => { + } + // FuseLoopsInFunctionINTEL + 5907 => { + } + // MathOpDSPModeINTEL + 5909 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // AliasScopeINTEL + 5914 => { + // IdRef + out.push(print_id(operands)?); + } + // NoAliasINTEL + 5915 => { + // IdRef + out.push(print_id(operands)?); + } + // InitiationIntervalINTEL + 5917 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MaxConcurrencyINTEL + 5918 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // PipelineEnableINTEL + 5919 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // BufferLocationINTEL + 5921 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // IOPipeStorageINTEL + 5944 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // FunctionFloatingPointModeINTEL + 6080 => { + // LiteralInteger + out.push(print_u32(operands)?); + // FPOperationMode + out.extend(print_enum_FPOperationMode(operands)?); + } + // SingleElementVectorINTEL + 6085 => { + } + // VectorComputeCallableFunctionINTEL + 6087 => { + } + // MediaBlockIOINTEL + 6140 => { + } + // StallFreeINTEL + 6151 => { + } + // FPMaxErrorDecorationINTEL + 6170 => { + // LiteralFloat + out.push(print_f32(operands)?); + } + // LatencyControlLabelINTEL + 6172 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // LatencyControlConstraintINTEL + 6173 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + // LiteralInteger + out.push(print_u32(operands)?); + } + // ConduitKernelArgumentINTEL + 6175 => { + } + // RegisterMapKernelArgumentINTEL + 6176 => { + } + // MMHostInterfaceAddressWidthINTEL + 6177 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MMHostInterfaceDataWidthINTEL + 6178 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MMHostInterfaceLatencyINTEL + 6179 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MMHostInterfaceReadWriteModeINTEL + 6180 => { + // AccessQualifier + out.extend(print_enum_AccessQualifier(operands)?); + } + // MMHostInterfaceMaxBurstINTEL + 6181 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // MMHostInterfaceWaitRequestINTEL + 6182 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // StableKernelArgumentINTEL + 6183 => { + } + // HostAccessINTEL + 6188 => { + // HostAccessQualifier + out.extend(print_enum_HostAccessQualifier(operands)?); + // LiteralString + out.push(print_str(operands)?); + } + // InitModeINTEL + 6190 => { + // InitializationModeQualifier + out.extend(print_enum_InitializationModeQualifier(operands)?); + } + // ImplementInRegisterMapINTEL + 6191 => { + // LiteralInteger + out.push(print_u32(operands)?); + } + // CacheControlLoadINTEL + 6442 => { + // LiteralInteger + out.push(print_u32(operands)?); + // LoadCacheControl + out.extend(print_enum_LoadCacheControl(operands)?); + } + // CacheControlStoreINTEL + 6443 => { + // LiteralInteger + out.push(print_u32(operands)?); + // StoreCacheControl + out.extend(print_enum_StoreCacheControl(operands)?); + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_BuiltIn(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"BuiltIn", value)?]; + match value { + // Position + 0 => { + } + // PointSize + 1 => { + } + // ClipDistance + 3 => { + } + // CullDistance + 4 => { + } + // VertexId + 5 => { + } + // InstanceId + 6 => { + } + // PrimitiveId + 7 => { + } + // InvocationId + 8 => { + } + // Layer + 9 => { + } + // ViewportIndex + 10 => { + } + // TessLevelOuter + 11 => { + } + // TessLevelInner + 12 => { + } + // TessCoord + 13 => { + } + // PatchVertices + 14 => { + } + // FragCoord + 15 => { + } + // PointCoord + 16 => { + } + // FrontFacing + 17 => { + } + // SampleId + 18 => { + } + // SamplePosition + 19 => { + } + // SampleMask + 20 => { + } + // FragDepth + 22 => { + } + // HelperInvocation + 23 => { + } + // NumWorkgroups + 24 => { + } + // WorkgroupSize + 25 => { + } + // WorkgroupId + 26 => { + } + // LocalInvocationId + 27 => { + } + // GlobalInvocationId + 28 => { + } + // LocalInvocationIndex + 29 => { + } + // WorkDim + 30 => { + } + // GlobalSize + 31 => { + } + // EnqueuedWorkgroupSize + 32 => { + } + // GlobalOffset + 33 => { + } + // GlobalLinearId + 34 => { + } + // SubgroupSize + 36 => { + } + // SubgroupMaxSize + 37 => { + } + // NumSubgroups + 38 => { + } + // NumEnqueuedSubgroups + 39 => { + } + // SubgroupId + 40 => { + } + // SubgroupLocalInvocationId + 41 => { + } + // VertexIndex + 42 => { + } + // InstanceIndex + 43 => { + } + // CoreIDARM + 4160 => { + } + // CoreCountARM + 4161 => { + } + // CoreMaxIDARM + 4162 => { + } + // WarpIDARM + 4163 => { + } + // WarpMaxIDARM + 4164 => { + } + // SubgroupEqMaskKHR + 4416 => { + } + // SubgroupGeMaskKHR + 4417 => { + } + // SubgroupGtMaskKHR + 4418 => { + } + // SubgroupLeMaskKHR + 4419 => { + } + // SubgroupLtMaskKHR + 4420 => { + } + // BaseVertex + 4424 => { + } + // BaseInstance + 4425 => { + } + // DrawIndex + 4426 => { + } + // PrimitiveShadingRateKHR + 4432 => { + } + // DeviceIndex + 4438 => { + } + // ViewIndex + 4440 => { + } + // ShadingRateKHR + 4444 => { + } + // BaryCoordNoPerspAMD + 4992 => { + } + // BaryCoordNoPerspCentroidAMD + 4993 => { + } + // BaryCoordNoPerspSampleAMD + 4994 => { + } + // BaryCoordSmoothAMD + 4995 => { + } + // BaryCoordSmoothCentroidAMD + 4996 => { + } + // BaryCoordSmoothSampleAMD + 4997 => { + } + // BaryCoordPullModelAMD + 4998 => { + } + // FragStencilRefEXT + 5014 => { + } + // CoalescedInputCountAMDX + 5021 => { + } + // ShaderIndexAMDX + 5073 => { + } + // ViewportMaskNV + 5253 => { + } + // SecondaryPositionNV + 5257 => { + } + // SecondaryViewportMaskNV + 5258 => { + } + // PositionPerViewNV + 5261 => { + } + // ViewportMaskPerViewNV + 5262 => { + } + // FullyCoveredEXT + 5264 => { + } + // TaskCountNV + 5274 => { + } + // PrimitiveCountNV + 5275 => { + } + // PrimitiveIndicesNV + 5276 => { + } + // ClipDistancePerViewNV + 5277 => { + } + // CullDistancePerViewNV + 5278 => { + } + // LayerPerViewNV + 5279 => { + } + // MeshViewCountNV + 5280 => { + } + // MeshViewIndicesNV + 5281 => { + } + // BaryCoordNV + 5286 => { + } + // BaryCoordNoPerspNV + 5287 => { + } + // FragmentSizeNV + 5292 => { + } + // InvocationsPerPixelNV + 5293 => { + } + // PrimitivePointIndicesEXT + 5294 => { + } + // PrimitiveLineIndicesEXT + 5295 => { + } + // PrimitiveTriangleIndicesEXT + 5296 => { + } + // CullPrimitiveEXT + 5299 => { + } + // LaunchIdKHR + 5319 => { + } + // LaunchSizeKHR + 5320 => { + } + // WorldRayOriginKHR + 5321 => { + } + // WorldRayDirectionKHR + 5322 => { + } + // ObjectRayOriginKHR + 5323 => { + } + // ObjectRayDirectionKHR + 5324 => { + } + // RayTminKHR + 5325 => { + } + // RayTmaxKHR + 5326 => { + } + // InstanceCustomIndexKHR + 5327 => { + } + // ObjectToWorldKHR + 5330 => { + } + // WorldToObjectKHR + 5331 => { + } + // HitTNV + 5332 => { + } + // HitKindKHR + 5333 => { + } + // CurrentRayTimeNV + 5334 => { + } + // HitTriangleVertexPositionsKHR + 5335 => { + } + // HitMicroTriangleVertexPositionsNV + 5337 => { + } + // HitMicroTriangleVertexBarycentricsNV + 5344 => { + } + // IncomingRayFlagsKHR + 5351 => { + } + // RayGeometryIndexKHR + 5352 => { + } + // WarpsPerSMNV + 5374 => { + } + // SMCountNV + 5375 => { + } + // WarpIDNV + 5376 => { + } + // SMIDNV + 5377 => { + } + // HitKindFrontFacingMicroTriangleNV + 5405 => { + } + // HitKindBackFacingMicroTriangleNV + 5406 => { + } + // CullMaskKHR + 6021 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_Scope(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"Scope", value)?]; + match value { + // CrossDevice + 0 => { + } + // Device + 1 => { + } + // Workgroup + 2 => { + } + // Subgroup + 3 => { + } + // Invocation + 4 => { + } + // QueueFamilyKHR + 5 => { + } + // ShaderCallKHR + 6 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_GroupOperation(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"GroupOperation", value)?]; + match value { + // Reduce + 0 => { + } + // InclusiveScan + 1 => { + } + // ExclusiveScan + 2 => { + } + // ClusteredReduce + 3 => { + } + // PartitionedReduceNV + 6 => { + } + // PartitionedInclusiveScanNV + 7 => { + } + // PartitionedExclusiveScanNV + 8 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_KernelEnqueueFlags(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"KernelEnqueueFlags", value)?]; + match value { + // NoWait + 0 => { + } + // WaitKernel + 1 => { + } + // WaitWorkGroup + 2 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_Capability(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"Capability", value)?]; + match value { + // Matrix + 0 => { + } + // Shader + 1 => { + } + // Geometry + 2 => { + } + // Tessellation + 3 => { + } + // Addresses + 4 => { + } + // Linkage + 5 => { + } + // Kernel + 6 => { + } + // Vector16 + 7 => { + } + // Float16Buffer + 8 => { + } + // Float16 + 9 => { + } + // Float64 + 10 => { + } + // Int64 + 11 => { + } + // Int64Atomics + 12 => { + } + // ImageBasic + 13 => { + } + // ImageReadWrite + 14 => { + } + // ImageMipmap + 15 => { + } + // Pipes + 17 => { + } + // Groups + 18 => { + } + // DeviceEnqueue + 19 => { + } + // LiteralSampler + 20 => { + } + // AtomicStorage + 21 => { + } + // Int16 + 22 => { + } + // TessellationPointSize + 23 => { + } + // GeometryPointSize + 24 => { + } + // ImageGatherExtended + 25 => { + } + // StorageImageMultisample + 27 => { + } + // UniformBufferArrayDynamicIndexing + 28 => { + } + // SampledImageArrayDynamicIndexing + 29 => { + } + // StorageBufferArrayDynamicIndexing + 30 => { + } + // StorageImageArrayDynamicIndexing + 31 => { + } + // ClipDistance + 32 => { + } + // CullDistance + 33 => { + } + // ImageCubeArray + 34 => { + } + // SampleRateShading + 35 => { + } + // ImageRect + 36 => { + } + // SampledRect + 37 => { + } + // GenericPointer + 38 => { + } + // Int8 + 39 => { + } + // InputAttachment + 40 => { + } + // SparseResidency + 41 => { + } + // MinLod + 42 => { + } + // Sampled1D + 43 => { + } + // Image1D + 44 => { + } + // SampledCubeArray + 45 => { + } + // SampledBuffer + 46 => { + } + // ImageBuffer + 47 => { + } + // ImageMSArray + 48 => { + } + // StorageImageExtendedFormats + 49 => { + } + // ImageQuery + 50 => { + } + // DerivativeControl + 51 => { + } + // InterpolationFunction + 52 => { + } + // TransformFeedback + 53 => { + } + // GeometryStreams + 54 => { + } + // StorageImageReadWithoutFormat + 55 => { + } + // StorageImageWriteWithoutFormat + 56 => { + } + // MultiViewport + 57 => { + } + // SubgroupDispatch + 58 => { + } + // NamedBarrier + 59 => { + } + // PipeStorage + 60 => { + } + // GroupNonUniform + 61 => { + } + // GroupNonUniformVote + 62 => { + } + // GroupNonUniformArithmetic + 63 => { + } + // GroupNonUniformBallot + 64 => { + } + // GroupNonUniformShuffle + 65 => { + } + // GroupNonUniformShuffleRelative + 66 => { + } + // GroupNonUniformClustered + 67 => { + } + // GroupNonUniformQuad + 68 => { + } + // ShaderLayer + 69 => { + } + // ShaderViewportIndex + 70 => { + } + // UniformDecoration + 71 => { + } + // CoreBuiltinsARM + 4165 => { + } + // TileImageColorReadAccessEXT + 4166 => { + } + // TileImageDepthReadAccessEXT + 4167 => { + } + // TileImageStencilReadAccessEXT + 4168 => { + } + // FragmentShadingRateKHR + 4422 => { + } + // SubgroupBallotKHR + 4423 => { + } + // DrawParameters + 4427 => { + } + // WorkgroupMemoryExplicitLayoutKHR + 4428 => { + } + // WorkgroupMemoryExplicitLayout8BitAccessKHR + 4429 => { + } + // WorkgroupMemoryExplicitLayout16BitAccessKHR + 4430 => { + } + // SubgroupVoteKHR + 4431 => { + } + // StorageUniformBufferBlock16 + 4433 => { + } + // StorageUniform16 + 4434 => { + } + // StoragePushConstant16 + 4435 => { + } + // StorageInputOutput16 + 4436 => { + } + // DeviceGroup + 4437 => { + } + // MultiView + 4439 => { + } + // VariablePointersStorageBuffer + 4441 => { + } + // VariablePointers + 4442 => { + } + // AtomicStorageOps + 4445 => { + } + // SampleMaskPostDepthCoverage + 4447 => { + } + // StorageBuffer8BitAccess + 4448 => { + } + // UniformAndStorageBuffer8BitAccess + 4449 => { + } + // StoragePushConstant8 + 4450 => { + } + // DenormPreserve + 4464 => { + } + // DenormFlushToZero + 4465 => { + } + // SignedZeroInfNanPreserve + 4466 => { + } + // RoundingModeRTE + 4467 => { + } + // RoundingModeRTZ + 4468 => { + } + // RayQueryProvisionalKHR + 4471 => { + } + // RayQueryKHR + 4472 => { + } + // RayTraversalPrimitiveCullingKHR + 4478 => { + } + // RayTracingKHR + 4479 => { + } + // TextureSampleWeightedQCOM + 4484 => { + } + // TextureBoxFilterQCOM + 4485 => { + } + // TextureBlockMatchQCOM + 4486 => { + } + // Float16ImageAMD + 5008 => { + } + // ImageGatherBiasLodAMD + 5009 => { + } + // FragmentMaskAMD + 5010 => { + } + // StencilExportEXT + 5013 => { + } + // ImageReadWriteLodAMD + 5015 => { + } + // Int64ImageEXT + 5016 => { + } + // ShaderClockKHR + 5055 => { + } + // ShaderEnqueueAMDX + 5067 => { + } + // SampleMaskOverrideCoverageNV + 5249 => { + } + // GeometryShaderPassthroughNV + 5251 => { + } + // ShaderViewportIndexLayerNV + 5254 => { + } + // ShaderViewportMaskNV + 5255 => { + } + // ShaderStereoViewNV + 5259 => { + } + // PerViewAttributesNV + 5260 => { + } + // FragmentFullyCoveredEXT + 5265 => { + } + // MeshShadingNV + 5266 => { + } + // ImageFootprintNV + 5282 => { + } + // MeshShadingEXT + 5283 => { + } + // FragmentBarycentricNV + 5284 => { + } + // ComputeDerivativeGroupQuadsNV + 5288 => { + } + // ShadingRateNV + 5291 => { + } + // GroupNonUniformPartitionedNV + 5297 => { + } + // ShaderNonUniformEXT + 5301 => { + } + // RuntimeDescriptorArrayEXT + 5302 => { + } + // InputAttachmentArrayDynamicIndexingEXT + 5303 => { + } + // UniformTexelBufferArrayDynamicIndexingEXT + 5304 => { + } + // StorageTexelBufferArrayDynamicIndexingEXT + 5305 => { + } + // UniformBufferArrayNonUniformIndexingEXT + 5306 => { + } + // SampledImageArrayNonUniformIndexingEXT + 5307 => { + } + // StorageBufferArrayNonUniformIndexingEXT + 5308 => { + } + // StorageImageArrayNonUniformIndexingEXT + 5309 => { + } + // InputAttachmentArrayNonUniformIndexingEXT + 5310 => { + } + // UniformTexelBufferArrayNonUniformIndexingEXT + 5311 => { + } + // StorageTexelBufferArrayNonUniformIndexingEXT + 5312 => { + } + // RayTracingPositionFetchKHR + 5336 => { + } + // RayTracingNV + 5340 => { + } + // RayTracingMotionBlurNV + 5341 => { + } + // VulkanMemoryModelKHR + 5345 => { + } + // VulkanMemoryModelDeviceScopeKHR + 5346 => { + } + // PhysicalStorageBufferAddressesEXT + 5347 => { + } + // ComputeDerivativeGroupLinearNV + 5350 => { + } + // RayTracingProvisionalKHR + 5353 => { + } + // CooperativeMatrixNV + 5357 => { + } + // FragmentShaderSampleInterlockEXT + 5363 => { + } + // FragmentShaderShadingRateInterlockEXT + 5372 => { + } + // ShaderSMBuiltinsNV + 5373 => { + } + // FragmentShaderPixelInterlockEXT + 5378 => { + } + // DemoteToHelperInvocationEXT + 5379 => { + } + // DisplacementMicromapNV + 5380 => { + } + // RayTracingOpacityMicromapEXT + 5381 => { + } + // ShaderInvocationReorderNV + 5383 => { + } + // BindlessTextureNV + 5390 => { + } + // RayQueryPositionFetchKHR + 5391 => { + } + // RayTracingDisplacementMicromapNV + 5409 => { + } + // SubgroupShuffleINTEL + 5568 => { + } + // SubgroupBufferBlockIOINTEL + 5569 => { + } + // SubgroupImageBlockIOINTEL + 5570 => { + } + // SubgroupImageMediaBlockIOINTEL + 5579 => { + } + // RoundToInfinityINTEL + 5582 => { + } + // FloatingPointModeINTEL + 5583 => { + } + // IntegerFunctions2INTEL + 5584 => { + } + // FunctionPointersINTEL + 5603 => { + } + // IndirectReferencesINTEL + 5604 => { + } + // AsmINTEL + 5606 => { + } + // AtomicFloat32MinMaxEXT + 5612 => { + } + // AtomicFloat64MinMaxEXT + 5613 => { + } + // AtomicFloat16MinMaxEXT + 5616 => { + } + // VectorComputeINTEL + 5617 => { + } + // VectorAnyINTEL + 5619 => { + } + // ExpectAssumeKHR + 5629 => { + } + // SubgroupAvcMotionEstimationINTEL + 5696 => { + } + // SubgroupAvcMotionEstimationIntraINTEL + 5697 => { + } + // SubgroupAvcMotionEstimationChromaINTEL + 5698 => { + } + // VariableLengthArrayINTEL + 5817 => { + } + // FunctionFloatControlINTEL + 5821 => { + } + // FPGAMemoryAttributesINTEL + 5824 => { + } + // FPFastMathModeINTEL + 5837 => { + } + // ArbitraryPrecisionIntegersINTEL + 5844 => { + } + // ArbitraryPrecisionFloatingPointINTEL + 5845 => { + } + // UnstructuredLoopControlsINTEL + 5886 => { + } + // FPGALoopControlsINTEL + 5888 => { + } + // KernelAttributesINTEL + 5892 => { + } + // FPGAKernelAttributesINTEL + 5897 => { + } + // FPGAMemoryAccessesINTEL + 5898 => { + } + // FPGAClusterAttributesINTEL + 5904 => { + } + // LoopFuseINTEL + 5906 => { + } + // FPGADSPControlINTEL + 5908 => { + } + // MemoryAccessAliasingINTEL + 5910 => { + } + // FPGAInvocationPipeliningAttributesINTEL + 5916 => { + } + // FPGABufferLocationINTEL + 5920 => { + } + // ArbitraryPrecisionFixedPointINTEL + 5922 => { + } + // USMStorageClassesINTEL + 5935 => { + } + // RuntimeAlignedAttributeINTEL + 5939 => { + } + // IOPipesINTEL + 5943 => { + } + // BlockingPipesINTEL + 5945 => { + } + // FPGARegINTEL + 5948 => { + } + // DotProductInputAllKHR + 6016 => { + } + // DotProductInput4x8BitKHR + 6017 => { + } + // DotProductInput4x8BitPackedKHR + 6018 => { + } + // DotProductKHR + 6019 => { + } + // RayCullMaskKHR + 6020 => { + } + // CooperativeMatrixKHR + 6022 => { + } + // BitInstructions + 6025 => { + } + // GroupNonUniformRotateKHR + 6026 => { + } + // AtomicFloat32AddEXT + 6033 => { + } + // AtomicFloat64AddEXT + 6034 => { + } + // LongCompositesINTEL + 6089 => { + } + // OptNoneINTEL + 6094 => { + } + // AtomicFloat16AddEXT + 6095 => { + } + // DebugInfoModuleINTEL + 6114 => { + } + // BFloat16ConversionINTEL + 6115 => { + } + // SplitBarrierINTEL + 6141 => { + } + // FPGAClusterAttributesV2INTEL + 6150 => { + } + // FPGAKernelAttributesv2INTEL + 6161 => { + } + // FPMaxErrorINTEL + 6169 => { + } + // FPGALatencyControlINTEL + 6171 => { + } + // FPGAArgumentInterfacesINTEL + 6174 => { + } + // GlobalVariableHostAccessINTEL + 6187 => { + } + // GlobalVariableFPGADecorationsINTEL + 6189 => { + } + // GroupUniformArithmeticKHR + 6400 => { + } + // CacheControlsINTEL + 6441 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_RayQueryIntersection(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"RayQueryIntersection", value)?]; + match value { + // RayQueryCandidateIntersectionKHR + 0 => { + } + // RayQueryCommittedIntersectionKHR + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_RayQueryCommittedIntersectionType(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"RayQueryCommittedIntersectionType", value)?]; + match value { + // RayQueryCommittedIntersectionNoneKHR + 0 => { + } + // RayQueryCommittedIntersectionTriangleKHR + 1 => { + } + // RayQueryCommittedIntersectionGeneratedKHR + 2 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_RayQueryCandidateIntersectionType(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"RayQueryCandidateIntersectionType", value)?]; + match value { + // RayQueryCandidateIntersectionTriangleKHR + 0 => { + } + // RayQueryCandidateIntersectionAABBKHR + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_PackedVectorFormat(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"PackedVectorFormat", value)?]; + match value { + // PackedVectorFormat4x8BitKHR + 0 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_CooperativeMatrixOperands(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"CooperativeMatrixOperands", value)?]; + // NoneKHR + if value & 0x0000 != 0 { + } + // MatrixASignedComponentsKHR + if value & 0x0001 != 0 { + } + // MatrixBSignedComponentsKHR + if value & 0x0002 != 0 { + } + // MatrixCSignedComponentsKHR + if value & 0x0004 != 0 { + } + // MatrixResultSignedComponentsKHR + if value & 0x0008 != 0 { + } + // SaturatingAccumulationKHR + if value & 0x0010 != 0 { + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_CooperativeMatrixLayout(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"CooperativeMatrixLayout", value)?]; + match value { + // RowMajorKHR + 0 => { + } + // ColumnMajorKHR + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_CooperativeMatrixUse(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"CooperativeMatrixUse", value)?]; + match value { + // MatrixAKHR + 0 => { + } + // MatrixBKHR + 1 => { + } + // MatrixAccumulatorKHR + 2 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_InitializationModeQualifier(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"InitializationModeQualifier", value)?]; + match value { + // InitOnDeviceReprogramINTEL + 0 => { + } + // InitOnDeviceResetINTEL + 1 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_LoadCacheControl(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"LoadCacheControl", value)?]; + match value { + // UncachedINTEL + 0 => { + } + // CachedINTEL + 1 => { + } + // StreamingINTEL + 2 => { + } + // InvalidateAfterReadINTEL + 3 => { + } + // ConstCachedINTEL + 4 => { + } + _ => {}, + } + Ok(out) +} + +#[allow(non_snake_case)] +#[allow(dead_code)] +fn print_enum_StoreCacheControl(operands: &mut Operands) -> Result> { + let value = operands.read_u32()?; + #[allow(unused_mut)] + let mut out = vec![enum_to_str(&"StoreCacheControl", value)?]; + match value { + // UncachedINTEL + 0 => { + } + // WriteThroughINTEL + 1 => { + } + // WriteBackINTEL + 2 => { + } + // StreamingINTEL + 3 => { + } + _ => {}, + } + Ok(out) +} + pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> { let mut out: Vec = Vec::new(); match opcode { @@ -73,7 +3648,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSource 3 => { // SourceLanguage - out.push(enum_to_str("SourceLanguage", operands.read_u32()?)?); + out.extend(print_enum_SourceLanguage(operands)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef ? @@ -144,14 +3719,14 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpMemoryModel 14 => { // AddressingModel - out.push(enum_to_str("AddressingModel", operands.read_u32()?)?); + out.extend(print_enum_AddressingModel(operands)?); // MemoryModel - out.push(enum_to_str("MemoryModel", operands.read_u32()?)?); + out.extend(print_enum_MemoryModel(operands)?); } // OpEntryPoint 15 => { // ExecutionModel - out.push(enum_to_str("ExecutionModel", operands.read_u32()?)?); + out.extend(print_enum_ExecutionModel(operands)?); // IdRef out.push(print_id(operands)?); // LiteralString @@ -166,12 +3741,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ExecutionMode - out.push(enum_to_str("ExecutionMode", operands.read_u32()?)?); + out.extend(print_enum_ExecutionMode(operands)?); } // OpCapability 17 => { // Capability - out.push(enum_to_str("Capability", operands.read_u32()?)?); + out.extend(print_enum_Capability(operands)?); } // OpTypeVoid 19 => { @@ -210,7 +3785,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // Dim - out.push(enum_to_str("Dim", operands.read_u32()?)?); + out.extend(print_enum_Dim(operands)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -220,10 +3795,10 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // LiteralInteger out.push(print_u32(operands)?); // ImageFormat - out.push(enum_to_str("ImageFormat", operands.read_u32()?)?); + out.extend(print_enum_ImageFormat(operands)?); // AccessQualifier ? if !operands.is_empty() { - out.push(enum_to_str("AccessQualifier", operands.read_u32()?)?); + out.extend(print_enum_AccessQualifier(operands)?); } } // OpTypeSampler @@ -261,7 +3836,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypePointer 32 => { // StorageClass - out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + out.extend(print_enum_StorageClass(operands)?); // IdRef out.push(print_id(operands)?); } @@ -289,14 +3864,14 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypePipe 38 => { // AccessQualifier - out.push(enum_to_str("AccessQualifier", operands.read_u32()?)?); + out.extend(print_enum_AccessQualifier(operands)?); } // OpTypeForwardPointer 39 => { // IdRef out.push(print_id(operands)?); // StorageClass - out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + out.extend(print_enum_StorageClass(operands)?); } // OpConstantTrue 41 => { @@ -319,11 +3894,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpConstantSampler 45 => { // SamplerAddressingMode - out.push(enum_to_str("SamplerAddressingMode", operands.read_u32()?)?); + out.extend(print_enum_SamplerAddressingMode(operands)?); // LiteralInteger out.push(print_u32(operands)?); // SamplerFilterMode - out.push(enum_to_str("SamplerFilterMode", operands.read_u32()?)?); + out.extend(print_enum_SamplerFilterMode(operands)?); } // OpConstantNull 46 => { @@ -354,7 +3929,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFunction 54 => { // FunctionControl - out.push(enum_to_str("FunctionControl", operands.read_u32()?)?); + out.extend(print_enum_FunctionControl(operands)?); // IdRef out.push(print_id(operands)?); } @@ -376,7 +3951,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpVariable 59 => { // StorageClass - out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + out.extend(print_enum_StorageClass(operands)?); // IdRef ? if !operands.is_empty() { out.push(print_id(operands)?); @@ -397,7 +3972,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpStore @@ -408,7 +3983,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpCopyMemory @@ -419,11 +3994,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpCopyMemorySized @@ -436,11 +4011,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpAccessChain @@ -500,7 +4075,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // Decoration - out.push(enum_to_str("Decoration", operands.read_u32()?)?); + out.extend(print_enum_Decoration(operands)?); } // OpMemberDecorate 72 => { @@ -509,7 +4084,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // LiteralInteger out.push(print_u32(operands)?); // Decoration - out.push(enum_to_str("Decoration", operands.read_u32()?)?); + out.extend(print_enum_Decoration(operands)?); } // OpDecorationGroup 73 => { @@ -611,7 +4186,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSampleExplicitLod @@ -621,7 +4196,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSampleDrefImplicitLod 89 => { @@ -633,7 +4208,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSampleDrefExplicitLod @@ -645,7 +4220,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSampleProjImplicitLod 91 => { @@ -655,7 +4230,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSampleProjExplicitLod @@ -665,7 +4240,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSampleProjDrefImplicitLod 93 => { @@ -677,7 +4252,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSampleProjDrefExplicitLod @@ -689,7 +4264,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageFetch 95 => { @@ -699,7 +4274,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageGather @@ -712,7 +4287,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageDrefGather @@ -725,7 +4300,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageRead @@ -736,7 +4311,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageWrite @@ -749,7 +4324,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImage @@ -871,7 +4446,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // StorageClass - out.push(enum_to_str("StorageClass", operands.read_u32()?)?); + out.extend(print_enum_StorageClass(operands)?); } // OpBitcast 124 => { @@ -1670,14 +5245,14 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // LoopControl - out.push(enum_to_str("LoopControl", operands.read_u32()?)?); + out.extend(print_enum_LoopControl(operands)?); } // OpSelectionMerge 247 => { // IdRef out.push(print_id(operands)?); // SelectionControl - out.push(enum_to_str("SelectionControl", operands.read_u32()?)?); + out.extend(print_enum_SelectionControl(operands)?); } // OpLabel 248 => { @@ -1791,7 +5366,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1800,7 +5375,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1809,7 +5384,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1818,7 +5393,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1827,7 +5402,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1836,7 +5411,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1845,7 +5420,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -1854,7 +5429,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -2169,7 +5744,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseSampleExplicitLod @@ -2179,7 +5754,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSparseSampleDrefImplicitLod 307 => { @@ -2191,7 +5766,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseSampleDrefExplicitLod @@ -2203,7 +5778,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSparseSampleProjImplicitLod 309 => { @@ -2213,7 +5788,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseSampleProjExplicitLod @@ -2223,7 +5798,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSparseSampleProjDrefImplicitLod 311 => { @@ -2235,7 +5810,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseSampleProjDrefExplicitLod @@ -2247,7 +5822,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ImageOperands - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } // OpImageSparseFetch 313 => { @@ -2257,7 +5832,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseGather @@ -2270,7 +5845,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseDrefGather @@ -2283,7 +5858,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpImageSparseTexelsResident @@ -2320,7 +5895,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpSizeOf @@ -2396,14 +5971,14 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // ExecutionMode - out.push(enum_to_str("ExecutionMode", operands.read_u32()?)?); + out.extend(print_enum_ExecutionMode(operands)?); } // OpDecorateId 332 => { // IdRef out.push(print_id(operands)?); // Decoration - out.push(enum_to_str("Decoration", operands.read_u32()?)?); + out.extend(print_enum_Decoration(operands)?); } // OpGroupNonUniformElect 333 => { @@ -2475,7 +6050,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -2534,7 +6109,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2547,7 +6122,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2560,7 +6135,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2573,7 +6148,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2586,7 +6161,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2599,7 +6174,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2612,7 +6187,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2625,7 +6200,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2638,7 +6213,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2651,7 +6226,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2664,7 +6239,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2677,7 +6252,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2690,7 +6265,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2703,7 +6278,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2716,7 +6291,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2729,7 +6304,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); // IdRef ? @@ -2903,7 +6478,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // PackedVectorFormat ? if !operands.is_empty() { - out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + out.extend(print_enum_PackedVectorFormat(operands)?); } } // OpUDotKHR @@ -2914,7 +6489,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // PackedVectorFormat ? if !operands.is_empty() { - out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + out.extend(print_enum_PackedVectorFormat(operands)?); } } // OpSUDotKHR @@ -2925,7 +6500,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // PackedVectorFormat ? if !operands.is_empty() { - out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + out.extend(print_enum_PackedVectorFormat(operands)?); } } // OpSDotAccSatKHR @@ -2938,7 +6513,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // PackedVectorFormat ? if !operands.is_empty() { - out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + out.extend(print_enum_PackedVectorFormat(operands)?); } } // OpUDotAccSatKHR @@ -2951,7 +6526,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // PackedVectorFormat ? if !operands.is_empty() { - out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + out.extend(print_enum_PackedVectorFormat(operands)?); } } // OpSUDotAccSatKHR @@ -2964,7 +6539,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // PackedVectorFormat ? if !operands.is_empty() { - out.push(enum_to_str("PackedVectorFormat", operands.read_u32()?)?); + out.extend(print_enum_PackedVectorFormat(operands)?); } } // OpTypeCooperativeMatrixKHR @@ -2992,7 +6567,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result } // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpCooperativeMatrixStoreKHR @@ -3009,7 +6584,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result } // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpCooperativeMatrixMulAddKHR @@ -3022,7 +6597,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // CooperativeMatrixOperands ? if !operands.is_empty() { - out.push(enum_to_str("CooperativeMatrixOperands", operands.read_u32()?)?); + out.extend(print_enum_CooperativeMatrixOperands(operands)?); } } // OpCooperativeMatrixLengthKHR @@ -3130,7 +6705,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3139,7 +6714,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3148,7 +6723,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3157,7 +6732,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3166,7 +6741,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3175,7 +6750,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3184,7 +6759,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3193,7 +6768,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -3592,7 +7167,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // ImageOperands ? if !operands.is_empty() { - out.push(enum_to_str("ImageOperands", operands.read_u32()?)?); + out.extend(print_enum_ImageOperands(operands)?); } } // OpEmitMeshTasksEXT @@ -3783,7 +7358,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpCooperativeMatrixStoreNV @@ -3798,7 +7373,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result out.push(print_id(operands)?); // MemoryAccess ? if !operands.is_empty() { - out.push(enum_to_str("MemoryAccess", operands.read_u32()?)?); + out.extend(print_enum_MemoryAccess(operands)?); } } // OpCooperativeMatrixMulAddNV @@ -4116,7 +7691,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdRef out.push(print_id(operands)?); // Decoration - out.push(enum_to_str("Decoration", operands.read_u32()?)?); + out.extend(print_enum_Decoration(operands)?); } // OpMemberDecorateStringGOOGLE 5633 => { @@ -4125,7 +7700,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // LiteralInteger out.push(print_u32(operands)?); // Decoration - out.push(enum_to_str("Decoration", operands.read_u32()?)?); + out.extend(print_enum_Decoration(operands)?); } // OpVmeImageINTEL 5699 => { @@ -5958,7 +9533,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypeBufferSurfaceINTEL 6086 => { // AccessQualifier - out.push(enum_to_str("AccessQualifier", operands.read_u32()?)?); + out.extend(print_enum_AccessQualifier(operands)?); } // OpTypeStructContinuedINTEL 6090 => { @@ -6021,7 +9596,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6030,7 +9605,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6039,7 +9614,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6048,7 +9623,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6057,7 +9632,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6066,7 +9641,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6075,7 +9650,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } @@ -6084,7 +9659,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // IdScope out.push(print_id(operands)?); // GroupOperation - out.push(enum_to_str("GroupOperation", operands.read_u32()?)?); + out.extend(print_enum_GroupOperation(operands)?); // IdRef out.push(print_id(operands)?); } From 06ce3352a8f47a1784359d471eeca46118691f86 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 15:45:53 +0800 Subject: [PATCH 15/50] Print ID with name --- .../scripts/generate_print_operand.py | 58 +- spirq-spvasm/src/dis/disassembler.rs | 59 +- spirq-spvasm/src/dis/test.rs | 7 +- spirq-spvasm/src/generated/print_operand.rs | 3392 +++++++++-------- 4 files changed, 1793 insertions(+), 1723 deletions(-) diff --git a/spirq-spvasm/scripts/generate_print_operand.py b/spirq-spvasm/scripts/generate_print_operand.py index ed489d4..ea12bd5 100644 --- a/spirq-spvasm/scripts/generate_print_operand.py +++ b/spirq-spvasm/scripts/generate_print_operand.py @@ -52,12 +52,18 @@ out = [] out += [ + "use std::collections::HashMap;", "use anyhow::{bail, Result};", "use spirq_core::parse::Operands;", "use super::enum_to_str::enum_to_str;", "", - "fn print_id(operands: &mut Operands) -> Result {", - ' Ok(format!("%{}", operands.read_u32()?))', + "fn print_id(operands: &mut Operands, id_names: &HashMap) -> Result {", + " let id = operands.read_u32()?;", + " if let Some(name) = id_names.get(&id) {", + ' Ok(format!("%{}", name))', + " } else {", + ' Ok(format!("%{}", id))', + " }", "}", "fn print_u32(operands: &mut Operands) -> Result {", " Ok(operands.read_u32()?.to_string())", @@ -76,37 +82,22 @@ " .collect::>();", " Ok(out)", "}", - "fn print_pair_id_id_list(operands: &mut Operands) -> Result> {", + "fn print_pair_id_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> {", " let mut out = Vec::new();", - " for pair in operands.read_list()?.chunks(2) {", - " if pair.len() != 2 {", - ' bail!("operands does not pair up");', - " }", - ' let seg = format!("%{} %{}", pair[0], pair[1]);', - " out.push(seg);", - " }", + " out.push(print_id(operands, id_names)?);", + " out.push(print_id(operands, id_names)?);", " Ok(out)", "}", - "fn print_pair_id_u32_list(operands: &mut Operands) -> Result> {", + "fn print_pair_id_u32_list(operands: &mut Operands, id_names: &HashMap) -> Result> {", " let mut out = Vec::new();", - " for pair in operands.read_list()?.chunks(2) {", - " if pair.len() != 2 {", - ' bail!("operands does not pair up");', - " }", - ' let seg = format!("%{} {}", pair[0], pair[1]);', - " out.push(seg);", - " }", + " out.push(print_id(operands, id_names)?);", + " out.push(print_u32(operands)?);", " Ok(out)", "}", - "fn print_pair_u32_id_list(operands: &mut Operands) -> Result> {", + "fn print_pair_u32_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> {", " let mut out = Vec::new();", - " for pair in operands.read_list()?.chunks(2) {", - " if pair.len() != 2 {", - ' bail!("operands does not pair up");', - " }", - ' let seg = format!("{} %{}", pair[0], pair[1]);', - " out.push(seg);", - " }", + " out.push(print_u32(operands)?);", + " out.push(print_id(operands, id_names)?);", " Ok(out)", "}", "", @@ -149,17 +140,17 @@ def print_operand(kind: str, quantifier: Optional[str], indent: int) -> List[str out += [padding + "out.push(print_u32(operands)?);"] # Id elif kind.startswith("Id"): - out += [padding + "out.push(print_id(operands)?);"] + out += [padding + "out.push(print_id(operands, id_names)?);"] # Pair elif kind == "PairIdRefIdRef": - out += [padding + "out.extend(print_pair_id_id_list(operands)?);"] + out += [padding + "out.extend(print_pair_id_id_list(operands, id_names)?);"] elif kind == "PairIdRefLiteralInteger": - out += [padding + "out.extend(print_pair_id_u32_list(operands)?);"] + out += [padding + "out.extend(print_pair_id_u32_list(operands, id_names)?);"] elif kind == "PairLiteralIntegerIdRef": - out += [padding + "out.extend(print_pair_u32_id_list(operands)?);"] + out += [padding + "out.extend(print_pair_u32_id_list(operands, id_names)?);"] # Enum else: - out += [padding + f"out.extend(print_enum_{kind}(operands)?);"] + out += [padding + f"out.extend(print_enum_{kind}(operands, id_names)?);"] if quantifier == "*": out += [ @@ -181,7 +172,8 @@ def print_operand(kind: str, quantifier: Optional[str], indent: int) -> List[str out += [ "#[allow(non_snake_case)]", "#[allow(dead_code)]", - f"fn print_enum_{kind}(operands: &mut Operands) -> Result> {{", + "#[allow(unused_variables)]", + f"fn print_enum_{kind}(operands: &mut Operands, id_names: &HashMap) -> Result> {{", " let value = operands.read_u32()?;", " #[allow(unused_mut)]", f' let mut out = vec![enum_to_str(&"{kind}", value)?];', @@ -227,7 +219,7 @@ def print_operand(kind: str, quantifier: Optional[str], indent: int) -> List[str ] out += [ - "pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> {", + "pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap) -> Result> {", " let mut out: Vec = Vec::new();", " match opcode {", ] diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 462ffcf..bb3ec48 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -1,9 +1,11 @@ +use std::collections::HashMap; + use anyhow::Result; use spirq_core::{parse::{Instr, SpirvBinary, Instrs, Operands}, spirv::Op}; use crate::generated; pub struct Disassembler { - print_header: bool + print_header: bool, } impl Disassembler { pub fn new() -> Self { @@ -17,8 +19,14 @@ impl Disassembler { return self } - fn print_operands(&self, opcode: u32, operands: &mut Operands<'_>) -> Result { - let operands = generated::print_operand(opcode, operands)?; + fn print_id(&self, id: u32, id_names: &HashMap) -> Result { + if let Some(name) = id_names.get(&id) { + return Ok(format!("%{}", name)); + } + Ok(format!("%{}", id)) + } + fn print_operands(&self, opcode: u32, operands: &mut Operands<'_>, id_names: &HashMap) -> Result { + let operands = generated::print_operand(opcode, operands, id_names)?; let out = operands.join(" "); Ok(out) } @@ -27,7 +35,7 @@ impl Disassembler { Ok(opname) } - fn print_line(&self, instr: &Instr) -> Result { + fn print_line<'a>(&self, instr: &'a Instr, id_names: &HashMap) -> Result { let mut operands = instr.operands(); let opcode = instr.opcode(); let result_type_id = if generated::op_has_result_type_id(opcode)? { @@ -43,29 +51,53 @@ impl Disassembler { let mut out = String::new(); if let Some(result_id) = result_id { - out = format!("%{} = ", result_id); + out.push_str(&self.print_id(result_id, id_names)?); + out.push_str(" = "); } out.push_str(&self.print_opcode(opcode)?); if let Some(result_type_id) = result_type_id { - out.push_str(&format!(" %{}", result_type_id)); + out.push_str(&format!(" {}", &self.print_id(result_type_id, id_names)?)); } - let operands_ = self.print_operands(opcode, &mut operands)?; + let operands_ = self.print_operands(opcode, &mut operands, id_names)?; if !operands_.is_empty() { out.push(' '); out.push_str(&operands_); } - dbg!(&out); Ok(out) } - fn print_lines(&self, instrs: &mut Instrs) -> Result> { + fn print_lines<'a>(&self, instrs: &'a mut Instrs, id_names: HashMap) -> Result> { let mut out = Vec::new(); while let Some(instr) = instrs.next()? { - out.push(self.print_line(instr)?); + out.push(self.print_line(instr, &id_names)?); } Ok(out) } - pub fn disassemble(self, spv: &SpirvBinary) -> Result { + + fn collect_names<'a>(&self, spv: &'a SpirvBinary) -> Result> { + let mut out = HashMap::new(); + + let mut instrs = spv.instrs()?; + while let Some(instr) = instrs.next()? { + if instr.op() == Op::Name { + let mut operands = instr.operands(); + let id = operands.read_id()?; + let name = operands.read_str()?; + // Sanitize name. Convert all punctuations to underscore. + let name = name.chars() + .map(|c| if c.is_ascii_punctuation() { '_' } else { c }) + .collect::(); + out.insert(id, name); + } + } + + Ok(out) + } + fn print<'a>(&self, spv: &'a SpirvBinary, id_names: HashMap) -> Result> { + self.print_lines(&mut spv.instrs()?, id_names) + } + + pub fn disassemble(&self, spv: &SpirvBinary) -> Result { let mut out = Vec::new(); if let Some(header) = spv.header() { @@ -78,7 +110,10 @@ impl Disassembler { out.push(format!("; Schema: {:x}", header.schema)); } - let instrs = self.print_lines(&mut spv.instrs()?)?; + let id_names = self.collect_names(spv)?; + dbg!(&id_names); + + let instrs = self.print(spv, id_names)?; out.extend(instrs); Ok(out.join("\n")) } diff --git a/spirq-spvasm/src/dis/test.rs b/spirq-spvasm/src/dis/test.rs index 6e862c6..d2cac80 100644 --- a/spirq-spvasm/src/dis/test.rs +++ b/spirq-spvasm/src/dis/test.rs @@ -9,7 +9,12 @@ fn test_disassembler() { let spv = include_bytes!("../../../assets/moon.spv"); let spvasm = actual.disassemble(&SpirvBinary::from(spv.as_ref())).unwrap(); println!("{}", spvasm); - let expect = r#"OpCapability Shader + let expect = r#"; SPIR-V +; Version: 1.0 +; Generator: e0000 +; Bound: 97 +; Schema: 0 +OpCapability Shader OpCapability RuntimeDescriptorArray OpExtension "SPV_EXT_descriptor_indexing" %1 = OpExtInstImport "GLSL.std.450" diff --git a/spirq-spvasm/src/generated/print_operand.rs b/spirq-spvasm/src/generated/print_operand.rs index f1b1aca..068e73a 100644 --- a/spirq-spvasm/src/generated/print_operand.rs +++ b/spirq-spvasm/src/generated/print_operand.rs @@ -1,9 +1,15 @@ +use std::collections::HashMap; use anyhow::{bail, Result}; use spirq_core::parse::Operands; use super::enum_to_str::enum_to_str; -fn print_id(operands: &mut Operands) -> Result { - Ok(format!("%{}", operands.read_u32()?)) +fn print_id(operands: &mut Operands, id_names: &HashMap) -> Result { + let id = operands.read_u32()?; + if let Some(name) = id_names.get(&id) { + Ok(format!("%{}", name)) + } else { + Ok(format!("%{}", id)) + } } fn print_u32(operands: &mut Operands) -> Result { Ok(operands.read_u32()?.to_string()) @@ -22,43 +28,29 @@ fn print_list(operands: &mut Operands) -> Result> { .collect::>(); Ok(out) } -fn print_pair_id_id_list(operands: &mut Operands) -> Result> { +fn print_pair_id_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> { let mut out = Vec::new(); - for pair in operands.read_list()?.chunks(2) { - if pair.len() != 2 { - bail!("operands does not pair up"); - } - let seg = format!("%{} %{}", pair[0], pair[1]); - out.push(seg); - } + out.push(print_id(operands, id_names)?); + out.push(print_id(operands, id_names)?); Ok(out) } -fn print_pair_id_u32_list(operands: &mut Operands) -> Result> { +fn print_pair_id_u32_list(operands: &mut Operands, id_names: &HashMap) -> Result> { let mut out = Vec::new(); - for pair in operands.read_list()?.chunks(2) { - if pair.len() != 2 { - bail!("operands does not pair up"); - } - let seg = format!("%{} {}", pair[0], pair[1]); - out.push(seg); - } + out.push(print_id(operands, id_names)?); + out.push(print_u32(operands)?); Ok(out) } -fn print_pair_u32_id_list(operands: &mut Operands) -> Result> { +fn print_pair_u32_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> { let mut out = Vec::new(); - for pair in operands.read_list()?.chunks(2) { - if pair.len() != 2 { - bail!("operands does not pair up"); - } - let seg = format!("{} %{}", pair[0], pair[1]); - out.push(seg); - } + out.push(print_u32(operands)?); + out.push(print_id(operands, id_names)?); Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_ImageOperands(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_ImageOperands(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageOperands", value)?]; @@ -68,54 +60,54 @@ fn print_enum_ImageOperands(operands: &mut Operands) -> Result> { // Bias if value & 0x0001 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // Lod if value & 0x0002 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // Grad if value & 0x0004 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // ConstOffset if value & 0x0008 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // Offset if value & 0x0010 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // ConstOffsets if value & 0x0020 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // Sample if value & 0x0040 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MinLod if value & 0x0080 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MakeTexelAvailableKHR if value & 0x0100 != 0 { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MakeTexelVisibleKHR if value & 0x0200 != 0 { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NonPrivateTexelKHR if value & 0x0400 != 0 { @@ -135,14 +127,15 @@ fn print_enum_ImageOperands(operands: &mut Operands) -> Result> { // Offsets if value & 0x10000 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_FPFastMathMode(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_FPFastMathMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPFastMathMode", value)?]; @@ -175,7 +168,8 @@ fn print_enum_FPFastMathMode(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_SelectionControl(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_SelectionControl(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SelectionControl", value)?]; @@ -193,7 +187,8 @@ fn print_enum_SelectionControl(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_LoopControl(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_LoopControl(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"LoopControl", value)?]; @@ -292,7 +287,8 @@ fn print_enum_LoopControl(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_FunctionControl(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_FunctionControl(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FunctionControl", value)?]; @@ -319,7 +315,8 @@ fn print_enum_FunctionControl(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_MemorySemantics(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_MemorySemantics(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"MemorySemantics", value)?]; @@ -373,7 +370,8 @@ fn print_enum_MemorySemantics(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_MemoryAccess(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_MemoryAccess(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"MemoryAccess", value)?]; @@ -394,12 +392,12 @@ fn print_enum_MemoryAccess(operands: &mut Operands) -> Result> { // MakePointerAvailableKHR if value & 0x0008 != 0 { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MakePointerVisibleKHR if value & 0x0010 != 0 { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NonPrivatePointerKHR if value & 0x0020 != 0 { @@ -407,19 +405,20 @@ fn print_enum_MemoryAccess(operands: &mut Operands) -> Result> { // AliasScopeINTELMask if value & 0x10000 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NoAliasINTELMask if value & 0x20000 != 0 { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_KernelProfilingInfo(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_KernelProfilingInfo(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"KernelProfilingInfo", value)?]; @@ -434,7 +433,8 @@ fn print_enum_KernelProfilingInfo(operands: &mut Operands) -> Result #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_RayFlags(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_RayFlags(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayFlags", value)?]; @@ -479,7 +479,8 @@ fn print_enum_RayFlags(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_FragmentShadingRate(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_FragmentShadingRate(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FragmentShadingRate", value)?]; @@ -500,7 +501,8 @@ fn print_enum_FragmentShadingRate(operands: &mut Operands) -> Result #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_SourceLanguage(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_SourceLanguage(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SourceLanguage", value)?]; @@ -548,7 +550,8 @@ fn print_enum_SourceLanguage(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_ExecutionModel(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_ExecutionModel(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ExecutionModel", value)?]; @@ -611,7 +614,8 @@ fn print_enum_ExecutionModel(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_AddressingModel(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_AddressingModel(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"AddressingModel", value)?]; @@ -635,7 +639,8 @@ fn print_enum_AddressingModel(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_MemoryModel(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_MemoryModel(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"MemoryModel", value)?]; @@ -659,7 +664,8 @@ fn print_enum_MemoryModel(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_ExecutionMode(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ExecutionMode", value)?]; @@ -794,25 +800,25 @@ fn print_enum_ExecutionMode(operands: &mut Operands) -> Result> { // SubgroupsPerWorkgroupId 37 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // LocalSizeId 38 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // LocalSizeHintId 39 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NonCoherentColorAttachmentReadEXT 4169 => { @@ -866,30 +872,30 @@ fn print_enum_ExecutionMode(operands: &mut Operands) -> Result> { // MaxNodeRecursionAMDX 5071 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // StaticNumWorkgroupsAMDX 5072 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // ShaderIndexAMDX 5073 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MaxNumWorkgroupsAMDX 5077 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // StencilRefUnchangedFrontAMD 5079 => { @@ -1018,7 +1024,8 @@ fn print_enum_ExecutionMode(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_StorageClass(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_StorageClass(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"StorageClass", value)?]; @@ -1114,7 +1121,8 @@ fn print_enum_StorageClass(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_Dim(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_Dim(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Dim", value)?]; @@ -1150,7 +1158,8 @@ fn print_enum_Dim(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_SamplerAddressingMode(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_SamplerAddressingMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SamplerAddressingMode", value)?]; @@ -1177,7 +1186,8 @@ fn print_enum_SamplerAddressingMode(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_SamplerFilterMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SamplerFilterMode", value)?]; @@ -1195,7 +1205,8 @@ fn print_enum_SamplerFilterMode(operands: &mut Operands) -> Result> #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_ImageFormat(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_ImageFormat(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageFormat", value)?]; @@ -1333,7 +1344,8 @@ fn print_enum_ImageFormat(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_ImageChannelOrder(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_ImageChannelOrder(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageChannelOrder", value)?]; @@ -1405,7 +1417,8 @@ fn print_enum_ImageChannelOrder(operands: &mut Operands) -> Result> #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_ImageChannelDataType(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_ImageChannelDataType(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageChannelDataType", value)?]; @@ -1474,7 +1487,8 @@ fn print_enum_ImageChannelDataType(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_FPRoundingMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPRoundingMode", value)?]; @@ -1498,7 +1512,8 @@ fn print_enum_FPRoundingMode(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_FPDenormMode(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_FPDenormMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPDenormMode", value)?]; @@ -1516,7 +1531,8 @@ fn print_enum_FPDenormMode(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_QuantizationModes(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_QuantizationModes(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"QuantizationModes", value)?]; @@ -1552,7 +1568,8 @@ fn print_enum_QuantizationModes(operands: &mut Operands) -> Result> #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_FPOperationMode(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_FPOperationMode(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPOperationMode", value)?]; @@ -1570,7 +1587,8 @@ fn print_enum_FPOperationMode(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_OverflowModes(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_OverflowModes(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"OverflowModes", value)?]; @@ -1594,7 +1612,8 @@ fn print_enum_OverflowModes(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_LinkageType(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_LinkageType(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"LinkageType", value)?]; @@ -1615,7 +1634,8 @@ fn print_enum_LinkageType(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_AccessQualifier(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_AccessQualifier(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"AccessQualifier", value)?]; @@ -1636,7 +1656,8 @@ fn print_enum_AccessQualifier(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_HostAccessQualifier(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_HostAccessQualifier(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"HostAccessQualifier", value)?]; @@ -1660,7 +1681,8 @@ fn print_enum_HostAccessQualifier(operands: &mut Operands) -> Result #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_FunctionParameterAttribute(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_FunctionParameterAttribute(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FunctionParameterAttribute", value)?]; @@ -1699,7 +1721,8 @@ fn print_enum_FunctionParameterAttribute(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Decoration", value)?]; @@ -1746,7 +1769,7 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // BuiltIn 11 => { // BuiltIn - out.extend(print_enum_BuiltIn(operands)?); + out.extend(print_enum_BuiltIn(operands, id_names)?); } // NoPerspective 13 => { @@ -1793,7 +1816,7 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // UniformId 27 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // SaturatedConversion 28 => { @@ -1846,24 +1869,24 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // FuncParamAttr 38 => { // FunctionParameterAttribute - out.extend(print_enum_FunctionParameterAttribute(operands)?); + out.extend(print_enum_FunctionParameterAttribute(operands, id_names)?); } // FPRoundingMode 39 => { // FPRoundingMode - out.extend(print_enum_FPRoundingMode(operands)?); + out.extend(print_enum_FPRoundingMode(operands, id_names)?); } // FPFastMathMode 40 => { // FPFastMathMode - out.extend(print_enum_FPFastMathMode(operands)?); + out.extend(print_enum_FPFastMathMode(operands, id_names)?); } // LinkageAttributes 41 => { // LiteralString out.push(print_str(operands)?); // LinkageType - out.extend(print_enum_LinkageType(operands)?); + out.extend(print_enum_LinkageType(operands, id_names)?); } // NoContraction 42 => { @@ -1886,12 +1909,12 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // AlignmentId 46 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MaxByteOffsetId 47 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NoSignedWrap 4469 => { @@ -1911,12 +1934,12 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // NodeSharesPayloadLimitsWithAMDX 5019 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NodeMaxPayloadsAMDX 5020 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // TrackFinishWritingAMDX 5078 => { @@ -2014,7 +2037,7 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // HlslCounterBufferGOOGLE 5634 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // HlslSemanticGOOGLE 5635 => { @@ -2031,14 +2054,14 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // LiteralInteger out.push(print_u32(operands)?); // FPRoundingMode - out.extend(print_enum_FPRoundingMode(operands)?); + out.extend(print_enum_FPRoundingMode(operands, id_names)?); } // FunctionDenormModeINTEL 5823 => { // LiteralInteger out.push(print_u32(operands)?); // FPDenormMode - out.extend(print_enum_FPDenormMode(operands)?); + out.extend(print_enum_FPDenormMode(operands, id_names)?); } // RegisterINTEL 5825 => { @@ -2139,12 +2162,12 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // AliasScopeINTEL 5914 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // NoAliasINTEL 5915 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // InitiationIntervalINTEL 5917 => { @@ -2176,7 +2199,7 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // LiteralInteger out.push(print_u32(operands)?); // FPOperationMode - out.extend(print_enum_FPOperationMode(operands)?); + out.extend(print_enum_FPOperationMode(operands, id_names)?); } // SingleElementVectorINTEL 6085 => { @@ -2233,7 +2256,7 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // MMHostInterfaceReadWriteModeINTEL 6180 => { // AccessQualifier - out.extend(print_enum_AccessQualifier(operands)?); + out.extend(print_enum_AccessQualifier(operands, id_names)?); } // MMHostInterfaceMaxBurstINTEL 6181 => { @@ -2251,14 +2274,14 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // HostAccessINTEL 6188 => { // HostAccessQualifier - out.extend(print_enum_HostAccessQualifier(operands)?); + out.extend(print_enum_HostAccessQualifier(operands, id_names)?); // LiteralString out.push(print_str(operands)?); } // InitModeINTEL 6190 => { // InitializationModeQualifier - out.extend(print_enum_InitializationModeQualifier(operands)?); + out.extend(print_enum_InitializationModeQualifier(operands, id_names)?); } // ImplementInRegisterMapINTEL 6191 => { @@ -2270,14 +2293,14 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { // LiteralInteger out.push(print_u32(operands)?); // LoadCacheControl - out.extend(print_enum_LoadCacheControl(operands)?); + out.extend(print_enum_LoadCacheControl(operands, id_names)?); } // CacheControlStoreINTEL 6443 => { // LiteralInteger out.push(print_u32(operands)?); // StoreCacheControl - out.extend(print_enum_StoreCacheControl(operands)?); + out.extend(print_enum_StoreCacheControl(operands, id_names)?); } _ => {}, } @@ -2286,7 +2309,8 @@ fn print_enum_Decoration(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_BuiltIn(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_BuiltIn(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"BuiltIn", value)?]; @@ -2646,7 +2670,8 @@ fn print_enum_BuiltIn(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_Scope(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_Scope(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Scope", value)?]; @@ -2679,7 +2704,8 @@ fn print_enum_Scope(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_GroupOperation(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_GroupOperation(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"GroupOperation", value)?]; @@ -2712,7 +2738,8 @@ fn print_enum_GroupOperation(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_KernelEnqueueFlags(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_KernelEnqueueFlags(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"KernelEnqueueFlags", value)?]; @@ -2733,7 +2760,8 @@ fn print_enum_KernelEnqueueFlags(operands: &mut Operands) -> Result> #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_Capability(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_Capability(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Capability", value)?]; @@ -3426,7 +3454,8 @@ fn print_enum_Capability(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_RayQueryIntersection(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_RayQueryIntersection(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayQueryIntersection", value)?]; @@ -3444,7 +3473,8 @@ fn print_enum_RayQueryIntersection(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_RayQueryCommittedIntersectionType(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayQueryCommittedIntersectionType", value)?]; @@ -3465,7 +3495,8 @@ fn print_enum_RayQueryCommittedIntersectionType(operands: &mut Operands) -> Resu #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_RayQueryCandidateIntersectionType(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_RayQueryCandidateIntersectionType(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayQueryCandidateIntersectionType", value)?]; @@ -3483,7 +3514,8 @@ fn print_enum_RayQueryCandidateIntersectionType(operands: &mut Operands) -> Resu #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_PackedVectorFormat(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_PackedVectorFormat(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"PackedVectorFormat", value)?]; @@ -3498,7 +3530,8 @@ fn print_enum_PackedVectorFormat(operands: &mut Operands) -> Result> #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_CooperativeMatrixOperands(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_CooperativeMatrixOperands(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"CooperativeMatrixOperands", value)?]; @@ -3525,7 +3558,8 @@ fn print_enum_CooperativeMatrixOperands(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_CooperativeMatrixLayout(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"CooperativeMatrixLayout", value)?]; @@ -3543,7 +3577,8 @@ fn print_enum_CooperativeMatrixLayout(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_CooperativeMatrixUse(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"CooperativeMatrixUse", value)?]; @@ -3564,7 +3599,8 @@ fn print_enum_CooperativeMatrixUse(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_InitializationModeQualifier(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"InitializationModeQualifier", value)?]; @@ -3582,7 +3618,8 @@ fn print_enum_InitializationModeQualifier(operands: &mut Operands) -> Result Result> { +#[allow(unused_variables)] +fn print_enum_LoadCacheControl(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"LoadCacheControl", value)?]; @@ -3609,7 +3646,8 @@ fn print_enum_LoadCacheControl(operands: &mut Operands) -> Result> { #[allow(non_snake_case)] #[allow(dead_code)] -fn print_enum_StoreCacheControl(operands: &mut Operands) -> Result> { +#[allow(unused_variables)] +fn print_enum_StoreCacheControl(operands: &mut Operands, id_names: &HashMap) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"StoreCacheControl", value)?]; @@ -3631,7 +3669,7 @@ fn print_enum_StoreCacheControl(operands: &mut Operands) -> Result> Ok(out) } -pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result> { +pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap) -> Result> { let mut out: Vec = Vec::new(); match opcode { // OpNop @@ -3648,12 +3686,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSource 3 => { // SourceLanguage - out.extend(print_enum_SourceLanguage(operands)?); + out.extend(print_enum_SourceLanguage(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // LiteralString ? if !operands.is_empty() { @@ -3668,14 +3706,14 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpName 5 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralString out.push(print_str(operands)?); } // OpMemberName 6 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralString @@ -3689,7 +3727,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpLine 8 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -3708,45 +3746,45 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpExtInst 12 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralExtInstInteger out.push(print_u32(operands)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpMemoryModel 14 => { // AddressingModel - out.extend(print_enum_AddressingModel(operands)?); + out.extend(print_enum_AddressingModel(operands, id_names)?); // MemoryModel - out.extend(print_enum_MemoryModel(operands)?); + out.extend(print_enum_MemoryModel(operands, id_names)?); } // OpEntryPoint 15 => { // ExecutionModel - out.extend(print_enum_ExecutionModel(operands)?); + out.extend(print_enum_ExecutionModel(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralString out.push(print_str(operands)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpExecutionMode 16 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ExecutionMode - out.extend(print_enum_ExecutionMode(operands)?); + out.extend(print_enum_ExecutionMode(operands, id_names)?); } // OpCapability 17 => { // Capability - out.extend(print_enum_Capability(operands)?); + out.extend(print_enum_Capability(operands, id_names)?); } // OpTypeVoid 19 => { @@ -3769,23 +3807,23 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypeVector 23 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpTypeMatrix 24 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpTypeImage 25 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // Dim - out.extend(print_enum_Dim(operands)?); + out.extend(print_enum_Dim(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -3795,10 +3833,10 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // LiteralInteger out.push(print_u32(operands)?); // ImageFormat - out.extend(print_enum_ImageFormat(operands)?); + out.extend(print_enum_ImageFormat(operands, id_names)?); // AccessQualifier ? if !operands.is_empty() { - out.extend(print_enum_AccessQualifier(operands)?); + out.extend(print_enum_AccessQualifier(operands, id_names)?); } } // OpTypeSampler @@ -3807,25 +3845,25 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypeSampledImage 27 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeArray 28 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeRuntimeArray 29 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeStruct 30 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpTypeOpaque @@ -3836,17 +3874,17 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypePointer 32 => { // StorageClass - out.extend(print_enum_StorageClass(operands)?); + out.extend(print_enum_StorageClass(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeFunction 33 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpTypeEvent @@ -3864,14 +3902,14 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTypePipe 38 => { // AccessQualifier - out.extend(print_enum_AccessQualifier(operands)?); + out.extend(print_enum_AccessQualifier(operands, id_names)?); } // OpTypeForwardPointer 39 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // StorageClass - out.extend(print_enum_StorageClass(operands)?); + out.extend(print_enum_StorageClass(operands, id_names)?); } // OpConstantTrue 41 => { @@ -3888,17 +3926,17 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result 44 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpConstantSampler 45 => { // SamplerAddressingMode - out.extend(print_enum_SamplerAddressingMode(operands)?); + out.extend(print_enum_SamplerAddressingMode(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // SamplerFilterMode - out.extend(print_enum_SamplerFilterMode(operands)?); + out.extend(print_enum_SamplerFilterMode(operands, id_names)?); } // OpConstantNull 46 => { @@ -3918,7 +3956,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result 51 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpSpecConstantOp @@ -3929,9 +3967,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFunction 54 => { // FunctionControl - out.extend(print_enum_FunctionControl(operands)?); + out.extend(print_enum_FunctionControl(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFunctionParameter 55 => { @@ -3942,149 +3980,149 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFunctionCall 57 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpVariable 59 => { // StorageClass - out.extend(print_enum_StorageClass(operands)?); + out.extend(print_enum_StorageClass(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpImageTexelPointer 60 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLoad 61 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpStore 62 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpCopyMemory 63 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpCopyMemorySized 64 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpAccessChain 65 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpInBoundsAccessChain 66 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpPtrAccessChain 67 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpArrayLength 68 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpGenericPtrMemSemantics 69 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpInBoundsPtrAccessChain 70 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpDecorate 71 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // Decoration - out.extend(print_enum_Decoration(operands)?); + out.extend(print_enum_Decoration(operands, id_names)?); } // OpMemberDecorate 72 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // Decoration - out.extend(print_enum_Decoration(operands)?); + out.extend(print_enum_Decoration(operands, id_names)?); } // OpDecorationGroup 73 => { @@ -4092,43 +4130,43 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpGroupDecorate 74 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupMemberDecorate 75 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PairIdRefLiteralInteger * while !operands.is_empty() { - out.extend(print_pair_id_u32_list(operands)?); + out.extend(print_pair_id_u32_list(operands, id_names)?); } } // OpVectorExtractDynamic 77 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpVectorInsertDynamic 78 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpVectorShuffle 79 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger * while !operands.is_empty() { out.push(print_u32(operands)?); @@ -4138,13 +4176,13 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result 80 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpCompositeExtract 81 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger * while !operands.is_empty() { out.push(print_u32(operands)?); @@ -4153,9 +4191,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpCompositeInsert 82 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger * while !operands.is_empty() { out.push(print_u32(operands)?); @@ -4164,862 +4202,862 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpCopyObject 83 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTranspose 84 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSampledImage 86 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageSampleImplicitLod 87 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSampleExplicitLod 88 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSampleDrefImplicitLod 89 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSampleDrefExplicitLod 90 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSampleProjImplicitLod 91 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSampleProjExplicitLod 92 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSampleProjDrefImplicitLod 93 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSampleProjDrefExplicitLod 94 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageFetch 95 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageGather 96 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageDrefGather 97 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageRead 98 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageWrite 99 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImage 100 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQueryFormat 101 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQueryOrder 102 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQuerySizeLod 103 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQuerySize 104 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQueryLod 105 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQueryLevels 106 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageQuerySamples 107 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertFToU 109 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertFToS 110 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertSToF 111 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertUToF 112 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUConvert 113 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSConvert 114 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFConvert 115 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpQuantizeToF16 116 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertPtrToU 117 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSatConvertSToU 118 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSatConvertUToS 119 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertUToPtr 120 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpPtrCastToGeneric 121 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGenericCastToPtr 122 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGenericCastToPtrExplicit 123 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // StorageClass - out.extend(print_enum_StorageClass(operands)?); + out.extend(print_enum_StorageClass(operands, id_names)?); } // OpBitcast 124 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSNegate 126 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFNegate 127 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIAdd 128 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFAdd 129 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpISub 130 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFSub 131 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIMul 132 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFMul 133 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUDiv 134 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSDiv 135 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFDiv 136 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUMod 137 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSRem 138 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSMod 139 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFRem 140 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFMod 141 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpVectorTimesScalar 142 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpMatrixTimesScalar 143 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpVectorTimesMatrix 144 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpMatrixTimesVector 145 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpMatrixTimesMatrix 146 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpOuterProduct 147 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDot 148 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIAddCarry 149 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpISubBorrow 150 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUMulExtended 151 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSMulExtended 152 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAny 154 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAll 155 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIsNan 156 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIsInf 157 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIsFinite 158 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIsNormal 159 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSignBitSet 160 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLessOrGreater 161 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpOrdered 162 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUnordered 163 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLogicalEqual 164 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLogicalNotEqual 165 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLogicalOr 166 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLogicalAnd 167 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpLogicalNot 168 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSelect 169 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIEqual 170 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpINotEqual 171 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUGreaterThan 172 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSGreaterThan 173 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUGreaterThanEqual 174 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSGreaterThanEqual 175 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpULessThan 176 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSLessThan 177 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpULessThanEqual 178 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSLessThanEqual 179 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFOrdEqual 180 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFUnordEqual 181 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFOrdNotEqual 182 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFUnordNotEqual 183 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFOrdLessThan 184 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFUnordLessThan 185 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFOrdGreaterThan 186 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFUnordGreaterThan 187 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFOrdLessThanEqual 188 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFUnordLessThanEqual 189 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFOrdGreaterThanEqual 190 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFUnordGreaterThanEqual 191 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpShiftRightLogical 194 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpShiftRightArithmetic 195 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpShiftLeftLogical 196 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitwiseOr 197 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitwiseXor 198 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitwiseAnd 199 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpNot 200 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitFieldInsert 201 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitFieldSExtract 202 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitFieldUExtract 203 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitReverse 204 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBitCount 205 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDPdx 207 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDPdy 208 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFwidth 209 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDPdxFine 210 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDPdyFine 211 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFwidthFine 212 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDPdxCoarse 213 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDPdyCoarse 214 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFwidthCoarse 215 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpEmitVertex 218 => { @@ -5030,229 +5068,229 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpEmitStreamVertex 220 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpEndStreamPrimitive 221 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpControlBarrier 224 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpMemoryBarrier 225 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicLoad 227 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicStore 228 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicExchange 229 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicCompareExchange 230 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicCompareExchangeWeak 231 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicIIncrement 232 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicIDecrement 233 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicIAdd 234 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicISub 235 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicSMin 236 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicUMin 237 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicSMax 238 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicUMax 239 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicAnd 240 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicOr 241 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicXor 242 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpPhi 245 => { // PairIdRefIdRef * while !operands.is_empty() { - out.extend(print_pair_id_id_list(operands)?); + out.extend(print_pair_id_id_list(operands, id_names)?); } } // OpLoopMerge 246 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LoopControl - out.extend(print_enum_LoopControl(operands)?); + out.extend(print_enum_LoopControl(operands, id_names)?); } // OpSelectionMerge 247 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // SelectionControl - out.extend(print_enum_SelectionControl(operands)?); + out.extend(print_enum_SelectionControl(operands, id_names)?); } // OpLabel 248 => { @@ -5260,16 +5298,16 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpBranch 249 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBranchConditional 250 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger * while !operands.is_empty() { out.push(print_u32(operands)?); @@ -5278,12 +5316,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSwitch 251 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PairLiteralIntegerIdRef * while !operands.is_empty() { - out.extend(print_pair_u32_id_list(operands)?); + out.extend(print_pair_u32_id_list(operands, id_names)?); } } // OpKill @@ -5295,7 +5333,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpReturnValue 254 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUnreachable 255 => { @@ -5303,402 +5341,402 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpLifetimeStart 256 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpLifetimeStop 257 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpGroupAsyncCopy 259 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupWaitEvents 260 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupAll 261 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupAny 262 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupBroadcast 263 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupIAdd 264 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFAdd 265 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFMin 266 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupUMin 267 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupSMin 268 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFMax 269 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupUMax 270 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupSMax 271 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReadPipe 274 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpWritePipe 275 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReservedReadPipe 276 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReservedWritePipe 277 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReserveReadPipePackets 278 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReserveWritePipePackets 279 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCommitReadPipe 280 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCommitWritePipe 281 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIsValidReserveId 282 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetNumPipePackets 283 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetMaxPipePackets 284 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupReserveReadPipePackets 285 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupReserveWritePipePackets 286 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupCommitReadPipe 287 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupCommitWritePipe 288 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpEnqueueMarker 291 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpEnqueueKernel 292 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGetKernelNDrangeSubGroupCount 293 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetKernelNDrangeMaxSubGroupSize 294 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetKernelWorkGroupSize 295 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetKernelPreferredWorkGroupSizeMultiple 296 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRetainEvent 297 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReleaseEvent 298 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCreateUserEvent 299 => { @@ -5706,23 +5744,23 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpIsValidEvent 300 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSetUserEventStatus 301 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCaptureEventProfilingInfo 302 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetDefaultQueue 303 => { @@ -5730,141 +5768,141 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpBuildNDRange 304 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageSparseSampleImplicitLod 305 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseSampleExplicitLod 306 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSparseSampleDrefImplicitLod 307 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseSampleDrefExplicitLod 308 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSparseSampleProjImplicitLod 309 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseSampleProjExplicitLod 310 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSparseSampleProjDrefImplicitLod 311 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseSampleProjDrefExplicitLod 312 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } // OpImageSparseFetch 313 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseGather 314 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseDrefGather 315 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpImageSparseTexelsResident 316 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpNoLine 317 => { @@ -5872,36 +5910,36 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpAtomicFlagTestAndSet 318 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicFlagClear 319 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageSparseRead 320 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpSizeOf 321 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypePipeStorage 322 => { @@ -5918,31 +5956,31 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpCreatePipeFromPipeStorage 324 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetKernelLocalSizeForSubgroupCount 325 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGetKernelMaxNumSubgroups 326 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeNamedBarrier 327 => { @@ -5950,16 +5988,16 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpNamedBarrierInitialize 328 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpMemoryNamedBarrier 329 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpModuleProcessed 330 => { @@ -5969,414 +6007,414 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpExecutionModeId 331 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ExecutionMode - out.extend(print_enum_ExecutionMode(operands)?); + out.extend(print_enum_ExecutionMode(operands, id_names)?); } // OpDecorateId 332 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // Decoration - out.extend(print_enum_Decoration(operands)?); + out.extend(print_enum_Decoration(operands, id_names)?); } // OpGroupNonUniformElect 333 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformAll 334 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformAny 335 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformAllEqual 336 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBroadcast 337 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBroadcastFirst 338 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBallot 339 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformInverseBallot 340 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBallotBitExtract 341 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBallotBitCount 342 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBallotFindLSB 343 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformBallotFindMSB 344 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformShuffle 345 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformShuffleXor 346 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformShuffleUp 347 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformShuffleDown 348 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformIAdd 349 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformFAdd 350 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformIMul 351 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformFMul 352 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformSMin 353 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformUMin 354 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformFMin 355 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformSMax 356 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformUMax 357 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformFMax 358 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformBitwiseAnd 359 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformBitwiseOr 360 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformBitwiseXor 361 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformLogicalAnd 362 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformLogicalOr 363 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformLogicalXor 364 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpGroupNonUniformQuadBroadcast 365 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformQuadSwap 366 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCopyLogical 400 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpPtrEqual 401 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpPtrNotEqual 402 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpPtrDiff 403 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpColorAttachmentReadEXT 4160 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpDepthAttachmentReadEXT 4161 => { // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpStencilAttachmentReadEXT 4162 => { // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpTerminateInvocation @@ -6385,84 +6423,84 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSubgroupBallotKHR 4421 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupFirstInvocationKHR 4422 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAllKHR 4428 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAnyKHR 4429 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAllEqualKHR 4430 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformRotateKHR 4431 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpSubgroupReadInvocationKHR 4432 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTraceRayKHR 4445 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpExecuteCallableKHR 4446 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertUToAccelerationStructureKHR 4447 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIgnoreIntersectionKHR 4448 => { @@ -6473,137 +6511,137 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSDotKHR 4450 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PackedVectorFormat ? if !operands.is_empty() { - out.extend(print_enum_PackedVectorFormat(operands)?); + out.extend(print_enum_PackedVectorFormat(operands, id_names)?); } } // OpUDotKHR 4451 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PackedVectorFormat ? if !operands.is_empty() { - out.extend(print_enum_PackedVectorFormat(operands)?); + out.extend(print_enum_PackedVectorFormat(operands, id_names)?); } } // OpSUDotKHR 4452 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PackedVectorFormat ? if !operands.is_empty() { - out.extend(print_enum_PackedVectorFormat(operands)?); + out.extend(print_enum_PackedVectorFormat(operands, id_names)?); } } // OpSDotAccSatKHR 4453 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PackedVectorFormat ? if !operands.is_empty() { - out.extend(print_enum_PackedVectorFormat(operands)?); + out.extend(print_enum_PackedVectorFormat(operands, id_names)?); } } // OpUDotAccSatKHR 4454 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PackedVectorFormat ? if !operands.is_empty() { - out.extend(print_enum_PackedVectorFormat(operands)?); + out.extend(print_enum_PackedVectorFormat(operands, id_names)?); } } // OpSUDotAccSatKHR 4455 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // PackedVectorFormat ? if !operands.is_empty() { - out.extend(print_enum_PackedVectorFormat(operands)?); + out.extend(print_enum_PackedVectorFormat(operands, id_names)?); } } // OpTypeCooperativeMatrixKHR 4456 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCooperativeMatrixLoadKHR 4457 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpCooperativeMatrixStoreKHR 4458 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpCooperativeMatrixMulAddKHR 4459 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // CooperativeMatrixOperands ? if !operands.is_empty() { - out.extend(print_enum_CooperativeMatrixOperands(operands)?); + out.extend(print_enum_CooperativeMatrixOperands(operands, id_names)?); } } // OpCooperativeMatrixLengthKHR 4460 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeRayQueryKHR 4472 => { @@ -6611,546 +6649,546 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpRayQueryInitializeKHR 4473 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryTerminateKHR 4474 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGenerateIntersectionKHR 4475 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryConfirmIntersectionKHR 4476 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryProceedKHR 4477 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionTypeKHR 4479 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageSampleWeightedQCOM 4480 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageBoxFilterQCOM 4481 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageBlockMatchSSDQCOM 4482 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpImageBlockMatchSADQCOM 4483 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupIAddNonUniformAMD 5000 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFAddNonUniformAMD 5001 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFMinNonUniformAMD 5002 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupUMinNonUniformAMD 5003 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupSMinNonUniformAMD 5004 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFMaxNonUniformAMD 5005 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupUMaxNonUniformAMD 5006 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupSMaxNonUniformAMD 5007 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFragmentMaskFetchAMD 5011 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFragmentFetchAMD 5012 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReadClockKHR 5056 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFinalizeNodePayloadsAMDX 5075 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFinishWritingNodePayloadAMDX 5078 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpInitializeNodePayloadsAMDX 5090 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordHitMotionNV 5249 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordHitWithIndexMotionNV 5250 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordMissMotionNV 5251 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetWorldToObjectNV 5252 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetObjectToWorldNV 5253 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetObjectRayDirectionNV 5254 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetObjectRayOriginNV 5255 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectTraceRayMotionNV 5256 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetShaderRecordBufferHandleNV 5257 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetShaderBindingTableRecordIndexNV 5258 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordEmptyNV 5259 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectTraceRayNV 5260 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordHitNV 5261 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordHitWithIndexNV 5262 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectRecordMissNV 5263 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectExecuteShaderNV 5264 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetCurrentTimeNV 5265 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetAttributesNV 5266 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetHitKindNV 5267 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetPrimitiveIndexNV 5268 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetGeometryIndexNV 5269 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetInstanceIdNV 5270 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetInstanceCustomIndexNV 5271 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetWorldRayDirectionNV 5272 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetWorldRayOriginNV 5273 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetRayTMaxNV 5274 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectGetRayTMinNV 5275 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectIsEmptyNV 5276 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectIsHitNV 5277 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpHitObjectIsMissNV 5278 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReorderThreadWithHitObjectNV 5279 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpReorderThreadWithHintNV 5280 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeHitObjectNV 5281 => { @@ -7158,82 +7196,82 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpImageSampleFootprintNV 5283 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // ImageOperands ? if !operands.is_empty() { - out.extend(print_enum_ImageOperands(operands)?); + out.extend(print_enum_ImageOperands(operands, id_names)?); } } // OpEmitMeshTasksEXT 5294 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpSetMeshOutputsEXT 5295 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupNonUniformPartitionNV 5296 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpWritePackedPrimitiveIndices4x8NV 5299 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFetchMicroTriangleVertexPositionNV 5300 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFetchMicroTriangleVertexBarycentricNV 5301 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReportIntersectionKHR 5334 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIgnoreIntersectionNV 5335 => { @@ -7244,88 +7282,88 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpTraceNV 5337 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTraceMotionNV 5338 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTraceRayMotionNV 5339 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionTriangleVertexPositionsKHR 5340 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeAccelerationStructureKHR 5341 => { @@ -7333,62 +7371,62 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpExecuteCallableNV 5344 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeCooperativeMatrixNV 5358 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCooperativeMatrixLoadNV 5359 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpCooperativeMatrixStoreNV 5360 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // MemoryAccess ? if !operands.is_empty() { - out.extend(print_enum_MemoryAccess(operands)?); + out.extend(print_enum_MemoryAccess(operands, id_names)?); } } // OpCooperativeMatrixMulAddNV 5361 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCooperativeMatrixLengthNV 5362 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpBeginInvocationInterlockEXT 5364 => { @@ -7405,32 +7443,32 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpConvertUToImageNV 5391 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertUToSamplerNV 5392 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertImageToUNV 5393 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertSamplerToUNV 5394 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertUToSampledImageNV 5395 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertSampledImageToUNV 5396 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSamplerImageAddressingModeNV 5397 => { @@ -7440,191 +7478,191 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSubgroupShuffleINTEL 5571 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupShuffleDownINTEL 5572 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupShuffleUpINTEL 5573 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupShuffleXorINTEL 5574 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupBlockReadINTEL 5575 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupBlockWriteINTEL 5576 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupImageBlockReadINTEL 5577 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupImageBlockWriteINTEL 5578 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupImageMediaBlockReadINTEL 5580 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupImageMediaBlockWriteINTEL 5581 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUCountLeadingZerosINTEL 5585 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUCountTrailingZerosINTEL 5586 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAbsISubINTEL 5587 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAbsUSubINTEL 5588 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIAddSatINTEL 5589 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUAddSatINTEL 5590 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIAverageINTEL 5591 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUAverageINTEL 5592 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIAverageRoundedINTEL 5593 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUAverageRoundedINTEL 5594 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpISubSatINTEL 5595 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUSubSatINTEL 5596 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpIMul32x16INTEL 5597 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpUMul32x16INTEL 5598 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConstantFunctionPointerINTEL 5600 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFunctionPointerCallINTEL 5601 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpAsmTargetINTEL @@ -7635,9 +7673,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpAsmINTEL 5610 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralString out.push(print_str(operands)?); // LiteralString @@ -7646,73 +7684,73 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpAsmCallINTEL 5611 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpAtomicFMinEXT 5614 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicFMaxEXT 5615 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAssumeTrueKHR 5630 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpExpectKHR 5631 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpDecorateStringGOOGLE 5632 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // Decoration - out.extend(print_enum_Decoration(operands)?); + out.extend(print_enum_Decoration(operands, id_names)?); } // OpMemberDecorateStringGOOGLE 5633 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // Decoration - out.extend(print_enum_Decoration(operands)?); + out.extend(print_enum_Decoration(operands, id_names)?); } // OpVmeImageINTEL 5699 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeVmeImageINTEL 5700 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeAvcImePayloadINTEL 5701 => { @@ -7753,58 +7791,58 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL 5713 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL 5714 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL 5715 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceSetInterShapePenaltyINTEL 5716 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL 5717 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceSetInterDirectionPenaltyINTEL 5718 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL 5719 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL 5720 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL 5721 => { @@ -7818,20 +7856,20 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL 5724 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL 5725 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL 5726 => { @@ -7842,688 +7880,688 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpSubgroupAvcMceSetAcOnlyHaarINTEL 5728 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL 5729 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL 5730 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL 5731 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceConvertToImePayloadINTEL 5732 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceConvertToImeResultINTEL 5733 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceConvertToRefPayloadINTEL 5734 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceConvertToRefResultINTEL 5735 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceConvertToSicPayloadINTEL 5736 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceConvertToSicResultINTEL 5737 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetMotionVectorsINTEL 5738 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterDistortionsINTEL 5739 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetBestInterDistortionsINTEL 5740 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterMajorShapeINTEL 5741 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterMinorShapeINTEL 5742 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterDirectionsINTEL 5743 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterMotionVectorCountINTEL 5744 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterReferenceIdsINTEL 5745 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL 5746 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeInitializeINTEL 5747 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeSetSingleReferenceINTEL 5748 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeSetDualReferenceINTEL 5749 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeRefWindowSizeINTEL 5750 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeAdjustRefOffsetINTEL 5751 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeConvertToMcePayloadINTEL 5752 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeSetMaxMotionVectorCountINTEL 5753 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL 5754 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL 5755 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeSetWeightedSadINTEL 5756 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL 5757 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithDualReferenceINTEL 5758 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL 5759 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL 5760 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL 5761 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL 5762 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL 5763 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL 5764 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeConvertToMceResultINTEL 5765 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetSingleReferenceStreaminINTEL 5766 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetDualReferenceStreaminINTEL 5767 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL 5768 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeStripDualReferenceStreamoutINTEL 5769 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL 5770 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL 5771 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL 5772 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL 5773 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL 5774 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL 5775 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetBorderReachedINTEL 5776 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL 5777 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL 5778 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL 5779 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL 5780 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcFmeInitializeINTEL 5781 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcBmeInitializeINTEL 5782 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefConvertToMcePayloadINTEL 5783 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefSetBidirectionalMixDisableINTEL 5784 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefSetBilinearFilterEnableINTEL 5785 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL 5786 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefEvaluateWithDualReferenceINTEL 5787 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL 5788 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL 5789 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcRefConvertToMceResultINTEL 5790 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicInitializeINTEL 5791 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicConfigureSkcINTEL 5792 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicConfigureIpeLumaINTEL 5793 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicConfigureIpeLumaChromaINTEL 5794 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetMotionVectorMaskINTEL 5795 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicConvertToMcePayloadINTEL 5796 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL 5797 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL 5798 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL 5799 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicSetBilinearFilterEnableINTEL 5800 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL 5801 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL 5802 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicEvaluateIpeINTEL 5803 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL 5804 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicEvaluateWithDualReferenceINTEL 5805 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL 5806 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL 5807 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicConvertToMceResultINTEL 5808 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetIpeLumaShapeINTEL 5809 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL 5810 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL 5811 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetPackedIpeLumaModesINTEL 5812 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetIpeChromaModeINTEL 5813 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL 5814 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL 5815 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSubgroupAvcSicGetInterRawSadsINTEL 5816 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpVariableLengthArrayINTEL 5818 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpSaveMemoryINTEL 5819 => { @@ -8531,12 +8569,12 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpRestoreMemoryINTEL 5820 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpArbitraryFloatSinCosPiINTEL 5840 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8553,7 +8591,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatCastINTEL 5841 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8568,7 +8606,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatCastFromIntINTEL 5842 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8583,7 +8621,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatCastToIntINTEL 5843 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8596,11 +8634,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatAddINTEL 5846 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8615,11 +8653,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatSubINTEL 5847 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8634,11 +8672,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatMulINTEL 5848 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8653,11 +8691,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatDivINTEL 5849 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8672,62 +8710,62 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatGTINTEL 5850 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpArbitraryFloatGEINTEL 5851 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpArbitraryFloatLTINTEL 5852 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpArbitraryFloatLEINTEL 5853 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpArbitraryFloatEQINTEL 5854 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); } // OpArbitraryFloatRecipINTEL 5855 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8742,7 +8780,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatRSqrtINTEL 5856 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8757,7 +8795,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatCbrtINTEL 5857 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8772,11 +8810,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatHypotINTEL 5858 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8791,7 +8829,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatSqrtINTEL 5859 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8806,7 +8844,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatLogINTEL 5860 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8821,7 +8859,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatLog2INTEL 5861 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8836,7 +8874,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatLog10INTEL 5862 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8851,7 +8889,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatLog1pINTEL 5863 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8866,7 +8904,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatExpINTEL 5864 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8881,7 +8919,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatExp2INTEL 5865 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8896,7 +8934,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatExp10INTEL 5866 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8911,7 +8949,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatExpm1INTEL 5867 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8926,7 +8964,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatSinINTEL 5868 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8941,7 +8979,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatCosINTEL 5869 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8956,7 +8994,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatSinCosINTEL 5870 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8971,7 +9009,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatSinPiINTEL 5871 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -8986,7 +9024,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatCosPiINTEL 5872 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9001,7 +9039,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatASinINTEL 5873 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9016,7 +9054,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatASinPiINTEL 5874 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9031,7 +9069,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatACosINTEL 5875 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9046,7 +9084,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatACosPiINTEL 5876 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9061,7 +9099,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatATanINTEL 5877 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9076,7 +9114,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatATanPiINTEL 5878 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9091,11 +9129,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatATan2INTEL 5879 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9110,11 +9148,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatPowINTEL 5880 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9129,11 +9167,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatPowRINTEL 5881 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9148,11 +9186,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpArbitraryFloatPowNINTEL 5882 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9173,31 +9211,31 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result 5911 => { // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpAliasScopeDeclINTEL 5912 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef ? if !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpAliasScopeListDeclINTEL 5913 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpFixedSqrtINTEL 5923 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9212,9 +9250,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedRecipINTEL 5924 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9229,9 +9267,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedRsqrtINTEL 5925 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9246,9 +9284,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedSinINTEL 5926 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9263,9 +9301,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedCosINTEL 5927 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9280,9 +9318,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedSinCosINTEL 5928 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9297,9 +9335,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedSinPiINTEL 5929 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9314,9 +9352,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedCosPiINTEL 5930 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9331,9 +9369,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedSinCosPiINTEL 5931 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9348,9 +9386,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedLogINTEL 5932 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9365,9 +9403,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpFixedExpINTEL 5933 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // LiteralInteger out.push(print_u32(operands)?); // LiteralInteger @@ -9382,286 +9420,286 @@ pub fn print_operand(opcode: u32, operands: &mut Operands) -> Result // OpPtrCastToCrossWorkgroupINTEL 5934 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpCrossWorkgroupCastToPtrINTEL 5938 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpReadPipeBlockingINTEL 5946 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpWritePipeBlockingINTEL 5947 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpFPGARegINTEL 5949 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetRayTMinKHR 6016 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetRayFlagsKHR 6017 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionTKHR 6018 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionInstanceCustomIndexKHR 6019 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionInstanceIdKHR 6020 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR 6021 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionGeometryIndexKHR 6022 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionPrimitiveIndexKHR 6023 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionBarycentricsKHR 6024 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionFrontFaceKHR 6025 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionCandidateAABBOpaqueKHR 6026 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionObjectRayDirectionKHR 6027 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionObjectRayOriginKHR 6028 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetWorldRayDirectionKHR 6029 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetWorldRayOriginKHR 6030 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionObjectToWorldKHR 6031 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpRayQueryGetIntersectionWorldToObjectKHR 6032 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpAtomicFAddEXT 6035 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpTypeBufferSurfaceINTEL 6086 => { // AccessQualifier - out.extend(print_enum_AccessQualifier(operands)?); + out.extend(print_enum_AccessQualifier(operands, id_names)?); } // OpTypeStructContinuedINTEL 6090 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpConstantCompositeContinuedINTEL 6091 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpSpecConstantCompositeContinuedINTEL 6092 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpCompositeConstructContinuedINTEL 6096 => { // IdRef * while !operands.is_empty() { - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } } // OpConvertFToBF16INTEL 6116 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpConvertBF16ToFINTEL 6117 => { // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpControlBarrierArriveINTEL 6142 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpControlBarrierWaitINTEL 6143 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // IdMemorySemantics - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupIMulKHR 6401 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupFMulKHR 6402 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupBitwiseAndKHR 6403 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupBitwiseOrKHR 6404 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupBitwiseXorKHR 6405 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupLogicalAndKHR 6406 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupLogicalOrKHR 6407 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } // OpGroupLogicalXorKHR 6408 => { // IdScope - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); // GroupOperation - out.extend(print_enum_GroupOperation(operands)?); + out.extend(print_enum_GroupOperation(operands, id_names)?); // IdRef - out.push(print_id(operands)?); + out.push(print_id(operands, id_names)?); } _ => bail!("unsupported opcode {}", opcode), }; From 563ba8f76d759479497651cc876ca44a93fbdae3 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 16:30:05 +0800 Subject: [PATCH 16/50] Modular reflection process --- spirq-core/src/parse/instr.rs | 8 + spirq/src/reflect.rs | 495 +++++++++++++++++----------------- spirq/src/reflect_cfg.rs | 4 +- 3 files changed, 258 insertions(+), 249 deletions(-) diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 462cd69..81ba6d0 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -53,6 +53,14 @@ impl<'a> Instrs<'a> { self.load_next()?; return Ok(last_cache); } + pub fn next_non_nop(&mut self) -> Result> { + while let Some(instr) = self.next()? { + if instr.opcode() != Op::Nop as u32 { + return Ok(Some(instr)); + } + } + Ok(None) + } } pub struct Instr { diff --git a/spirq/src/reflect.rs b/spirq/src/reflect.rs index 538eff8..b05eeea 100644 --- a/spirq/src/reflect.rs +++ b/spirq/src/reflect.rs @@ -13,7 +13,7 @@ use crate::{ error::{anyhow, Error, Result}, evaluator::Evaluator, func::{ExecutionMode, Function, FunctionRegistry}, - inspect::Inspector, + inspect::{Inspector, self}, instr::*, parse::Instr, reflect_cfg::ReflectConfig, @@ -34,7 +34,7 @@ type VariableId = u32; // Intermediate types used in reflection. -struct EntryPointDeclartion<'a> { +struct EntryPointDeclaration<'a> { name: &'a str, exec_model: ExecutionModel, exec_modes: Vec, @@ -142,25 +142,29 @@ fn is_atomic_store_op(op: Op) -> bool { /// SPIR-V reflection intermediate. pub struct ReflectIntermediate<'a> { pub cfg: &'a ReflectConfig, + pub instrs: Instrs<'a>, pub name_reg: NameRegistry<'a>, pub deco_reg: DecorationRegistry<'a>, pub ty_reg: TypeRegistry, pub var_reg: VariableRegistry, pub func_reg: FunctionRegistry, pub interp: Evaluator, + entry_point_declrs: HashMap>, } impl<'a> ReflectIntermediate<'a> { - pub fn new(cfg: &'a ReflectConfig) -> Self { - ReflectIntermediate { + pub fn new(cfg: &'a ReflectConfig) -> Result { + let out = ReflectIntermediate { cfg, - + instrs: cfg.spv.instrs()?, name_reg: Default::default(), deco_reg: Default::default(), ty_reg: Default::default(), var_reg: Default::default(), func_reg: Default::default(), interp: Default::default(), - } + entry_point_declrs: Default::default(), + }; + Ok(out) } } fn broken_nested_ty(id: TypeId) -> Error { @@ -667,248 +671,14 @@ impl Inspector for FunctionInspector { } } -struct NopFilter<'a>(Instrs<'a>); -impl<'a> NopFilter<'a> { - fn next(&mut self) -> Result> { - while let Some(instr) = self.0.next()? { - if instr.op() != Op::Nop { - return Ok(Some(instr)); - } - } - Ok(None) - } - fn peek(&self) -> Option<&'a Instr> { - self.0.peek() - } -} - pub fn reflect<'a, I: Inspector>( itm: &mut ReflectIntermediate<'a>, mut inspector: I, ) -> Result> { - // Don't change the order. See _2.4 Logical Layout of a Module_ of the - // SPIR-V specification for more information. - let mut instrs = NopFilter(itm.cfg.spv.instrs()?); - - let mut entry_point_declrs = HashMap::default(); + itm.parse_global_declrs()?; + itm.parse_functions(&mut inspector)?; - // 1. All OpCapability instructions. - while let Some(instr) = instrs.peek() { - if instr.op() == Op::Capability { - instrs.next()?; - } else { - break; - } - } - // 2. Optional OpExtension instructions (extensions to SPIR-V). - while let Some(instr) = instrs.peek() { - if instr.op() == Op::Extension { - instrs.next()?; - } else { - break; - } - } - // 3. Optional OpExtInstImport instructions. - while let Some(instr) = instrs.peek() { - if instr.op() == Op::ExtInstImport { - let op = OpExtInstImport::try_from(instr)?; - itm.interp - .import_ext_instr_set(op.instr_set_id, op.name.to_owned())?; - instrs.next()?; - } else { - break; - } - } - // 4. The single required OpMemoryModel instruction. - if let Some(instr) = instrs.peek() { - if instr.op() == Op::MemoryModel { - let op = OpMemoryModel::try_from(instr)?; - match op.addr_model { - spirv::AddressingModel::Logical => {} - spirv::AddressingModel::PhysicalStorageBuffer64 => {} - _ => return Err(anyhow!("unsupported addressing model")), - } - match op.mem_model { - spirv::MemoryModel::GLSL450 => {} - spirv::MemoryModel::Vulkan => {} - _ => return Err(anyhow!("unsupported memory model")), - } - instrs.next()?; - } else { - return Err(anyhow!("expected OpMemoryModel, but got {:?}", instr.op())); - } - } else { - return Err(anyhow!("expected OpMemoryModel, but got nothing")); - } - // 5. All entry point declarations, using OpEntryPoint. - while let Some(instr) = instrs.peek() { - if instr.op() == Op::EntryPoint { - let op = OpEntryPoint::try_from(instr)?; - let entry_point_declr = EntryPointDeclartion { - exec_model: op.exec_model, - name: op.name, - exec_modes: Default::default(), - }; - use std::collections::hash_map::Entry; - match entry_point_declrs.entry(op.func_id) { - Entry::Occupied(_) => return Err(anyhow!("duplicate entry point at a same id")), - Entry::Vacant(e) => { - e.insert(entry_point_declr); - } - } - instrs.next()?; - } else { - break; - } - } - // 6. All execution-mode declarations, using OpExecutionMode or - // OpExecutionModeId. - while let Some(instr) = instrs.peek() { - let op = instr.op(); - match op { - Op::ExecutionMode | Op::ExecutionModeId => { - let mut operands = instr.operands(); - let operand_ctor = match op { - Op::ExecutionMode => |x: &u32| ExecutionModeOperand::Literal(*x), - Op::ExecutionModeId => |x: &u32| ExecutionModeOperand::Id(*x), - _ => unreachable!(), - }; - - let func_id = operands.read_u32()?; - let exec_mode = operands.read_enum::()?; - let operands = operands - .read_list()? - .into_iter() - .map(operand_ctor) - .collect(); - let exec_mode_declr = ExecutionModeDeclaration { - func_id, - exec_mode, - operands, - }; - entry_point_declrs - .get_mut(&func_id) - .ok_or(anyhow!("execution mode for non-existing entry point"))? - .exec_modes - .push(exec_mode_declr); - instrs.next()?; - } - _ => break, - } - } - // 7. These debug instructions, which must be grouped in the following - // order: - // a. All OpString, OpSourceExtension, OpSource, and - // OpSourceContinued, without forward references. - // b. All OpName and all OpMemberName. - // c. All OpModuleProcessed instructions. - while let Some(instr) = instrs.peek() { - match instr.op() { - Op::String - | Op::SourceExtension - | Op::Source - | Op::SourceContinued - | Op::ModuleProcessed => { - instrs.next()?; - } - Op::Name => { - let op = OpName::try_from(instr)?; - if !op.name.is_empty() { - // Ignore empty names. - itm.name_reg.set(op.target_id, op.name); - } - instrs.next()?; - } - Op::MemberName => { - let op = OpMemberName::try_from(instr)?; - if !op.name.is_empty() { - itm.name_reg - .set_member(op.target_id, op.member_idx, op.name); - } - instrs.next()?; - } - _ => break, - } - } - // 8. All annotation instructions: - // a. All decoration instructions. - while let Some(instr) = instrs.peek() { - match instr.op() { - Op::Decorate => { - let op = OpDecorate::try_from(instr)?; - let deco = op.deco; - itm.deco_reg.set(op.target_id, deco, op.params)?; - instrs.next()?; - } - Op::MemberDecorate => { - let op = OpMemberDecorate::try_from(instr)?; - let deco = op.deco; - itm.deco_reg - .set_member(op.target_id, op.member_idx, deco, op.params)?; - instrs.next()?; - } - Op::DecorationGroup - | Op::GroupDecorate - | Op::GroupMemberDecorate - | Op::DecorateId - | Op::DecorateString - | Op::MemberDecorateString => { - instrs.next()?; - } - _ => break, - }; - } - // 9. All type declarations (OpTypeXXX instructions), all constant - // instructions, and all global variable declarations (all OpVariable - // instructions whose Storage Class is not Function). This is the - // preferred location for OpUndef instructions, though they can also - // appear in function bodies. All operands in all these instructions - // must be declared before being used. Otherwise, they can be in any - // order. This section is the first section to allow use of: - // a. OpLine and OpNoLine debug information. - // b. Non-semantic instructions with OpExtInst. - while let Some(instr) = instrs.peek() { - let opcode = instr.op(); - if let Op::Line | Op::NoLine = opcode { - instrs.next()?; - continue; - } - if is_ty_op(opcode) { - itm.populate_one_ty(instr)?; - } else if opcode == Op::Variable { - itm.populate_one_var(instr)?; - } else if is_const_op(opcode) { - itm.populate_one_const(instr)?; - } else { - break; - } - instrs.next()?; - } - // 10. All function declarations ("declarations" are functions without a - // body; there is no forward declaration to a function with a body). - // A function declaration is as follows. - // a. Function declaration, using OpFunction. - // b. Function parameter declarations, using OpFunctionParameter. - // c. Function end, using OpFunctionEnd. - // 11. All function definitions (functions with a body). A function - // definition is as follows. - // a. Function definition, using OpFunction. - // b. Function parameter declarations, using OpFunctionParameter. - // c. Block. - // d. Block. - // e. ... - // f. Function end, using OpFunctionEnd. - while let Some(instr) = instrs.peek() { - let opcode = instr.op(); - if let Op::Line | Op::NoLine = opcode { - instrs.next()?; - continue; - } - inspector.inspect(itm, instr)?; - instrs.next()?; - } - - itm.collect_entry_points(entry_point_declrs) + itm.collect_entry_points() } fn make_desc_var( @@ -1268,12 +1038,243 @@ fn combine_img_samplers(vars: Vec) -> Vec { } impl<'a> ReflectIntermediate<'a> { - fn collect_entry_points( + pub fn parse_global_declrs(&mut self) -> Result<()> { + // Don't change the order. See _2.4 Logical Layout of a Module_ of the + // SPIR-V specification for more information. + + // 1. All OpCapability instructions. + while let Some(instr) = self.instrs.peek() { + if instr.op() == Op::Capability { + self.instrs.next()?; + } else { + break; + } + } + // 2. Optional OpExtension instructions (extensions to SPIR-V). + while let Some(instr) = self.instrs.peek() { + if instr.op() == Op::Extension { + self.instrs.next()?; + } else { + break; + } + } + // 3. Optional OpExtInstImport instructions. + while let Some(instr) = self.instrs.peek() { + if instr.op() == Op::ExtInstImport { + let op = OpExtInstImport::try_from(instr)?; + self.interp + .import_ext_instr_set(op.instr_set_id, op.name.to_owned())?; + self.instrs.next()?; + } else { + break; + } + } + // 4. The single required OpMemoryModel instruction. + if let Some(instr) = self.instrs.peek() { + if instr.op() == Op::MemoryModel { + let op = OpMemoryModel::try_from(instr)?; + match op.addr_model { + spirv::AddressingModel::Logical => {} + spirv::AddressingModel::PhysicalStorageBuffer64 => {} + _ => return Err(anyhow!("unsupported addressing model")), + } + match op.mem_model { + spirv::MemoryModel::GLSL450 => {} + spirv::MemoryModel::Vulkan => {} + _ => return Err(anyhow!("unsupported memory model")), + } + self.instrs.next()?; + } else { + return Err(anyhow!("expected OpMemoryModel, but got {:?}", instr.op())); + } + } else { + return Err(anyhow!("expected OpMemoryModel, but got nothing")); + } + // 5. All entry point declarations, using OpEntryPoint. + while let Some(instr) = self.instrs.peek() { + if instr.op() == Op::EntryPoint { + let op = OpEntryPoint::try_from(instr)?; + let entry_point_declr = EntryPointDeclaration { + exec_model: op.exec_model, + name: op.name, + exec_modes: Default::default(), + }; + use std::collections::hash_map::Entry; + match self.entry_point_declrs.entry(op.func_id) { + Entry::Occupied(_) => return Err(anyhow!("duplicate entry point at a same id")), + Entry::Vacant(e) => { + e.insert(entry_point_declr); + } + } + self.instrs.next()?; + } else { + break; + } + } + // 6. All execution-mode declarations, using OpExecutionMode or + // OpExecutionModeId. + while let Some(instr) = self.instrs.peek() { + let op = instr.op(); + match op { + Op::ExecutionMode | Op::ExecutionModeId => { + let mut operands = instr.operands(); + let operand_ctor = match op { + Op::ExecutionMode => |x: &u32| ExecutionModeOperand::Literal(*x), + Op::ExecutionModeId => |x: &u32| ExecutionModeOperand::Id(*x), + _ => unreachable!(), + }; + + let func_id = operands.read_u32()?; + let exec_mode = operands.read_enum::()?; + let operands = operands + .read_list()? + .into_iter() + .map(operand_ctor) + .collect(); + let exec_mode_declr = ExecutionModeDeclaration { + func_id, + exec_mode, + operands, + }; + self.entry_point_declrs + .get_mut(&func_id) + .ok_or(anyhow!("execution mode for non-existing entry point"))? + .exec_modes + .push(exec_mode_declr); + self.instrs.next()?; + } + _ => break, + } + } + // 7. These debug instructions, which must be grouped in the following + // order: + // a. All OpString, OpSourceExtension, OpSource, and + // OpSourceContinued, without forward references. + // b. All OpName and all OpMemberName. + // c. All OpModuleProcessed instructions. + while let Some(instr) = self.instrs.peek() { + match instr.op() { + Op::String + | Op::SourceExtension + | Op::Source + | Op::SourceContinued + | Op::ModuleProcessed => { + self.instrs.next()?; + } + Op::Name => { + let op = OpName::try_from(instr)?; + if !op.name.is_empty() { + // Ignore empty names. + self.name_reg.set(op.target_id, op.name); + } + self.instrs.next()?; + } + Op::MemberName => { + let op = OpMemberName::try_from(instr)?; + if !op.name.is_empty() { + self.name_reg + .set_member(op.target_id, op.member_idx, op.name); + } + self.instrs.next()?; + } + _ => break, + } + } + // 8. All annotation instructions: + // a. All decoration instructions. + while let Some(instr) = self.instrs.peek() { + match instr.op() { + Op::Decorate => { + let op = OpDecorate::try_from(instr)?; + let deco = op.deco; + self.deco_reg.set(op.target_id, deco, op.params)?; + self.instrs.next()?; + } + Op::MemberDecorate => { + let op = OpMemberDecorate::try_from(instr)?; + let deco = op.deco; + self.deco_reg + .set_member(op.target_id, op.member_idx, deco, op.params)?; + self.instrs.next()?; + } + Op::DecorationGroup + | Op::GroupDecorate + | Op::GroupMemberDecorate + | Op::DecorateId + | Op::DecorateString + | Op::MemberDecorateString => { + self.instrs.next()?; + } + _ => break, + }; + } + // 9. All type declarations (OpTypeXXX instructions), all constant + // instructions, and all global variable declarations (all OpVariable + // instructions whose Storage Class is not Function). This is the + // preferred location for OpUndef instructions, though they can also + // appear in function bodies. All operands in all these instructions + // must be declared before being used. Otherwise, they can be in any + // order. This section is the first section to allow use of: + // a. OpLine and OpNoLine debug information. + // b. Non-semantic instructions with OpExtInst. + while let Some(instr) = self.instrs.peek() { + let opcode = instr.op(); + if let Op::Line | Op::NoLine = opcode { + self.instrs.next()?; + continue; + } + if is_ty_op(opcode) { + self.populate_one_ty(instr)?; + } else if opcode == Op::Variable { + self.populate_one_var(instr)?; + } else if is_const_op(opcode) { + self.populate_one_const(instr)?; + } else { + break; + } + self.instrs.next()?; + } + + Ok(()) + } + + pub fn parse_functions( + &mut self, + inspector: &mut impl Inspector + ) -> Result<()> { + // 10. All function declarations ("declarations" are functions without a + // body; there is no forward declaration to a function with a body). + // A function declaration is as follows. + // a. Function declaration, using OpFunction. + // b. Function parameter declarations, using OpFunctionParameter. + // c. Function end, using OpFunctionEnd. + // 11. All function definitions (functions with a body). A function + // definition is as follows. + // a. Function definition, using OpFunction. + // b. Function parameter declarations, using OpFunctionParameter. + // c. Block. + // d. Block. + // e. ... + // f. Function end, using OpFunctionEnd. + + while let Some(instr) = self.instrs.peek() { + let opcode = instr.op(); + if let Op::Line | Op::NoLine = opcode { + self.instrs.next()?; + continue; + } + inspector.inspect(self, instr)?; + self.instrs.next()?; + } + + Ok(()) + } + + pub fn collect_entry_points( &self, - entry_point_declrs: HashMap>, ) -> Result> { - let mut entry_points = Vec::with_capacity(entry_point_declrs.len()); - for (id, entry_point_declr) in entry_point_declrs.iter() { + let mut entry_points = Vec::with_capacity(self.entry_point_declrs.len()); + for (id, entry_point_declr) in self.entry_point_declrs.iter() { let mut vars = if self.cfg.ref_all_rscs { self.collect_vars() } else { diff --git a/spirq/src/reflect_cfg.rs b/spirq/src/reflect_cfg.rs index 7440c3e..10b4bd3 100644 --- a/spirq/src/reflect_cfg.rs +++ b/spirq/src/reflect_cfg.rs @@ -62,14 +62,14 @@ impl ReflectConfig { /// Reflect the SPIR-V binary and extract all entry points. pub fn reflect(&self) -> Result> { - let mut itm = ReflectIntermediate::new(self); + let mut itm = ReflectIntermediate::new(self)?; let inspector = FunctionInspector::new(); reflect(&mut itm, inspector) } /// Reflect the SPIR-V binary and extract all entry points with an inspector /// for customized reflection subroutines. pub fn reflect_inspect(&self, inspector: &mut I) -> Result> { - let mut itm = ReflectIntermediate::new(self); + let mut itm = ReflectIntermediate::new(self)?; let mut func_inspector = FunctionInspector::new(); reflect(&mut itm, func_inspector.chain(inspector)) } From c0e4b3782d05b1789ae0b0e66b67078496e54f4d Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 19:59:39 +0800 Subject: [PATCH 17/50] Approaching perfect match with spirv-dis --- Cargo.lock | 1 + assets/gallery.frag | 2 +- assets/gallery.frag.json | 286 +-------- assets/gallery.frag.spv | Bin 18672 -> 16568 bytes assets/gallery.frag.spv.json | 286 +-------- assets/gallery.frag.spvasm | 899 +++++++++++++++++++++++++++ comp.spv | Bin 288 -> 0 bytes spirq-core/src/annotation.rs | 10 +- spirq-core/src/constant.rs | 10 + spirq-core/src/ty/mod.rs | 10 +- spirq-core/src/ty/reg.rs | 4 + spirq-spvasm/Cargo.toml | 1 + spirq-spvasm/src/dis/auto_name.rs | 203 ++++++ spirq-spvasm/src/dis/disassembler.rs | 80 ++- spirq-spvasm/src/dis/mod.rs | 1 + spirq-spvasm/src/dis/test.rs | 242 +------ spirq/src/reflect.rs | 468 +++++++------- spirq/src/reflect_cfg.rs | 16 +- x.comp | 5 - 19 files changed, 1447 insertions(+), 1077 deletions(-) create mode 100644 assets/gallery.frag.spvasm delete mode 100644 comp.spv create mode 100644 spirq-spvasm/src/dis/auto_name.rs delete mode 100644 x.comp diff --git a/Cargo.lock b/Cargo.lock index 5f360a8..59dc167 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,6 +400,7 @@ dependencies = [ "inline-spirv", "num-traits", "pretty_assertions", + "spirq", "spirq-core", ] diff --git a/assets/gallery.frag b/assets/gallery.frag index f16ed7a..a40a313 100644 --- a/assets/gallery.frag +++ b/assets/gallery.frag @@ -181,7 +181,7 @@ layout(set=12, binding=0) uniform Ubo { // Storage buffer block with dynamic size. layout(set=13, binding=0) buffer Ssbo { - Data ds[]; + int ds[]; } ssbo; layout(set=14, binding=0, input_attachment_index=0) uniform isubpassInput iAttm; diff --git a/assets/gallery.frag.json b/assets/gallery.frag.json index 2af07c4..ab9aa84 100644 --- a/assets/gallery.frag.json +++ b/assets/gallery.frag.json @@ -1144,291 +1144,9 @@ "Offset": 0, "MemberType": { "Kind": "Array", - "ElementType": { - "Kind": "Struct", - "Members": [ - { - "Name": "i0", - "Offset": 0, - "MemberType": "i32" - }, - { - "Name": "i1", - "Offset": 8, - "MemberType": "vec2" - }, - { - "Name": "i2", - "Offset": 16, - "MemberType": "vec3" - }, - { - "Name": "i3", - "Offset": 32, - "MemberType": "vec4" - }, - { - "Name": "u0", - "Offset": 48, - "MemberType": "u32" - }, - { - "Name": "u1", - "Offset": 56, - "MemberType": "vec2" - }, - { - "Name": "u2", - "Offset": 64, - "MemberType": "vec3" - }, - { - "Name": "u3", - "Offset": 80, - "MemberType": "vec4" - }, - { - "Name": "f0", - "Offset": 96, - "MemberType": "f32" - }, - { - "Name": "f1", - "Offset": 104, - "MemberType": "vec2" - }, - { - "Name": "f2", - "Offset": 112, - "MemberType": "vec3" - }, - { - "Name": "f3", - "Offset": 128, - "MemberType": "vec4" - }, - { - "Name": "fMat0", - "Offset": 144, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 2, - "Stride": 8 - } - }, - { - "Name": "fMat1", - "Offset": 160, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 2, - "Stride": 16 - } - }, - { - "Name": "fMat2", - "Offset": 192, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 2, - "Stride": 16 - } - }, - { - "Name": "fMat3", - "Offset": 224, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 3, - "Stride": 8 - } - }, - { - "Name": "fMat4", - "Offset": 256, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 3, - "Stride": 16 - } - }, - { - "Name": "fMat5", - "Offset": 304, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 3, - "Stride": 16 - } - }, - { - "Name": "fMat6", - "Offset": 352, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 4, - "Stride": 8 - } - }, - { - "Name": "fMat7", - "Offset": 384, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 4, - "Stride": 16 - } - }, - { - "Name": "fMat8", - "Offset": 448, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 4, - "Stride": 16 - } - }, - { - "Name": "d0", - "Offset": 512, - "MemberType": "f64" - }, - { - "Name": "d1", - "Offset": 528, - "MemberType": "vec2" - }, - { - "Name": "d2", - "Offset": 544, - "MemberType": "vec3" - }, - { - "Name": "d3", - "Offset": 576, - "MemberType": "vec4" - }, - { - "Name": "dMat0", - "Offset": 608, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 2, - "Stride": 16 - } - }, - { - "Name": "dMat1", - "Offset": 640, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 2, - "Stride": 32 - } - }, - { - "Name": "dMat2", - "Offset": 704, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 2, - "Stride": 32 - } - }, - { - "Name": "dMat3", - "Offset": 768, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 3, - "Stride": 16 - } - }, - { - "Name": "dMat4", - "Offset": 832, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 3, - "Stride": 32 - } - }, - { - "Name": "dMat5", - "Offset": 928, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 3, - "Stride": 32 - } - }, - { - "Name": "dMat6", - "Offset": 1024, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 4, - "Stride": 16 - } - }, - { - "Name": "dMat7", - "Offset": 1088, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 4, - "Stride": 32 - } - }, - { - "Name": "dMat8", - "Offset": 1216, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 4, - "Stride": 32 - } - } - ] - }, + "ElementType": "i32", "Count": null, - "Stride": 1344 + "Stride": 4 } } ] diff --git a/assets/gallery.frag.spv b/assets/gallery.frag.spv index 047fc40b4d9e28f6d32324044f6538dab712114d..3466b9485e294ad65f92efad035bd3800a3e255e 100644 GIT binary patch delta 939 zcmZ9K(M}UV6o$|4wg_SsEjPqKTzaREK)B$lz45AVU1KpTsmK zz66h8;v<;&0{q`_1~yDG+4;`-=FIHb{dbxCo+hm%gt-vG0L4)KOCe&p#rAI5LG593Fkx&LI*h1vY-<>2}Dx^BSNSXOw$yAHq5Nr!qq zQk<`|<;-70Y|WPJs7kt>{8$mjky|j|gMn4ZYFB@|EBVNyg_|&qkLI}grh4x@GIk55 zz0sOfSF+ALGI0y0r_nmEp7uKVM~|Gl1=GoBm9oO!wm*BcbQ7kBj6bWXebJhpeDxSi LPvBYgtG9IxDi37+ delta 2709 zcmZ9OO>dJ&6op@Z0S$4Q)X+k~j$JpaN)`RCKqj_S2{u$htdU}bppi%+jZ<1$>ZFiv z*nmdt`3s0mm+7*LE~>68^(Ped5A-}UbK}c9()gWo=G>XNckW#I*WJp$Pb$q?wSTy1 zREoLcNb$?_=FMvRPNgWe)W22#Uj0Y)srt|AdoP|;|C^iM((sG%WL&5nD(VH8wti-Y zq1Hc`;VSsU8Lojpn&G>XbCx$xMt?G%mKGhyq<(wE0N*l(bj+%EN1z~HY08+bDucwjm&*&To}!_VpNai zna|@)itKTXuRF)y1Utvx0z1b}fSqF}!6nDu&YW{B{58K6y*Qocw8Vka?aX=4I+;80 zEcBYmi*BCzOkWFSFLQX-P|kd<*j(AVc3V)Igc)DoO7k%d^E`S|a(y(JY)AtpJtMw! zC1O%_do($FARuo=Og6HB9KPWeAfF?S^EKu6@r6gN(ZziAoTbl?nsKs-9I0j;d5w;{ zk6aj^PT4?4Gebg|nyiK+3dWJya6{w5^SlE4FtcVeIsj=6_m$&FZMZweg-W}1m5d~* z+0*s{qkLTAcudKwlyfA$w*zDMOg(wI*-m%8AjT`fDEHNES2%V^F-kk=5xrsu#_k_= zvx6(2j5YFpU&eO}fngzc%@D4Nbsa}p5chsDjAXh6YJ)!r z7{fI)47_^+w6SQyP0aFn0T97hdKas5@Q>Mp@Km&ce-t zl6Igrc{?z6L$eFxZt{VO<&|KR&rGTF!j*kkF4=*xlZ)vZ!k>AEu1LQF80FBE+5xV- zLr@htjYP^jP(T8--kHS`^gdA){v8q>hkROWe~ zhRgHsAy(7;G!|WNKoQ13pSS=R1H%+$uLt)uU(I?jdc)LguLq;AMg6oM|BPUehr2JuPR?b_oxq(`CEpCcpYQj+5kuR|Dlj)gLp2G_)qZa~Gn1?W6K+%8 z4VR_*E;Dzt3QUkqbx*2R=&mlV{E*puSqUcGro6B5ApCKDdF7|f!r%p%xSDcD<3U(j hT^{Ua76v7lh|>N(RxKWAOk5sj4vY@G7w!+w{STyz_}u^i diff --git a/assets/gallery.frag.spv.json b/assets/gallery.frag.spv.json index 2af07c4..ab9aa84 100644 --- a/assets/gallery.frag.spv.json +++ b/assets/gallery.frag.spv.json @@ -1144,291 +1144,9 @@ "Offset": 0, "MemberType": { "Kind": "Array", - "ElementType": { - "Kind": "Struct", - "Members": [ - { - "Name": "i0", - "Offset": 0, - "MemberType": "i32" - }, - { - "Name": "i1", - "Offset": 8, - "MemberType": "vec2" - }, - { - "Name": "i2", - "Offset": 16, - "MemberType": "vec3" - }, - { - "Name": "i3", - "Offset": 32, - "MemberType": "vec4" - }, - { - "Name": "u0", - "Offset": 48, - "MemberType": "u32" - }, - { - "Name": "u1", - "Offset": 56, - "MemberType": "vec2" - }, - { - "Name": "u2", - "Offset": 64, - "MemberType": "vec3" - }, - { - "Name": "u3", - "Offset": 80, - "MemberType": "vec4" - }, - { - "Name": "f0", - "Offset": 96, - "MemberType": "f32" - }, - { - "Name": "f1", - "Offset": 104, - "MemberType": "vec2" - }, - { - "Name": "f2", - "Offset": 112, - "MemberType": "vec3" - }, - { - "Name": "f3", - "Offset": 128, - "MemberType": "vec4" - }, - { - "Name": "fMat0", - "Offset": 144, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 2, - "Stride": 8 - } - }, - { - "Name": "fMat1", - "Offset": 160, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 2, - "Stride": 16 - } - }, - { - "Name": "fMat2", - "Offset": 192, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 2, - "Stride": 16 - } - }, - { - "Name": "fMat3", - "Offset": 224, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 3, - "Stride": 8 - } - }, - { - "Name": "fMat4", - "Offset": 256, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 3, - "Stride": 16 - } - }, - { - "Name": "fMat5", - "Offset": 304, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 3, - "Stride": 16 - } - }, - { - "Name": "fMat6", - "Offset": 352, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 4, - "Stride": 8 - } - }, - { - "Name": "fMat7", - "Offset": 384, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 4, - "Stride": 16 - } - }, - { - "Name": "fMat8", - "Offset": 448, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 4, - "Stride": 16 - } - }, - { - "Name": "d0", - "Offset": 512, - "MemberType": "f64" - }, - { - "Name": "d1", - "Offset": 528, - "MemberType": "vec2" - }, - { - "Name": "d2", - "Offset": 544, - "MemberType": "vec3" - }, - { - "Name": "d3", - "Offset": 576, - "MemberType": "vec4" - }, - { - "Name": "dMat0", - "Offset": 608, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 2, - "Stride": 16 - } - }, - { - "Name": "dMat1", - "Offset": 640, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 2, - "Stride": 32 - } - }, - { - "Name": "dMat2", - "Offset": 704, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 2, - "Stride": 32 - } - }, - { - "Name": "dMat3", - "Offset": 768, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 3, - "Stride": 16 - } - }, - { - "Name": "dMat4", - "Offset": 832, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 3, - "Stride": 32 - } - }, - { - "Name": "dMat5", - "Offset": 928, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 3, - "Stride": 32 - } - }, - { - "Name": "dMat6", - "Offset": 1024, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec2", - "Count": 4, - "Stride": 16 - } - }, - { - "Name": "dMat7", - "Offset": 1088, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec3", - "Count": 4, - "Stride": 32 - } - }, - { - "Name": "dMat8", - "Offset": 1216, - "MemberType": { - "Kind": "Matrix", - "AxisOrder": "ColumnMajor", - "VectorType": "vec4", - "Count": 4, - "Stride": 32 - } - } - ] - }, + "ElementType": "i32", "Count": null, - "Stride": 1344 + "Stride": 4 } } ] diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm new file mode 100644 index 0000000..2842151 --- /dev/null +++ b/assets/gallery.frag.spvasm @@ -0,0 +1,899 @@ +; SPIR-V +; Version: 1.5 +; Generator: Khronos Glslang Reference Front End; 11 +; Bound: 389 +; Schema: 0 + OpCapability Shader + OpCapability Float64 + OpCapability StorageImageMultisample + OpCapability ImageCubeArray + OpCapability ImageRect + OpCapability SampledRect + OpCapability InputAttachment + OpCapability Sampled1D + OpCapability Image1D + OpCapability SampledCubeArray + OpCapability SampledBuffer + OpCapability ImageBuffer + OpCapability ImageMSArray + OpCapability RayQueryKHR + OpExtension "SPV_KHR_ray_query" + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %ray_query %iImg1d %iImg2d %iImg3d %iImg1dArr %iImg2dArr %iImgCube %iImgCubeArr %iImgBuf %uImg1d %uImg2d %uImg3d %uImg1dArr %uImg2dArr %uImgCube %uImgCubeArr %uImgBuf %fImg1D %fImg2D %fImg3D %fImgCube %fImg2DRect %fImg1DArray %fImg2DArray %fImgCubeArray %fImgBuffer %fImg2DMS %fImg2DMSArray %iSamp1D %iSamp2D %iSamp3D %iSampCube %iSamp2DRect %iSamp1DArray %iSamp2DArray %iSampCubeArray %iSampBuffer %iSamp2DMS %iSamp2DMSArray %uSamp1D %uSamp2D %uSamp3D %uSampCube %uSamp2DRect %uSamp1DArray %uSamp2DArray %uSampCubeArray %uSampBuffer %uSamp2DMS %uSamp2DMSArray %fSamp1D %fSamp2D %fSamp3D %fSampCube %fSamp2DRect %fSamp1DArray %fSamp2DArray %fSampCubeArray %fSampBuffer %fSamp2DMS %fSamp2DMSArray %dsSamp1D %dsSamp2D %dsSampCube %dsSamp2DRect %dsSamp1DArray %dsSamp2DArray %dsSampCubeArray %samp %sampShadow %iTex1D %iTex2D %iTex3D %iTexCube %iTex2DRect %iTex1DArray %iTex2DArray %iTexCubeArray %iTexBuffer %iTex2DMS %iTex2DMSArray %uTex1D %uTex2D %uTex3D %uTexCube %uTex2DRect %uTex1DArray %uTex2DArray %uTexCubeArray %uTexBuffer %uTex2DMS %uTex2DMSArray %fTex1D %fTex2D %fTex3D %fTexCube %fTex2DRect %fTex1DArray %fTex2DArray %fTexCubeArray %fTexBuffer %fTex2DMS %fTex2DMSArray %ubo %ssbo %iAttm %iAttmMS %uAttm %uAttmMS %fAttm %fAttmMS %acc + OpExecutionMode %main OriginUpperLeft + OpSource GLSL 460 + OpSourceExtension "GL_EXT_ray_query" + OpSourceExtension "GL_EXT_ray_tracing" + OpName %main "main" + OpName %ray_query "ray_query" + OpName %iImg1d "iImg1d" + OpName %iImg2d "iImg2d" + OpName %iImg3d "iImg3d" + OpName %iImg1dArr "iImg1dArr" + OpName %iImg2dArr "iImg2dArr" + OpName %iImgCube "iImgCube" + OpName %iImgCubeArr "iImgCubeArr" + OpName %iImgBuf "iImgBuf" + OpName %uImg1d "uImg1d" + OpName %uImg2d "uImg2d" + OpName %uImg3d "uImg3d" + OpName %uImg1dArr "uImg1dArr" + OpName %uImg2dArr "uImg2dArr" + OpName %uImgCube "uImgCube" + OpName %uImgCubeArr "uImgCubeArr" + OpName %uImgBuf "uImgBuf" + OpName %fImg1D "fImg1D" + OpName %fImg2D "fImg2D" + OpName %fImg3D "fImg3D" + OpName %fImgCube "fImgCube" + OpName %fImg2DRect "fImg2DRect" + OpName %fImg1DArray "fImg1DArray" + OpName %fImg2DArray "fImg2DArray" + OpName %fImgCubeArray "fImgCubeArray" + OpName %fImgBuffer "fImgBuffer" + OpName %fImg2DMS "fImg2DMS" + OpName %fImg2DMSArray "fImg2DMSArray" + OpName %iSamp1D "iSamp1D" + OpName %iSamp2D "iSamp2D" + OpName %iSamp3D "iSamp3D" + OpName %iSampCube "iSampCube" + OpName %iSamp2DRect "iSamp2DRect" + OpName %iSamp1DArray "iSamp1DArray" + OpName %iSamp2DArray "iSamp2DArray" + OpName %iSampCubeArray "iSampCubeArray" + OpName %iSampBuffer "iSampBuffer" + OpName %iSamp2DMS "iSamp2DMS" + OpName %iSamp2DMSArray "iSamp2DMSArray" + OpName %uSamp1D "uSamp1D" + OpName %uSamp2D "uSamp2D" + OpName %uSamp3D "uSamp3D" + OpName %uSampCube "uSampCube" + OpName %uSamp2DRect "uSamp2DRect" + OpName %uSamp1DArray "uSamp1DArray" + OpName %uSamp2DArray "uSamp2DArray" + OpName %uSampCubeArray "uSampCubeArray" + OpName %uSampBuffer "uSampBuffer" + OpName %uSamp2DMS "uSamp2DMS" + OpName %uSamp2DMSArray "uSamp2DMSArray" + OpName %fSamp1D "fSamp1D" + OpName %fSamp2D "fSamp2D" + OpName %fSamp3D "fSamp3D" + OpName %fSampCube "fSampCube" + OpName %fSamp2DRect "fSamp2DRect" + OpName %fSamp1DArray "fSamp1DArray" + OpName %fSamp2DArray "fSamp2DArray" + OpName %fSampCubeArray "fSampCubeArray" + OpName %fSampBuffer "fSampBuffer" + OpName %fSamp2DMS "fSamp2DMS" + OpName %fSamp2DMSArray "fSamp2DMSArray" + OpName %dsSamp1D "dsSamp1D" + OpName %dsSamp2D "dsSamp2D" + OpName %dsSampCube "dsSampCube" + OpName %dsSamp2DRect "dsSamp2DRect" + OpName %dsSamp1DArray "dsSamp1DArray" + OpName %dsSamp2DArray "dsSamp2DArray" + OpName %dsSampCubeArray "dsSampCubeArray" + OpName %samp "samp" + OpName %sampShadow "sampShadow" + OpName %iTex1D "iTex1D" + OpName %iTex2D "iTex2D" + OpName %iTex3D "iTex3D" + OpName %iTexCube "iTexCube" + OpName %iTex2DRect "iTex2DRect" + OpName %iTex1DArray "iTex1DArray" + OpName %iTex2DArray "iTex2DArray" + OpName %iTexCubeArray "iTexCubeArray" + OpName %iTexBuffer "iTexBuffer" + OpName %iTex2DMS "iTex2DMS" + OpName %iTex2DMSArray "iTex2DMSArray" + OpName %uTex1D "uTex1D" + OpName %uTex2D "uTex2D" + OpName %uTex3D "uTex3D" + OpName %uTexCube "uTexCube" + OpName %uTex2DRect "uTex2DRect" + OpName %uTex1DArray "uTex1DArray" + OpName %uTex2DArray "uTex2DArray" + OpName %uTexCubeArray "uTexCubeArray" + OpName %uTexBuffer "uTexBuffer" + OpName %uTex2DMS "uTex2DMS" + OpName %uTex2DMSArray "uTex2DMSArray" + OpName %fTex1D "fTex1D" + OpName %fTex2D "fTex2D" + OpName %fTex3D "fTex3D" + OpName %fTexCube "fTexCube" + OpName %fTex2DRect "fTex2DRect" + OpName %fTex1DArray "fTex1DArray" + OpName %fTex2DArray "fTex2DArray" + OpName %fTexCubeArray "fTexCubeArray" + OpName %fTexBuffer "fTexBuffer" + OpName %fTex2DMS "fTex2DMS" + OpName %fTex2DMSArray "fTex2DMSArray" + OpName %Data "Data" + OpMemberName %Data 0 "i0" + OpMemberName %Data 1 "i1" + OpMemberName %Data 2 "i2" + OpMemberName %Data 3 "i3" + OpMemberName %Data 4 "u0" + OpMemberName %Data 5 "u1" + OpMemberName %Data 6 "u2" + OpMemberName %Data 7 "u3" + OpMemberName %Data 8 "f0" + OpMemberName %Data 9 "f1" + OpMemberName %Data 10 "f2" + OpMemberName %Data 11 "f3" + OpMemberName %Data 12 "fMat0" + OpMemberName %Data 13 "fMat1" + OpMemberName %Data 14 "fMat2" + OpMemberName %Data 15 "fMat3" + OpMemberName %Data 16 "fMat4" + OpMemberName %Data 17 "fMat5" + OpMemberName %Data 18 "fMat6" + OpMemberName %Data 19 "fMat7" + OpMemberName %Data 20 "fMat8" + OpMemberName %Data 21 "d0" + OpMemberName %Data 22 "d1" + OpMemberName %Data 23 "d2" + OpMemberName %Data 24 "d3" + OpMemberName %Data 25 "dMat0" + OpMemberName %Data 26 "dMat1" + OpMemberName %Data 27 "dMat2" + OpMemberName %Data 28 "dMat3" + OpMemberName %Data 29 "dMat4" + OpMemberName %Data 30 "dMat5" + OpMemberName %Data 31 "dMat6" + OpMemberName %Data 32 "dMat7" + OpMemberName %Data 33 "dMat8" + OpName %Ubo "Ubo" + OpMemberName %Ubo 0 "ds" + OpName %ubo "ubo" + OpName %Ssbo "Ssbo" + OpMemberName %Ssbo 0 "ds" + OpName %ssbo "ssbo" + OpName %iAttm "iAttm" + OpName %iAttmMS "iAttmMS" + OpName %uAttm "uAttm" + OpName %uAttmMS "uAttmMS" + OpName %fAttm "fAttm" + OpName %fAttmMS "fAttmMS" + OpName %acc "acc" + OpDecorate %iImg1d DescriptorSet 1 + OpDecorate %iImg1d Binding 0 + OpDecorate %iImg1d NonWritable + OpDecorate %iImg2d DescriptorSet 1 + OpDecorate %iImg2d Binding 1 + OpDecorate %iImg2d NonWritable + OpDecorate %iImg3d DescriptorSet 1 + OpDecorate %iImg3d Binding 2 + OpDecorate %iImg3d NonWritable + OpDecorate %iImg1dArr DescriptorSet 1 + OpDecorate %iImg1dArr Binding 3 + OpDecorate %iImg1dArr NonWritable + OpDecorate %iImg2dArr DescriptorSet 1 + OpDecorate %iImg2dArr Binding 4 + OpDecorate %iImg2dArr NonWritable + OpDecorate %iImgCube DescriptorSet 1 + OpDecorate %iImgCube Binding 5 + OpDecorate %iImgCube NonWritable + OpDecorate %iImgCubeArr DescriptorSet 1 + OpDecorate %iImgCubeArr Binding 6 + OpDecorate %iImgCubeArr NonWritable + OpDecorate %iImgBuf DescriptorSet 1 + OpDecorate %iImgBuf Binding 7 + OpDecorate %iImgBuf NonWritable + OpDecorate %uImg1d DescriptorSet 2 + OpDecorate %uImg1d Binding 0 + OpDecorate %uImg1d NonWritable + OpDecorate %uImg2d DescriptorSet 2 + OpDecorate %uImg2d Binding 1 + OpDecorate %uImg2d NonWritable + OpDecorate %uImg3d DescriptorSet 2 + OpDecorate %uImg3d Binding 2 + OpDecorate %uImg3d NonWritable + OpDecorate %uImg1dArr DescriptorSet 2 + OpDecorate %uImg1dArr Binding 3 + OpDecorate %uImg1dArr NonWritable + OpDecorate %uImg2dArr DescriptorSet 2 + OpDecorate %uImg2dArr Binding 4 + OpDecorate %uImg2dArr NonWritable + OpDecorate %uImgCube DescriptorSet 2 + OpDecorate %uImgCube Binding 5 + OpDecorate %uImgCube NonWritable + OpDecorate %uImgCubeArr DescriptorSet 2 + OpDecorate %uImgCubeArr Binding 6 + OpDecorate %uImgCubeArr NonWritable + OpDecorate %uImgBuf DescriptorSet 2 + OpDecorate %uImgBuf Binding 7 + OpDecorate %uImgBuf NonWritable + OpDecorate %fImg1D DescriptorSet 3 + OpDecorate %fImg1D Binding 0 + OpDecorate %fImg1D NonReadable + OpDecorate %fImg2D DescriptorSet 3 + OpDecorate %fImg2D Binding 1 + OpDecorate %fImg2D NonReadable + OpDecorate %fImg3D DescriptorSet 3 + OpDecorate %fImg3D Binding 2 + OpDecorate %fImg3D NonReadable + OpDecorate %fImgCube DescriptorSet 3 + OpDecorate %fImgCube Binding 3 + OpDecorate %fImgCube NonReadable + OpDecorate %fImg2DRect DescriptorSet 3 + OpDecorate %fImg2DRect Binding 4 + OpDecorate %fImg2DRect NonReadable + OpDecorate %fImg1DArray DescriptorSet 3 + OpDecorate %fImg1DArray Binding 5 + OpDecorate %fImg1DArray NonReadable + OpDecorate %fImg2DArray DescriptorSet 3 + OpDecorate %fImg2DArray Binding 6 + OpDecorate %fImg2DArray NonReadable + OpDecorate %fImgCubeArray DescriptorSet 3 + OpDecorate %fImgCubeArray Binding 7 + OpDecorate %fImgCubeArray NonReadable + OpDecorate %fImgBuffer DescriptorSet 3 + OpDecorate %fImgBuffer Binding 8 + OpDecorate %fImgBuffer NonReadable + OpDecorate %fImg2DMS DescriptorSet 3 + OpDecorate %fImg2DMS Binding 9 + OpDecorate %fImg2DMS NonReadable + OpDecorate %fImg2DMSArray DescriptorSet 3 + OpDecorate %fImg2DMSArray Binding 10 + OpDecorate %fImg2DMSArray NonReadable + OpDecorate %iSamp1D DescriptorSet 4 + OpDecorate %iSamp1D Binding 0 + OpDecorate %iSamp2D DescriptorSet 4 + OpDecorate %iSamp2D Binding 1 + OpDecorate %iSamp3D DescriptorSet 4 + OpDecorate %iSamp3D Binding 2 + OpDecorate %iSampCube DescriptorSet 4 + OpDecorate %iSampCube Binding 3 + OpDecorate %iSamp2DRect DescriptorSet 4 + OpDecorate %iSamp2DRect Binding 4 + OpDecorate %iSamp1DArray DescriptorSet 4 + OpDecorate %iSamp1DArray Binding 5 + OpDecorate %iSamp2DArray DescriptorSet 4 + OpDecorate %iSamp2DArray Binding 6 + OpDecorate %iSampCubeArray DescriptorSet 4 + OpDecorate %iSampCubeArray Binding 7 + OpDecorate %iSampBuffer DescriptorSet 4 + OpDecorate %iSampBuffer Binding 8 + OpDecorate %iSamp2DMS DescriptorSet 4 + OpDecorate %iSamp2DMS Binding 9 + OpDecorate %iSamp2DMSArray DescriptorSet 4 + OpDecorate %iSamp2DMSArray Binding 10 + OpDecorate %uSamp1D DescriptorSet 5 + OpDecorate %uSamp1D Binding 0 + OpDecorate %uSamp2D DescriptorSet 5 + OpDecorate %uSamp2D Binding 1 + OpDecorate %uSamp3D DescriptorSet 5 + OpDecorate %uSamp3D Binding 2 + OpDecorate %uSampCube DescriptorSet 5 + OpDecorate %uSampCube Binding 3 + OpDecorate %uSamp2DRect DescriptorSet 5 + OpDecorate %uSamp2DRect Binding 4 + OpDecorate %uSamp1DArray DescriptorSet 5 + OpDecorate %uSamp1DArray Binding 5 + OpDecorate %uSamp2DArray DescriptorSet 5 + OpDecorate %uSamp2DArray Binding 6 + OpDecorate %uSampCubeArray DescriptorSet 5 + OpDecorate %uSampCubeArray Binding 7 + OpDecorate %uSampBuffer DescriptorSet 5 + OpDecorate %uSampBuffer Binding 8 + OpDecorate %uSamp2DMS DescriptorSet 5 + OpDecorate %uSamp2DMS Binding 9 + OpDecorate %uSamp2DMSArray DescriptorSet 5 + OpDecorate %uSamp2DMSArray Binding 10 + OpDecorate %fSamp1D DescriptorSet 6 + OpDecorate %fSamp1D Binding 0 + OpDecorate %fSamp2D DescriptorSet 6 + OpDecorate %fSamp2D Binding 1 + OpDecorate %fSamp3D DescriptorSet 6 + OpDecorate %fSamp3D Binding 2 + OpDecorate %fSampCube DescriptorSet 6 + OpDecorate %fSampCube Binding 3 + OpDecorate %fSamp2DRect DescriptorSet 6 + OpDecorate %fSamp2DRect Binding 4 + OpDecorate %fSamp1DArray DescriptorSet 6 + OpDecorate %fSamp1DArray Binding 5 + OpDecorate %fSamp2DArray DescriptorSet 6 + OpDecorate %fSamp2DArray Binding 6 + OpDecorate %fSampCubeArray DescriptorSet 6 + OpDecorate %fSampCubeArray Binding 7 + OpDecorate %fSampBuffer DescriptorSet 6 + OpDecorate %fSampBuffer Binding 8 + OpDecorate %fSamp2DMS DescriptorSet 6 + OpDecorate %fSamp2DMS Binding 9 + OpDecorate %fSamp2DMSArray DescriptorSet 6 + OpDecorate %fSamp2DMSArray Binding 10 + OpDecorate %dsSamp1D DescriptorSet 7 + OpDecorate %dsSamp1D Binding 0 + OpDecorate %dsSamp2D DescriptorSet 7 + OpDecorate %dsSamp2D Binding 1 + OpDecorate %dsSampCube DescriptorSet 7 + OpDecorate %dsSampCube Binding 2 + OpDecorate %dsSamp2DRect DescriptorSet 7 + OpDecorate %dsSamp2DRect Binding 3 + OpDecorate %dsSamp1DArray DescriptorSet 7 + OpDecorate %dsSamp1DArray Binding 4 + OpDecorate %dsSamp2DArray DescriptorSet 7 + OpDecorate %dsSamp2DArray Binding 5 + OpDecorate %dsSampCubeArray DescriptorSet 7 + OpDecorate %dsSampCubeArray Binding 6 + OpDecorate %samp DescriptorSet 8 + OpDecorate %samp Binding 0 + OpDecorate %sampShadow DescriptorSet 8 + OpDecorate %sampShadow Binding 1 + OpDecorate %iTex1D DescriptorSet 9 + OpDecorate %iTex1D Binding 0 + OpDecorate %iTex2D DescriptorSet 9 + OpDecorate %iTex2D Binding 1 + OpDecorate %iTex3D DescriptorSet 9 + OpDecorate %iTex3D Binding 2 + OpDecorate %iTexCube DescriptorSet 9 + OpDecorate %iTexCube Binding 3 + OpDecorate %iTex2DRect DescriptorSet 9 + OpDecorate %iTex2DRect Binding 4 + OpDecorate %iTex1DArray DescriptorSet 9 + OpDecorate %iTex1DArray Binding 5 + OpDecorate %iTex2DArray DescriptorSet 9 + OpDecorate %iTex2DArray Binding 6 + OpDecorate %iTexCubeArray DescriptorSet 9 + OpDecorate %iTexCubeArray Binding 7 + OpDecorate %iTexBuffer DescriptorSet 9 + OpDecorate %iTexBuffer Binding 8 + OpDecorate %iTex2DMS DescriptorSet 9 + OpDecorate %iTex2DMS Binding 9 + OpDecorate %iTex2DMSArray DescriptorSet 9 + OpDecorate %iTex2DMSArray Binding 10 + OpDecorate %uTex1D DescriptorSet 10 + OpDecorate %uTex1D Binding 0 + OpDecorate %uTex2D DescriptorSet 10 + OpDecorate %uTex2D Binding 1 + OpDecorate %uTex3D DescriptorSet 10 + OpDecorate %uTex3D Binding 2 + OpDecorate %uTexCube DescriptorSet 10 + OpDecorate %uTexCube Binding 3 + OpDecorate %uTex2DRect DescriptorSet 10 + OpDecorate %uTex2DRect Binding 4 + OpDecorate %uTex1DArray DescriptorSet 10 + OpDecorate %uTex1DArray Binding 5 + OpDecorate %uTex2DArray DescriptorSet 10 + OpDecorate %uTex2DArray Binding 6 + OpDecorate %uTexCubeArray DescriptorSet 10 + OpDecorate %uTexCubeArray Binding 7 + OpDecorate %uTexBuffer DescriptorSet 10 + OpDecorate %uTexBuffer Binding 8 + OpDecorate %uTex2DMS DescriptorSet 10 + OpDecorate %uTex2DMS Binding 9 + OpDecorate %uTex2DMSArray DescriptorSet 10 + OpDecorate %uTex2DMSArray Binding 10 + OpDecorate %fTex1D DescriptorSet 11 + OpDecorate %fTex1D Binding 0 + OpDecorate %fTex2D DescriptorSet 11 + OpDecorate %fTex2D Binding 1 + OpDecorate %fTex3D DescriptorSet 11 + OpDecorate %fTex3D Binding 2 + OpDecorate %fTexCube DescriptorSet 11 + OpDecorate %fTexCube Binding 3 + OpDecorate %fTex2DRect DescriptorSet 11 + OpDecorate %fTex2DRect Binding 4 + OpDecorate %fTex1DArray DescriptorSet 11 + OpDecorate %fTex1DArray Binding 5 + OpDecorate %fTex2DArray DescriptorSet 11 + OpDecorate %fTex2DArray Binding 6 + OpDecorate %fTexCubeArray DescriptorSet 11 + OpDecorate %fTexCubeArray Binding 7 + OpDecorate %fTexBuffer DescriptorSet 11 + OpDecorate %fTexBuffer Binding 8 + OpDecorate %fTex2DMS DescriptorSet 11 + OpDecorate %fTex2DMS Binding 9 + OpDecorate %fTex2DMSArray DescriptorSet 11 + OpDecorate %fTex2DMSArray Binding 10 + OpMemberDecorate %Data 0 Offset 0 + OpMemberDecorate %Data 1 Offset 8 + OpMemberDecorate %Data 2 Offset 16 + OpMemberDecorate %Data 3 Offset 32 + OpMemberDecorate %Data 4 Offset 48 + OpMemberDecorate %Data 5 Offset 56 + OpMemberDecorate %Data 6 Offset 64 + OpMemberDecorate %Data 7 Offset 80 + OpMemberDecorate %Data 8 Offset 96 + OpMemberDecorate %Data 9 Offset 104 + OpMemberDecorate %Data 10 Offset 112 + OpMemberDecorate %Data 11 Offset 128 + OpMemberDecorate %Data 12 ColMajor + OpMemberDecorate %Data 12 Offset 144 + OpMemberDecorate %Data 12 MatrixStride 16 + OpMemberDecorate %Data 13 ColMajor + OpMemberDecorate %Data 13 Offset 176 + OpMemberDecorate %Data 13 MatrixStride 16 + OpMemberDecorate %Data 14 ColMajor + OpMemberDecorate %Data 14 Offset 208 + OpMemberDecorate %Data 14 MatrixStride 16 + OpMemberDecorate %Data 15 ColMajor + OpMemberDecorate %Data 15 Offset 240 + OpMemberDecorate %Data 15 MatrixStride 16 + OpMemberDecorate %Data 16 ColMajor + OpMemberDecorate %Data 16 Offset 288 + OpMemberDecorate %Data 16 MatrixStride 16 + OpMemberDecorate %Data 17 ColMajor + OpMemberDecorate %Data 17 Offset 336 + OpMemberDecorate %Data 17 MatrixStride 16 + OpMemberDecorate %Data 18 ColMajor + OpMemberDecorate %Data 18 Offset 384 + OpMemberDecorate %Data 18 MatrixStride 16 + OpMemberDecorate %Data 19 ColMajor + OpMemberDecorate %Data 19 Offset 448 + OpMemberDecorate %Data 19 MatrixStride 16 + OpMemberDecorate %Data 20 ColMajor + OpMemberDecorate %Data 20 Offset 512 + OpMemberDecorate %Data 20 MatrixStride 16 + OpMemberDecorate %Data 21 Offset 576 + OpMemberDecorate %Data 22 Offset 592 + OpMemberDecorate %Data 23 Offset 608 + OpMemberDecorate %Data 24 Offset 640 + OpMemberDecorate %Data 25 ColMajor + OpMemberDecorate %Data 25 Offset 672 + OpMemberDecorate %Data 25 MatrixStride 16 + OpMemberDecorate %Data 26 ColMajor + OpMemberDecorate %Data 26 Offset 704 + OpMemberDecorate %Data 26 MatrixStride 32 + OpMemberDecorate %Data 27 ColMajor + OpMemberDecorate %Data 27 Offset 768 + OpMemberDecorate %Data 27 MatrixStride 32 + OpMemberDecorate %Data 28 ColMajor + OpMemberDecorate %Data 28 Offset 832 + OpMemberDecorate %Data 28 MatrixStride 16 + OpMemberDecorate %Data 29 ColMajor + OpMemberDecorate %Data 29 Offset 896 + OpMemberDecorate %Data 29 MatrixStride 32 + OpMemberDecorate %Data 30 ColMajor + OpMemberDecorate %Data 30 Offset 992 + OpMemberDecorate %Data 30 MatrixStride 32 + OpMemberDecorate %Data 31 ColMajor + OpMemberDecorate %Data 31 Offset 1088 + OpMemberDecorate %Data 31 MatrixStride 16 + OpMemberDecorate %Data 32 ColMajor + OpMemberDecorate %Data 32 Offset 1152 + OpMemberDecorate %Data 32 MatrixStride 32 + OpMemberDecorate %Data 33 ColMajor + OpMemberDecorate %Data 33 Offset 1280 + OpMemberDecorate %Data 33 MatrixStride 32 + OpDecorate %_arr_Data_uint_4 ArrayStride 1408 + OpMemberDecorate %Ubo 0 Offset 0 + OpDecorate %Ubo Block + OpDecorate %ubo DescriptorSet 12 + OpDecorate %ubo Binding 0 + OpDecorate %_runtimearr_int ArrayStride 4 + OpMemberDecorate %Ssbo 0 Offset 0 + OpDecorate %Ssbo Block + OpDecorate %ssbo DescriptorSet 13 + OpDecorate %ssbo Binding 0 + OpDecorate %iAttm DescriptorSet 14 + OpDecorate %iAttm Binding 0 + OpDecorate %iAttm InputAttachmentIndex 0 + OpDecorate %iAttmMS DescriptorSet 14 + OpDecorate %iAttmMS Binding 1 + OpDecorate %iAttmMS InputAttachmentIndex 1 + OpDecorate %uAttm DescriptorSet 14 + OpDecorate %uAttm Binding 2 + OpDecorate %uAttm InputAttachmentIndex 2 + OpDecorate %uAttmMS DescriptorSet 14 + OpDecorate %uAttmMS Binding 3 + OpDecorate %uAttmMS InputAttachmentIndex 3 + OpDecorate %fAttm DescriptorSet 14 + OpDecorate %fAttm Binding 4 + OpDecorate %fAttm InputAttachmentIndex 4 + OpDecorate %fAttmMS DescriptorSet 14 + OpDecorate %fAttmMS Binding 5 + OpDecorate %fAttmMS InputAttachmentIndex 5 + OpDecorate %acc DescriptorSet 15 + OpDecorate %acc Binding 0 + %void = OpTypeVoid + %3 = OpTypeFunction %void + %6 = OpTypeRayQueryKHR +%_ptr_Private_6 = OpTypePointer Private %6 + %ray_query = OpVariable %_ptr_Private_6 Private + %bool = OpTypeBool + %int = OpTypeInt 32 1 + %12 = OpTypeImage %int 1D 0 0 0 2 Rgba32i +%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 + %iImg1d = OpVariable %_ptr_UniformConstant_12 UniformConstant + %15 = OpTypeImage %int 2D 0 0 0 2 Rgba16i +%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15 + %iImg2d = OpVariable %_ptr_UniformConstant_15 UniformConstant + %18 = OpTypeImage %int 3D 0 0 0 2 Rgba8i +%_ptr_UniformConstant_18 = OpTypePointer UniformConstant %18 + %iImg3d = OpVariable %_ptr_UniformConstant_18 UniformConstant + %21 = OpTypeImage %int 1D 0 1 0 2 Rgba32i +%_ptr_UniformConstant_21 = OpTypePointer UniformConstant %21 + %iImg1dArr = OpVariable %_ptr_UniformConstant_21 UniformConstant + %24 = OpTypeImage %int 2D 0 1 0 2 Rgba32i +%_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24 + %iImg2dArr = OpVariable %_ptr_UniformConstant_24 UniformConstant + %27 = OpTypeImage %int Cube 0 0 0 2 Rgba32i +%_ptr_UniformConstant_27 = OpTypePointer UniformConstant %27 + %iImgCube = OpVariable %_ptr_UniformConstant_27 UniformConstant + %30 = OpTypeImage %int Cube 0 1 0 2 Rgba32i +%_ptr_UniformConstant_30 = OpTypePointer UniformConstant %30 +%iImgCubeArr = OpVariable %_ptr_UniformConstant_30 UniformConstant + %33 = OpTypeImage %int Buffer 0 0 0 2 Rgba32i +%_ptr_UniformConstant_33 = OpTypePointer UniformConstant %33 + %iImgBuf = OpVariable %_ptr_UniformConstant_33 UniformConstant + %uint = OpTypeInt 32 0 + %37 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui +%_ptr_UniformConstant_37 = OpTypePointer UniformConstant %37 + %uImg1d = OpVariable %_ptr_UniformConstant_37 UniformConstant + %40 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui +%_ptr_UniformConstant_40 = OpTypePointer UniformConstant %40 + %uImg2d = OpVariable %_ptr_UniformConstant_40 UniformConstant + %43 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui +%_ptr_UniformConstant_43 = OpTypePointer UniformConstant %43 + %uImg3d = OpVariable %_ptr_UniformConstant_43 UniformConstant + %46 = OpTypeImage %uint 1D 0 1 0 2 Rgba32ui +%_ptr_UniformConstant_46 = OpTypePointer UniformConstant %46 + %uImg1dArr = OpVariable %_ptr_UniformConstant_46 UniformConstant + %49 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui +%_ptr_UniformConstant_49 = OpTypePointer UniformConstant %49 + %uImg2dArr = OpVariable %_ptr_UniformConstant_49 UniformConstant + %52 = OpTypeImage %uint Cube 0 0 0 2 Rgba32ui +%_ptr_UniformConstant_52 = OpTypePointer UniformConstant %52 + %uImgCube = OpVariable %_ptr_UniformConstant_52 UniformConstant + %55 = OpTypeImage %uint Cube 0 1 0 2 Rgba32ui +%_ptr_UniformConstant_55 = OpTypePointer UniformConstant %55 +%uImgCubeArr = OpVariable %_ptr_UniformConstant_55 UniformConstant + %58 = OpTypeImage %uint Buffer 0 0 0 2 Rgba32ui +%_ptr_UniformConstant_58 = OpTypePointer UniformConstant %58 + %uImgBuf = OpVariable %_ptr_UniformConstant_58 UniformConstant + %float = OpTypeFloat 32 + %62 = OpTypeImage %float 1D 0 0 0 2 Rgba32f +%_ptr_UniformConstant_62 = OpTypePointer UniformConstant %62 + %fImg1D = OpVariable %_ptr_UniformConstant_62 UniformConstant + %65 = OpTypeImage %float 2D 0 0 0 2 Rgba16f +%_ptr_UniformConstant_65 = OpTypePointer UniformConstant %65 + %fImg2D = OpVariable %_ptr_UniformConstant_65 UniformConstant + %68 = OpTypeImage %float 3D 0 0 0 2 R32f +%_ptr_UniformConstant_68 = OpTypePointer UniformConstant %68 + %fImg3D = OpVariable %_ptr_UniformConstant_68 UniformConstant + %71 = OpTypeImage %float Cube 0 0 0 2 Rgba8 +%_ptr_UniformConstant_71 = OpTypePointer UniformConstant %71 + %fImgCube = OpVariable %_ptr_UniformConstant_71 UniformConstant + %74 = OpTypeImage %float Rect 0 0 0 2 Rgba8Snorm +%_ptr_UniformConstant_74 = OpTypePointer UniformConstant %74 + %fImg2DRect = OpVariable %_ptr_UniformConstant_74 UniformConstant + %77 = OpTypeImage %float 1D 0 1 0 2 Rgba32f +%_ptr_UniformConstant_77 = OpTypePointer UniformConstant %77 +%fImg1DArray = OpVariable %_ptr_UniformConstant_77 UniformConstant + %80 = OpTypeImage %float 2D 0 1 0 2 Rgba32f +%_ptr_UniformConstant_80 = OpTypePointer UniformConstant %80 +%fImg2DArray = OpVariable %_ptr_UniformConstant_80 UniformConstant + %83 = OpTypeImage %float Cube 0 1 0 2 Rgba32f +%_ptr_UniformConstant_83 = OpTypePointer UniformConstant %83 +%fImgCubeArray = OpVariable %_ptr_UniformConstant_83 UniformConstant + %86 = OpTypeImage %float Buffer 0 0 0 2 Rgba32f +%_ptr_UniformConstant_86 = OpTypePointer UniformConstant %86 + %fImgBuffer = OpVariable %_ptr_UniformConstant_86 UniformConstant + %89 = OpTypeImage %float 2D 0 0 1 2 Rgba32f +%_ptr_UniformConstant_89 = OpTypePointer UniformConstant %89 + %fImg2DMS = OpVariable %_ptr_UniformConstant_89 UniformConstant + %92 = OpTypeImage %float 2D 0 1 1 2 Rgba32f +%_ptr_UniformConstant_92 = OpTypePointer UniformConstant %92 +%fImg2DMSArray = OpVariable %_ptr_UniformConstant_92 UniformConstant + %95 = OpTypeImage %int 1D 0 0 0 1 Unknown + %96 = OpTypeSampledImage %95 +%_ptr_UniformConstant_96 = OpTypePointer UniformConstant %96 + %iSamp1D = OpVariable %_ptr_UniformConstant_96 UniformConstant + %99 = OpTypeImage %int 2D 0 0 0 1 Unknown + %100 = OpTypeSampledImage %99 +%_ptr_UniformConstant_100 = OpTypePointer UniformConstant %100 + %iSamp2D = OpVariable %_ptr_UniformConstant_100 UniformConstant + %103 = OpTypeImage %int 3D 0 0 0 1 Unknown + %104 = OpTypeSampledImage %103 +%_ptr_UniformConstant_104 = OpTypePointer UniformConstant %104 + %iSamp3D = OpVariable %_ptr_UniformConstant_104 UniformConstant + %107 = OpTypeImage %int Cube 0 0 0 1 Unknown + %108 = OpTypeSampledImage %107 +%_ptr_UniformConstant_108 = OpTypePointer UniformConstant %108 + %iSampCube = OpVariable %_ptr_UniformConstant_108 UniformConstant + %111 = OpTypeImage %int Rect 0 0 0 1 Unknown + %112 = OpTypeSampledImage %111 +%_ptr_UniformConstant_112 = OpTypePointer UniformConstant %112 +%iSamp2DRect = OpVariable %_ptr_UniformConstant_112 UniformConstant + %115 = OpTypeImage %int 1D 0 1 0 1 Unknown + %116 = OpTypeSampledImage %115 +%_ptr_UniformConstant_116 = OpTypePointer UniformConstant %116 +%iSamp1DArray = OpVariable %_ptr_UniformConstant_116 UniformConstant + %119 = OpTypeImage %int 2D 0 1 0 1 Unknown + %120 = OpTypeSampledImage %119 +%_ptr_UniformConstant_120 = OpTypePointer UniformConstant %120 +%iSamp2DArray = OpVariable %_ptr_UniformConstant_120 UniformConstant + %123 = OpTypeImage %int Cube 0 1 0 1 Unknown + %124 = OpTypeSampledImage %123 +%_ptr_UniformConstant_124 = OpTypePointer UniformConstant %124 +%iSampCubeArray = OpVariable %_ptr_UniformConstant_124 UniformConstant + %127 = OpTypeImage %int Buffer 0 0 0 1 Unknown + %128 = OpTypeSampledImage %127 +%_ptr_UniformConstant_128 = OpTypePointer UniformConstant %128 +%iSampBuffer = OpVariable %_ptr_UniformConstant_128 UniformConstant + %131 = OpTypeImage %int 2D 0 0 1 1 Unknown + %132 = OpTypeSampledImage %131 +%_ptr_UniformConstant_132 = OpTypePointer UniformConstant %132 + %iSamp2DMS = OpVariable %_ptr_UniformConstant_132 UniformConstant + %135 = OpTypeImage %int 2D 0 1 1 1 Unknown + %136 = OpTypeSampledImage %135 +%_ptr_UniformConstant_136 = OpTypePointer UniformConstant %136 +%iSamp2DMSArray = OpVariable %_ptr_UniformConstant_136 UniformConstant + %139 = OpTypeImage %uint 1D 0 0 0 1 Unknown + %140 = OpTypeSampledImage %139 +%_ptr_UniformConstant_140 = OpTypePointer UniformConstant %140 + %uSamp1D = OpVariable %_ptr_UniformConstant_140 UniformConstant + %143 = OpTypeImage %uint 2D 0 0 0 1 Unknown + %144 = OpTypeSampledImage %143 +%_ptr_UniformConstant_144 = OpTypePointer UniformConstant %144 + %uSamp2D = OpVariable %_ptr_UniformConstant_144 UniformConstant + %147 = OpTypeImage %uint 3D 0 0 0 1 Unknown + %148 = OpTypeSampledImage %147 +%_ptr_UniformConstant_148 = OpTypePointer UniformConstant %148 + %uSamp3D = OpVariable %_ptr_UniformConstant_148 UniformConstant + %151 = OpTypeImage %uint Cube 0 0 0 1 Unknown + %152 = OpTypeSampledImage %151 +%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152 + %uSampCube = OpVariable %_ptr_UniformConstant_152 UniformConstant + %155 = OpTypeImage %uint Rect 0 0 0 1 Unknown + %156 = OpTypeSampledImage %155 +%_ptr_UniformConstant_156 = OpTypePointer UniformConstant %156 +%uSamp2DRect = OpVariable %_ptr_UniformConstant_156 UniformConstant + %159 = OpTypeImage %uint 1D 0 1 0 1 Unknown + %160 = OpTypeSampledImage %159 +%_ptr_UniformConstant_160 = OpTypePointer UniformConstant %160 +%uSamp1DArray = OpVariable %_ptr_UniformConstant_160 UniformConstant + %163 = OpTypeImage %uint 2D 0 1 0 1 Unknown + %164 = OpTypeSampledImage %163 +%_ptr_UniformConstant_164 = OpTypePointer UniformConstant %164 +%uSamp2DArray = OpVariable %_ptr_UniformConstant_164 UniformConstant + %167 = OpTypeImage %uint Cube 0 1 0 1 Unknown + %168 = OpTypeSampledImage %167 +%_ptr_UniformConstant_168 = OpTypePointer UniformConstant %168 +%uSampCubeArray = OpVariable %_ptr_UniformConstant_168 UniformConstant + %171 = OpTypeImage %uint Buffer 0 0 0 1 Unknown + %172 = OpTypeSampledImage %171 +%_ptr_UniformConstant_172 = OpTypePointer UniformConstant %172 +%uSampBuffer = OpVariable %_ptr_UniformConstant_172 UniformConstant + %175 = OpTypeImage %uint 2D 0 0 1 1 Unknown + %176 = OpTypeSampledImage %175 +%_ptr_UniformConstant_176 = OpTypePointer UniformConstant %176 + %uSamp2DMS = OpVariable %_ptr_UniformConstant_176 UniformConstant + %179 = OpTypeImage %uint 2D 0 1 1 1 Unknown + %180 = OpTypeSampledImage %179 +%_ptr_UniformConstant_180 = OpTypePointer UniformConstant %180 +%uSamp2DMSArray = OpVariable %_ptr_UniformConstant_180 UniformConstant + %183 = OpTypeImage %float 1D 0 0 0 1 Unknown + %184 = OpTypeSampledImage %183 +%_ptr_UniformConstant_184 = OpTypePointer UniformConstant %184 + %fSamp1D = OpVariable %_ptr_UniformConstant_184 UniformConstant + %187 = OpTypeImage %float 2D 0 0 0 1 Unknown + %188 = OpTypeSampledImage %187 +%_ptr_UniformConstant_188 = OpTypePointer UniformConstant %188 + %fSamp2D = OpVariable %_ptr_UniformConstant_188 UniformConstant + %191 = OpTypeImage %float 3D 0 0 0 1 Unknown + %192 = OpTypeSampledImage %191 +%_ptr_UniformConstant_192 = OpTypePointer UniformConstant %192 + %fSamp3D = OpVariable %_ptr_UniformConstant_192 UniformConstant + %195 = OpTypeImage %float Cube 0 0 0 1 Unknown + %196 = OpTypeSampledImage %195 +%_ptr_UniformConstant_196 = OpTypePointer UniformConstant %196 + %fSampCube = OpVariable %_ptr_UniformConstant_196 UniformConstant + %199 = OpTypeImage %float Rect 0 0 0 1 Unknown + %200 = OpTypeSampledImage %199 +%_ptr_UniformConstant_200 = OpTypePointer UniformConstant %200 +%fSamp2DRect = OpVariable %_ptr_UniformConstant_200 UniformConstant + %203 = OpTypeImage %float 1D 0 1 0 1 Unknown + %204 = OpTypeSampledImage %203 +%_ptr_UniformConstant_204 = OpTypePointer UniformConstant %204 +%fSamp1DArray = OpVariable %_ptr_UniformConstant_204 UniformConstant + %207 = OpTypeImage %float 2D 0 1 0 1 Unknown + %208 = OpTypeSampledImage %207 +%_ptr_UniformConstant_208 = OpTypePointer UniformConstant %208 +%fSamp2DArray = OpVariable %_ptr_UniformConstant_208 UniformConstant + %211 = OpTypeImage %float Cube 0 1 0 1 Unknown + %212 = OpTypeSampledImage %211 +%_ptr_UniformConstant_212 = OpTypePointer UniformConstant %212 +%fSampCubeArray = OpVariable %_ptr_UniformConstant_212 UniformConstant + %215 = OpTypeImage %float Buffer 0 0 0 1 Unknown + %216 = OpTypeSampledImage %215 +%_ptr_UniformConstant_216 = OpTypePointer UniformConstant %216 +%fSampBuffer = OpVariable %_ptr_UniformConstant_216 UniformConstant + %219 = OpTypeImage %float 2D 0 0 1 1 Unknown + %220 = OpTypeSampledImage %219 +%_ptr_UniformConstant_220 = OpTypePointer UniformConstant %220 + %fSamp2DMS = OpVariable %_ptr_UniformConstant_220 UniformConstant + %223 = OpTypeImage %float 2D 0 1 1 1 Unknown + %224 = OpTypeSampledImage %223 +%_ptr_UniformConstant_224 = OpTypePointer UniformConstant %224 +%fSamp2DMSArray = OpVariable %_ptr_UniformConstant_224 UniformConstant + %227 = OpTypeImage %float 1D 1 0 0 1 Unknown + %228 = OpTypeSampledImage %227 +%_ptr_UniformConstant_228 = OpTypePointer UniformConstant %228 + %dsSamp1D = OpVariable %_ptr_UniformConstant_228 UniformConstant + %231 = OpTypeImage %float 2D 1 0 0 1 Unknown + %232 = OpTypeSampledImage %231 +%_ptr_UniformConstant_232 = OpTypePointer UniformConstant %232 + %dsSamp2D = OpVariable %_ptr_UniformConstant_232 UniformConstant + %235 = OpTypeImage %float Cube 1 0 0 1 Unknown + %236 = OpTypeSampledImage %235 +%_ptr_UniformConstant_236 = OpTypePointer UniformConstant %236 + %dsSampCube = OpVariable %_ptr_UniformConstant_236 UniformConstant + %239 = OpTypeImage %float Rect 1 0 0 1 Unknown + %240 = OpTypeSampledImage %239 +%_ptr_UniformConstant_240 = OpTypePointer UniformConstant %240 +%dsSamp2DRect = OpVariable %_ptr_UniformConstant_240 UniformConstant + %243 = OpTypeImage %float 1D 1 1 0 1 Unknown + %244 = OpTypeSampledImage %243 +%_ptr_UniformConstant_244 = OpTypePointer UniformConstant %244 +%dsSamp1DArray = OpVariable %_ptr_UniformConstant_244 UniformConstant + %247 = OpTypeImage %float 2D 1 1 0 1 Unknown + %248 = OpTypeSampledImage %247 +%_ptr_UniformConstant_248 = OpTypePointer UniformConstant %248 +%dsSamp2DArray = OpVariable %_ptr_UniformConstant_248 UniformConstant + %251 = OpTypeImage %float Cube 1 1 0 1 Unknown + %252 = OpTypeSampledImage %251 +%_ptr_UniformConstant_252 = OpTypePointer UniformConstant %252 +%dsSampCubeArray = OpVariable %_ptr_UniformConstant_252 UniformConstant + %255 = OpTypeSampler +%_ptr_UniformConstant_255 = OpTypePointer UniformConstant %255 + %samp = OpVariable %_ptr_UniformConstant_255 UniformConstant + %sampShadow = OpVariable %_ptr_UniformConstant_255 UniformConstant +%_ptr_UniformConstant_95 = OpTypePointer UniformConstant %95 + %iTex1D = OpVariable %_ptr_UniformConstant_95 UniformConstant +%_ptr_UniformConstant_99 = OpTypePointer UniformConstant %99 + %iTex2D = OpVariable %_ptr_UniformConstant_99 UniformConstant +%_ptr_UniformConstant_103 = OpTypePointer UniformConstant %103 + %iTex3D = OpVariable %_ptr_UniformConstant_103 UniformConstant +%_ptr_UniformConstant_107 = OpTypePointer UniformConstant %107 + %iTexCube = OpVariable %_ptr_UniformConstant_107 UniformConstant +%_ptr_UniformConstant_111 = OpTypePointer UniformConstant %111 + %iTex2DRect = OpVariable %_ptr_UniformConstant_111 UniformConstant +%_ptr_UniformConstant_115 = OpTypePointer UniformConstant %115 +%iTex1DArray = OpVariable %_ptr_UniformConstant_115 UniformConstant +%_ptr_UniformConstant_119 = OpTypePointer UniformConstant %119 +%iTex2DArray = OpVariable %_ptr_UniformConstant_119 UniformConstant +%_ptr_UniformConstant_123 = OpTypePointer UniformConstant %123 +%iTexCubeArray = OpVariable %_ptr_UniformConstant_123 UniformConstant +%_ptr_UniformConstant_127 = OpTypePointer UniformConstant %127 + %iTexBuffer = OpVariable %_ptr_UniformConstant_127 UniformConstant +%_ptr_UniformConstant_131 = OpTypePointer UniformConstant %131 + %iTex2DMS = OpVariable %_ptr_UniformConstant_131 UniformConstant +%_ptr_UniformConstant_135 = OpTypePointer UniformConstant %135 +%iTex2DMSArray = OpVariable %_ptr_UniformConstant_135 UniformConstant +%_ptr_UniformConstant_139 = OpTypePointer UniformConstant %139 + %uTex1D = OpVariable %_ptr_UniformConstant_139 UniformConstant +%_ptr_UniformConstant_143 = OpTypePointer UniformConstant %143 + %uTex2D = OpVariable %_ptr_UniformConstant_143 UniformConstant +%_ptr_UniformConstant_147 = OpTypePointer UniformConstant %147 + %uTex3D = OpVariable %_ptr_UniformConstant_147 UniformConstant +%_ptr_UniformConstant_151 = OpTypePointer UniformConstant %151 + %uTexCube = OpVariable %_ptr_UniformConstant_151 UniformConstant +%_ptr_UniformConstant_155 = OpTypePointer UniformConstant %155 + %uTex2DRect = OpVariable %_ptr_UniformConstant_155 UniformConstant +%_ptr_UniformConstant_159 = OpTypePointer UniformConstant %159 +%uTex1DArray = OpVariable %_ptr_UniformConstant_159 UniformConstant +%_ptr_UniformConstant_163 = OpTypePointer UniformConstant %163 +%uTex2DArray = OpVariable %_ptr_UniformConstant_163 UniformConstant +%_ptr_UniformConstant_167 = OpTypePointer UniformConstant %167 +%uTexCubeArray = OpVariable %_ptr_UniformConstant_167 UniformConstant +%_ptr_UniformConstant_171 = OpTypePointer UniformConstant %171 + %uTexBuffer = OpVariable %_ptr_UniformConstant_171 UniformConstant +%_ptr_UniformConstant_175 = OpTypePointer UniformConstant %175 + %uTex2DMS = OpVariable %_ptr_UniformConstant_175 UniformConstant +%_ptr_UniformConstant_179 = OpTypePointer UniformConstant %179 +%uTex2DMSArray = OpVariable %_ptr_UniformConstant_179 UniformConstant +%_ptr_UniformConstant_183 = OpTypePointer UniformConstant %183 + %fTex1D = OpVariable %_ptr_UniformConstant_183 UniformConstant +%_ptr_UniformConstant_187 = OpTypePointer UniformConstant %187 + %fTex2D = OpVariable %_ptr_UniformConstant_187 UniformConstant +%_ptr_UniformConstant_191 = OpTypePointer UniformConstant %191 + %fTex3D = OpVariable %_ptr_UniformConstant_191 UniformConstant +%_ptr_UniformConstant_195 = OpTypePointer UniformConstant %195 + %fTexCube = OpVariable %_ptr_UniformConstant_195 UniformConstant +%_ptr_UniformConstant_199 = OpTypePointer UniformConstant %199 + %fTex2DRect = OpVariable %_ptr_UniformConstant_199 UniformConstant +%_ptr_UniformConstant_203 = OpTypePointer UniformConstant %203 +%fTex1DArray = OpVariable %_ptr_UniformConstant_203 UniformConstant +%_ptr_UniformConstant_207 = OpTypePointer UniformConstant %207 +%fTex2DArray = OpVariable %_ptr_UniformConstant_207 UniformConstant +%_ptr_UniformConstant_211 = OpTypePointer UniformConstant %211 +%fTexCubeArray = OpVariable %_ptr_UniformConstant_211 UniformConstant +%_ptr_UniformConstant_215 = OpTypePointer UniformConstant %215 + %fTexBuffer = OpVariable %_ptr_UniformConstant_215 UniformConstant +%_ptr_UniformConstant_219 = OpTypePointer UniformConstant %219 + %fTex2DMS = OpVariable %_ptr_UniformConstant_219 UniformConstant +%_ptr_UniformConstant_223 = OpTypePointer UniformConstant %223 +%fTex2DMSArray = OpVariable %_ptr_UniformConstant_223 UniformConstant + %v2int = OpTypeVector %int 2 + %v3int = OpTypeVector %int 3 + %v4int = OpTypeVector %int 4 + %v2uint = OpTypeVector %uint 2 + %v3uint = OpTypeVector %uint 3 + %v4uint = OpTypeVector %uint 4 + %v2float = OpTypeVector %float 2 + %v3float = OpTypeVector %float 3 + %v4float = OpTypeVector %float 4 +%mat2v2float = OpTypeMatrix %v2float 2 +%mat2v3float = OpTypeMatrix %v3float 2 +%mat2v4float = OpTypeMatrix %v4float 2 +%mat3v2float = OpTypeMatrix %v2float 3 +%mat3v3float = OpTypeMatrix %v3float 3 +%mat3v4float = OpTypeMatrix %v4float 3 +%mat4v2float = OpTypeMatrix %v2float 4 +%mat4v3float = OpTypeMatrix %v3float 4 +%mat4v4float = OpTypeMatrix %v4float 4 + %double = OpTypeFloat 64 + %v2double = OpTypeVector %double 2 + %v3double = OpTypeVector %double 3 + %v4double = OpTypeVector %double 4 +%mat2v2double = OpTypeMatrix %v2double 2 +%mat2v3double = OpTypeMatrix %v3double 2 +%mat2v4double = OpTypeMatrix %v4double 2 +%mat3v2double = OpTypeMatrix %v2double 3 +%mat3v3double = OpTypeMatrix %v3double 3 +%mat3v4double = OpTypeMatrix %v4double 3 +%mat4v2double = OpTypeMatrix %v2double 4 +%mat4v3double = OpTypeMatrix %v3double 4 +%mat4v4double = OpTypeMatrix %v4double 4 + %Data = OpTypeStruct %int %v2int %v3int %v4int %uint %v2uint %v3uint %v4uint %float %v2float %v3float %v4float %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %double %v2double %v3double %v4double %mat2v2double %mat2v3double %mat2v4double %mat3v2double %mat3v3double %mat3v4double %mat4v2double %mat4v3double %mat4v4double + %uint_4 = OpConstant %uint 4 +%_arr_Data_uint_4 = OpTypeArray %Data %uint_4 + %Ubo = OpTypeStruct %_arr_Data_uint_4 + %uint_1 = OpConstant %uint 1 +%_arr_Ubo_uint_1 = OpTypeArray %Ubo %uint_1 +%_ptr_Uniform__arr_Ubo_uint_1 = OpTypePointer Uniform %_arr_Ubo_uint_1 + %ubo = OpVariable %_ptr_Uniform__arr_Ubo_uint_1 Uniform +%_runtimearr_int = OpTypeRuntimeArray %int + %Ssbo = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_Ssbo = OpTypePointer StorageBuffer %Ssbo + %ssbo = OpVariable %_ptr_StorageBuffer_Ssbo StorageBuffer + %368 = OpTypeImage %int SubpassData 0 0 0 2 Unknown +%_ptr_UniformConstant_368 = OpTypePointer UniformConstant %368 + %iAttm = OpVariable %_ptr_UniformConstant_368 UniformConstant + %371 = OpTypeImage %int SubpassData 0 0 1 2 Unknown +%_ptr_UniformConstant_371 = OpTypePointer UniformConstant %371 + %iAttmMS = OpVariable %_ptr_UniformConstant_371 UniformConstant + %374 = OpTypeImage %uint SubpassData 0 0 0 2 Unknown +%_ptr_UniformConstant_374 = OpTypePointer UniformConstant %374 + %uAttm = OpVariable %_ptr_UniformConstant_374 UniformConstant + %377 = OpTypeImage %uint SubpassData 0 0 1 2 Unknown +%_ptr_UniformConstant_377 = OpTypePointer UniformConstant %377 + %uAttmMS = OpVariable %_ptr_UniformConstant_377 UniformConstant + %380 = OpTypeImage %float SubpassData 0 0 0 2 Unknown +%_ptr_UniformConstant_380 = OpTypePointer UniformConstant %380 + %fAttm = OpVariable %_ptr_UniformConstant_380 UniformConstant + %383 = OpTypeImage %float SubpassData 0 0 1 2 Unknown +%_ptr_UniformConstant_383 = OpTypePointer UniformConstant %383 + %fAttmMS = OpVariable %_ptr_UniformConstant_383 UniformConstant + %386 = OpTypeAccelerationStructureKHR +%_ptr_UniformConstant_386 = OpTypePointer UniformConstant %386 + %acc = OpVariable %_ptr_UniformConstant_386 UniformConstant + %main = OpFunction %void None %3 + %5 = OpLabel + %10 = OpRayQueryProceedKHR %bool %ray_query + OpReturn + OpFunctionEnd diff --git a/comp.spv b/comp.spv deleted file mode 100644 index af570d2b1810b4c5c10fd52abf8d5e0d657ff9df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 288 zcmYk0!3qIk6oro&!!U(OS(BxjD5R9E*w}f3DH{tmyoHOuiyJTXMyV6{ukHIz#GDF5IO(= diff --git a/spirq-core/src/annotation.rs b/spirq-core/src/annotation.rs index b62f8ff..5bcce77 100644 --- a/spirq-core/src/annotation.rs +++ b/spirq-core/src/annotation.rs @@ -179,9 +179,9 @@ impl<'a> DecorationRegistry<'a> { } #[derive(Clone, PartialEq, Eq, Hash)] -struct NameKey { - id: InstrId, - member_idx: Option, +pub struct NameKey { + pub id: InstrId, + pub member_idx: Option, } #[derive(Default)] pub struct NameRegistry<'a> { @@ -232,4 +232,8 @@ impl<'a> NameRegistry<'a> { }) .copied() } + + pub fn iter(&self) -> impl Iterator { + self.name_map.iter() + } } diff --git a/spirq-core/src/constant.rs b/spirq-core/src/constant.rs index 0db5e80..a059a3a 100644 --- a/spirq-core/src/constant.rs +++ b/spirq-core/src/constant.rs @@ -179,6 +179,16 @@ impl ConstantValue { _ => None, } } + + pub fn to_typeless(&self) -> Option> { + match self { + Self::Typeless(x) => Some(x.clone()), + Self::F32(x) => Some(Box::new(x.to_ne_bytes())), + Self::S32(x) => Some(Box::new(x.to_ne_bytes())), + Self::U32(x) => Some(Box::new(x.to_ne_bytes())), + Self::Bool(x) => Some(Box::new([*x as u8])), + } + } } /// Constant or specialization constant record. diff --git a/spirq-core/src/ty/mod.rs b/spirq-core/src/ty/mod.rs index 00382c4..e13b70f 100644 --- a/spirq-core/src/ty/mod.rs +++ b/spirq-core/src/ty/mod.rs @@ -276,6 +276,9 @@ pub struct SampledImageType { pub scalar_ty: ScalarType, /// Dimension of the image. pub dim: Dim, + /// Whether the image is a depth image, or `None` if it's unknown at compile + /// time. + pub is_depth: Option, /// Whether the image is an array of images. In Vulkan, it means that the /// image can have multiple layers. In Vulkan, only `Dim1D`, `Dim2D`, and /// `DimCube` can be arrayed. @@ -301,6 +304,11 @@ impl fmt::Display for SampledImageType { Dim::DimRect => "Rect", Dim::DimSubpassData => "SubpassData", }; + let depth = match self.is_depth { + Some(true) => "Depth", + Some(false) => "Color", + None => "Depth?", + }; let is_array = match self.is_array { true => "Array", false => "", @@ -311,7 +319,7 @@ impl fmt::Display for SampledImageType { }; write!( f, - "SampledImage{dim}{is_array}{is_multisampled}<{scalar_ty}>" + "SampledImage{dim}{is_array}{is_multisampled}<{scalar_ty},{depth}>" ) } } diff --git a/spirq-core/src/ty/reg.rs b/spirq-core/src/ty/reg.rs index 0cb5d05..8b3ec8d 100644 --- a/spirq-core/src/ty/reg.rs +++ b/spirq-core/src/ty/reg.rs @@ -43,4 +43,8 @@ impl TypeRegistry { .get(&id) .ok_or(anyhow!("missing type id {}", id)) } + + pub fn iter(&self) -> impl Iterator { + self.ty_map.iter() + } } diff --git a/spirq-spvasm/Cargo.toml b/spirq-spvasm/Cargo.toml index 070b253..568c142 100644 --- a/spirq-spvasm/Cargo.toml +++ b/spirq-spvasm/Cargo.toml @@ -21,6 +21,7 @@ maintenance = { status = "actively-developed" } anyhow = "1.0" num-traits = "0.2" spirq-core = { version = "1.0.0", path = "../spirq-core" } +spirq = { version = "1.0.0", path = "../spirq"} [dev-dependencies] inline-spirv = "0.1" diff --git a/spirq-spvasm/src/dis/auto_name.rs b/spirq-spvasm/src/dis/auto_name.rs new file mode 100644 index 0000000..a153953 --- /dev/null +++ b/spirq-spvasm/src/dis/auto_name.rs @@ -0,0 +1,203 @@ +use std::collections::HashMap; +use anyhow::Result; + +use spirq::{ReflectConfig, reflect::ReflectIntermediate}; +use spirq_core::{parse::SpirvBinary, ty::{Type, ScalarType, VectorType, MatrixType, PointerType, ArrayType, StructType}, constant::ConstantValue}; + + +fn sanitize_name(name: &str) -> String { + name.chars() + .map(|c| if c.is_ascii_punctuation() { '_' } else { c }) + .collect::() +} + +struct AutoNamer { + names: HashMap, + cache: HashMap, + name_counter: HashMap, +} +impl AutoNamer { + fn assign_name(&mut self, id: u32, name: String) { + // Ignore second assignment. + if self.names.contains_key(&id) { + return; + } + match self.name_counter.entry(name.clone()) { + std::collections::hash_map::Entry::Vacant(e) => { + e.insert(0); + self.names.entry(id).or_insert(name.clone()); + }, + std::collections::hash_map::Entry::Occupied(e) => { + let counter = e.into_mut(); + let name = format!("{}_{}", name, counter); + *counter += 1; + self.names.entry(id).or_insert(name); + } + } + } + + fn collect_annotated_names( + &mut self, + itm: &ReflectIntermediate, + ) -> Result<()> { + for (name_key, name) in itm.name_reg.iter() { + if name_key.member_idx.is_none() { + // Sanitize name. Convert all punctuations to underscore. + let name = sanitize_name(name); + self.assign_name(name_key.id, name); + } + } + Ok(()) + } + + // Make type names. + + fn make_scalar_ty_name(&mut self, scalar_ty: &ScalarType) -> Option { + let out = match scalar_ty { + ScalarType::Void => "void".to_string(), + ScalarType::Boolean => "bool".to_string(), + ScalarType::Integer { bits: 32, is_signed: true } => "int".to_string(), + ScalarType::Integer { bits: 32, is_signed: false } => "uint".to_string(), + ScalarType::Float { bits: 32 } => "float".to_string(), + ScalarType::Float { bits: 64 } => "double".to_string(), + _ => return None, + }; + Some(out) + } + fn make_vector_ty_name(&mut self, vector_ty: &VectorType) -> Option { + let out = format!("v{}{}", vector_ty.nscalar, self.make_scalar_ty_name(&vector_ty.scalar_ty)?); + Some(out) + } + fn make_matrix_ty_name(&mut self, matrix_ty: &MatrixType) -> Option { + let out = format!("mat{}{}", matrix_ty.nvector, self.make_vector_ty_name(&matrix_ty.vector_ty)?); + Some(out) + } + + fn make_arr_ty_name(&mut self, arr_ty: &ArrayType) -> Option { + let out = if let Some(nelement) = arr_ty.nelement { + format!("_arr_{}_uint_{}", self.make_ty_name(&arr_ty.element_ty)?, nelement) + } else { + format!("_runtimearr_{}", self.make_ty_name(&arr_ty.element_ty)?) + }; + Some(out) + } + + fn make_pointer_ty_name(&mut self, pointer_ty: &PointerType) -> Option { + let out = if let Some(pointee_name) = self.make_ty_name(&pointer_ty.pointee_ty) { + format!("_ptr_{:?}_{}", pointer_ty.store_cls, pointee_name) + } else { + if let Some(id) = self.cache.get(&pointer_ty.pointee_ty) { + format!("_ptr_{:?}_{}", pointer_ty.store_cls, id) + } else { + return None; + } + }; + Some(out) + } + + fn make_ty_name(&mut self, ty: &Type) -> Option { + if let Some(cached_id) = self.cache.get(ty) { + if let Some(cached_name) = self.names.get(cached_id) { + return Some(cached_name.clone()); + } + } + + let out = match ty { + Type::Scalar(scalar_ty) => self.make_scalar_ty_name(scalar_ty), + Type::Vector(vector_ty) => self.make_vector_ty_name(vector_ty), + Type::Matrix(matrix_ty) => self.make_matrix_ty_name(matrix_ty), + Type::Array(arr_ty) => self.make_arr_ty_name(arr_ty), + Type::Struct(StructType { name, .. }) => name.as_ref().map(|x| sanitize_name(x)), + Type::DevicePointer(pointer_ty) => self.make_pointer_ty_name(pointer_ty), + _ => None, + }; + + out + } + + fn collect_ty_names( + &mut self, + itm: &ReflectIntermediate, + ) -> Result<()> { + for (id, ty) in itm.ty_reg.iter() { + if let Some(name) = self.make_ty_name(ty) { + self.assign_name(*id, name); + self.cache.entry(ty.clone()).or_insert(*id); + } else { + self.cache.insert(ty.clone(), *id); + } + } + + Ok(()) + } + + fn make_const_name( + &mut self, + value: &ConstantValue, + ) -> Option { + let mut out = match value { + ConstantValue::Bool(true) => "true".to_owned(), + ConstantValue::Bool(false) => "false".to_owned(), + ConstantValue::S32(x) => format!("int_{}", x), + ConstantValue::U32(x) => format!("uint_{}", x), + ConstantValue::F32(x) => if x.0 < 0.0 { + format!("float_n{}", -x) + } else { + format!("float_{}", x) + }, + _ => return None, + }; + out = sanitize_name(&out); + Some(out) + } + + fn collect_const_names( + &mut self, + itm: &ReflectIntermediate, + ) -> Result<()> { + for (id, constant) in itm.interp.iter() { + if let Some(name) = constant.name.as_ref() { + self.assign_name(*id, name.clone()); + } else if let Some(name) = self.make_const_name(&constant.value) { + self.assign_name(*id, name); + } + } + Ok(()) + } +} + +pub fn collect_names( + spv: &SpirvBinary, + name_ids: bool, + name_type_ids: bool, + name_const_ids: bool, +) -> Result> { + let cfg = ReflectConfig::default(); + let mut itm = ReflectIntermediate::new(&cfg)?; + let mut instrs = spv.instrs()?; + itm.parse_global_declrs(&mut instrs)?; + + let mut auto_namer = AutoNamer { + names: HashMap::new(), + cache: HashMap::new(), + name_counter: HashMap::new(), + }; + + // Infer type names. + if name_type_ids { + auto_namer.collect_ty_names(&itm)?; + auto_namer.collect_ty_names(&itm)?; + } + + // Infer constant names. + if name_const_ids { + auto_namer.collect_const_names(&itm)?; + } + + // Manually annotated ID by OpName. + if name_ids { + auto_namer.collect_annotated_names(&itm)?; + } + + Ok(auto_namer.names) +} diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index bb3ec48..a88bc6d 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -1,16 +1,23 @@ use std::collections::HashMap; use anyhow::Result; -use spirq_core::{parse::{Instr, SpirvBinary, Instrs, Operands}, spirv::Op}; +use spirq_core::parse::{Instr, SpirvBinary, Instrs, Operands}; use crate::generated; +use super::auto_name; pub struct Disassembler { print_header: bool, + name_ids: bool, + name_type_ids: bool, + name_const_ids: bool, } impl Disassembler { pub fn new() -> Self { Self { print_header: true, + name_ids: false, + name_type_ids: false, + name_const_ids: false, } } @@ -18,6 +25,33 @@ impl Disassembler { self.print_header = value; return self } + /// Reference intermediate values by their names rather than numeric IDs if + /// it has been annotated by OpName. + /// + /// If enabled, the input SPIR-V MUST follow the standard physical layout as + /// described in Section 2.3 in SPIR-V specification. + pub fn name_ids(mut self, value: bool) -> Self { + self.name_ids = value; + self + } + /// Reference type definitions by their names rather than numeric IDs. A + /// human-friendly name will be generated if it's not annotated by OpName. + /// + /// If enabled, the input SPIR-V MUST follow the standard physical layout as + /// described in Section 2.3 in SPIR-V specification. + pub fn name_type_ids(mut self, value: bool) -> Self { + self.name_type_ids = value; + self + } + /// Reference constant value by names rather than numeric IDs. A human- + /// friendly name will be generated if it's not annotated by OpName. + /// + /// If enabled, the input SPIR-V MUST follow the standard physical layout as + /// described in Section 2.3 in SPIR-V specification. + pub fn name_const_ids(mut self, value: bool) -> Self { + self.name_const_ids = value; + self + } fn print_id(&self, id: u32, id_names: &HashMap) -> Result { if let Some(name) = id_names.get(&id) { @@ -74,25 +108,6 @@ impl Disassembler { Ok(out) } - fn collect_names<'a>(&self, spv: &'a SpirvBinary) -> Result> { - let mut out = HashMap::new(); - - let mut instrs = spv.instrs()?; - while let Some(instr) = instrs.next()? { - if instr.op() == Op::Name { - let mut operands = instr.operands(); - let id = operands.read_id()?; - let name = operands.read_str()?; - // Sanitize name. Convert all punctuations to underscore. - let name = name.chars() - .map(|c| if c.is_ascii_punctuation() { '_' } else { c }) - .collect::(); - out.insert(id, name); - } - } - - Ok(out) - } fn print<'a>(&self, spv: &'a SpirvBinary, id_names: HashMap) -> Result> { self.print_lines(&mut spv.instrs()?, id_names) } @@ -100,18 +115,23 @@ impl Disassembler { pub fn disassemble(&self, spv: &SpirvBinary) -> Result { let mut out = Vec::new(); - if let Some(header) = spv.header() { - out.push(format!("; SPIR-V")); - let major_version = header.version >> 16; - let minor_version = header.version & 0xffff; - out.push(format!("; Version: {}.{}", major_version, minor_version)); - out.push(format!("; Generator: {:x}", header.generator)); - out.push(format!("; Bound: {:x}", header.bound)); - out.push(format!("; Schema: {:x}", header.schema)); + if self.print_header { + if let Some(header) = spv.header() { + out.push(format!("; SPIR-V")); + let major_version = header.version >> 16; + let minor_version = (header.version >> 8) & 0xff; + out.push(format!("; Version: {}.{}", major_version, minor_version)); + out.push(format!("; Generator: {:x}", header.generator)); + out.push(format!("; Bound: {:x}", header.bound)); + out.push(format!("; Schema: {:x}", header.schema)); + } } - let id_names = self.collect_names(spv)?; - dbg!(&id_names); + let id_names = if self.name_ids || self.name_type_ids || self.name_const_ids { + auto_name::collect_names(spv, self.name_ids, self.name_type_ids, self.name_const_ids)? + } else { + HashMap::new() + }; let instrs = self.print(spv, id_names)?; out.extend(instrs); diff --git a/spirq-spvasm/src/dis/mod.rs b/spirq-spvasm/src/dis/mod.rs index 05ccffb..55008ac 100644 --- a/spirq-spvasm/src/dis/mod.rs +++ b/spirq-spvasm/src/dis/mod.rs @@ -1,4 +1,5 @@ mod disassembler; +mod auto_name; #[cfg(test)] mod test; diff --git a/spirq-spvasm/src/dis/test.rs b/spirq-spvasm/src/dis/test.rs index d2cac80..518d042 100644 --- a/spirq-spvasm/src/dis/test.rs +++ b/spirq-spvasm/src/dis/test.rs @@ -1,240 +1,20 @@ use super::Disassembler; -use inline_spirv::include_spirv; use pretty_assertions::assert_eq; use spirq_core::parse::SpirvBinary; #[test] fn test_disassembler() { let actual = Disassembler::new(); - let spv = include_bytes!("../../../assets/moon.spv"); - let spvasm = actual.disassemble(&SpirvBinary::from(spv.as_ref())).unwrap(); - println!("{}", spvasm); - let expect = r#"; SPIR-V -; Version: 1.0 -; Generator: e0000 -; Bound: 97 -; Schema: 0 -OpCapability Shader -OpCapability RuntimeDescriptorArray -OpExtension "SPV_EXT_descriptor_indexing" -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %PSMain "PSMain" %in_var_POSITION0 %in_var_TEXCOORD0 %in_var_NORMAL0 %in_var_TEXCOORD1 %out_var_SV_Target0 -OpExecutionMode %PSMain OriginUpperLeft -OpSource HLSL 660 -OpName %type_PushConstant_PushConstant "type.PushConstant.PushConstant" -OpMemberName %type_PushConstant_PushConstant 0 "combined_matrix" -OpMemberName %type_PushConstant_PushConstant 1 "camera_pos" -OpName %constant "constant" -OpName %type_2d_image "type.2d.image" -OpName %tex "tex" -OpName %type_sampler "type.sampler" -OpName %samp "samp" -OpName %type_StructuredBuffer_MaterialInfo "type.StructuredBuffer.MaterialInfo" -OpName %MaterialInfo "MaterialInfo" -OpMemberName %MaterialInfo 0 "base_color_factor" -OpMemberName %MaterialInfo 1 "emissive_factor" -OpMemberName %MaterialInfo 2 "metallic_factor" -OpMemberName %MaterialInfo 3 "roughness_factor" -OpMemberName %MaterialInfo 4 "albedo_texture" -OpMemberName %MaterialInfo 5 "normal_texture" -OpMemberName %MaterialInfo 6 "emissive_texture" -OpName %infos "infos" -OpName %in_var_POSITION0 "in.var.POSITION0" -OpName %in_var_TEXCOORD0 "in.var.TEXCOORD0" -OpName %in_var_NORMAL0 "in.var.NORMAL0" -OpName %in_var_TEXCOORD1 "in.var.TEXCOORD1" -OpName %out_var_SV_Target0 "out.var.SV_Target0" -OpName %PSMain "PSMain" -OpName %type_sampled_image "type.sampled.image" -OpDecorate %in_var_TEXCOORD1 Flat -OpDecorate %in_var_POSITION0 Location 0 -OpDecorate %in_var_TEXCOORD0 Location 1 -OpDecorate %in_var_NORMAL0 Location 2 -OpDecorate %in_var_TEXCOORD1 Location 3 -OpDecorate %out_var_SV_Target0 Location 0 -OpDecorate %tex DescriptorSet 0 -OpDecorate %tex Binding 0 -OpDecorate %samp DescriptorSet 0 -OpDecorate %samp Binding 1 -OpDecorate %infos DescriptorSet 0 -OpDecorate %infos Binding 2 -OpMemberDecorate %type_PushConstant_PushConstant 0 Offset 0 -OpMemberDecorate %type_PushConstant_PushConstant 0 MatrixStride 16 -OpMemberDecorate %type_PushConstant_PushConstant 0 RowMajor -OpMemberDecorate %type_PushConstant_PushConstant 1 Offset 64 -OpDecorate %type_PushConstant_PushConstant Block -OpMemberDecorate %MaterialInfo 0 Offset 0 -OpMemberDecorate %MaterialInfo 1 Offset 16 -OpMemberDecorate %MaterialInfo 2 Offset 28 -OpMemberDecorate %MaterialInfo 3 Offset 32 -OpMemberDecorate %MaterialInfo 4 Offset 36 -OpMemberDecorate %MaterialInfo 5 Offset 40 -OpMemberDecorate %MaterialInfo 6 Offset 44 -OpDecorate %_runtimearr_MaterialInfo ArrayStride 48 -OpMemberDecorate %type_StructuredBuffer_MaterialInfo 0 Offset 0 -OpMemberDecorate %type_StructuredBuffer_MaterialInfo 0 NonWritable -OpDecorate %type_StructuredBuffer_MaterialInfo BufferBlock -%uint = OpTypeInt 32 0 -%uint_4294967295 = OpConstant %uint 4294967295 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%float = OpTypeFloat 32 -%float_255 = OpConstant %float 255 -%v3float = OpTypeVector %float 3 -%float_1 = OpConstant %float 1 -%28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%float_0 = OpConstant %float 0 -%v4float = OpTypeVector %float 4 -%mat4v4float = OpTypeMatrix %v4float 4 -%type_PushConstant_PushConstant = OpTypeStruct %mat4v4float %v3float -%_ptr_PushConstant_type_PushConstant_PushConstant = OpTypePointer PushConstant %type_PushConstant_PushConstant -%type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown -%_runtimearr_type_2d_image = OpTypeRuntimeArray %type_2d_image -%_ptr_UniformConstant__runtimearr_type_2d_image = OpTypePointer UniformConstant %_runtimearr_type_2d_image -%type_sampler = OpTypeSampler -%_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler -%MaterialInfo = OpTypeStruct %v4float %v3float %float %float %uint %uint %uint -%_runtimearr_MaterialInfo = OpTypeRuntimeArray %MaterialInfo -%type_StructuredBuffer_MaterialInfo = OpTypeStruct %_runtimearr_MaterialInfo -%_ptr_Uniform_type_StructuredBuffer_MaterialInfo = OpTypePointer Uniform %type_StructuredBuffer_MaterialInfo -%_ptr_Input_v3float = OpTypePointer Input %v3float -%v2float = OpTypeVector %float 2 -%_ptr_Input_v2float = OpTypePointer Input %v2float -%_ptr_Input_uint = OpTypePointer Input %uint -%_ptr_Output_v4float = OpTypePointer Output %v4float -%void = OpTypeVoid -%43 = OpTypeFunction %void -%mat3v3float = OpTypeMatrix %v3float 3 -%_ptr_Uniform_MaterialInfo = OpTypePointer Uniform %MaterialInfo -%_ptr_PushConstant_v3float = OpTypePointer PushConstant %v3float -%_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image -%type_sampled_image = OpTypeSampledImage %type_2d_image -%bool = OpTypeBool -%constant = OpVariable %_ptr_PushConstant_type_PushConstant_PushConstant PushConstant -%tex = OpVariable %_ptr_UniformConstant__runtimearr_type_2d_image UniformConstant -%samp = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant -%infos = OpVariable %_ptr_Uniform_type_StructuredBuffer_MaterialInfo Uniform -%in_var_POSITION0 = OpVariable %_ptr_Input_v3float Input -%in_var_TEXCOORD0 = OpVariable %_ptr_Input_v2float Input -%in_var_NORMAL0 = OpVariable %_ptr_Input_v3float Input -%in_var_TEXCOORD1 = OpVariable %_ptr_Input_uint Input -%out_var_SV_Target0 = OpVariable %_ptr_Output_v4float Output -%float_0_00787401572 = OpConstant %float 0.00787401572 -%50 = OpConstantComposite %v3float %float_0_00787401572 %float_0_00787401572 %float_0_00787401572 -%float_n1_00787401 = OpConstant %float -1.00787401 -%52 = OpConstantComposite %v3float %float_n1_00787401 %float_n1_00787401 %float_n1_00787401 -%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%uint_0 = OpConstant %uint 0 -%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float -%uint_1 = OpConstant %uint 1 -%_ptr_Uniform_uint = OpTypePointer Uniform %uint -%uint_4 = OpConstant %uint 4 -%uint_5 = OpConstant %uint 5 -%uint_6 = OpConstant %uint 6 -%PSMain = OpFunction %void None %43 -%61 = OpLabel -%62 = OpLoad %v3float %in_var_POSITION0 -%63 = OpLoad %v2float %in_var_TEXCOORD0 -%64 = OpLoad %v3float %in_var_NORMAL0 -%65 = OpLoad %uint %in_var_TEXCOORD1 -%66 = OpAccessChain %_ptr_Uniform_MaterialInfo %infos %int_0 %65 -%67 = OpAccessChain %_ptr_Uniform_v4float %66 %uint_0 -%68 = OpLoad %v4float %67 -%69 = OpAccessChain %_ptr_Uniform_v3float %66 %uint_1 -%70 = OpLoad %v3float %69 -%71 = OpAccessChain %_ptr_Uniform_uint %66 %uint_4 -%72 = OpLoad %uint %71 -%73 = OpAccessChain %_ptr_Uniform_uint %66 %uint_5 -%74 = OpLoad %uint %73 -%75 = OpAccessChain %_ptr_Uniform_uint %66 %uint_6 -%76 = OpLoad %uint %75 -%77 = OpExtInst %v3float %1 Normalize %64 -%78 = OpAccessChain %_ptr_PushConstant_v3float %constant %int_1 -%79 = OpLoad %v3float %78 -%80 = OpFSub %v3float %79 %62 -%81 = OpAccessChain %_ptr_UniformConstant_type_2d_image %tex %74 -%82 = OpLoad %type_2d_image %81 -%83 = OpLoad %type_sampler %samp -%84 = OpSampledImage %type_sampled_image %82 %83 -%85 = OpImageSampleImplicitLod %v4float %84 %63 None -%86 = OpVectorShuffle %v3float %85 %85 0 1 2 -%87 = OpVectorTimesScalar %v3float %86 %float_255 -%88 = OpExtInst %v3float %1 Fma %87 %50 %52 -%89 = OpAccessChain %_ptr_UniformConstant_type_2d_image %tex %72 -%90 = OpLoad %type_2d_image %89 -%91 = OpSampledImage %type_sampled_image %90 %83 -%92 = OpImageSampleImplicitLod %v4float %91 %63 None -%93 = OpVectorShuffle %v3float %92 %92 0 1 2 -%94 = OpAccessChain %_ptr_UniformConstant_type_2d_image %tex %76 -%95 = OpLoad %type_2d_image %94 -%96 = OpSampledImage %type_sampled_image %95 %83 -%97 = OpImageSampleImplicitLod %v4float %96 %63 None -%98 = OpVectorShuffle %v3float %97 %97 0 1 2 -%99 = OpFNegate %v3float %80 -%100 = OpDPdx %v3float %99 -%101 = OpDPdy %v3float %99 -%102 = OpDPdx %v2float %63 -%103 = OpDPdy %v2float %63 -%104 = OpExtInst %v3float %1 Cross %101 %77 -%105 = OpExtInst %v3float %1 Cross %77 %100 -%106 = OpCompositeExtract %float %102 0 -%107 = OpVectorTimesScalar %v3float %104 %106 -%108 = OpCompositeExtract %float %103 0 -%109 = OpVectorTimesScalar %v3float %105 %108 -%110 = OpFAdd %v3float %107 %109 -%111 = OpCompositeExtract %float %102 1 -%112 = OpVectorTimesScalar %v3float %104 %111 -%113 = OpCompositeExtract %float %103 1 -%114 = OpVectorTimesScalar %v3float %105 %113 -%115 = OpFAdd %v3float %112 %114 -%116 = OpDot %float %110 %110 -%117 = OpDot %float %115 %115 -%118 = OpExtInst %float %1 NMax %116 %117 -%119 = OpExtInst %float %1 Sqrt %118 -%120 = OpFDiv %float %float_1 %119 -%121 = OpVectorTimesScalar %v3float %110 %120 -%122 = OpVectorTimesScalar %v3float %115 %120 -%123 = OpCompositeConstruct %mat3v3float %121 %122 %77 -%124 = OpTranspose %mat3v3float %123 -%125 = OpINotEqual %bool %74 %uint_4294967295 -OpSelectionMerge %126 None -OpBranchConditional %125 %127 %126 -%127 = OpLabel -%128 = OpVectorTimesMatrix %v3float %88 %124 -%129 = OpExtInst %v3float %1 Normalize %128 -OpBranch %126 -%126 = OpLabel -%130 = OpPhi %v3float %77 %61 %129 %127 -%131 = OpExtInst %v3float %1 Normalize %28 -%132 = OpDot %float %130 %131 -%133 = OpExtInst %float %1 NMax %132 %float_0 -%134 = OpVectorShuffle %v3float %68 %68 0 1 2 -%135 = OpINotEqual %bool %72 %uint_4294967295 -OpSelectionMerge %136 None -OpBranchConditional %135 %137 %136 -%137 = OpLabel -%138 = OpFMul %v3float %134 %93 -OpBranch %136 -%136 = OpLabel -%139 = OpPhi %v3float %134 %126 %138 %137 -%140 = OpINotEqual %bool %76 %uint_4294967295 -OpSelectionMerge %141 None -OpBranchConditional %140 %142 %141 -%142 = OpLabel -%143 = OpFMul %v3float %70 %98 -OpBranch %141 -%141 = OpLabel -%144 = OpPhi %v3float %70 %136 %143 %142 -%145 = OpVectorTimesScalar %v3float %139 %133 -%146 = OpFAdd %v3float %145 %144 -%147 = OpCompositeExtract %float %146 0 -%148 = OpCompositeExtract %float %146 1 -%149 = OpCompositeExtract %float %146 2 -%150 = OpCompositeConstruct %v4float %147 %148 %149 %float_1 -OpStore %out_var_SV_Target0 %150 -OpReturn -OpFunctionEnd"#; + let spv = include_bytes!("../../../assets/gallery.frag.spv"); + let spvasm = actual + .name_ids(true) + .name_type_ids(true) + .name_const_ids(true) + .disassemble(&SpirvBinary::from(spv.as_ref())).unwrap(); + let expect = include_str!("../../../assets/gallery.frag.spvasm") + .lines() + .map(|x| x.trim()) + .collect::>() + .join("\n"); assert_eq!(expect, spvasm); } diff --git a/spirq/src/reflect.rs b/spirq/src/reflect.rs index b05eeea..93842fb 100644 --- a/spirq/src/reflect.rs +++ b/spirq/src/reflect.rs @@ -13,7 +13,7 @@ use crate::{ error::{anyhow, Error, Result}, evaluator::Evaluator, func::{ExecutionMode, Function, FunctionRegistry}, - inspect::{Inspector, self}, + inspect::Inspector, instr::*, parse::Instr, reflect_cfg::ReflectConfig, @@ -142,7 +142,6 @@ fn is_atomic_store_op(op: Op) -> bool { /// SPIR-V reflection intermediate. pub struct ReflectIntermediate<'a> { pub cfg: &'a ReflectConfig, - pub instrs: Instrs<'a>, pub name_reg: NameRegistry<'a>, pub deco_reg: DecorationRegistry<'a>, pub ty_reg: TypeRegistry, @@ -155,7 +154,6 @@ impl<'a> ReflectIntermediate<'a> { pub fn new(cfg: &'a ReflectConfig) -> Result { let out = ReflectIntermediate { cfg, - instrs: cfg.spv.instrs()?, name_reg: Default::default(), deco_reg: Default::default(), ty_reg: Default::default(), @@ -275,6 +273,7 @@ impl<'a> ReflectIntermediate<'a> { let sampled_image_ty = SampledImageType { scalar_ty: image_ty.scalar_ty.clone(), dim: image_ty.dim, + is_depth: image_ty.is_depth, is_array: image_ty.is_array, is_multisampled: image_ty.is_multisampled, }; @@ -673,10 +672,11 @@ impl Inspector for FunctionInspector { pub fn reflect<'a, I: Inspector>( itm: &mut ReflectIntermediate<'a>, + instrs: &mut Instrs<'a>, mut inspector: I, ) -> Result> { - itm.parse_global_declrs()?; - itm.parse_functions(&mut inspector)?; + itm.parse_global_declrs(instrs)?; + itm.parse_functions(instrs, &mut inspector)?; itm.collect_entry_points() } @@ -717,6 +717,7 @@ fn make_desc_var( let sampled_image_ty = SampledImageType { dim: image_ty.dim, scalar_ty: image_ty.scalar_ty.clone(), + is_depth: image_ty.is_depth, is_array: image_ty.is_array, is_multisampled: image_ty.is_multisampled, }; @@ -841,236 +842,42 @@ fn make_var<'a>( } } impl<'a> ReflectIntermediate<'a> { - fn collect_vars_impl(&self) -> BTreeMap { - // `BTreeMap` to ensure a stable order. - let mut vars = BTreeMap::new(); - for (var_id, var_alloc) in self.var_reg.iter() { - let name = self - .name_reg - .get(*var_id) - .map(ToOwned::to_owned) - .or_else(|| { - if self.cfg.gen_unique_names { - Some(format!("var_{}", var_id)) - } else { - None - } - }); - if let Some(var) = make_var(&self.deco_reg, name, *var_id, var_alloc) { - vars.insert(*var_id, var); - } - } - vars - } - fn collect_vars(&self) -> Vec { - self.collect_vars_impl() - .into_iter() - .map(|(_, var)| var) - .collect() - } - - fn collect_entry_point_vars(&self, func_id: FunctionId) -> Vec { - let accessed_var_ids = self - .func_reg - .collect_fn_vars(func_id) - .into_iter() - .collect::>(); - let vars = self - .collect_vars_impl() - .into_iter() - .filter_map(|(var_id, var)| { - if accessed_var_ids.contains(&var_id) { - Some(var) - } else { - None - } - }) - .collect::>(); - vars - } - fn collect_entry_point_specs(&self) -> Result> { - // TODO: (penguinlion) Report only specialization constants that have - // been refered to by the specified function. (Do we actually need this? - // It might not be an optimization in mind of engineering.) - let mut vars = Vec::new(); - for constant in self.interp.constants() { - if let Some(spec_id) = constant.spec_id { - let var = Variable::SpecConstant { - name: constant.name.clone(), - spec_id, - ty: constant.ty.clone(), - }; - vars.push(var); - } - } - Ok(vars) - } - fn collect_exec_modes( - &self, - func_id: FunctionId, - exec_mode_declrs: &[ExecutionModeDeclaration], - ) -> Result> { - let mut exec_modes = Vec::with_capacity(exec_mode_declrs.len()); - - for declr in exec_mode_declrs.iter() { - if declr.func_id != func_id { - continue; - } - - let mut operands = Vec::with_capacity(declr.operands.len()); - for operand in declr.operands.iter() { - let operand = match operand { - ExecutionModeOperand::Literal(x) => { - let scalar_ty = ScalarType::u32(); - let ty = Type::Scalar(scalar_ty); - let value = ConstantValue::from(*x); - Constant::new_itm(ty, value) - } - ExecutionModeOperand::Id(x) => self.interp.get(*x)?.clone(), - }; - operands.push(operand); - } - - let exec_mode = ExecutionMode { - exec_mode: declr.exec_mode, - operands, - }; - exec_modes.push(exec_mode) - } - - Ok(exec_modes) - } -} - -/// Merge `DescriptorType::SampledImage` and `DescriptorType::Sampler` if -/// they are bound to a same binding point with a same number of bindings. -fn combine_img_samplers(vars: Vec) -> Vec { - let mut samplers = Vec::::new(); - let mut imgs = Vec::::new(); - let mut out_vars = Vec::::new(); - - for var in vars { - match &var { - Variable::Descriptor { - desc_ty: DescriptorType::Sampler(), - .. - } => { - samplers.push(var.clone()); - continue; - } - Variable::Descriptor { - desc_ty: DescriptorType::SampledImage(), - .. - } => { - imgs.push(var.clone()); - continue; - } - _ => {} - } - out_vars.push(var); - } - - for sampler_var in samplers { - let mut combined_imgs = Vec::new(); - imgs = imgs - .drain(..) - .filter_map(|image_var| match (&sampler_var, &image_var) { - ( - Variable::Descriptor { - desc_bind: sampler_desc_bind, - nbind: sampler_nbind, - .. - }, - Variable::Descriptor { - desc_bind: image_desc_bind, - nbind: image_nbind, - .. - }, - ) if sampler_desc_bind == image_desc_bind && sampler_nbind == image_nbind => { - combined_imgs.push(image_var.clone()); - None - } - _ => Some(image_var), - }) - .collect(); - - if combined_imgs.is_empty() { - // If the sampler can be combined with no texture, just put it - // back. - out_vars.push(sampler_var.clone()); - } else { - // For any texture that can be combined with this sampler, - // create a new combined image sampler. - for img_var in combined_imgs { - match img_var { - Variable::Descriptor { - name, - ty: Type::SampledImage(image_ty), - desc_bind, - nbind, - .. - } => { - let sampled_image_ty = SampledImageType { - scalar_ty: image_ty.scalar_ty.clone(), - dim: image_ty.dim, - is_array: image_ty.is_array, - is_multisampled: image_ty.is_multisampled, - }; - let combined_img_sampler_ty = CombinedImageSamplerType { sampled_image_ty }; - let out_var = Variable::Descriptor { - name: name.clone(), - desc_bind: desc_bind, - desc_ty: DescriptorType::CombinedImageSampler(), - ty: Type::CombinedImageSampler(combined_img_sampler_ty.clone()), - nbind: nbind, - }; - out_vars.push(out_var); - } - _ => unreachable!(), - } - } - } - } - - out_vars.extend(imgs); - - out_vars -} - -impl<'a> ReflectIntermediate<'a> { - pub fn parse_global_declrs(&mut self) -> Result<()> { + pub fn parse_global_declrs( + &mut self, + instrs: &mut Instrs<'a>, + ) -> Result<()> { // Don't change the order. See _2.4 Logical Layout of a Module_ of the // SPIR-V specification for more information. - + // 1. All OpCapability instructions. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::Capability { - self.instrs.next()?; + instrs.next()?; } else { break; } } // 2. Optional OpExtension instructions (extensions to SPIR-V). - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::Extension { - self.instrs.next()?; + instrs.next()?; } else { break; } } // 3. Optional OpExtInstImport instructions. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::ExtInstImport { let op = OpExtInstImport::try_from(instr)?; self.interp .import_ext_instr_set(op.instr_set_id, op.name.to_owned())?; - self.instrs.next()?; + instrs.next()?; } else { break; } } // 4. The single required OpMemoryModel instruction. - if let Some(instr) = self.instrs.peek() { + if let Some(instr) = instrs.peek() { if instr.op() == Op::MemoryModel { let op = OpMemoryModel::try_from(instr)?; match op.addr_model { @@ -1083,7 +890,7 @@ impl<'a> ReflectIntermediate<'a> { spirv::MemoryModel::Vulkan => {} _ => return Err(anyhow!("unsupported memory model")), } - self.instrs.next()?; + instrs.next()?; } else { return Err(anyhow!("expected OpMemoryModel, but got {:?}", instr.op())); } @@ -1091,7 +898,7 @@ impl<'a> ReflectIntermediate<'a> { return Err(anyhow!("expected OpMemoryModel, but got nothing")); } // 5. All entry point declarations, using OpEntryPoint. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { if instr.op() == Op::EntryPoint { let op = OpEntryPoint::try_from(instr)?; let entry_point_declr = EntryPointDeclaration { @@ -1106,14 +913,14 @@ impl<'a> ReflectIntermediate<'a> { e.insert(entry_point_declr); } } - self.instrs.next()?; + instrs.next()?; } else { break; } } // 6. All execution-mode declarations, using OpExecutionMode or // OpExecutionModeId. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { let op = instr.op(); match op { Op::ExecutionMode | Op::ExecutionModeId => { @@ -1123,7 +930,7 @@ impl<'a> ReflectIntermediate<'a> { Op::ExecutionModeId => |x: &u32| ExecutionModeOperand::Id(*x), _ => unreachable!(), }; - + let func_id = operands.read_u32()?; let exec_mode = operands.read_enum::()?; let operands = operands @@ -1141,7 +948,7 @@ impl<'a> ReflectIntermediate<'a> { .ok_or(anyhow!("execution mode for non-existing entry point"))? .exec_modes .push(exec_mode_declr); - self.instrs.next()?; + instrs.next()?; } _ => break, } @@ -1152,14 +959,14 @@ impl<'a> ReflectIntermediate<'a> { // OpSourceContinued, without forward references. // b. All OpName and all OpMemberName. // c. All OpModuleProcessed instructions. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { match instr.op() { Op::String | Op::SourceExtension | Op::Source | Op::SourceContinued | Op::ModuleProcessed => { - self.instrs.next()?; + instrs.next()?; } Op::Name => { let op = OpName::try_from(instr)?; @@ -1167,7 +974,7 @@ impl<'a> ReflectIntermediate<'a> { // Ignore empty names. self.name_reg.set(op.target_id, op.name); } - self.instrs.next()?; + instrs.next()?; } Op::MemberName => { let op = OpMemberName::try_from(instr)?; @@ -1175,27 +982,27 @@ impl<'a> ReflectIntermediate<'a> { self.name_reg .set_member(op.target_id, op.member_idx, op.name); } - self.instrs.next()?; + instrs.next()?; } _ => break, } } // 8. All annotation instructions: // a. All decoration instructions. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { match instr.op() { Op::Decorate => { let op = OpDecorate::try_from(instr)?; let deco = op.deco; self.deco_reg.set(op.target_id, deco, op.params)?; - self.instrs.next()?; + instrs.next()?; } Op::MemberDecorate => { let op = OpMemberDecorate::try_from(instr)?; let deco = op.deco; self.deco_reg .set_member(op.target_id, op.member_idx, deco, op.params)?; - self.instrs.next()?; + instrs.next()?; } Op::DecorationGroup | Op::GroupDecorate @@ -1203,7 +1010,7 @@ impl<'a> ReflectIntermediate<'a> { | Op::DecorateId | Op::DecorateString | Op::MemberDecorateString => { - self.instrs.next()?; + instrs.next()?; } _ => break, }; @@ -1217,10 +1024,10 @@ impl<'a> ReflectIntermediate<'a> { // order. This section is the first section to allow use of: // a. OpLine and OpNoLine debug information. // b. Non-semantic instructions with OpExtInst. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { let opcode = instr.op(); if let Op::Line | Op::NoLine = opcode { - self.instrs.next()?; + instrs.next()?; continue; } if is_ty_op(opcode) { @@ -1232,7 +1039,7 @@ impl<'a> ReflectIntermediate<'a> { } else { break; } - self.instrs.next()?; + instrs.next()?; } Ok(()) @@ -1240,6 +1047,7 @@ impl<'a> ReflectIntermediate<'a> { pub fn parse_functions( &mut self, + instrs: &mut Instrs<'a>, inspector: &mut impl Inspector ) -> Result<()> { // 10. All function declarations ("declarations" are functions without a @@ -1257,19 +1065,217 @@ impl<'a> ReflectIntermediate<'a> { // e. ... // f. Function end, using OpFunctionEnd. - while let Some(instr) = self.instrs.peek() { + while let Some(instr) = instrs.peek() { let opcode = instr.op(); if let Op::Line | Op::NoLine = opcode { - self.instrs.next()?; + instrs.next()?; continue; } inspector.inspect(self, instr)?; - self.instrs.next()?; + instrs.next()?; } Ok(()) } + fn collect_vars_impl(&self) -> BTreeMap { + // `BTreeMap` to ensure a stable order. + let mut vars = BTreeMap::new(); + for (var_id, var_alloc) in self.var_reg.iter() { + let name = self + .name_reg + .get(*var_id) + .map(ToOwned::to_owned) + .or_else(|| { + if self.cfg.gen_unique_names { + Some(format!("var_{}", var_id)) + } else { + None + } + }); + if let Some(var) = make_var(&self.deco_reg, name, *var_id, var_alloc) { + vars.insert(*var_id, var); + } + } + vars + } + fn collect_vars(&self) -> Vec { + self.collect_vars_impl() + .into_iter() + .map(|(_, var)| var) + .collect() + } + + fn collect_entry_point_vars(&self, func_id: FunctionId) -> Vec { + let accessed_var_ids = self + .func_reg + .collect_fn_vars(func_id) + .into_iter() + .collect::>(); + let vars = self + .collect_vars_impl() + .into_iter() + .filter_map(|(var_id, var)| { + if accessed_var_ids.contains(&var_id) { + Some(var) + } else { + None + } + }) + .collect::>(); + vars + } + fn collect_entry_point_specs(&self) -> Result> { + // TODO: (penguinlion) Report only specialization constants that have + // been refered to by the specified function. (Do we actually need this? + // It might not be an optimization in mind of engineering.) + let mut vars = Vec::new(); + for constant in self.interp.constants() { + if let Some(spec_id) = constant.spec_id { + let var = Variable::SpecConstant { + name: constant.name.clone(), + spec_id, + ty: constant.ty.clone(), + }; + vars.push(var); + } + } + Ok(vars) + } + fn collect_exec_modes( + &self, + func_id: FunctionId, + exec_mode_declrs: &[ExecutionModeDeclaration], + ) -> Result> { + let mut exec_modes = Vec::with_capacity(exec_mode_declrs.len()); + + for declr in exec_mode_declrs.iter() { + if declr.func_id != func_id { + continue; + } + + let mut operands = Vec::with_capacity(declr.operands.len()); + for operand in declr.operands.iter() { + let operand = match operand { + ExecutionModeOperand::Literal(x) => { + let scalar_ty = ScalarType::u32(); + let ty = Type::Scalar(scalar_ty); + let value = ConstantValue::from(*x); + Constant::new_itm(ty, value) + } + ExecutionModeOperand::Id(x) => self.interp.get(*x)?.clone(), + }; + operands.push(operand); + } + + let exec_mode = ExecutionMode { + exec_mode: declr.exec_mode, + operands, + }; + exec_modes.push(exec_mode) + } + + Ok(exec_modes) + } +} + +/// Merge `DescriptorType::SampledImage` and `DescriptorType::Sampler` if +/// they are bound to a same binding point with a same number of bindings. +fn combine_img_samplers(vars: Vec) -> Vec { + let mut samplers = Vec::::new(); + let mut imgs = Vec::::new(); + let mut out_vars = Vec::::new(); + + for var in vars { + match &var { + Variable::Descriptor { + desc_ty: DescriptorType::Sampler(), + .. + } => { + samplers.push(var.clone()); + continue; + } + Variable::Descriptor { + desc_ty: DescriptorType::SampledImage(), + .. + } => { + imgs.push(var.clone()); + continue; + } + _ => {} + } + out_vars.push(var); + } + + for sampler_var in samplers { + let mut combined_imgs = Vec::new(); + imgs = imgs + .drain(..) + .filter_map(|image_var| match (&sampler_var, &image_var) { + ( + Variable::Descriptor { + desc_bind: sampler_desc_bind, + nbind: sampler_nbind, + .. + }, + Variable::Descriptor { + desc_bind: image_desc_bind, + nbind: image_nbind, + .. + }, + ) if sampler_desc_bind == image_desc_bind && sampler_nbind == image_nbind => { + combined_imgs.push(image_var.clone()); + None + } + _ => Some(image_var), + }) + .collect(); + + if combined_imgs.is_empty() { + // If the sampler can be combined with no texture, just put it + // back. + out_vars.push(sampler_var.clone()); + } else { + // For any texture that can be combined with this sampler, + // create a new combined image sampler. + for img_var in combined_imgs { + match img_var { + Variable::Descriptor { + name, + ty: Type::SampledImage(image_ty), + desc_bind, + nbind, + .. + } => { + let sampled_image_ty = SampledImageType { + scalar_ty: image_ty.scalar_ty.clone(), + dim: image_ty.dim, + is_depth: image_ty.is_depth, + is_array: image_ty.is_array, + is_multisampled: image_ty.is_multisampled, + }; + let combined_img_sampler_ty = CombinedImageSamplerType { sampled_image_ty }; + let out_var = Variable::Descriptor { + name: name.clone(), + desc_bind: desc_bind, + desc_ty: DescriptorType::CombinedImageSampler(), + ty: Type::CombinedImageSampler(combined_img_sampler_ty.clone()), + nbind: nbind, + }; + out_vars.push(out_var); + } + _ => unreachable!(), + } + } + } + } + + out_vars.extend(imgs); + + out_vars +} + +impl<'a> ReflectIntermediate<'a> { pub fn collect_entry_points( &self, ) -> Result> { diff --git a/spirq/src/reflect_cfg.rs b/spirq/src/reflect_cfg.rs index 10b4bd3..37e851f 100644 --- a/spirq/src/reflect_cfg.rs +++ b/spirq/src/reflect_cfg.rs @@ -13,7 +13,7 @@ use crate::{ /// Reflection configuration builder. #[derive(Default, Clone)] pub struct ReflectConfig { - pub(crate) spv: SpirvBinary, + pub(crate) spv: Option, pub(crate) ref_all_rscs: bool, pub(crate) combine_img_samplers: bool, pub(crate) gen_unique_names: bool, @@ -26,7 +26,7 @@ impl ReflectConfig { /// SPIR-V binary to be reflected. pub fn spv>(&mut self, x: Spv) -> &mut Self { - self.spv = x.into(); + self.spv = Some(x.into()); self } /// Reference all defined resources even the resource is not used by an @@ -61,22 +61,24 @@ impl ReflectConfig { } /// Reflect the SPIR-V binary and extract all entry points. - pub fn reflect(&self) -> Result> { + pub fn reflect(&mut self) -> Result> { + let spv = self.spv.take().unwrap_or_default(); let mut itm = ReflectIntermediate::new(self)?; let inspector = FunctionInspector::new(); - reflect(&mut itm, inspector) + reflect(&mut itm, &mut spv.instrs()?, inspector) } /// Reflect the SPIR-V binary and extract all entry points with an inspector /// for customized reflection subroutines. - pub fn reflect_inspect(&self, inspector: &mut I) -> Result> { + pub fn reflect_inspect(&mut self, inspector: &mut I) -> Result> { + let spv = self.spv.take().unwrap_or_default(); let mut itm = ReflectIntermediate::new(self)?; let mut func_inspector = FunctionInspector::new(); - reflect(&mut itm, func_inspector.chain(inspector)) + reflect(&mut itm, &mut spv.instrs()?, func_inspector.chain(inspector)) } /// Reflect the SPIR-V binary and extract all entry points with an inspector /// function for customized reflection subroutines. pub fn reflect_inspect_by, &Instr)>( - &self, + &mut self, inspector: F, ) -> Result> { let mut inspector = FnInspector::(inspector); diff --git a/x.comp b/x.comp deleted file mode 100644 index bb24944..0000000 --- a/x.comp +++ /dev/null @@ -1,5 +0,0 @@ -#version 460 - -void main() { - double a = 1.4e32; -} From a2080946911f74018b8b816e4be828f514302475 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 20:22:06 +0800 Subject: [PATCH 18/50] Align with spirv-dis output --- spirq-spvasm/scripts/generate_op_to_str.py | 12 +++++-- spirq-spvasm/src/dis/disassembler.rs | 12 +++++-- spirq-spvasm/src/generated/op_to_str.rs | 41 ---------------------- 3 files changed, 20 insertions(+), 45 deletions(-) diff --git a/spirq-spvasm/scripts/generate_op_to_str.py b/spirq-spvasm/scripts/generate_op_to_str.py index 4a55770..6aa45e0 100644 --- a/spirq-spvasm/scripts/generate_op_to_str.py +++ b/spirq-spvasm/scripts/generate_op_to_str.py @@ -8,8 +8,16 @@ opname = instr["opname"] opcode = instr["opcode"] - assert opname not in name2op - name2op[opname] = opcode + # Third party extension names should be suppressed so that they don't show + # up when disassembling. + is_khr_op = ("extensions" not in instr) or ( + opname.endswith("KHR") or opname.endswith("EXT") + ) + is_official_ext = ("extensions" not in instr) or any( + x.startswith("SPV_KHR") or x.startswith("SPV_EXT") for x in instr["extensions"] + ) + if is_khr_op and is_official_ext: + name2op[opname] = opcode out = [] diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index a88bc6d..5bfd9cb 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -121,8 +121,16 @@ impl Disassembler { let major_version = header.version >> 16; let minor_version = (header.version >> 8) & 0xff; out.push(format!("; Version: {}.{}", major_version, minor_version)); - out.push(format!("; Generator: {:x}", header.generator)); - out.push(format!("; Bound: {:x}", header.bound)); + // FIXME: (penguinliong) This is a hack to match the spirv-dis + // output. + let generator = header.generator >> 16; + let generator_version = header.generator & 0xffff; + if generator == 8 { + out.push(format!("; Generator: Khronos Glslang Reference Front End; {}", generator_version)); + } else { + out.push(format!("; Generator: {}; {}", generator, generator_version)); + } + out.push(format!("; Bound: {}", header.bound)); out.push(format!("; Schema: {:x}", header.schema)); } } diff --git a/spirq-spvasm/src/generated/op_to_str.rs b/spirq-spvasm/src/generated/op_to_str.rs index 1465f77..5f7d9b2 100644 --- a/spirq-spvasm/src/generated/op_to_str.rs +++ b/spirq-spvasm/src/generated/op_to_str.rs @@ -308,7 +308,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 329 => "OpMemoryNamedBarrier", 330 => "OpModuleProcessed", 331 => "OpExecutionModeId", - 332 => "OpDecorateId", 333 => "OpGroupNonUniformElect", 334 => "OpGroupNonUniformAll", 335 => "OpGroupNonUniformAny", @@ -350,7 +349,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 4160 => "OpColorAttachmentReadEXT", 4161 => "OpDepthAttachmentReadEXT", 4162 => "OpStencilAttachmentReadEXT", - 4416 => "OpTerminateInvocation", 4421 => "OpSubgroupBallotKHR", 4422 => "OpSubgroupFirstInvocationKHR", 4428 => "OpSubgroupAllKHR", @@ -391,16 +389,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 4481 => "OpImageBoxFilterQCOM", 4482 => "OpImageBlockMatchSSDQCOM", 4483 => "OpImageBlockMatchSADQCOM", - 5000 => "OpGroupIAddNonUniformAMD", - 5001 => "OpGroupFAddNonUniformAMD", - 5002 => "OpGroupFMinNonUniformAMD", - 5003 => "OpGroupUMinNonUniformAMD", - 5004 => "OpGroupSMinNonUniformAMD", - 5005 => "OpGroupFMaxNonUniformAMD", - 5006 => "OpGroupUMaxNonUniformAMD", - 5007 => "OpGroupSMaxNonUniformAMD", - 5011 => "OpFragmentMaskFetchAMD", - 5012 => "OpFragmentFetchAMD", 5056 => "OpReadClockKHR", 5075 => "OpFinalizeNodePayloadsAMDX", 5078 => "OpFinishWritingNodePayloadAMDX", @@ -438,29 +426,13 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 5279 => "OpReorderThreadWithHitObjectNV", 5280 => "OpReorderThreadWithHintNV", 5281 => "OpTypeHitObjectNV", - 5283 => "OpImageSampleFootprintNV", 5294 => "OpEmitMeshTasksEXT", 5295 => "OpSetMeshOutputsEXT", - 5296 => "OpGroupNonUniformPartitionNV", - 5299 => "OpWritePackedPrimitiveIndices4x8NV", 5300 => "OpFetchMicroTriangleVertexPositionNV", 5301 => "OpFetchMicroTriangleVertexBarycentricNV", - 5334 => "OpReportIntersectionNV", 5334 => "OpReportIntersectionKHR", - 5335 => "OpIgnoreIntersectionNV", - 5336 => "OpTerminateRayNV", - 5337 => "OpTraceNV", - 5338 => "OpTraceMotionNV", - 5339 => "OpTraceRayMotionNV", 5340 => "OpRayQueryGetIntersectionTriangleVertexPositionsKHR", - 5341 => "OpTypeAccelerationStructureNV", 5341 => "OpTypeAccelerationStructureKHR", - 5344 => "OpExecuteCallableNV", - 5358 => "OpTypeCooperativeMatrixNV", - 5359 => "OpCooperativeMatrixLoadNV", - 5360 => "OpCooperativeMatrixStoreNV", - 5361 => "OpCooperativeMatrixMulAddNV", - 5362 => "OpCooperativeMatrixLengthNV", 5364 => "OpBeginInvocationInterlockEXT", 5365 => "OpEndInvocationInterlockEXT", 5380 => "OpDemoteToHelperInvocation", @@ -497,8 +469,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 5596 => "OpUSubSatINTEL", 5597 => "OpIMul32x16INTEL", 5598 => "OpUMul32x16INTEL", - 5600 => "OpConstantFunctionPointerINTEL", - 5601 => "OpFunctionPointerCallINTEL", 5609 => "OpAsmTargetINTEL", 5610 => "OpAsmINTEL", 5611 => "OpAsmCallINTEL", @@ -506,10 +476,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 5615 => "OpAtomicFMaxEXT", 5630 => "OpAssumeTrueKHR", 5631 => "OpExpectKHR", - 5632 => "OpDecorateString", - 5632 => "OpDecorateStringGOOGLE", - 5633 => "OpMemberDecorateString", - 5633 => "OpMemberDecorateStringGOOGLE", 5699 => "OpVmeImageINTEL", 5700 => "OpTypeVmeImageINTEL", 5701 => "OpTypeAvcImePayloadINTEL", @@ -672,10 +638,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 5880 => "OpArbitraryFloatPowINTEL", 5881 => "OpArbitraryFloatPowRINTEL", 5882 => "OpArbitraryFloatPowNINTEL", - 5887 => "OpLoopControlINTEL", - 5911 => "OpAliasDomainDeclINTEL", - 5912 => "OpAliasScopeDeclINTEL", - 5913 => "OpAliasScopeListDeclINTEL", 5923 => "OpFixedSqrtINTEL", 5924 => "OpFixedRecipINTEL", 5925 => "OpFixedRsqrtINTEL", @@ -689,9 +651,6 @@ pub fn op_to_str(opcode: u32) -> Result<&'static str> { 5933 => "OpFixedExpINTEL", 5934 => "OpPtrCastToCrossWorkgroupINTEL", 5938 => "OpCrossWorkgroupCastToPtrINTEL", - 5946 => "OpReadPipeBlockingINTEL", - 5947 => "OpWritePipeBlockingINTEL", - 5949 => "OpFPGARegINTEL", 6016 => "OpRayQueryGetRayTMinKHR", 6017 => "OpRayQueryGetRayFlagsKHR", 6018 => "OpRayQueryGetIntersectionTKHR", From e88309985a0155d69b43bf7c4776c94843c781f6 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 21:04:47 +0800 Subject: [PATCH 19/50] Simple roundtrip --- spirq-core/src/parse/bin.rs | 33 ++++++++++++- spirq-core/src/parse/instr.rs | 5 ++ spirq-spvasm/src/asm/assembler.rs | 73 +++++++++++++++++++++------- spirq-spvasm/src/dis/auto_name.rs | 4 +- spirq-spvasm/src/dis/disassembler.rs | 8 +-- spirq-spvasm/src/lib.rs | 2 + spirq-spvasm/src/test.rs | 33 +++++++++++++ 7 files changed, 134 insertions(+), 24 deletions(-) create mode 100644 spirq-spvasm/src/test.rs diff --git a/spirq-core/src/parse/bin.rs b/spirq-core/src/parse/bin.rs index f586f78..8987da9 100644 --- a/spirq-core/src/parse/bin.rs +++ b/spirq-core/src/parse/bin.rs @@ -1,8 +1,10 @@ use anyhow::Result; +use spirv::{MAJOR_VERSION, MINOR_VERSION}; use std::{convert::TryInto, iter::FromIterator}; -use super::Instrs; +use super::{Instrs, Instruction}; +#[derive(Debug, Clone)] pub struct SpirvHeader { pub magic: u32, pub version: u32, @@ -10,6 +12,35 @@ pub struct SpirvHeader { pub bound: u32, pub schema: u32, } +impl Default for SpirvHeader { + fn default() -> Self { + SpirvHeader { + magic: 0x07230203, + version: ((MAJOR_VERSION as u32) << 16) | ((MINOR_VERSION as u32) << 8), + generator: 0, + bound: 0, + schema: 0, + } + } +} +impl SpirvHeader { + pub fn new(version: u32, generator: u32) -> Self { + SpirvHeader { + version, + generator, + ..Default::default() + } + } + pub fn words(&self) -> [u32; 5] { + [ + self.magic, + self.version, + self.generator, + self.bound, + self.schema, + ] + } +} /// SPIR-V program binary. #[derive(Debug, Default, Clone)] diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 81ba6d0..6633d60 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -126,6 +126,11 @@ impl From<&[u32]> for Instruction { Instruction::from(x.to_owned()) } } +impl AsRef<[u32]> for Instruction { + fn as_ref(&self) -> &[u32] { + &self.inner + } +} impl Borrow for Instruction { fn borrow(&self) -> &Instr { Instr::new(self.inner.as_ref()).unwrap() diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index 1edbf0e..2334ce5 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -1,22 +1,25 @@ use std::collections::{HashMap, HashSet}; -use anyhow::{anyhow, bail, Result}; +use anyhow::{anyhow, bail, Result, Ok}; use num_traits::FromPrimitive; -use spirq_core::{spirv::Op, parse::InstructionBuilder}; +use spirq_core::{spirv::Op, parse::{InstructionBuilder, bin::SpirvHeader, SpirvBinary}}; use super::tokenizer::{Token, Tokenizer, Lit}; use crate::generated; +#[derive(Debug, Clone)] enum IdRef { Name(String), Id(u32), } +#[derive(Debug, Clone)] enum Operand { IdRef(IdRef), Literal(Lit), Ident(String), } +#[derive(Debug, Clone)] struct Instruction { result_id: Option, opcode: u32, @@ -28,12 +31,27 @@ struct TokenStream<'a> { cache: Option, } impl<'a> TokenStream<'a> { + fn new(tokenizer: Tokenizer<'a>) -> Result { + let mut out = Self { + tokenizer, + cache: None, + }; + out.load_next()?; + Ok(out) + } + + fn load_next(&mut self) -> Result<()> { + self.cache = self.tokenizer.next().transpose()?; + Ok(()) + } + fn peek(&mut self) -> Option<&Token> { self.cache.as_ref() } fn next(&mut self) -> Result> { - self.cache = self.tokenizer.next().transpose()?; - self.tokenizer.next().transpose() + let last_cache = self.cache.take(); + self.load_next()?; + Ok(last_cache) } } @@ -122,10 +140,15 @@ impl Assembler { let opcode = self.parse_opcode(s)?; let mut operands = Vec::new(); - while let Some(token) = s.next()? { + while let Some(token) = s.peek() { match token { - Token::Comment(_) => {}, - Token::NewLine => break, + Token::Comment(_) => { + s.next()?; + }, + Token::NewLine => { + s.next()?; + break; + }, _ => { let operand = self.parse_operand(s)?; operands.push(operand); @@ -144,8 +167,12 @@ impl Assembler { fn parse_instr(&self, s: &mut TokenStream) -> Result> { while let Some(token) = s.peek() { match token { - Token::Comment(_) => {} - Token::NewLine => {}, + Token::Comment(_) => { + s.next()?; + } + Token::NewLine => { + s.next()?; + }, Token::Ident(_) => { let instr = self.parse_instr_without_result_id(s)?; return Ok(Some(instr)); @@ -172,10 +199,7 @@ impl Assembler { fn parse(&self, input: &str) -> Result> { let tokenizer = Tokenizer::new(input); - let mut s = TokenStream { - tokenizer, - cache: None, - }; + let mut s = TokenStream::new(tokenizer)?; self.parse_instrs(&mut s) } @@ -209,7 +233,7 @@ impl Assembler { Ok(out) } - pub fn assemble(&mut self, input: &str) -> Result> { + pub fn assemble(&mut self, input: &str, header: SpirvHeader) -> Result { let mut instrs = self.parse(input)?; // Transform name refs to id refs. @@ -229,7 +253,8 @@ impl Assembler { } } - let mut out = Vec::new(); + let mut buf = Vec::new(); + let mut bound = 0; for instr in instrs { let opcode = Op::from_u32(instr.opcode) .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; @@ -266,6 +291,7 @@ impl Assembler { Operand::IdRef(IdRef::Name(_)) => unreachable!(), Operand::IdRef(IdRef::Id(id)) => { builder = builder.push(*id); + bound = bound.max(*id + 1); } Operand::Literal(lit) => { match lit { @@ -292,8 +318,7 @@ impl Assembler { builder = builder.push(u); }, Lit::String(s) => { - let id = self.acquire_id(&s); - builder = builder.push(id); + builder = builder.push_str(&s); }, } } @@ -305,8 +330,20 @@ impl Assembler { } } - out.push(builder.build()); + let instr = builder.build(); + buf.extend_from_slice(instr.as_ref()); } + + let mut spv = vec![ + 0x07230203, // Magic number + header.version, // Version + header.generator, // Generator + bound, // Bound + 0, // Reserved word + ]; + spv.extend(buf); + + let out = SpirvBinary::from(spv); Ok(out) } } diff --git a/spirq-spvasm/src/dis/auto_name.rs b/spirq-spvasm/src/dis/auto_name.rs index a153953..8c28113 100644 --- a/spirq-spvasm/src/dis/auto_name.rs +++ b/spirq-spvasm/src/dis/auto_name.rs @@ -119,7 +119,9 @@ impl AutoNamer { &mut self, itm: &ReflectIntermediate, ) -> Result<()> { - for (id, ty) in itm.ty_reg.iter() { + let mut tys = itm.ty_reg.iter().collect::>(); + tys.sort_by_key(|(id, _)| *id); + for (id, ty) in tys { if let Some(name) = self.make_ty_name(ty) { self.assign_name(*id, name); self.cache.entry(ty.clone()).or_insert(*id); diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 5bfd9cb..5945e7e 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -154,21 +154,21 @@ mod test { #[test] fn test_simple() { let spv = [ - 0x07230203, 0x00010000, 0x00000008, 0x0000001, 0x00000000 + 0x07230203, 0x00010000, 0x00000000, 0x0000001, 0x00000000 ].iter().map(|x| *x as u32).collect::>(); let spv = SpirvBinary::from(spv); let out = Disassembler::new().disassemble(&spv).unwrap(); - assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0"); + assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 0; 0\n; Bound: 1\n; Schema: 0"); } #[test] fn test_nop() { let spv = [ - 0x07230203, 0x00010000, 0x00000008, 0x0000001, 0x00000000, + 0x07230203, 0x00010000, 0x00000000, 0x0000001, 0x00000000, 0x00010000 ].iter().map(|x| *x as u32).collect::>(); let spv = SpirvBinary::from(spv); let out = Disassembler::new().disassemble(&spv).unwrap(); - assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 8\n; Bound: 1\n; Schema: 0\nOpNop"); + assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 0; 0\n; Bound: 1\n; Schema: 0\nOpNop"); } } diff --git a/spirq-spvasm/src/lib.rs b/spirq-spvasm/src/lib.rs index a0616af..301097d 100644 --- a/spirq-spvasm/src/lib.rs +++ b/spirq-spvasm/src/lib.rs @@ -1,3 +1,5 @@ pub mod asm; pub mod dis; mod generated; +#[cfg(test)] +mod test; diff --git a/spirq-spvasm/src/test.rs b/spirq-spvasm/src/test.rs new file mode 100644 index 0000000..485797f --- /dev/null +++ b/spirq-spvasm/src/test.rs @@ -0,0 +1,33 @@ +use pretty_assertions::assert_eq; +use spirq_core::parse::bin::SpirvHeader; + +use crate::asm::Assembler; +use crate::dis::Disassembler; + +#[test] +fn test_asm_dis_roundtrip() { + let code = r#" +; SPIR-V +; Version: 1.5 +; Generator: 0; 0 +; Bound: 0 +; Schema: 0 +OpMemoryModel Logical GLSL450 +%void = OpTypeVoid +%void_0 = OpTypeVoid +%void_1 = OpTypeVoid +%void_2 = OpTypeVoid +%void_3 = OpTypeVoid +%void_4 = OpTypeVoid +%void_5 = OpTypeVoid +%void_6 = OpTypeVoid +%void_7 = OpTypeVoid +%void_8 = OpTypeVoid +%void_9 = OpTypeVoid +%void_10 = OpTypeVoid +"#.trim(); + let header = SpirvHeader::default(); + let spv = Assembler::new().assemble(code, header).unwrap(); + let spvasm = Disassembler::new().name_type_ids(true).disassemble(&spv.into()).unwrap(); + assert_eq!(code, spvasm); +} From 5cae0ebbd6b9131f8c3ed9571fc3d1bf7f9d35f0 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 21:07:23 +0800 Subject: [PATCH 20/50] Relax physical layout requirement --- spirq-core/src/parse/bin.rs | 2 +- spirq-spvasm/src/test.rs | 1 - spirq/src/reflect.rs | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/spirq-core/src/parse/bin.rs b/spirq-core/src/parse/bin.rs index 8987da9..ccac1a3 100644 --- a/spirq-core/src/parse/bin.rs +++ b/spirq-core/src/parse/bin.rs @@ -2,7 +2,7 @@ use anyhow::Result; use spirv::{MAJOR_VERSION, MINOR_VERSION}; use std::{convert::TryInto, iter::FromIterator}; -use super::{Instrs, Instruction}; +use super::Instrs; #[derive(Debug, Clone)] pub struct SpirvHeader { diff --git a/spirq-spvasm/src/test.rs b/spirq-spvasm/src/test.rs index 485797f..c32df3a 100644 --- a/spirq-spvasm/src/test.rs +++ b/spirq-spvasm/src/test.rs @@ -12,7 +12,6 @@ fn test_asm_dis_roundtrip() { ; Generator: 0; 0 ; Bound: 0 ; Schema: 0 -OpMemoryModel Logical GLSL450 %void = OpTypeVoid %void_0 = OpTypeVoid %void_1 = OpTypeVoid diff --git a/spirq/src/reflect.rs b/spirq/src/reflect.rs index 93842fb..913dd1c 100644 --- a/spirq/src/reflect.rs +++ b/spirq/src/reflect.rs @@ -877,6 +877,8 @@ impl<'a> ReflectIntermediate<'a> { } } // 4. The single required OpMemoryModel instruction. + // NOTE: (penguinliong): We relax the requirement here for better + // flexibility as a tool. if let Some(instr) = instrs.peek() { if instr.op() == Op::MemoryModel { let op = OpMemoryModel::try_from(instr)?; @@ -891,11 +893,7 @@ impl<'a> ReflectIntermediate<'a> { _ => return Err(anyhow!("unsupported memory model")), } instrs.next()?; - } else { - return Err(anyhow!("expected OpMemoryModel, but got {:?}", instr.op())); } - } else { - return Err(anyhow!("expected OpMemoryModel, but got nothing")); } // 5. All entry point declarations, using OpEntryPoint. while let Some(instr) = instrs.peek() { From 0a61b5c6b305dcec67b3e67839259d7181db76c8 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 21:33:15 +0800 Subject: [PATCH 21/50] Gallery roundtrip --- .../scripts/generate_operand_enum_type.py | 10 +- spirq-spvasm/src/asm/assembler.rs | 26 +- spirq-spvasm/src/asm/tokenizer.rs | 10 + .../src/generated/operand_enum_type.rs | 411 +++++++++--------- spirq-spvasm/src/test.rs | 13 + 5 files changed, 261 insertions(+), 209 deletions(-) diff --git a/spirq-spvasm/scripts/generate_operand_enum_type.py b/spirq-spvasm/scripts/generate_operand_enum_type.py index 6cc97ee..ec99a40 100644 --- a/spirq-spvasm/scripts/generate_operand_enum_type.py +++ b/spirq-spvasm/scripts/generate_operand_enum_type.py @@ -13,11 +13,14 @@ i = 0 for operand in operands: kind = operand["kind"] + if kind in ["IdResultType", "IdResult"]: + continue if ( kind.startswith("Id") or kind.startswith("Literal") or kind.startswith("Pair") ): + i += 1 continue op_operand_kinds[i] = operand["kind"] @@ -29,6 +32,11 @@ out += [ "use anyhow::{bail, Result};", "", + "", + "fn unknown_operand_index(i: usize) -> Result<&'static str> {", + ' bail!("Unknown operand index: {}", i)', + "}", + "", "pub fn operand_enum_type(opcode: u32, i: usize) -> Result<&'static str> {", " let out: &'static str = match opcode {", ] @@ -45,7 +53,7 @@ f' {i} => "{kind}",', ] out += [ - ' _ => bail!("Unknown operand index: {}", i),', + " _ => return unknown_operand_index(i),", " }", ] diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index 2334ce5..2f7c04a 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -105,7 +105,7 @@ impl Assembler { Token::Ident(ident) => { Ok(Operand::Ident(ident.clone())) } - _ => Err(anyhow!("expected operand, but {:?}", s.peek())), + _ => Err(anyhow!("expected operand, but {:?}", token)), } } @@ -118,10 +118,15 @@ impl Assembler { let opcode = self.parse_opcode(s)?; let mut operands = Vec::new(); - while let Some(token) = s.next()? { + while let Some(token) = s.peek() { match token { - Token::Comment(_) => {}, - Token::NewLine => break, + Token::Comment(_) => { + s.next()?; + }, + Token::NewLine => { + s.next()?; + break; + }, _ => { let operand = self.parse_operand(s)?; operands.push(operand); @@ -226,7 +231,6 @@ impl Assembler { IdRef::Id(id) } IdRef::Id(id) => { - self.mark_id(*id); IdRef::Id(*id) } }; @@ -236,6 +240,18 @@ impl Assembler { pub fn assemble(&mut self, input: &str, header: SpirvHeader) -> Result { let mut instrs = self.parse(input)?; + // Mark all used IDs. + for instr in &instrs { + for operand in &instr.operands { + match operand { + Operand::IdRef(IdRef::Id(id)) => { + self.mark_id(*id); + } + _ => {} + } + } + } + // Transform name refs to id refs. for instr in &mut instrs { if let Some(result_id) = &mut instr.result_id { diff --git a/spirq-spvasm/src/asm/tokenizer.rs b/spirq-spvasm/src/asm/tokenizer.rs index e60da69..e3379bd 100644 --- a/spirq-spvasm/src/asm/tokenizer.rs +++ b/spirq-spvasm/src/asm/tokenizer.rs @@ -210,6 +210,16 @@ impl<'a> Tokenizer<'a> { // Decimal. self.tokenize_numeric_literal_decimal()? }; + + // Weird special case of image `Dim`, in which there are `1D``, `2D`` + // and `3D` as identifiers. This it rather annoying. + if let Lit::Int(i) = lit { + if self.chars.peek() == Some(&'D') { + self.chars.next(); // Consume the 'D'. + return Ok(Token::Ident(format!("{}D", i))); + } + } + let lit = match lit { Lit::Int(i) => Lit::Int(i * mantissa_sign), Lit::Float(f, e) => Lit::Float(f * mantissa_sign as f64, e), diff --git a/spirq-spvasm/src/generated/operand_enum_type.rs b/spirq-spvasm/src/generated/operand_enum_type.rs index 2616401..fe1659a 100644 --- a/spirq-spvasm/src/generated/operand_enum_type.rs +++ b/spirq-spvasm/src/generated/operand_enum_type.rs @@ -1,428 +1,433 @@ use anyhow::{bail, Result}; + +fn unknown_operand_index(i: usize) -> Result<&'static str> { + bail!("Unknown operand index: {}", i) +} + pub fn operand_enum_type(opcode: u32, i: usize) -> Result<&'static str> { let out: &'static str = match opcode { 3 => match i { 0 => "SourceLanguage", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 14 => match i { 0 => "AddressingModel", 1 => "MemoryModel", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 15 => match i { 0 => "ExecutionModel", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 16 => match i { - 0 => "ExecutionMode", - _ => bail!("Unknown operand index: {}", i), + 1 => "ExecutionMode", + _ => return unknown_operand_index(i), } 17 => match i { 0 => "Capability", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 25 => match i { - 0 => "Dim", - 1 => "ImageFormat", - 2 => "AccessQualifier", - _ => bail!("Unknown operand index: {}", i), + 1 => "Dim", + 6 => "ImageFormat", + 7 => "AccessQualifier", + _ => return unknown_operand_index(i), } 32 => match i { 0 => "StorageClass", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 38 => match i { 0 => "AccessQualifier", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 39 => match i { - 0 => "StorageClass", - _ => bail!("Unknown operand index: {}", i), + 1 => "StorageClass", + _ => return unknown_operand_index(i), } 45 => match i { 0 => "SamplerAddressingMode", - 1 => "SamplerFilterMode", - _ => bail!("Unknown operand index: {}", i), + 2 => "SamplerFilterMode", + _ => return unknown_operand_index(i), } 54 => match i { 0 => "FunctionControl", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 59 => match i { 0 => "StorageClass", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 61 => match i { - 0 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 1 => "MemoryAccess", + _ => return unknown_operand_index(i), } 62 => match i { - 0 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 2 => "MemoryAccess", + _ => return unknown_operand_index(i), } 63 => match i { - 0 => "MemoryAccess", - 1 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 2 => "MemoryAccess", + 3 => "MemoryAccess", + _ => return unknown_operand_index(i), } 64 => match i { - 0 => "MemoryAccess", - 1 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 3 => "MemoryAccess", + 4 => "MemoryAccess", + _ => return unknown_operand_index(i), } 71 => match i { - 0 => "Decoration", - _ => bail!("Unknown operand index: {}", i), + 1 => "Decoration", + _ => return unknown_operand_index(i), } 72 => match i { - 0 => "Decoration", - _ => bail!("Unknown operand index: {}", i), + 2 => "Decoration", + _ => return unknown_operand_index(i), } 87 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 88 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 89 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 90 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 91 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 92 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 93 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 94 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 95 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 96 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 97 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 98 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 99 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 123 => match i { - 0 => "StorageClass", - _ => bail!("Unknown operand index: {}", i), + 1 => "StorageClass", + _ => return unknown_operand_index(i), } 246 => match i { - 0 => "LoopControl", - _ => bail!("Unknown operand index: {}", i), + 2 => "LoopControl", + _ => return unknown_operand_index(i), } 247 => match i { - 0 => "SelectionControl", - _ => bail!("Unknown operand index: {}", i), + 1 => "SelectionControl", + _ => return unknown_operand_index(i), } 264 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 265 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 266 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 267 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 268 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 269 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 270 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 271 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 305 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 306 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 307 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 308 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 309 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 310 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 311 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 312 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 313 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 314 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 315 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "ImageOperands", + _ => return unknown_operand_index(i), } 320 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 2 => "ImageOperands", + _ => return unknown_operand_index(i), } 331 => match i { - 0 => "ExecutionMode", - _ => bail!("Unknown operand index: {}", i), + 1 => "ExecutionMode", + _ => return unknown_operand_index(i), } 332 => match i { - 0 => "Decoration", - _ => bail!("Unknown operand index: {}", i), + 1 => "Decoration", + _ => return unknown_operand_index(i), } 342 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 349 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 350 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 351 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 352 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 353 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 354 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 355 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 356 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 357 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 358 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 359 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 360 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 361 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 362 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 363 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 364 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 4450 => match i { - 0 => "PackedVectorFormat", - _ => bail!("Unknown operand index: {}", i), + 2 => "PackedVectorFormat", + _ => return unknown_operand_index(i), } 4451 => match i { - 0 => "PackedVectorFormat", - _ => bail!("Unknown operand index: {}", i), + 2 => "PackedVectorFormat", + _ => return unknown_operand_index(i), } 4452 => match i { - 0 => "PackedVectorFormat", - _ => bail!("Unknown operand index: {}", i), + 2 => "PackedVectorFormat", + _ => return unknown_operand_index(i), } 4453 => match i { - 0 => "PackedVectorFormat", - _ => bail!("Unknown operand index: {}", i), + 3 => "PackedVectorFormat", + _ => return unknown_operand_index(i), } 4454 => match i { - 0 => "PackedVectorFormat", - _ => bail!("Unknown operand index: {}", i), + 3 => "PackedVectorFormat", + _ => return unknown_operand_index(i), } 4455 => match i { - 0 => "PackedVectorFormat", - _ => bail!("Unknown operand index: {}", i), + 3 => "PackedVectorFormat", + _ => return unknown_operand_index(i), } 4457 => match i { - 0 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 3 => "MemoryAccess", + _ => return unknown_operand_index(i), } 4458 => match i { - 0 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 4 => "MemoryAccess", + _ => return unknown_operand_index(i), } 4459 => match i { - 0 => "CooperativeMatrixOperands", - _ => bail!("Unknown operand index: {}", i), + 3 => "CooperativeMatrixOperands", + _ => return unknown_operand_index(i), } 5000 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5001 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5002 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5003 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5004 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5005 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5006 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5007 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 5283 => match i { - 0 => "ImageOperands", - _ => bail!("Unknown operand index: {}", i), + 4 => "ImageOperands", + _ => return unknown_operand_index(i), } 5359 => match i { - 0 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 3 => "MemoryAccess", + _ => return unknown_operand_index(i), } 5360 => match i { - 0 => "MemoryAccess", - _ => bail!("Unknown operand index: {}", i), + 4 => "MemoryAccess", + _ => return unknown_operand_index(i), } 5632 => match i { - 0 => "Decoration", - _ => bail!("Unknown operand index: {}", i), + 1 => "Decoration", + _ => return unknown_operand_index(i), } 5633 => match i { - 0 => "Decoration", - _ => bail!("Unknown operand index: {}", i), + 2 => "Decoration", + _ => return unknown_operand_index(i), } 6086 => match i { 0 => "AccessQualifier", - _ => bail!("Unknown operand index: {}", i), + _ => return unknown_operand_index(i), } 6401 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6402 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6403 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6404 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6405 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6406 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6407 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } 6408 => match i { - 0 => "GroupOperation", - _ => bail!("Unknown operand index: {}", i), + 1 => "GroupOperation", + _ => return unknown_operand_index(i), } _ => bail!("{}-th operand of opcode {} is not a enum", i, opcode), }; diff --git a/spirq-spvasm/src/test.rs b/spirq-spvasm/src/test.rs index c32df3a..f5f73fd 100644 --- a/spirq-spvasm/src/test.rs +++ b/spirq-spvasm/src/test.rs @@ -30,3 +30,16 @@ fn test_asm_dis_roundtrip() { let spvasm = Disassembler::new().name_type_ids(true).disassemble(&spv.into()).unwrap(); assert_eq!(code, spvasm); } + +#[test] +fn test_gallery_roundtrip() { + let code = include_str!("../../assets/gallery.frag.spvasm") + .lines() + .map(|x| x.trim()) + .collect::>() + .join("\n"); + let header = SpirvHeader::default(); + let spv = Assembler::new().assemble(&code, header).unwrap(); + let spvasm = Disassembler::new().name_ids(true).name_type_ids(true).name_const_ids(true).disassemble(&spv.into()).unwrap(); + assert_eq!(code, spvasm); +} From ad7a8f5e4127945cd0c02ac487a6abdb61a147d3 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 21:42:23 +0800 Subject: [PATCH 22/50] Perfect gallery roundtrip --- spirq-core/src/parse/instr.rs | 2 +- spirq-spvasm/src/asm/assembler.rs | 8 ++++++++ spirq-spvasm/src/test.rs | 13 +++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 6633d60..af2f0ba 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -164,7 +164,7 @@ impl InstructionBuilder { // FIXME: (penguinliong) Avoid unsafe code. use std::ffi::CString; let cstr = CString::new(x).unwrap(); - let bytes = cstr.as_bytes_with_nul(); + let bytes = cstr.as_bytes(); let words = bytes.len() / 4 + 1; let ptr = cstr.as_ptr() as *const u32; let slice = unsafe { std::slice::from_raw_parts(ptr, words) }; diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index 2f7c04a..f37e987 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -242,6 +242,14 @@ impl Assembler { // Mark all used IDs. for instr in &instrs { + if let Some(result_id) = &instr.result_id { + match result_id { + IdRef::Id(id) => { + self.mark_id(*id); + } + IdRef::Name(_) => {} + } + } for operand in &instr.operands { match operand { Operand::IdRef(IdRef::Id(id)) => { diff --git a/spirq-spvasm/src/test.rs b/spirq-spvasm/src/test.rs index f5f73fd..00f2b2a 100644 --- a/spirq-spvasm/src/test.rs +++ b/spirq-spvasm/src/test.rs @@ -35,11 +35,20 @@ fn test_asm_dis_roundtrip() { fn test_gallery_roundtrip() { let code = include_str!("../../assets/gallery.frag.spvasm") .lines() + // (penguinliong) For some reason our reassembled SPIR-V use less IDs + // than the GLSLang output. Workaround here. + .skip(5) .map(|x| x.trim()) .collect::>() .join("\n"); - let header = SpirvHeader::default(); + let header = SpirvHeader::new(0x00010500, 0x0008000b); let spv = Assembler::new().assemble(&code, header).unwrap(); - let spvasm = Disassembler::new().name_ids(true).name_type_ids(true).name_const_ids(true).disassemble(&spv.into()).unwrap(); + let spvasm = Disassembler::new() + .print_header(false) + .name_ids(true) + .name_type_ids(true) + .name_const_ids(true) + .disassemble(&spv.into()) + .unwrap(); assert_eq!(code, spvasm); } From 18160719558dd291e29b1eef43127a9e88d403d5 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 20 Dec 2023 23:31:00 +0800 Subject: [PATCH 23/50] More types --- Cargo.lock | 32 +++++++ assets/gallery.frag | 25 ++++++ assets/gallery.frag.spv | Bin 16568 -> 17108 bytes assets/gallery.frag.spvasm | 21 ++++- spirq-core/Cargo.toml | 1 + spirq-core/src/constant.rs | 44 +++++---- spirq-core/src/parse/instr.rs | 1 + spirq-spvasm/Cargo.toml | 1 + spirq-spvasm/src/dis/auto_name.rs | 32 +++++-- spirq-spvasm/src/dis/disassembler.rs | 128 +++++++++++++++++++++++++-- 10 files changed, 252 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59dc167..a825c6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,6 +38,12 @@ version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + [[package]] name = "clap" version = "4.1.1" @@ -84,6 +90,12 @@ dependencies = [ "cc", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "diff" version = "0.1.13" @@ -106,6 +118,17 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "half" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -182,6 +205,12 @@ version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -206,6 +235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -379,6 +409,7 @@ version = "1.0.0" dependencies = [ "anyhow", "fnv", + "half", "num-traits", "ordered-float", "spirv", @@ -397,6 +428,7 @@ name = "spirq-spvasm" version = "0.1.0" dependencies = [ "anyhow", + "half", "inline-spirv", "num-traits", "pretty_assertions", diff --git a/assets/gallery.frag b/assets/gallery.frag index a40a313..e931449 100644 --- a/assets/gallery.frag +++ b/assets/gallery.frag @@ -1,6 +1,13 @@ #version 460 core #extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_query : enable +#extension GL_EXT_shader_explicit_arithmetic_types_int8 : require +#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require +#extension GL_EXT_shader_explicit_arithmetic_types_int32 : require +#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require +#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require +#extension GL_EXT_shader_explicit_arithmetic_types_float32 : require +#extension GL_EXT_shader_explicit_arithmetic_types_float64 : require struct Data { // Signed integer scalar and vector types. @@ -194,6 +201,24 @@ layout(set=14, binding=5, input_attachment_index=5) uniform subpassInputMS fAtt // Acceleration structure (for ray-tracing). layout(set=15, binding=0) uniform accelerationStructureEXT acc; +const int8_t INT8 = int8_t(1); +const int16_t INT16 = int16_t(1); +const int32_t INT32 = int32_t(1); +// (penguinliong) int64 doesn't work atm, sorry. +//const int64_t INT64 = int64_t(1); + +const uint8_t UINT8 = uint8_t(1); +const uint16_t UINT16 = uint16_t(1); +const uint32_t UINT32 = uint32_t(1); +//const uint64_t UINT64 = uint64_t(1); + +// (penguinliong) Don't know why but SPIR-V Tools disassemble fp16 values to +// mantissa and exponent bias which is pretty much a special case I don't wanna +// work with atm. +//const float16_t FLOAT16 = float16_t(0.0); +const float32_t FLOAT32 = float32_t(1.0); +//const float64_t FLOAT64 = float64_t(1.0); + void main() { rayQueryEXT ray_query; rayQueryProceedEXT(ray_query); diff --git a/assets/gallery.frag.spv b/assets/gallery.frag.spv index 3466b9485e294ad65f92efad035bd3800a3e255e..9bbee7210c2d6938d8c5625702fa4c4bb618245a 100644 GIT binary patch delta 589 zcmdnd$atldk(ZfCnVo@^k%60mgQ0&SuQa3BL`8K*^^K0Rnd(^>cp2P%;$0&`;)^p9 zQ&NlKQ!5H`GLth);uDK9OEPj(OEQz=ODYRei{sOB@)Ju8%@|15V{C*=Pd#pn%uH}; z!m1}T59Blk67|%V0NqBarV^mjNY-Nk)WX0DbRG+k&P~kB1M@e(WtwhVFA5ZFWn=(G z4+8^`V$g>2+khMpA0*!nWC$S1gZLd#d60T;pj;=E4^rO+WP{8D0gyb1-;E^S17w5D e0|G^`0+2v2Q~^kXEl{Qp$Y)?^u%F!GU;+RHzn44! delta 39 vcmcc8%DAJEk(ZfCnVo@^k%60mgQ0aIuk=I%g^dwYm^MeStgxNDz{vyvwYdsK diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index 2842151..340218d 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -1,14 +1,16 @@ ; SPIR-V ; Version: 1.5 ; Generator: Khronos Glslang Reference Front End; 11 -; Bound: 389 +; Bound: 399 ; Schema: 0 OpCapability Shader OpCapability Float64 + OpCapability Int16 OpCapability StorageImageMultisample OpCapability ImageCubeArray OpCapability ImageRect OpCapability SampledRect + OpCapability Int8 OpCapability InputAttachment OpCapability Sampled1D OpCapability Image1D @@ -25,6 +27,13 @@ OpSource GLSL 460 OpSourceExtension "GL_EXT_ray_query" OpSourceExtension "GL_EXT_ray_tracing" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" + OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" OpName %main "main" OpName %ray_query "ray_query" OpName %iImg1d "iImg1d" @@ -892,6 +901,16 @@ %386 = OpTypeAccelerationStructureKHR %_ptr_UniformConstant_386 = OpTypePointer UniformConstant %386 %acc = OpVariable %_ptr_UniformConstant_386 UniformConstant + %char = OpTypeInt 8 1 + %char_1 = OpConstant %char 1 + %short = OpTypeInt 16 1 + %short_1 = OpConstant %short 1 + %int_1 = OpConstant %int 1 + %uchar = OpTypeInt 8 0 + %uchar_1 = OpConstant %uchar 1 + %ushort = OpTypeInt 16 0 + %ushort_1 = OpConstant %ushort 1 + %float_1 = OpConstant %float 1 %main = OpFunction %void None %3 %5 = OpLabel %10 = OpRayQueryProceedKHR %bool %ray_query diff --git a/spirq-core/Cargo.toml b/spirq-core/Cargo.toml index e943ced..1c8b769 100644 --- a/spirq-core/Cargo.toml +++ b/spirq-core/Cargo.toml @@ -23,3 +23,4 @@ spirv = "0.2" anyhow = "1.0" ordered-float = "3.4" num-traits = "0.2" +half = { version = "2.3", features = ["num-traits"] } diff --git a/spirq-core/src/constant.rs b/spirq-core/src/constant.rs index a059a3a..61f1985 100644 --- a/spirq-core/src/constant.rs +++ b/spirq-core/src/constant.rs @@ -1,6 +1,7 @@ //! Constant and specialization constant representations. use std::convert::TryFrom; +use half::f16; use ordered_float::OrderedFloat; use crate::{ @@ -23,13 +24,13 @@ pub enum ConstantValue { U16(u16), U32(u32), U64(u64), - F16(), + F16(OrderedFloat), F32(OrderedFloat), F64(OrderedFloat), } impl From<&[u32]> for ConstantValue { fn from(x: &[u32]) -> Self { - let bytes = x.iter().flat_map(|x| x.to_ne_bytes()).collect(); + let bytes = x.iter().flat_map(|x| x.to_le_bytes()).collect(); ConstantValue::Typeless(bytes) } } @@ -83,65 +84,68 @@ impl ConstantValue { bits: 8, is_signed: true, } if x.len() == 4 => { - let x = i8::from_ne_bytes([x[0]]); + let x = i8::from_le_bytes([x[0]]); Ok(ConstantValue::S8(x)) } ScalarType::Integer { bits: 8, is_signed: false, } if x.len() == 4 => { - let x = u8::from_ne_bytes([x[0]]); + let x = u8::from_le_bytes([x[0]]); Ok(ConstantValue::U8(x)) } ScalarType::Integer { bits: 16, is_signed: true, } if x.len() == 4 => { - let x = i16::from_ne_bytes([x[0], x[1]]); + let x = i16::from_le_bytes([x[0], x[1]]); Ok(ConstantValue::S16(x)) } ScalarType::Integer { bits: 16, is_signed: false, } if x.len() == 4 => { - let x = u16::from_ne_bytes([x[0], x[1]]); + let x = u16::from_le_bytes([x[0], x[1]]); Ok(ConstantValue::U16(x)) } ScalarType::Integer { bits: 32, is_signed: true, } if x.len() == 4 => { - let x = i32::from_ne_bytes([x[0], x[1], x[2], x[3]]); + let x = i32::from_le_bytes([x[0], x[1], x[2], x[3]]); Ok(ConstantValue::S32(x)) } ScalarType::Integer { bits: 32, is_signed: false, } if x.len() == 4 => { - let x = u32::from_ne_bytes([x[0], x[1], x[2], x[3]]); + let x = u32::from_le_bytes([x[0], x[1], x[2], x[3]]); Ok(ConstantValue::U32(x)) } ScalarType::Integer { bits: 64, is_signed: true, } if x.len() == 8 => { - let x = i64::from_ne_bytes([x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]]); + let x = i64::from_le_bytes([x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]]); Ok(ConstantValue::S64(x)) } ScalarType::Integer { bits: 64, is_signed: false, } if x.len() == 8 => { - let x = u64::from_ne_bytes([x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]]); + let x = u64::from_le_bytes([x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]]); Ok(ConstantValue::U64(x)) } - ScalarType::Float { bits: 16 } if x.len() == 4 => Ok(ConstantValue::F16()), + ScalarType::Float { bits: 16 } if x.len() == 4 => { + let x = f16::from_le_bytes([x[0], x[1]]); + Ok(ConstantValue::F16(OrderedFloat(x))) + }, ScalarType::Float { bits: 32 } if x.len() == 4 => { - let x = f32::from_ne_bytes([x[0], x[1], x[2], x[3]]); + let x = f32::from_le_bytes([x[0], x[1], x[2], x[3]]); Ok(ConstantValue::F32(OrderedFloat(x))) } ScalarType::Float { bits: 64 } if x.len() == 8 => { - let x = f64::from_ne_bytes([x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]]); + let x = f64::from_le_bytes([x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]]); Ok(ConstantValue::F64(OrderedFloat(x))) } _ => Err(anyhow!( @@ -183,9 +187,17 @@ impl ConstantValue { pub fn to_typeless(&self) -> Option> { match self { Self::Typeless(x) => Some(x.clone()), - Self::F32(x) => Some(Box::new(x.to_ne_bytes())), - Self::S32(x) => Some(Box::new(x.to_ne_bytes())), - Self::U32(x) => Some(Box::new(x.to_ne_bytes())), + Self::S8(x) => Some(Box::new(x.to_le_bytes())), + Self::S16(x) => Some(Box::new(x.to_le_bytes())), + Self::S32(x) => Some(Box::new(x.to_le_bytes())), + Self::S64(x) => Some(Box::new(x.to_le_bytes())), + Self::U8(x) => Some(Box::new(x.to_le_bytes())), + Self::U16(x) => Some(Box::new(x.to_le_bytes())), + Self::U32(x) => Some(Box::new(x.to_le_bytes())), + Self::U64(x) => Some(Box::new(x.to_le_bytes())), + Self::F16(x) => Some(Box::new(x.to_le_bytes())), + Self::F32(x) => Some(Box::new(x.to_le_bytes())), + Self::F64(x) => Some(Box::new(x.to_le_bytes())), Self::Bool(x) => Some(Box::new([*x as u8])), } } diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index af2f0ba..21b9a75 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -177,6 +177,7 @@ impl InstructionBuilder { } } +#[derive(Clone)] pub struct Operands<'a>(&'a [u32]); impl<'a> Operands<'a> { pub fn len(&self) -> usize { diff --git a/spirq-spvasm/Cargo.toml b/spirq-spvasm/Cargo.toml index 568c142..f2269c0 100644 --- a/spirq-spvasm/Cargo.toml +++ b/spirq-spvasm/Cargo.toml @@ -22,6 +22,7 @@ anyhow = "1.0" num-traits = "0.2" spirq-core = { version = "1.0.0", path = "../spirq-core" } spirq = { version = "1.0.0", path = "../spirq"} +half = { version = "2.3", features = ["num-traits"] } [dev-dependencies] inline-spirv = "0.1" diff --git a/spirq-spvasm/src/dis/auto_name.rs b/spirq-spvasm/src/dis/auto_name.rs index 8c28113..f3d2f5d 100644 --- a/spirq-spvasm/src/dis/auto_name.rs +++ b/spirq-spvasm/src/dis/auto_name.rs @@ -1,10 +1,10 @@ use std::collections::HashMap; use anyhow::Result; +use half::f16; use spirq::{ReflectConfig, reflect::ReflectIntermediate}; use spirq_core::{parse::SpirvBinary, ty::{Type, ScalarType, VectorType, MatrixType, PointerType, ArrayType, StructType}, constant::ConstantValue}; - fn sanitize_name(name: &str) -> String { name.chars() .map(|c| if c.is_ascii_punctuation() { '_' } else { c }) @@ -56,8 +56,15 @@ impl AutoNamer { let out = match scalar_ty { ScalarType::Void => "void".to_string(), ScalarType::Boolean => "bool".to_string(), + ScalarType::Integer { bits: 8, is_signed: true } => "char".to_string(), + ScalarType::Integer { bits: 16, is_signed: true } => "short".to_string(), ScalarType::Integer { bits: 32, is_signed: true } => "int".to_string(), + ScalarType::Integer { bits: 64, is_signed: true } => "long".to_string(), + ScalarType::Integer { bits: 8, is_signed: false } => "uchar".to_string(), + ScalarType::Integer { bits: 16, is_signed: false } => "ushort".to_string(), ScalarType::Integer { bits: 32, is_signed: false } => "uint".to_string(), + ScalarType::Integer { bits: 64, is_signed: false } => "ulong".to_string(), + ScalarType::Float { bits: 16 } => "half".to_string(), ScalarType::Float { bits: 32 } => "float".to_string(), ScalarType::Float { bits: 64 } => "double".to_string(), _ => return None, @@ -140,13 +147,29 @@ impl AutoNamer { let mut out = match value { ConstantValue::Bool(true) => "true".to_owned(), ConstantValue::Bool(false) => "false".to_owned(), + ConstantValue::S8(x) => format!("char_{}", x), + ConstantValue::S16(x) => format!("short_{}", x), ConstantValue::S32(x) => format!("int_{}", x), + ConstantValue::S64(x) => format!("long_{}", x), + ConstantValue::U8(x) => format!("uchar_{}", x), + ConstantValue::U16(x) => format!("ushort_{}", x), ConstantValue::U32(x) => format!("uint_{}", x), + ConstantValue::U64(x) => format!("ulong_{}", x), + ConstantValue::F16(x) => if x.0 < f16::ZERO { + format!("half_n{}", -x) + } else { + format!("half_{}", x) + }, ConstantValue::F32(x) => if x.0 < 0.0 { format!("float_n{}", -x) } else { format!("float_{}", x) }, + ConstantValue::F64(x) => if x.0 < 0.0 { + format!("double_n{}", -x) + } else { + format!("double_{}", x) + }, _ => return None, }; out = sanitize_name(&out); @@ -169,16 +192,11 @@ impl AutoNamer { } pub fn collect_names( - spv: &SpirvBinary, + itm: &ReflectIntermediate, name_ids: bool, name_type_ids: bool, name_const_ids: bool, ) -> Result> { - let cfg = ReflectConfig::default(); - let mut itm = ReflectIntermediate::new(&cfg)?; - let mut instrs = spv.instrs()?; - itm.parse_global_declrs(&mut instrs)?; - let mut auto_namer = AutoNamer { names: HashMap::new(), cache: HashMap::new(), diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 5945e7e..79a45c7 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -1,7 +1,9 @@ use std::collections::HashMap; -use anyhow::Result; -use spirq_core::parse::{Instr, SpirvBinary, Instrs, Operands}; +use anyhow::{Result, bail}; +use half::f16; +use spirq::{reflect::ReflectIntermediate, ReflectConfig}; +use spirq_core::{parse::{Instr, SpirvBinary, Instrs, Operands}, spirv::Op, ty::{self, Type}}; use crate::generated; use super::auto_name; @@ -69,7 +71,88 @@ impl Disassembler { Ok(opname) } - fn print_line<'a>(&self, instr: &'a Instr, id_names: &HashMap) -> Result { + // SPIR-V Tools emit numbers of any length as a single context dependent + // literal for OpConstant. But don't fail if we failed to make a guess + // of the type. + fn print_constant_op_operand<'a>( + &self, + result_type_id: Option, + operands: &mut Operands<'a>, + itm: &ReflectIntermediate, + ) -> Result { + let mut operands2 = operands.clone(); + + let out = if let Some(result_type_id) = result_type_id { + let ty = itm.ty_reg.get(result_type_id)?; + match ty { + Type::Scalar(scalar_ty) => { + match scalar_ty { + ty::ScalarType::Integer { bits: 8, is_signed: true } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i8::from_le_bytes([x[0]])) + }, + ty::ScalarType::Integer { bits: 16, is_signed: true } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i16::from_le_bytes([x[0], x[1]])) + }, + ty::ScalarType::Integer { bits: 32, is_signed: true } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i32::from_le_bytes([x[0], x[1], x[2], x[3]])) + }, + ty::ScalarType::Integer { bits: 64, is_signed: true } => { + let x = operands2.read_u32()?.to_le_bytes(); + let y = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i64::from_le_bytes([x[0], x[1], x[2], x[3], y[0], y[1], y[2], y[3]])) + }, + ty::ScalarType::Integer { bits: 8, is_signed: false } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u8::from_le_bytes([x[0]])) + }, + ty::ScalarType::Integer { bits: 16, is_signed: false } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u16::from_le_bytes([x[0], x[1]])) + }, + ty::ScalarType::Integer { bits: 32, is_signed: false } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u32::from_le_bytes([x[0], x[1], x[2], x[3]])) + }, + ty::ScalarType::Integer { bits: 64, is_signed: false } => { + let x = operands2.read_u32()?.to_le_bytes(); + let y = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u64::from_le_bytes([x[0], x[1], x[2], x[3], y[0], y[1], y[2], y[3]])) + }, + ty::ScalarType::Float { bits: 16 } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", f16::from_bits(u16::from_le_bytes([x[0], x[1]]))) + }, + ty::ScalarType::Float { bits: 32 } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", f32::from_le_bytes([x[0], x[1], x[2], x[3]])) + }, + ty::ScalarType::Float { bits: 64 } => { + let x0 = operands2.read_u32()?.to_le_bytes(); + let x1 = operands2.read_u32()?.to_le_bytes(); + format!(" {}", f64::from_le_bytes([x0[0], x0[1], x0[2], x0[3], x1[0], x1[1], x1[2], x1[3]])) + }, + _ => bail!("unsupported scalar type for opconstant"), + } + } + _ => bail!("opconstant cannot have a non-scalar type"), + } + } else { + bail!("opconstant must have a result type") + }; + + *operands = operands2; + Ok(out) + } + + fn print_line<'a>( + &self, + instr: &'a Instr, + itm: &ReflectIntermediate, + id_names: &HashMap, + ) -> Result { let mut operands = instr.operands(); let opcode = instr.opcode(); let result_type_id = if generated::op_has_result_type_id(opcode)? { @@ -92,6 +175,15 @@ impl Disassembler { if let Some(result_type_id) = result_type_id { out.push_str(&format!(" {}", &self.print_id(result_type_id, id_names)?)); } + + if opcode == (Op::Constant as u32) { + if let Ok(operand) = self.print_constant_op_operand(result_type_id, &mut operands, itm) { + out.push_str(&operand); + } else { + // Tolerate the error and print the operands as usual. + } + } + let operands_ = self.print_operands(opcode, &mut operands, id_names)?; if !operands_.is_empty() { out.push(' '); @@ -100,16 +192,26 @@ impl Disassembler { Ok(out) } - fn print_lines<'a>(&self, instrs: &'a mut Instrs, id_names: HashMap) -> Result> { + fn print_lines<'a>( + &self, + instrs: &'a mut Instrs, + itm: &ReflectIntermediate, + id_names: HashMap, + ) -> Result> { let mut out = Vec::new(); while let Some(instr) = instrs.next()? { - out.push(self.print_line(instr, &id_names)?); + out.push(self.print_line(instr, itm, &id_names)?); } Ok(out) } - fn print<'a>(&self, spv: &'a SpirvBinary, id_names: HashMap) -> Result> { - self.print_lines(&mut spv.instrs()?, id_names) + fn print<'a>( + &self, + spv: &'a SpirvBinary, + itm: &ReflectIntermediate, + id_names: HashMap, + ) -> Result> { + self.print_lines(&mut spv.instrs()?, itm, id_names) } pub fn disassemble(&self, spv: &SpirvBinary) -> Result { @@ -135,13 +237,21 @@ impl Disassembler { } } + let cfg = ReflectConfig::default(); + let itm = { + let mut itm = ReflectIntermediate::new(&cfg)?; + let mut instrs = spv.instrs()?; + itm.parse_global_declrs(&mut instrs)?; + itm + }; + let id_names = if self.name_ids || self.name_type_ids || self.name_const_ids { - auto_name::collect_names(spv, self.name_ids, self.name_type_ids, self.name_const_ids)? + auto_name::collect_names(&itm, self.name_ids, self.name_type_ids, self.name_const_ids)? } else { HashMap::new() }; - let instrs = self.print(spv, id_names)?; + let instrs = self.print(spv, &itm, id_names)?; out.extend(instrs); Ok(out.join("\n")) } From ee6791e3152d2bafdefedde30c59e8d619800676 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 17:18:36 +0800 Subject: [PATCH 24/50] Support 64-bit types --- assets/gallery.frag | 9 +- assets/gallery.frag.spv | Bin 17108 -> 17244 bytes assets/gallery.frag.spvasm | 11 +- spirq-core/src/parse/instr.rs | 8 + spirq-spvasm/src/asm/assembler.rs | 415 ++++++++++++++++++++++++------ spirq-spvasm/src/asm/ty_reg.rs | 15 ++ spirq-spvasm/src/dis/auto_name.rs | 4 +- 7 files changed, 373 insertions(+), 89 deletions(-) create mode 100644 spirq-spvasm/src/asm/ty_reg.rs diff --git a/assets/gallery.frag b/assets/gallery.frag index e931449..4c250ea 100644 --- a/assets/gallery.frag +++ b/assets/gallery.frag @@ -204,20 +204,19 @@ layout(set=15, binding=0) uniform accelerationStructureEXT acc; const int8_t INT8 = int8_t(1); const int16_t INT16 = int16_t(1); const int32_t INT32 = int32_t(1); -// (penguinliong) int64 doesn't work atm, sorry. -//const int64_t INT64 = int64_t(1); +const int64_t INT64 = int64_t(1); const uint8_t UINT8 = uint8_t(1); const uint16_t UINT16 = uint16_t(1); const uint32_t UINT32 = uint32_t(1); -//const uint64_t UINT64 = uint64_t(1); +const uint64_t UINT64 = uint64_t(1); // (penguinliong) Don't know why but SPIR-V Tools disassemble fp16 values to // mantissa and exponent bias which is pretty much a special case I don't wanna // work with atm. -//const float16_t FLOAT16 = float16_t(0.0); +const float16_t FLOAT16 = float16_t(0.0); const float32_t FLOAT32 = float32_t(1.0); -//const float64_t FLOAT64 = float64_t(1.0); +const float64_t FLOAT64 = float64_t(1.0); void main() { rayQueryEXT ray_query; diff --git a/assets/gallery.frag.spv b/assets/gallery.frag.spv index 9bbee7210c2d6938d8c5625702fa4c4bb618245a..b667be58a096c2de28a39dc3dbd53d72519199f2 100644 GIT binary patch delta 257 zcmcc8%6O-Z(U6%*nVo@^k%60mgJBvY0~iQ0Ffo9bAes|Ob3tkDjf&<@^$tKDNQE{7 zD?=BM(GA2PJ_v|1urTxhIUEo!Pz{9N3snP>?*p<0kmN!9ekAz`K(+&1o|OT_p9qx) x3Og`}F)%Ys0t$c(0a*ZIPX=NT0P$^s^b|0^!5-wua3FgsRGxw1!{qr+rT|v26_Wq} delta 102 zcmcc9#(1TbQIVNRnVo@^k%60mgQ1_10Sp8gm>57z5Y4sG(A-Ip10uno&A`IY1(fOr hVvq_^AioF55SZNSB+d_#wFQdyfutB3CaXJ}0svEj3!VS~ diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index 340218d..4a64d6a 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -1,10 +1,12 @@ ; SPIR-V ; Version: 1.5 ; Generator: Khronos Glslang Reference Front End; 11 -; Bound: 399 +; Bound: 406 ; Schema: 0 OpCapability Shader + OpCapability Float16 OpCapability Float64 + OpCapability Int64 OpCapability Int16 OpCapability StorageImageMultisample OpCapability ImageCubeArray @@ -906,11 +908,18 @@ %short = OpTypeInt 16 1 %short_1 = OpConstant %short 1 %int_1 = OpConstant %int 1 + %long = OpTypeInt 64 1 + %long_1 = OpConstant %long 1 %uchar = OpTypeInt 8 0 %uchar_1 = OpConstant %uchar 1 %ushort = OpTypeInt 16 0 %ushort_1 = OpConstant %ushort 1 + %ulong = OpTypeInt 64 0 + %ulong_1 = OpConstant %ulong 1 + %half = OpTypeFloat 16 +%half_0x0p_0 = OpConstant %half 0x0p+0 %float_1 = OpConstant %float 1 + %double_1 = OpConstant %double 1 %main = OpFunction %void None %3 %5 = OpLabel %10 = OpRayQueryProceedKHR %bool %ray_query diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 21b9a75..0c2e3c1 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -142,6 +142,14 @@ impl Deref for Instruction { self.borrow() } } +impl Instruction { + pub fn builder(op: Op) -> InstructionBuilder { + InstructionBuilder::new(op) + } + pub fn into_words(self) -> Vec { + self.inner + } +} pub struct InstructionBuilder { inner: Vec, diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index f37e987..81c2ba3 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -1,13 +1,14 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::{HashMap, HashSet, hash_map::Entry}; use anyhow::{anyhow, bail, Result, Ok}; +use half::f16; use num_traits::FromPrimitive; -use spirq_core::{spirv::Op, parse::{InstructionBuilder, bin::SpirvHeader, SpirvBinary}}; +use spirq_core::{spirv::Op, parse::{InstructionBuilder, bin::SpirvHeader, SpirvBinary}, ty::ScalarType}; use super::tokenizer::{Token, Tokenizer, Lit}; use crate::generated; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Hash, PartialEq, Eq)] enum IdRef { Name(String), Id(u32), @@ -60,6 +61,10 @@ pub struct Assembler { name2id: HashMap, used_ids: HashSet, next_id: u32, + bound: u32, + // The LieteralContextDependentNumber in OpConstant depends on the type of + // the constant. So we need to keep track of the type of each constant. + scalar_tys: HashMap, } impl Assembler { pub fn new() -> Self { @@ -237,6 +242,328 @@ impl Assembler { Ok(out) } + // Call this after you sanitized named refs to ID refs. + fn assemble_op_type_int(&mut self, instr: &Instruction) -> Result> { + if instr.operands.len() != 2 { + bail!("OpTypeInt expected 2 operands"); + } + let width = match instr.operands[0] { + Operand::Literal(Lit::Int(i)) => i as u32, + _ => bail!("OpTypeInt width expected literal integer"), + }; + let signedness = match instr.operands[1] { + Operand::Literal(Lit::Int(i)) => i as u32, + _ => bail!("OpTypeInt signedness expected literal integer"), + }; + + let result_id = instr.result_id.as_ref() + .and_then(|idref| match idref { + IdRef::Id(id) => Some(*id), + _ => None, + }) + .ok_or_else(|| anyhow!("OpTypeInt expected result id"))?; + + match self.scalar_tys.entry(result_id) { + Entry::Vacant(entry) => { + let scalar_ty = ScalarType::Integer { + bits: width, + is_signed: signedness != 0, + }; + entry.insert(scalar_ty); + } + Entry::Occupied(_) => bail!("OpTypeInt result id already exists") + } + + let instr = InstructionBuilder::new(Op::TypeInt) + .push(result_id) + .push(width) + .push(signedness) + .build(); + Ok(instr.into_words()) + } + // Call this after you sanitized named refs to ID refs. + fn assemble_op_type_float(&mut self, instr: &Instruction) -> Result> { + if instr.operands.len() != 1 { + bail!("OpTypeFloat expected 1 operand"); + } + let width = match instr.operands[0] { + Operand::Literal(Lit::Int(i)) => i as u32, + _ => bail!("OpTypeFloat width expected literal integer"), + }; + + let result_id = instr.result_id.as_ref() + .and_then(|idref| match idref { + IdRef::Id(id) => Some(*id), + _ => None, + }) + .ok_or_else(|| anyhow!("OpTypeFloat expected result id"))?; + + match self.scalar_tys.entry(result_id) { + Entry::Vacant(entry) => { + let scalar_ty = ScalarType::Float { + bits: width, + }; + entry.insert(scalar_ty); + } + Entry::Occupied(_) => bail!("OpTypeFloat result id already exists") + } + + let instr = InstructionBuilder::new(Op::TypeFloat) + .push(result_id) + .push(width) + .build(); + Ok(instr.into_words()) + } + fn assemble_op_constant(&mut self, instr: &Instruction) -> Result> { + if instr.operands.len() != 2 { + bail!("OpConstant expected 2 operands"); + } + let result_type_id = match instr.operands[0] { + Operand::IdRef(IdRef::Id(id)) => id, + _ => bail!("OpConstant expected result type id"), + }; + let result_id = match instr.result_id.as_ref() { + Some(IdRef::Id(id)) => *id, + _ => bail!("OpConstant expected result id"), + }; + + dbg!(result_type_id, &self.scalar_tys); + let scalar_ty = self.scalar_tys.get(&result_type_id) + .ok_or_else(|| anyhow!("OpConstant result type id not found"))?; + + fn lit2int(lit: &Lit) -> Result { + match lit { + Lit::Int(i) => Ok(*i), + Lit::Float(f, exponent_bias) => { + let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + Ok(f as i64) + }, + Lit::String(_) => bail!("OpConstant expected a int or float literal"), + } + } + fn lit2float(lit: &Lit) -> Result { + match lit { + Lit::Int(i) => Ok(*i as f64), + Lit::Float(f, exponent_bias) => { + let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + Ok(f as f64) + }, + Lit::String(_) => bail!("OpConstant expected a int or float literal"), + } + } + + let value = match &instr.operands[1] { + Operand::Literal(lit) => lit, + _ => bail!("OpConstant expected a literal value"), + }; + + let mut value_buf = [0u32; 2]; + let value: &[u32] = match scalar_ty { + ScalarType::Integer { bits: 8, is_signed: true } => { + let value = lit2int(value)?; + if let Some(value) = i8::from_i64(value) { + value_buf[0] = value as u32; + &value_buf[..1] + } else { + bail!("expected a i8 literal in range [-128, 127]"); + } + } + ScalarType::Integer { bits: 16, is_signed: true } => { + let value = lit2int(value)?; + if let Some(value) = i16::from_i64(value) { + value_buf[0] = value as u32; + &value_buf[..1] + } else { + bail!("expected a i16 literal in range [-32768, 32767]"); + } + } + ScalarType::Integer { bits: 32, is_signed: true } => { + let value = lit2int(value)?; + if let Some(value) = i32::from_i64(value) { + value_buf[0] = value as u32; + &value_buf[..1] + } else { + bail!("expected a i32 literal in range [-2147483648, 2147483647]"); + } + } + ScalarType::Integer { bits: 64, is_signed: true } => { + let value = lit2int(value)?; + let x = value.to_le_bytes(); + value_buf[0] = u32::from_le_bytes([x[0], x[1], x[2], x[3]]); + value_buf[1] = u32::from_le_bytes([x[4], x[5], x[6], x[7]]); + &value_buf[..2] + } + ScalarType::Integer { bits: 8, is_signed: false } => { + let value = lit2int(value)?; + if let Some(value) = u8::from_i64(value) { + value_buf[0] = value as u32; + &value_buf[..1] + } else { + bail!("expected a u8 literal in range [0, 255]"); + } + } + ScalarType::Integer { bits: 16, is_signed: false } => { + let value = lit2int(value)?; + if let Some(value) = u16::from_i64(value) { + value_buf[0] = value as u32; + &value_buf[..1] + } else { + bail!("expected a u16 literal in range [0, 65535]"); + } + } + ScalarType::Integer { bits: 32, is_signed: false } => { + let value = lit2int(value)?; + if let Some(value) = u32::from_i64(value) { + value_buf[0] = value as u32; + &value_buf[..1] + } else { + bail!("expected a u32 literal in range [0, 4294967295]"); + } + } + ScalarType::Integer { bits: 64, is_signed: false } => { + let value = lit2int(value)?; + let x = value.to_le_bytes(); + value_buf[0] = u32::from_le_bytes([x[0], x[1], x[2], x[3]]); + value_buf[1] = u32::from_le_bytes([x[4], x[5], x[6], x[7]]); + &value_buf[..2] + } + ScalarType::Float { bits: 16 } => { + let value = f16::from_f64(lit2float(value)?); + let x = value.to_bits(); + value_buf[0] = x as u32; + &value_buf[..1] + } + ScalarType::Float { bits: 32 } => { + let value = lit2float(value)? as f32; + let x = value.to_bits(); + value_buf[0] = x; + &value_buf[..1] + } + ScalarType::Float { bits: 64 } => { + let value = lit2float(value)?; + let x = value.to_bits().to_le_bytes(); + value_buf[0] = u32::from_le_bytes([x[0], x[1], x[2], x[3]]); + value_buf[1] = u32::from_le_bytes([x[4], x[5], x[6], x[7]]); + &value_buf[..2] + } + _ => bail!("OpConstant unsupported result type"), + }; + + let instr = InstructionBuilder::new(Op::Constant) + .push(result_type_id) + .push(result_id) + .push_list(value) + .build(); + Ok(instr.into_words()) + } + + // Call this after you sanitized named refs to ID refs. + fn assemble_special_instr(&mut self, instr: &Instruction) -> Result>> { + const OP_TYPE_INT: u32 = Op::TypeInt as u32; + const OP_TYPE_FLOAT: u32 = Op::TypeFloat as u32; + const OP_CONSTANT: u32 = Op::Constant as u32; + + let out = match instr.opcode { + OP_TYPE_INT => { + Some(self.assemble_op_type_int(instr)?) + } + OP_TYPE_FLOAT => { + Some(self.assemble_op_type_float(instr)?) + } + OP_CONSTANT => { + Some(self.assemble_op_constant(instr)?) + } + _ => None, + }; + Ok(out) + } + fn assemble_general_instr(&mut self, instr: &Instruction) -> Result> { + let opcode = Op::from_u32(instr.opcode) + .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; + let mut builder = InstructionBuilder::new(opcode); + + let mut operands = instr.operands.iter(); + if generated::op_has_result_type_id(instr.opcode)? { + // The first operand in spvasm is the result type id (if the op + // has one). + match operands.next() { + Some(Operand::IdRef(IdRef::Id(id))) => { + builder = builder.push(*id); + self.bound = self.bound.max(*id + 1); + } + _ => bail!("expected result type id"), + } + } + + if generated::op_has_result_id(instr.opcode)? { + // The second operand in spvasm is the result id (if the op has one). + match instr.result_id { + Some(IdRef::Id(id)) => { + builder = builder.push(id); + } + _ => bail!("expected result id"), + } + } else { + if instr.result_id.is_some() { + bail!("unexpected result id"); + } + } + + for (i, operand) in operands.enumerate() { + match operand { + Operand::IdRef(IdRef::Name(_)) => unreachable!(), + Operand::IdRef(IdRef::Id(id)) => { + builder = builder.push(*id); + } + Operand::Literal(lit) => { + match lit { + Lit::Int(i) => { + if *i < 0 { + if let Some(i) = i32::from_i64(*i) { + builder = builder.push(i as u32); + } else { + bail!("literal integer out of range"); + } + } else { + if let Some(i) = u32::from_i64(*i) { + builder = builder.push(i); + } else { + bail!("literal integer out of range"); + } + } + }, + Lit::Float(f, exponent_bias) => { + // First cast to f32. + let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + // Then bit cast to u32. + let u = f.to_bits(); + builder = builder.push(u); + }, + Lit::String(s) => { + builder = builder.push_str(&s); + }, + } + } + Operand::Ident(ident) => { + let ety = generated::operand_enum_type(instr.opcode, i)?; + let e = generated::enum_from_str(ety, &ident)?; + builder = builder.push(e); + } + } + } + + let instr = builder.build(); + Ok(instr.into_words()) + } + + fn assemble_instr(&mut self, instr: &Instruction) -> Result> { + if let Some(buf) = self.assemble_special_instr(instr)? { + return Ok(buf); + } + let buf = self.assemble_general_instr(instr)?; + Ok(buf) + } + pub fn assemble(&mut self, input: &str, header: SpirvHeader) -> Result { let mut instrs = self.parse(input)?; @@ -277,92 +604,18 @@ impl Assembler { } } + // Collect instructions. let mut buf = Vec::new(); - let mut bound = 0; for instr in instrs { - let opcode = Op::from_u32(instr.opcode) - .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; - let mut builder = InstructionBuilder::new(opcode); - - let mut operands = instr.operands.iter(); - if generated::op_has_result_type_id(instr.opcode)? { - // The first operand in spvasm is the result type id (if the op - // has one). - match operands.next() { - Some(Operand::IdRef(IdRef::Id(id))) => { - builder = builder.push(*id); - } - _ => bail!("expected result type id"), - } - } - - if generated::op_has_result_id(instr.opcode)? { - // The second operand in spvasm is the result id (if the op has one). - match instr.result_id { - Some(IdRef::Id(id)) => { - builder = builder.push(id); - } - _ => bail!("expected result id"), - } - } else { - if instr.result_id.is_some() { - bail!("unexpected result id"); - } - } - - for (i, operand) in operands.enumerate() { - match operand { - Operand::IdRef(IdRef::Name(_)) => unreachable!(), - Operand::IdRef(IdRef::Id(id)) => { - builder = builder.push(*id); - bound = bound.max(*id + 1); - } - Operand::Literal(lit) => { - match lit { - Lit::Int(i) => { - if *i < 0 { - if let Some(i) = i32::from_i64(*i) { - builder = builder.push(i as u32); - } else { - bail!("literal integer out of range"); - } - } else { - if let Some(i) = u32::from_i64(*i) { - builder = builder.push(i); - } else { - bail!("literal integer out of range"); - } - } - }, - Lit::Float(f, exponent_bias) => { - // First cast to f32. - let f = (*f as f32) * 2.0f32.powi(*exponent_bias); - // Then bit cast to u32. - let u = f.to_bits(); - builder = builder.push(u); - }, - Lit::String(s) => { - builder = builder.push_str(&s); - }, - } - } - Operand::Ident(ident) => { - let ety = generated::operand_enum_type(instr.opcode, i)?; - let e = generated::enum_from_str(ety, &ident)?; - builder = builder.push(e); - } - } - } - - let instr = builder.build(); - buf.extend_from_slice(instr.as_ref()); + let instr = self.assemble_instr(&instr)?; + buf.extend(instr); } let mut spv = vec![ 0x07230203, // Magic number header.version, // Version header.generator, // Generator - bound, // Bound + self.bound, // Bound 0, // Reserved word ]; spv.extend(buf); diff --git a/spirq-spvasm/src/asm/ty_reg.rs b/spirq-spvasm/src/asm/ty_reg.rs new file mode 100644 index 0000000..a54c913 --- /dev/null +++ b/spirq-spvasm/src/asm/ty_reg.rs @@ -0,0 +1,15 @@ +use std::collections::HashMap; + +use spirq_core::ty::Type; + +/// A tiny text-based type registry. It serves mainly to decide the input format +/// of OpConstant's LiteralContextDependentNumber. So we only process scalar +/// types here. +struct TinyTypeRegistry { + ty_map: HashMap, +} +impl TinyTypeRegistry { + pub fn reg_ty(&mut self, opcode: u32) { + self.ty_map.insert(id, ty); + } +} diff --git a/spirq-spvasm/src/dis/auto_name.rs b/spirq-spvasm/src/dis/auto_name.rs index f3d2f5d..4e89c0b 100644 --- a/spirq-spvasm/src/dis/auto_name.rs +++ b/spirq-spvasm/src/dis/auto_name.rs @@ -2,8 +2,8 @@ use std::collections::HashMap; use anyhow::Result; use half::f16; -use spirq::{ReflectConfig, reflect::ReflectIntermediate}; -use spirq_core::{parse::SpirvBinary, ty::{Type, ScalarType, VectorType, MatrixType, PointerType, ArrayType, StructType}, constant::ConstantValue}; +use spirq::reflect::ReflectIntermediate; +use spirq_core::{ty::{Type, ScalarType, VectorType, MatrixType, PointerType, ArrayType, StructType}, constant::ConstantValue}; fn sanitize_name(name: &str) -> String { name.chars() From 39bb80faa6dbeaa9c39e3b7864dfeb561023d44e Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 19:34:51 +0800 Subject: [PATCH 25/50] Properly deal with hexadecimal floating point numbers --- assets/gallery.frag | 2 +- assets/gallery.frag.spv | Bin 17244 -> 17244 bytes assets/gallery.frag.spvasm | 2 +- spirq-spvasm/src/asm/assembler.rs | 15 ++-- spirq-spvasm/src/asm/tokenizer.rs | 116 +++++++++++++++------------ spirq-spvasm/src/dis/auto_name.rs | 22 ++--- spirq-spvasm/src/dis/disassembler.rs | 5 +- spirq-spvasm/src/dis/mod.rs | 1 + spirq-spvasm/src/dis/utils.rs | 51 ++++++++++++ 9 files changed, 133 insertions(+), 81 deletions(-) create mode 100644 spirq-spvasm/src/dis/utils.rs diff --git a/assets/gallery.frag b/assets/gallery.frag index 4c250ea..1d5894a 100644 --- a/assets/gallery.frag +++ b/assets/gallery.frag @@ -214,7 +214,7 @@ const uint64_t UINT64 = uint64_t(1); // (penguinliong) Don't know why but SPIR-V Tools disassemble fp16 values to // mantissa and exponent bias which is pretty much a special case I don't wanna // work with atm. -const float16_t FLOAT16 = float16_t(0.0); +const float16_t FLOAT16 = float16_t(0.25); const float32_t FLOAT32 = float32_t(1.0); const float64_t FLOAT64 = float64_t(1.0); diff --git a/assets/gallery.frag.spv b/assets/gallery.frag.spv index b667be58a096c2de28a39dc3dbd53d72519199f2..0ac05da5b7077d03d592240f99ec0c8fc5d72e69 100644 GIT binary patch delta 15 Wcmcc9#(1ZVaRZ|>qse3@=O_R$xdkEs delta 15 Wcmcc9#(1ZVaRZ|>Bg14S=O_R#wFK?} diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index 4a64d6a..f9a44cc 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -917,7 +917,7 @@ %ulong = OpTypeInt 64 0 %ulong_1 = OpConstant %ulong 1 %half = OpTypeFloat 16 -%half_0x0p_0 = OpConstant %half 0x0p+0 +%half_0x1pn2 = OpConstant %half 0x1p-2 %float_1 = OpConstant %float 1 %double_1 = OpConstant %double 1 %main = OpFunction %void None %3 diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index 81c2ba3..d80e8d9 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -1,6 +1,6 @@ use std::collections::{HashMap, HashSet, hash_map::Entry}; -use anyhow::{anyhow, bail, Result, Ok}; +use anyhow::{anyhow, bail, Result}; use half::f16; use num_traits::FromPrimitive; use spirq_core::{spirv::Op, parse::{InstructionBuilder, bin::SpirvHeader, SpirvBinary}, ty::ScalarType}; @@ -327,15 +327,14 @@ impl Assembler { _ => bail!("OpConstant expected result id"), }; - dbg!(result_type_id, &self.scalar_tys); let scalar_ty = self.scalar_tys.get(&result_type_id) .ok_or_else(|| anyhow!("OpConstant result type id not found"))?; fn lit2int(lit: &Lit) -> Result { match lit { Lit::Int(i) => Ok(*i), - Lit::Float(f, exponent_bias) => { - let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + Lit::Float(f) => { + let f = *f as f32; Ok(f as i64) }, Lit::String(_) => bail!("OpConstant expected a int or float literal"), @@ -344,8 +343,8 @@ impl Assembler { fn lit2float(lit: &Lit) -> Result { match lit { Lit::Int(i) => Ok(*i as f64), - Lit::Float(f, exponent_bias) => { - let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + Lit::Float(f) => { + let f = *f as f32; Ok(f as f64) }, Lit::String(_) => bail!("OpConstant expected a int or float literal"), @@ -532,9 +531,9 @@ impl Assembler { } } }, - Lit::Float(f, exponent_bias) => { + Lit::Float(f) => { // First cast to f32. - let f = (*f as f32) * 2.0f32.powi(*exponent_bias); + let f = *f as f32; // Then bit cast to u32. let u = f.to_bits(); builder = builder.push(u); diff --git a/spirq-spvasm/src/asm/tokenizer.rs b/spirq-spvasm/src/asm/tokenizer.rs index e3379bd..b8a3542 100644 --- a/spirq-spvasm/src/asm/tokenizer.rs +++ b/spirq-spvasm/src/asm/tokenizer.rs @@ -9,7 +9,7 @@ pub enum Lit { Int(i64), // Base numeric and the exponent bias. The effect of the bias depends on the // actual floating-point type it casts to. - Float(f64, i32), + Float(f64), String(String), } @@ -101,7 +101,7 @@ impl<'a> Tokenizer<'a> { } } } - Lit::Float(f64::from_str(buf.as_str())?, 0) + Lit::Float(f64::from_str(buf.as_str())?) }, _ => { // Integer. @@ -112,66 +112,79 @@ impl<'a> Tokenizer<'a> { } pub fn tokenize_numeric_literal_hexadecimal(&mut self) -> Result { - let mut buf = String::new(); + let mut int_buf = String::new(); while let Some(c) = self.chars.peek() { if c.is_ascii_hexdigit() { - buf.push(*c); + int_buf.push(*c); self.chars.next(); } else { break; } } - // In form of `0x1p0`. - let lit = if Some(&'.') == self.chars.peek() && buf == "1" { - // Float. - buf.push('.'); + + // Fraction without the dot. + let mut fraction_buf = String::new(); + if (int_buf == "0" || int_buf == "1") && (self.chars.peek() == Some(&'.')) { self.chars.next(); // Consume the '.'. - // In form of `0x1.2p0`. while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - buf.push(*c); + if c.is_ascii_hexdigit() { + fraction_buf.push(*c); self.chars.next(); } else { break; } } + } - let mantissa = f64::from_str(buf.as_str())?; - let mut exponent = 0; - - if let Some(c) = self.chars.peek() { - if c == &'p' || c == &'P' { - self.chars.next(); // Consume the 'p' or 'P'. - - // Float with exponent. - let mut exponent_buf = String::new(); - match self.chars.peek() { - Some('+') => { - self.chars.next(); - }, - Some('-') => { - exponent_buf.push('-'); - self.chars.next(); - }, - _ => {}, - } - while let Some(c) = self.chars.peek() { - if c.is_ascii_digit() { - exponent_buf.push(*c); - self.chars.next(); - } else { - break; - } - } - exponent = i32::from_str(&exponent_buf)?; + let mut exponent_buf = String::new(); + println!("peek: {:?}", self.chars.peek()); + if let Some('p') = self.chars.peek().map(|x| x.to_ascii_lowercase()) { + self.chars.next(); // Consume the 'p' or 'P'. + + // Float with exponent. + match self.chars.peek() { + Some('+') => { + self.chars.next(); + }, + Some('-') => { + exponent_buf.push('-'); + self.chars.next(); + }, + _ => {}, + } + while let Some(c) = self.chars.peek() { + if c.is_ascii_digit() { + exponent_buf.push(*c); + self.chars.next(); + } else { + break; } } + } + + let is_hexadecimal_float = fraction_buf.len() > 0 || exponent_buf.len() > 0; + if !fraction_buf.is_empty() { + if exponent_buf.is_empty() { + bail!("hexadecimal value with fraction part but the exponent bias is missing"); + } + } - Lit::Float(mantissa, exponent) + let lit = if is_hexadecimal_float { + // Assemble hexadecimal floating point numbers. + let int = i64::from_str_radix(&int_buf, 16)?; + let fraction = match fraction_buf.is_empty() { + true => 0, + false => i64::from_str_radix(&fraction_buf, 16)?, + }; + let exponent = i32::from_str(&exponent_buf)?; + + fraction_buf = fraction_buf.trim_start_matches('0').to_string(); + let f = ((int as f64) + (fraction as f64) / 16f64.powi(fraction_buf.len() as i32)) * 2f64.powi(exponent); + Lit::Float(f) } else { - // Integer. - Lit::Int(i64::from_str_radix(buf.as_str(), 16)?) + let i = i64::from_str_radix(&int_buf, 16)?; + Lit::Int(i) }; Ok(lit) @@ -222,7 +235,7 @@ impl<'a> Tokenizer<'a> { let lit = match lit { Lit::Int(i) => Lit::Int(i * mantissa_sign), - Lit::Float(f, e) => Lit::Float(f * mantissa_sign as f64, e), + Lit::Float(f) => Lit::Float(f * mantissa_sign as f64), Lit::String(_) => unreachable!(), }; @@ -378,7 +391,7 @@ mod test { assert_eq!(tokens.len(), 8); for (i, token) in tokens.iter().enumerate() { match token { - Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, i as f64), + Token::Literal(Lit::Float(n)) => assert_eq!(*n, i as f64), _ => panic!("unexpected token: {:?}", token), } } @@ -391,7 +404,7 @@ mod test { assert_eq!(tokens.len(), 8); for (i, token) in tokens.iter().enumerate() { match token { - Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)), + Token::Literal(Lit::Float(n)) => assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)), _ => panic!("unexpected token: {:?}", token), } } @@ -404,7 +417,7 @@ mod test { assert_eq!(tokens.len(), 8); for (i, token) in tokens.iter().enumerate() { match token { - Token::Literal(Lit::Float(n, _)) => assert_eq!(*n, (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 }))), + Token::Literal(Lit::Float(n)) => assert_eq!(*n, (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 }))), _ => panic!("unexpected token: {:?}", token), } } @@ -425,15 +438,12 @@ mod test { #[test] fn test_tokenize_hexadecimal_floats() { - let code = "0x1.0p0 0x1.1p+1 0x1.2p-2 -0x1.3p3 -0x1.4p+4 -0x1.5p-5"; + let code = "0x1.0p0 -0x1.8p-1"; let tokens = tokenize(code).unwrap(); - assert_eq!(tokens.len(), 6); - for ((mantissa, exponent), token) in [(1.0, 0), (1.1, 1), (1.2, -2), (-1.3, 3), (-1.4, 4), (-1.5, -5)].iter().zip(tokens.iter()) { + assert_eq!(tokens.len(), 2); + for (mantissa, token) in [1.0, -0.75].iter().zip(tokens.iter()) { match token { - Token::Literal(Lit::Float(n, e)) => { - assert_eq!(*n, *mantissa); - assert_eq!(*e, *exponent); - }, + Token::Literal(Lit::Float(n)) => assert_eq!(*n, *mantissa), _ => panic!("unexpected token: {:?}", token), } } diff --git a/spirq-spvasm/src/dis/auto_name.rs b/spirq-spvasm/src/dis/auto_name.rs index 4e89c0b..d6f8ef7 100644 --- a/spirq-spvasm/src/dis/auto_name.rs +++ b/spirq-spvasm/src/dis/auto_name.rs @@ -1,12 +1,14 @@ use std::collections::HashMap; use anyhow::Result; -use half::f16; use spirq::reflect::ReflectIntermediate; use spirq_core::{ty::{Type, ScalarType, VectorType, MatrixType, PointerType, ArrayType, StructType}, constant::ConstantValue}; +use super::utils::to_hexadecimal_float; + fn sanitize_name(name: &str) -> String { name.chars() + .map(|c| if c == '-' { 'n' } else { c }) .map(|c| if c.is_ascii_punctuation() { '_' } else { c }) .collect::() } @@ -155,21 +157,9 @@ impl AutoNamer { ConstantValue::U16(x) => format!("ushort_{}", x), ConstantValue::U32(x) => format!("uint_{}", x), ConstantValue::U64(x) => format!("ulong_{}", x), - ConstantValue::F16(x) => if x.0 < f16::ZERO { - format!("half_n{}", -x) - } else { - format!("half_{}", x) - }, - ConstantValue::F32(x) => if x.0 < 0.0 { - format!("float_n{}", -x) - } else { - format!("float_{}", x) - }, - ConstantValue::F64(x) => if x.0 < 0.0 { - format!("double_n{}", -x) - } else { - format!("double_{}", x) - }, + ConstantValue::F16(x) => format!("half_{}", to_hexadecimal_float(*x)), + ConstantValue::F32(x) => format!("float_{}", x), + ConstantValue::F64(x) => format!("double_{}", x), _ => return None, }; out = sanitize_name(&out); diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 79a45c7..295238f 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -4,7 +4,7 @@ use anyhow::{Result, bail}; use half::f16; use spirq::{reflect::ReflectIntermediate, ReflectConfig}; use spirq_core::{parse::{Instr, SpirvBinary, Instrs, Operands}, spirv::Op, ty::{self, Type}}; -use crate::generated; +use crate::{generated, dis::utils::to_hexadecimal_float}; use super::auto_name; pub struct Disassembler { @@ -123,7 +123,8 @@ impl Disassembler { }, ty::ScalarType::Float { bits: 16 } => { let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", f16::from_bits(u16::from_le_bytes([x[0], x[1]]))) + let f = f16::from_bits(u16::from_le_bytes([x[0], x[1]])); + format!(" {}", to_hexadecimal_float(f)) }, ty::ScalarType::Float { bits: 32 } => { let x = operands2.read_u32()?.to_le_bytes(); diff --git a/spirq-spvasm/src/dis/mod.rs b/spirq-spvasm/src/dis/mod.rs index 55008ac..0cf4df2 100644 --- a/spirq-spvasm/src/dis/mod.rs +++ b/spirq-spvasm/src/dis/mod.rs @@ -2,5 +2,6 @@ mod disassembler; mod auto_name; #[cfg(test)] mod test; +mod utils; pub use disassembler::Disassembler; diff --git a/spirq-spvasm/src/dis/utils.rs b/spirq-spvasm/src/dis/utils.rs new file mode 100644 index 0000000..876ba82 --- /dev/null +++ b/spirq-spvasm/src/dis/utils.rs @@ -0,0 +1,51 @@ +use num_traits::{Float, PrimInt}; + +pub fn to_hexadecimal_float(f: F) -> String { + let (mut mantissa, exponent, sign) = f.integer_decode(); + let mut exponent = exponent as i64; + + // Extract the sign bit. + let sign = if sign >= 0 { "" } else { "-" }; + + // Special case for zero. + if mantissa == 0 { + return format!("{}0x0p0", sign); + } + + // Remove the leading zeros and the implicit one. + let nleading_zero = mantissa.leading_zeros(); + mantissa <<= nleading_zero + 1; + exponent -= nleading_zero as i64 + 1; + + // Adjust for the exponent bias. + exponent += 64; + + let mut mantissa_str = String::new(); + while mantissa != 0 { + let digit = mantissa >> 60; + mantissa_str.push_str(&format!("{:x}", digit)); + mantissa <<= 4; + } + + if mantissa_str.is_empty() { + format!("{}0x1p{}", sign, exponent) + } else { + format!("{}0x1.{}p{}", sign, mantissa_str, exponent) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_print_hex_float() { + assert_eq!(to_hexadecimal_float(1.0), "0x1p0"); + assert_eq!(to_hexadecimal_float(2.0), "0x1p1"); + assert_eq!(to_hexadecimal_float(0.5), "0x1p-1"); + assert_eq!(to_hexadecimal_float(-0.5), "-0x1p-1"); + assert_eq!(to_hexadecimal_float(-0.75), "-0x1.8p-1"); + assert_eq!(to_hexadecimal_float(-0.875), "-0x1.cp-1"); + assert_eq!(to_hexadecimal_float(0.25), "0x1p-2"); + } +} From d2a82ec99513acb4e6f58061bf6b77b9b4cd048a Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 19:44:46 +0800 Subject: [PATCH 26/50] Remove file --- spirq-spvasm/src/asm/ty_reg.rs | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 spirq-spvasm/src/asm/ty_reg.rs diff --git a/spirq-spvasm/src/asm/ty_reg.rs b/spirq-spvasm/src/asm/ty_reg.rs deleted file mode 100644 index a54c913..0000000 --- a/spirq-spvasm/src/asm/ty_reg.rs +++ /dev/null @@ -1,15 +0,0 @@ -use std::collections::HashMap; - -use spirq_core::ty::Type; - -/// A tiny text-based type registry. It serves mainly to decide the input format -/// of OpConstant's LiteralContextDependentNumber. So we only process scalar -/// types here. -struct TinyTypeRegistry { - ty_map: HashMap, -} -impl TinyTypeRegistry { - pub fn reg_ty(&mut self, opcode: u32) { - self.ty_map.insert(id, ty); - } -} From eb2fdaee82e8d98bf974a9c854c3b516b21afff2 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 20:25:11 +0800 Subject: [PATCH 27/50] spirq-as and spirq-dis --- Cargo.lock | 11 +- shader-reflect/src/main.rs | 2 +- spirq-as/Cargo.toml | 6 +- spirq-as/src/lib.rs | 0 spirq-as/src/main.rs | 103 +++++++++ spirq-core/src/parse/bin.rs | 6 + spirq-core/src/parse/mod.rs | 2 +- spirq-dis/Cargo.toml | 5 +- spirq-dis/scripts/generate_code.py | 353 ----------------------------- spirq-dis/src/lib.rs | 0 spirq-dis/src/main.rs | 81 +++++++ spirq-spvasm/src/asm/tokenizer.rs | 1 - spirq-spvasm/src/dis/utils.rs | 2 +- spirq-spvasm/src/lib.rs | 4 + 14 files changed, 209 insertions(+), 367 deletions(-) delete mode 100644 spirq-as/src/lib.rs create mode 100644 spirq-as/src/main.rs delete mode 100644 spirq-dis/scripts/generate_code.py delete mode 100644 spirq-dis/src/lib.rs create mode 100644 spirq-dis/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index a825c6f..da61af9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -396,11 +396,11 @@ dependencies = [ [[package]] name = "spirq-as" -version = "0.2.3" +version = "0.1.0" dependencies = [ "anyhow", - "num-traits", - "spirq-core", + "clap", + "spirq-spvasm", ] [[package]] @@ -417,10 +417,11 @@ dependencies = [ [[package]] name = "spirq-dis" -version = "0.2.3" +version = "0.1.0" dependencies = [ "anyhow", - "spirq-core", + "clap", + "spirq-spvasm", ] [[package]] diff --git a/shader-reflect/src/main.rs b/shader-reflect/src/main.rs index efdb184..7a4e3de 100644 --- a/shader-reflect/src/main.rs +++ b/shader-reflect/src/main.rs @@ -13,7 +13,7 @@ use std::{ #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] struct Args { - #[arg(help = "Input SPIR-V file paths.")] + #[arg(help = "Input SPIR-V file path.")] in_path: String, #[arg( diff --git a/spirq-as/Cargo.toml b/spirq-as/Cargo.toml index dfa4170..aa9c74b 100644 --- a/spirq-as/Cargo.toml +++ b/spirq-as/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spirq-as" -version = "0.2.3" +version = "0.1.0" authors = ["PENGUINLIONG "] edition = "2018" license = "MIT OR Apache-2.0" @@ -19,5 +19,5 @@ maintenance = { status = "actively-developed" } [dependencies] anyhow = "1.0" -num-traits = "0.2" -spirq-core = { version = "1.0.0", path = "../spirq-core" } +spirq-spvasm = { version = "0.1.0", path = "../spirq-spvasm" } +clap = { version = "4.0.6", features = ["derive"] } diff --git a/spirq-as/src/lib.rs b/spirq-as/src/lib.rs deleted file mode 100644 index e69de29..0000000 diff --git a/spirq-as/src/main.rs b/spirq-as/src/main.rs new file mode 100644 index 0000000..9d082ec --- /dev/null +++ b/spirq-as/src/main.rs @@ -0,0 +1,103 @@ +use clap::Parser; +use spirq_spvasm::{Assembler, SpirvHeader}; +use std::{ + borrow::Borrow, + fs::File, + io::{stderr, Write, Read}, + path::Path, + process::exit, +}; + +const SPIRV_VERSION_1_0: u32 = 0x0001_0000; +const SPIRV_VERSION_1_1: u32 = 0x0001_0100; +const SPIRV_VERSION_1_2: u32 = 0x0001_0200; +const SPIRV_VERSION_1_3: u32 = 0x0001_0300; +const SPIRV_VERSION_1_4: u32 = 0x0001_0400; +const SPIRV_VERSION_1_5: u32 = 0x0001_0500; +const SPIRV_VERSION_1_6: u32 = 0x0001_0600; + +// TODO: (penguinliong) Get ourselves a generator ID. +const GENERATOR: u32 = 0; + +#[derive(Parser, Debug)] +#[command(author, version, about, long_about = None)] +struct Args { + #[arg(help = "Input SPIR-V assembly file path.")] + in_path: String, + + #[arg( + short, + long, + help = "Output SPIR-V file path. The output file is defaulted to \ + {in_path}.spv if this path is not given." + )] + out_path: Option, + + #[arg( + long, + help = "{vulkan1.1spv1.4|vulkan1.0|vulkan1.1|vulkan1.2|vulkan1.3 \ + |spv1.0|spv1.1|spv1.2|spv1.3|spv1.4|spv1.5|spv1.6} \ + Use specified environment." + )] + target_env: Option, +} + +fn main() { + let args = Args::parse(); + + let in_path = Path::new(&args.in_path); + let out_path = if let Some(out_path) = args.out_path { + Path::new(&out_path).to_owned() + } else { + Path::new(&format!("{}.spv", args.in_path)).to_owned() + }; + + let mut in_file = File::open(in_path).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to open input file: {}", e).unwrap(); + exit(1); + }); + + let mut code = String::new(); + in_file.read_to_string(&mut code) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); + + let header = match args.target_env.as_ref().map(Borrow::borrow) { + Some("vulken1.1spv1.4") => SpirvHeader::new(SPIRV_VERSION_1_4, GENERATOR), + Some("vulkan1.0") => SpirvHeader::new(SPIRV_VERSION_1_0, GENERATOR), + Some("vulkan1.1") => SpirvHeader::new(SPIRV_VERSION_1_1, GENERATOR), + Some("vulkan1.2") => SpirvHeader::new(SPIRV_VERSION_1_2, GENERATOR), + Some("vulkan1.3") => SpirvHeader::new(SPIRV_VERSION_1_3, GENERATOR), + Some("spv1.0") => SpirvHeader::new(SPIRV_VERSION_1_0, GENERATOR), + Some("spv1.1") => SpirvHeader::new(SPIRV_VERSION_1_1, GENERATOR), + Some("spv1.2") => SpirvHeader::new(SPIRV_VERSION_1_2, GENERATOR), + Some("spv1.3") => SpirvHeader::new(SPIRV_VERSION_1_3, GENERATOR), + Some("spv1.4") => SpirvHeader::new(SPIRV_VERSION_1_4, GENERATOR), + Some("spv1.5") => SpirvHeader::new(SPIRV_VERSION_1_5, GENERATOR), + Some("spv1.6") => SpirvHeader::new(SPIRV_VERSION_1_6, GENERATOR), + None => SpirvHeader::new(SPIRV_VERSION_1_4, GENERATOR), + _ => { + writeln!(stderr(), "error: unknown target environment: {}", args.target_env.unwrap()).unwrap(); + exit(1); + } + }; + + let spv = Assembler::new().assemble(&code, header).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); + + let mut out_file = File::create(out_path) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to open output file: {}", e).unwrap(); + exit(1); + }); + + out_file.write_all(&spv.into_bytes()) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to write output file: {}", e).unwrap(); + exit(1); + }); +} diff --git a/spirq-core/src/parse/bin.rs b/spirq-core/src/parse/bin.rs index ccac1a3..3498954 100644 --- a/spirq-core/src/parse/bin.rs +++ b/spirq-core/src/parse/bin.rs @@ -88,6 +88,12 @@ impl SpirvBinary { pub fn into_words(self) -> Vec { self.0 } + pub fn into_bytes(self) -> Vec { + self.0 + .iter() + .flat_map(|x| x.to_le_bytes().to_vec()) + .collect::>() + } pub fn instrs(&self) -> Result { const HEADER_LEN: usize = 5; diff --git a/spirq-core/src/parse/mod.rs b/spirq-core/src/parse/mod.rs index e524924..d8a46c8 100644 --- a/spirq-core/src/parse/mod.rs +++ b/spirq-core/src/parse/mod.rs @@ -1,5 +1,5 @@ pub mod bin; pub mod instr; -pub use bin::SpirvBinary; +pub use bin::{SpirvBinary, SpirvHeader}; pub use instr::{Instr, Instrs, Instruction, InstructionBuilder, Operands}; diff --git a/spirq-dis/Cargo.toml b/spirq-dis/Cargo.toml index d136bb6..991a5e1 100644 --- a/spirq-dis/Cargo.toml +++ b/spirq-dis/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spirq-dis" -version = "0.2.3" +version = "0.1.0" authors = ["PENGUINLIONG "] edition = "2018" license = "MIT OR Apache-2.0" @@ -19,4 +19,5 @@ maintenance = { status = "actively-developed" } [dependencies] anyhow = "1.0" -spirq-core = { version = "1.0.0", path = "../spirq-core" } +spirq-spvasm = { version = "0.1.0", path = "../spirq-spvasm" } +clap = { version = "4.0.6", features = ["derive"] } diff --git a/spirq-dis/scripts/generate_code.py b/spirq-dis/scripts/generate_code.py deleted file mode 100644 index e73d527..0000000 --- a/spirq-dis/scripts/generate_code.py +++ /dev/null @@ -1,353 +0,0 @@ -import json -from typing import Any, Dict, List - -with open('spirv.core.grammar.json', 'r') as f: - J = json.load(f) - -magic_number = J['magic_number'] -major_version = J['major_version'] -minor_version = J['minor_version'] -revision = J['revision'] - -instruction_printing_class = J['instruction_printing_class'] -instructions = J['instructions'] -operand_kinds = J['operand_kinds'] -operand_kinds = {operand_kind['kind']: operand_kind for operand_kind in operand_kinds} - - -def make_header() -> List[str]: - out = [ - "// Path: src/spirv_core_grammar.rs", - "// This file is generated by generate_code.py", - "#![allow(non_camel_case_types)]", - "#![allow(non_snake_case)]", - "use bitflags::bitflags;", - "use num_traits::FromPrimitive;", - "", - f"pub const MAGIC_NUMBER: u32 = {magic_number};", - f"pub const MAJOR_VERSION: u16 = {major_version};", - f"pub const MINOR_VERSION: u16 = {minor_version};", - f"pub const REVISION: u32 = {revision};", - "", - "pub type Result = anyhow::Result;", - "", - "pub struct Instruction {", - " pub opcode: u16,", - " pub operands: Vec,", - "}", - ] - return out - - -def make_type_defs() -> List[str]: - out = [ - ] - return out - - -def as_name(x: str) -> str: - if x[0].isdigit(): - return f"_{x}" - return x - - -def make_operand_kind_typedef_BitEnum(kind: str, operand_kind: Any) -> List[str]: - out = [] - enumerants = operand_kind['enumerants'] - out += [ - f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", - f"pub struct Operand_{kind} {{", - f" pub value: spirv::{as_name(kind)},", - f"}}", - ] - out += [ - f"impl Operand_{as_name(kind)} {{", - " pub fn parse(x: &mut impl Iterator) -> Option {", - " let data = x.next()?;", - f" let value = spirv::{as_name(kind)}::from_bits_truncate(data);", - " Some(Self { value })", - " }", - "}", - "", - ] - return out - -def make_operand_kind_typedef_ValueEnum(kind: str, operand_kind: Any) -> List[str]: - out = [] - enumerants = operand_kind['enumerants'] - out += [ - f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", - f"pub struct Operand_{as_name(kind)} {{", - f" pub value: spirv::{as_name(kind)},", - f"}}", - ] - out += [ - f"impl Operand_{as_name(kind)} {{", - " pub fn parse(x: &mut impl Iterator) -> Option {", - " let data = x.next()?;", - f" let value = spirv::{as_name(kind)}::from_u32(data)?;", - " Some(Self { value })", - " }", - "}", - ] - return out - -def make_operand_kind_typedef_Id(kind: str, operand_kind: Any) -> List[str]: - out = [] - out += [ - f"#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", - f"pub struct Operand_{as_name(kind)} {{", - f" pub id: u32,", - f"}}", - ] - out += [ - f"impl Operand_{as_name(kind)} {{", - f" pub fn parse(x: &mut impl Iterator) -> Option {{", - f" let id = x.next()?;", - f" Some(Self {{ id }})", - f" }}", - f"}}", - ] - return out - -def make_operand_kind_typedef_Literal(kind: str, operand_kind: Any) -> List[str]: - out = [] - out += [ - f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", - f"pub struct Operand_{as_name(kind)} {{", - f" pub value: Vec,", - f"}}", - ] - if kind == 'LiteralContextDependentNumber': - out += [ - f"impl Operand_{as_name(kind)} {{", - f" pub fn parse(x: &mut impl Iterator) -> Option {{", - f" let mut value = Vec::new();", - f" while let Some(data) = x.next() {{", - f" value.push(data);", - f" }}", - f" Some(Self {{ value }})", - f" }}", - f"}}", - ] - else: - out += [ - f"impl Operand_{as_name(kind)} {{", - f" pub fn parse(x: &mut impl Iterator) -> Option {{", - f" if let Some(data) = x.next() {{", - f" Some(Self {{ value: vec![data] }})", - f" }} else {{", - f" None", - f" }}", - f" }}", - f"}}", - ] - return out - -def make_operand_kind_typedef_Composite(kind: str, operand_kind: Any) -> List[str]: - out = [] - operand_kind = operand_kinds[kind] - bases = operand_kind['bases'] - out += [ - f"#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]", - f"pub struct Operand_{as_name(kind)} {{", - ] - for i, base in enumerate(bases): - out += [ - f" pub _{i}: Operand_{base},", - ] - out += [ - f"}}", - ] - out += [ - f"impl Operand_{as_name(kind)} {{", - f" pub fn parse(x: &mut impl Iterator) -> Option {{", - f" Some(Self {{", - ] - for i, base in enumerate(bases): - out += [ - f" _{i}: Operand_{base}::parse(x)?,", - ] - out += [ - f" }})", - f" }}", - f"}}", - ] - return out - -def make_operand_kind_typedef(kind: str, operand_kinds: Dict[str, Any]) -> List[str]: - out = [] - operand_kind = operand_kinds[kind] - kind = operand_kind['kind'] - category = operand_kind['category'] - if category == 'BitEnum': - out += make_operand_kind_typedef_BitEnum(kind, operand_kind) - elif category == 'ValueEnum': - out += make_operand_kind_typedef_ValueEnum(kind, operand_kind) - elif category == 'Id': - out += make_operand_kind_typedef_Id(kind, operand_kind) - elif category == 'Literal': - out += make_operand_kind_typedef_Literal(kind, operand_kind) - elif category == 'Composite': - out += make_operand_kind_typedef_Composite(kind, operand_kind) - else: - assert False, f"Unknown category: {category}" - - out += [ - f"impl Into for Operand_{as_name(kind)} {{", - f" fn into(self) -> Operand {{", - f" Operand::{kind}(self)", - f" }}", - f"}}", - "", - ] - - return out - -def make_operand_kind_section(operand_kinds: Dict[str, Any]) -> List[str]: - out = [] - - for kind in operand_kinds: - out += make_operand_kind_typedef(kind, operand_kinds) - - out += [ - "enum Operand {", - ] - for kind in operand_kinds: - out += [f" {kind}(Operand_{kind}),"] - out += [ - "}", - "", - ] - return out - -def make_parse_operand_section(operand_kinds: Dict[str, Any]) -> List[str]: - out = [] - for operand in operand_kinds.values(): - kind = operand['kind'] - quantifier = operand['quantifier'] if 'quantifier' in operand else None - out += [f"fn parse_{kind}<'a>(operands: &'a mut impl Iterator, out: &mut Vec) -> Operand<'a> {{"] - print(kind, quantifier) - if quantifier is None: - out += [ - " let data: u32 = operands.next().unwrap();", - f" out.push(Operand::{kind}(Operand_{kind}::parse(data)));", - ] - else: - print(f"{kind} is quantified with {quantifier} but parameter quantification is not allowed yet.") - continue - out += ["}"] - return out - -def parse_instruction_operand(operand: Any) -> List[str]: - out = [] - kind = operand['kind'] - quantifier = operand['quantifier'] if 'quantifier' in operand else None - if quantifier is None: - out += [ - " if operands.peek().is_some() {", - f" out_operands.push(Operand_{kind}::parse(data)?.into());", - " } else {", - f" anyhow::bail!(\"Expected operand {kind} but none found\");", - " }", - ] - elif quantifier == '?': - out += [ - " if operands.peek().is_some() {", - f" out_operands.push(Operand_{kind}::parse(data)?.into());", - " }", - ] - elif quantifier == '*': - out += [ - " while operands.peek().is_some() {", - f" out_operands.push(Operand_{kind}::parse(data)?.into());", - " }", - ] - else: - print(f"{kind} is quantified with {quantifier} but parameter quantification is not allowed yet.") - - return out - -def make_parse_instruction(instruction: Any) -> List[str]: - out = [] - opname = instruction['opname'] - clazz = instruction['class'] - opcode = instruction['opcode'] - operands = instruction['operands'] if 'operands' in instruction else [] - - out += [ - f"fn parse_{opname}<'a>(operands: &[u32], out_operands: &mut Vec) -> Result<()> {{", - f" let mut data = operands.iter().peek().copied();", - ] - for operand in operands: - out += parse_instruction_operand(operand) - out += [ - " Ok(())", - "}", - ] - - return out - -def make_parse_instructions(instructions: Any) -> List[str]: - out = [] - for instruction in instructions: - out += make_parse_instruction(instruction) - - out += [ - "fn parse_instruction(opcode: u16, operands: &[u32]) -> Result {", - " let out_operands = Vec::new();", - " match opcode {" - ] - for instruction in instructions: - opname = instruction['opname'] - opcode = instruction['opcode'] - out += [ - f" {opcode} => parse_{opname}(operands, &mut out_operands),", - ] - out += [ - f" _ => anyhow::bail!(\"Unknown opcode: {{}}\", opcode),", - " }", - " let out = Instruction {", - " opcode,", - " operands: Vec::new(),", - " };", - " Ok(Instruction {", - " opcode,", - " operands: out_operands,", - " })", - "}", - "", - ] - - out += [ - "pub fn parse(words: &[u32]) -> Result> {", - " let mut out = Vec::new();", - " let mut words = words.iter();", - " while let Some(opcode) = words.next() {", - " let word_count = (opcode >> 16) & 0xffff;", - " let opcode = opcode & 0xffff;", - " let mut operands = Vec::new();", - " for _ in 0..word_count {", - " operands.push(words.next().copied().unwrap());", - " }", - " out.push(parse_instruction(opcode, &operands)?);", - " }", - " Ok(out)", - "}", - "", - ] - - return out - - -lines = [] -lines += make_header() -lines += make_type_defs() -lines += make_operand_kind_section(operand_kinds) -#lines += make_parse_operand_section(operand_kinds) -lines += make_parse_instructions(instructions) - -lines = '\n'.join(lines) - -with open('src/spirv_core_grammar.rs', 'w') as f: - f.write(lines) diff --git a/spirq-dis/src/lib.rs b/spirq-dis/src/lib.rs deleted file mode 100644 index e69de29..0000000 diff --git a/spirq-dis/src/main.rs b/spirq-dis/src/main.rs new file mode 100644 index 0000000..8303005 --- /dev/null +++ b/spirq-dis/src/main.rs @@ -0,0 +1,81 @@ +use clap::Parser; +use spirq_spvasm::{SpirvBinary, Disassembler}; +use std::{ + borrow::Borrow, + fs::File, + io::{stderr, Write, Read}, + path::Path, + process::exit, +}; + +#[derive(Parser, Debug)] +#[command(author, version, about, long_about = None)] +struct Args { + #[arg(help = "Input SPIR-V file path.")] + in_path: String, + + #[arg( + short, + long, + help = "Output SPIR-V assembly file path. The output is printed to \ + stdout if this path is not given." + )] + out_path: Option, + + #[arg( + long, + help = "Don't output the header as leading comments." + )] + no_header: bool, + + #[arg( + long, + help = "Show raw Id values instead of friendly names." + )] + raw_id: bool, +} + +fn main() { + let args = Args::parse(); + + let in_path = Path::new(&args.in_path); + + let mut in_file = File::open(in_path).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to open input file: {}", e).unwrap(); + exit(1); + }); + + let mut spv = Vec::new(); + in_file.read_to_end(&mut spv) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); + + let dis = Disassembler::new() + .print_header(!args.no_header) + .name_ids(!args.raw_id) + .name_type_ids(!args.raw_id) + .name_const_ids(!args.raw_id); + let mut spvasm = dis.disassemble(&SpirvBinary::from(spv)).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); + spvasm.push('\n'); + + if let Some(out_path) = args.out_path { + let out_path = Path::new(&out_path).to_owned(); + let mut out_file = File::create(out_path) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to open output file: {}", e).unwrap(); + exit(1); + }); + out_file.write_all(&spvasm.into_bytes()) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to write output file: {}", e).unwrap(); + exit(1); + }); + } else { + println!("{}", spvasm); + }; +} diff --git a/spirq-spvasm/src/asm/tokenizer.rs b/spirq-spvasm/src/asm/tokenizer.rs index b8a3542..604eab9 100644 --- a/spirq-spvasm/src/asm/tokenizer.rs +++ b/spirq-spvasm/src/asm/tokenizer.rs @@ -138,7 +138,6 @@ impl<'a> Tokenizer<'a> { } let mut exponent_buf = String::new(); - println!("peek: {:?}", self.chars.peek()); if let Some('p') = self.chars.peek().map(|x| x.to_ascii_lowercase()) { self.chars.next(); // Consume the 'p' or 'P'. diff --git a/spirq-spvasm/src/dis/utils.rs b/spirq-spvasm/src/dis/utils.rs index 876ba82..d5fb0c1 100644 --- a/spirq-spvasm/src/dis/utils.rs +++ b/spirq-spvasm/src/dis/utils.rs @@ -1,4 +1,4 @@ -use num_traits::{Float, PrimInt}; +use num_traits::Float; pub fn to_hexadecimal_float(f: F) -> String { let (mut mantissa, exponent, sign) = f.integer_decode(); diff --git a/spirq-spvasm/src/lib.rs b/spirq-spvasm/src/lib.rs index 301097d..0eb3024 100644 --- a/spirq-spvasm/src/lib.rs +++ b/spirq-spvasm/src/lib.rs @@ -3,3 +3,7 @@ pub mod dis; mod generated; #[cfg(test)] mod test; + +pub use crate::asm::Assembler; +pub use crate::dis::Disassembler; +pub use spirq_core::parse::{SpirvBinary, SpirvHeader}; From daabb869c4a323fee17db30887780c2562fa60ff Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 20:38:39 +0800 Subject: [PATCH 28/50] Indented output as in spirv-dis --- spirq-dis/src/main.rs | 1 - spirq-spvasm/src/dis/disassembler.rs | 30 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/spirq-dis/src/main.rs b/spirq-dis/src/main.rs index 8303005..36f68fc 100644 --- a/spirq-dis/src/main.rs +++ b/spirq-dis/src/main.rs @@ -1,7 +1,6 @@ use clap::Parser; use spirq_spvasm::{SpirvBinary, Disassembler}; use std::{ - borrow::Borrow, fs::File, io::{stderr, Write, Read}, path::Path, diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 295238f..bcc4e07 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -12,6 +12,7 @@ pub struct Disassembler { name_ids: bool, name_type_ids: bool, name_const_ids: bool, + indent: bool, } impl Disassembler { pub fn new() -> Self { @@ -20,6 +21,7 @@ impl Disassembler { name_ids: false, name_type_ids: false, name_const_ids: false, + indent: true, } } @@ -54,6 +56,11 @@ impl Disassembler { self.name_const_ids = value; self } + /// Indent the output. + pub fn indent(mut self, value: bool) -> Self { + self.indent = value; + self + } fn print_id(&self, id: u32, id_names: &HashMap) -> Result { if let Some(name) = id_names.get(&id) { @@ -252,8 +259,29 @@ impl Disassembler { HashMap::new() }; - let instrs = self.print(spv, &itm, id_names)?; + let mut instrs = self.print(spv, &itm, id_names)?; + instrs.push(String::new()); // Trailing newline. + + if self.indent { + let max_eq_pos = instrs.iter() + .filter_map(|instr| instr.find('=')) // Skip lines without an assignment. + .max() + .unwrap_or(0) + .min(15); + let mut instrs2 = Vec::new(); + for instr in instrs { + let indent = if let Some(eq_pos) = instr.find('=') { + max_eq_pos - eq_pos.min(max_eq_pos) + } else { + max_eq_pos + 2 + }; + instrs2.push(format!("{}{}", " ".repeat(indent), instr)); + } + instrs = instrs2; + } + out.extend(instrs); + Ok(out.join("\n")) } } From 2202e78f6c2b08be8891ca7b0a1e046f2f894afb Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 20:41:51 +0800 Subject: [PATCH 29/50] Tweak --- spirq-core/src/parse/instr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 0c2e3c1..b6eb61c 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -207,7 +207,7 @@ impl<'a> Operands<'a> { } } pub fn read_f32(&mut self) -> Result { - self.read_u32().map(|x| f32::from_ne_bytes(x.to_ne_bytes())) + self.read_u32().map(|x| f32::from_bits(x)) } pub fn read_id(&mut self) -> Result { self.read_u32() From c535aafcf3a67e226d9fa41267b5f07e8a7aaad1 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 20:42:54 +0800 Subject: [PATCH 30/50] Tweak --- spirq-dis/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spirq-dis/src/main.rs b/spirq-dis/src/main.rs index 36f68fc..e87a8b9 100644 --- a/spirq-dis/src/main.rs +++ b/spirq-dis/src/main.rs @@ -56,11 +56,10 @@ fn main() { .name_ids(!args.raw_id) .name_type_ids(!args.raw_id) .name_const_ids(!args.raw_id); - let mut spvasm = dis.disassemble(&SpirvBinary::from(spv)).unwrap_or_else(|e| { + let spvasm = dis.disassemble(&SpirvBinary::from(spv)).unwrap_or_else(|e| { writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); exit(1); }); - spvasm.push('\n'); if let Some(out_path) = args.out_path { let out_path = Path::new(&out_path).to_owned(); From 13a7bd7af91f5def3a6b51330036bd19d12fbbda Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 20:44:23 +0800 Subject: [PATCH 31/50] Format code --- spirq-as/src/main.rs | 42 +- spirq-core/src/annotation.rs | 2 +- spirq-core/src/constant.rs | 2 +- spirq-core/src/ty/reg.rs | 2 +- spirq-dis/src/main.rs | 45 +- spirq-spvasm/src/asm/assembler.rs | 137 +- spirq-spvasm/src/asm/mod.rs | 2 +- spirq-spvasm/src/asm/tokenizer.rs | 48 +- spirq-spvasm/src/dis/auto_name.rs | 87 +- spirq-spvasm/src/dis/disassembler.rs | 196 +- spirq-spvasm/src/dis/mod.rs | 2 +- spirq-spvasm/src/dis/test.rs | 3 +- spirq-spvasm/src/generated/enum_from_str.rs | 188 +- spirq-spvasm/src/generated/enum_to_str.rs | 94 +- spirq-spvasm/src/generated/mod.rs | 4 +- .../src/generated/operand_enum_type.rs | 209 +- spirq-spvasm/src/generated/print_operand.rs | 2828 +++++++---------- spirq-spvasm/src/test.rs | 8 +- spirq/src/reflect.rs | 15 +- spirq/src/reflect_cfg.rs | 6 +- 20 files changed, 1677 insertions(+), 2243 deletions(-) diff --git a/spirq-as/src/main.rs b/spirq-as/src/main.rs index 9d082ec..00abac6 100644 --- a/spirq-as/src/main.rs +++ b/spirq-as/src/main.rs @@ -3,7 +3,7 @@ use spirq_spvasm::{Assembler, SpirvHeader}; use std::{ borrow::Borrow, fs::File, - io::{stderr, Write, Read}, + io::{stderr, Read, Write}, path::Path, process::exit, }; @@ -58,11 +58,10 @@ fn main() { }); let mut code = String::new(); - in_file.read_to_string(&mut code) - .unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); - exit(1); - }); + in_file.read_to_string(&mut code).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); let header = match args.target_env.as_ref().map(Borrow::borrow) { Some("vulken1.1spv1.4") => SpirvHeader::new(SPIRV_VERSION_1_4, GENERATOR), @@ -79,25 +78,30 @@ fn main() { Some("spv1.6") => SpirvHeader::new(SPIRV_VERSION_1_6, GENERATOR), None => SpirvHeader::new(SPIRV_VERSION_1_4, GENERATOR), _ => { - writeln!(stderr(), "error: unknown target environment: {}", args.target_env.unwrap()).unwrap(); + writeln!( + stderr(), + "error: unknown target environment: {}", + args.target_env.unwrap() + ) + .unwrap(); exit(1); } }; - let spv = Assembler::new().assemble(&code, header).unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); - exit(1); - }); - - let mut out_file = File::create(out_path) + let spv = Assembler::new() + .assemble(&code, header) .unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to open output file: {}", e).unwrap(); + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); exit(1); }); - out_file.write_all(&spv.into_bytes()) - .unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to write output file: {}", e).unwrap(); - exit(1); - }); + let mut out_file = File::create(out_path).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to open output file: {}", e).unwrap(); + exit(1); + }); + + out_file.write_all(&spv.into_bytes()).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to write output file: {}", e).unwrap(); + exit(1); + }); } diff --git a/spirq-core/src/annotation.rs b/spirq-core/src/annotation.rs index 5bcce77..f553f01 100644 --- a/spirq-core/src/annotation.rs +++ b/spirq-core/src/annotation.rs @@ -233,7 +233,7 @@ impl<'a> NameRegistry<'a> { .copied() } - pub fn iter(&self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator { self.name_map.iter() } } diff --git a/spirq-core/src/constant.rs b/spirq-core/src/constant.rs index 61f1985..4dfe527 100644 --- a/spirq-core/src/constant.rs +++ b/spirq-core/src/constant.rs @@ -139,7 +139,7 @@ impl ConstantValue { ScalarType::Float { bits: 16 } if x.len() == 4 => { let x = f16::from_le_bytes([x[0], x[1]]); Ok(ConstantValue::F16(OrderedFloat(x))) - }, + } ScalarType::Float { bits: 32 } if x.len() == 4 => { let x = f32::from_le_bytes([x[0], x[1], x[2], x[3]]); Ok(ConstantValue::F32(OrderedFloat(x))) diff --git a/spirq-core/src/ty/reg.rs b/spirq-core/src/ty/reg.rs index 8b3ec8d..79dd323 100644 --- a/spirq-core/src/ty/reg.rs +++ b/spirq-core/src/ty/reg.rs @@ -44,7 +44,7 @@ impl TypeRegistry { .ok_or(anyhow!("missing type id {}", id)) } - pub fn iter(&self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator { self.ty_map.iter() } } diff --git a/spirq-dis/src/main.rs b/spirq-dis/src/main.rs index e87a8b9..f3b4dc0 100644 --- a/spirq-dis/src/main.rs +++ b/spirq-dis/src/main.rs @@ -1,8 +1,8 @@ use clap::Parser; -use spirq_spvasm::{SpirvBinary, Disassembler}; +use spirq_spvasm::{Disassembler, SpirvBinary}; use std::{ fs::File, - io::{stderr, Write, Read}, + io::{stderr, Read, Write}, path::Path, process::exit, }; @@ -21,16 +21,10 @@ struct Args { )] out_path: Option, - #[arg( - long, - help = "Don't output the header as leading comments." - )] + #[arg(long, help = "Don't output the header as leading comments.")] no_header: bool, - #[arg( - long, - help = "Show raw Id values instead of friendly names." - )] + #[arg(long, help = "Show raw Id values instead of friendly names.")] raw_id: bool, } @@ -45,30 +39,31 @@ fn main() { }); let mut spv = Vec::new(); - in_file.read_to_end(&mut spv) - .unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); - exit(1); - }); + in_file.read_to_end(&mut spv).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); let dis = Disassembler::new() .print_header(!args.no_header) .name_ids(!args.raw_id) .name_type_ids(!args.raw_id) .name_const_ids(!args.raw_id); - let spvasm = dis.disassemble(&SpirvBinary::from(spv)).unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); - exit(1); - }); + let spvasm = dis + .disassemble(&SpirvBinary::from(spv)) + .unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to read input file: {}", e).unwrap(); + exit(1); + }); if let Some(out_path) = args.out_path { let out_path = Path::new(&out_path).to_owned(); - let mut out_file = File::create(out_path) - .unwrap_or_else(|e| { - writeln!(stderr(), "error: failed to open output file: {}", e).unwrap(); - exit(1); - }); - out_file.write_all(&spvasm.into_bytes()) + let mut out_file = File::create(out_path).unwrap_or_else(|e| { + writeln!(stderr(), "error: failed to open output file: {}", e).unwrap(); + exit(1); + }); + out_file + .write_all(&spvasm.into_bytes()) .unwrap_or_else(|e| { writeln!(stderr(), "error: failed to write output file: {}", e).unwrap(); exit(1); diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index d80e8d9..4b21172 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -1,12 +1,15 @@ -use std::collections::{HashMap, HashSet, hash_map::Entry}; +use std::collections::{hash_map::Entry, HashMap, HashSet}; +use super::tokenizer::{Lit, Token, Tokenizer}; +use crate::generated; use anyhow::{anyhow, bail, Result}; use half::f16; use num_traits::FromPrimitive; -use spirq_core::{spirv::Op, parse::{InstructionBuilder, bin::SpirvHeader, SpirvBinary}, ty::ScalarType}; -use super::tokenizer::{Token, Tokenizer, Lit}; -use crate::generated; - +use spirq_core::{ + parse::{bin::SpirvHeader, InstructionBuilder, SpirvBinary}, + spirv::Op, + ty::ScalarType, +}; #[derive(Debug, Clone, Hash, PartialEq, Eq)] enum IdRef { @@ -74,9 +77,7 @@ impl Assembler { fn parse_opcode(&self, s: &mut TokenStream) -> Result { let token = s.next()?.ok_or_else(|| anyhow!("expected opcode"))?; match token { - Token::Ident(ident) => { - generated::op_from_str(&ident) - } + Token::Ident(ident) => generated::op_from_str(&ident), _ => Err(anyhow!("expected opcode")), } } @@ -104,12 +105,8 @@ impl Assembler { let idref = self.str2idref(id); Ok(Operand::IdRef(idref)) } - Token::Literal(lit) => { - Ok(Operand::Literal(lit.clone())) - } - Token::Ident(ident) => { - Ok(Operand::Ident(ident.clone())) - } + Token::Literal(lit) => Ok(Operand::Literal(lit.clone())), + Token::Ident(ident) => Ok(Operand::Ident(ident.clone())), _ => Err(anyhow!("expected operand, but {:?}", token)), } } @@ -127,15 +124,15 @@ impl Assembler { match token { Token::Comment(_) => { s.next()?; - }, + } Token::NewLine => { s.next()?; break; - }, + } _ => { let operand = self.parse_operand(s)?; operands.push(operand); - }, + } }; } @@ -154,15 +151,15 @@ impl Assembler { match token { Token::Comment(_) => { s.next()?; - }, + } Token::NewLine => { s.next()?; break; - }, + } _ => { let operand = self.parse_operand(s)?; operands.push(operand); - }, + } }; } @@ -182,7 +179,7 @@ impl Assembler { } Token::NewLine => { s.next()?; - }, + } Token::Ident(_) => { let instr = self.parse_instr_without_result_id(s)?; return Ok(Some(instr)); @@ -235,9 +232,7 @@ impl Assembler { let id = self.acquire_id(name); IdRef::Id(id) } - IdRef::Id(id) => { - IdRef::Id(*id) - } + IdRef::Id(id) => IdRef::Id(*id), }; Ok(out) } @@ -256,7 +251,9 @@ impl Assembler { _ => bail!("OpTypeInt signedness expected literal integer"), }; - let result_id = instr.result_id.as_ref() + let result_id = instr + .result_id + .as_ref() .and_then(|idref| match idref { IdRef::Id(id) => Some(*id), _ => None, @@ -271,7 +268,7 @@ impl Assembler { }; entry.insert(scalar_ty); } - Entry::Occupied(_) => bail!("OpTypeInt result id already exists") + Entry::Occupied(_) => bail!("OpTypeInt result id already exists"), } let instr = InstructionBuilder::new(Op::TypeInt) @@ -291,7 +288,9 @@ impl Assembler { _ => bail!("OpTypeFloat width expected literal integer"), }; - let result_id = instr.result_id.as_ref() + let result_id = instr + .result_id + .as_ref() .and_then(|idref| match idref { IdRef::Id(id) => Some(*id), _ => None, @@ -300,12 +299,10 @@ impl Assembler { match self.scalar_tys.entry(result_id) { Entry::Vacant(entry) => { - let scalar_ty = ScalarType::Float { - bits: width, - }; + let scalar_ty = ScalarType::Float { bits: width }; entry.insert(scalar_ty); } - Entry::Occupied(_) => bail!("OpTypeFloat result id already exists") + Entry::Occupied(_) => bail!("OpTypeFloat result id already exists"), } let instr = InstructionBuilder::new(Op::TypeFloat) @@ -327,7 +324,9 @@ impl Assembler { _ => bail!("OpConstant expected result id"), }; - let scalar_ty = self.scalar_tys.get(&result_type_id) + let scalar_ty = self + .scalar_tys + .get(&result_type_id) .ok_or_else(|| anyhow!("OpConstant result type id not found"))?; fn lit2int(lit: &Lit) -> Result { @@ -336,7 +335,7 @@ impl Assembler { Lit::Float(f) => { let f = *f as f32; Ok(f as i64) - }, + } Lit::String(_) => bail!("OpConstant expected a int or float literal"), } } @@ -346,7 +345,7 @@ impl Assembler { Lit::Float(f) => { let f = *f as f32; Ok(f as f64) - }, + } Lit::String(_) => bail!("OpConstant expected a int or float literal"), } } @@ -358,7 +357,10 @@ impl Assembler { let mut value_buf = [0u32; 2]; let value: &[u32] = match scalar_ty { - ScalarType::Integer { bits: 8, is_signed: true } => { + ScalarType::Integer { + bits: 8, + is_signed: true, + } => { let value = lit2int(value)?; if let Some(value) = i8::from_i64(value) { value_buf[0] = value as u32; @@ -367,7 +369,10 @@ impl Assembler { bail!("expected a i8 literal in range [-128, 127]"); } } - ScalarType::Integer { bits: 16, is_signed: true } => { + ScalarType::Integer { + bits: 16, + is_signed: true, + } => { let value = lit2int(value)?; if let Some(value) = i16::from_i64(value) { value_buf[0] = value as u32; @@ -376,7 +381,10 @@ impl Assembler { bail!("expected a i16 literal in range [-32768, 32767]"); } } - ScalarType::Integer { bits: 32, is_signed: true } => { + ScalarType::Integer { + bits: 32, + is_signed: true, + } => { let value = lit2int(value)?; if let Some(value) = i32::from_i64(value) { value_buf[0] = value as u32; @@ -385,14 +393,20 @@ impl Assembler { bail!("expected a i32 literal in range [-2147483648, 2147483647]"); } } - ScalarType::Integer { bits: 64, is_signed: true } => { + ScalarType::Integer { + bits: 64, + is_signed: true, + } => { let value = lit2int(value)?; let x = value.to_le_bytes(); value_buf[0] = u32::from_le_bytes([x[0], x[1], x[2], x[3]]); value_buf[1] = u32::from_le_bytes([x[4], x[5], x[6], x[7]]); &value_buf[..2] } - ScalarType::Integer { bits: 8, is_signed: false } => { + ScalarType::Integer { + bits: 8, + is_signed: false, + } => { let value = lit2int(value)?; if let Some(value) = u8::from_i64(value) { value_buf[0] = value as u32; @@ -401,7 +415,10 @@ impl Assembler { bail!("expected a u8 literal in range [0, 255]"); } } - ScalarType::Integer { bits: 16, is_signed: false } => { + ScalarType::Integer { + bits: 16, + is_signed: false, + } => { let value = lit2int(value)?; if let Some(value) = u16::from_i64(value) { value_buf[0] = value as u32; @@ -410,7 +427,10 @@ impl Assembler { bail!("expected a u16 literal in range [0, 65535]"); } } - ScalarType::Integer { bits: 32, is_signed: false } => { + ScalarType::Integer { + bits: 32, + is_signed: false, + } => { let value = lit2int(value)?; if let Some(value) = u32::from_i64(value) { value_buf[0] = value as u32; @@ -419,7 +439,10 @@ impl Assembler { bail!("expected a u32 literal in range [0, 4294967295]"); } } - ScalarType::Integer { bits: 64, is_signed: false } => { + ScalarType::Integer { + bits: 64, + is_signed: false, + } => { let value = lit2int(value)?; let x = value.to_le_bytes(); value_buf[0] = u32::from_le_bytes([x[0], x[1], x[2], x[3]]); @@ -463,22 +486,16 @@ impl Assembler { const OP_CONSTANT: u32 = Op::Constant as u32; let out = match instr.opcode { - OP_TYPE_INT => { - Some(self.assemble_op_type_int(instr)?) - } - OP_TYPE_FLOAT => { - Some(self.assemble_op_type_float(instr)?) - } - OP_CONSTANT => { - Some(self.assemble_op_constant(instr)?) - } + OP_TYPE_INT => Some(self.assemble_op_type_int(instr)?), + OP_TYPE_FLOAT => Some(self.assemble_op_type_float(instr)?), + OP_CONSTANT => Some(self.assemble_op_constant(instr)?), _ => None, }; Ok(out) } fn assemble_general_instr(&mut self, instr: &Instruction) -> Result> { - let opcode = Op::from_u32(instr.opcode) - .ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; + let opcode = + Op::from_u32(instr.opcode).ok_or_else(|| anyhow!("unknown opcode {}", instr.opcode))?; let mut builder = InstructionBuilder::new(opcode); let mut operands = instr.operands.iter(); @@ -530,17 +547,17 @@ impl Assembler { bail!("literal integer out of range"); } } - }, + } Lit::Float(f) => { // First cast to f32. let f = *f as f32; // Then bit cast to u32. let u = f.to_bits(); builder = builder.push(u); - }, + } Lit::String(s) => { builder = builder.push_str(&s); - }, + } } } Operand::Ident(ident) => { @@ -611,11 +628,11 @@ impl Assembler { } let mut spv = vec![ - 0x07230203, // Magic number - header.version, // Version + 0x07230203, // Magic number + header.version, // Version header.generator, // Generator - self.bound, // Bound - 0, // Reserved word + self.bound, // Bound + 0, // Reserved word ]; spv.extend(buf); diff --git a/spirq-spvasm/src/asm/mod.rs b/spirq-spvasm/src/asm/mod.rs index 7605c5c..d26e5db 100644 --- a/spirq-spvasm/src/asm/mod.rs +++ b/spirq-spvasm/src/asm/mod.rs @@ -1,4 +1,4 @@ -mod tokenizer; mod assembler; +mod tokenizer; pub use assembler::Assembler; diff --git a/spirq-spvasm/src/asm/tokenizer.rs b/spirq-spvasm/src/asm/tokenizer.rs index 604eab9..69f47a5 100644 --- a/spirq-spvasm/src/asm/tokenizer.rs +++ b/spirq-spvasm/src/asm/tokenizer.rs @@ -102,11 +102,11 @@ impl<'a> Tokenizer<'a> { } } Lit::Float(f64::from_str(buf.as_str())?) - }, + } _ => { // Integer. Lit::Int(i64::from_str(buf.as_str())?) - }, + } }; Ok(lit) } @@ -145,12 +145,12 @@ impl<'a> Tokenizer<'a> { match self.chars.peek() { Some('+') => { self.chars.next(); - }, + } Some('-') => { exponent_buf.push('-'); self.chars.next(); - }, - _ => {}, + } + _ => {} } while let Some(c) = self.chars.peek() { if c.is_ascii_digit() { @@ -179,7 +179,8 @@ impl<'a> Tokenizer<'a> { let exponent = i32::from_str(&exponent_buf)?; fraction_buf = fraction_buf.trim_start_matches('0').to_string(); - let f = ((int as f64) + (fraction as f64) / 16f64.powi(fraction_buf.len() as i32)) * 2f64.powi(exponent); + let f = ((int as f64) + (fraction as f64) / 16f64.powi(fraction_buf.len() as i32)) + * 2f64.powi(exponent); Lit::Float(f) } else { let i = i64::from_str_radix(&int_buf, 16)?; @@ -192,16 +193,20 @@ impl<'a> Tokenizer<'a> { /// Tokenize a SPIR-V assembly numeric literal that can be decimal, hexadecimal, /// decimal and hexadecimal numbers. pub fn tokenize_numeric_literal(&mut self) -> Result { - let mut c = *self.chars.peek() + let mut c = *self + .chars + .peek() .ok_or_else(|| anyhow!("unexpected end of input"))?; let mantissa_sign = match c { '-' => { self.chars.next(); - c = *self.chars.peek() + c = *self + .chars + .peek() .ok_or_else(|| anyhow!("unexpected end of input"))?; -1 - }, + } _ => 1, }; @@ -212,11 +217,11 @@ impl<'a> Tokenizer<'a> { // Hexadecimal. self.chars.next(); // Consume the 'x' or 'X'. self.tokenize_numeric_literal_hexadecimal()? - }, + } _ => { // Decimal. self.tokenize_numeric_literal_decimal()? - }, + } } } else { // Decimal. @@ -258,7 +263,7 @@ impl<'a> Tokenizer<'a> { '\\' => { escape = true; continue; - }, + } '"' => break, _ => string.push(c), } @@ -338,7 +343,6 @@ impl<'a> Tokenizer<'a> { } bail!("unexpected character: {}", c); - } else { return Ok(None); } @@ -352,7 +356,6 @@ impl<'a> Iterator for Tokenizer<'a> { } } - #[cfg(test)] mod test { use super::*; @@ -403,7 +406,9 @@ mod test { assert_eq!(tokens.len(), 8); for (i, token) in tokens.iter().enumerate() { match token { - Token::Literal(Lit::Float(n)) => assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)), + Token::Literal(Lit::Float(n)) => { + assert_eq!(*n, (i as f64) * 10.0f64.powi(i as i32)) + } _ => panic!("unexpected token: {:?}", token), } } @@ -416,7 +421,10 @@ mod test { assert_eq!(tokens.len(), 8); for (i, token) in tokens.iter().enumerate() { match token { - Token::Literal(Lit::Float(n)) => assert_eq!(*n, (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 }))), + Token::Literal(Lit::Float(n)) => assert_eq!( + *n, + (i as f64) * 10.0f64.powi((i as i32) * (if i % 2 == 0 { 1 } else { -1 })) + ), _ => panic!("unexpected token: {:?}", token), } } @@ -501,7 +509,9 @@ mod test { ; abcd123"#; let tokens = tokenize(code).unwrap(); assert_eq!(tokens.len(), 13); - let expected = [" a", " ab", " abc", " abcd", " abcd1", " abcd12", " abcd123"]; + let expected = [ + " a", " ab", " abc", " abcd", " abcd1", " abcd12", " abcd123", + ]; for (i, token) in tokens.iter().enumerate() { if i % 2 == 0 { match token { @@ -510,7 +520,7 @@ mod test { } } else { match token { - Token::NewLine => {}, + Token::NewLine => {} _ => panic!("unexpected token: {:?}", token), } } @@ -537,7 +547,7 @@ mod test { let tokens = tokenize(code).unwrap(); assert_eq!(tokens.len(), 1); match tokens[0] { - Token::Eq => {}, + Token::Eq => {} _ => panic!("unexpected token: {:?}", tokens[0]), } } diff --git a/spirq-spvasm/src/dis/auto_name.rs b/spirq-spvasm/src/dis/auto_name.rs index d6f8ef7..7cbc9f8 100644 --- a/spirq-spvasm/src/dis/auto_name.rs +++ b/spirq-spvasm/src/dis/auto_name.rs @@ -1,8 +1,11 @@ -use std::collections::HashMap; use anyhow::Result; +use std::collections::HashMap; use spirq::reflect::ReflectIntermediate; -use spirq_core::{ty::{Type, ScalarType, VectorType, MatrixType, PointerType, ArrayType, StructType}, constant::ConstantValue}; +use spirq_core::{ + constant::ConstantValue, + ty::{ArrayType, MatrixType, PointerType, ScalarType, StructType, Type, VectorType}, +}; use super::utils::to_hexadecimal_float; @@ -28,7 +31,7 @@ impl AutoNamer { std::collections::hash_map::Entry::Vacant(e) => { e.insert(0); self.names.entry(id).or_insert(name.clone()); - }, + } std::collections::hash_map::Entry::Occupied(e) => { let counter = e.into_mut(); let name = format!("{}_{}", name, counter); @@ -38,10 +41,7 @@ impl AutoNamer { } } - fn collect_annotated_names( - &mut self, - itm: &ReflectIntermediate, - ) -> Result<()> { + fn collect_annotated_names(&mut self, itm: &ReflectIntermediate) -> Result<()> { for (name_key, name) in itm.name_reg.iter() { if name_key.member_idx.is_none() { // Sanitize name. Convert all punctuations to underscore. @@ -58,14 +58,38 @@ impl AutoNamer { let out = match scalar_ty { ScalarType::Void => "void".to_string(), ScalarType::Boolean => "bool".to_string(), - ScalarType::Integer { bits: 8, is_signed: true } => "char".to_string(), - ScalarType::Integer { bits: 16, is_signed: true } => "short".to_string(), - ScalarType::Integer { bits: 32, is_signed: true } => "int".to_string(), - ScalarType::Integer { bits: 64, is_signed: true } => "long".to_string(), - ScalarType::Integer { bits: 8, is_signed: false } => "uchar".to_string(), - ScalarType::Integer { bits: 16, is_signed: false } => "ushort".to_string(), - ScalarType::Integer { bits: 32, is_signed: false } => "uint".to_string(), - ScalarType::Integer { bits: 64, is_signed: false } => "ulong".to_string(), + ScalarType::Integer { + bits: 8, + is_signed: true, + } => "char".to_string(), + ScalarType::Integer { + bits: 16, + is_signed: true, + } => "short".to_string(), + ScalarType::Integer { + bits: 32, + is_signed: true, + } => "int".to_string(), + ScalarType::Integer { + bits: 64, + is_signed: true, + } => "long".to_string(), + ScalarType::Integer { + bits: 8, + is_signed: false, + } => "uchar".to_string(), + ScalarType::Integer { + bits: 16, + is_signed: false, + } => "ushort".to_string(), + ScalarType::Integer { + bits: 32, + is_signed: false, + } => "uint".to_string(), + ScalarType::Integer { + bits: 64, + is_signed: false, + } => "ulong".to_string(), ScalarType::Float { bits: 16 } => "half".to_string(), ScalarType::Float { bits: 32 } => "float".to_string(), ScalarType::Float { bits: 64 } => "double".to_string(), @@ -74,17 +98,29 @@ impl AutoNamer { Some(out) } fn make_vector_ty_name(&mut self, vector_ty: &VectorType) -> Option { - let out = format!("v{}{}", vector_ty.nscalar, self.make_scalar_ty_name(&vector_ty.scalar_ty)?); + let out = format!( + "v{}{}", + vector_ty.nscalar, + self.make_scalar_ty_name(&vector_ty.scalar_ty)? + ); Some(out) } fn make_matrix_ty_name(&mut self, matrix_ty: &MatrixType) -> Option { - let out = format!("mat{}{}", matrix_ty.nvector, self.make_vector_ty_name(&matrix_ty.vector_ty)?); + let out = format!( + "mat{}{}", + matrix_ty.nvector, + self.make_vector_ty_name(&matrix_ty.vector_ty)? + ); Some(out) } fn make_arr_ty_name(&mut self, arr_ty: &ArrayType) -> Option { let out = if let Some(nelement) = arr_ty.nelement { - format!("_arr_{}_uint_{}", self.make_ty_name(&arr_ty.element_ty)?, nelement) + format!( + "_arr_{}_uint_{}", + self.make_ty_name(&arr_ty.element_ty)?, + nelement + ) } else { format!("_runtimearr_{}", self.make_ty_name(&arr_ty.element_ty)?) }; @@ -124,10 +160,7 @@ impl AutoNamer { out } - fn collect_ty_names( - &mut self, - itm: &ReflectIntermediate, - ) -> Result<()> { + fn collect_ty_names(&mut self, itm: &ReflectIntermediate) -> Result<()> { let mut tys = itm.ty_reg.iter().collect::>(); tys.sort_by_key(|(id, _)| *id); for (id, ty) in tys { @@ -142,10 +175,7 @@ impl AutoNamer { Ok(()) } - fn make_const_name( - &mut self, - value: &ConstantValue, - ) -> Option { + fn make_const_name(&mut self, value: &ConstantValue) -> Option { let mut out = match value { ConstantValue::Bool(true) => "true".to_owned(), ConstantValue::Bool(false) => "false".to_owned(), @@ -166,10 +196,7 @@ impl AutoNamer { Some(out) } - fn collect_const_names( - &mut self, - itm: &ReflectIntermediate, - ) -> Result<()> { + fn collect_const_names(&mut self, itm: &ReflectIntermediate) -> Result<()> { for (id, constant) in itm.interp.iter() { if let Some(name) = constant.name.as_ref() { self.assign_name(*id, name.clone()); diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index bcc4e07..76ecd1d 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -1,11 +1,15 @@ use std::collections::HashMap; -use anyhow::{Result, bail}; +use super::auto_name; +use crate::{dis::utils::to_hexadecimal_float, generated}; +use anyhow::{bail, Result}; use half::f16; use spirq::{reflect::ReflectIntermediate, ReflectConfig}; -use spirq_core::{parse::{Instr, SpirvBinary, Instrs, Operands}, spirv::Op, ty::{self, Type}}; -use crate::{generated, dis::utils::to_hexadecimal_float}; -use super::auto_name; +use spirq_core::{ + parse::{Instr, Instrs, Operands, SpirvBinary}, + spirv::Op, + ty::{self, Type}, +}; pub struct Disassembler { print_header: bool, @@ -27,7 +31,7 @@ impl Disassembler { pub fn print_header(mut self, value: bool) -> Self { self.print_header = value; - return self + return self; } /// Reference intermediate values by their names rather than numeric IDs if /// it has been annotated by OpName. @@ -68,7 +72,12 @@ impl Disassembler { } Ok(format!("%{}", id)) } - fn print_operands(&self, opcode: u32, operands: &mut Operands<'_>, id_names: &HashMap) -> Result { + fn print_operands( + &self, + opcode: u32, + operands: &mut Operands<'_>, + id_names: &HashMap, + ) -> Result { let operands = generated::print_operand(opcode, operands, id_names)?; let out = operands.join(" "); Ok(out) @@ -92,59 +101,92 @@ impl Disassembler { let out = if let Some(result_type_id) = result_type_id { let ty = itm.ty_reg.get(result_type_id)?; match ty { - Type::Scalar(scalar_ty) => { - match scalar_ty { - ty::ScalarType::Integer { bits: 8, is_signed: true } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", i8::from_le_bytes([x[0]])) - }, - ty::ScalarType::Integer { bits: 16, is_signed: true } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", i16::from_le_bytes([x[0], x[1]])) - }, - ty::ScalarType::Integer { bits: 32, is_signed: true } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", i32::from_le_bytes([x[0], x[1], x[2], x[3]])) - }, - ty::ScalarType::Integer { bits: 64, is_signed: true } => { - let x = operands2.read_u32()?.to_le_bytes(); - let y = operands2.read_u32()?.to_le_bytes(); - format!(" {}", i64::from_le_bytes([x[0], x[1], x[2], x[3], y[0], y[1], y[2], y[3]])) - }, - ty::ScalarType::Integer { bits: 8, is_signed: false } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", u8::from_le_bytes([x[0]])) - }, - ty::ScalarType::Integer { bits: 16, is_signed: false } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", u16::from_le_bytes([x[0], x[1]])) - }, - ty::ScalarType::Integer { bits: 32, is_signed: false } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", u32::from_le_bytes([x[0], x[1], x[2], x[3]])) - }, - ty::ScalarType::Integer { bits: 64, is_signed: false } => { - let x = operands2.read_u32()?.to_le_bytes(); - let y = operands2.read_u32()?.to_le_bytes(); - format!(" {}", u64::from_le_bytes([x[0], x[1], x[2], x[3], y[0], y[1], y[2], y[3]])) - }, - ty::ScalarType::Float { bits: 16 } => { - let x = operands2.read_u32()?.to_le_bytes(); - let f = f16::from_bits(u16::from_le_bytes([x[0], x[1]])); - format!(" {}", to_hexadecimal_float(f)) - }, - ty::ScalarType::Float { bits: 32 } => { - let x = operands2.read_u32()?.to_le_bytes(); - format!(" {}", f32::from_le_bytes([x[0], x[1], x[2], x[3]])) - }, - ty::ScalarType::Float { bits: 64 } => { - let x0 = operands2.read_u32()?.to_le_bytes(); - let x1 = operands2.read_u32()?.to_le_bytes(); - format!(" {}", f64::from_le_bytes([x0[0], x0[1], x0[2], x0[3], x1[0], x1[1], x1[2], x1[3]])) - }, - _ => bail!("unsupported scalar type for opconstant"), + Type::Scalar(scalar_ty) => match scalar_ty { + ty::ScalarType::Integer { + bits: 8, + is_signed: true, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i8::from_le_bytes([x[0]])) } - } + ty::ScalarType::Integer { + bits: 16, + is_signed: true, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i16::from_le_bytes([x[0], x[1]])) + } + ty::ScalarType::Integer { + bits: 32, + is_signed: true, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", i32::from_le_bytes([x[0], x[1], x[2], x[3]])) + } + ty::ScalarType::Integer { + bits: 64, + is_signed: true, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + let y = operands2.read_u32()?.to_le_bytes(); + format!( + " {}", + i64::from_le_bytes([x[0], x[1], x[2], x[3], y[0], y[1], y[2], y[3]]) + ) + } + ty::ScalarType::Integer { + bits: 8, + is_signed: false, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u8::from_le_bytes([x[0]])) + } + ty::ScalarType::Integer { + bits: 16, + is_signed: false, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u16::from_le_bytes([x[0], x[1]])) + } + ty::ScalarType::Integer { + bits: 32, + is_signed: false, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", u32::from_le_bytes([x[0], x[1], x[2], x[3]])) + } + ty::ScalarType::Integer { + bits: 64, + is_signed: false, + } => { + let x = operands2.read_u32()?.to_le_bytes(); + let y = operands2.read_u32()?.to_le_bytes(); + format!( + " {}", + u64::from_le_bytes([x[0], x[1], x[2], x[3], y[0], y[1], y[2], y[3]]) + ) + } + ty::ScalarType::Float { bits: 16 } => { + let x = operands2.read_u32()?.to_le_bytes(); + let f = f16::from_bits(u16::from_le_bytes([x[0], x[1]])); + format!(" {}", to_hexadecimal_float(f)) + } + ty::ScalarType::Float { bits: 32 } => { + let x = operands2.read_u32()?.to_le_bytes(); + format!(" {}", f32::from_le_bytes([x[0], x[1], x[2], x[3]])) + } + ty::ScalarType::Float { bits: 64 } => { + let x0 = operands2.read_u32()?.to_le_bytes(); + let x1 = operands2.read_u32()?.to_le_bytes(); + format!( + " {}", + f64::from_le_bytes([ + x0[0], x0[1], x0[2], x0[3], x1[0], x1[1], x1[2], x1[3] + ]) + ) + } + _ => bail!("unsupported scalar type for opconstant"), + }, _ => bail!("opconstant cannot have a non-scalar type"), } } else { @@ -185,7 +227,8 @@ impl Disassembler { } if opcode == (Op::Constant as u32) { - if let Ok(operand) = self.print_constant_op_operand(result_type_id, &mut operands, itm) { + if let Ok(operand) = self.print_constant_op_operand(result_type_id, &mut operands, itm) + { out.push_str(&operand); } else { // Tolerate the error and print the operands as usual. @@ -236,7 +279,10 @@ impl Disassembler { let generator = header.generator >> 16; let generator_version = header.generator & 0xffff; if generator == 8 { - out.push(format!("; Generator: Khronos Glslang Reference Front End; {}", generator_version)); + out.push(format!( + "; Generator: Khronos Glslang Reference Front End; {}", + generator_version + )); } else { out.push(format!("; Generator: {}; {}", generator, generator_version)); } @@ -263,7 +309,8 @@ impl Disassembler { instrs.push(String::new()); // Trailing newline. if self.indent { - let max_eq_pos = instrs.iter() + let max_eq_pos = instrs + .iter() .filter_map(|instr| instr.find('=')) // Skip lines without an assignment. .max() .unwrap_or(0) @@ -281,7 +328,7 @@ impl Disassembler { } out.extend(instrs); - + Ok(out.join("\n")) } } @@ -292,22 +339,31 @@ mod test { #[test] fn test_simple() { - let spv = [ - 0x07230203, 0x00010000, 0x00000000, 0x0000001, 0x00000000 - ].iter().map(|x| *x as u32).collect::>(); + let spv = [0x07230203, 0x00010000, 0x00000000, 0x0000001, 0x00000000] + .iter() + .map(|x| *x as u32) + .collect::>(); let spv = SpirvBinary::from(spv); let out = Disassembler::new().disassemble(&spv).unwrap(); - assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 0; 0\n; Bound: 1\n; Schema: 0"); + assert_eq!( + out, + "; SPIR-V\n; Version: 1.0\n; Generator: 0; 0\n; Bound: 1\n; Schema: 0" + ); } #[test] fn test_nop() { let spv = [ - 0x07230203, 0x00010000, 0x00000000, 0x0000001, 0x00000000, - 0x00010000 - ].iter().map(|x| *x as u32).collect::>(); + 0x07230203, 0x00010000, 0x00000000, 0x0000001, 0x00000000, 0x00010000, + ] + .iter() + .map(|x| *x as u32) + .collect::>(); let spv = SpirvBinary::from(spv); let out = Disassembler::new().disassemble(&spv).unwrap(); - assert_eq!(out, "; SPIR-V\n; Version: 1.0\n; Generator: 0; 0\n; Bound: 1\n; Schema: 0\nOpNop"); + assert_eq!( + out, + "; SPIR-V\n; Version: 1.0\n; Generator: 0; 0\n; Bound: 1\n; Schema: 0\nOpNop" + ); } } diff --git a/spirq-spvasm/src/dis/mod.rs b/spirq-spvasm/src/dis/mod.rs index 0cf4df2..897ea1f 100644 --- a/spirq-spvasm/src/dis/mod.rs +++ b/spirq-spvasm/src/dis/mod.rs @@ -1,5 +1,5 @@ -mod disassembler; mod auto_name; +mod disassembler; #[cfg(test)] mod test; mod utils; diff --git a/spirq-spvasm/src/dis/test.rs b/spirq-spvasm/src/dis/test.rs index 518d042..2f50512 100644 --- a/spirq-spvasm/src/dis/test.rs +++ b/spirq-spvasm/src/dis/test.rs @@ -10,7 +10,8 @@ fn test_disassembler() { .name_ids(true) .name_type_ids(true) .name_const_ids(true) - .disassemble(&SpirvBinary::from(spv.as_ref())).unwrap(); + .disassemble(&SpirvBinary::from(spv.as_ref())) + .unwrap(); let expect = include_str!("../../../assets/gallery.frag.spvasm") .lines() .map(|x| x.trim()) diff --git a/spirq-spvasm/src/generated/enum_from_str.rs b/spirq-spvasm/src/generated/enum_from_str.rs index f0e499a..8124fc5 100644 --- a/spirq-spvasm/src/generated/enum_from_str.rs +++ b/spirq-spvasm/src/generated/enum_from_str.rs @@ -15,8 +15,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "NZSL" => 9, "WGSL" => 10, "Slang" => 11, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "ExecutionModel" => match name { "Vertex" => 0, "TessellationControl" => 1, @@ -41,24 +41,24 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "CallableKHR" => 5318, "TaskEXT" => 5364, "MeshEXT" => 5365, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "AddressingModel" => match name { "Logical" => 0, "Physical32" => 1, "Physical64" => 2, "PhysicalStorageBuffer64" => 5348, "PhysicalStorageBuffer64EXT" => 5348, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "MemoryModel" => match name { "Simple" => 0, "GLSL450" => 1, "OpenCL" => 2, "Vulkan" => 3, "VulkanKHR" => 3, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "ExecutionMode" => match name { "Invocations" => 0, "SpacingEqual" => 1, @@ -148,8 +148,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "StreamingInterfaceINTEL" => 6154, "RegisterMapInterfaceINTEL" => 6160, "NamedBarrierCountINTEL" => 6417, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "StorageClass" => match name { "UniformConstant" => 0, "Input" => 1, @@ -186,8 +186,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "CodeSectionINTEL" => 5605, "DeviceOnlyINTEL" => 5936, "HostOnlyINTEL" => 5937, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "Dim" => match name { "1D" => 0, "2D" => 1, @@ -197,21 +197,21 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "Buffer" => 5, "SubpassData" => 6, "TileImageDataEXT" => 4173, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "SamplerAddressingMode" => match name { "None" => 0, "ClampToEdge" => 1, "Clamp" => 2, "Repeat" => 3, "RepeatMirrored" => 4, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "SamplerFilterMode" => match name { "Nearest" => 0, "Linear" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "ImageFormat" => match name { "Unknown" => 0, "Rgba32f" => 1, @@ -255,8 +255,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "R8ui" => 39, "R64ui" => 40, "R64i" => 41, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "ImageChannelOrder" => match name { "R" => 0, "A" => 1, @@ -278,8 +278,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "sRGBA" => 17, "sBGRA" => 18, "ABGR" => 19, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "ImageChannelDataType" => match name { "SnormInt8" => 0, "SnormInt16" => 1, @@ -300,20 +300,20 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "UnormInt101010_2" => 16, "UnsignedIntRaw10EXT" => 19, "UnsignedIntRaw12EXT" => 20, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FPRoundingMode" => match name { "RTE" => 0, "RTZ" => 1, "RTP" => 2, "RTN" => 3, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FPDenormMode" => match name { "Preserve" => 0, "FlushToZero" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "QuantizationModes" => match name { "TRN" => 0, "TRN_ZERO" => 1, @@ -323,39 +323,39 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "RND_MIN_INF" => 5, "RND_CONV" => 6, "RND_CONV_ODD" => 7, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FPOperationMode" => match name { "IEEE" => 0, "ALT" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "OverflowModes" => match name { "WRAP" => 0, "SAT" => 1, "SAT_ZERO" => 2, "SAT_SYM" => 3, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "LinkageType" => match name { "Export" => 0, "Import" => 1, "LinkOnceODR" => 2, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "AccessQualifier" => match name { "ReadOnly" => 0, "WriteOnly" => 1, "ReadWrite" => 2, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "HostAccessQualifier" => match name { "NoneINTEL" => 0, "ReadINTEL" => 1, "WriteINTEL" => 2, "ReadWriteINTEL" => 3, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FunctionParameterAttribute" => match name { "Zext" => 0, "Sext" => 1, @@ -366,8 +366,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "NoWrite" => 6, "NoReadWrite" => 7, "RuntimeAlignedINTEL" => 5940, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "Decoration" => match name { "RelaxedPrecision" => 0, "SpecId" => 1, @@ -513,8 +513,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "ImplementInRegisterMapINTEL" => 6191, "CacheControlLoadINTEL" => 6442, "CacheControlStoreINTEL" => 6443, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "BuiltIn" => match name { "Position" => 0, "PointSize" => 1, @@ -654,8 +654,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "HitKindFrontFacingMicroTriangleNV" => 5405, "HitKindBackFacingMicroTriangleNV" => 5406, "CullMaskKHR" => 6021, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "Scope" => match name { "CrossDevice" => 0, "Device" => 1, @@ -665,8 +665,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "QueueFamily" => 5, "QueueFamilyKHR" => 5, "ShaderCallKHR" => 6, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "GroupOperation" => match name { "Reduce" => 0, "InclusiveScan" => 1, @@ -675,14 +675,14 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "PartitionedReduceNV" => 6, "PartitionedInclusiveScanNV" => 7, "PartitionedExclusiveScanNV" => 8, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "KernelEnqueueFlags" => match name { "NoWait" => 0, "WaitKernel" => 1, "WaitWorkGroup" => 2, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "Capability" => match name { "Matrix" => 0, "Shader" => 1, @@ -936,60 +936,60 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "GlobalVariableFPGADecorationsINTEL" => 6189, "GroupUniformArithmeticKHR" => 6400, "CacheControlsINTEL" => 6441, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "RayQueryIntersection" => match name { "RayQueryCandidateIntersectionKHR" => 0, "RayQueryCommittedIntersectionKHR" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "RayQueryCommittedIntersectionType" => match name { "RayQueryCommittedIntersectionNoneKHR" => 0, "RayQueryCommittedIntersectionTriangleKHR" => 1, "RayQueryCommittedIntersectionGeneratedKHR" => 2, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "RayQueryCandidateIntersectionType" => match name { "RayQueryCandidateIntersectionTriangleKHR" => 0, "RayQueryCandidateIntersectionAABBKHR" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "PackedVectorFormat" => match name { "PackedVectorFormat4x8Bit" => 0, "PackedVectorFormat4x8BitKHR" => 0, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "CooperativeMatrixLayout" => match name { "RowMajorKHR" => 0, "ColumnMajorKHR" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "CooperativeMatrixUse" => match name { "MatrixAKHR" => 0, "MatrixBKHR" => 1, "MatrixAccumulatorKHR" => 2, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "InitializationModeQualifier" => match name { "InitOnDeviceReprogramINTEL" => 0, "InitOnDeviceResetINTEL" => 1, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "LoadCacheControl" => match name { "UncachedINTEL" => 0, "CachedINTEL" => 1, "StreamingINTEL" => 2, "InvalidateAfterReadINTEL" => 3, "ConstCachedINTEL" => 4, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "StoreCacheControl" => match name { "UncachedINTEL" => 0, "WriteThroughINTEL" => 1, "WriteBackINTEL" => 2, "StreamingINTEL" => 3, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "ImageOperands" => match name { "None" => 0x0000, "Bias" => 0x0001, @@ -1012,8 +1012,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "ZeroExtend" => 0x2000, "Nontemporal" => 0x4000, "Offsets" => 0x10000, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FPFastMathMode" => match name { "None" => 0x0000, "NotNaN" => 0x0001, @@ -1023,14 +1023,14 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "Fast" => 0x0010, "AllowContractFastINTEL" => 0x10000, "AllowReassocINTEL" => 0x20000, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "SelectionControl" => match name { "None" => 0x0000, "Flatten" => 0x0001, "DontFlatten" => 0x0002, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "LoopControl" => match name { "None" => 0x0000, "Unroll" => 0x0001, @@ -1052,8 +1052,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "NoFusionINTEL" => 0x800000, "LoopCountINTEL" => 0x1000000, "MaxReinvocationDelayINTEL" => 0x2000000, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FunctionControl" => match name { "None" => 0x0000, "Inline" => 0x0001, @@ -1061,8 +1061,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "Pure" => 0x0004, "Const" => 0x0008, "OptNoneINTEL" => 0x10000, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "MemorySemantics" => match name { "Relaxed" => 0x0000, "None" => 0x0000, @@ -1083,8 +1083,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "MakeVisible" => 0x4000, "MakeVisibleKHR" => 0x4000, "Volatile" => 0x8000, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "MemoryAccess" => match name { "None" => 0x0000, "Volatile" => 0x0001, @@ -1098,13 +1098,13 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "NonPrivatePointerKHR" => 0x0020, "AliasScopeINTELMask" => 0x10000, "NoAliasINTELMask" => 0x20000, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "KernelProfilingInfo" => match name { "None" => 0x0000, "CmdExecTime" => 0x0001, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "RayFlags" => match name { "NoneKHR" => 0x0000, "OpaqueKHR" => 0x0001, @@ -1118,15 +1118,15 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "SkipTrianglesKHR" => 0x0100, "SkipAABBsKHR" => 0x0200, "ForceOpacityMicromap2StateEXT" => 0x0400, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "FragmentShadingRate" => match name { "Vertical2Pixels" => 0x0001, "Vertical4Pixels" => 0x0002, "Horizontal2Pixels" => 0x0004, "Horizontal4Pixels" => 0x0008, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, "CooperativeMatrixOperands" => match name { "NoneKHR" => 0x0000, "MatrixASignedComponentsKHR" => 0x0001, @@ -1134,8 +1134,8 @@ pub fn enum_from_str(ety: &str, name: &str) -> Result { "MatrixCSignedComponentsKHR" => 0x0004, "MatrixResultSignedComponentsKHR" => 0x0008, "SaturatingAccumulationKHR" => 0x0010, - _ => bail!("unknown enum: {}::{}", ety, name) - } + _ => bail!("unknown enum: {}::{}", ety, name), + }, _ => bail!("unknown enum: {}::{}", ety, name), }; Ok(out) diff --git a/spirq-spvasm/src/generated/enum_to_str.rs b/spirq-spvasm/src/generated/enum_to_str.rs index 8b99383..f6d750b 100644 --- a/spirq-spvasm/src/generated/enum_to_str.rs +++ b/spirq-spvasm/src/generated/enum_to_str.rs @@ -17,7 +17,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 10 => "WGSL".to_owned(), 11 => "Slang".to_owned(), _ => value.to_string(), - } + }, "ExecutionModel" => match value { 0 => "Vertex".to_owned(), 1 => "TessellationControl".to_owned(), @@ -43,7 +43,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 5364 => "TaskEXT".to_owned(), 5365 => "MeshEXT".to_owned(), _ => value.to_string(), - } + }, "AddressingModel" => match value { 0 => "Logical".to_owned(), 1 => "Physical32".to_owned(), @@ -51,7 +51,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 5348 => "PhysicalStorageBuffer64".to_owned(), 5348 => "PhysicalStorageBuffer64EXT".to_owned(), _ => value.to_string(), - } + }, "MemoryModel" => match value { 0 => "Simple".to_owned(), 1 => "GLSL450".to_owned(), @@ -59,7 +59,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 3 => "Vulkan".to_owned(), 3 => "VulkanKHR".to_owned(), _ => value.to_string(), - } + }, "ExecutionMode" => match value { 0 => "Invocations".to_owned(), 1 => "SpacingEqual".to_owned(), @@ -150,7 +150,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 6160 => "RegisterMapInterfaceINTEL".to_owned(), 6417 => "NamedBarrierCountINTEL".to_owned(), _ => value.to_string(), - } + }, "StorageClass" => match value { 0 => "UniformConstant".to_owned(), 1 => "Input".to_owned(), @@ -188,7 +188,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 5936 => "DeviceOnlyINTEL".to_owned(), 5937 => "HostOnlyINTEL".to_owned(), _ => value.to_string(), - } + }, "Dim" => match value { 0 => "1D".to_owned(), 1 => "2D".to_owned(), @@ -199,7 +199,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 6 => "SubpassData".to_owned(), 4173 => "TileImageDataEXT".to_owned(), _ => value.to_string(), - } + }, "SamplerAddressingMode" => match value { 0 => "None".to_owned(), 1 => "ClampToEdge".to_owned(), @@ -207,12 +207,12 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 3 => "Repeat".to_owned(), 4 => "RepeatMirrored".to_owned(), _ => value.to_string(), - } + }, "SamplerFilterMode" => match value { 0 => "Nearest".to_owned(), 1 => "Linear".to_owned(), _ => value.to_string(), - } + }, "ImageFormat" => match value { 0 => "Unknown".to_owned(), 1 => "Rgba32f".to_owned(), @@ -257,7 +257,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 40 => "R64ui".to_owned(), 41 => "R64i".to_owned(), _ => value.to_string(), - } + }, "ImageChannelOrder" => match value { 0 => "R".to_owned(), 1 => "A".to_owned(), @@ -280,7 +280,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 18 => "sBGRA".to_owned(), 19 => "ABGR".to_owned(), _ => value.to_string(), - } + }, "ImageChannelDataType" => match value { 0 => "SnormInt8".to_owned(), 1 => "SnormInt16".to_owned(), @@ -302,19 +302,19 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 19 => "UnsignedIntRaw10EXT".to_owned(), 20 => "UnsignedIntRaw12EXT".to_owned(), _ => value.to_string(), - } + }, "FPRoundingMode" => match value { 0 => "RTE".to_owned(), 1 => "RTZ".to_owned(), 2 => "RTP".to_owned(), 3 => "RTN".to_owned(), _ => value.to_string(), - } + }, "FPDenormMode" => match value { 0 => "Preserve".to_owned(), 1 => "FlushToZero".to_owned(), _ => value.to_string(), - } + }, "QuantizationModes" => match value { 0 => "TRN".to_owned(), 1 => "TRN_ZERO".to_owned(), @@ -325,38 +325,38 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 6 => "RND_CONV".to_owned(), 7 => "RND_CONV_ODD".to_owned(), _ => value.to_string(), - } + }, "FPOperationMode" => match value { 0 => "IEEE".to_owned(), 1 => "ALT".to_owned(), _ => value.to_string(), - } + }, "OverflowModes" => match value { 0 => "WRAP".to_owned(), 1 => "SAT".to_owned(), 2 => "SAT_ZERO".to_owned(), 3 => "SAT_SYM".to_owned(), _ => value.to_string(), - } + }, "LinkageType" => match value { 0 => "Export".to_owned(), 1 => "Import".to_owned(), 2 => "LinkOnceODR".to_owned(), _ => value.to_string(), - } + }, "AccessQualifier" => match value { 0 => "ReadOnly".to_owned(), 1 => "WriteOnly".to_owned(), 2 => "ReadWrite".to_owned(), _ => value.to_string(), - } + }, "HostAccessQualifier" => match value { 0 => "NoneINTEL".to_owned(), 1 => "ReadINTEL".to_owned(), 2 => "WriteINTEL".to_owned(), 3 => "ReadWriteINTEL".to_owned(), _ => value.to_string(), - } + }, "FunctionParameterAttribute" => match value { 0 => "Zext".to_owned(), 1 => "Sext".to_owned(), @@ -368,7 +368,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 7 => "NoReadWrite".to_owned(), 5940 => "RuntimeAlignedINTEL".to_owned(), _ => value.to_string(), - } + }, "Decoration" => match value { 0 => "RelaxedPrecision".to_owned(), 1 => "SpecId".to_owned(), @@ -515,7 +515,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 6442 => "CacheControlLoadINTEL".to_owned(), 6443 => "CacheControlStoreINTEL".to_owned(), _ => value.to_string(), - } + }, "BuiltIn" => match value { 0 => "Position".to_owned(), 1 => "PointSize".to_owned(), @@ -656,7 +656,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 5406 => "HitKindBackFacingMicroTriangleNV".to_owned(), 6021 => "CullMaskKHR".to_owned(), _ => value.to_string(), - } + }, "Scope" => match value { 0 => "CrossDevice".to_owned(), 1 => "Device".to_owned(), @@ -667,7 +667,7 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 5 => "QueueFamilyKHR".to_owned(), 6 => "ShaderCallKHR".to_owned(), _ => value.to_string(), - } + }, "GroupOperation" => match value { 0 => "Reduce".to_owned(), 1 => "InclusiveScan".to_owned(), @@ -677,13 +677,13 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 7 => "PartitionedInclusiveScanNV".to_owned(), 8 => "PartitionedExclusiveScanNV".to_owned(), _ => value.to_string(), - } + }, "KernelEnqueueFlags" => match value { 0 => "NoWait".to_owned(), 1 => "WaitKernel".to_owned(), 2 => "WaitWorkGroup".to_owned(), _ => value.to_string(), - } + }, "Capability" => match value { 0 => "Matrix".to_owned(), 1 => "Shader".to_owned(), @@ -938,44 +938,44 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 6400 => "GroupUniformArithmeticKHR".to_owned(), 6441 => "CacheControlsINTEL".to_owned(), _ => value.to_string(), - } + }, "RayQueryIntersection" => match value { 0 => "RayQueryCandidateIntersectionKHR".to_owned(), 1 => "RayQueryCommittedIntersectionKHR".to_owned(), _ => value.to_string(), - } + }, "RayQueryCommittedIntersectionType" => match value { 0 => "RayQueryCommittedIntersectionNoneKHR".to_owned(), 1 => "RayQueryCommittedIntersectionTriangleKHR".to_owned(), 2 => "RayQueryCommittedIntersectionGeneratedKHR".to_owned(), _ => value.to_string(), - } + }, "RayQueryCandidateIntersectionType" => match value { 0 => "RayQueryCandidateIntersectionTriangleKHR".to_owned(), 1 => "RayQueryCandidateIntersectionAABBKHR".to_owned(), _ => value.to_string(), - } + }, "PackedVectorFormat" => match value { 0 => "PackedVectorFormat4x8Bit".to_owned(), 0 => "PackedVectorFormat4x8BitKHR".to_owned(), _ => value.to_string(), - } + }, "CooperativeMatrixLayout" => match value { 0 => "RowMajorKHR".to_owned(), 1 => "ColumnMajorKHR".to_owned(), _ => value.to_string(), - } + }, "CooperativeMatrixUse" => match value { 0 => "MatrixAKHR".to_owned(), 1 => "MatrixBKHR".to_owned(), 2 => "MatrixAccumulatorKHR".to_owned(), _ => value.to_string(), - } + }, "InitializationModeQualifier" => match value { 0 => "InitOnDeviceReprogramINTEL".to_owned(), 1 => "InitOnDeviceResetINTEL".to_owned(), _ => value.to_string(), - } + }, "LoadCacheControl" => match value { 0 => "UncachedINTEL".to_owned(), 1 => "CachedINTEL".to_owned(), @@ -983,58 +983,58 @@ pub fn enum_to_str(ety: &str, value: u32) -> Result { 3 => "InvalidateAfterReadINTEL".to_owned(), 4 => "ConstCachedINTEL".to_owned(), _ => value.to_string(), - } + }, "StoreCacheControl" => match value { 0 => "UncachedINTEL".to_owned(), 1 => "WriteThroughINTEL".to_owned(), 2 => "WriteBackINTEL".to_owned(), 3 => "StreamingINTEL".to_owned(), _ => value.to_string(), - } + }, "ImageOperands" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "FPFastMathMode" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "SelectionControl" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "LoopControl" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "FunctionControl" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "MemorySemantics" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "MemoryAccess" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "KernelProfilingInfo" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "RayFlags" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "FragmentShadingRate" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, "CooperativeMatrixOperands" => match value { 0 => "None".to_owned(), _ => value.to_string(), - } + }, _ => bail!("unknown enum: {}", ety), }; Ok(out) diff --git a/spirq-spvasm/src/generated/mod.rs b/spirq-spvasm/src/generated/mod.rs index 5ac2ff9..5dad198 100644 --- a/spirq-spvasm/src/generated/mod.rs +++ b/spirq-spvasm/src/generated/mod.rs @@ -1,17 +1,17 @@ mod enum_from_str; mod enum_to_str; mod op_from_str; -mod op_to_str; mod op_has_result_id; mod op_has_result_type_id; +mod op_to_str; mod operand_enum_type; mod print_operand; pub use enum_from_str::enum_from_str; pub use enum_to_str::enum_to_str; pub use op_from_str::op_from_str; -pub use op_to_str::op_to_str; pub use op_has_result_id::op_has_result_id; pub use op_has_result_type_id::op_has_result_type_id; +pub use op_to_str::op_to_str; pub use operand_enum_type::operand_enum_type; pub use print_operand::print_operand; diff --git a/spirq-spvasm/src/generated/operand_enum_type.rs b/spirq-spvasm/src/generated/operand_enum_type.rs index fe1659a..a773f10 100644 --- a/spirq-spvasm/src/generated/operand_enum_type.rs +++ b/spirq-spvasm/src/generated/operand_enum_type.rs @@ -1,6 +1,5 @@ use anyhow::{bail, Result}; - fn unknown_operand_index(i: usize) -> Result<&'static str> { bail!("Unknown operand index: {}", i) } @@ -10,425 +9,425 @@ pub fn operand_enum_type(opcode: u32, i: usize) -> Result<&'static str> { 3 => match i { 0 => "SourceLanguage", _ => return unknown_operand_index(i), - } + }, 14 => match i { 0 => "AddressingModel", 1 => "MemoryModel", _ => return unknown_operand_index(i), - } + }, 15 => match i { 0 => "ExecutionModel", _ => return unknown_operand_index(i), - } + }, 16 => match i { 1 => "ExecutionMode", _ => return unknown_operand_index(i), - } + }, 17 => match i { 0 => "Capability", _ => return unknown_operand_index(i), - } + }, 25 => match i { 1 => "Dim", 6 => "ImageFormat", 7 => "AccessQualifier", _ => return unknown_operand_index(i), - } + }, 32 => match i { 0 => "StorageClass", _ => return unknown_operand_index(i), - } + }, 38 => match i { 0 => "AccessQualifier", _ => return unknown_operand_index(i), - } + }, 39 => match i { 1 => "StorageClass", _ => return unknown_operand_index(i), - } + }, 45 => match i { 0 => "SamplerAddressingMode", 2 => "SamplerFilterMode", _ => return unknown_operand_index(i), - } + }, 54 => match i { 0 => "FunctionControl", _ => return unknown_operand_index(i), - } + }, 59 => match i { 0 => "StorageClass", _ => return unknown_operand_index(i), - } + }, 61 => match i { 1 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 62 => match i { 2 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 63 => match i { 2 => "MemoryAccess", 3 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 64 => match i { 3 => "MemoryAccess", 4 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 71 => match i { 1 => "Decoration", _ => return unknown_operand_index(i), - } + }, 72 => match i { 2 => "Decoration", _ => return unknown_operand_index(i), - } + }, 87 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 88 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 89 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 90 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 91 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 92 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 93 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 94 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 95 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 96 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 97 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 98 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 99 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 123 => match i { 1 => "StorageClass", _ => return unknown_operand_index(i), - } + }, 246 => match i { 2 => "LoopControl", _ => return unknown_operand_index(i), - } + }, 247 => match i { 1 => "SelectionControl", _ => return unknown_operand_index(i), - } + }, 264 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 265 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 266 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 267 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 268 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 269 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 270 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 271 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 305 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 306 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 307 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 308 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 309 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 310 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 311 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 312 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 313 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 314 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 315 => match i { 3 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 320 => match i { 2 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 331 => match i { 1 => "ExecutionMode", _ => return unknown_operand_index(i), - } + }, 332 => match i { 1 => "Decoration", _ => return unknown_operand_index(i), - } + }, 342 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 349 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 350 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 351 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 352 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 353 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 354 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 355 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 356 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 357 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 358 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 359 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 360 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 361 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 362 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 363 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 364 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 4450 => match i { 2 => "PackedVectorFormat", _ => return unknown_operand_index(i), - } + }, 4451 => match i { 2 => "PackedVectorFormat", _ => return unknown_operand_index(i), - } + }, 4452 => match i { 2 => "PackedVectorFormat", _ => return unknown_operand_index(i), - } + }, 4453 => match i { 3 => "PackedVectorFormat", _ => return unknown_operand_index(i), - } + }, 4454 => match i { 3 => "PackedVectorFormat", _ => return unknown_operand_index(i), - } + }, 4455 => match i { 3 => "PackedVectorFormat", _ => return unknown_operand_index(i), - } + }, 4457 => match i { 3 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 4458 => match i { 4 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 4459 => match i { 3 => "CooperativeMatrixOperands", _ => return unknown_operand_index(i), - } + }, 5000 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5001 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5002 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5003 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5004 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5005 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5006 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5007 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 5283 => match i { 4 => "ImageOperands", _ => return unknown_operand_index(i), - } + }, 5359 => match i { 3 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 5360 => match i { 4 => "MemoryAccess", _ => return unknown_operand_index(i), - } + }, 5632 => match i { 1 => "Decoration", _ => return unknown_operand_index(i), - } + }, 5633 => match i { 2 => "Decoration", _ => return unknown_operand_index(i), - } + }, 6086 => match i { 0 => "AccessQualifier", _ => return unknown_operand_index(i), - } + }, 6401 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6402 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6403 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6404 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6405 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6406 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6407 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, 6408 => match i { 1 => "GroupOperation", _ => return unknown_operand_index(i), - } + }, _ => bail!("{}-th operand of opcode {} is not a enum", i, opcode), }; Ok(out) diff --git a/spirq-spvasm/src/generated/print_operand.rs b/spirq-spvasm/src/generated/print_operand.rs index 068e73a..be61946 100644 --- a/spirq-spvasm/src/generated/print_operand.rs +++ b/spirq-spvasm/src/generated/print_operand.rs @@ -1,7 +1,7 @@ -use std::collections::HashMap; +use super::enum_to_str::enum_to_str; use anyhow::{bail, Result}; use spirq_core::parse::Operands; -use super::enum_to_str::enum_to_str; +use std::collections::HashMap; fn print_id(operands: &mut Operands, id_names: &HashMap) -> Result { let id = operands.read_u32()?; @@ -22,25 +22,35 @@ fn print_str(operands: &mut Operands) -> Result { Ok(format!(r#""{}""#, operands.read_str()?)) } fn print_list(operands: &mut Operands) -> Result> { - let out = operands.read_list()? + let out = operands + .read_list()? .iter() .map(|x| x.to_string()) .collect::>(); Ok(out) } -fn print_pair_id_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_pair_id_id_list( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let mut out = Vec::new(); out.push(print_id(operands, id_names)?); out.push(print_id(operands, id_names)?); Ok(out) } -fn print_pair_id_u32_list(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_pair_id_u32_list( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let mut out = Vec::new(); out.push(print_id(operands, id_names)?); out.push(print_u32(operands)?); Ok(out) } -fn print_pair_u32_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_pair_u32_id_list( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let mut out = Vec::new(); out.push(print_u32(operands)?); out.push(print_id(operands, id_names)?); @@ -50,13 +60,15 @@ fn print_pair_u32_id_list(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_ImageOperands( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageOperands", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // Bias if value & 0x0001 != 0 { // IdRef @@ -110,20 +122,15 @@ fn print_enum_ImageOperands(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FPFastMathMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPFastMathMode", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // NotNaN - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // NotInf - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // NSZ - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // AllowRecip - if value & 0x0008 != 0 { - } + if value & 0x0008 != 0 {} // Fast - if value & 0x0010 != 0 { - } + if value & 0x0010 != 0 {} // AllowContractFastINTEL - if value & 0x10000 != 0 { - } + if value & 0x10000 != 0 {} // AllowReassocINTEL - if value & 0x20000 != 0 { - } + if value & 0x20000 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_SelectionControl(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_SelectionControl( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SelectionControl", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // Flatten - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // DontFlatten - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_LoopControl(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_LoopControl( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"LoopControl", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // Unroll - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // DontUnroll - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // DependencyInfinite - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // DependencyLength if value & 0x0008 != 0 { // LiteralInteger @@ -270,8 +271,7 @@ fn print_enum_LoopControl(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FunctionControl( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FunctionControl", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // Inline - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // DontInline - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // Pure - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // Const - if value & 0x0008 != 0 { - } + if value & 0x0008 != 0 {} // OptNoneINTEL - if value & 0x10000 != 0 { - } + if value & 0x10000 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_MemorySemantics(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_MemorySemantics( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"MemorySemantics", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // Acquire - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // Release - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // AcquireRelease - if value & 0x0008 != 0 { - } + if value & 0x0008 != 0 {} // SequentiallyConsistent - if value & 0x0010 != 0 { - } + if value & 0x0010 != 0 {} // UniformMemory - if value & 0x0040 != 0 { - } + if value & 0x0040 != 0 {} // SubgroupMemory - if value & 0x0080 != 0 { - } + if value & 0x0080 != 0 {} // WorkgroupMemory - if value & 0x0100 != 0 { - } + if value & 0x0100 != 0 {} // CrossWorkgroupMemory - if value & 0x0200 != 0 { - } + if value & 0x0200 != 0 {} // AtomicCounterMemory - if value & 0x0400 != 0 { - } + if value & 0x0400 != 0 {} // ImageMemory - if value & 0x0800 != 0 { - } + if value & 0x0800 != 0 {} // OutputMemoryKHR - if value & 0x1000 != 0 { - } + if value & 0x1000 != 0 {} // MakeAvailableKHR - if value & 0x2000 != 0 { - } + if value & 0x2000 != 0 {} // MakeVisibleKHR - if value & 0x4000 != 0 { - } + if value & 0x4000 != 0 {} // Volatile - if value & 0x8000 != 0 { - } + if value & 0x8000 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_MemoryAccess(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_MemoryAccess( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"MemoryAccess", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // Volatile - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // Aligned if value & 0x0002 != 0 { // LiteralInteger out.push(print_u32(operands)?); } // Nontemporal - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // MakePointerAvailableKHR if value & 0x0008 != 0 { // IdScope @@ -400,8 +385,7 @@ fn print_enum_MemoryAccess(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_KernelProfilingInfo( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"KernelProfilingInfo", value)?]; // None - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // CmdExecTime - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_RayFlags(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_RayFlags( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayFlags", value)?]; // NoneKHR - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // OpaqueKHR - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // NoOpaqueKHR - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // TerminateOnFirstHitKHR - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // SkipClosestHitShaderKHR - if value & 0x0008 != 0 { - } + if value & 0x0008 != 0 {} // CullBackFacingTrianglesKHR - if value & 0x0010 != 0 { - } + if value & 0x0010 != 0 {} // CullFrontFacingTrianglesKHR - if value & 0x0020 != 0 { - } + if value & 0x0020 != 0 {} // CullOpaqueKHR - if value & 0x0040 != 0 { - } + if value & 0x0040 != 0 {} // CullNoOpaqueKHR - if value & 0x0080 != 0 { - } + if value & 0x0080 != 0 {} // SkipTrianglesKHR - if value & 0x0100 != 0 { - } + if value & 0x0100 != 0 {} // SkipAABBsKHR - if value & 0x0200 != 0 { - } + if value & 0x0200 != 0 {} // ForceOpacityMicromap2StateEXT - if value & 0x0400 != 0 { - } + if value & 0x0400 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_FragmentShadingRate(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FragmentShadingRate( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FragmentShadingRate", value)?]; // Vertical2Pixels - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // Vertical4Pixels - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // Horizontal2Pixels - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // Horizontal4Pixels - if value & 0x0008 != 0 { - } + if value & 0x0008 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_SourceLanguage(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_SourceLanguage( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SourceLanguage", value)?]; match value { // Unknown - 0 => { - } + 0 => {} // ESSL - 1 => { - } + 1 => {} // GLSL - 2 => { - } + 2 => {} // OpenCL_C - 3 => { - } + 3 => {} // OpenCL_CPP - 4 => { - } + 4 => {} // HLSL - 5 => { - } + 5 => {} // CPP_for_OpenCL - 6 => { - } + 6 => {} // SYCL - 7 => { - } + 7 => {} // HERO_C - 8 => { - } + 8 => {} // NZSL - 9 => { - } + 9 => {} // WGSL - 10 => { - } + 10 => {} // Slang - 11 => { - } - _ => {}, + 11 => {} + _ => {} } Ok(out) } @@ -551,63 +517,49 @@ fn print_enum_SourceLanguage(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_ExecutionModel( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ExecutionModel", value)?]; match value { // Vertex - 0 => { - } + 0 => {} // TessellationControl - 1 => { - } + 1 => {} // TessellationEvaluation - 2 => { - } + 2 => {} // Geometry - 3 => { - } + 3 => {} // Fragment - 4 => { - } + 4 => {} // GLCompute - 5 => { - } + 5 => {} // Kernel - 6 => { - } + 6 => {} // TaskNV - 5267 => { - } + 5267 => {} // MeshNV - 5268 => { - } + 5268 => {} // RayGenerationKHR - 5313 => { - } + 5313 => {} // IntersectionKHR - 5314 => { - } + 5314 => {} // AnyHitKHR - 5315 => { - } + 5315 => {} // ClosestHitKHR - 5316 => { - } + 5316 => {} // MissKHR - 5317 => { - } + 5317 => {} // CallableKHR - 5318 => { - } + 5318 => {} // TaskEXT - 5364 => { - } + 5364 => {} // MeshEXT - 5365 => { - } - _ => {}, + 5365 => {} + _ => {} } Ok(out) } @@ -615,24 +567,23 @@ fn print_enum_ExecutionModel(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_AddressingModel( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"AddressingModel", value)?]; match value { // Logical - 0 => { - } + 0 => {} // Physical32 - 1 => { - } + 1 => {} // Physical64 - 2 => { - } + 2 => {} // PhysicalStorageBuffer64EXT - 5348 => { - } - _ => {}, + 5348 => {} + _ => {} } Ok(out) } @@ -640,24 +591,23 @@ fn print_enum_AddressingModel(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_MemoryModel( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"MemoryModel", value)?]; match value { // Simple - 0 => { - } + 0 => {} // GLSL450 - 1 => { - } + 1 => {} // OpenCL - 2 => { - } + 2 => {} // VulkanKHR - 3 => { - } - _ => {}, + 3 => {} + _ => {} } Ok(out) } @@ -665,7 +615,10 @@ fn print_enum_MemoryModel(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_ExecutionMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ExecutionMode", value)?]; @@ -676,50 +629,35 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap { - } + 1 => {} // SpacingFractionalEven - 2 => { - } + 2 => {} // SpacingFractionalOdd - 3 => { - } + 3 => {} // VertexOrderCw - 4 => { - } + 4 => {} // VertexOrderCcw - 5 => { - } + 5 => {} // PixelCenterInteger - 6 => { - } + 6 => {} // OriginUpperLeft - 7 => { - } + 7 => {} // OriginLowerLeft - 8 => { - } + 8 => {} // EarlyFragmentTests - 9 => { - } + 9 => {} // PointMode - 10 => { - } + 10 => {} // Xfb - 11 => { - } + 11 => {} // DepthReplacing - 12 => { - } + 12 => {} // DepthGreater - 14 => { - } + 14 => {} // DepthLess - 15 => { - } + 15 => {} // DepthUnchanged - 16 => { - } + 16 => {} // LocalSize 17 => { // LiteralInteger @@ -739,54 +677,41 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap { - } + 19 => {} // InputLines - 20 => { - } + 20 => {} // InputLinesAdjacency - 21 => { - } + 21 => {} // Triangles - 22 => { - } + 22 => {} // InputTrianglesAdjacency - 23 => { - } + 23 => {} // Quads - 24 => { - } + 24 => {} // Isolines - 25 => { - } + 25 => {} // OutputVertices 26 => { // LiteralInteger out.push(print_u32(operands)?); } // OutputPoints - 27 => { - } + 27 => {} // OutputLineStrip - 28 => { - } + 28 => {} // OutputTriangleStrip - 29 => { - } + 29 => {} // VecTypeHint 30 => { // LiteralInteger out.push(print_u32(operands)?); } // ContractionOff - 31 => { - } + 31 => {} // Initializer - 33 => { - } + 33 => {} // Finalizer - 34 => { - } + 34 => {} // SubgroupSize 35 => { // LiteralInteger @@ -821,20 +746,15 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap { - } + 4169 => {} // NonCoherentDepthAttachmentReadEXT - 4170 => { - } + 4170 => {} // NonCoherentStencilAttachmentReadEXT - 4171 => { - } + 4171 => {} // SubgroupUniformControlFlowKHR - 4421 => { - } + 4421 => {} // PostDepthCoverage - 4446 => { - } + 4446 => {} // DenormPreserve 4459 => { // LiteralInteger @@ -861,14 +781,11 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap { - } + 5017 => {} // StencilRefReplacingEXT - 5027 => { - } + 5027 => {} // CoalescingAMDX - 5069 => { - } + 5069 => {} // MaxNodeRecursionAMDX 5071 => { // IdRef @@ -898,58 +815,42 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap { - } + 5079 => {} // StencilRefGreaterFrontAMD - 5080 => { - } + 5080 => {} // StencilRefLessFrontAMD - 5081 => { - } + 5081 => {} // StencilRefUnchangedBackAMD - 5082 => { - } + 5082 => {} // StencilRefGreaterBackAMD - 5083 => { - } + 5083 => {} // StencilRefLessBackAMD - 5084 => { - } + 5084 => {} // OutputLinesEXT - 5269 => { - } + 5269 => {} // OutputPrimitivesEXT 5270 => { // LiteralInteger out.push(print_u32(operands)?); } // DerivativeGroupQuadsNV - 5289 => { - } + 5289 => {} // DerivativeGroupLinearNV - 5290 => { - } + 5290 => {} // OutputTrianglesEXT - 5298 => { - } + 5298 => {} // PixelInterlockOrderedEXT - 5366 => { - } + 5366 => {} // PixelInterlockUnorderedEXT - 5367 => { - } + 5367 => {} // SampleInterlockOrderedEXT - 5368 => { - } + 5368 => {} // SampleInterlockUnorderedEXT - 5369 => { - } + 5369 => {} // ShadingRateInterlockOrderedEXT - 5370 => { - } + 5370 => {} // ShadingRateInterlockUnorderedEXT - 5371 => { - } + 5371 => {} // SharedLocalMemorySizeINTEL 5618 => { // LiteralInteger @@ -990,8 +891,7 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap { - } + 5895 => {} // NumSIMDWorkitemsINTEL 5896 => { // LiteralInteger @@ -1017,7 +917,7 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap {}, + _ => {} } Ok(out) } @@ -1025,96 +925,71 @@ fn print_enum_ExecutionMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_StorageClass( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"StorageClass", value)?]; match value { // UniformConstant - 0 => { - } + 0 => {} // Input - 1 => { - } + 1 => {} // Uniform - 2 => { - } + 2 => {} // Output - 3 => { - } + 3 => {} // Workgroup - 4 => { - } + 4 => {} // CrossWorkgroup - 5 => { - } + 5 => {} // Private - 6 => { - } + 6 => {} // Function - 7 => { - } + 7 => {} // Generic - 8 => { - } + 8 => {} // PushConstant - 9 => { - } + 9 => {} // AtomicCounter - 10 => { - } + 10 => {} // Image - 11 => { - } + 11 => {} // StorageBuffer - 12 => { - } + 12 => {} // TileImageEXT - 4172 => { - } + 4172 => {} // NodePayloadAMDX - 5068 => { - } + 5068 => {} // NodeOutputPayloadAMDX - 5076 => { - } + 5076 => {} // CallableDataKHR - 5328 => { - } + 5328 => {} // IncomingCallableDataKHR - 5329 => { - } + 5329 => {} // RayPayloadKHR - 5338 => { - } + 5338 => {} // HitAttributeKHR - 5339 => { - } + 5339 => {} // IncomingRayPayloadKHR - 5342 => { - } + 5342 => {} // ShaderRecordBufferKHR - 5343 => { - } + 5343 => {} // PhysicalStorageBufferEXT - 5349 => { - } + 5349 => {} // HitObjectAttributeNV - 5385 => { - } + 5385 => {} // TaskPayloadWorkgroupEXT - 5402 => { - } + 5402 => {} // CodeSectionINTEL - 5605 => { - } + 5605 => {} // DeviceOnlyINTEL - 5936 => { - } + 5936 => {} // HostOnlyINTEL - 5937 => { - } - _ => {}, + 5937 => {} + _ => {} } Ok(out) } @@ -1128,30 +1003,22 @@ fn print_enum_Dim(operands: &mut Operands, id_names: &HashMap) -> R let mut out = vec![enum_to_str(&"Dim", value)?]; match value { // 1D - 0 => { - } + 0 => {} // 2D - 1 => { - } + 1 => {} // 3D - 2 => { - } + 2 => {} // Cube - 3 => { - } + 3 => {} // Rect - 4 => { - } + 4 => {} // Buffer - 5 => { - } + 5 => {} // SubpassData - 6 => { - } + 6 => {} // TileImageDataEXT - 4173 => { - } - _ => {}, + 4173 => {} + _ => {} } Ok(out) } @@ -1159,27 +1026,25 @@ fn print_enum_Dim(operands: &mut Operands, id_names: &HashMap) -> R #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_SamplerAddressingMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_SamplerAddressingMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SamplerAddressingMode", value)?]; match value { // None - 0 => { - } + 0 => {} // ClampToEdge - 1 => { - } + 1 => {} // Clamp - 2 => { - } + 2 => {} // Repeat - 3 => { - } + 3 => {} // RepeatMirrored - 4 => { - } - _ => {}, + 4 => {} + _ => {} } Ok(out) } @@ -1187,18 +1052,19 @@ fn print_enum_SamplerAddressingMode(operands: &mut Operands, id_names: &HashMap< #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_SamplerFilterMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_SamplerFilterMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"SamplerFilterMode", value)?]; match value { // Nearest - 0 => { - } + 0 => {} // Linear - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -1206,138 +1072,99 @@ fn print_enum_SamplerFilterMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_ImageFormat( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageFormat", value)?]; match value { // Unknown - 0 => { - } + 0 => {} // Rgba32f - 1 => { - } + 1 => {} // Rgba16f - 2 => { - } + 2 => {} // R32f - 3 => { - } + 3 => {} // Rgba8 - 4 => { - } + 4 => {} // Rgba8Snorm - 5 => { - } + 5 => {} // Rg32f - 6 => { - } + 6 => {} // Rg16f - 7 => { - } + 7 => {} // R11fG11fB10f - 8 => { - } + 8 => {} // R16f - 9 => { - } + 9 => {} // Rgba16 - 10 => { - } + 10 => {} // Rgb10A2 - 11 => { - } + 11 => {} // Rg16 - 12 => { - } + 12 => {} // Rg8 - 13 => { - } + 13 => {} // R16 - 14 => { - } + 14 => {} // R8 - 15 => { - } + 15 => {} // Rgba16Snorm - 16 => { - } + 16 => {} // Rg16Snorm - 17 => { - } + 17 => {} // Rg8Snorm - 18 => { - } + 18 => {} // R16Snorm - 19 => { - } + 19 => {} // R8Snorm - 20 => { - } + 20 => {} // Rgba32i - 21 => { - } + 21 => {} // Rgba16i - 22 => { - } + 22 => {} // Rgba8i - 23 => { - } + 23 => {} // R32i - 24 => { - } + 24 => {} // Rg32i - 25 => { - } + 25 => {} // Rg16i - 26 => { - } + 26 => {} // Rg8i - 27 => { - } + 27 => {} // R16i - 28 => { - } + 28 => {} // R8i - 29 => { - } + 29 => {} // Rgba32ui - 30 => { - } + 30 => {} // Rgba16ui - 31 => { - } + 31 => {} // Rgba8ui - 32 => { - } + 32 => {} // R32ui - 33 => { - } + 33 => {} // Rgb10a2ui - 34 => { - } + 34 => {} // Rg32ui - 35 => { - } + 35 => {} // Rg16ui - 36 => { - } + 36 => {} // Rg8ui - 37 => { - } + 37 => {} // R16ui - 38 => { - } + 38 => {} // R8ui - 39 => { - } + 39 => {} // R64ui - 40 => { - } + 40 => {} // R64i - 41 => { - } - _ => {}, + 41 => {} + _ => {} } Ok(out) } @@ -1345,72 +1172,55 @@ fn print_enum_ImageFormat(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_ImageChannelOrder( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageChannelOrder", value)?]; match value { // R - 0 => { - } + 0 => {} // A - 1 => { - } + 1 => {} // RG - 2 => { - } + 2 => {} // RA - 3 => { - } + 3 => {} // RGB - 4 => { - } + 4 => {} // RGBA - 5 => { - } + 5 => {} // BGRA - 6 => { - } + 6 => {} // ARGB - 7 => { - } + 7 => {} // Intensity - 8 => { - } + 8 => {} // Luminance - 9 => { - } + 9 => {} // Rx - 10 => { - } + 10 => {} // RGx - 11 => { - } + 11 => {} // RGBx - 12 => { - } + 12 => {} // Depth - 13 => { - } + 13 => {} // DepthStencil - 14 => { - } + 14 => {} // sRGB - 15 => { - } + 15 => {} // sRGBx - 16 => { - } + 16 => {} // sRGBA - 17 => { - } + 17 => {} // sBGRA - 18 => { - } + 18 => {} // ABGR - 19 => { - } - _ => {}, + 19 => {} + _ => {} } Ok(out) } @@ -1418,69 +1228,53 @@ fn print_enum_ImageChannelOrder(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_ImageChannelDataType( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"ImageChannelDataType", value)?]; match value { // SnormInt8 - 0 => { - } + 0 => {} // SnormInt16 - 1 => { - } + 1 => {} // UnormInt8 - 2 => { - } + 2 => {} // UnormInt16 - 3 => { - } + 3 => {} // UnormShort565 - 4 => { - } + 4 => {} // UnormShort555 - 5 => { - } + 5 => {} // UnormInt101010 - 6 => { - } + 6 => {} // SignedInt8 - 7 => { - } + 7 => {} // SignedInt16 - 8 => { - } + 8 => {} // SignedInt32 - 9 => { - } + 9 => {} // UnsignedInt8 - 10 => { - } + 10 => {} // UnsignedInt16 - 11 => { - } + 11 => {} // UnsignedInt32 - 12 => { - } + 12 => {} // HalfFloat - 13 => { - } + 13 => {} // Float - 14 => { - } + 14 => {} // UnormInt24 - 15 => { - } + 15 => {} // UnormInt101010_2 - 16 => { - } + 16 => {} // UnsignedIntRaw10EXT - 19 => { - } + 19 => {} // UnsignedIntRaw12EXT - 20 => { - } - _ => {}, + 20 => {} + _ => {} } Ok(out) } @@ -1488,24 +1282,23 @@ fn print_enum_ImageChannelDataType(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FPRoundingMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPRoundingMode", value)?]; match value { // RTE - 0 => { - } + 0 => {} // RTZ - 1 => { - } + 1 => {} // RTP - 2 => { - } + 2 => {} // RTN - 3 => { - } - _ => {}, + 3 => {} + _ => {} } Ok(out) } @@ -1513,18 +1306,19 @@ fn print_enum_FPRoundingMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FPDenormMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPDenormMode", value)?]; match value { // Preserve - 0 => { - } + 0 => {} // FlushToZero - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -1532,36 +1326,31 @@ fn print_enum_FPDenormMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_QuantizationModes( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"QuantizationModes", value)?]; match value { // TRN - 0 => { - } + 0 => {} // TRN_ZERO - 1 => { - } + 1 => {} // RND - 2 => { - } + 2 => {} // RND_ZERO - 3 => { - } + 3 => {} // RND_INF - 4 => { - } + 4 => {} // RND_MIN_INF - 5 => { - } + 5 => {} // RND_CONV - 6 => { - } + 6 => {} // RND_CONV_ODD - 7 => { - } - _ => {}, + 7 => {} + _ => {} } Ok(out) } @@ -1569,18 +1358,19 @@ fn print_enum_QuantizationModes(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FPOperationMode( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FPOperationMode", value)?]; match value { // IEEE - 0 => { - } + 0 => {} // ALT - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -1588,24 +1378,23 @@ fn print_enum_FPOperationMode(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_OverflowModes( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"OverflowModes", value)?]; match value { // WRAP - 0 => { - } + 0 => {} // SAT - 1 => { - } + 1 => {} // SAT_ZERO - 2 => { - } + 2 => {} // SAT_SYM - 3 => { - } - _ => {}, + 3 => {} + _ => {} } Ok(out) } @@ -1613,21 +1402,21 @@ fn print_enum_OverflowModes(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_LinkageType( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"LinkageType", value)?]; match value { // Export - 0 => { - } + 0 => {} // Import - 1 => { - } + 1 => {} // LinkOnceODR - 2 => { - } - _ => {}, + 2 => {} + _ => {} } Ok(out) } @@ -1635,21 +1424,21 @@ fn print_enum_LinkageType(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_AccessQualifier( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"AccessQualifier", value)?]; match value { // ReadOnly - 0 => { - } + 0 => {} // WriteOnly - 1 => { - } + 1 => {} // ReadWrite - 2 => { - } - _ => {}, + 2 => {} + _ => {} } Ok(out) } @@ -1657,24 +1446,23 @@ fn print_enum_AccessQualifier(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_HostAccessQualifier( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"HostAccessQualifier", value)?]; match value { // NoneINTEL - 0 => { - } + 0 => {} // ReadINTEL - 1 => { - } + 1 => {} // WriteINTEL - 2 => { - } + 2 => {} // ReadWriteINTEL - 3 => { - } - _ => {}, + 3 => {} + _ => {} } Ok(out) } @@ -1682,39 +1470,33 @@ fn print_enum_HostAccessQualifier(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_FunctionParameterAttribute( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"FunctionParameterAttribute", value)?]; match value { // Zext - 0 => { - } + 0 => {} // Sext - 1 => { - } + 1 => {} // ByVal - 2 => { - } + 2 => {} // Sret - 3 => { - } + 3 => {} // NoAlias - 4 => { - } + 4 => {} // NoCapture - 5 => { - } + 5 => {} // NoWrite - 6 => { - } + 6 => {} // NoReadWrite - 7 => { - } + 7 => {} // RuntimeAlignedINTEL - 5940 => { - } - _ => {}, + 5940 => {} + _ => {} } Ok(out) } @@ -1722,31 +1504,29 @@ fn print_enum_FunctionParameterAttribute(operands: &mut Operands, id_names: &Has #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_Decoration( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Decoration", value)?]; match value { // RelaxedPrecision - 0 => { - } + 0 => {} // SpecId 1 => { // LiteralInteger out.push(print_u32(operands)?); } // Block - 2 => { - } + 2 => {} // BufferBlock - 3 => { - } + 3 => {} // RowMajor - 4 => { - } + 4 => {} // ColMajor - 5 => { - } + 5 => {} // ArrayStride 6 => { // LiteralInteger @@ -1758,69 +1538,51 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 8 => {} // GLSLPacked - 9 => { - } + 9 => {} // CPacked - 10 => { - } + 10 => {} // BuiltIn 11 => { // BuiltIn out.extend(print_enum_BuiltIn(operands, id_names)?); } // NoPerspective - 13 => { - } + 13 => {} // Flat - 14 => { - } + 14 => {} // Patch - 15 => { - } + 15 => {} // Centroid - 16 => { - } + 16 => {} // Sample - 17 => { - } + 17 => {} // Invariant - 18 => { - } + 18 => {} // Restrict - 19 => { - } + 19 => {} // Aliased - 20 => { - } + 20 => {} // Volatile - 21 => { - } + 21 => {} // Constant - 22 => { - } + 22 => {} // Coherent - 23 => { - } + 23 => {} // NonWritable - 24 => { - } + 24 => {} // NonReadable - 25 => { - } + 25 => {} // Uniform - 26 => { - } + 26 => {} // UniformId 27 => { // IdScope out.push(print_id(operands, id_names)?); } // SaturatedConversion - 28 => { - } + 28 => {} // Stream 29 => { // LiteralInteger @@ -1889,8 +1651,7 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 42 => {} // InputAttachmentIndex 43 => { // LiteralInteger @@ -1917,20 +1678,15 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 4469 => {} // NoUnsignedWrap - 4470 => { - } + 4470 => {} // WeightTextureQCOM - 4487 => { - } + 4487 => {} // BlockMatchTextureQCOM - 4488 => { - } + 4488 => {} // ExplicitInterpAMD - 4999 => { - } + 4999 => {} // NodeSharesPayloadLimitsWithAMDX 5019 => { // IdRef @@ -1942,93 +1698,72 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 5078 => {} // PayloadNodeNameAMDX 5091 => { // LiteralString out.push(print_str(operands)?); } // OverrideCoverageNV - 5248 => { - } + 5248 => {} // PassthroughNV - 5250 => { - } + 5250 => {} // ViewportRelativeNV - 5252 => { - } + 5252 => {} // SecondaryViewportRelativeNV 5256 => { // LiteralInteger out.push(print_u32(operands)?); } // PerPrimitiveEXT - 5271 => { - } + 5271 => {} // PerViewNV - 5272 => { - } + 5272 => {} // PerTaskNV - 5273 => { - } + 5273 => {} // PerVertexNV - 5285 => { - } + 5285 => {} // NonUniformEXT - 5300 => { - } + 5300 => {} // RestrictPointerEXT - 5355 => { - } + 5355 => {} // AliasedPointerEXT - 5356 => { - } + 5356 => {} // HitObjectShaderRecordBufferNV - 5386 => { - } + 5386 => {} // BindlessSamplerNV - 5398 => { - } + 5398 => {} // BindlessImageNV - 5399 => { - } + 5399 => {} // BoundSamplerNV - 5400 => { - } + 5400 => {} // BoundImageNV - 5401 => { - } + 5401 => {} // SIMTCallINTEL 5599 => { // LiteralInteger out.push(print_u32(operands)?); } // ReferencedIndirectlyINTEL - 5602 => { - } + 5602 => {} // ClobberINTEL 5607 => { // LiteralString out.push(print_str(operands)?); } // SideEffectsINTEL - 5608 => { - } + 5608 => {} // VectorComputeVariableINTEL - 5624 => { - } + 5624 => {} // FuncParamIOKindINTEL 5625 => { // LiteralInteger out.push(print_u32(operands)?); } // VectorComputeFunctionINTEL - 5626 => { - } + 5626 => {} // StackCallINTEL - 5627 => { - } + 5627 => {} // GlobalVariableOffsetINTEL 5628 => { // LiteralInteger @@ -2064,8 +1799,7 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 5825 => {} // MemoryINTEL 5826 => { // LiteralString @@ -2087,19 +1821,16 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 5830 => {} // DoublepumpINTEL - 5831 => { - } + 5831 => {} // MaxReplicatesINTEL 5832 => { // LiteralInteger out.push(print_u32(operands)?); } // SimpleDualPortINTEL - 5833 => { - } + 5833 => {} // MergeINTEL 5834 => { // LiteralString @@ -2128,30 +1859,25 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 5885 => {} // BurstCoalesceINTEL - 5899 => { - } + 5899 => {} // CacheSizeINTEL 5900 => { // LiteralInteger out.push(print_u32(operands)?); } // DontStaticallyCoalesceINTEL - 5901 => { - } + 5901 => {} // PrefetchINTEL 5902 => { // LiteralInteger out.push(print_u32(operands)?); } // StallEnableINTEL - 5905 => { - } + 5905 => {} // FuseLoopsInFunctionINTEL - 5907 => { - } + 5907 => {} // MathOpDSPModeINTEL 5909 => { // LiteralInteger @@ -2202,17 +1928,13 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 6085 => {} // VectorComputeCallableFunctionINTEL - 6087 => { - } + 6087 => {} // MediaBlockIOINTEL - 6140 => { - } + 6140 => {} // StallFreeINTEL - 6151 => { - } + 6151 => {} // FPMaxErrorDecorationINTEL 6170 => { // LiteralFloat @@ -2233,11 +1955,9 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 6175 => {} // RegisterMapKernelArgumentINTEL - 6176 => { - } + 6176 => {} // MMHostInterfaceAddressWidthINTEL 6177 => { // LiteralInteger @@ -2269,8 +1989,7 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap { - } + 6183 => {} // HostAccessINTEL 6188 => { // HostAccessQualifier @@ -2302,7 +2021,7 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap {}, + _ => {} } Ok(out) } @@ -2310,360 +2029,247 @@ fn print_enum_Decoration(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_BuiltIn( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"BuiltIn", value)?]; match value { // Position - 0 => { - } + 0 => {} // PointSize - 1 => { - } + 1 => {} // ClipDistance - 3 => { - } + 3 => {} // CullDistance - 4 => { - } + 4 => {} // VertexId - 5 => { - } + 5 => {} // InstanceId - 6 => { - } + 6 => {} // PrimitiveId - 7 => { - } + 7 => {} // InvocationId - 8 => { - } + 8 => {} // Layer - 9 => { - } + 9 => {} // ViewportIndex - 10 => { - } + 10 => {} // TessLevelOuter - 11 => { - } + 11 => {} // TessLevelInner - 12 => { - } + 12 => {} // TessCoord - 13 => { - } + 13 => {} // PatchVertices - 14 => { - } + 14 => {} // FragCoord - 15 => { - } + 15 => {} // PointCoord - 16 => { - } + 16 => {} // FrontFacing - 17 => { - } + 17 => {} // SampleId - 18 => { - } + 18 => {} // SamplePosition - 19 => { - } + 19 => {} // SampleMask - 20 => { - } + 20 => {} // FragDepth - 22 => { - } + 22 => {} // HelperInvocation - 23 => { - } + 23 => {} // NumWorkgroups - 24 => { - } + 24 => {} // WorkgroupSize - 25 => { - } + 25 => {} // WorkgroupId - 26 => { - } + 26 => {} // LocalInvocationId - 27 => { - } + 27 => {} // GlobalInvocationId - 28 => { - } + 28 => {} // LocalInvocationIndex - 29 => { - } + 29 => {} // WorkDim - 30 => { - } + 30 => {} // GlobalSize - 31 => { - } + 31 => {} // EnqueuedWorkgroupSize - 32 => { - } + 32 => {} // GlobalOffset - 33 => { - } + 33 => {} // GlobalLinearId - 34 => { - } + 34 => {} // SubgroupSize - 36 => { - } + 36 => {} // SubgroupMaxSize - 37 => { - } + 37 => {} // NumSubgroups - 38 => { - } + 38 => {} // NumEnqueuedSubgroups - 39 => { - } + 39 => {} // SubgroupId - 40 => { - } + 40 => {} // SubgroupLocalInvocationId - 41 => { - } + 41 => {} // VertexIndex - 42 => { - } + 42 => {} // InstanceIndex - 43 => { - } + 43 => {} // CoreIDARM - 4160 => { - } + 4160 => {} // CoreCountARM - 4161 => { - } + 4161 => {} // CoreMaxIDARM - 4162 => { - } + 4162 => {} // WarpIDARM - 4163 => { - } + 4163 => {} // WarpMaxIDARM - 4164 => { - } + 4164 => {} // SubgroupEqMaskKHR - 4416 => { - } + 4416 => {} // SubgroupGeMaskKHR - 4417 => { - } + 4417 => {} // SubgroupGtMaskKHR - 4418 => { - } + 4418 => {} // SubgroupLeMaskKHR - 4419 => { - } + 4419 => {} // SubgroupLtMaskKHR - 4420 => { - } + 4420 => {} // BaseVertex - 4424 => { - } + 4424 => {} // BaseInstance - 4425 => { - } + 4425 => {} // DrawIndex - 4426 => { - } + 4426 => {} // PrimitiveShadingRateKHR - 4432 => { - } + 4432 => {} // DeviceIndex - 4438 => { - } + 4438 => {} // ViewIndex - 4440 => { - } + 4440 => {} // ShadingRateKHR - 4444 => { - } + 4444 => {} // BaryCoordNoPerspAMD - 4992 => { - } + 4992 => {} // BaryCoordNoPerspCentroidAMD - 4993 => { - } + 4993 => {} // BaryCoordNoPerspSampleAMD - 4994 => { - } + 4994 => {} // BaryCoordSmoothAMD - 4995 => { - } + 4995 => {} // BaryCoordSmoothCentroidAMD - 4996 => { - } + 4996 => {} // BaryCoordSmoothSampleAMD - 4997 => { - } + 4997 => {} // BaryCoordPullModelAMD - 4998 => { - } + 4998 => {} // FragStencilRefEXT - 5014 => { - } + 5014 => {} // CoalescedInputCountAMDX - 5021 => { - } + 5021 => {} // ShaderIndexAMDX - 5073 => { - } + 5073 => {} // ViewportMaskNV - 5253 => { - } + 5253 => {} // SecondaryPositionNV - 5257 => { - } + 5257 => {} // SecondaryViewportMaskNV - 5258 => { - } + 5258 => {} // PositionPerViewNV - 5261 => { - } + 5261 => {} // ViewportMaskPerViewNV - 5262 => { - } + 5262 => {} // FullyCoveredEXT - 5264 => { - } + 5264 => {} // TaskCountNV - 5274 => { - } + 5274 => {} // PrimitiveCountNV - 5275 => { - } + 5275 => {} // PrimitiveIndicesNV - 5276 => { - } + 5276 => {} // ClipDistancePerViewNV - 5277 => { - } + 5277 => {} // CullDistancePerViewNV - 5278 => { - } + 5278 => {} // LayerPerViewNV - 5279 => { - } + 5279 => {} // MeshViewCountNV - 5280 => { - } + 5280 => {} // MeshViewIndicesNV - 5281 => { - } + 5281 => {} // BaryCoordNV - 5286 => { - } + 5286 => {} // BaryCoordNoPerspNV - 5287 => { - } + 5287 => {} // FragmentSizeNV - 5292 => { - } + 5292 => {} // InvocationsPerPixelNV - 5293 => { - } + 5293 => {} // PrimitivePointIndicesEXT - 5294 => { - } + 5294 => {} // PrimitiveLineIndicesEXT - 5295 => { - } + 5295 => {} // PrimitiveTriangleIndicesEXT - 5296 => { - } + 5296 => {} // CullPrimitiveEXT - 5299 => { - } + 5299 => {} // LaunchIdKHR - 5319 => { - } + 5319 => {} // LaunchSizeKHR - 5320 => { - } + 5320 => {} // WorldRayOriginKHR - 5321 => { - } + 5321 => {} // WorldRayDirectionKHR - 5322 => { - } + 5322 => {} // ObjectRayOriginKHR - 5323 => { - } + 5323 => {} // ObjectRayDirectionKHR - 5324 => { - } + 5324 => {} // RayTminKHR - 5325 => { - } + 5325 => {} // RayTmaxKHR - 5326 => { - } + 5326 => {} // InstanceCustomIndexKHR - 5327 => { - } + 5327 => {} // ObjectToWorldKHR - 5330 => { - } + 5330 => {} // WorldToObjectKHR - 5331 => { - } + 5331 => {} // HitTNV - 5332 => { - } + 5332 => {} // HitKindKHR - 5333 => { - } + 5333 => {} // CurrentRayTimeNV - 5334 => { - } + 5334 => {} // HitTriangleVertexPositionsKHR - 5335 => { - } + 5335 => {} // HitMicroTriangleVertexPositionsNV - 5337 => { - } + 5337 => {} // HitMicroTriangleVertexBarycentricsNV - 5344 => { - } + 5344 => {} // IncomingRayFlagsKHR - 5351 => { - } + 5351 => {} // RayGeometryIndexKHR - 5352 => { - } + 5352 => {} // WarpsPerSMNV - 5374 => { - } + 5374 => {} // SMCountNV - 5375 => { - } + 5375 => {} // WarpIDNV - 5376 => { - } + 5376 => {} // SMIDNV - 5377 => { - } + 5377 => {} // HitKindFrontFacingMicroTriangleNV - 5405 => { - } + 5405 => {} // HitKindBackFacingMicroTriangleNV - 5406 => { - } + 5406 => {} // CullMaskKHR - 6021 => { - } - _ => {}, + 6021 => {} + _ => {} } Ok(out) } @@ -2671,33 +2277,29 @@ fn print_enum_BuiltIn(operands: &mut Operands, id_names: &HashMap) #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_Scope(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_Scope( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Scope", value)?]; match value { // CrossDevice - 0 => { - } + 0 => {} // Device - 1 => { - } + 1 => {} // Workgroup - 2 => { - } + 2 => {} // Subgroup - 3 => { - } + 3 => {} // Invocation - 4 => { - } + 4 => {} // QueueFamilyKHR - 5 => { - } + 5 => {} // ShaderCallKHR - 6 => { - } - _ => {}, + 6 => {} + _ => {} } Ok(out) } @@ -2705,33 +2307,29 @@ fn print_enum_Scope(operands: &mut Operands, id_names: &HashMap) -> #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_GroupOperation(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_GroupOperation( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"GroupOperation", value)?]; match value { // Reduce - 0 => { - } + 0 => {} // InclusiveScan - 1 => { - } + 1 => {} // ExclusiveScan - 2 => { - } + 2 => {} // ClusteredReduce - 3 => { - } + 3 => {} // PartitionedReduceNV - 6 => { - } + 6 => {} // PartitionedInclusiveScanNV - 7 => { - } + 7 => {} // PartitionedExclusiveScanNV - 8 => { - } - _ => {}, + 8 => {} + _ => {} } Ok(out) } @@ -2739,21 +2337,21 @@ fn print_enum_GroupOperation(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_KernelEnqueueFlags( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"KernelEnqueueFlags", value)?]; match value { // NoWait - 0 => { - } + 0 => {} // WaitKernel - 1 => { - } + 1 => {} // WaitWorkGroup - 2 => { - } - _ => {}, + 2 => {} + _ => {} } Ok(out) } @@ -2761,693 +2359,469 @@ fn print_enum_KernelEnqueueFlags(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_Capability( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"Capability", value)?]; match value { // Matrix - 0 => { - } + 0 => {} // Shader - 1 => { - } + 1 => {} // Geometry - 2 => { - } + 2 => {} // Tessellation - 3 => { - } + 3 => {} // Addresses - 4 => { - } + 4 => {} // Linkage - 5 => { - } + 5 => {} // Kernel - 6 => { - } + 6 => {} // Vector16 - 7 => { - } + 7 => {} // Float16Buffer - 8 => { - } + 8 => {} // Float16 - 9 => { - } + 9 => {} // Float64 - 10 => { - } + 10 => {} // Int64 - 11 => { - } + 11 => {} // Int64Atomics - 12 => { - } + 12 => {} // ImageBasic - 13 => { - } + 13 => {} // ImageReadWrite - 14 => { - } + 14 => {} // ImageMipmap - 15 => { - } + 15 => {} // Pipes - 17 => { - } + 17 => {} // Groups - 18 => { - } + 18 => {} // DeviceEnqueue - 19 => { - } + 19 => {} // LiteralSampler - 20 => { - } + 20 => {} // AtomicStorage - 21 => { - } + 21 => {} // Int16 - 22 => { - } + 22 => {} // TessellationPointSize - 23 => { - } + 23 => {} // GeometryPointSize - 24 => { - } + 24 => {} // ImageGatherExtended - 25 => { - } + 25 => {} // StorageImageMultisample - 27 => { - } + 27 => {} // UniformBufferArrayDynamicIndexing - 28 => { - } + 28 => {} // SampledImageArrayDynamicIndexing - 29 => { - } + 29 => {} // StorageBufferArrayDynamicIndexing - 30 => { - } + 30 => {} // StorageImageArrayDynamicIndexing - 31 => { - } + 31 => {} // ClipDistance - 32 => { - } + 32 => {} // CullDistance - 33 => { - } + 33 => {} // ImageCubeArray - 34 => { - } + 34 => {} // SampleRateShading - 35 => { - } + 35 => {} // ImageRect - 36 => { - } + 36 => {} // SampledRect - 37 => { - } + 37 => {} // GenericPointer - 38 => { - } + 38 => {} // Int8 - 39 => { - } + 39 => {} // InputAttachment - 40 => { - } + 40 => {} // SparseResidency - 41 => { - } + 41 => {} // MinLod - 42 => { - } + 42 => {} // Sampled1D - 43 => { - } + 43 => {} // Image1D - 44 => { - } + 44 => {} // SampledCubeArray - 45 => { - } + 45 => {} // SampledBuffer - 46 => { - } + 46 => {} // ImageBuffer - 47 => { - } + 47 => {} // ImageMSArray - 48 => { - } + 48 => {} // StorageImageExtendedFormats - 49 => { - } + 49 => {} // ImageQuery - 50 => { - } + 50 => {} // DerivativeControl - 51 => { - } + 51 => {} // InterpolationFunction - 52 => { - } + 52 => {} // TransformFeedback - 53 => { - } + 53 => {} // GeometryStreams - 54 => { - } + 54 => {} // StorageImageReadWithoutFormat - 55 => { - } + 55 => {} // StorageImageWriteWithoutFormat - 56 => { - } + 56 => {} // MultiViewport - 57 => { - } + 57 => {} // SubgroupDispatch - 58 => { - } + 58 => {} // NamedBarrier - 59 => { - } + 59 => {} // PipeStorage - 60 => { - } + 60 => {} // GroupNonUniform - 61 => { - } + 61 => {} // GroupNonUniformVote - 62 => { - } + 62 => {} // GroupNonUniformArithmetic - 63 => { - } + 63 => {} // GroupNonUniformBallot - 64 => { - } + 64 => {} // GroupNonUniformShuffle - 65 => { - } + 65 => {} // GroupNonUniformShuffleRelative - 66 => { - } + 66 => {} // GroupNonUniformClustered - 67 => { - } + 67 => {} // GroupNonUniformQuad - 68 => { - } + 68 => {} // ShaderLayer - 69 => { - } + 69 => {} // ShaderViewportIndex - 70 => { - } + 70 => {} // UniformDecoration - 71 => { - } + 71 => {} // CoreBuiltinsARM - 4165 => { - } + 4165 => {} // TileImageColorReadAccessEXT - 4166 => { - } + 4166 => {} // TileImageDepthReadAccessEXT - 4167 => { - } + 4167 => {} // TileImageStencilReadAccessEXT - 4168 => { - } + 4168 => {} // FragmentShadingRateKHR - 4422 => { - } + 4422 => {} // SubgroupBallotKHR - 4423 => { - } + 4423 => {} // DrawParameters - 4427 => { - } + 4427 => {} // WorkgroupMemoryExplicitLayoutKHR - 4428 => { - } + 4428 => {} // WorkgroupMemoryExplicitLayout8BitAccessKHR - 4429 => { - } + 4429 => {} // WorkgroupMemoryExplicitLayout16BitAccessKHR - 4430 => { - } + 4430 => {} // SubgroupVoteKHR - 4431 => { - } + 4431 => {} // StorageUniformBufferBlock16 - 4433 => { - } + 4433 => {} // StorageUniform16 - 4434 => { - } + 4434 => {} // StoragePushConstant16 - 4435 => { - } + 4435 => {} // StorageInputOutput16 - 4436 => { - } + 4436 => {} // DeviceGroup - 4437 => { - } + 4437 => {} // MultiView - 4439 => { - } + 4439 => {} // VariablePointersStorageBuffer - 4441 => { - } + 4441 => {} // VariablePointers - 4442 => { - } + 4442 => {} // AtomicStorageOps - 4445 => { - } + 4445 => {} // SampleMaskPostDepthCoverage - 4447 => { - } + 4447 => {} // StorageBuffer8BitAccess - 4448 => { - } + 4448 => {} // UniformAndStorageBuffer8BitAccess - 4449 => { - } + 4449 => {} // StoragePushConstant8 - 4450 => { - } + 4450 => {} // DenormPreserve - 4464 => { - } + 4464 => {} // DenormFlushToZero - 4465 => { - } + 4465 => {} // SignedZeroInfNanPreserve - 4466 => { - } + 4466 => {} // RoundingModeRTE - 4467 => { - } + 4467 => {} // RoundingModeRTZ - 4468 => { - } + 4468 => {} // RayQueryProvisionalKHR - 4471 => { - } + 4471 => {} // RayQueryKHR - 4472 => { - } + 4472 => {} // RayTraversalPrimitiveCullingKHR - 4478 => { - } + 4478 => {} // RayTracingKHR - 4479 => { - } + 4479 => {} // TextureSampleWeightedQCOM - 4484 => { - } + 4484 => {} // TextureBoxFilterQCOM - 4485 => { - } + 4485 => {} // TextureBlockMatchQCOM - 4486 => { - } + 4486 => {} // Float16ImageAMD - 5008 => { - } + 5008 => {} // ImageGatherBiasLodAMD - 5009 => { - } + 5009 => {} // FragmentMaskAMD - 5010 => { - } + 5010 => {} // StencilExportEXT - 5013 => { - } + 5013 => {} // ImageReadWriteLodAMD - 5015 => { - } + 5015 => {} // Int64ImageEXT - 5016 => { - } + 5016 => {} // ShaderClockKHR - 5055 => { - } + 5055 => {} // ShaderEnqueueAMDX - 5067 => { - } + 5067 => {} // SampleMaskOverrideCoverageNV - 5249 => { - } - // GeometryShaderPassthroughNV - 5251 => { - } + 5249 => {} + // GeometryShaderPassthroughNV + 5251 => {} // ShaderViewportIndexLayerNV - 5254 => { - } + 5254 => {} // ShaderViewportMaskNV - 5255 => { - } + 5255 => {} // ShaderStereoViewNV - 5259 => { - } + 5259 => {} // PerViewAttributesNV - 5260 => { - } + 5260 => {} // FragmentFullyCoveredEXT - 5265 => { - } + 5265 => {} // MeshShadingNV - 5266 => { - } + 5266 => {} // ImageFootprintNV - 5282 => { - } + 5282 => {} // MeshShadingEXT - 5283 => { - } + 5283 => {} // FragmentBarycentricNV - 5284 => { - } + 5284 => {} // ComputeDerivativeGroupQuadsNV - 5288 => { - } + 5288 => {} // ShadingRateNV - 5291 => { - } + 5291 => {} // GroupNonUniformPartitionedNV - 5297 => { - } + 5297 => {} // ShaderNonUniformEXT - 5301 => { - } + 5301 => {} // RuntimeDescriptorArrayEXT - 5302 => { - } + 5302 => {} // InputAttachmentArrayDynamicIndexingEXT - 5303 => { - } + 5303 => {} // UniformTexelBufferArrayDynamicIndexingEXT - 5304 => { - } + 5304 => {} // StorageTexelBufferArrayDynamicIndexingEXT - 5305 => { - } + 5305 => {} // UniformBufferArrayNonUniformIndexingEXT - 5306 => { - } + 5306 => {} // SampledImageArrayNonUniformIndexingEXT - 5307 => { - } + 5307 => {} // StorageBufferArrayNonUniformIndexingEXT - 5308 => { - } + 5308 => {} // StorageImageArrayNonUniformIndexingEXT - 5309 => { - } + 5309 => {} // InputAttachmentArrayNonUniformIndexingEXT - 5310 => { - } + 5310 => {} // UniformTexelBufferArrayNonUniformIndexingEXT - 5311 => { - } + 5311 => {} // StorageTexelBufferArrayNonUniformIndexingEXT - 5312 => { - } + 5312 => {} // RayTracingPositionFetchKHR - 5336 => { - } + 5336 => {} // RayTracingNV - 5340 => { - } + 5340 => {} // RayTracingMotionBlurNV - 5341 => { - } + 5341 => {} // VulkanMemoryModelKHR - 5345 => { - } + 5345 => {} // VulkanMemoryModelDeviceScopeKHR - 5346 => { - } + 5346 => {} // PhysicalStorageBufferAddressesEXT - 5347 => { - } + 5347 => {} // ComputeDerivativeGroupLinearNV - 5350 => { - } + 5350 => {} // RayTracingProvisionalKHR - 5353 => { - } + 5353 => {} // CooperativeMatrixNV - 5357 => { - } + 5357 => {} // FragmentShaderSampleInterlockEXT - 5363 => { - } + 5363 => {} // FragmentShaderShadingRateInterlockEXT - 5372 => { - } + 5372 => {} // ShaderSMBuiltinsNV - 5373 => { - } + 5373 => {} // FragmentShaderPixelInterlockEXT - 5378 => { - } + 5378 => {} // DemoteToHelperInvocationEXT - 5379 => { - } + 5379 => {} // DisplacementMicromapNV - 5380 => { - } + 5380 => {} // RayTracingOpacityMicromapEXT - 5381 => { - } + 5381 => {} // ShaderInvocationReorderNV - 5383 => { - } + 5383 => {} // BindlessTextureNV - 5390 => { - } + 5390 => {} // RayQueryPositionFetchKHR - 5391 => { - } + 5391 => {} // RayTracingDisplacementMicromapNV - 5409 => { - } + 5409 => {} // SubgroupShuffleINTEL - 5568 => { - } + 5568 => {} // SubgroupBufferBlockIOINTEL - 5569 => { - } + 5569 => {} // SubgroupImageBlockIOINTEL - 5570 => { - } + 5570 => {} // SubgroupImageMediaBlockIOINTEL - 5579 => { - } + 5579 => {} // RoundToInfinityINTEL - 5582 => { - } + 5582 => {} // FloatingPointModeINTEL - 5583 => { - } + 5583 => {} // IntegerFunctions2INTEL - 5584 => { - } + 5584 => {} // FunctionPointersINTEL - 5603 => { - } + 5603 => {} // IndirectReferencesINTEL - 5604 => { - } + 5604 => {} // AsmINTEL - 5606 => { - } + 5606 => {} // AtomicFloat32MinMaxEXT - 5612 => { - } + 5612 => {} // AtomicFloat64MinMaxEXT - 5613 => { - } + 5613 => {} // AtomicFloat16MinMaxEXT - 5616 => { - } + 5616 => {} // VectorComputeINTEL - 5617 => { - } + 5617 => {} // VectorAnyINTEL - 5619 => { - } + 5619 => {} // ExpectAssumeKHR - 5629 => { - } + 5629 => {} // SubgroupAvcMotionEstimationINTEL - 5696 => { - } + 5696 => {} // SubgroupAvcMotionEstimationIntraINTEL - 5697 => { - } + 5697 => {} // SubgroupAvcMotionEstimationChromaINTEL - 5698 => { - } + 5698 => {} // VariableLengthArrayINTEL - 5817 => { - } + 5817 => {} // FunctionFloatControlINTEL - 5821 => { - } + 5821 => {} // FPGAMemoryAttributesINTEL - 5824 => { - } + 5824 => {} // FPFastMathModeINTEL - 5837 => { - } + 5837 => {} // ArbitraryPrecisionIntegersINTEL - 5844 => { - } + 5844 => {} // ArbitraryPrecisionFloatingPointINTEL - 5845 => { - } + 5845 => {} // UnstructuredLoopControlsINTEL - 5886 => { - } + 5886 => {} // FPGALoopControlsINTEL - 5888 => { - } + 5888 => {} // KernelAttributesINTEL - 5892 => { - } + 5892 => {} // FPGAKernelAttributesINTEL - 5897 => { - } + 5897 => {} // FPGAMemoryAccessesINTEL - 5898 => { - } + 5898 => {} // FPGAClusterAttributesINTEL - 5904 => { - } + 5904 => {} // LoopFuseINTEL - 5906 => { - } + 5906 => {} // FPGADSPControlINTEL - 5908 => { - } + 5908 => {} // MemoryAccessAliasingINTEL - 5910 => { - } + 5910 => {} // FPGAInvocationPipeliningAttributesINTEL - 5916 => { - } + 5916 => {} // FPGABufferLocationINTEL - 5920 => { - } + 5920 => {} // ArbitraryPrecisionFixedPointINTEL - 5922 => { - } + 5922 => {} // USMStorageClassesINTEL - 5935 => { - } + 5935 => {} // RuntimeAlignedAttributeINTEL - 5939 => { - } + 5939 => {} // IOPipesINTEL - 5943 => { - } + 5943 => {} // BlockingPipesINTEL - 5945 => { - } + 5945 => {} // FPGARegINTEL - 5948 => { - } + 5948 => {} // DotProductInputAllKHR - 6016 => { - } + 6016 => {} // DotProductInput4x8BitKHR - 6017 => { - } + 6017 => {} // DotProductInput4x8BitPackedKHR - 6018 => { - } + 6018 => {} // DotProductKHR - 6019 => { - } + 6019 => {} // RayCullMaskKHR - 6020 => { - } + 6020 => {} // CooperativeMatrixKHR - 6022 => { - } + 6022 => {} // BitInstructions - 6025 => { - } + 6025 => {} // GroupNonUniformRotateKHR - 6026 => { - } + 6026 => {} // AtomicFloat32AddEXT - 6033 => { - } + 6033 => {} // AtomicFloat64AddEXT - 6034 => { - } + 6034 => {} // LongCompositesINTEL - 6089 => { - } + 6089 => {} // OptNoneINTEL - 6094 => { - } + 6094 => {} // AtomicFloat16AddEXT - 6095 => { - } + 6095 => {} // DebugInfoModuleINTEL - 6114 => { - } + 6114 => {} // BFloat16ConversionINTEL - 6115 => { - } + 6115 => {} // SplitBarrierINTEL - 6141 => { - } + 6141 => {} // FPGAClusterAttributesV2INTEL - 6150 => { - } + 6150 => {} // FPGAKernelAttributesv2INTEL - 6161 => { - } + 6161 => {} // FPMaxErrorINTEL - 6169 => { - } + 6169 => {} // FPGALatencyControlINTEL - 6171 => { - } + 6171 => {} // FPGAArgumentInterfacesINTEL - 6174 => { - } + 6174 => {} // GlobalVariableHostAccessINTEL - 6187 => { - } + 6187 => {} // GlobalVariableFPGADecorationsINTEL - 6189 => { - } + 6189 => {} // GroupUniformArithmeticKHR - 6400 => { - } + 6400 => {} // CacheControlsINTEL - 6441 => { - } - _ => {}, + 6441 => {} + _ => {} } Ok(out) } @@ -3455,18 +2829,19 @@ fn print_enum_Capability(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_RayQueryIntersection( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayQueryIntersection", value)?]; match value { // RayQueryCandidateIntersectionKHR - 0 => { - } + 0 => {} // RayQueryCommittedIntersectionKHR - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -3474,21 +2849,21 @@ fn print_enum_RayQueryIntersection(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_RayQueryCommittedIntersectionType( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayQueryCommittedIntersectionType", value)?]; match value { // RayQueryCommittedIntersectionNoneKHR - 0 => { - } + 0 => {} // RayQueryCommittedIntersectionTriangleKHR - 1 => { - } + 1 => {} // RayQueryCommittedIntersectionGeneratedKHR - 2 => { - } - _ => {}, + 2 => {} + _ => {} } Ok(out) } @@ -3496,18 +2871,19 @@ fn print_enum_RayQueryCommittedIntersectionType(operands: &mut Operands, id_name #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_RayQueryCandidateIntersectionType(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_RayQueryCandidateIntersectionType( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"RayQueryCandidateIntersectionType", value)?]; match value { // RayQueryCandidateIntersectionTriangleKHR - 0 => { - } + 0 => {} // RayQueryCandidateIntersectionAABBKHR - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -3515,15 +2891,17 @@ fn print_enum_RayQueryCandidateIntersectionType(operands: &mut Operands, id_name #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_PackedVectorFormat(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_PackedVectorFormat( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"PackedVectorFormat", value)?]; match value { // PackedVectorFormat4x8BitKHR - 0 => { - } - _ => {}, + 0 => {} + _ => {} } Ok(out) } @@ -3531,46 +2909,44 @@ fn print_enum_PackedVectorFormat(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_CooperativeMatrixOperands( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"CooperativeMatrixOperands", value)?]; // NoneKHR - if value & 0x0000 != 0 { - } + if value & 0x0000 != 0 {} // MatrixASignedComponentsKHR - if value & 0x0001 != 0 { - } + if value & 0x0001 != 0 {} // MatrixBSignedComponentsKHR - if value & 0x0002 != 0 { - } + if value & 0x0002 != 0 {} // MatrixCSignedComponentsKHR - if value & 0x0004 != 0 { - } + if value & 0x0004 != 0 {} // MatrixResultSignedComponentsKHR - if value & 0x0008 != 0 { - } + if value & 0x0008 != 0 {} // SaturatingAccumulationKHR - if value & 0x0010 != 0 { - } + if value & 0x0010 != 0 {} Ok(out) } #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_CooperativeMatrixLayout(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_CooperativeMatrixLayout( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"CooperativeMatrixLayout", value)?]; match value { // RowMajorKHR - 0 => { - } + 0 => {} // ColumnMajorKHR - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -3578,21 +2954,21 @@ fn print_enum_CooperativeMatrixLayout(operands: &mut Operands, id_names: &HashMa #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_CooperativeMatrixUse(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_CooperativeMatrixUse( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"CooperativeMatrixUse", value)?]; match value { // MatrixAKHR - 0 => { - } + 0 => {} // MatrixBKHR - 1 => { - } + 1 => {} // MatrixAccumulatorKHR - 2 => { - } - _ => {}, + 2 => {} + _ => {} } Ok(out) } @@ -3600,18 +2976,19 @@ fn print_enum_CooperativeMatrixUse(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_InitializationModeQualifier( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"InitializationModeQualifier", value)?]; match value { // InitOnDeviceReprogramINTEL - 0 => { - } + 0 => {} // InitOnDeviceResetINTEL - 1 => { - } - _ => {}, + 1 => {} + _ => {} } Ok(out) } @@ -3619,27 +2996,25 @@ fn print_enum_InitializationModeQualifier(operands: &mut Operands, id_names: &Ha #[allow(non_snake_case)] #[allow(dead_code)] #[allow(unused_variables)] -fn print_enum_LoadCacheControl(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_LoadCacheControl( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"LoadCacheControl", value)?]; match value { // UncachedINTEL - 0 => { - } + 0 => {} // CachedINTEL - 1 => { - } + 1 => {} // StreamingINTEL - 2 => { - } + 2 => {} // InvalidateAfterReadINTEL - 3 => { - } + 3 => {} // ConstCachedINTEL - 4 => { - } - _ => {}, + 4 => {} + _ => {} } Ok(out) } @@ -3647,37 +3022,38 @@ fn print_enum_LoadCacheControl(operands: &mut Operands, id_names: &HashMap) -> Result> { +fn print_enum_StoreCacheControl( + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let value = operands.read_u32()?; #[allow(unused_mut)] let mut out = vec![enum_to_str(&"StoreCacheControl", value)?]; match value { // UncachedINTEL - 0 => { - } + 0 => {} // WriteThroughINTEL - 1 => { - } + 1 => {} // WriteBackINTEL - 2 => { - } + 2 => {} // StreamingINTEL - 3 => { - } - _ => {}, + 3 => {} + _ => {} } Ok(out) } -pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap) -> Result> { +pub fn print_operand( + opcode: u32, + operands: &mut Operands, + id_names: &HashMap, +) -> Result> { let mut out: Vec = Vec::new(); match opcode { // OpNop - 0 => { - } + 0 => {} // OpUndef - 1 => { - } + 1 => {} // OpSourceContinued 2 => { // LiteralString @@ -3787,11 +3163,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 19 => {} // OpTypeBool - 20 => { - } + 20 => {} // OpTypeInt 21 => { // LiteralInteger @@ -3840,8 +3214,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 26 => {} // OpTypeSampledImage 27 => { // IdRef @@ -3888,17 +3261,13 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 34 => {} // OpTypeDeviceEvent - 35 => { - } + 35 => {} // OpTypeReserveId - 36 => { - } + 36 => {} // OpTypeQueue - 37 => { - } + 37 => {} // OpTypePipe 38 => { // AccessQualifier @@ -3912,11 +3281,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 41 => {} // OpConstantFalse - 42 => { - } + 42 => {} // OpConstant 43 => { // LiteralContextDependentNumber @@ -3939,14 +3306,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 46 => {} // OpSpecConstantTrue - 48 => { - } + 48 => {} // OpSpecConstantFalse - 49 => { - } + 49 => {} // OpSpecConstant 50 => { // LiteralContextDependentNumber @@ -3972,11 +3336,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 55 => {} // OpFunctionEnd - 56 => { - } + 56 => {} // OpFunctionCall 57 => { // IdRef @@ -4125,8 +3487,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 73 => {} // OpGroupDecorate 74 => { // IdRef @@ -5060,11 +4421,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 218 => {} // OpEndPrimitive - 219 => { - } + 219 => {} // OpEmitStreamVertex 220 => { // IdRef @@ -5293,8 +4652,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 248 => {} // OpBranch 249 => { // IdRef @@ -5325,19 +4683,16 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 252 => {} // OpReturn - 253 => { - } + 253 => {} // OpReturnValue 254 => { // IdRef out.push(print_id(operands, id_names)?); } // OpUnreachable - 255 => { - } + 255 => {} // OpLifetimeStart 256 => { // IdRef @@ -5739,8 +5094,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 299 => {} // OpIsValidEvent 300 => { // IdRef @@ -5763,8 +5117,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 303 => {} // OpBuildNDRange 304 => { // IdRef @@ -5905,8 +5258,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 317 => {} // OpAtomicFlagTestAndSet 318 => { // IdRef @@ -5942,8 +5294,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 322 => {} // OpConstantPipeStorage 323 => { // LiteralInteger @@ -5983,8 +5334,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 327 => {} // OpNamedBarrierInitialize 328 => { // IdRef @@ -6418,8 +5768,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 4416 => {} // OpSubgroupBallotKHR 4421 => { // IdRef @@ -6503,11 +5852,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 4448 => {} // OpTerminateRayKHR - 4449 => { - } + 4449 => {} // OpSDotKHR 4450 => { // IdRef @@ -6644,8 +5991,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 4472 => {} // OpRayQueryInitializeKHR 4473 => { // IdRef @@ -7191,8 +6537,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5281 => {} // OpImageSampleFootprintNV 5283 => { // IdRef @@ -7274,11 +6619,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5335 => {} // OpTerminateRayNV - 5336 => { - } + 5336 => {} // OpTraceNV 5337 => { // IdRef @@ -7366,8 +6709,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5341 => {} // OpExecuteCallableNV 5344 => { // IdRef @@ -7429,17 +6771,13 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5364 => {} // OpEndInvocationInterlockEXT - 5365 => { - } + 5365 => {} // OpDemoteToHelperInvocationEXT - 5380 => { - } + 5380 => {} // OpIsHelperInvocationEXT - 5381 => { - } + 5381 => {} // OpConvertUToImageNV 5391 => { // IdRef @@ -7753,41 +7091,29 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5701 => {} // OpTypeAvcRefPayloadINTEL - 5702 => { - } + 5702 => {} // OpTypeAvcSicPayloadINTEL - 5703 => { - } + 5703 => {} // OpTypeAvcMcePayloadINTEL - 5704 => { - } + 5704 => {} // OpTypeAvcMceResultINTEL - 5705 => { - } + 5705 => {} // OpTypeAvcImeResultINTEL - 5706 => { - } + 5706 => {} // OpTypeAvcImeResultSingleReferenceStreamoutINTEL - 5707 => { - } + 5707 => {} // OpTypeAvcImeResultDualReferenceStreamoutINTEL - 5708 => { - } + 5708 => {} // OpTypeAvcImeSingleReferenceStreaminINTEL - 5709 => { - } + 5709 => {} // OpTypeAvcImeDualReferenceStreaminINTEL - 5710 => { - } + 5710 => {} // OpTypeAvcRefResultINTEL - 5711 => { - } + 5711 => {} // OpTypeAvcSicResultINTEL - 5712 => { - } + 5712 => {} // OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL 5713 => { // IdRef @@ -7845,14 +7171,11 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5721 => {} // OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL - 5722 => { - } + 5722 => {} // OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL - 5723 => { - } + 5723 => {} // OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL 5724 => { // IdRef @@ -7872,11 +7195,9 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5726 => {} // OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL - 5727 => { - } + 5727 => {} // OpSubgroupAvcMceSetAcOnlyHaarINTEL 5728 => { // IdRef @@ -8564,8 +7885,7 @@ pub fn print_operand(opcode: u32, operands: &mut Operands, id_names: &HashMap { - } + 5819 => {} // OpRestoreMemoryINTEL 5820 => { // IdRef diff --git a/spirq-spvasm/src/test.rs b/spirq-spvasm/src/test.rs index 00f2b2a..98760cd 100644 --- a/spirq-spvasm/src/test.rs +++ b/spirq-spvasm/src/test.rs @@ -24,10 +24,14 @@ fn test_asm_dis_roundtrip() { %void_8 = OpTypeVoid %void_9 = OpTypeVoid %void_10 = OpTypeVoid -"#.trim(); +"# + .trim(); let header = SpirvHeader::default(); let spv = Assembler::new().assemble(code, header).unwrap(); - let spvasm = Disassembler::new().name_type_ids(true).disassemble(&spv.into()).unwrap(); + let spvasm = Disassembler::new() + .name_type_ids(true) + .disassemble(&spv.into()) + .unwrap(); assert_eq!(code, spvasm); } diff --git a/spirq/src/reflect.rs b/spirq/src/reflect.rs index 913dd1c..d208e63 100644 --- a/spirq/src/reflect.rs +++ b/spirq/src/reflect.rs @@ -842,10 +842,7 @@ fn make_var<'a>( } } impl<'a> ReflectIntermediate<'a> { - pub fn parse_global_declrs( - &mut self, - instrs: &mut Instrs<'a>, - ) -> Result<()> { + pub fn parse_global_declrs(&mut self, instrs: &mut Instrs<'a>) -> Result<()> { // Don't change the order. See _2.4 Logical Layout of a Module_ of the // SPIR-V specification for more information. @@ -906,7 +903,9 @@ impl<'a> ReflectIntermediate<'a> { }; use std::collections::hash_map::Entry; match self.entry_point_declrs.entry(op.func_id) { - Entry::Occupied(_) => return Err(anyhow!("duplicate entry point at a same id")), + Entry::Occupied(_) => { + return Err(anyhow!("duplicate entry point at a same id")) + } Entry::Vacant(e) => { e.insert(entry_point_declr); } @@ -1046,7 +1045,7 @@ impl<'a> ReflectIntermediate<'a> { pub fn parse_functions( &mut self, instrs: &mut Instrs<'a>, - inspector: &mut impl Inspector + inspector: &mut impl Inspector, ) -> Result<()> { // 10. All function declarations ("declarations" are functions without a // body; there is no forward declaration to a function with a body). @@ -1274,9 +1273,7 @@ fn combine_img_samplers(vars: Vec) -> Vec { } impl<'a> ReflectIntermediate<'a> { - pub fn collect_entry_points( - &self, - ) -> Result> { + pub fn collect_entry_points(&self) -> Result> { let mut entry_points = Vec::with_capacity(self.entry_point_declrs.len()); for (id, entry_point_declr) in self.entry_point_declrs.iter() { let mut vars = if self.cfg.ref_all_rscs { diff --git a/spirq/src/reflect_cfg.rs b/spirq/src/reflect_cfg.rs index 37e851f..6b32045 100644 --- a/spirq/src/reflect_cfg.rs +++ b/spirq/src/reflect_cfg.rs @@ -73,7 +73,11 @@ impl ReflectConfig { let spv = self.spv.take().unwrap_or_default(); let mut itm = ReflectIntermediate::new(self)?; let mut func_inspector = FunctionInspector::new(); - reflect(&mut itm, &mut spv.instrs()?, func_inspector.chain(inspector)) + reflect( + &mut itm, + &mut spv.instrs()?, + func_inspector.chain(inspector), + ) } /// Reflect the SPIR-V binary and extract all entry points with an inspector /// function for customized reflection subroutines. From 34bb79668483cbcfaa425937d166125ab323eb25 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 20:46:27 +0800 Subject: [PATCH 32/50] spirq-as/dis Roundtrip test --- .github/workflows/rust.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 07831b3..1cbc7ed 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -38,4 +38,8 @@ jobs: shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources + cargo install --path spirq-as + cargo install --path spirq-dis + spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv + spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm git diff --exit-code From 17b87e3e8bb15935366270c634ab7645a635c283 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 21 Dec 2023 23:21:51 +0800 Subject: [PATCH 33/50] Fix tests --- .github/workflows/rust.yml | 2 +- assets/gallery.frag.spvasm | 1498 ++++++++++++++++++------------------ spirq-dis/src/main.rs | 4 + 3 files changed, 754 insertions(+), 750 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1cbc7ed..604cde3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -41,5 +41,5 @@ jobs: cargo install --path spirq-as cargo install --path spirq-dis spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv - spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm + spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent git diff --exit-code diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index f9a44cc..003c261 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -3,786 +3,786 @@ ; Generator: Khronos Glslang Reference Front End; 11 ; Bound: 406 ; Schema: 0 - OpCapability Shader - OpCapability Float16 - OpCapability Float64 - OpCapability Int64 - OpCapability Int16 - OpCapability StorageImageMultisample - OpCapability ImageCubeArray - OpCapability ImageRect - OpCapability SampledRect - OpCapability Int8 - OpCapability InputAttachment - OpCapability Sampled1D - OpCapability Image1D - OpCapability SampledCubeArray - OpCapability SampledBuffer - OpCapability ImageBuffer - OpCapability ImageMSArray - OpCapability RayQueryKHR - OpExtension "SPV_KHR_ray_query" - %1 = OpExtInstImport "GLSL.std.450" - OpMemoryModel Logical GLSL450 - OpEntryPoint Fragment %main "main" %ray_query %iImg1d %iImg2d %iImg3d %iImg1dArr %iImg2dArr %iImgCube %iImgCubeArr %iImgBuf %uImg1d %uImg2d %uImg3d %uImg1dArr %uImg2dArr %uImgCube %uImgCubeArr %uImgBuf %fImg1D %fImg2D %fImg3D %fImgCube %fImg2DRect %fImg1DArray %fImg2DArray %fImgCubeArray %fImgBuffer %fImg2DMS %fImg2DMSArray %iSamp1D %iSamp2D %iSamp3D %iSampCube %iSamp2DRect %iSamp1DArray %iSamp2DArray %iSampCubeArray %iSampBuffer %iSamp2DMS %iSamp2DMSArray %uSamp1D %uSamp2D %uSamp3D %uSampCube %uSamp2DRect %uSamp1DArray %uSamp2DArray %uSampCubeArray %uSampBuffer %uSamp2DMS %uSamp2DMSArray %fSamp1D %fSamp2D %fSamp3D %fSampCube %fSamp2DRect %fSamp1DArray %fSamp2DArray %fSampCubeArray %fSampBuffer %fSamp2DMS %fSamp2DMSArray %dsSamp1D %dsSamp2D %dsSampCube %dsSamp2DRect %dsSamp1DArray %dsSamp2DArray %dsSampCubeArray %samp %sampShadow %iTex1D %iTex2D %iTex3D %iTexCube %iTex2DRect %iTex1DArray %iTex2DArray %iTexCubeArray %iTexBuffer %iTex2DMS %iTex2DMSArray %uTex1D %uTex2D %uTex3D %uTexCube %uTex2DRect %uTex1DArray %uTex2DArray %uTexCubeArray %uTexBuffer %uTex2DMS %uTex2DMSArray %fTex1D %fTex2D %fTex3D %fTexCube %fTex2DRect %fTex1DArray %fTex2DArray %fTexCubeArray %fTexBuffer %fTex2DMS %fTex2DMSArray %ubo %ssbo %iAttm %iAttmMS %uAttm %uAttmMS %fAttm %fAttmMS %acc - OpExecutionMode %main OriginUpperLeft - OpSource GLSL 460 - OpSourceExtension "GL_EXT_ray_query" - OpSourceExtension "GL_EXT_ray_tracing" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" - OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" - OpName %main "main" - OpName %ray_query "ray_query" - OpName %iImg1d "iImg1d" - OpName %iImg2d "iImg2d" - OpName %iImg3d "iImg3d" - OpName %iImg1dArr "iImg1dArr" - OpName %iImg2dArr "iImg2dArr" - OpName %iImgCube "iImgCube" - OpName %iImgCubeArr "iImgCubeArr" - OpName %iImgBuf "iImgBuf" - OpName %uImg1d "uImg1d" - OpName %uImg2d "uImg2d" - OpName %uImg3d "uImg3d" - OpName %uImg1dArr "uImg1dArr" - OpName %uImg2dArr "uImg2dArr" - OpName %uImgCube "uImgCube" - OpName %uImgCubeArr "uImgCubeArr" - OpName %uImgBuf "uImgBuf" - OpName %fImg1D "fImg1D" - OpName %fImg2D "fImg2D" - OpName %fImg3D "fImg3D" - OpName %fImgCube "fImgCube" - OpName %fImg2DRect "fImg2DRect" - OpName %fImg1DArray "fImg1DArray" - OpName %fImg2DArray "fImg2DArray" - OpName %fImgCubeArray "fImgCubeArray" - OpName %fImgBuffer "fImgBuffer" - OpName %fImg2DMS "fImg2DMS" - OpName %fImg2DMSArray "fImg2DMSArray" - OpName %iSamp1D "iSamp1D" - OpName %iSamp2D "iSamp2D" - OpName %iSamp3D "iSamp3D" - OpName %iSampCube "iSampCube" - OpName %iSamp2DRect "iSamp2DRect" - OpName %iSamp1DArray "iSamp1DArray" - OpName %iSamp2DArray "iSamp2DArray" - OpName %iSampCubeArray "iSampCubeArray" - OpName %iSampBuffer "iSampBuffer" - OpName %iSamp2DMS "iSamp2DMS" - OpName %iSamp2DMSArray "iSamp2DMSArray" - OpName %uSamp1D "uSamp1D" - OpName %uSamp2D "uSamp2D" - OpName %uSamp3D "uSamp3D" - OpName %uSampCube "uSampCube" - OpName %uSamp2DRect "uSamp2DRect" - OpName %uSamp1DArray "uSamp1DArray" - OpName %uSamp2DArray "uSamp2DArray" - OpName %uSampCubeArray "uSampCubeArray" - OpName %uSampBuffer "uSampBuffer" - OpName %uSamp2DMS "uSamp2DMS" - OpName %uSamp2DMSArray "uSamp2DMSArray" - OpName %fSamp1D "fSamp1D" - OpName %fSamp2D "fSamp2D" - OpName %fSamp3D "fSamp3D" - OpName %fSampCube "fSampCube" - OpName %fSamp2DRect "fSamp2DRect" - OpName %fSamp1DArray "fSamp1DArray" - OpName %fSamp2DArray "fSamp2DArray" - OpName %fSampCubeArray "fSampCubeArray" - OpName %fSampBuffer "fSampBuffer" - OpName %fSamp2DMS "fSamp2DMS" - OpName %fSamp2DMSArray "fSamp2DMSArray" - OpName %dsSamp1D "dsSamp1D" - OpName %dsSamp2D "dsSamp2D" - OpName %dsSampCube "dsSampCube" - OpName %dsSamp2DRect "dsSamp2DRect" - OpName %dsSamp1DArray "dsSamp1DArray" - OpName %dsSamp2DArray "dsSamp2DArray" - OpName %dsSampCubeArray "dsSampCubeArray" - OpName %samp "samp" - OpName %sampShadow "sampShadow" - OpName %iTex1D "iTex1D" - OpName %iTex2D "iTex2D" - OpName %iTex3D "iTex3D" - OpName %iTexCube "iTexCube" - OpName %iTex2DRect "iTex2DRect" - OpName %iTex1DArray "iTex1DArray" - OpName %iTex2DArray "iTex2DArray" - OpName %iTexCubeArray "iTexCubeArray" - OpName %iTexBuffer "iTexBuffer" - OpName %iTex2DMS "iTex2DMS" - OpName %iTex2DMSArray "iTex2DMSArray" - OpName %uTex1D "uTex1D" - OpName %uTex2D "uTex2D" - OpName %uTex3D "uTex3D" - OpName %uTexCube "uTexCube" - OpName %uTex2DRect "uTex2DRect" - OpName %uTex1DArray "uTex1DArray" - OpName %uTex2DArray "uTex2DArray" - OpName %uTexCubeArray "uTexCubeArray" - OpName %uTexBuffer "uTexBuffer" - OpName %uTex2DMS "uTex2DMS" - OpName %uTex2DMSArray "uTex2DMSArray" - OpName %fTex1D "fTex1D" - OpName %fTex2D "fTex2D" - OpName %fTex3D "fTex3D" - OpName %fTexCube "fTexCube" - OpName %fTex2DRect "fTex2DRect" - OpName %fTex1DArray "fTex1DArray" - OpName %fTex2DArray "fTex2DArray" - OpName %fTexCubeArray "fTexCubeArray" - OpName %fTexBuffer "fTexBuffer" - OpName %fTex2DMS "fTex2DMS" - OpName %fTex2DMSArray "fTex2DMSArray" - OpName %Data "Data" - OpMemberName %Data 0 "i0" - OpMemberName %Data 1 "i1" - OpMemberName %Data 2 "i2" - OpMemberName %Data 3 "i3" - OpMemberName %Data 4 "u0" - OpMemberName %Data 5 "u1" - OpMemberName %Data 6 "u2" - OpMemberName %Data 7 "u3" - OpMemberName %Data 8 "f0" - OpMemberName %Data 9 "f1" - OpMemberName %Data 10 "f2" - OpMemberName %Data 11 "f3" - OpMemberName %Data 12 "fMat0" - OpMemberName %Data 13 "fMat1" - OpMemberName %Data 14 "fMat2" - OpMemberName %Data 15 "fMat3" - OpMemberName %Data 16 "fMat4" - OpMemberName %Data 17 "fMat5" - OpMemberName %Data 18 "fMat6" - OpMemberName %Data 19 "fMat7" - OpMemberName %Data 20 "fMat8" - OpMemberName %Data 21 "d0" - OpMemberName %Data 22 "d1" - OpMemberName %Data 23 "d2" - OpMemberName %Data 24 "d3" - OpMemberName %Data 25 "dMat0" - OpMemberName %Data 26 "dMat1" - OpMemberName %Data 27 "dMat2" - OpMemberName %Data 28 "dMat3" - OpMemberName %Data 29 "dMat4" - OpMemberName %Data 30 "dMat5" - OpMemberName %Data 31 "dMat6" - OpMemberName %Data 32 "dMat7" - OpMemberName %Data 33 "dMat8" - OpName %Ubo "Ubo" - OpMemberName %Ubo 0 "ds" - OpName %ubo "ubo" - OpName %Ssbo "Ssbo" - OpMemberName %Ssbo 0 "ds" - OpName %ssbo "ssbo" - OpName %iAttm "iAttm" - OpName %iAttmMS "iAttmMS" - OpName %uAttm "uAttm" - OpName %uAttmMS "uAttmMS" - OpName %fAttm "fAttm" - OpName %fAttmMS "fAttmMS" - OpName %acc "acc" - OpDecorate %iImg1d DescriptorSet 1 - OpDecorate %iImg1d Binding 0 - OpDecorate %iImg1d NonWritable - OpDecorate %iImg2d DescriptorSet 1 - OpDecorate %iImg2d Binding 1 - OpDecorate %iImg2d NonWritable - OpDecorate %iImg3d DescriptorSet 1 - OpDecorate %iImg3d Binding 2 - OpDecorate %iImg3d NonWritable - OpDecorate %iImg1dArr DescriptorSet 1 - OpDecorate %iImg1dArr Binding 3 - OpDecorate %iImg1dArr NonWritable - OpDecorate %iImg2dArr DescriptorSet 1 - OpDecorate %iImg2dArr Binding 4 - OpDecorate %iImg2dArr NonWritable - OpDecorate %iImgCube DescriptorSet 1 - OpDecorate %iImgCube Binding 5 - OpDecorate %iImgCube NonWritable - OpDecorate %iImgCubeArr DescriptorSet 1 - OpDecorate %iImgCubeArr Binding 6 - OpDecorate %iImgCubeArr NonWritable - OpDecorate %iImgBuf DescriptorSet 1 - OpDecorate %iImgBuf Binding 7 - OpDecorate %iImgBuf NonWritable - OpDecorate %uImg1d DescriptorSet 2 - OpDecorate %uImg1d Binding 0 - OpDecorate %uImg1d NonWritable - OpDecorate %uImg2d DescriptorSet 2 - OpDecorate %uImg2d Binding 1 - OpDecorate %uImg2d NonWritable - OpDecorate %uImg3d DescriptorSet 2 - OpDecorate %uImg3d Binding 2 - OpDecorate %uImg3d NonWritable - OpDecorate %uImg1dArr DescriptorSet 2 - OpDecorate %uImg1dArr Binding 3 - OpDecorate %uImg1dArr NonWritable - OpDecorate %uImg2dArr DescriptorSet 2 - OpDecorate %uImg2dArr Binding 4 - OpDecorate %uImg2dArr NonWritable - OpDecorate %uImgCube DescriptorSet 2 - OpDecorate %uImgCube Binding 5 - OpDecorate %uImgCube NonWritable - OpDecorate %uImgCubeArr DescriptorSet 2 - OpDecorate %uImgCubeArr Binding 6 - OpDecorate %uImgCubeArr NonWritable - OpDecorate %uImgBuf DescriptorSet 2 - OpDecorate %uImgBuf Binding 7 - OpDecorate %uImgBuf NonWritable - OpDecorate %fImg1D DescriptorSet 3 - OpDecorate %fImg1D Binding 0 - OpDecorate %fImg1D NonReadable - OpDecorate %fImg2D DescriptorSet 3 - OpDecorate %fImg2D Binding 1 - OpDecorate %fImg2D NonReadable - OpDecorate %fImg3D DescriptorSet 3 - OpDecorate %fImg3D Binding 2 - OpDecorate %fImg3D NonReadable - OpDecorate %fImgCube DescriptorSet 3 - OpDecorate %fImgCube Binding 3 - OpDecorate %fImgCube NonReadable - OpDecorate %fImg2DRect DescriptorSet 3 - OpDecorate %fImg2DRect Binding 4 - OpDecorate %fImg2DRect NonReadable - OpDecorate %fImg1DArray DescriptorSet 3 - OpDecorate %fImg1DArray Binding 5 - OpDecorate %fImg1DArray NonReadable - OpDecorate %fImg2DArray DescriptorSet 3 - OpDecorate %fImg2DArray Binding 6 - OpDecorate %fImg2DArray NonReadable - OpDecorate %fImgCubeArray DescriptorSet 3 - OpDecorate %fImgCubeArray Binding 7 - OpDecorate %fImgCubeArray NonReadable - OpDecorate %fImgBuffer DescriptorSet 3 - OpDecorate %fImgBuffer Binding 8 - OpDecorate %fImgBuffer NonReadable - OpDecorate %fImg2DMS DescriptorSet 3 - OpDecorate %fImg2DMS Binding 9 - OpDecorate %fImg2DMS NonReadable - OpDecorate %fImg2DMSArray DescriptorSet 3 - OpDecorate %fImg2DMSArray Binding 10 - OpDecorate %fImg2DMSArray NonReadable - OpDecorate %iSamp1D DescriptorSet 4 - OpDecorate %iSamp1D Binding 0 - OpDecorate %iSamp2D DescriptorSet 4 - OpDecorate %iSamp2D Binding 1 - OpDecorate %iSamp3D DescriptorSet 4 - OpDecorate %iSamp3D Binding 2 - OpDecorate %iSampCube DescriptorSet 4 - OpDecorate %iSampCube Binding 3 - OpDecorate %iSamp2DRect DescriptorSet 4 - OpDecorate %iSamp2DRect Binding 4 - OpDecorate %iSamp1DArray DescriptorSet 4 - OpDecorate %iSamp1DArray Binding 5 - OpDecorate %iSamp2DArray DescriptorSet 4 - OpDecorate %iSamp2DArray Binding 6 - OpDecorate %iSampCubeArray DescriptorSet 4 - OpDecorate %iSampCubeArray Binding 7 - OpDecorate %iSampBuffer DescriptorSet 4 - OpDecorate %iSampBuffer Binding 8 - OpDecorate %iSamp2DMS DescriptorSet 4 - OpDecorate %iSamp2DMS Binding 9 - OpDecorate %iSamp2DMSArray DescriptorSet 4 - OpDecorate %iSamp2DMSArray Binding 10 - OpDecorate %uSamp1D DescriptorSet 5 - OpDecorate %uSamp1D Binding 0 - OpDecorate %uSamp2D DescriptorSet 5 - OpDecorate %uSamp2D Binding 1 - OpDecorate %uSamp3D DescriptorSet 5 - OpDecorate %uSamp3D Binding 2 - OpDecorate %uSampCube DescriptorSet 5 - OpDecorate %uSampCube Binding 3 - OpDecorate %uSamp2DRect DescriptorSet 5 - OpDecorate %uSamp2DRect Binding 4 - OpDecorate %uSamp1DArray DescriptorSet 5 - OpDecorate %uSamp1DArray Binding 5 - OpDecorate %uSamp2DArray DescriptorSet 5 - OpDecorate %uSamp2DArray Binding 6 - OpDecorate %uSampCubeArray DescriptorSet 5 - OpDecorate %uSampCubeArray Binding 7 - OpDecorate %uSampBuffer DescriptorSet 5 - OpDecorate %uSampBuffer Binding 8 - OpDecorate %uSamp2DMS DescriptorSet 5 - OpDecorate %uSamp2DMS Binding 9 - OpDecorate %uSamp2DMSArray DescriptorSet 5 - OpDecorate %uSamp2DMSArray Binding 10 - OpDecorate %fSamp1D DescriptorSet 6 - OpDecorate %fSamp1D Binding 0 - OpDecorate %fSamp2D DescriptorSet 6 - OpDecorate %fSamp2D Binding 1 - OpDecorate %fSamp3D DescriptorSet 6 - OpDecorate %fSamp3D Binding 2 - OpDecorate %fSampCube DescriptorSet 6 - OpDecorate %fSampCube Binding 3 - OpDecorate %fSamp2DRect DescriptorSet 6 - OpDecorate %fSamp2DRect Binding 4 - OpDecorate %fSamp1DArray DescriptorSet 6 - OpDecorate %fSamp1DArray Binding 5 - OpDecorate %fSamp2DArray DescriptorSet 6 - OpDecorate %fSamp2DArray Binding 6 - OpDecorate %fSampCubeArray DescriptorSet 6 - OpDecorate %fSampCubeArray Binding 7 - OpDecorate %fSampBuffer DescriptorSet 6 - OpDecorate %fSampBuffer Binding 8 - OpDecorate %fSamp2DMS DescriptorSet 6 - OpDecorate %fSamp2DMS Binding 9 - OpDecorate %fSamp2DMSArray DescriptorSet 6 - OpDecorate %fSamp2DMSArray Binding 10 - OpDecorate %dsSamp1D DescriptorSet 7 - OpDecorate %dsSamp1D Binding 0 - OpDecorate %dsSamp2D DescriptorSet 7 - OpDecorate %dsSamp2D Binding 1 - OpDecorate %dsSampCube DescriptorSet 7 - OpDecorate %dsSampCube Binding 2 - OpDecorate %dsSamp2DRect DescriptorSet 7 - OpDecorate %dsSamp2DRect Binding 3 - OpDecorate %dsSamp1DArray DescriptorSet 7 - OpDecorate %dsSamp1DArray Binding 4 - OpDecorate %dsSamp2DArray DescriptorSet 7 - OpDecorate %dsSamp2DArray Binding 5 - OpDecorate %dsSampCubeArray DescriptorSet 7 - OpDecorate %dsSampCubeArray Binding 6 - OpDecorate %samp DescriptorSet 8 - OpDecorate %samp Binding 0 - OpDecorate %sampShadow DescriptorSet 8 - OpDecorate %sampShadow Binding 1 - OpDecorate %iTex1D DescriptorSet 9 - OpDecorate %iTex1D Binding 0 - OpDecorate %iTex2D DescriptorSet 9 - OpDecorate %iTex2D Binding 1 - OpDecorate %iTex3D DescriptorSet 9 - OpDecorate %iTex3D Binding 2 - OpDecorate %iTexCube DescriptorSet 9 - OpDecorate %iTexCube Binding 3 - OpDecorate %iTex2DRect DescriptorSet 9 - OpDecorate %iTex2DRect Binding 4 - OpDecorate %iTex1DArray DescriptorSet 9 - OpDecorate %iTex1DArray Binding 5 - OpDecorate %iTex2DArray DescriptorSet 9 - OpDecorate %iTex2DArray Binding 6 - OpDecorate %iTexCubeArray DescriptorSet 9 - OpDecorate %iTexCubeArray Binding 7 - OpDecorate %iTexBuffer DescriptorSet 9 - OpDecorate %iTexBuffer Binding 8 - OpDecorate %iTex2DMS DescriptorSet 9 - OpDecorate %iTex2DMS Binding 9 - OpDecorate %iTex2DMSArray DescriptorSet 9 - OpDecorate %iTex2DMSArray Binding 10 - OpDecorate %uTex1D DescriptorSet 10 - OpDecorate %uTex1D Binding 0 - OpDecorate %uTex2D DescriptorSet 10 - OpDecorate %uTex2D Binding 1 - OpDecorate %uTex3D DescriptorSet 10 - OpDecorate %uTex3D Binding 2 - OpDecorate %uTexCube DescriptorSet 10 - OpDecorate %uTexCube Binding 3 - OpDecorate %uTex2DRect DescriptorSet 10 - OpDecorate %uTex2DRect Binding 4 - OpDecorate %uTex1DArray DescriptorSet 10 - OpDecorate %uTex1DArray Binding 5 - OpDecorate %uTex2DArray DescriptorSet 10 - OpDecorate %uTex2DArray Binding 6 - OpDecorate %uTexCubeArray DescriptorSet 10 - OpDecorate %uTexCubeArray Binding 7 - OpDecorate %uTexBuffer DescriptorSet 10 - OpDecorate %uTexBuffer Binding 8 - OpDecorate %uTex2DMS DescriptorSet 10 - OpDecorate %uTex2DMS Binding 9 - OpDecorate %uTex2DMSArray DescriptorSet 10 - OpDecorate %uTex2DMSArray Binding 10 - OpDecorate %fTex1D DescriptorSet 11 - OpDecorate %fTex1D Binding 0 - OpDecorate %fTex2D DescriptorSet 11 - OpDecorate %fTex2D Binding 1 - OpDecorate %fTex3D DescriptorSet 11 - OpDecorate %fTex3D Binding 2 - OpDecorate %fTexCube DescriptorSet 11 - OpDecorate %fTexCube Binding 3 - OpDecorate %fTex2DRect DescriptorSet 11 - OpDecorate %fTex2DRect Binding 4 - OpDecorate %fTex1DArray DescriptorSet 11 - OpDecorate %fTex1DArray Binding 5 - OpDecorate %fTex2DArray DescriptorSet 11 - OpDecorate %fTex2DArray Binding 6 - OpDecorate %fTexCubeArray DescriptorSet 11 - OpDecorate %fTexCubeArray Binding 7 - OpDecorate %fTexBuffer DescriptorSet 11 - OpDecorate %fTexBuffer Binding 8 - OpDecorate %fTex2DMS DescriptorSet 11 - OpDecorate %fTex2DMS Binding 9 - OpDecorate %fTex2DMSArray DescriptorSet 11 - OpDecorate %fTex2DMSArray Binding 10 - OpMemberDecorate %Data 0 Offset 0 - OpMemberDecorate %Data 1 Offset 8 - OpMemberDecorate %Data 2 Offset 16 - OpMemberDecorate %Data 3 Offset 32 - OpMemberDecorate %Data 4 Offset 48 - OpMemberDecorate %Data 5 Offset 56 - OpMemberDecorate %Data 6 Offset 64 - OpMemberDecorate %Data 7 Offset 80 - OpMemberDecorate %Data 8 Offset 96 - OpMemberDecorate %Data 9 Offset 104 - OpMemberDecorate %Data 10 Offset 112 - OpMemberDecorate %Data 11 Offset 128 - OpMemberDecorate %Data 12 ColMajor - OpMemberDecorate %Data 12 Offset 144 - OpMemberDecorate %Data 12 MatrixStride 16 - OpMemberDecorate %Data 13 ColMajor - OpMemberDecorate %Data 13 Offset 176 - OpMemberDecorate %Data 13 MatrixStride 16 - OpMemberDecorate %Data 14 ColMajor - OpMemberDecorate %Data 14 Offset 208 - OpMemberDecorate %Data 14 MatrixStride 16 - OpMemberDecorate %Data 15 ColMajor - OpMemberDecorate %Data 15 Offset 240 - OpMemberDecorate %Data 15 MatrixStride 16 - OpMemberDecorate %Data 16 ColMajor - OpMemberDecorate %Data 16 Offset 288 - OpMemberDecorate %Data 16 MatrixStride 16 - OpMemberDecorate %Data 17 ColMajor - OpMemberDecorate %Data 17 Offset 336 - OpMemberDecorate %Data 17 MatrixStride 16 - OpMemberDecorate %Data 18 ColMajor - OpMemberDecorate %Data 18 Offset 384 - OpMemberDecorate %Data 18 MatrixStride 16 - OpMemberDecorate %Data 19 ColMajor - OpMemberDecorate %Data 19 Offset 448 - OpMemberDecorate %Data 19 MatrixStride 16 - OpMemberDecorate %Data 20 ColMajor - OpMemberDecorate %Data 20 Offset 512 - OpMemberDecorate %Data 20 MatrixStride 16 - OpMemberDecorate %Data 21 Offset 576 - OpMemberDecorate %Data 22 Offset 592 - OpMemberDecorate %Data 23 Offset 608 - OpMemberDecorate %Data 24 Offset 640 - OpMemberDecorate %Data 25 ColMajor - OpMemberDecorate %Data 25 Offset 672 - OpMemberDecorate %Data 25 MatrixStride 16 - OpMemberDecorate %Data 26 ColMajor - OpMemberDecorate %Data 26 Offset 704 - OpMemberDecorate %Data 26 MatrixStride 32 - OpMemberDecorate %Data 27 ColMajor - OpMemberDecorate %Data 27 Offset 768 - OpMemberDecorate %Data 27 MatrixStride 32 - OpMemberDecorate %Data 28 ColMajor - OpMemberDecorate %Data 28 Offset 832 - OpMemberDecorate %Data 28 MatrixStride 16 - OpMemberDecorate %Data 29 ColMajor - OpMemberDecorate %Data 29 Offset 896 - OpMemberDecorate %Data 29 MatrixStride 32 - OpMemberDecorate %Data 30 ColMajor - OpMemberDecorate %Data 30 Offset 992 - OpMemberDecorate %Data 30 MatrixStride 32 - OpMemberDecorate %Data 31 ColMajor - OpMemberDecorate %Data 31 Offset 1088 - OpMemberDecorate %Data 31 MatrixStride 16 - OpMemberDecorate %Data 32 ColMajor - OpMemberDecorate %Data 32 Offset 1152 - OpMemberDecorate %Data 32 MatrixStride 32 - OpMemberDecorate %Data 33 ColMajor - OpMemberDecorate %Data 33 Offset 1280 - OpMemberDecorate %Data 33 MatrixStride 32 - OpDecorate %_arr_Data_uint_4 ArrayStride 1408 - OpMemberDecorate %Ubo 0 Offset 0 - OpDecorate %Ubo Block - OpDecorate %ubo DescriptorSet 12 - OpDecorate %ubo Binding 0 - OpDecorate %_runtimearr_int ArrayStride 4 - OpMemberDecorate %Ssbo 0 Offset 0 - OpDecorate %Ssbo Block - OpDecorate %ssbo DescriptorSet 13 - OpDecorate %ssbo Binding 0 - OpDecorate %iAttm DescriptorSet 14 - OpDecorate %iAttm Binding 0 - OpDecorate %iAttm InputAttachmentIndex 0 - OpDecorate %iAttmMS DescriptorSet 14 - OpDecorate %iAttmMS Binding 1 - OpDecorate %iAttmMS InputAttachmentIndex 1 - OpDecorate %uAttm DescriptorSet 14 - OpDecorate %uAttm Binding 2 - OpDecorate %uAttm InputAttachmentIndex 2 - OpDecorate %uAttmMS DescriptorSet 14 - OpDecorate %uAttmMS Binding 3 - OpDecorate %uAttmMS InputAttachmentIndex 3 - OpDecorate %fAttm DescriptorSet 14 - OpDecorate %fAttm Binding 4 - OpDecorate %fAttm InputAttachmentIndex 4 - OpDecorate %fAttmMS DescriptorSet 14 - OpDecorate %fAttmMS Binding 5 - OpDecorate %fAttmMS InputAttachmentIndex 5 - OpDecorate %acc DescriptorSet 15 - OpDecorate %acc Binding 0 - %void = OpTypeVoid - %3 = OpTypeFunction %void - %6 = OpTypeRayQueryKHR +OpCapability Shader +OpCapability Float16 +OpCapability Float64 +OpCapability Int64 +OpCapability Int16 +OpCapability StorageImageMultisample +OpCapability ImageCubeArray +OpCapability ImageRect +OpCapability SampledRect +OpCapability Int8 +OpCapability InputAttachment +OpCapability Sampled1D +OpCapability Image1D +OpCapability SampledCubeArray +OpCapability SampledBuffer +OpCapability ImageBuffer +OpCapability ImageMSArray +OpCapability RayQueryKHR +OpExtension "SPV_KHR_ray_query" +%1 = OpExtInstImport "GLSL.std.450" +OpMemoryModel Logical GLSL450 +OpEntryPoint Fragment %main "main" %ray_query %iImg1d %iImg2d %iImg3d %iImg1dArr %iImg2dArr %iImgCube %iImgCubeArr %iImgBuf %uImg1d %uImg2d %uImg3d %uImg1dArr %uImg2dArr %uImgCube %uImgCubeArr %uImgBuf %fImg1D %fImg2D %fImg3D %fImgCube %fImg2DRect %fImg1DArray %fImg2DArray %fImgCubeArray %fImgBuffer %fImg2DMS %fImg2DMSArray %iSamp1D %iSamp2D %iSamp3D %iSampCube %iSamp2DRect %iSamp1DArray %iSamp2DArray %iSampCubeArray %iSampBuffer %iSamp2DMS %iSamp2DMSArray %uSamp1D %uSamp2D %uSamp3D %uSampCube %uSamp2DRect %uSamp1DArray %uSamp2DArray %uSampCubeArray %uSampBuffer %uSamp2DMS %uSamp2DMSArray %fSamp1D %fSamp2D %fSamp3D %fSampCube %fSamp2DRect %fSamp1DArray %fSamp2DArray %fSampCubeArray %fSampBuffer %fSamp2DMS %fSamp2DMSArray %dsSamp1D %dsSamp2D %dsSampCube %dsSamp2DRect %dsSamp1DArray %dsSamp2DArray %dsSampCubeArray %samp %sampShadow %iTex1D %iTex2D %iTex3D %iTexCube %iTex2DRect %iTex1DArray %iTex2DArray %iTexCubeArray %iTexBuffer %iTex2DMS %iTex2DMSArray %uTex1D %uTex2D %uTex3D %uTexCube %uTex2DRect %uTex1DArray %uTex2DArray %uTexCubeArray %uTexBuffer %uTex2DMS %uTex2DMSArray %fTex1D %fTex2D %fTex3D %fTexCube %fTex2DRect %fTex1DArray %fTex2DArray %fTexCubeArray %fTexBuffer %fTex2DMS %fTex2DMSArray %ubo %ssbo %iAttm %iAttmMS %uAttm %uAttmMS %fAttm %fAttmMS %acc +OpExecutionMode %main OriginUpperLeft +OpSource GLSL 460 +OpSourceExtension "GL_EXT_ray_query" +OpSourceExtension "GL_EXT_ray_tracing" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" +OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" +OpName %main "main" +OpName %ray_query "ray_query" +OpName %iImg1d "iImg1d" +OpName %iImg2d "iImg2d" +OpName %iImg3d "iImg3d" +OpName %iImg1dArr "iImg1dArr" +OpName %iImg2dArr "iImg2dArr" +OpName %iImgCube "iImgCube" +OpName %iImgCubeArr "iImgCubeArr" +OpName %iImgBuf "iImgBuf" +OpName %uImg1d "uImg1d" +OpName %uImg2d "uImg2d" +OpName %uImg3d "uImg3d" +OpName %uImg1dArr "uImg1dArr" +OpName %uImg2dArr "uImg2dArr" +OpName %uImgCube "uImgCube" +OpName %uImgCubeArr "uImgCubeArr" +OpName %uImgBuf "uImgBuf" +OpName %fImg1D "fImg1D" +OpName %fImg2D "fImg2D" +OpName %fImg3D "fImg3D" +OpName %fImgCube "fImgCube" +OpName %fImg2DRect "fImg2DRect" +OpName %fImg1DArray "fImg1DArray" +OpName %fImg2DArray "fImg2DArray" +OpName %fImgCubeArray "fImgCubeArray" +OpName %fImgBuffer "fImgBuffer" +OpName %fImg2DMS "fImg2DMS" +OpName %fImg2DMSArray "fImg2DMSArray" +OpName %iSamp1D "iSamp1D" +OpName %iSamp2D "iSamp2D" +OpName %iSamp3D "iSamp3D" +OpName %iSampCube "iSampCube" +OpName %iSamp2DRect "iSamp2DRect" +OpName %iSamp1DArray "iSamp1DArray" +OpName %iSamp2DArray "iSamp2DArray" +OpName %iSampCubeArray "iSampCubeArray" +OpName %iSampBuffer "iSampBuffer" +OpName %iSamp2DMS "iSamp2DMS" +OpName %iSamp2DMSArray "iSamp2DMSArray" +OpName %uSamp1D "uSamp1D" +OpName %uSamp2D "uSamp2D" +OpName %uSamp3D "uSamp3D" +OpName %uSampCube "uSampCube" +OpName %uSamp2DRect "uSamp2DRect" +OpName %uSamp1DArray "uSamp1DArray" +OpName %uSamp2DArray "uSamp2DArray" +OpName %uSampCubeArray "uSampCubeArray" +OpName %uSampBuffer "uSampBuffer" +OpName %uSamp2DMS "uSamp2DMS" +OpName %uSamp2DMSArray "uSamp2DMSArray" +OpName %fSamp1D "fSamp1D" +OpName %fSamp2D "fSamp2D" +OpName %fSamp3D "fSamp3D" +OpName %fSampCube "fSampCube" +OpName %fSamp2DRect "fSamp2DRect" +OpName %fSamp1DArray "fSamp1DArray" +OpName %fSamp2DArray "fSamp2DArray" +OpName %fSampCubeArray "fSampCubeArray" +OpName %fSampBuffer "fSampBuffer" +OpName %fSamp2DMS "fSamp2DMS" +OpName %fSamp2DMSArray "fSamp2DMSArray" +OpName %dsSamp1D "dsSamp1D" +OpName %dsSamp2D "dsSamp2D" +OpName %dsSampCube "dsSampCube" +OpName %dsSamp2DRect "dsSamp2DRect" +OpName %dsSamp1DArray "dsSamp1DArray" +OpName %dsSamp2DArray "dsSamp2DArray" +OpName %dsSampCubeArray "dsSampCubeArray" +OpName %samp "samp" +OpName %sampShadow "sampShadow" +OpName %iTex1D "iTex1D" +OpName %iTex2D "iTex2D" +OpName %iTex3D "iTex3D" +OpName %iTexCube "iTexCube" +OpName %iTex2DRect "iTex2DRect" +OpName %iTex1DArray "iTex1DArray" +OpName %iTex2DArray "iTex2DArray" +OpName %iTexCubeArray "iTexCubeArray" +OpName %iTexBuffer "iTexBuffer" +OpName %iTex2DMS "iTex2DMS" +OpName %iTex2DMSArray "iTex2DMSArray" +OpName %uTex1D "uTex1D" +OpName %uTex2D "uTex2D" +OpName %uTex3D "uTex3D" +OpName %uTexCube "uTexCube" +OpName %uTex2DRect "uTex2DRect" +OpName %uTex1DArray "uTex1DArray" +OpName %uTex2DArray "uTex2DArray" +OpName %uTexCubeArray "uTexCubeArray" +OpName %uTexBuffer "uTexBuffer" +OpName %uTex2DMS "uTex2DMS" +OpName %uTex2DMSArray "uTex2DMSArray" +OpName %fTex1D "fTex1D" +OpName %fTex2D "fTex2D" +OpName %fTex3D "fTex3D" +OpName %fTexCube "fTexCube" +OpName %fTex2DRect "fTex2DRect" +OpName %fTex1DArray "fTex1DArray" +OpName %fTex2DArray "fTex2DArray" +OpName %fTexCubeArray "fTexCubeArray" +OpName %fTexBuffer "fTexBuffer" +OpName %fTex2DMS "fTex2DMS" +OpName %fTex2DMSArray "fTex2DMSArray" +OpName %Data "Data" +OpMemberName %Data 0 "i0" +OpMemberName %Data 1 "i1" +OpMemberName %Data 2 "i2" +OpMemberName %Data 3 "i3" +OpMemberName %Data 4 "u0" +OpMemberName %Data 5 "u1" +OpMemberName %Data 6 "u2" +OpMemberName %Data 7 "u3" +OpMemberName %Data 8 "f0" +OpMemberName %Data 9 "f1" +OpMemberName %Data 10 "f2" +OpMemberName %Data 11 "f3" +OpMemberName %Data 12 "fMat0" +OpMemberName %Data 13 "fMat1" +OpMemberName %Data 14 "fMat2" +OpMemberName %Data 15 "fMat3" +OpMemberName %Data 16 "fMat4" +OpMemberName %Data 17 "fMat5" +OpMemberName %Data 18 "fMat6" +OpMemberName %Data 19 "fMat7" +OpMemberName %Data 20 "fMat8" +OpMemberName %Data 21 "d0" +OpMemberName %Data 22 "d1" +OpMemberName %Data 23 "d2" +OpMemberName %Data 24 "d3" +OpMemberName %Data 25 "dMat0" +OpMemberName %Data 26 "dMat1" +OpMemberName %Data 27 "dMat2" +OpMemberName %Data 28 "dMat3" +OpMemberName %Data 29 "dMat4" +OpMemberName %Data 30 "dMat5" +OpMemberName %Data 31 "dMat6" +OpMemberName %Data 32 "dMat7" +OpMemberName %Data 33 "dMat8" +OpName %Ubo "Ubo" +OpMemberName %Ubo 0 "ds" +OpName %ubo "ubo" +OpName %Ssbo "Ssbo" +OpMemberName %Ssbo 0 "ds" +OpName %ssbo "ssbo" +OpName %iAttm "iAttm" +OpName %iAttmMS "iAttmMS" +OpName %uAttm "uAttm" +OpName %uAttmMS "uAttmMS" +OpName %fAttm "fAttm" +OpName %fAttmMS "fAttmMS" +OpName %acc "acc" +OpDecorate %iImg1d DescriptorSet 1 +OpDecorate %iImg1d Binding 0 +OpDecorate %iImg1d NonWritable +OpDecorate %iImg2d DescriptorSet 1 +OpDecorate %iImg2d Binding 1 +OpDecorate %iImg2d NonWritable +OpDecorate %iImg3d DescriptorSet 1 +OpDecorate %iImg3d Binding 2 +OpDecorate %iImg3d NonWritable +OpDecorate %iImg1dArr DescriptorSet 1 +OpDecorate %iImg1dArr Binding 3 +OpDecorate %iImg1dArr NonWritable +OpDecorate %iImg2dArr DescriptorSet 1 +OpDecorate %iImg2dArr Binding 4 +OpDecorate %iImg2dArr NonWritable +OpDecorate %iImgCube DescriptorSet 1 +OpDecorate %iImgCube Binding 5 +OpDecorate %iImgCube NonWritable +OpDecorate %iImgCubeArr DescriptorSet 1 +OpDecorate %iImgCubeArr Binding 6 +OpDecorate %iImgCubeArr NonWritable +OpDecorate %iImgBuf DescriptorSet 1 +OpDecorate %iImgBuf Binding 7 +OpDecorate %iImgBuf NonWritable +OpDecorate %uImg1d DescriptorSet 2 +OpDecorate %uImg1d Binding 0 +OpDecorate %uImg1d NonWritable +OpDecorate %uImg2d DescriptorSet 2 +OpDecorate %uImg2d Binding 1 +OpDecorate %uImg2d NonWritable +OpDecorate %uImg3d DescriptorSet 2 +OpDecorate %uImg3d Binding 2 +OpDecorate %uImg3d NonWritable +OpDecorate %uImg1dArr DescriptorSet 2 +OpDecorate %uImg1dArr Binding 3 +OpDecorate %uImg1dArr NonWritable +OpDecorate %uImg2dArr DescriptorSet 2 +OpDecorate %uImg2dArr Binding 4 +OpDecorate %uImg2dArr NonWritable +OpDecorate %uImgCube DescriptorSet 2 +OpDecorate %uImgCube Binding 5 +OpDecorate %uImgCube NonWritable +OpDecorate %uImgCubeArr DescriptorSet 2 +OpDecorate %uImgCubeArr Binding 6 +OpDecorate %uImgCubeArr NonWritable +OpDecorate %uImgBuf DescriptorSet 2 +OpDecorate %uImgBuf Binding 7 +OpDecorate %uImgBuf NonWritable +OpDecorate %fImg1D DescriptorSet 3 +OpDecorate %fImg1D Binding 0 +OpDecorate %fImg1D NonReadable +OpDecorate %fImg2D DescriptorSet 3 +OpDecorate %fImg2D Binding 1 +OpDecorate %fImg2D NonReadable +OpDecorate %fImg3D DescriptorSet 3 +OpDecorate %fImg3D Binding 2 +OpDecorate %fImg3D NonReadable +OpDecorate %fImgCube DescriptorSet 3 +OpDecorate %fImgCube Binding 3 +OpDecorate %fImgCube NonReadable +OpDecorate %fImg2DRect DescriptorSet 3 +OpDecorate %fImg2DRect Binding 4 +OpDecorate %fImg2DRect NonReadable +OpDecorate %fImg1DArray DescriptorSet 3 +OpDecorate %fImg1DArray Binding 5 +OpDecorate %fImg1DArray NonReadable +OpDecorate %fImg2DArray DescriptorSet 3 +OpDecorate %fImg2DArray Binding 6 +OpDecorate %fImg2DArray NonReadable +OpDecorate %fImgCubeArray DescriptorSet 3 +OpDecorate %fImgCubeArray Binding 7 +OpDecorate %fImgCubeArray NonReadable +OpDecorate %fImgBuffer DescriptorSet 3 +OpDecorate %fImgBuffer Binding 8 +OpDecorate %fImgBuffer NonReadable +OpDecorate %fImg2DMS DescriptorSet 3 +OpDecorate %fImg2DMS Binding 9 +OpDecorate %fImg2DMS NonReadable +OpDecorate %fImg2DMSArray DescriptorSet 3 +OpDecorate %fImg2DMSArray Binding 10 +OpDecorate %fImg2DMSArray NonReadable +OpDecorate %iSamp1D DescriptorSet 4 +OpDecorate %iSamp1D Binding 0 +OpDecorate %iSamp2D DescriptorSet 4 +OpDecorate %iSamp2D Binding 1 +OpDecorate %iSamp3D DescriptorSet 4 +OpDecorate %iSamp3D Binding 2 +OpDecorate %iSampCube DescriptorSet 4 +OpDecorate %iSampCube Binding 3 +OpDecorate %iSamp2DRect DescriptorSet 4 +OpDecorate %iSamp2DRect Binding 4 +OpDecorate %iSamp1DArray DescriptorSet 4 +OpDecorate %iSamp1DArray Binding 5 +OpDecorate %iSamp2DArray DescriptorSet 4 +OpDecorate %iSamp2DArray Binding 6 +OpDecorate %iSampCubeArray DescriptorSet 4 +OpDecorate %iSampCubeArray Binding 7 +OpDecorate %iSampBuffer DescriptorSet 4 +OpDecorate %iSampBuffer Binding 8 +OpDecorate %iSamp2DMS DescriptorSet 4 +OpDecorate %iSamp2DMS Binding 9 +OpDecorate %iSamp2DMSArray DescriptorSet 4 +OpDecorate %iSamp2DMSArray Binding 10 +OpDecorate %uSamp1D DescriptorSet 5 +OpDecorate %uSamp1D Binding 0 +OpDecorate %uSamp2D DescriptorSet 5 +OpDecorate %uSamp2D Binding 1 +OpDecorate %uSamp3D DescriptorSet 5 +OpDecorate %uSamp3D Binding 2 +OpDecorate %uSampCube DescriptorSet 5 +OpDecorate %uSampCube Binding 3 +OpDecorate %uSamp2DRect DescriptorSet 5 +OpDecorate %uSamp2DRect Binding 4 +OpDecorate %uSamp1DArray DescriptorSet 5 +OpDecorate %uSamp1DArray Binding 5 +OpDecorate %uSamp2DArray DescriptorSet 5 +OpDecorate %uSamp2DArray Binding 6 +OpDecorate %uSampCubeArray DescriptorSet 5 +OpDecorate %uSampCubeArray Binding 7 +OpDecorate %uSampBuffer DescriptorSet 5 +OpDecorate %uSampBuffer Binding 8 +OpDecorate %uSamp2DMS DescriptorSet 5 +OpDecorate %uSamp2DMS Binding 9 +OpDecorate %uSamp2DMSArray DescriptorSet 5 +OpDecorate %uSamp2DMSArray Binding 10 +OpDecorate %fSamp1D DescriptorSet 6 +OpDecorate %fSamp1D Binding 0 +OpDecorate %fSamp2D DescriptorSet 6 +OpDecorate %fSamp2D Binding 1 +OpDecorate %fSamp3D DescriptorSet 6 +OpDecorate %fSamp3D Binding 2 +OpDecorate %fSampCube DescriptorSet 6 +OpDecorate %fSampCube Binding 3 +OpDecorate %fSamp2DRect DescriptorSet 6 +OpDecorate %fSamp2DRect Binding 4 +OpDecorate %fSamp1DArray DescriptorSet 6 +OpDecorate %fSamp1DArray Binding 5 +OpDecorate %fSamp2DArray DescriptorSet 6 +OpDecorate %fSamp2DArray Binding 6 +OpDecorate %fSampCubeArray DescriptorSet 6 +OpDecorate %fSampCubeArray Binding 7 +OpDecorate %fSampBuffer DescriptorSet 6 +OpDecorate %fSampBuffer Binding 8 +OpDecorate %fSamp2DMS DescriptorSet 6 +OpDecorate %fSamp2DMS Binding 9 +OpDecorate %fSamp2DMSArray DescriptorSet 6 +OpDecorate %fSamp2DMSArray Binding 10 +OpDecorate %dsSamp1D DescriptorSet 7 +OpDecorate %dsSamp1D Binding 0 +OpDecorate %dsSamp2D DescriptorSet 7 +OpDecorate %dsSamp2D Binding 1 +OpDecorate %dsSampCube DescriptorSet 7 +OpDecorate %dsSampCube Binding 2 +OpDecorate %dsSamp2DRect DescriptorSet 7 +OpDecorate %dsSamp2DRect Binding 3 +OpDecorate %dsSamp1DArray DescriptorSet 7 +OpDecorate %dsSamp1DArray Binding 4 +OpDecorate %dsSamp2DArray DescriptorSet 7 +OpDecorate %dsSamp2DArray Binding 5 +OpDecorate %dsSampCubeArray DescriptorSet 7 +OpDecorate %dsSampCubeArray Binding 6 +OpDecorate %samp DescriptorSet 8 +OpDecorate %samp Binding 0 +OpDecorate %sampShadow DescriptorSet 8 +OpDecorate %sampShadow Binding 1 +OpDecorate %iTex1D DescriptorSet 9 +OpDecorate %iTex1D Binding 0 +OpDecorate %iTex2D DescriptorSet 9 +OpDecorate %iTex2D Binding 1 +OpDecorate %iTex3D DescriptorSet 9 +OpDecorate %iTex3D Binding 2 +OpDecorate %iTexCube DescriptorSet 9 +OpDecorate %iTexCube Binding 3 +OpDecorate %iTex2DRect DescriptorSet 9 +OpDecorate %iTex2DRect Binding 4 +OpDecorate %iTex1DArray DescriptorSet 9 +OpDecorate %iTex1DArray Binding 5 +OpDecorate %iTex2DArray DescriptorSet 9 +OpDecorate %iTex2DArray Binding 6 +OpDecorate %iTexCubeArray DescriptorSet 9 +OpDecorate %iTexCubeArray Binding 7 +OpDecorate %iTexBuffer DescriptorSet 9 +OpDecorate %iTexBuffer Binding 8 +OpDecorate %iTex2DMS DescriptorSet 9 +OpDecorate %iTex2DMS Binding 9 +OpDecorate %iTex2DMSArray DescriptorSet 9 +OpDecorate %iTex2DMSArray Binding 10 +OpDecorate %uTex1D DescriptorSet 10 +OpDecorate %uTex1D Binding 0 +OpDecorate %uTex2D DescriptorSet 10 +OpDecorate %uTex2D Binding 1 +OpDecorate %uTex3D DescriptorSet 10 +OpDecorate %uTex3D Binding 2 +OpDecorate %uTexCube DescriptorSet 10 +OpDecorate %uTexCube Binding 3 +OpDecorate %uTex2DRect DescriptorSet 10 +OpDecorate %uTex2DRect Binding 4 +OpDecorate %uTex1DArray DescriptorSet 10 +OpDecorate %uTex1DArray Binding 5 +OpDecorate %uTex2DArray DescriptorSet 10 +OpDecorate %uTex2DArray Binding 6 +OpDecorate %uTexCubeArray DescriptorSet 10 +OpDecorate %uTexCubeArray Binding 7 +OpDecorate %uTexBuffer DescriptorSet 10 +OpDecorate %uTexBuffer Binding 8 +OpDecorate %uTex2DMS DescriptorSet 10 +OpDecorate %uTex2DMS Binding 9 +OpDecorate %uTex2DMSArray DescriptorSet 10 +OpDecorate %uTex2DMSArray Binding 10 +OpDecorate %fTex1D DescriptorSet 11 +OpDecorate %fTex1D Binding 0 +OpDecorate %fTex2D DescriptorSet 11 +OpDecorate %fTex2D Binding 1 +OpDecorate %fTex3D DescriptorSet 11 +OpDecorate %fTex3D Binding 2 +OpDecorate %fTexCube DescriptorSet 11 +OpDecorate %fTexCube Binding 3 +OpDecorate %fTex2DRect DescriptorSet 11 +OpDecorate %fTex2DRect Binding 4 +OpDecorate %fTex1DArray DescriptorSet 11 +OpDecorate %fTex1DArray Binding 5 +OpDecorate %fTex2DArray DescriptorSet 11 +OpDecorate %fTex2DArray Binding 6 +OpDecorate %fTexCubeArray DescriptorSet 11 +OpDecorate %fTexCubeArray Binding 7 +OpDecorate %fTexBuffer DescriptorSet 11 +OpDecorate %fTexBuffer Binding 8 +OpDecorate %fTex2DMS DescriptorSet 11 +OpDecorate %fTex2DMS Binding 9 +OpDecorate %fTex2DMSArray DescriptorSet 11 +OpDecorate %fTex2DMSArray Binding 10 +OpMemberDecorate %Data 0 Offset 0 +OpMemberDecorate %Data 1 Offset 8 +OpMemberDecorate %Data 2 Offset 16 +OpMemberDecorate %Data 3 Offset 32 +OpMemberDecorate %Data 4 Offset 48 +OpMemberDecorate %Data 5 Offset 56 +OpMemberDecorate %Data 6 Offset 64 +OpMemberDecorate %Data 7 Offset 80 +OpMemberDecorate %Data 8 Offset 96 +OpMemberDecorate %Data 9 Offset 104 +OpMemberDecorate %Data 10 Offset 112 +OpMemberDecorate %Data 11 Offset 128 +OpMemberDecorate %Data 12 ColMajor +OpMemberDecorate %Data 12 Offset 144 +OpMemberDecorate %Data 12 MatrixStride 16 +OpMemberDecorate %Data 13 ColMajor +OpMemberDecorate %Data 13 Offset 176 +OpMemberDecorate %Data 13 MatrixStride 16 +OpMemberDecorate %Data 14 ColMajor +OpMemberDecorate %Data 14 Offset 208 +OpMemberDecorate %Data 14 MatrixStride 16 +OpMemberDecorate %Data 15 ColMajor +OpMemberDecorate %Data 15 Offset 240 +OpMemberDecorate %Data 15 MatrixStride 16 +OpMemberDecorate %Data 16 ColMajor +OpMemberDecorate %Data 16 Offset 288 +OpMemberDecorate %Data 16 MatrixStride 16 +OpMemberDecorate %Data 17 ColMajor +OpMemberDecorate %Data 17 Offset 336 +OpMemberDecorate %Data 17 MatrixStride 16 +OpMemberDecorate %Data 18 ColMajor +OpMemberDecorate %Data 18 Offset 384 +OpMemberDecorate %Data 18 MatrixStride 16 +OpMemberDecorate %Data 19 ColMajor +OpMemberDecorate %Data 19 Offset 448 +OpMemberDecorate %Data 19 MatrixStride 16 +OpMemberDecorate %Data 20 ColMajor +OpMemberDecorate %Data 20 Offset 512 +OpMemberDecorate %Data 20 MatrixStride 16 +OpMemberDecorate %Data 21 Offset 576 +OpMemberDecorate %Data 22 Offset 592 +OpMemberDecorate %Data 23 Offset 608 +OpMemberDecorate %Data 24 Offset 640 +OpMemberDecorate %Data 25 ColMajor +OpMemberDecorate %Data 25 Offset 672 +OpMemberDecorate %Data 25 MatrixStride 16 +OpMemberDecorate %Data 26 ColMajor +OpMemberDecorate %Data 26 Offset 704 +OpMemberDecorate %Data 26 MatrixStride 32 +OpMemberDecorate %Data 27 ColMajor +OpMemberDecorate %Data 27 Offset 768 +OpMemberDecorate %Data 27 MatrixStride 32 +OpMemberDecorate %Data 28 ColMajor +OpMemberDecorate %Data 28 Offset 832 +OpMemberDecorate %Data 28 MatrixStride 16 +OpMemberDecorate %Data 29 ColMajor +OpMemberDecorate %Data 29 Offset 896 +OpMemberDecorate %Data 29 MatrixStride 32 +OpMemberDecorate %Data 30 ColMajor +OpMemberDecorate %Data 30 Offset 992 +OpMemberDecorate %Data 30 MatrixStride 32 +OpMemberDecorate %Data 31 ColMajor +OpMemberDecorate %Data 31 Offset 1088 +OpMemberDecorate %Data 31 MatrixStride 16 +OpMemberDecorate %Data 32 ColMajor +OpMemberDecorate %Data 32 Offset 1152 +OpMemberDecorate %Data 32 MatrixStride 32 +OpMemberDecorate %Data 33 ColMajor +OpMemberDecorate %Data 33 Offset 1280 +OpMemberDecorate %Data 33 MatrixStride 32 +OpDecorate %_arr_Data_uint_4 ArrayStride 1408 +OpMemberDecorate %Ubo 0 Offset 0 +OpDecorate %Ubo Block +OpDecorate %ubo DescriptorSet 12 +OpDecorate %ubo Binding 0 +OpDecorate %_runtimearr_int ArrayStride 4 +OpMemberDecorate %Ssbo 0 Offset 0 +OpDecorate %Ssbo Block +OpDecorate %ssbo DescriptorSet 13 +OpDecorate %ssbo Binding 0 +OpDecorate %iAttm DescriptorSet 14 +OpDecorate %iAttm Binding 0 +OpDecorate %iAttm InputAttachmentIndex 0 +OpDecorate %iAttmMS DescriptorSet 14 +OpDecorate %iAttmMS Binding 1 +OpDecorate %iAttmMS InputAttachmentIndex 1 +OpDecorate %uAttm DescriptorSet 14 +OpDecorate %uAttm Binding 2 +OpDecorate %uAttm InputAttachmentIndex 2 +OpDecorate %uAttmMS DescriptorSet 14 +OpDecorate %uAttmMS Binding 3 +OpDecorate %uAttmMS InputAttachmentIndex 3 +OpDecorate %fAttm DescriptorSet 14 +OpDecorate %fAttm Binding 4 +OpDecorate %fAttm InputAttachmentIndex 4 +OpDecorate %fAttmMS DescriptorSet 14 +OpDecorate %fAttmMS Binding 5 +OpDecorate %fAttmMS InputAttachmentIndex 5 +OpDecorate %acc DescriptorSet 15 +OpDecorate %acc Binding 0 +%void = OpTypeVoid +%3 = OpTypeFunction %void +%6 = OpTypeRayQueryKHR %_ptr_Private_6 = OpTypePointer Private %6 - %ray_query = OpVariable %_ptr_Private_6 Private - %bool = OpTypeBool - %int = OpTypeInt 32 1 - %12 = OpTypeImage %int 1D 0 0 0 2 Rgba32i +%ray_query = OpVariable %_ptr_Private_6 Private +%bool = OpTypeBool +%int = OpTypeInt 32 1 +%12 = OpTypeImage %int 1D 0 0 0 2 Rgba32i %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 - %iImg1d = OpVariable %_ptr_UniformConstant_12 UniformConstant - %15 = OpTypeImage %int 2D 0 0 0 2 Rgba16i +%iImg1d = OpVariable %_ptr_UniformConstant_12 UniformConstant +%15 = OpTypeImage %int 2D 0 0 0 2 Rgba16i %_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15 - %iImg2d = OpVariable %_ptr_UniformConstant_15 UniformConstant - %18 = OpTypeImage %int 3D 0 0 0 2 Rgba8i +%iImg2d = OpVariable %_ptr_UniformConstant_15 UniformConstant +%18 = OpTypeImage %int 3D 0 0 0 2 Rgba8i %_ptr_UniformConstant_18 = OpTypePointer UniformConstant %18 - %iImg3d = OpVariable %_ptr_UniformConstant_18 UniformConstant - %21 = OpTypeImage %int 1D 0 1 0 2 Rgba32i +%iImg3d = OpVariable %_ptr_UniformConstant_18 UniformConstant +%21 = OpTypeImage %int 1D 0 1 0 2 Rgba32i %_ptr_UniformConstant_21 = OpTypePointer UniformConstant %21 - %iImg1dArr = OpVariable %_ptr_UniformConstant_21 UniformConstant - %24 = OpTypeImage %int 2D 0 1 0 2 Rgba32i +%iImg1dArr = OpVariable %_ptr_UniformConstant_21 UniformConstant +%24 = OpTypeImage %int 2D 0 1 0 2 Rgba32i %_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24 - %iImg2dArr = OpVariable %_ptr_UniformConstant_24 UniformConstant - %27 = OpTypeImage %int Cube 0 0 0 2 Rgba32i +%iImg2dArr = OpVariable %_ptr_UniformConstant_24 UniformConstant +%27 = OpTypeImage %int Cube 0 0 0 2 Rgba32i %_ptr_UniformConstant_27 = OpTypePointer UniformConstant %27 - %iImgCube = OpVariable %_ptr_UniformConstant_27 UniformConstant - %30 = OpTypeImage %int Cube 0 1 0 2 Rgba32i +%iImgCube = OpVariable %_ptr_UniformConstant_27 UniformConstant +%30 = OpTypeImage %int Cube 0 1 0 2 Rgba32i %_ptr_UniformConstant_30 = OpTypePointer UniformConstant %30 %iImgCubeArr = OpVariable %_ptr_UniformConstant_30 UniformConstant - %33 = OpTypeImage %int Buffer 0 0 0 2 Rgba32i +%33 = OpTypeImage %int Buffer 0 0 0 2 Rgba32i %_ptr_UniformConstant_33 = OpTypePointer UniformConstant %33 - %iImgBuf = OpVariable %_ptr_UniformConstant_33 UniformConstant - %uint = OpTypeInt 32 0 - %37 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui +%iImgBuf = OpVariable %_ptr_UniformConstant_33 UniformConstant +%uint = OpTypeInt 32 0 +%37 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui %_ptr_UniformConstant_37 = OpTypePointer UniformConstant %37 - %uImg1d = OpVariable %_ptr_UniformConstant_37 UniformConstant - %40 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui +%uImg1d = OpVariable %_ptr_UniformConstant_37 UniformConstant +%40 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui %_ptr_UniformConstant_40 = OpTypePointer UniformConstant %40 - %uImg2d = OpVariable %_ptr_UniformConstant_40 UniformConstant - %43 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui +%uImg2d = OpVariable %_ptr_UniformConstant_40 UniformConstant +%43 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui %_ptr_UniformConstant_43 = OpTypePointer UniformConstant %43 - %uImg3d = OpVariable %_ptr_UniformConstant_43 UniformConstant - %46 = OpTypeImage %uint 1D 0 1 0 2 Rgba32ui +%uImg3d = OpVariable %_ptr_UniformConstant_43 UniformConstant +%46 = OpTypeImage %uint 1D 0 1 0 2 Rgba32ui %_ptr_UniformConstant_46 = OpTypePointer UniformConstant %46 - %uImg1dArr = OpVariable %_ptr_UniformConstant_46 UniformConstant - %49 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui +%uImg1dArr = OpVariable %_ptr_UniformConstant_46 UniformConstant +%49 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui %_ptr_UniformConstant_49 = OpTypePointer UniformConstant %49 - %uImg2dArr = OpVariable %_ptr_UniformConstant_49 UniformConstant - %52 = OpTypeImage %uint Cube 0 0 0 2 Rgba32ui +%uImg2dArr = OpVariable %_ptr_UniformConstant_49 UniformConstant +%52 = OpTypeImage %uint Cube 0 0 0 2 Rgba32ui %_ptr_UniformConstant_52 = OpTypePointer UniformConstant %52 - %uImgCube = OpVariable %_ptr_UniformConstant_52 UniformConstant - %55 = OpTypeImage %uint Cube 0 1 0 2 Rgba32ui +%uImgCube = OpVariable %_ptr_UniformConstant_52 UniformConstant +%55 = OpTypeImage %uint Cube 0 1 0 2 Rgba32ui %_ptr_UniformConstant_55 = OpTypePointer UniformConstant %55 %uImgCubeArr = OpVariable %_ptr_UniformConstant_55 UniformConstant - %58 = OpTypeImage %uint Buffer 0 0 0 2 Rgba32ui +%58 = OpTypeImage %uint Buffer 0 0 0 2 Rgba32ui %_ptr_UniformConstant_58 = OpTypePointer UniformConstant %58 - %uImgBuf = OpVariable %_ptr_UniformConstant_58 UniformConstant - %float = OpTypeFloat 32 - %62 = OpTypeImage %float 1D 0 0 0 2 Rgba32f +%uImgBuf = OpVariable %_ptr_UniformConstant_58 UniformConstant +%float = OpTypeFloat 32 +%62 = OpTypeImage %float 1D 0 0 0 2 Rgba32f %_ptr_UniformConstant_62 = OpTypePointer UniformConstant %62 - %fImg1D = OpVariable %_ptr_UniformConstant_62 UniformConstant - %65 = OpTypeImage %float 2D 0 0 0 2 Rgba16f +%fImg1D = OpVariable %_ptr_UniformConstant_62 UniformConstant +%65 = OpTypeImage %float 2D 0 0 0 2 Rgba16f %_ptr_UniformConstant_65 = OpTypePointer UniformConstant %65 - %fImg2D = OpVariable %_ptr_UniformConstant_65 UniformConstant - %68 = OpTypeImage %float 3D 0 0 0 2 R32f +%fImg2D = OpVariable %_ptr_UniformConstant_65 UniformConstant +%68 = OpTypeImage %float 3D 0 0 0 2 R32f %_ptr_UniformConstant_68 = OpTypePointer UniformConstant %68 - %fImg3D = OpVariable %_ptr_UniformConstant_68 UniformConstant - %71 = OpTypeImage %float Cube 0 0 0 2 Rgba8 +%fImg3D = OpVariable %_ptr_UniformConstant_68 UniformConstant +%71 = OpTypeImage %float Cube 0 0 0 2 Rgba8 %_ptr_UniformConstant_71 = OpTypePointer UniformConstant %71 - %fImgCube = OpVariable %_ptr_UniformConstant_71 UniformConstant - %74 = OpTypeImage %float Rect 0 0 0 2 Rgba8Snorm +%fImgCube = OpVariable %_ptr_UniformConstant_71 UniformConstant +%74 = OpTypeImage %float Rect 0 0 0 2 Rgba8Snorm %_ptr_UniformConstant_74 = OpTypePointer UniformConstant %74 - %fImg2DRect = OpVariable %_ptr_UniformConstant_74 UniformConstant - %77 = OpTypeImage %float 1D 0 1 0 2 Rgba32f +%fImg2DRect = OpVariable %_ptr_UniformConstant_74 UniformConstant +%77 = OpTypeImage %float 1D 0 1 0 2 Rgba32f %_ptr_UniformConstant_77 = OpTypePointer UniformConstant %77 %fImg1DArray = OpVariable %_ptr_UniformConstant_77 UniformConstant - %80 = OpTypeImage %float 2D 0 1 0 2 Rgba32f +%80 = OpTypeImage %float 2D 0 1 0 2 Rgba32f %_ptr_UniformConstant_80 = OpTypePointer UniformConstant %80 %fImg2DArray = OpVariable %_ptr_UniformConstant_80 UniformConstant - %83 = OpTypeImage %float Cube 0 1 0 2 Rgba32f +%83 = OpTypeImage %float Cube 0 1 0 2 Rgba32f %_ptr_UniformConstant_83 = OpTypePointer UniformConstant %83 %fImgCubeArray = OpVariable %_ptr_UniformConstant_83 UniformConstant - %86 = OpTypeImage %float Buffer 0 0 0 2 Rgba32f +%86 = OpTypeImage %float Buffer 0 0 0 2 Rgba32f %_ptr_UniformConstant_86 = OpTypePointer UniformConstant %86 - %fImgBuffer = OpVariable %_ptr_UniformConstant_86 UniformConstant - %89 = OpTypeImage %float 2D 0 0 1 2 Rgba32f +%fImgBuffer = OpVariable %_ptr_UniformConstant_86 UniformConstant +%89 = OpTypeImage %float 2D 0 0 1 2 Rgba32f %_ptr_UniformConstant_89 = OpTypePointer UniformConstant %89 - %fImg2DMS = OpVariable %_ptr_UniformConstant_89 UniformConstant - %92 = OpTypeImage %float 2D 0 1 1 2 Rgba32f +%fImg2DMS = OpVariable %_ptr_UniformConstant_89 UniformConstant +%92 = OpTypeImage %float 2D 0 1 1 2 Rgba32f %_ptr_UniformConstant_92 = OpTypePointer UniformConstant %92 %fImg2DMSArray = OpVariable %_ptr_UniformConstant_92 UniformConstant - %95 = OpTypeImage %int 1D 0 0 0 1 Unknown - %96 = OpTypeSampledImage %95 +%95 = OpTypeImage %int 1D 0 0 0 1 Unknown +%96 = OpTypeSampledImage %95 %_ptr_UniformConstant_96 = OpTypePointer UniformConstant %96 - %iSamp1D = OpVariable %_ptr_UniformConstant_96 UniformConstant - %99 = OpTypeImage %int 2D 0 0 0 1 Unknown - %100 = OpTypeSampledImage %99 +%iSamp1D = OpVariable %_ptr_UniformConstant_96 UniformConstant +%99 = OpTypeImage %int 2D 0 0 0 1 Unknown +%100 = OpTypeSampledImage %99 %_ptr_UniformConstant_100 = OpTypePointer UniformConstant %100 - %iSamp2D = OpVariable %_ptr_UniformConstant_100 UniformConstant - %103 = OpTypeImage %int 3D 0 0 0 1 Unknown - %104 = OpTypeSampledImage %103 +%iSamp2D = OpVariable %_ptr_UniformConstant_100 UniformConstant +%103 = OpTypeImage %int 3D 0 0 0 1 Unknown +%104 = OpTypeSampledImage %103 %_ptr_UniformConstant_104 = OpTypePointer UniformConstant %104 - %iSamp3D = OpVariable %_ptr_UniformConstant_104 UniformConstant - %107 = OpTypeImage %int Cube 0 0 0 1 Unknown - %108 = OpTypeSampledImage %107 +%iSamp3D = OpVariable %_ptr_UniformConstant_104 UniformConstant +%107 = OpTypeImage %int Cube 0 0 0 1 Unknown +%108 = OpTypeSampledImage %107 %_ptr_UniformConstant_108 = OpTypePointer UniformConstant %108 - %iSampCube = OpVariable %_ptr_UniformConstant_108 UniformConstant - %111 = OpTypeImage %int Rect 0 0 0 1 Unknown - %112 = OpTypeSampledImage %111 +%iSampCube = OpVariable %_ptr_UniformConstant_108 UniformConstant +%111 = OpTypeImage %int Rect 0 0 0 1 Unknown +%112 = OpTypeSampledImage %111 %_ptr_UniformConstant_112 = OpTypePointer UniformConstant %112 %iSamp2DRect = OpVariable %_ptr_UniformConstant_112 UniformConstant - %115 = OpTypeImage %int 1D 0 1 0 1 Unknown - %116 = OpTypeSampledImage %115 +%115 = OpTypeImage %int 1D 0 1 0 1 Unknown +%116 = OpTypeSampledImage %115 %_ptr_UniformConstant_116 = OpTypePointer UniformConstant %116 %iSamp1DArray = OpVariable %_ptr_UniformConstant_116 UniformConstant - %119 = OpTypeImage %int 2D 0 1 0 1 Unknown - %120 = OpTypeSampledImage %119 +%119 = OpTypeImage %int 2D 0 1 0 1 Unknown +%120 = OpTypeSampledImage %119 %_ptr_UniformConstant_120 = OpTypePointer UniformConstant %120 %iSamp2DArray = OpVariable %_ptr_UniformConstant_120 UniformConstant - %123 = OpTypeImage %int Cube 0 1 0 1 Unknown - %124 = OpTypeSampledImage %123 +%123 = OpTypeImage %int Cube 0 1 0 1 Unknown +%124 = OpTypeSampledImage %123 %_ptr_UniformConstant_124 = OpTypePointer UniformConstant %124 %iSampCubeArray = OpVariable %_ptr_UniformConstant_124 UniformConstant - %127 = OpTypeImage %int Buffer 0 0 0 1 Unknown - %128 = OpTypeSampledImage %127 +%127 = OpTypeImage %int Buffer 0 0 0 1 Unknown +%128 = OpTypeSampledImage %127 %_ptr_UniformConstant_128 = OpTypePointer UniformConstant %128 %iSampBuffer = OpVariable %_ptr_UniformConstant_128 UniformConstant - %131 = OpTypeImage %int 2D 0 0 1 1 Unknown - %132 = OpTypeSampledImage %131 +%131 = OpTypeImage %int 2D 0 0 1 1 Unknown +%132 = OpTypeSampledImage %131 %_ptr_UniformConstant_132 = OpTypePointer UniformConstant %132 - %iSamp2DMS = OpVariable %_ptr_UniformConstant_132 UniformConstant - %135 = OpTypeImage %int 2D 0 1 1 1 Unknown - %136 = OpTypeSampledImage %135 +%iSamp2DMS = OpVariable %_ptr_UniformConstant_132 UniformConstant +%135 = OpTypeImage %int 2D 0 1 1 1 Unknown +%136 = OpTypeSampledImage %135 %_ptr_UniformConstant_136 = OpTypePointer UniformConstant %136 %iSamp2DMSArray = OpVariable %_ptr_UniformConstant_136 UniformConstant - %139 = OpTypeImage %uint 1D 0 0 0 1 Unknown - %140 = OpTypeSampledImage %139 +%139 = OpTypeImage %uint 1D 0 0 0 1 Unknown +%140 = OpTypeSampledImage %139 %_ptr_UniformConstant_140 = OpTypePointer UniformConstant %140 - %uSamp1D = OpVariable %_ptr_UniformConstant_140 UniformConstant - %143 = OpTypeImage %uint 2D 0 0 0 1 Unknown - %144 = OpTypeSampledImage %143 +%uSamp1D = OpVariable %_ptr_UniformConstant_140 UniformConstant +%143 = OpTypeImage %uint 2D 0 0 0 1 Unknown +%144 = OpTypeSampledImage %143 %_ptr_UniformConstant_144 = OpTypePointer UniformConstant %144 - %uSamp2D = OpVariable %_ptr_UniformConstant_144 UniformConstant - %147 = OpTypeImage %uint 3D 0 0 0 1 Unknown - %148 = OpTypeSampledImage %147 +%uSamp2D = OpVariable %_ptr_UniformConstant_144 UniformConstant +%147 = OpTypeImage %uint 3D 0 0 0 1 Unknown +%148 = OpTypeSampledImage %147 %_ptr_UniformConstant_148 = OpTypePointer UniformConstant %148 - %uSamp3D = OpVariable %_ptr_UniformConstant_148 UniformConstant - %151 = OpTypeImage %uint Cube 0 0 0 1 Unknown - %152 = OpTypeSampledImage %151 +%uSamp3D = OpVariable %_ptr_UniformConstant_148 UniformConstant +%151 = OpTypeImage %uint Cube 0 0 0 1 Unknown +%152 = OpTypeSampledImage %151 %_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152 - %uSampCube = OpVariable %_ptr_UniformConstant_152 UniformConstant - %155 = OpTypeImage %uint Rect 0 0 0 1 Unknown - %156 = OpTypeSampledImage %155 +%uSampCube = OpVariable %_ptr_UniformConstant_152 UniformConstant +%155 = OpTypeImage %uint Rect 0 0 0 1 Unknown +%156 = OpTypeSampledImage %155 %_ptr_UniformConstant_156 = OpTypePointer UniformConstant %156 %uSamp2DRect = OpVariable %_ptr_UniformConstant_156 UniformConstant - %159 = OpTypeImage %uint 1D 0 1 0 1 Unknown - %160 = OpTypeSampledImage %159 +%159 = OpTypeImage %uint 1D 0 1 0 1 Unknown +%160 = OpTypeSampledImage %159 %_ptr_UniformConstant_160 = OpTypePointer UniformConstant %160 %uSamp1DArray = OpVariable %_ptr_UniformConstant_160 UniformConstant - %163 = OpTypeImage %uint 2D 0 1 0 1 Unknown - %164 = OpTypeSampledImage %163 +%163 = OpTypeImage %uint 2D 0 1 0 1 Unknown +%164 = OpTypeSampledImage %163 %_ptr_UniformConstant_164 = OpTypePointer UniformConstant %164 %uSamp2DArray = OpVariable %_ptr_UniformConstant_164 UniformConstant - %167 = OpTypeImage %uint Cube 0 1 0 1 Unknown - %168 = OpTypeSampledImage %167 +%167 = OpTypeImage %uint Cube 0 1 0 1 Unknown +%168 = OpTypeSampledImage %167 %_ptr_UniformConstant_168 = OpTypePointer UniformConstant %168 %uSampCubeArray = OpVariable %_ptr_UniformConstant_168 UniformConstant - %171 = OpTypeImage %uint Buffer 0 0 0 1 Unknown - %172 = OpTypeSampledImage %171 +%171 = OpTypeImage %uint Buffer 0 0 0 1 Unknown +%172 = OpTypeSampledImage %171 %_ptr_UniformConstant_172 = OpTypePointer UniformConstant %172 %uSampBuffer = OpVariable %_ptr_UniformConstant_172 UniformConstant - %175 = OpTypeImage %uint 2D 0 0 1 1 Unknown - %176 = OpTypeSampledImage %175 +%175 = OpTypeImage %uint 2D 0 0 1 1 Unknown +%176 = OpTypeSampledImage %175 %_ptr_UniformConstant_176 = OpTypePointer UniformConstant %176 - %uSamp2DMS = OpVariable %_ptr_UniformConstant_176 UniformConstant - %179 = OpTypeImage %uint 2D 0 1 1 1 Unknown - %180 = OpTypeSampledImage %179 +%uSamp2DMS = OpVariable %_ptr_UniformConstant_176 UniformConstant +%179 = OpTypeImage %uint 2D 0 1 1 1 Unknown +%180 = OpTypeSampledImage %179 %_ptr_UniformConstant_180 = OpTypePointer UniformConstant %180 %uSamp2DMSArray = OpVariable %_ptr_UniformConstant_180 UniformConstant - %183 = OpTypeImage %float 1D 0 0 0 1 Unknown - %184 = OpTypeSampledImage %183 +%183 = OpTypeImage %float 1D 0 0 0 1 Unknown +%184 = OpTypeSampledImage %183 %_ptr_UniformConstant_184 = OpTypePointer UniformConstant %184 - %fSamp1D = OpVariable %_ptr_UniformConstant_184 UniformConstant - %187 = OpTypeImage %float 2D 0 0 0 1 Unknown - %188 = OpTypeSampledImage %187 +%fSamp1D = OpVariable %_ptr_UniformConstant_184 UniformConstant +%187 = OpTypeImage %float 2D 0 0 0 1 Unknown +%188 = OpTypeSampledImage %187 %_ptr_UniformConstant_188 = OpTypePointer UniformConstant %188 - %fSamp2D = OpVariable %_ptr_UniformConstant_188 UniformConstant - %191 = OpTypeImage %float 3D 0 0 0 1 Unknown - %192 = OpTypeSampledImage %191 +%fSamp2D = OpVariable %_ptr_UniformConstant_188 UniformConstant +%191 = OpTypeImage %float 3D 0 0 0 1 Unknown +%192 = OpTypeSampledImage %191 %_ptr_UniformConstant_192 = OpTypePointer UniformConstant %192 - %fSamp3D = OpVariable %_ptr_UniformConstant_192 UniformConstant - %195 = OpTypeImage %float Cube 0 0 0 1 Unknown - %196 = OpTypeSampledImage %195 +%fSamp3D = OpVariable %_ptr_UniformConstant_192 UniformConstant +%195 = OpTypeImage %float Cube 0 0 0 1 Unknown +%196 = OpTypeSampledImage %195 %_ptr_UniformConstant_196 = OpTypePointer UniformConstant %196 - %fSampCube = OpVariable %_ptr_UniformConstant_196 UniformConstant - %199 = OpTypeImage %float Rect 0 0 0 1 Unknown - %200 = OpTypeSampledImage %199 +%fSampCube = OpVariable %_ptr_UniformConstant_196 UniformConstant +%199 = OpTypeImage %float Rect 0 0 0 1 Unknown +%200 = OpTypeSampledImage %199 %_ptr_UniformConstant_200 = OpTypePointer UniformConstant %200 %fSamp2DRect = OpVariable %_ptr_UniformConstant_200 UniformConstant - %203 = OpTypeImage %float 1D 0 1 0 1 Unknown - %204 = OpTypeSampledImage %203 +%203 = OpTypeImage %float 1D 0 1 0 1 Unknown +%204 = OpTypeSampledImage %203 %_ptr_UniformConstant_204 = OpTypePointer UniformConstant %204 %fSamp1DArray = OpVariable %_ptr_UniformConstant_204 UniformConstant - %207 = OpTypeImage %float 2D 0 1 0 1 Unknown - %208 = OpTypeSampledImage %207 +%207 = OpTypeImage %float 2D 0 1 0 1 Unknown +%208 = OpTypeSampledImage %207 %_ptr_UniformConstant_208 = OpTypePointer UniformConstant %208 %fSamp2DArray = OpVariable %_ptr_UniformConstant_208 UniformConstant - %211 = OpTypeImage %float Cube 0 1 0 1 Unknown - %212 = OpTypeSampledImage %211 +%211 = OpTypeImage %float Cube 0 1 0 1 Unknown +%212 = OpTypeSampledImage %211 %_ptr_UniformConstant_212 = OpTypePointer UniformConstant %212 %fSampCubeArray = OpVariable %_ptr_UniformConstant_212 UniformConstant - %215 = OpTypeImage %float Buffer 0 0 0 1 Unknown - %216 = OpTypeSampledImage %215 +%215 = OpTypeImage %float Buffer 0 0 0 1 Unknown +%216 = OpTypeSampledImage %215 %_ptr_UniformConstant_216 = OpTypePointer UniformConstant %216 %fSampBuffer = OpVariable %_ptr_UniformConstant_216 UniformConstant - %219 = OpTypeImage %float 2D 0 0 1 1 Unknown - %220 = OpTypeSampledImage %219 +%219 = OpTypeImage %float 2D 0 0 1 1 Unknown +%220 = OpTypeSampledImage %219 %_ptr_UniformConstant_220 = OpTypePointer UniformConstant %220 - %fSamp2DMS = OpVariable %_ptr_UniformConstant_220 UniformConstant - %223 = OpTypeImage %float 2D 0 1 1 1 Unknown - %224 = OpTypeSampledImage %223 +%fSamp2DMS = OpVariable %_ptr_UniformConstant_220 UniformConstant +%223 = OpTypeImage %float 2D 0 1 1 1 Unknown +%224 = OpTypeSampledImage %223 %_ptr_UniformConstant_224 = OpTypePointer UniformConstant %224 %fSamp2DMSArray = OpVariable %_ptr_UniformConstant_224 UniformConstant - %227 = OpTypeImage %float 1D 1 0 0 1 Unknown - %228 = OpTypeSampledImage %227 +%227 = OpTypeImage %float 1D 1 0 0 1 Unknown +%228 = OpTypeSampledImage %227 %_ptr_UniformConstant_228 = OpTypePointer UniformConstant %228 - %dsSamp1D = OpVariable %_ptr_UniformConstant_228 UniformConstant - %231 = OpTypeImage %float 2D 1 0 0 1 Unknown - %232 = OpTypeSampledImage %231 +%dsSamp1D = OpVariable %_ptr_UniformConstant_228 UniformConstant +%231 = OpTypeImage %float 2D 1 0 0 1 Unknown +%232 = OpTypeSampledImage %231 %_ptr_UniformConstant_232 = OpTypePointer UniformConstant %232 - %dsSamp2D = OpVariable %_ptr_UniformConstant_232 UniformConstant - %235 = OpTypeImage %float Cube 1 0 0 1 Unknown - %236 = OpTypeSampledImage %235 +%dsSamp2D = OpVariable %_ptr_UniformConstant_232 UniformConstant +%235 = OpTypeImage %float Cube 1 0 0 1 Unknown +%236 = OpTypeSampledImage %235 %_ptr_UniformConstant_236 = OpTypePointer UniformConstant %236 - %dsSampCube = OpVariable %_ptr_UniformConstant_236 UniformConstant - %239 = OpTypeImage %float Rect 1 0 0 1 Unknown - %240 = OpTypeSampledImage %239 +%dsSampCube = OpVariable %_ptr_UniformConstant_236 UniformConstant +%239 = OpTypeImage %float Rect 1 0 0 1 Unknown +%240 = OpTypeSampledImage %239 %_ptr_UniformConstant_240 = OpTypePointer UniformConstant %240 %dsSamp2DRect = OpVariable %_ptr_UniformConstant_240 UniformConstant - %243 = OpTypeImage %float 1D 1 1 0 1 Unknown - %244 = OpTypeSampledImage %243 +%243 = OpTypeImage %float 1D 1 1 0 1 Unknown +%244 = OpTypeSampledImage %243 %_ptr_UniformConstant_244 = OpTypePointer UniformConstant %244 %dsSamp1DArray = OpVariable %_ptr_UniformConstant_244 UniformConstant - %247 = OpTypeImage %float 2D 1 1 0 1 Unknown - %248 = OpTypeSampledImage %247 +%247 = OpTypeImage %float 2D 1 1 0 1 Unknown +%248 = OpTypeSampledImage %247 %_ptr_UniformConstant_248 = OpTypePointer UniformConstant %248 %dsSamp2DArray = OpVariable %_ptr_UniformConstant_248 UniformConstant - %251 = OpTypeImage %float Cube 1 1 0 1 Unknown - %252 = OpTypeSampledImage %251 +%251 = OpTypeImage %float Cube 1 1 0 1 Unknown +%252 = OpTypeSampledImage %251 %_ptr_UniformConstant_252 = OpTypePointer UniformConstant %252 %dsSampCubeArray = OpVariable %_ptr_UniformConstant_252 UniformConstant - %255 = OpTypeSampler +%255 = OpTypeSampler %_ptr_UniformConstant_255 = OpTypePointer UniformConstant %255 - %samp = OpVariable %_ptr_UniformConstant_255 UniformConstant - %sampShadow = OpVariable %_ptr_UniformConstant_255 UniformConstant +%samp = OpVariable %_ptr_UniformConstant_255 UniformConstant +%sampShadow = OpVariable %_ptr_UniformConstant_255 UniformConstant %_ptr_UniformConstant_95 = OpTypePointer UniformConstant %95 - %iTex1D = OpVariable %_ptr_UniformConstant_95 UniformConstant +%iTex1D = OpVariable %_ptr_UniformConstant_95 UniformConstant %_ptr_UniformConstant_99 = OpTypePointer UniformConstant %99 - %iTex2D = OpVariable %_ptr_UniformConstant_99 UniformConstant +%iTex2D = OpVariable %_ptr_UniformConstant_99 UniformConstant %_ptr_UniformConstant_103 = OpTypePointer UniformConstant %103 - %iTex3D = OpVariable %_ptr_UniformConstant_103 UniformConstant +%iTex3D = OpVariable %_ptr_UniformConstant_103 UniformConstant %_ptr_UniformConstant_107 = OpTypePointer UniformConstant %107 - %iTexCube = OpVariable %_ptr_UniformConstant_107 UniformConstant +%iTexCube = OpVariable %_ptr_UniformConstant_107 UniformConstant %_ptr_UniformConstant_111 = OpTypePointer UniformConstant %111 - %iTex2DRect = OpVariable %_ptr_UniformConstant_111 UniformConstant +%iTex2DRect = OpVariable %_ptr_UniformConstant_111 UniformConstant %_ptr_UniformConstant_115 = OpTypePointer UniformConstant %115 %iTex1DArray = OpVariable %_ptr_UniformConstant_115 UniformConstant %_ptr_UniformConstant_119 = OpTypePointer UniformConstant %119 @@ -790,21 +790,21 @@ %_ptr_UniformConstant_123 = OpTypePointer UniformConstant %123 %iTexCubeArray = OpVariable %_ptr_UniformConstant_123 UniformConstant %_ptr_UniformConstant_127 = OpTypePointer UniformConstant %127 - %iTexBuffer = OpVariable %_ptr_UniformConstant_127 UniformConstant +%iTexBuffer = OpVariable %_ptr_UniformConstant_127 UniformConstant %_ptr_UniformConstant_131 = OpTypePointer UniformConstant %131 - %iTex2DMS = OpVariable %_ptr_UniformConstant_131 UniformConstant +%iTex2DMS = OpVariable %_ptr_UniformConstant_131 UniformConstant %_ptr_UniformConstant_135 = OpTypePointer UniformConstant %135 %iTex2DMSArray = OpVariable %_ptr_UniformConstant_135 UniformConstant %_ptr_UniformConstant_139 = OpTypePointer UniformConstant %139 - %uTex1D = OpVariable %_ptr_UniformConstant_139 UniformConstant +%uTex1D = OpVariable %_ptr_UniformConstant_139 UniformConstant %_ptr_UniformConstant_143 = OpTypePointer UniformConstant %143 - %uTex2D = OpVariable %_ptr_UniformConstant_143 UniformConstant +%uTex2D = OpVariable %_ptr_UniformConstant_143 UniformConstant %_ptr_UniformConstant_147 = OpTypePointer UniformConstant %147 - %uTex3D = OpVariable %_ptr_UniformConstant_147 UniformConstant +%uTex3D = OpVariable %_ptr_UniformConstant_147 UniformConstant %_ptr_UniformConstant_151 = OpTypePointer UniformConstant %151 - %uTexCube = OpVariable %_ptr_UniformConstant_151 UniformConstant +%uTexCube = OpVariable %_ptr_UniformConstant_151 UniformConstant %_ptr_UniformConstant_155 = OpTypePointer UniformConstant %155 - %uTex2DRect = OpVariable %_ptr_UniformConstant_155 UniformConstant +%uTex2DRect = OpVariable %_ptr_UniformConstant_155 UniformConstant %_ptr_UniformConstant_159 = OpTypePointer UniformConstant %159 %uTex1DArray = OpVariable %_ptr_UniformConstant_159 UniformConstant %_ptr_UniformConstant_163 = OpTypePointer UniformConstant %163 @@ -812,21 +812,21 @@ %_ptr_UniformConstant_167 = OpTypePointer UniformConstant %167 %uTexCubeArray = OpVariable %_ptr_UniformConstant_167 UniformConstant %_ptr_UniformConstant_171 = OpTypePointer UniformConstant %171 - %uTexBuffer = OpVariable %_ptr_UniformConstant_171 UniformConstant +%uTexBuffer = OpVariable %_ptr_UniformConstant_171 UniformConstant %_ptr_UniformConstant_175 = OpTypePointer UniformConstant %175 - %uTex2DMS = OpVariable %_ptr_UniformConstant_175 UniformConstant +%uTex2DMS = OpVariable %_ptr_UniformConstant_175 UniformConstant %_ptr_UniformConstant_179 = OpTypePointer UniformConstant %179 %uTex2DMSArray = OpVariable %_ptr_UniformConstant_179 UniformConstant %_ptr_UniformConstant_183 = OpTypePointer UniformConstant %183 - %fTex1D = OpVariable %_ptr_UniformConstant_183 UniformConstant +%fTex1D = OpVariable %_ptr_UniformConstant_183 UniformConstant %_ptr_UniformConstant_187 = OpTypePointer UniformConstant %187 - %fTex2D = OpVariable %_ptr_UniformConstant_187 UniformConstant +%fTex2D = OpVariable %_ptr_UniformConstant_187 UniformConstant %_ptr_UniformConstant_191 = OpTypePointer UniformConstant %191 - %fTex3D = OpVariable %_ptr_UniformConstant_191 UniformConstant +%fTex3D = OpVariable %_ptr_UniformConstant_191 UniformConstant %_ptr_UniformConstant_195 = OpTypePointer UniformConstant %195 - %fTexCube = OpVariable %_ptr_UniformConstant_195 UniformConstant +%fTexCube = OpVariable %_ptr_UniformConstant_195 UniformConstant %_ptr_UniformConstant_199 = OpTypePointer UniformConstant %199 - %fTex2DRect = OpVariable %_ptr_UniformConstant_199 UniformConstant +%fTex2DRect = OpVariable %_ptr_UniformConstant_199 UniformConstant %_ptr_UniformConstant_203 = OpTypePointer UniformConstant %203 %fTex1DArray = OpVariable %_ptr_UniformConstant_203 UniformConstant %_ptr_UniformConstant_207 = OpTypePointer UniformConstant %207 @@ -834,20 +834,20 @@ %_ptr_UniformConstant_211 = OpTypePointer UniformConstant %211 %fTexCubeArray = OpVariable %_ptr_UniformConstant_211 UniformConstant %_ptr_UniformConstant_215 = OpTypePointer UniformConstant %215 - %fTexBuffer = OpVariable %_ptr_UniformConstant_215 UniformConstant +%fTexBuffer = OpVariable %_ptr_UniformConstant_215 UniformConstant %_ptr_UniformConstant_219 = OpTypePointer UniformConstant %219 - %fTex2DMS = OpVariable %_ptr_UniformConstant_219 UniformConstant +%fTex2DMS = OpVariable %_ptr_UniformConstant_219 UniformConstant %_ptr_UniformConstant_223 = OpTypePointer UniformConstant %223 %fTex2DMSArray = OpVariable %_ptr_UniformConstant_223 UniformConstant - %v2int = OpTypeVector %int 2 - %v3int = OpTypeVector %int 3 - %v4int = OpTypeVector %int 4 - %v2uint = OpTypeVector %uint 2 - %v3uint = OpTypeVector %uint 3 - %v4uint = OpTypeVector %uint 4 - %v2float = OpTypeVector %float 2 - %v3float = OpTypeVector %float 3 - %v4float = OpTypeVector %float 4 +%v2int = OpTypeVector %int 2 +%v3int = OpTypeVector %int 3 +%v4int = OpTypeVector %int 4 +%v2uint = OpTypeVector %uint 2 +%v3uint = OpTypeVector %uint 3 +%v4uint = OpTypeVector %uint 4 +%v2float = OpTypeVector %float 2 +%v3float = OpTypeVector %float 3 +%v4float = OpTypeVector %float 4 %mat2v2float = OpTypeMatrix %v2float 2 %mat2v3float = OpTypeMatrix %v3float 2 %mat2v4float = OpTypeMatrix %v4float 2 @@ -857,10 +857,10 @@ %mat4v2float = OpTypeMatrix %v2float 4 %mat4v3float = OpTypeMatrix %v3float 4 %mat4v4float = OpTypeMatrix %v4float 4 - %double = OpTypeFloat 64 - %v2double = OpTypeVector %double 2 - %v3double = OpTypeVector %double 3 - %v4double = OpTypeVector %double 4 +%double = OpTypeFloat 64 +%v2double = OpTypeVector %double 2 +%v3double = OpTypeVector %double 3 +%v4double = OpTypeVector %double 4 %mat2v2double = OpTypeMatrix %v2double 2 %mat2v3double = OpTypeMatrix %v3double 2 %mat2v4double = OpTypeMatrix %v4double 2 @@ -870,58 +870,58 @@ %mat4v2double = OpTypeMatrix %v2double 4 %mat4v3double = OpTypeMatrix %v3double 4 %mat4v4double = OpTypeMatrix %v4double 4 - %Data = OpTypeStruct %int %v2int %v3int %v4int %uint %v2uint %v3uint %v4uint %float %v2float %v3float %v4float %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %double %v2double %v3double %v4double %mat2v2double %mat2v3double %mat2v4double %mat3v2double %mat3v3double %mat3v4double %mat4v2double %mat4v3double %mat4v4double - %uint_4 = OpConstant %uint 4 +%Data = OpTypeStruct %int %v2int %v3int %v4int %uint %v2uint %v3uint %v4uint %float %v2float %v3float %v4float %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %double %v2double %v3double %v4double %mat2v2double %mat2v3double %mat2v4double %mat3v2double %mat3v3double %mat3v4double %mat4v2double %mat4v3double %mat4v4double +%uint_4 = OpConstant %uint 4 %_arr_Data_uint_4 = OpTypeArray %Data %uint_4 - %Ubo = OpTypeStruct %_arr_Data_uint_4 - %uint_1 = OpConstant %uint 1 +%Ubo = OpTypeStruct %_arr_Data_uint_4 +%uint_1 = OpConstant %uint 1 %_arr_Ubo_uint_1 = OpTypeArray %Ubo %uint_1 %_ptr_Uniform__arr_Ubo_uint_1 = OpTypePointer Uniform %_arr_Ubo_uint_1 - %ubo = OpVariable %_ptr_Uniform__arr_Ubo_uint_1 Uniform +%ubo = OpVariable %_ptr_Uniform__arr_Ubo_uint_1 Uniform %_runtimearr_int = OpTypeRuntimeArray %int - %Ssbo = OpTypeStruct %_runtimearr_int +%Ssbo = OpTypeStruct %_runtimearr_int %_ptr_StorageBuffer_Ssbo = OpTypePointer StorageBuffer %Ssbo - %ssbo = OpVariable %_ptr_StorageBuffer_Ssbo StorageBuffer - %368 = OpTypeImage %int SubpassData 0 0 0 2 Unknown +%ssbo = OpVariable %_ptr_StorageBuffer_Ssbo StorageBuffer +%368 = OpTypeImage %int SubpassData 0 0 0 2 Unknown %_ptr_UniformConstant_368 = OpTypePointer UniformConstant %368 - %iAttm = OpVariable %_ptr_UniformConstant_368 UniformConstant - %371 = OpTypeImage %int SubpassData 0 0 1 2 Unknown +%iAttm = OpVariable %_ptr_UniformConstant_368 UniformConstant +%371 = OpTypeImage %int SubpassData 0 0 1 2 Unknown %_ptr_UniformConstant_371 = OpTypePointer UniformConstant %371 - %iAttmMS = OpVariable %_ptr_UniformConstant_371 UniformConstant - %374 = OpTypeImage %uint SubpassData 0 0 0 2 Unknown +%iAttmMS = OpVariable %_ptr_UniformConstant_371 UniformConstant +%374 = OpTypeImage %uint SubpassData 0 0 0 2 Unknown %_ptr_UniformConstant_374 = OpTypePointer UniformConstant %374 - %uAttm = OpVariable %_ptr_UniformConstant_374 UniformConstant - %377 = OpTypeImage %uint SubpassData 0 0 1 2 Unknown +%uAttm = OpVariable %_ptr_UniformConstant_374 UniformConstant +%377 = OpTypeImage %uint SubpassData 0 0 1 2 Unknown %_ptr_UniformConstant_377 = OpTypePointer UniformConstant %377 - %uAttmMS = OpVariable %_ptr_UniformConstant_377 UniformConstant - %380 = OpTypeImage %float SubpassData 0 0 0 2 Unknown +%uAttmMS = OpVariable %_ptr_UniformConstant_377 UniformConstant +%380 = OpTypeImage %float SubpassData 0 0 0 2 Unknown %_ptr_UniformConstant_380 = OpTypePointer UniformConstant %380 - %fAttm = OpVariable %_ptr_UniformConstant_380 UniformConstant - %383 = OpTypeImage %float SubpassData 0 0 1 2 Unknown +%fAttm = OpVariable %_ptr_UniformConstant_380 UniformConstant +%383 = OpTypeImage %float SubpassData 0 0 1 2 Unknown %_ptr_UniformConstant_383 = OpTypePointer UniformConstant %383 - %fAttmMS = OpVariable %_ptr_UniformConstant_383 UniformConstant - %386 = OpTypeAccelerationStructureKHR +%fAttmMS = OpVariable %_ptr_UniformConstant_383 UniformConstant +%386 = OpTypeAccelerationStructureKHR %_ptr_UniformConstant_386 = OpTypePointer UniformConstant %386 - %acc = OpVariable %_ptr_UniformConstant_386 UniformConstant - %char = OpTypeInt 8 1 - %char_1 = OpConstant %char 1 - %short = OpTypeInt 16 1 - %short_1 = OpConstant %short 1 - %int_1 = OpConstant %int 1 - %long = OpTypeInt 64 1 - %long_1 = OpConstant %long 1 - %uchar = OpTypeInt 8 0 - %uchar_1 = OpConstant %uchar 1 - %ushort = OpTypeInt 16 0 - %ushort_1 = OpConstant %ushort 1 - %ulong = OpTypeInt 64 0 - %ulong_1 = OpConstant %ulong 1 - %half = OpTypeFloat 16 +%acc = OpVariable %_ptr_UniformConstant_386 UniformConstant +%char = OpTypeInt 8 1 +%char_1 = OpConstant %char 1 +%short = OpTypeInt 16 1 +%short_1 = OpConstant %short 1 +%int_1 = OpConstant %int 1 +%long = OpTypeInt 64 1 +%long_1 = OpConstant %long 1 +%uchar = OpTypeInt 8 0 +%uchar_1 = OpConstant %uchar 1 +%ushort = OpTypeInt 16 0 +%ushort_1 = OpConstant %ushort 1 +%ulong = OpTypeInt 64 0 +%ulong_1 = OpConstant %ulong 1 +%half = OpTypeFloat 16 %half_0x1pn2 = OpConstant %half 0x1p-2 - %float_1 = OpConstant %float 1 - %double_1 = OpConstant %double 1 - %main = OpFunction %void None %3 - %5 = OpLabel - %10 = OpRayQueryProceedKHR %bool %ray_query - OpReturn - OpFunctionEnd +%float_1 = OpConstant %float 1 +%double_1 = OpConstant %double 1 +%main = OpFunction %void None %3 +%5 = OpLabel +%10 = OpRayQueryProceedKHR %bool %ray_query +OpReturn +OpFunctionEnd diff --git a/spirq-dis/src/main.rs b/spirq-dis/src/main.rs index f3b4dc0..6630291 100644 --- a/spirq-dis/src/main.rs +++ b/spirq-dis/src/main.rs @@ -21,6 +21,9 @@ struct Args { )] out_path: Option, + #[arg(long, help = "Don't indent instructions.")] + no_indent: bool, + #[arg(long, help = "Don't output the header as leading comments.")] no_header: bool, @@ -46,6 +49,7 @@ fn main() { let dis = Disassembler::new() .print_header(!args.no_header) + .indent(!args.no_indent) .name_ids(!args.raw_id) .name_type_ids(!args.raw_id) .name_const_ids(!args.raw_id); From 064bcc2e0b4644a583b9cda094d3581d8e48c380 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Fri, 22 Dec 2023 01:14:11 +0800 Subject: [PATCH 34/50] Default no indent --- spirq-spvasm/src/dis/disassembler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 76ecd1d..37dec85 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -25,7 +25,7 @@ impl Disassembler { name_ids: false, name_type_ids: false, name_const_ids: false, - indent: true, + indent: false, } } From b3aabbc6b23a1c5a5d4d8c665cd61006d9e12352 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Fri, 22 Dec 2023 01:23:58 +0800 Subject: [PATCH 35/50] Fix tests --- spirq-spvasm/src/dis/disassembler.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/spirq-spvasm/src/dis/disassembler.rs b/spirq-spvasm/src/dis/disassembler.rs index 37dec85..23b6bb2 100644 --- a/spirq-spvasm/src/dis/disassembler.rs +++ b/spirq-spvasm/src/dis/disassembler.rs @@ -306,7 +306,6 @@ impl Disassembler { }; let mut instrs = self.print(spv, &itm, id_names)?; - instrs.push(String::new()); // Trailing newline. if self.indent { let max_eq_pos = instrs From 0d38d9c3e22671ddcbc4d406bf6f016314005d99 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Sun, 24 Dec 2023 11:08:40 +0800 Subject: [PATCH 36/50] Update example logs --- assets/gallery.frag.json | 146 ++--- assets/gallery.frag.spv.json | 146 ++--- assets/moon.spv.json | 2 +- spirq/examples/gallery/main.log | 968 ++++++++------------------------ 4 files changed, 371 insertions(+), 891 deletions(-) diff --git a/assets/gallery.frag.json b/assets/gallery.frag.json index ab9aa84..475e0bf 100644 --- a/assets/gallery.frag.json +++ b/assets/gallery.frag.json @@ -232,7 +232,7 @@ "Set": 4, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -240,7 +240,7 @@ "Set": 4, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -248,7 +248,7 @@ "Set": 4, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -256,7 +256,7 @@ "Set": 4, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -264,7 +264,7 @@ "Set": 4, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -272,7 +272,7 @@ "Set": 4, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -280,7 +280,7 @@ "Set": 4, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -288,7 +288,7 @@ "Set": 4, "Binding": 7, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -296,7 +296,7 @@ "Set": 4, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -304,7 +304,7 @@ "Set": 4, "Binding": 9, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -312,7 +312,7 @@ "Set": 4, "Binding": 10, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -320,7 +320,7 @@ "Set": 5, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -328,7 +328,7 @@ "Set": 5, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -336,7 +336,7 @@ "Set": 5, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -344,7 +344,7 @@ "Set": 5, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -352,7 +352,7 @@ "Set": 5, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -360,7 +360,7 @@ "Set": 5, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -368,7 +368,7 @@ "Set": 5, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -376,7 +376,7 @@ "Set": 5, "Binding": 7, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -384,7 +384,7 @@ "Set": 5, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -392,7 +392,7 @@ "Set": 5, "Binding": 9, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -400,7 +400,7 @@ "Set": 5, "Binding": 10, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -408,7 +408,7 @@ "Set": 6, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -416,7 +416,7 @@ "Set": 6, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -424,7 +424,7 @@ "Set": 6, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -432,7 +432,7 @@ "Set": 6, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -440,7 +440,7 @@ "Set": 6, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -448,7 +448,7 @@ "Set": 6, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -456,7 +456,7 @@ "Set": 6, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -464,7 +464,7 @@ "Set": 6, "Binding": 7, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -472,7 +472,7 @@ "Set": 6, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -480,7 +480,7 @@ "Set": 6, "Binding": 9, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -488,7 +488,7 @@ "Set": 6, "Binding": 10, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -496,7 +496,7 @@ "Set": 7, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -504,7 +504,7 @@ "Set": 7, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -512,7 +512,7 @@ "Set": 7, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -520,7 +520,7 @@ "Set": 7, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -528,7 +528,7 @@ "Set": 7, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -536,7 +536,7 @@ "Set": 7, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -544,7 +544,7 @@ "Set": 7, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -568,7 +568,7 @@ "Set": 9, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage1D", + "Type": "SampledImage1D", "Count": 1 }, { @@ -576,7 +576,7 @@ "Set": 9, "Binding": 1, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 1 }, { @@ -584,7 +584,7 @@ "Set": 9, "Binding": 2, "DescriptorType": "SampledImage", - "Type": "SampledImage3D", + "Type": "SampledImage3D", "Count": 1 }, { @@ -592,7 +592,7 @@ "Set": 9, "Binding": 3, "DescriptorType": "SampledImage", - "Type": "SampledImageCube", + "Type": "SampledImageCube", "Count": 1 }, { @@ -600,7 +600,7 @@ "Set": 9, "Binding": 4, "DescriptorType": "SampledImage", - "Type": "SampledImageRect", + "Type": "SampledImageRect", "Count": 1 }, { @@ -608,7 +608,7 @@ "Set": 9, "Binding": 5, "DescriptorType": "SampledImage", - "Type": "SampledImage1DArray", + "Type": "SampledImage1DArray", "Count": 1 }, { @@ -616,7 +616,7 @@ "Set": 9, "Binding": 6, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArray", + "Type": "SampledImage2DArray", "Count": 1 }, { @@ -624,7 +624,7 @@ "Set": 9, "Binding": 7, "DescriptorType": "SampledImage", - "Type": "SampledImageCubeArray", + "Type": "SampledImageCubeArray", "Count": 1 }, { @@ -632,7 +632,7 @@ "Set": 9, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "SampledImageBuffer", + "Type": "SampledImageBuffer", "Count": 1 }, { @@ -640,7 +640,7 @@ "Set": 9, "Binding": 9, "DescriptorType": "SampledImage", - "Type": "SampledImage2DMS", + "Type": "SampledImage2DMS", "Count": 1 }, { @@ -648,7 +648,7 @@ "Set": 9, "Binding": 10, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArrayMS", + "Type": "SampledImage2DArrayMS", "Count": 1 }, { @@ -656,7 +656,7 @@ "Set": 10, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage1D", + "Type": "SampledImage1D", "Count": 1 }, { @@ -664,7 +664,7 @@ "Set": 10, "Binding": 1, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 1 }, { @@ -672,7 +672,7 @@ "Set": 10, "Binding": 2, "DescriptorType": "SampledImage", - "Type": "SampledImage3D", + "Type": "SampledImage3D", "Count": 1 }, { @@ -680,7 +680,7 @@ "Set": 10, "Binding": 3, "DescriptorType": "SampledImage", - "Type": "SampledImageCube", + "Type": "SampledImageCube", "Count": 1 }, { @@ -688,7 +688,7 @@ "Set": 10, "Binding": 4, "DescriptorType": "SampledImage", - "Type": "SampledImageRect", + "Type": "SampledImageRect", "Count": 1 }, { @@ -696,7 +696,7 @@ "Set": 10, "Binding": 5, "DescriptorType": "SampledImage", - "Type": "SampledImage1DArray", + "Type": "SampledImage1DArray", "Count": 1 }, { @@ -704,7 +704,7 @@ "Set": 10, "Binding": 6, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArray", + "Type": "SampledImage2DArray", "Count": 1 }, { @@ -712,7 +712,7 @@ "Set": 10, "Binding": 7, "DescriptorType": "SampledImage", - "Type": "SampledImageCubeArray", + "Type": "SampledImageCubeArray", "Count": 1 }, { @@ -720,7 +720,7 @@ "Set": 10, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "SampledImageBuffer", + "Type": "SampledImageBuffer", "Count": 1 }, { @@ -728,7 +728,7 @@ "Set": 10, "Binding": 9, "DescriptorType": "SampledImage", - "Type": "SampledImage2DMS", + "Type": "SampledImage2DMS", "Count": 1 }, { @@ -736,7 +736,7 @@ "Set": 10, "Binding": 10, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArrayMS", + "Type": "SampledImage2DArrayMS", "Count": 1 }, { @@ -744,7 +744,7 @@ "Set": 11, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage1D", + "Type": "SampledImage1D", "Count": 1 }, { @@ -752,7 +752,7 @@ "Set": 11, "Binding": 1, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 1 }, { @@ -760,7 +760,7 @@ "Set": 11, "Binding": 2, "DescriptorType": "SampledImage", - "Type": "SampledImage3D", + "Type": "SampledImage3D", "Count": 1 }, { @@ -768,7 +768,7 @@ "Set": 11, "Binding": 3, "DescriptorType": "SampledImage", - "Type": "SampledImageCube", + "Type": "SampledImageCube", "Count": 1 }, { @@ -776,7 +776,7 @@ "Set": 11, "Binding": 4, "DescriptorType": "SampledImage", - "Type": "SampledImageRect", + "Type": "SampledImageRect", "Count": 1 }, { @@ -784,7 +784,7 @@ "Set": 11, "Binding": 5, "DescriptorType": "SampledImage", - "Type": "SampledImage1DArray", + "Type": "SampledImage1DArray", "Count": 1 }, { @@ -792,7 +792,7 @@ "Set": 11, "Binding": 6, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArray", + "Type": "SampledImage2DArray", "Count": 1 }, { @@ -800,7 +800,7 @@ "Set": 11, "Binding": 7, "DescriptorType": "SampledImage", - "Type": "SampledImageCubeArray", + "Type": "SampledImageCubeArray", "Count": 1 }, { @@ -808,7 +808,7 @@ "Set": 11, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "SampledImageBuffer", + "Type": "SampledImageBuffer", "Count": 1 }, { @@ -816,7 +816,7 @@ "Set": 11, "Binding": 9, "DescriptorType": "SampledImage", - "Type": "SampledImage2DMS", + "Type": "SampledImage2DMS", "Count": 1 }, { @@ -824,7 +824,7 @@ "Set": 11, "Binding": 10, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArrayMS", + "Type": "SampledImage2DArrayMS", "Count": 1 }, { diff --git a/assets/gallery.frag.spv.json b/assets/gallery.frag.spv.json index ab9aa84..475e0bf 100644 --- a/assets/gallery.frag.spv.json +++ b/assets/gallery.frag.spv.json @@ -232,7 +232,7 @@ "Set": 4, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -240,7 +240,7 @@ "Set": 4, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -248,7 +248,7 @@ "Set": 4, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -256,7 +256,7 @@ "Set": 4, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -264,7 +264,7 @@ "Set": 4, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -272,7 +272,7 @@ "Set": 4, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -280,7 +280,7 @@ "Set": 4, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -288,7 +288,7 @@ "Set": 4, "Binding": 7, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -296,7 +296,7 @@ "Set": 4, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -304,7 +304,7 @@ "Set": 4, "Binding": 9, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -312,7 +312,7 @@ "Set": 4, "Binding": 10, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -320,7 +320,7 @@ "Set": 5, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -328,7 +328,7 @@ "Set": 5, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -336,7 +336,7 @@ "Set": 5, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -344,7 +344,7 @@ "Set": 5, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -352,7 +352,7 @@ "Set": 5, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -360,7 +360,7 @@ "Set": 5, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -368,7 +368,7 @@ "Set": 5, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -376,7 +376,7 @@ "Set": 5, "Binding": 7, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -384,7 +384,7 @@ "Set": 5, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -392,7 +392,7 @@ "Set": 5, "Binding": 9, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -400,7 +400,7 @@ "Set": 5, "Binding": 10, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -408,7 +408,7 @@ "Set": 6, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -416,7 +416,7 @@ "Set": 6, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -424,7 +424,7 @@ "Set": 6, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -432,7 +432,7 @@ "Set": 6, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -440,7 +440,7 @@ "Set": 6, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -448,7 +448,7 @@ "Set": 6, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -456,7 +456,7 @@ "Set": 6, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -464,7 +464,7 @@ "Set": 6, "Binding": 7, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -472,7 +472,7 @@ "Set": 6, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -480,7 +480,7 @@ "Set": 6, "Binding": 9, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -488,7 +488,7 @@ "Set": 6, "Binding": 10, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -496,7 +496,7 @@ "Set": 7, "Binding": 0, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -504,7 +504,7 @@ "Set": 7, "Binding": 1, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -512,7 +512,7 @@ "Set": 7, "Binding": 2, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -520,7 +520,7 @@ "Set": 7, "Binding": 3, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -528,7 +528,7 @@ "Set": 7, "Binding": 4, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -536,7 +536,7 @@ "Set": 7, "Binding": 5, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -544,7 +544,7 @@ "Set": 7, "Binding": 6, "DescriptorType": "CombinedImageSampler", - "Type": "CombinedImageSampler>", + "Type": "CombinedImageSampler>", "Count": 1 }, { @@ -568,7 +568,7 @@ "Set": 9, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage1D", + "Type": "SampledImage1D", "Count": 1 }, { @@ -576,7 +576,7 @@ "Set": 9, "Binding": 1, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 1 }, { @@ -584,7 +584,7 @@ "Set": 9, "Binding": 2, "DescriptorType": "SampledImage", - "Type": "SampledImage3D", + "Type": "SampledImage3D", "Count": 1 }, { @@ -592,7 +592,7 @@ "Set": 9, "Binding": 3, "DescriptorType": "SampledImage", - "Type": "SampledImageCube", + "Type": "SampledImageCube", "Count": 1 }, { @@ -600,7 +600,7 @@ "Set": 9, "Binding": 4, "DescriptorType": "SampledImage", - "Type": "SampledImageRect", + "Type": "SampledImageRect", "Count": 1 }, { @@ -608,7 +608,7 @@ "Set": 9, "Binding": 5, "DescriptorType": "SampledImage", - "Type": "SampledImage1DArray", + "Type": "SampledImage1DArray", "Count": 1 }, { @@ -616,7 +616,7 @@ "Set": 9, "Binding": 6, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArray", + "Type": "SampledImage2DArray", "Count": 1 }, { @@ -624,7 +624,7 @@ "Set": 9, "Binding": 7, "DescriptorType": "SampledImage", - "Type": "SampledImageCubeArray", + "Type": "SampledImageCubeArray", "Count": 1 }, { @@ -632,7 +632,7 @@ "Set": 9, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "SampledImageBuffer", + "Type": "SampledImageBuffer", "Count": 1 }, { @@ -640,7 +640,7 @@ "Set": 9, "Binding": 9, "DescriptorType": "SampledImage", - "Type": "SampledImage2DMS", + "Type": "SampledImage2DMS", "Count": 1 }, { @@ -648,7 +648,7 @@ "Set": 9, "Binding": 10, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArrayMS", + "Type": "SampledImage2DArrayMS", "Count": 1 }, { @@ -656,7 +656,7 @@ "Set": 10, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage1D", + "Type": "SampledImage1D", "Count": 1 }, { @@ -664,7 +664,7 @@ "Set": 10, "Binding": 1, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 1 }, { @@ -672,7 +672,7 @@ "Set": 10, "Binding": 2, "DescriptorType": "SampledImage", - "Type": "SampledImage3D", + "Type": "SampledImage3D", "Count": 1 }, { @@ -680,7 +680,7 @@ "Set": 10, "Binding": 3, "DescriptorType": "SampledImage", - "Type": "SampledImageCube", + "Type": "SampledImageCube", "Count": 1 }, { @@ -688,7 +688,7 @@ "Set": 10, "Binding": 4, "DescriptorType": "SampledImage", - "Type": "SampledImageRect", + "Type": "SampledImageRect", "Count": 1 }, { @@ -696,7 +696,7 @@ "Set": 10, "Binding": 5, "DescriptorType": "SampledImage", - "Type": "SampledImage1DArray", + "Type": "SampledImage1DArray", "Count": 1 }, { @@ -704,7 +704,7 @@ "Set": 10, "Binding": 6, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArray", + "Type": "SampledImage2DArray", "Count": 1 }, { @@ -712,7 +712,7 @@ "Set": 10, "Binding": 7, "DescriptorType": "SampledImage", - "Type": "SampledImageCubeArray", + "Type": "SampledImageCubeArray", "Count": 1 }, { @@ -720,7 +720,7 @@ "Set": 10, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "SampledImageBuffer", + "Type": "SampledImageBuffer", "Count": 1 }, { @@ -728,7 +728,7 @@ "Set": 10, "Binding": 9, "DescriptorType": "SampledImage", - "Type": "SampledImage2DMS", + "Type": "SampledImage2DMS", "Count": 1 }, { @@ -736,7 +736,7 @@ "Set": 10, "Binding": 10, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArrayMS", + "Type": "SampledImage2DArrayMS", "Count": 1 }, { @@ -744,7 +744,7 @@ "Set": 11, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage1D", + "Type": "SampledImage1D", "Count": 1 }, { @@ -752,7 +752,7 @@ "Set": 11, "Binding": 1, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 1 }, { @@ -760,7 +760,7 @@ "Set": 11, "Binding": 2, "DescriptorType": "SampledImage", - "Type": "SampledImage3D", + "Type": "SampledImage3D", "Count": 1 }, { @@ -768,7 +768,7 @@ "Set": 11, "Binding": 3, "DescriptorType": "SampledImage", - "Type": "SampledImageCube", + "Type": "SampledImageCube", "Count": 1 }, { @@ -776,7 +776,7 @@ "Set": 11, "Binding": 4, "DescriptorType": "SampledImage", - "Type": "SampledImageRect", + "Type": "SampledImageRect", "Count": 1 }, { @@ -784,7 +784,7 @@ "Set": 11, "Binding": 5, "DescriptorType": "SampledImage", - "Type": "SampledImage1DArray", + "Type": "SampledImage1DArray", "Count": 1 }, { @@ -792,7 +792,7 @@ "Set": 11, "Binding": 6, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArray", + "Type": "SampledImage2DArray", "Count": 1 }, { @@ -800,7 +800,7 @@ "Set": 11, "Binding": 7, "DescriptorType": "SampledImage", - "Type": "SampledImageCubeArray", + "Type": "SampledImageCubeArray", "Count": 1 }, { @@ -808,7 +808,7 @@ "Set": 11, "Binding": 8, "DescriptorType": "UniformTexelBuffer", - "Type": "SampledImageBuffer", + "Type": "SampledImageBuffer", "Count": 1 }, { @@ -816,7 +816,7 @@ "Set": 11, "Binding": 9, "DescriptorType": "SampledImage", - "Type": "SampledImage2DMS", + "Type": "SampledImage2DMS", "Count": 1 }, { @@ -824,7 +824,7 @@ "Set": 11, "Binding": 10, "DescriptorType": "SampledImage", - "Type": "SampledImage2DArrayMS", + "Type": "SampledImage2DArrayMS", "Count": 1 }, { diff --git a/assets/moon.spv.json b/assets/moon.spv.json index 0eb0c45..199a654 100644 --- a/assets/moon.spv.json +++ b/assets/moon.spv.json @@ -48,7 +48,7 @@ "Set": 0, "Binding": 0, "DescriptorType": "SampledImage", - "Type": "SampledImage2D", + "Type": "SampledImage2D", "Count": 0 }, { diff --git a/spirq/examples/gallery/main.log b/spirq/examples/gallery/main.log index 3f4f76a..c5782eb 100644 --- a/spirq/examples/gallery/main.log +++ b/spirq/examples/gallery/main.log @@ -503,6 +503,9 @@ is_signed: true, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -524,6 +527,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -545,6 +551,9 @@ is_signed: true, }, dim: Dim3D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -566,6 +575,9 @@ is_signed: true, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -587,6 +599,9 @@ is_signed: true, }, dim: DimRect, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -608,6 +623,9 @@ is_signed: true, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -629,6 +647,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -650,6 +671,9 @@ is_signed: true, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -671,6 +695,9 @@ is_signed: true, }, dim: DimBuffer, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -692,6 +719,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: true, }, @@ -713,6 +743,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: true, }, @@ -734,6 +767,9 @@ is_signed: false, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -755,6 +791,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -776,6 +815,9 @@ is_signed: false, }, dim: Dim3D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -797,6 +839,9 @@ is_signed: false, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -818,6 +863,9 @@ is_signed: false, }, dim: DimRect, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -839,6 +887,9 @@ is_signed: false, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -860,6 +911,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -881,6 +935,9 @@ is_signed: false, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -902,6 +959,9 @@ is_signed: false, }, dim: DimBuffer, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -923,6 +983,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: true, }, @@ -944,6 +1007,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: true, }, @@ -964,6 +1030,9 @@ bits: 32, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -984,6 +1053,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1004,6 +1076,9 @@ bits: 32, }, dim: Dim3D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1024,6 +1099,9 @@ bits: 32, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1044,6 +1122,9 @@ bits: 32, }, dim: DimRect, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1064,6 +1145,9 @@ bits: 32, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1084,6 +1168,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1104,6 +1191,9 @@ bits: 32, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1124,6 +1214,9 @@ bits: 32, }, dim: DimBuffer, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1144,6 +1237,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: true, }, @@ -1164,6 +1260,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: true, }, @@ -1184,6 +1283,9 @@ bits: 32, }, dim: Dim1D, + is_depth: Some( + true, + ), is_array: false, is_multisampled: false, }, @@ -1204,6 +1306,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + true, + ), is_array: false, is_multisampled: false, }, @@ -1224,6 +1329,9 @@ bits: 32, }, dim: DimCube, + is_depth: Some( + true, + ), is_array: false, is_multisampled: false, }, @@ -1244,6 +1352,9 @@ bits: 32, }, dim: DimRect, + is_depth: Some( + true, + ), is_array: false, is_multisampled: false, }, @@ -1264,6 +1375,9 @@ bits: 32, }, dim: Dim1D, + is_depth: Some( + true, + ), is_array: true, is_multisampled: false, }, @@ -1284,6 +1398,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + true, + ), is_array: true, is_multisampled: false, }, @@ -1304,6 +1421,9 @@ bits: 32, }, dim: DimCube, + is_depth: Some( + true, + ), is_array: true, is_multisampled: false, }, @@ -1346,6 +1466,9 @@ is_signed: true, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1365,6 +1488,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1384,6 +1510,9 @@ is_signed: true, }, dim: Dim3D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1403,6 +1532,9 @@ is_signed: true, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1422,6 +1554,9 @@ is_signed: true, }, dim: DimRect, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1441,6 +1576,9 @@ is_signed: true, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1460,6 +1598,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1479,6 +1620,9 @@ is_signed: true, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1498,6 +1642,9 @@ is_signed: true, }, dim: DimBuffer, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1517,6 +1664,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: true, }, @@ -1536,6 +1686,9 @@ is_signed: true, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: true, }, @@ -1555,6 +1708,9 @@ is_signed: false, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1574,6 +1730,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1593,6 +1752,9 @@ is_signed: false, }, dim: Dim3D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1612,6 +1774,9 @@ is_signed: false, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1631,6 +1796,9 @@ is_signed: false, }, dim: DimRect, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1650,6 +1818,9 @@ is_signed: false, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1669,6 +1840,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1688,6 +1862,9 @@ is_signed: false, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1707,6 +1884,9 @@ is_signed: false, }, dim: DimBuffer, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1726,6 +1906,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: true, }, @@ -1745,6 +1928,9 @@ is_signed: false, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: true, }, @@ -1763,6 +1949,9 @@ bits: 32, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1781,6 +1970,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1799,6 +1991,9 @@ bits: 32, }, dim: Dim3D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1817,6 +2012,9 @@ bits: 32, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1835,6 +2033,9 @@ bits: 32, }, dim: DimRect, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1853,6 +2054,9 @@ bits: 32, }, dim: Dim1D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1871,6 +2075,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1889,6 +2096,9 @@ bits: 32, }, dim: DimCube, + is_depth: Some( + false, + ), is_array: true, is_multisampled: false, }, @@ -1907,6 +2117,9 @@ bits: 32, }, dim: DimBuffer, + is_depth: Some( + false, + ), is_array: false, is_multisampled: false, }, @@ -1925,6 +2138,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: false, is_multisampled: true, }, @@ -1943,6 +2159,9 @@ bits: 32, }, dim: Dim2D, + is_depth: Some( + false, + ), is_array: true, is_multisampled: true, }, @@ -2753,754 +2972,15 @@ ), ty: Array( ArrayType { - element_ty: Struct( - StructType { - name: Some( - "Data", - ), - members: [ - StructMember { - name: Some( - "i0", - ), - offset: Some( - 0, - ), - ty: Scalar( - Integer { - bits: 32, - is_signed: true, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "i1", - ), - offset: Some( - 8, - ), - ty: Vector( - VectorType { - scalar_ty: Integer { - bits: 32, - is_signed: true, - }, - nscalar: 2, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "i2", - ), - offset: Some( - 16, - ), - ty: Vector( - VectorType { - scalar_ty: Integer { - bits: 32, - is_signed: true, - }, - nscalar: 3, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "i3", - ), - offset: Some( - 32, - ), - ty: Vector( - VectorType { - scalar_ty: Integer { - bits: 32, - is_signed: true, - }, - nscalar: 4, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "u0", - ), - offset: Some( - 48, - ), - ty: Scalar( - Integer { - bits: 32, - is_signed: false, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "u1", - ), - offset: Some( - 56, - ), - ty: Vector( - VectorType { - scalar_ty: Integer { - bits: 32, - is_signed: false, - }, - nscalar: 2, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "u2", - ), - offset: Some( - 64, - ), - ty: Vector( - VectorType { - scalar_ty: Integer { - bits: 32, - is_signed: false, - }, - nscalar: 3, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "u3", - ), - offset: Some( - 80, - ), - ty: Vector( - VectorType { - scalar_ty: Integer { - bits: 32, - is_signed: false, - }, - nscalar: 4, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "f0", - ), - offset: Some( - 96, - ), - ty: Scalar( - Float { - bits: 32, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "f1", - ), - offset: Some( - 104, - ), - ty: Vector( - VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 2, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "f2", - ), - offset: Some( - 112, - ), - ty: Vector( - VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 3, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "f3", - ), - offset: Some( - 128, - ), - ty: Vector( - VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 4, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat0", - ), - offset: Some( - 144, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 2, - }, - nvector: 2, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 8, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat1", - ), - offset: Some( - 160, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 3, - }, - nvector: 2, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat2", - ), - offset: Some( - 192, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 4, - }, - nvector: 2, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat3", - ), - offset: Some( - 224, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 2, - }, - nvector: 3, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 8, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat4", - ), - offset: Some( - 256, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 3, - }, - nvector: 3, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat5", - ), - offset: Some( - 304, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 4, - }, - nvector: 3, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat6", - ), - offset: Some( - 352, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 2, - }, - nvector: 4, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 8, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat7", - ), - offset: Some( - 384, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 3, - }, - nvector: 4, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "fMat8", - ), - offset: Some( - 448, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 32, - }, - nscalar: 4, - }, - nvector: 4, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "d0", - ), - offset: Some( - 512, - ), - ty: Scalar( - Float { - bits: 64, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "d1", - ), - offset: Some( - 528, - ), - ty: Vector( - VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 2, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "d2", - ), - offset: Some( - 544, - ), - ty: Vector( - VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 3, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "d3", - ), - offset: Some( - 576, - ), - ty: Vector( - VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 4, - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat0", - ), - offset: Some( - 608, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 2, - }, - nvector: 2, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat1", - ), - offset: Some( - 640, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 3, - }, - nvector: 2, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 32, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat2", - ), - offset: Some( - 704, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 4, - }, - nvector: 2, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 32, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat3", - ), - offset: Some( - 768, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 2, - }, - nvector: 3, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat4", - ), - offset: Some( - 832, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 3, - }, - nvector: 3, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 32, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat5", - ), - offset: Some( - 928, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 4, - }, - nvector: 3, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 32, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat6", - ), - offset: Some( - 1024, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 2, - }, - nvector: 4, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 16, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat7", - ), - offset: Some( - 1088, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 3, - }, - nvector: 4, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 32, - ), - }, - ), - access_ty: ReadWrite, - }, - StructMember { - name: Some( - "dMat8", - ), - offset: Some( - 1216, - ), - ty: Matrix( - MatrixType { - vector_ty: VectorType { - scalar_ty: Float { - bits: 64, - }, - nscalar: 4, - }, - nvector: 4, - axis_order: Some( - ColumnMajor, - ), - stride: Some( - 32, - ), - }, - ), - access_ty: ReadWrite, - }, - ], + element_ty: Scalar( + Integer { + bits: 32, + is_signed: true, }, ), nelement: None, stride: Some( - 1344, + 4, ), }, ), From 035a0a92d34036d2f478fa7d8b7da80eda06f0f6 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Sun, 24 Dec 2023 17:07:16 +0800 Subject: [PATCH 37/50] Fixed test --- assets/gallery.frag.spv | Bin 17244 -> 17244 bytes assets/gallery.frag.spvasm | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/gallery.frag.spv b/assets/gallery.frag.spv index 0ac05da5b7077d03d592240f99ec0c8fc5d72e69..d875e12cf0ed8ac7311523d811f871e9ea61f70e 100644 GIT binary patch literal 17244 zcmb7~3B1--naAJv-uI%SAgG|A&}9+D1qB2lHLmOgDytHP*UMe-s%&>bz|aedrsjre zX=!O`X=!O`X=!O`WBXJy%}i6-HfxJ5GtnB-%n)Rn!zinu#G_W+Fv|{On&5IWYOnkOnwQm{_e$hw%^6vb4J8}ELW^ltWsR0Sgly2xLC1PafzZuu};yh=umVjE>~<& zurXT{U5Z}CRt0;!L$OnFjbfK#w_=at2E|Q^n-#YzZd2T;*sHi(agX9&#eItV6%QyL zR6L}3Sn-JBQN?45#}!W~o>V-gcv|s{;#tLWisuzCC|*>&q!?o7m-APz|J14fYMFC7 zK-WU^ywxlBxlHnWPghH8=f?Hu2f4ocvX-{?uIBb_o3HF_?d)l8>FVscY(slbXKQoM z_Ra0x%^g>6YU!Cg{lIIcPC4+J>1P~JP3J~tc3|sKjb?VhHJaH0*KmoK8nhys--8Xx zaNgqmj0RQbq7CaOw-q&a?tN-!_jV*aRJb?Hhi3xV=fm>>?DH93)z^;Av!ke~zn7fY<=@RKgCX{F!SRbl05LO&aWZ8 zS5iK#kN1onuev_oJJnpZzLMTW9btXEmlC%1Epu$^TkbflkN20=RM)r4bJ_ZM$C=h< zQLK;mUdm_dTjTk#KHiPyQC;8Kn5(X@A-zA_x^02daQ<7=7dh^}BDb!ZD;CC{^T2Uk zamN*N?WpE!i$l+Q+4a6S^1Q2yd~I>u8@#`}b?c~0^Wt3&UZI!TrmM(R(!0HLW&1XN zZt$!GGjsS}!~WdZYS>Os^4(soDOSNA?691#fZWciu9!V@=lg-<)n;DIb(iJib7Ob4 zzV_VM6LPgZsig0a-mosdNx;4?zE8luF1}U3ab0}76g9PV@hw9xu4`{qS6kQJ!LK&2 zhV=bIeO%YQ)%x1H?hCnEeII7dcZp_gD2N; z9as;1=j*|G*gLKW_lEigaHt;u4)uIf^oDxADLO*^A>dFy5FG0HzUWBx4Qc*|fzNB{ zk%i_|ERg+e%7&W1@Lpiy@7w;vGM$_=?MIbjuT&>e($ujww4yii|c%> zg8RcU>!dBv8sRxla9rb23r1Vi)+gSzT>nuEM$3JNFW9x*8&L~J%RPw}>{{-Vs0E{C zo@l|Y<$j4;Fk0?qv|!hAA4M$~E%!NEuxq)Oq85yn{Xh$LE%zAOy2Mq|-vH3k(89Zx z`z&g~Xv+$;VApd0MJ*U@ah&?}HwM>oA4V-0t?w_`wcMjo3r6ev3wAB{Yt(|#`u>7l z%Y7WRV6?u!VApalM=cnw?=RT3+~a7AwN%pIP|(uYGkE5~^~-%8wP3X6#MdX@wT;R} zEf{T`0$;Fe(M2s|w7$P!*N)4yV6?u!VAqb%v|zNpzhKu+$h2UzzQ17Co{(w5XnlXd zuAP`^!DzXE*$1#|`E3^W0gRUW7cJPe{0%E=!Dx9eq6NG5RE^OVdsO_cLrdel^1Ckb zVED4}dL`|{gW>Cp=RFeZ!SKcTtEAt6k)LY3&xdzOYMHvr<_xY~Qcrd*0@0yGU!~6d7n>nrz4Db89HsitYzQ30k@5ckf)7ZZj z_4qpvhA%7N*Qt*@7{1Q<_KXL^`~G%hJQ&{hw=?6x@V>v7XFM3*_jiNwzF%N?8uQ<% zp7}cuhA%7Nx2T8r{RGGQu8arA`reEO!~6bh&3G`p@6Yy(2gCdR?8ta9yzkG>j0eN} z{#=vsV0b^@yD}aO@B6ho>_P=i8qB0>jh552$DVoCm{~74Q$Lk31OO_xGWU2gCdRKAiDjc;DYgG9C=?`}=6d zgW-LDAIo?!yzlSh84rf{{e2?i!SKGnPi8zAp8Z{@S-z~EHm>NZxw7Rrj_cSnbo|Eg z9Q#DBG33}Aa(rvKj{P9V_l@V+19D9v$GXWa4LRmO?$VHBedI0+Io3pObI5UBkn2mi z;_pL;Y0P|l9$++gWI5(CB;|^_K^n(8Fm)eKn%duK^18uU9hkarhB|V2-Qmi`cQyi z75IbEJAOgqs0X8Gf6#-`JAP5)s0X9xyrKuAcl?sZ=y`6!gVEED)U3a*evD?rd>C&V zT9?jGqqKi3%()`YGF)f)DAj&T<6+AGo%%*aSusLyV$MCeyiq$$f%o4Vi571#Yoy`9 zeDT0DHavza@c2g~(Bc8++NI&aGZ+tQVgvKc!{eWfK#K>M_b&|(=8K0npHE!N_l-o0 z2blLY4G*5BczCV%(c=e*)zIPrK9qzS9z5sp;5@|^J$_^aT0FqqH#9s(tB)T2&Ev;O zT}oO!z}zb|JjSTUgX=4{IFFwhfff%i?_V0%%fF~^1gPP8yn1qZ!;?94p8nlPw0MGf zH`DMqQ9T}I5~1P2GZc^iusm8kz`Sp1cyQm~K}~Gn#uSy(FN{Eo2bgy+4Ub9c<63+^ zaV@`0>Qd6;0p^;f;W1f#TuXl*zfS5>(&7Q;nx^4#hI%~uyIy=xe}h;JEgs+zB-HRY zQ+@R4Zyx`Z)TN}w13c1lc)Za(8Z75s+>igZBw9Scyq{^qwSxau->AUvP3pmU!;krK zp8wBCwD^HXSq_hLHO2#dY(nlQ=dJE6XGsYrCJ>tG|u;RildV;cM0svbYDCr@*XUz;#G{0=dK9Dd-_G^XLVUOj&7 zOKj1P->c~G8)yVM{J^JMA%0hAj9U?@y4B<7&3(LQ|9V8C!*7rgm^T#m8I+XdSP_<4K;!se&Dk-rr~#^`sjz;0}bnEGxqAE{*Zq z-~IMZ@#ydyW`5-G12<_*!|z?{@$>72Jk83|dfzRK4!_|>ki!o=TVoo2?@^E6{_eN; zibsdv(dI`EKkyulY52WQJ$~LyzR&#LFA^Po$C!W|e&Bf;)A0L%di-)9$DEH3ibsdv z2qVbh2cEAn4Zjbm$ItiAeZ0r-!{X85H_`}l_<has({q|Au=m^T#m8J9haba}$9cKhN{J@Jfrs4Mq_0bQx2O8GDG#9Dd;Qt(f_JM&tO-H7d=KG4uPZdUW``!TiYK2fjdK z8h)QskKg|8x6g}5hhL-lk;4zXOk)~;Ur>*qUoYfoR+i@XMPYRKjWL28e&FRA)A0L} zdi*LRLW_QXqdYqN#u`BmKk!Pc!|y8^q; z$M2is(cw4V1my4oU!*Y&zi+FL``4e}ccejw-|;3OhaY&g#x(rCs~*4o-EaRO9vyxY z%#R#?;58c4@cW+nxL)#D5IsCvK8q@ImAN6tn+{b(TelHC={3aPe4nJ_G#x(r? zUwzy^_wgRTKS+ZPztfB$hadQIjcFtG)cdn~bf=pRj1Ig3k(%R;1x)(Mrf)VLye05c zjBhm_+!gq##;-RX+#C2ajK9Ko@YcXjGk%lt;O&8*ZhW`#;2nWK)A*~52k#904CAjh z9(+yUXBvO4@!(y7f1~l&84una__K_^(RlElz@KgWEyjay2>dz5-)=nkrog|+_`8e; z-yHZ^#=pyW@U4MwGX6crgKrD`xyHZGc<`NppKbgHj0f)x{2b#yWIXupz|S@QBgTX8 z3H&_cKW04m-oVc{{u9Q7?+g3_<3D9Q`2N5zH2yQjgC7X|BI7@2Jov%DzuEXN7!Q6Z z@QaQAlJVe&1HZ)huNV)0B=F}M{|)28j|TpHW} zUuOIdjR!wz{Ly-TEEnc?8{bvn6^82#uQbea8-A5A-<__%(6H+-GVJ=*!aN6E{}#ip zUt<{kG4j7ym>Trpw`xp{6pF*S}a*O(f|S7?mh=X#~a=pAp+7`@|- z8l(5)ZPFOM<1HGa2ancY2wzsux#pa6o;kOiOU^0hk#onnVt?2Z_JQ-kIbh$}Yxb8t zWgpo)_KQ7X9vqwFv2NDN`dAa|VD8M9IWn)4H7kzYr7`n6PXGI5^~{mnXsz-Ujmf#T zM|u4>X?rz*C)cRjtJJfPINuc!@LsaPC1#^thUY8d^NS&laiVu~nG;+TT2Ong?1uz|RGb z?frOA66bLZ2{p8MfS)f?X&!GA<{H`GJo?N7Egs+(g2%P}cu*4Ov5SNnT0Fon7OB$r zkE$!}7H03SQ%?h<1HV+H(!XzAFMO~tGOi==9tD_x|GGhgA%O?qXgqq(+uIGJze(e! zs=guNn~hgGdEO$-F==>!-(ea&Zq=A$(%`|j1^#x8n-UA(Py*j!JZYXwcM9V{J>$I! z{_zOR`MC>R>YGJ9_vbqkCinWR>B@bbp*5Z-zt`?JsNXrXlKw4upvIh!KWe9DDEh%F4>h%*x)^%F5o?%F4{j%F4{j%F25F`>b{EV*f^dKUOXFe%ABs=kC4F zxo6Hfw;Ib+b}KbClt!0!FKurqr5IN#m*~>&VeKeuM_W7I+5@efZ0%HQ53%+zYY(^f z2y2hD_9$zoTYI#%$5^{zT&Xmw)LdG;@cfRm<}d2#@7&mN@la3yM)9LnXP)yGEM72u zV6c1ovBxp2G^W%@leoQ0L#2xP{kvcHz+StZc<*UyjnR{$Cu-| zo3c^=DXaaK>J^<2^A>cRvEbE$eS;mH z{e6QgR`(3{b#)AGT-P(u(YtDG=irQ4yFO-S>#mQPb?h#U>086hc5OWxqnYjU7|m># z$IRA{Qj=B`zk^Mx@I8#*XEb9}>pOGx@)_O57`~(6R>OQ>!7~$XO5fc=e_DUPID9A8 z#?)(kx6#cRTGpd((p5tZC7;iCAKmFgy$N$27!vmROf&5B;ramY^Wj=i=Xb?p(c23*$KSN}sS6243k{3&VSjV_O(Cj=zmb3*+L$f1H%f>Dp`B9qOB0 zkFPO!Z}z$^klGfnwYH}P;=480YU3;Ex;_-vw@tc)ZGGDv+xl*D9M*TU*IL_a>$}Bk z+4^qvdh3qszRl~|`fm4nSl=C93+uZx*24PkQoT2XQRCZJ)Sj%>iiL4b zJYB2V!jiT*{S9_c`zX0Kr@zbY8|%;2eCmtiyTRY@0ey8ur+M+W9K2Y6)Ye`?P1j!4 z`p)gy;MWcQ&V!jbJb&}Se%;{jKiCdW^5uS@7*oG)aDPC}4-fmo{X(HDX3v_qe{jG0 znwru*1@(B{;2xtGU%zf}&*8QD_)5AD8A_jDtb=<{4eyA8^c6pH+;huZ#OGYH?lMhZVZ|y0|ZMzxuqI(!Cn>xGwJ9it+VzaWCh!`uIwz zTlMzN!A{QAW}SCnqECM~9aHL?QO9L)YaKU&^+(n972%;Uz6l)0H-p1??i+`~c#RCEg_6kfC+Ddvh8899_&nbPU4GylB2Fx={!ul$Jd43rRJkK%-8_#o1 zZ{T^xNjUM1>3OHKtE)6mUYtLZm6FtOi~7Votr4E%gqHIqYQboWv5kp$E$2tng3{^b0)Pm9ST}BIbZB_lK1*7GAjuz}%?&qTx zjFxKvTCi)m*GF4UTqV5&Kue&7ckMLwqZW*|L5UXZTAmT27L2y|oW}Hy!L?jNq85zS z_ZRG1zCTe5M(g_vb}iqRs0E|-{RO+0=a8rcqxJm-yO!sZs0E|-{RO+WO?|Y*S}G+l zT7o@mQ_FRQ^LLKgs0E{KNPJ`BT{}0^g3*>u3wAB7_ILw*tNV%ioRg9zQ17CF3GfDwETTzf5EQh*(~~k(ek$sE!ede zsvosrwESH}3wG@?_0bl4R6N(AB{;6VY9kMZZ!msk#)IL@#;?hEFub2r{TUC2_xY^P zcrbi%oGR(LFwXB%WwA zVED4}_hmd7-uL(Zj0eN}{yvcLV0ho(2QwZF@AG{qY za~ThY_x){XDCXz;1%@Y>KhNgO-+3^+n#5O(_x%LJ6O8A%o$=0t;ngIb=lIBj;eCI2 zu8%wz-uH)R{K$jheSdh~k31OO_lIZy$b;d1e|QfNc`&>mZ+>HlJQ&{hi+2N&2gCb* z@SY&@V0b_O_}v0NVt9i6<^4hA!SHGl&-;YPgW=1@S2G?A@B7QUhBzJ!@B2G7v=IeSdl95qU7Y?=SB^A`gc5{pDRqvNXFM3*_qRRc!SL+we9f|3n3z&DwHjq=e2(kNRvQ~?>=U|bsIfQHc((Ad z><6{kp~fCiYYR2jO>JSQF$Zc(Lyh%OTM=rkiQ2kQOYrAD%g6CdAIE_iw=j&OmXF&f8wY0Ga2Q7|AGdEd4$QcF!Z>RAINl$`d4d_om)h4y ztv;?eHv5~dE$GHuZDFYK&H=xrp*F#4!>LxB4?Ls9d4L)Bo-mGDeICWQiP<=CT6Y*n zjd4}wd|hq$p7QQ1ejYfjyRp7*YWXi;JHJW?Y*tD1Kb2<@2nn7RP}ZHyp-M%RjG0wKxvUIEwyx)O;L&Z+dkc zxNZ%b#^3#=ajNtDN==6{{r%xx;AHi=#xNe-qCNp$C5#`}Og_`!4@N&~?#KU@0Y9!i zj0d-oA6-t#J-v}^KQ{>m=FC89-8s={kct5H6o3y{`qt#ZGvetWyJ<_qKmIwY^lknzv5}YS^gE=My9?TaHJY(R& zH4G1~=>%Flz+A5hJh%qq!I&6eu6cNHy(Q4%0p?mt;K6+3T6{inEzE~Niw78g0uQdG zaV;ZxaNQ)(;sNHGNZ`SB4iAn~j5rUjX#`q4z+A5gJh%o$kCEoV^@c!;2e_&v@Muws z2j^FeIFHFjpv40`#cG@{Q`N5;#`6&MspWwu^WZogY9v}b!G~E5kHgi+qrqz4;8Coh zQhJdU(c%G~W;HyHP#+J*!~j=QR!T=2fff(&QC7oay83Y~KA*UjqfL(%5AZQo!()c} zaV;Zxw3;3*9^jc)!{b=>@fhiR@jX4x^l0$_&$1dG$EzPbMw$orw**=|z$Z{p;PGO$ zc#L$u_&iQTtU!wg_#_I7@mj&jYO6~8PEiZagZ*WGoGYgqi55R_o7M0*O?^Dj$H0Tc z<8&j?;sKsxH9XqY#{+!~Fnf;28AhPR13cGic+68DkCBd1MRh#pn;tD5;4`g;$4k`5 z1APqU!JgxBmJw+2057l_9%rkMhev~T@Su;!ORa_$5AZow!(*ZPc=%XvqsPlkj}{N` zBCFxCSpB#kBYB)_dbD_e&$AjH=c|v$Naq`VtmWmVM~eq|iPi9Uh5B(VP>hXhc_l>! zT0FoPP*C9UDz(vr@wvyV5i8K*0ltue0*?;0qZ8WkAAE=db>=Kpi;i`5swI{x@dGbY z68Lqg#m~o6CmiF~EsPGo9!Lc>{J^~w6!r)8fLvWsE7`~H<^GMe&B6Z!|z7*@!Q$=?akuR;rAA`1U3A?+bJmUd#hUf z{CuHK_7ID1?Z9?^GQfe(y33HT=LgTMfT=tB;?D z`*_Rz-Xjtne(yCQHT=N0SPj4TsgIwJ&s+T7FCHC!A5cqB!w-Bb1qFT|REwYQ-$;HR z5|0kQ5341p;Rn8rf&#yfsKu{|LJ0R|ejimG9ey7(4K@70w_6RrkE@TLkB6e~7{5;l zqr>l$Y6)uif$yN8!0%IPqn~?4zfVhp4!_T+C8*&CzLSCizt5^YIiVf@iGH6Gg$}>Z zn~WNM;Jd7b-xt)!&&L~8!>speqU9KpPw((iH4#{*T1i+j}E`DTb&wy;QOqG-#669uVOWCqTm0hhz`I1H32pJ z!1r4Xzi+CKpNIQ+%l>^!Bs%=QZ9;1Jfgi9Me&10aKOdjB_l~Y6)uifghou!0%^jqn~?4zelA(hu_cD5|1kJ13#uD@cV^Y{0R4m zedhN|70}`LD@X-3{J@V>P~i7#wLZV+^ZSi7=-qFu%hS@H4IdWnp+Qzrz#o$65cY!th{zhbQ2VxBfST;lZ;5e}eVDX*`(U z;R(i{X#MX9Gak(E@C5wH*8jdRJouErpKARd7!Pg>{At$zvGHJjhbQo#WBs2A;}34P z+5y66s6Sd9_f_Dzh8qpfGt6}xe!lS3pg+^F>tABn^=Aol9d!Q%hFyQQVe}K^|59Pb zpa-9$K4Tp7doW`hzf67f_@Q5kX&X=p-rao(5 zqCS|<2EW3vujQ47-RlBj#`s)cr9NXEzgm69IKEJQ^gh=P_0cN7`bleEg^YN@$)h5Gt$()OtX zPpzu4E7h`()H%<=7g_CKd96~Pwd1>5eK6zJsNGX_YK#M~wHklN*Qw9AW@QXMi@@Vz zX$Z7 zcz`dn8Xm7vpL1kq^SIpfXz>7VvKk&&sGoa4$9W8!9xWc=E3Nj^{mP}y>a+J(Sq+R1 ze6`j1ee1RA?=EjjoJZg-N-+F2>WmFM_;tpk=eWJzF#4_Px7GAb314fx%E|K$!h9xy z2l$Pq!Q(ph`Ah;He0|_=P`@p)@J%J~n~bN-b!nS09*n1dqmmz*!0hdt!KL9-8PE6g nEeTV5>eN}PvDbX>2(Bl8SA}P<%g5;+PVFcqYxuWzYPRyf%3W;; diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index 003c261..54bdbed 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -1,7 +1,7 @@ ; SPIR-V -; Version: 1.5 -; Generator: Khronos Glslang Reference Front End; 11 -; Bound: 406 +; Version: 1.4 +; Generator: 0; 0 +; Bound: 388 ; Schema: 0 OpCapability Shader OpCapability Float16 @@ -924,4 +924,4 @@ OpDecorate %acc Binding 0 %5 = OpLabel %10 = OpRayQueryProceedKHR %bool %ray_query OpReturn -OpFunctionEnd +OpFunctionEnd \ No newline at end of file From 7ed56bea42e7e3b358d88f4d22661539bfbcf031 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 08:24:59 +0800 Subject: [PATCH 38/50] Binary diff --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 604cde3..e81af40 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -42,4 +42,4 @@ jobs: cargo install --path spirq-dis spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent - git diff --exit-code + git diff --exit-code --binary From 45f12e3f8ab7920584472c1130c6472e12dbaaef Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 08:28:49 +0800 Subject: [PATCH 39/50] Fix cache --- .github/workflows/rust.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e81af40..fffc66c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,6 +21,12 @@ jobs: - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true + workspaces: | + shader-reflect + spirq-as + spirq-core + spirq-dis + spirq-spvasm - name: Cargo build and test id: cargo_build_and_test run: | From 10cdeac6f817ee7db205a06f595b7a4de93b678d Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 08:41:12 +0800 Subject: [PATCH 40/50] Faster script --- .github/workflows/rust.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fffc66c..830266f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,20 +32,17 @@ jobs: run: | cargo fmt -- --check cargo build --release --verbose - cargo test --verbose - cargo run --example gallery > spirq/examples/gallery/main.log - cargo run --example inspect > spirq/examples/inspect/main.log - cargo run --example walk > spirq/examples/walk/main.log - cargo install --path shader-reflect - shader-reflect assets/gallery.frag -o assets/gallery.frag.json --reference-all-resources - shader-reflect assets/gallery.frag.spv -o assets/gallery.frag.spv.json --reference-all-resources + cargo test --release --verbose + cargo run --release --example gallery > spirq/examples/gallery/main.log + cargo run --release --example inspect > spirq/examples/inspect/main.log + cargo run --release --example walk > spirq/examples/walk/main.log + cargo run --release -p shader-reflect assets/gallery.frag -o assets/gallery.frag.json --reference-all-resources + cargo run --release -p shader-reflect assets/gallery.frag.spv -o assets/gallery.frag.spv.json --reference-all-resources diff assets/gallery.frag.json assets/gallery.frag.spv.json - shader-reflect assets/spirv-spec.frag -o assets/spirv-spec.frag.json - shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json + cargo run --release -p shader-reflect assets/spirv-spec.frag -o assets/spirv-spec.frag.json + cargo run --release -p shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json - shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources - cargo install --path spirq-as - cargo install --path spirq-dis - spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv - spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent + cargo run --release -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources + cargo run --release -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv + cargo run --release -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent git diff --exit-code --binary From 4ead5d06b1ee05ccc3a13fbf1b73b19a2d0a35d1 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 10:27:41 +0800 Subject: [PATCH 41/50] step --- spirq-spvasm/src/asm/assembler.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index 4b21172..1d9c5be 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -636,6 +636,8 @@ impl Assembler { ]; spv.extend(buf); + dbg!(&self.name2id, &self.used_ids); + let out = SpirvBinary::from(spv); Ok(out) } From eec77f1c93ccd2e5cc4d70fa598c1d6f2ee1fecf Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 10:35:00 +0800 Subject: [PATCH 42/50] Don't build release (too slow) --- .github/workflows/rust.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 830266f..02e25c7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,18 +31,18 @@ jobs: id: cargo_build_and_test run: | cargo fmt -- --check - cargo build --release --verbose - cargo test --release --verbose - cargo run --release --example gallery > spirq/examples/gallery/main.log - cargo run --release --example inspect > spirq/examples/inspect/main.log - cargo run --release --example walk > spirq/examples/walk/main.log - cargo run --release -p shader-reflect assets/gallery.frag -o assets/gallery.frag.json --reference-all-resources - cargo run --release -p shader-reflect assets/gallery.frag.spv -o assets/gallery.frag.spv.json --reference-all-resources + cargo build --verbose + cargo test --verbose + cargo run --example gallery > spirq/examples/gallery/main.log + cargo run --example inspect > spirq/examples/inspect/main.log + cargo run --example walk > spirq/examples/walk/main.log + cargo run -p shader-reflect assets/gallery.frag -o assets/gallery.frag.json --reference-all-resources + cargo run -p shader-reflect assets/gallery.frag.spv -o assets/gallery.frag.spv.json --reference-all-resources diff assets/gallery.frag.json assets/gallery.frag.spv.json - cargo run --release -p shader-reflect assets/spirv-spec.frag -o assets/spirv-spec.frag.json - cargo run --release -p shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json + cargo run -p shader-reflect assets/spirv-spec.frag -o assets/spirv-spec.frag.json + cargo run -p shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json - cargo run --release -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources - cargo run --release -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv - cargo run --release -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent + cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources + cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv + cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent git diff --exit-code --binary From ed7e808476ddf14d703ecafe61af576b92f968f5 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 20:54:49 +0800 Subject: [PATCH 43/50] x --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 02e25c7..74b9015 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -44,5 +44,5 @@ jobs: diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv - cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent + cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent --raw-id git diff --exit-code --binary From 8c96abefca07b0e35bef9972e8ce4429c0394950 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 21:06:46 +0800 Subject: [PATCH 44/50] x --- assets/gallery.frag.spvasm | 1690 ++++++++++++++++++------------------ 1 file changed, 845 insertions(+), 845 deletions(-) diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index 54bdbed..3794f68 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -24,8 +24,8 @@ OpCapability RayQueryKHR OpExtension "SPV_KHR_ray_query" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %ray_query %iImg1d %iImg2d %iImg3d %iImg1dArr %iImg2dArr %iImgCube %iImgCubeArr %iImgBuf %uImg1d %uImg2d %uImg3d %uImg1dArr %uImg2dArr %uImgCube %uImgCubeArr %uImgBuf %fImg1D %fImg2D %fImg3D %fImgCube %fImg2DRect %fImg1DArray %fImg2DArray %fImgCubeArray %fImgBuffer %fImg2DMS %fImg2DMSArray %iSamp1D %iSamp2D %iSamp3D %iSampCube %iSamp2DRect %iSamp1DArray %iSamp2DArray %iSampCubeArray %iSampBuffer %iSamp2DMS %iSamp2DMSArray %uSamp1D %uSamp2D %uSamp3D %uSampCube %uSamp2DRect %uSamp1DArray %uSamp2DArray %uSampCubeArray %uSampBuffer %uSamp2DMS %uSamp2DMSArray %fSamp1D %fSamp2D %fSamp3D %fSampCube %fSamp2DRect %fSamp1DArray %fSamp2DArray %fSampCubeArray %fSampBuffer %fSamp2DMS %fSamp2DMSArray %dsSamp1D %dsSamp2D %dsSampCube %dsSamp2DRect %dsSamp1DArray %dsSamp2DArray %dsSampCubeArray %samp %sampShadow %iTex1D %iTex2D %iTex3D %iTexCube %iTex2DRect %iTex1DArray %iTex2DArray %iTexCubeArray %iTexBuffer %iTex2DMS %iTex2DMSArray %uTex1D %uTex2D %uTex3D %uTexCube %uTex2DRect %uTex1DArray %uTex2DArray %uTexCubeArray %uTexBuffer %uTex2DMS %uTex2DMSArray %fTex1D %fTex2D %fTex3D %fTexCube %fTex2DRect %fTex1DArray %fTex2DArray %fTexCubeArray %fTexBuffer %fTex2DMS %fTex2DMSArray %ubo %ssbo %iAttm %iAttmMS %uAttm %uAttmMS %fAttm %fAttmMS %acc -OpExecutionMode %main OriginUpperLeft +OpEntryPoint Fragment %0 "main" %2 %4 %7 %8 %9 %11 %13 %14 %16 %17 %19 %20 %22 %23 %25 %26 %28 %29 %31 %32 %34 %35 %36 %38 %39 %41 %42 %44 %45 %47 %48 %50 %51 %53 %54 %56 %57 %59 %60 %61 %63 %64 %66 %67 %69 %70 %72 %73 %75 %76 %78 %79 %81 %82 %84 %85 %87 %88 %90 %91 %93 %94 %97 %98 %101 %102 %105 %106 %109 %110 %113 %114 %117 %118 %121 %122 %125 %126 %129 %130 %133 %134 %137 %138 %141 %142 %145 %146 %149 %150 %153 %154 %157 %158 %161 %162 %165 %166 %169 %170 %173 %174 %177 %178 %181 %182 %185 %186 %189 %190 %193 %194 +OpExecutionMode %0 OriginUpperLeft OpSource GLSL 460 OpSourceExtension "GL_EXT_ray_query" OpSourceExtension "GL_EXT_ray_tracing" @@ -36,892 +36,892 @@ OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" -OpName %main "main" -OpName %ray_query "ray_query" -OpName %iImg1d "iImg1d" -OpName %iImg2d "iImg2d" -OpName %iImg3d "iImg3d" -OpName %iImg1dArr "iImg1dArr" -OpName %iImg2dArr "iImg2dArr" -OpName %iImgCube "iImgCube" -OpName %iImgCubeArr "iImgCubeArr" -OpName %iImgBuf "iImgBuf" -OpName %uImg1d "uImg1d" -OpName %uImg2d "uImg2d" -OpName %uImg3d "uImg3d" -OpName %uImg1dArr "uImg1dArr" -OpName %uImg2dArr "uImg2dArr" -OpName %uImgCube "uImgCube" -OpName %uImgCubeArr "uImgCubeArr" -OpName %uImgBuf "uImgBuf" -OpName %fImg1D "fImg1D" -OpName %fImg2D "fImg2D" -OpName %fImg3D "fImg3D" -OpName %fImgCube "fImgCube" -OpName %fImg2DRect "fImg2DRect" -OpName %fImg1DArray "fImg1DArray" -OpName %fImg2DArray "fImg2DArray" -OpName %fImgCubeArray "fImgCubeArray" -OpName %fImgBuffer "fImgBuffer" -OpName %fImg2DMS "fImg2DMS" -OpName %fImg2DMSArray "fImg2DMSArray" -OpName %iSamp1D "iSamp1D" -OpName %iSamp2D "iSamp2D" -OpName %iSamp3D "iSamp3D" -OpName %iSampCube "iSampCube" -OpName %iSamp2DRect "iSamp2DRect" -OpName %iSamp1DArray "iSamp1DArray" -OpName %iSamp2DArray "iSamp2DArray" -OpName %iSampCubeArray "iSampCubeArray" -OpName %iSampBuffer "iSampBuffer" -OpName %iSamp2DMS "iSamp2DMS" -OpName %iSamp2DMSArray "iSamp2DMSArray" -OpName %uSamp1D "uSamp1D" -OpName %uSamp2D "uSamp2D" -OpName %uSamp3D "uSamp3D" -OpName %uSampCube "uSampCube" -OpName %uSamp2DRect "uSamp2DRect" -OpName %uSamp1DArray "uSamp1DArray" -OpName %uSamp2DArray "uSamp2DArray" -OpName %uSampCubeArray "uSampCubeArray" -OpName %uSampBuffer "uSampBuffer" -OpName %uSamp2DMS "uSamp2DMS" -OpName %uSamp2DMSArray "uSamp2DMSArray" -OpName %fSamp1D "fSamp1D" -OpName %fSamp2D "fSamp2D" -OpName %fSamp3D "fSamp3D" -OpName %fSampCube "fSampCube" -OpName %fSamp2DRect "fSamp2DRect" -OpName %fSamp1DArray "fSamp1DArray" -OpName %fSamp2DArray "fSamp2DArray" -OpName %fSampCubeArray "fSampCubeArray" -OpName %fSampBuffer "fSampBuffer" -OpName %fSamp2DMS "fSamp2DMS" -OpName %fSamp2DMSArray "fSamp2DMSArray" -OpName %dsSamp1D "dsSamp1D" -OpName %dsSamp2D "dsSamp2D" -OpName %dsSampCube "dsSampCube" -OpName %dsSamp2DRect "dsSamp2DRect" -OpName %dsSamp1DArray "dsSamp1DArray" -OpName %dsSamp2DArray "dsSamp2DArray" -OpName %dsSampCubeArray "dsSampCubeArray" -OpName %samp "samp" -OpName %sampShadow "sampShadow" -OpName %iTex1D "iTex1D" -OpName %iTex2D "iTex2D" -OpName %iTex3D "iTex3D" -OpName %iTexCube "iTexCube" -OpName %iTex2DRect "iTex2DRect" -OpName %iTex1DArray "iTex1DArray" -OpName %iTex2DArray "iTex2DArray" -OpName %iTexCubeArray "iTexCubeArray" -OpName %iTexBuffer "iTexBuffer" -OpName %iTex2DMS "iTex2DMS" -OpName %iTex2DMSArray "iTex2DMSArray" -OpName %uTex1D "uTex1D" -OpName %uTex2D "uTex2D" -OpName %uTex3D "uTex3D" -OpName %uTexCube "uTexCube" -OpName %uTex2DRect "uTex2DRect" -OpName %uTex1DArray "uTex1DArray" -OpName %uTex2DArray "uTex2DArray" -OpName %uTexCubeArray "uTexCubeArray" -OpName %uTexBuffer "uTexBuffer" -OpName %uTex2DMS "uTex2DMS" -OpName %uTex2DMSArray "uTex2DMSArray" -OpName %fTex1D "fTex1D" -OpName %fTex2D "fTex2D" -OpName %fTex3D "fTex3D" -OpName %fTexCube "fTexCube" -OpName %fTex2DRect "fTex2DRect" -OpName %fTex1DArray "fTex1DArray" -OpName %fTex2DArray "fTex2DArray" -OpName %fTexCubeArray "fTexCubeArray" -OpName %fTexBuffer "fTexBuffer" -OpName %fTex2DMS "fTex2DMS" -OpName %fTex2DMSArray "fTex2DMSArray" -OpName %Data "Data" -OpMemberName %Data 0 "i0" -OpMemberName %Data 1 "i1" -OpMemberName %Data 2 "i2" -OpMemberName %Data 3 "i3" -OpMemberName %Data 4 "u0" -OpMemberName %Data 5 "u1" -OpMemberName %Data 6 "u2" -OpMemberName %Data 7 "u3" -OpMemberName %Data 8 "f0" -OpMemberName %Data 9 "f1" -OpMemberName %Data 10 "f2" -OpMemberName %Data 11 "f3" -OpMemberName %Data 12 "fMat0" -OpMemberName %Data 13 "fMat1" -OpMemberName %Data 14 "fMat2" -OpMemberName %Data 15 "fMat3" -OpMemberName %Data 16 "fMat4" -OpMemberName %Data 17 "fMat5" -OpMemberName %Data 18 "fMat6" -OpMemberName %Data 19 "fMat7" -OpMemberName %Data 20 "fMat8" -OpMemberName %Data 21 "d0" -OpMemberName %Data 22 "d1" -OpMemberName %Data 23 "d2" -OpMemberName %Data 24 "d3" -OpMemberName %Data 25 "dMat0" -OpMemberName %Data 26 "dMat1" -OpMemberName %Data 27 "dMat2" -OpMemberName %Data 28 "dMat3" -OpMemberName %Data 29 "dMat4" -OpMemberName %Data 30 "dMat5" -OpMemberName %Data 31 "dMat6" -OpMemberName %Data 32 "dMat7" -OpMemberName %Data 33 "dMat8" -OpName %Ubo "Ubo" -OpMemberName %Ubo 0 "ds" -OpName %ubo "ubo" -OpName %Ssbo "Ssbo" -OpMemberName %Ssbo 0 "ds" -OpName %ssbo "ssbo" -OpName %iAttm "iAttm" -OpName %iAttmMS "iAttmMS" -OpName %uAttm "uAttm" -OpName %uAttmMS "uAttmMS" -OpName %fAttm "fAttm" -OpName %fAttmMS "fAttmMS" -OpName %acc "acc" -OpDecorate %iImg1d DescriptorSet 1 -OpDecorate %iImg1d Binding 0 -OpDecorate %iImg1d NonWritable -OpDecorate %iImg2d DescriptorSet 1 -OpDecorate %iImg2d Binding 1 -OpDecorate %iImg2d NonWritable -OpDecorate %iImg3d DescriptorSet 1 -OpDecorate %iImg3d Binding 2 -OpDecorate %iImg3d NonWritable -OpDecorate %iImg1dArr DescriptorSet 1 -OpDecorate %iImg1dArr Binding 3 -OpDecorate %iImg1dArr NonWritable -OpDecorate %iImg2dArr DescriptorSet 1 -OpDecorate %iImg2dArr Binding 4 -OpDecorate %iImg2dArr NonWritable -OpDecorate %iImgCube DescriptorSet 1 -OpDecorate %iImgCube Binding 5 -OpDecorate %iImgCube NonWritable -OpDecorate %iImgCubeArr DescriptorSet 1 -OpDecorate %iImgCubeArr Binding 6 -OpDecorate %iImgCubeArr NonWritable -OpDecorate %iImgBuf DescriptorSet 1 -OpDecorate %iImgBuf Binding 7 -OpDecorate %iImgBuf NonWritable -OpDecorate %uImg1d DescriptorSet 2 -OpDecorate %uImg1d Binding 0 -OpDecorate %uImg1d NonWritable -OpDecorate %uImg2d DescriptorSet 2 -OpDecorate %uImg2d Binding 1 -OpDecorate %uImg2d NonWritable -OpDecorate %uImg3d DescriptorSet 2 -OpDecorate %uImg3d Binding 2 -OpDecorate %uImg3d NonWritable -OpDecorate %uImg1dArr DescriptorSet 2 -OpDecorate %uImg1dArr Binding 3 -OpDecorate %uImg1dArr NonWritable -OpDecorate %uImg2dArr DescriptorSet 2 -OpDecorate %uImg2dArr Binding 4 -OpDecorate %uImg2dArr NonWritable -OpDecorate %uImgCube DescriptorSet 2 -OpDecorate %uImgCube Binding 5 -OpDecorate %uImgCube NonWritable -OpDecorate %uImgCubeArr DescriptorSet 2 -OpDecorate %uImgCubeArr Binding 6 -OpDecorate %uImgCubeArr NonWritable -OpDecorate %uImgBuf DescriptorSet 2 -OpDecorate %uImgBuf Binding 7 -OpDecorate %uImgBuf NonWritable -OpDecorate %fImg1D DescriptorSet 3 -OpDecorate %fImg1D Binding 0 -OpDecorate %fImg1D NonReadable -OpDecorate %fImg2D DescriptorSet 3 -OpDecorate %fImg2D Binding 1 -OpDecorate %fImg2D NonReadable -OpDecorate %fImg3D DescriptorSet 3 -OpDecorate %fImg3D Binding 2 -OpDecorate %fImg3D NonReadable -OpDecorate %fImgCube DescriptorSet 3 -OpDecorate %fImgCube Binding 3 -OpDecorate %fImgCube NonReadable -OpDecorate %fImg2DRect DescriptorSet 3 -OpDecorate %fImg2DRect Binding 4 -OpDecorate %fImg2DRect NonReadable -OpDecorate %fImg1DArray DescriptorSet 3 -OpDecorate %fImg1DArray Binding 5 -OpDecorate %fImg1DArray NonReadable -OpDecorate %fImg2DArray DescriptorSet 3 -OpDecorate %fImg2DArray Binding 6 -OpDecorate %fImg2DArray NonReadable -OpDecorate %fImgCubeArray DescriptorSet 3 -OpDecorate %fImgCubeArray Binding 7 -OpDecorate %fImgCubeArray NonReadable -OpDecorate %fImgBuffer DescriptorSet 3 -OpDecorate %fImgBuffer Binding 8 -OpDecorate %fImgBuffer NonReadable -OpDecorate %fImg2DMS DescriptorSet 3 -OpDecorate %fImg2DMS Binding 9 -OpDecorate %fImg2DMS NonReadable -OpDecorate %fImg2DMSArray DescriptorSet 3 -OpDecorate %fImg2DMSArray Binding 10 -OpDecorate %fImg2DMSArray NonReadable -OpDecorate %iSamp1D DescriptorSet 4 -OpDecorate %iSamp1D Binding 0 -OpDecorate %iSamp2D DescriptorSet 4 -OpDecorate %iSamp2D Binding 1 -OpDecorate %iSamp3D DescriptorSet 4 -OpDecorate %iSamp3D Binding 2 -OpDecorate %iSampCube DescriptorSet 4 -OpDecorate %iSampCube Binding 3 -OpDecorate %iSamp2DRect DescriptorSet 4 -OpDecorate %iSamp2DRect Binding 4 -OpDecorate %iSamp1DArray DescriptorSet 4 -OpDecorate %iSamp1DArray Binding 5 -OpDecorate %iSamp2DArray DescriptorSet 4 -OpDecorate %iSamp2DArray Binding 6 -OpDecorate %iSampCubeArray DescriptorSet 4 -OpDecorate %iSampCubeArray Binding 7 -OpDecorate %iSampBuffer DescriptorSet 4 -OpDecorate %iSampBuffer Binding 8 -OpDecorate %iSamp2DMS DescriptorSet 4 -OpDecorate %iSamp2DMS Binding 9 -OpDecorate %iSamp2DMSArray DescriptorSet 4 -OpDecorate %iSamp2DMSArray Binding 10 -OpDecorate %uSamp1D DescriptorSet 5 -OpDecorate %uSamp1D Binding 0 -OpDecorate %uSamp2D DescriptorSet 5 -OpDecorate %uSamp2D Binding 1 -OpDecorate %uSamp3D DescriptorSet 5 -OpDecorate %uSamp3D Binding 2 -OpDecorate %uSampCube DescriptorSet 5 -OpDecorate %uSampCube Binding 3 -OpDecorate %uSamp2DRect DescriptorSet 5 -OpDecorate %uSamp2DRect Binding 4 -OpDecorate %uSamp1DArray DescriptorSet 5 -OpDecorate %uSamp1DArray Binding 5 -OpDecorate %uSamp2DArray DescriptorSet 5 -OpDecorate %uSamp2DArray Binding 6 -OpDecorate %uSampCubeArray DescriptorSet 5 -OpDecorate %uSampCubeArray Binding 7 -OpDecorate %uSampBuffer DescriptorSet 5 -OpDecorate %uSampBuffer Binding 8 -OpDecorate %uSamp2DMS DescriptorSet 5 -OpDecorate %uSamp2DMS Binding 9 -OpDecorate %uSamp2DMSArray DescriptorSet 5 -OpDecorate %uSamp2DMSArray Binding 10 -OpDecorate %fSamp1D DescriptorSet 6 -OpDecorate %fSamp1D Binding 0 -OpDecorate %fSamp2D DescriptorSet 6 -OpDecorate %fSamp2D Binding 1 -OpDecorate %fSamp3D DescriptorSet 6 -OpDecorate %fSamp3D Binding 2 -OpDecorate %fSampCube DescriptorSet 6 -OpDecorate %fSampCube Binding 3 -OpDecorate %fSamp2DRect DescriptorSet 6 -OpDecorate %fSamp2DRect Binding 4 -OpDecorate %fSamp1DArray DescriptorSet 6 -OpDecorate %fSamp1DArray Binding 5 -OpDecorate %fSamp2DArray DescriptorSet 6 -OpDecorate %fSamp2DArray Binding 6 -OpDecorate %fSampCubeArray DescriptorSet 6 -OpDecorate %fSampCubeArray Binding 7 -OpDecorate %fSampBuffer DescriptorSet 6 -OpDecorate %fSampBuffer Binding 8 -OpDecorate %fSamp2DMS DescriptorSet 6 -OpDecorate %fSamp2DMS Binding 9 -OpDecorate %fSamp2DMSArray DescriptorSet 6 -OpDecorate %fSamp2DMSArray Binding 10 -OpDecorate %dsSamp1D DescriptorSet 7 -OpDecorate %dsSamp1D Binding 0 -OpDecorate %dsSamp2D DescriptorSet 7 -OpDecorate %dsSamp2D Binding 1 -OpDecorate %dsSampCube DescriptorSet 7 -OpDecorate %dsSampCube Binding 2 -OpDecorate %dsSamp2DRect DescriptorSet 7 -OpDecorate %dsSamp2DRect Binding 3 -OpDecorate %dsSamp1DArray DescriptorSet 7 -OpDecorate %dsSamp1DArray Binding 4 -OpDecorate %dsSamp2DArray DescriptorSet 7 -OpDecorate %dsSamp2DArray Binding 5 -OpDecorate %dsSampCubeArray DescriptorSet 7 -OpDecorate %dsSampCubeArray Binding 6 -OpDecorate %samp DescriptorSet 8 -OpDecorate %samp Binding 0 -OpDecorate %sampShadow DescriptorSet 8 -OpDecorate %sampShadow Binding 1 -OpDecorate %iTex1D DescriptorSet 9 -OpDecorate %iTex1D Binding 0 -OpDecorate %iTex2D DescriptorSet 9 -OpDecorate %iTex2D Binding 1 -OpDecorate %iTex3D DescriptorSet 9 -OpDecorate %iTex3D Binding 2 -OpDecorate %iTexCube DescriptorSet 9 -OpDecorate %iTexCube Binding 3 -OpDecorate %iTex2DRect DescriptorSet 9 -OpDecorate %iTex2DRect Binding 4 -OpDecorate %iTex1DArray DescriptorSet 9 -OpDecorate %iTex1DArray Binding 5 -OpDecorate %iTex2DArray DescriptorSet 9 -OpDecorate %iTex2DArray Binding 6 -OpDecorate %iTexCubeArray DescriptorSet 9 -OpDecorate %iTexCubeArray Binding 7 -OpDecorate %iTexBuffer DescriptorSet 9 -OpDecorate %iTexBuffer Binding 8 -OpDecorate %iTex2DMS DescriptorSet 9 -OpDecorate %iTex2DMS Binding 9 -OpDecorate %iTex2DMSArray DescriptorSet 9 -OpDecorate %iTex2DMSArray Binding 10 -OpDecorate %uTex1D DescriptorSet 10 -OpDecorate %uTex1D Binding 0 -OpDecorate %uTex2D DescriptorSet 10 -OpDecorate %uTex2D Binding 1 -OpDecorate %uTex3D DescriptorSet 10 -OpDecorate %uTex3D Binding 2 -OpDecorate %uTexCube DescriptorSet 10 -OpDecorate %uTexCube Binding 3 -OpDecorate %uTex2DRect DescriptorSet 10 -OpDecorate %uTex2DRect Binding 4 -OpDecorate %uTex1DArray DescriptorSet 10 -OpDecorate %uTex1DArray Binding 5 -OpDecorate %uTex2DArray DescriptorSet 10 -OpDecorate %uTex2DArray Binding 6 -OpDecorate %uTexCubeArray DescriptorSet 10 -OpDecorate %uTexCubeArray Binding 7 -OpDecorate %uTexBuffer DescriptorSet 10 -OpDecorate %uTexBuffer Binding 8 -OpDecorate %uTex2DMS DescriptorSet 10 -OpDecorate %uTex2DMS Binding 9 -OpDecorate %uTex2DMSArray DescriptorSet 10 -OpDecorate %uTex2DMSArray Binding 10 -OpDecorate %fTex1D DescriptorSet 11 -OpDecorate %fTex1D Binding 0 -OpDecorate %fTex2D DescriptorSet 11 -OpDecorate %fTex2D Binding 1 -OpDecorate %fTex3D DescriptorSet 11 -OpDecorate %fTex3D Binding 2 -OpDecorate %fTexCube DescriptorSet 11 -OpDecorate %fTexCube Binding 3 -OpDecorate %fTex2DRect DescriptorSet 11 -OpDecorate %fTex2DRect Binding 4 -OpDecorate %fTex1DArray DescriptorSet 11 -OpDecorate %fTex1DArray Binding 5 -OpDecorate %fTex2DArray DescriptorSet 11 -OpDecorate %fTex2DArray Binding 6 -OpDecorate %fTexCubeArray DescriptorSet 11 -OpDecorate %fTexCubeArray Binding 7 -OpDecorate %fTexBuffer DescriptorSet 11 -OpDecorate %fTexBuffer Binding 8 -OpDecorate %fTex2DMS DescriptorSet 11 -OpDecorate %fTex2DMS Binding 9 -OpDecorate %fTex2DMSArray DescriptorSet 11 -OpDecorate %fTex2DMSArray Binding 10 -OpMemberDecorate %Data 0 Offset 0 -OpMemberDecorate %Data 1 Offset 8 -OpMemberDecorate %Data 2 Offset 16 -OpMemberDecorate %Data 3 Offset 32 -OpMemberDecorate %Data 4 Offset 48 -OpMemberDecorate %Data 5 Offset 56 -OpMemberDecorate %Data 6 Offset 64 -OpMemberDecorate %Data 7 Offset 80 -OpMemberDecorate %Data 8 Offset 96 -OpMemberDecorate %Data 9 Offset 104 -OpMemberDecorate %Data 10 Offset 112 -OpMemberDecorate %Data 11 Offset 128 -OpMemberDecorate %Data 12 ColMajor -OpMemberDecorate %Data 12 Offset 144 -OpMemberDecorate %Data 12 MatrixStride 16 -OpMemberDecorate %Data 13 ColMajor -OpMemberDecorate %Data 13 Offset 176 -OpMemberDecorate %Data 13 MatrixStride 16 -OpMemberDecorate %Data 14 ColMajor -OpMemberDecorate %Data 14 Offset 208 -OpMemberDecorate %Data 14 MatrixStride 16 -OpMemberDecorate %Data 15 ColMajor -OpMemberDecorate %Data 15 Offset 240 -OpMemberDecorate %Data 15 MatrixStride 16 -OpMemberDecorate %Data 16 ColMajor -OpMemberDecorate %Data 16 Offset 288 -OpMemberDecorate %Data 16 MatrixStride 16 -OpMemberDecorate %Data 17 ColMajor -OpMemberDecorate %Data 17 Offset 336 -OpMemberDecorate %Data 17 MatrixStride 16 -OpMemberDecorate %Data 18 ColMajor -OpMemberDecorate %Data 18 Offset 384 -OpMemberDecorate %Data 18 MatrixStride 16 -OpMemberDecorate %Data 19 ColMajor -OpMemberDecorate %Data 19 Offset 448 -OpMemberDecorate %Data 19 MatrixStride 16 -OpMemberDecorate %Data 20 ColMajor -OpMemberDecorate %Data 20 Offset 512 -OpMemberDecorate %Data 20 MatrixStride 16 -OpMemberDecorate %Data 21 Offset 576 -OpMemberDecorate %Data 22 Offset 592 -OpMemberDecorate %Data 23 Offset 608 -OpMemberDecorate %Data 24 Offset 640 -OpMemberDecorate %Data 25 ColMajor -OpMemberDecorate %Data 25 Offset 672 -OpMemberDecorate %Data 25 MatrixStride 16 -OpMemberDecorate %Data 26 ColMajor -OpMemberDecorate %Data 26 Offset 704 -OpMemberDecorate %Data 26 MatrixStride 32 -OpMemberDecorate %Data 27 ColMajor -OpMemberDecorate %Data 27 Offset 768 -OpMemberDecorate %Data 27 MatrixStride 32 -OpMemberDecorate %Data 28 ColMajor -OpMemberDecorate %Data 28 Offset 832 -OpMemberDecorate %Data 28 MatrixStride 16 -OpMemberDecorate %Data 29 ColMajor -OpMemberDecorate %Data 29 Offset 896 -OpMemberDecorate %Data 29 MatrixStride 32 -OpMemberDecorate %Data 30 ColMajor -OpMemberDecorate %Data 30 Offset 992 -OpMemberDecorate %Data 30 MatrixStride 32 -OpMemberDecorate %Data 31 ColMajor -OpMemberDecorate %Data 31 Offset 1088 -OpMemberDecorate %Data 31 MatrixStride 16 -OpMemberDecorate %Data 32 ColMajor -OpMemberDecorate %Data 32 Offset 1152 -OpMemberDecorate %Data 32 MatrixStride 32 -OpMemberDecorate %Data 33 ColMajor -OpMemberDecorate %Data 33 Offset 1280 -OpMemberDecorate %Data 33 MatrixStride 32 -OpDecorate %_arr_Data_uint_4 ArrayStride 1408 -OpMemberDecorate %Ubo 0 Offset 0 -OpDecorate %Ubo Block -OpDecorate %ubo DescriptorSet 12 -OpDecorate %ubo Binding 0 -OpDecorate %_runtimearr_int ArrayStride 4 -OpMemberDecorate %Ssbo 0 Offset 0 -OpDecorate %Ssbo Block -OpDecorate %ssbo DescriptorSet 13 -OpDecorate %ssbo Binding 0 -OpDecorate %iAttm DescriptorSet 14 -OpDecorate %iAttm Binding 0 -OpDecorate %iAttm InputAttachmentIndex 0 -OpDecorate %iAttmMS DescriptorSet 14 -OpDecorate %iAttmMS Binding 1 -OpDecorate %iAttmMS InputAttachmentIndex 1 -OpDecorate %uAttm DescriptorSet 14 -OpDecorate %uAttm Binding 2 -OpDecorate %uAttm InputAttachmentIndex 2 -OpDecorate %uAttmMS DescriptorSet 14 -OpDecorate %uAttmMS Binding 3 -OpDecorate %uAttmMS InputAttachmentIndex 3 -OpDecorate %fAttm DescriptorSet 14 -OpDecorate %fAttm Binding 4 -OpDecorate %fAttm InputAttachmentIndex 4 -OpDecorate %fAttmMS DescriptorSet 14 -OpDecorate %fAttmMS Binding 5 -OpDecorate %fAttmMS InputAttachmentIndex 5 -OpDecorate %acc DescriptorSet 15 -OpDecorate %acc Binding 0 -%void = OpTypeVoid -%3 = OpTypeFunction %void +OpName %0 "main" +OpName %2 "ray_query" +OpName %4 "iImg1d" +OpName %7 "iImg2d" +OpName %8 "iImg3d" +OpName %9 "iImg1dArr" +OpName %11 "iImg2dArr" +OpName %13 "iImgCube" +OpName %14 "iImgCubeArr" +OpName %16 "iImgBuf" +OpName %17 "uImg1d" +OpName %19 "uImg2d" +OpName %20 "uImg3d" +OpName %22 "uImg1dArr" +OpName %23 "uImg2dArr" +OpName %25 "uImgCube" +OpName %26 "uImgCubeArr" +OpName %28 "uImgBuf" +OpName %29 "fImg1D" +OpName %31 "fImg2D" +OpName %32 "fImg3D" +OpName %34 "fImgCube" +OpName %35 "fImg2DRect" +OpName %36 "fImg1DArray" +OpName %38 "fImg2DArray" +OpName %39 "fImgCubeArray" +OpName %41 "fImgBuffer" +OpName %42 "fImg2DMS" +OpName %44 "fImg2DMSArray" +OpName %45 "iSamp1D" +OpName %47 "iSamp2D" +OpName %48 "iSamp3D" +OpName %50 "iSampCube" +OpName %51 "iSamp2DRect" +OpName %53 "iSamp1DArray" +OpName %54 "iSamp2DArray" +OpName %56 "iSampCubeArray" +OpName %57 "iSampBuffer" +OpName %59 "iSamp2DMS" +OpName %60 "iSamp2DMSArray" +OpName %61 "uSamp1D" +OpName %63 "uSamp2D" +OpName %64 "uSamp3D" +OpName %66 "uSampCube" +OpName %67 "uSamp2DRect" +OpName %69 "uSamp1DArray" +OpName %70 "uSamp2DArray" +OpName %72 "uSampCubeArray" +OpName %73 "uSampBuffer" +OpName %75 "uSamp2DMS" +OpName %76 "uSamp2DMSArray" +OpName %78 "fSamp1D" +OpName %79 "fSamp2D" +OpName %81 "fSamp3D" +OpName %82 "fSampCube" +OpName %84 "fSamp2DRect" +OpName %85 "fSamp1DArray" +OpName %87 "fSamp2DArray" +OpName %88 "fSampCubeArray" +OpName %90 "fSampBuffer" +OpName %91 "fSamp2DMS" +OpName %93 "fSamp2DMSArray" +OpName %94 "dsSamp1D" +OpName %97 "dsSamp2D" +OpName %98 "dsSampCube" +OpName %101 "dsSamp2DRect" +OpName %102 "dsSamp1DArray" +OpName %105 "dsSamp2DArray" +OpName %106 "dsSampCubeArray" +OpName %109 "samp" +OpName %110 "sampShadow" +OpName %113 "iTex1D" +OpName %114 "iTex2D" +OpName %117 "iTex3D" +OpName %118 "iTexCube" +OpName %121 "iTex2DRect" +OpName %122 "iTex1DArray" +OpName %125 "iTex2DArray" +OpName %126 "iTexCubeArray" +OpName %129 "iTexBuffer" +OpName %130 "iTex2DMS" +OpName %133 "iTex2DMSArray" +OpName %134 "uTex1D" +OpName %137 "uTex2D" +OpName %138 "uTex3D" +OpName %141 "uTexCube" +OpName %142 "uTex2DRect" +OpName %145 "uTex1DArray" +OpName %146 "uTex2DArray" +OpName %149 "uTexCubeArray" +OpName %150 "uTexBuffer" +OpName %153 "uTex2DMS" +OpName %154 "uTex2DMSArray" +OpName %157 "fTex1D" +OpName %158 "fTex2D" +OpName %161 "fTex3D" +OpName %162 "fTexCube" +OpName %165 "fTex2DRect" +OpName %166 "fTex1DArray" +OpName %169 "fTex2DArray" +OpName %170 "fTexCubeArray" +OpName %173 "fTexBuffer" +OpName %174 "fTex2DMS" +OpName %177 "fTex2DMSArray" +OpName %197 "Data" +OpMemberName %197 0 "i0" +OpMemberName %197 1 "i1" +OpMemberName %197 2 "i2" +OpMemberName %197 3 "i3" +OpMemberName %197 4 "u0" +OpMemberName %197 5 "u1" +OpMemberName %197 6 "u2" +OpMemberName %197 7 "u3" +OpMemberName %197 8 "f0" +OpMemberName %197 9 "f1" +OpMemberName %197 10 "f2" +OpMemberName %197 11 "f3" +OpMemberName %197 12 "fMat0" +OpMemberName %197 13 "fMat1" +OpMemberName %197 14 "fMat2" +OpMemberName %197 15 "fMat3" +OpMemberName %197 16 "fMat4" +OpMemberName %197 17 "fMat5" +OpMemberName %197 18 "fMat6" +OpMemberName %197 19 "fMat7" +OpMemberName %197 20 "fMat8" +OpMemberName %197 21 "d0" +OpMemberName %197 22 "d1" +OpMemberName %197 23 "d2" +OpMemberName %197 24 "d3" +OpMemberName %197 25 "dMat0" +OpMemberName %197 26 "dMat1" +OpMemberName %197 27 "dMat2" +OpMemberName %197 28 "dMat3" +OpMemberName %197 29 "dMat4" +OpMemberName %197 30 "dMat5" +OpMemberName %197 31 "dMat6" +OpMemberName %197 32 "dMat7" +OpMemberName %197 33 "dMat8" +OpName %198 "Ubo" +OpMemberName %198 0 "ds" +OpName %178 "ubo" +OpName %201 "Ssbo" +OpMemberName %201 0 "ds" +OpName %181 "ssbo" +OpName %182 "iAttm" +OpName %185 "iAttmMS" +OpName %186 "uAttm" +OpName %189 "uAttmMS" +OpName %190 "fAttm" +OpName %193 "fAttmMS" +OpName %194 "acc" +OpDecorate %4 DescriptorSet 1 +OpDecorate %4 Binding 0 +OpDecorate %4 NonWritable +OpDecorate %7 DescriptorSet 1 +OpDecorate %7 Binding 1 +OpDecorate %7 NonWritable +OpDecorate %8 DescriptorSet 1 +OpDecorate %8 Binding 2 +OpDecorate %8 NonWritable +OpDecorate %9 DescriptorSet 1 +OpDecorate %9 Binding 3 +OpDecorate %9 NonWritable +OpDecorate %11 DescriptorSet 1 +OpDecorate %11 Binding 4 +OpDecorate %11 NonWritable +OpDecorate %13 DescriptorSet 1 +OpDecorate %13 Binding 5 +OpDecorate %13 NonWritable +OpDecorate %14 DescriptorSet 1 +OpDecorate %14 Binding 6 +OpDecorate %14 NonWritable +OpDecorate %16 DescriptorSet 1 +OpDecorate %16 Binding 7 +OpDecorate %16 NonWritable +OpDecorate %17 DescriptorSet 2 +OpDecorate %17 Binding 0 +OpDecorate %17 NonWritable +OpDecorate %19 DescriptorSet 2 +OpDecorate %19 Binding 1 +OpDecorate %19 NonWritable +OpDecorate %20 DescriptorSet 2 +OpDecorate %20 Binding 2 +OpDecorate %20 NonWritable +OpDecorate %22 DescriptorSet 2 +OpDecorate %22 Binding 3 +OpDecorate %22 NonWritable +OpDecorate %23 DescriptorSet 2 +OpDecorate %23 Binding 4 +OpDecorate %23 NonWritable +OpDecorate %25 DescriptorSet 2 +OpDecorate %25 Binding 5 +OpDecorate %25 NonWritable +OpDecorate %26 DescriptorSet 2 +OpDecorate %26 Binding 6 +OpDecorate %26 NonWritable +OpDecorate %28 DescriptorSet 2 +OpDecorate %28 Binding 7 +OpDecorate %28 NonWritable +OpDecorate %29 DescriptorSet 3 +OpDecorate %29 Binding 0 +OpDecorate %29 NonReadable +OpDecorate %31 DescriptorSet 3 +OpDecorate %31 Binding 1 +OpDecorate %31 NonReadable +OpDecorate %32 DescriptorSet 3 +OpDecorate %32 Binding 2 +OpDecorate %32 NonReadable +OpDecorate %34 DescriptorSet 3 +OpDecorate %34 Binding 3 +OpDecorate %34 NonReadable +OpDecorate %35 DescriptorSet 3 +OpDecorate %35 Binding 4 +OpDecorate %35 NonReadable +OpDecorate %36 DescriptorSet 3 +OpDecorate %36 Binding 5 +OpDecorate %36 NonReadable +OpDecorate %38 DescriptorSet 3 +OpDecorate %38 Binding 6 +OpDecorate %38 NonReadable +OpDecorate %39 DescriptorSet 3 +OpDecorate %39 Binding 7 +OpDecorate %39 NonReadable +OpDecorate %41 DescriptorSet 3 +OpDecorate %41 Binding 8 +OpDecorate %41 NonReadable +OpDecorate %42 DescriptorSet 3 +OpDecorate %42 Binding 9 +OpDecorate %42 NonReadable +OpDecorate %44 DescriptorSet 3 +OpDecorate %44 Binding 10 +OpDecorate %44 NonReadable +OpDecorate %45 DescriptorSet 4 +OpDecorate %45 Binding 0 +OpDecorate %47 DescriptorSet 4 +OpDecorate %47 Binding 1 +OpDecorate %48 DescriptorSet 4 +OpDecorate %48 Binding 2 +OpDecorate %50 DescriptorSet 4 +OpDecorate %50 Binding 3 +OpDecorate %51 DescriptorSet 4 +OpDecorate %51 Binding 4 +OpDecorate %53 DescriptorSet 4 +OpDecorate %53 Binding 5 +OpDecorate %54 DescriptorSet 4 +OpDecorate %54 Binding 6 +OpDecorate %56 DescriptorSet 4 +OpDecorate %56 Binding 7 +OpDecorate %57 DescriptorSet 4 +OpDecorate %57 Binding 8 +OpDecorate %59 DescriptorSet 4 +OpDecorate %59 Binding 9 +OpDecorate %60 DescriptorSet 4 +OpDecorate %60 Binding 10 +OpDecorate %61 DescriptorSet 5 +OpDecorate %61 Binding 0 +OpDecorate %63 DescriptorSet 5 +OpDecorate %63 Binding 1 +OpDecorate %64 DescriptorSet 5 +OpDecorate %64 Binding 2 +OpDecorate %66 DescriptorSet 5 +OpDecorate %66 Binding 3 +OpDecorate %67 DescriptorSet 5 +OpDecorate %67 Binding 4 +OpDecorate %69 DescriptorSet 5 +OpDecorate %69 Binding 5 +OpDecorate %70 DescriptorSet 5 +OpDecorate %70 Binding 6 +OpDecorate %72 DescriptorSet 5 +OpDecorate %72 Binding 7 +OpDecorate %73 DescriptorSet 5 +OpDecorate %73 Binding 8 +OpDecorate %75 DescriptorSet 5 +OpDecorate %75 Binding 9 +OpDecorate %76 DescriptorSet 5 +OpDecorate %76 Binding 10 +OpDecorate %78 DescriptorSet 6 +OpDecorate %78 Binding 0 +OpDecorate %79 DescriptorSet 6 +OpDecorate %79 Binding 1 +OpDecorate %81 DescriptorSet 6 +OpDecorate %81 Binding 2 +OpDecorate %82 DescriptorSet 6 +OpDecorate %82 Binding 3 +OpDecorate %84 DescriptorSet 6 +OpDecorate %84 Binding 4 +OpDecorate %85 DescriptorSet 6 +OpDecorate %85 Binding 5 +OpDecorate %87 DescriptorSet 6 +OpDecorate %87 Binding 6 +OpDecorate %88 DescriptorSet 6 +OpDecorate %88 Binding 7 +OpDecorate %90 DescriptorSet 6 +OpDecorate %90 Binding 8 +OpDecorate %91 DescriptorSet 6 +OpDecorate %91 Binding 9 +OpDecorate %93 DescriptorSet 6 +OpDecorate %93 Binding 10 +OpDecorate %94 DescriptorSet 7 +OpDecorate %94 Binding 0 +OpDecorate %97 DescriptorSet 7 +OpDecorate %97 Binding 1 +OpDecorate %98 DescriptorSet 7 +OpDecorate %98 Binding 2 +OpDecorate %101 DescriptorSet 7 +OpDecorate %101 Binding 3 +OpDecorate %102 DescriptorSet 7 +OpDecorate %102 Binding 4 +OpDecorate %105 DescriptorSet 7 +OpDecorate %105 Binding 5 +OpDecorate %106 DescriptorSet 7 +OpDecorate %106 Binding 6 +OpDecorate %109 DescriptorSet 8 +OpDecorate %109 Binding 0 +OpDecorate %110 DescriptorSet 8 +OpDecorate %110 Binding 1 +OpDecorate %113 DescriptorSet 9 +OpDecorate %113 Binding 0 +OpDecorate %114 DescriptorSet 9 +OpDecorate %114 Binding 1 +OpDecorate %117 DescriptorSet 9 +OpDecorate %117 Binding 2 +OpDecorate %118 DescriptorSet 9 +OpDecorate %118 Binding 3 +OpDecorate %121 DescriptorSet 9 +OpDecorate %121 Binding 4 +OpDecorate %122 DescriptorSet 9 +OpDecorate %122 Binding 5 +OpDecorate %125 DescriptorSet 9 +OpDecorate %125 Binding 6 +OpDecorate %126 DescriptorSet 9 +OpDecorate %126 Binding 7 +OpDecorate %129 DescriptorSet 9 +OpDecorate %129 Binding 8 +OpDecorate %130 DescriptorSet 9 +OpDecorate %130 Binding 9 +OpDecorate %133 DescriptorSet 9 +OpDecorate %133 Binding 10 +OpDecorate %134 DescriptorSet 10 +OpDecorate %134 Binding 0 +OpDecorate %137 DescriptorSet 10 +OpDecorate %137 Binding 1 +OpDecorate %138 DescriptorSet 10 +OpDecorate %138 Binding 2 +OpDecorate %141 DescriptorSet 10 +OpDecorate %141 Binding 3 +OpDecorate %142 DescriptorSet 10 +OpDecorate %142 Binding 4 +OpDecorate %145 DescriptorSet 10 +OpDecorate %145 Binding 5 +OpDecorate %146 DescriptorSet 10 +OpDecorate %146 Binding 6 +OpDecorate %149 DescriptorSet 10 +OpDecorate %149 Binding 7 +OpDecorate %150 DescriptorSet 10 +OpDecorate %150 Binding 8 +OpDecorate %153 DescriptorSet 10 +OpDecorate %153 Binding 9 +OpDecorate %154 DescriptorSet 10 +OpDecorate %154 Binding 10 +OpDecorate %157 DescriptorSet 11 +OpDecorate %157 Binding 0 +OpDecorate %158 DescriptorSet 11 +OpDecorate %158 Binding 1 +OpDecorate %161 DescriptorSet 11 +OpDecorate %161 Binding 2 +OpDecorate %162 DescriptorSet 11 +OpDecorate %162 Binding 3 +OpDecorate %165 DescriptorSet 11 +OpDecorate %165 Binding 4 +OpDecorate %166 DescriptorSet 11 +OpDecorate %166 Binding 5 +OpDecorate %169 DescriptorSet 11 +OpDecorate %169 Binding 6 +OpDecorate %170 DescriptorSet 11 +OpDecorate %170 Binding 7 +OpDecorate %173 DescriptorSet 11 +OpDecorate %173 Binding 8 +OpDecorate %174 DescriptorSet 11 +OpDecorate %174 Binding 9 +OpDecorate %177 DescriptorSet 11 +OpDecorate %177 Binding 10 +OpMemberDecorate %197 0 Offset 0 +OpMemberDecorate %197 1 Offset 8 +OpMemberDecorate %197 2 Offset 16 +OpMemberDecorate %197 3 Offset 32 +OpMemberDecorate %197 4 Offset 48 +OpMemberDecorate %197 5 Offset 56 +OpMemberDecorate %197 6 Offset 64 +OpMemberDecorate %197 7 Offset 80 +OpMemberDecorate %197 8 Offset 96 +OpMemberDecorate %197 9 Offset 104 +OpMemberDecorate %197 10 Offset 112 +OpMemberDecorate %197 11 Offset 128 +OpMemberDecorate %197 12 ColMajor +OpMemberDecorate %197 12 Offset 144 +OpMemberDecorate %197 12 MatrixStride 16 +OpMemberDecorate %197 13 ColMajor +OpMemberDecorate %197 13 Offset 176 +OpMemberDecorate %197 13 MatrixStride 16 +OpMemberDecorate %197 14 ColMajor +OpMemberDecorate %197 14 Offset 208 +OpMemberDecorate %197 14 MatrixStride 16 +OpMemberDecorate %197 15 ColMajor +OpMemberDecorate %197 15 Offset 240 +OpMemberDecorate %197 15 MatrixStride 16 +OpMemberDecorate %197 16 ColMajor +OpMemberDecorate %197 16 Offset 288 +OpMemberDecorate %197 16 MatrixStride 16 +OpMemberDecorate %197 17 ColMajor +OpMemberDecorate %197 17 Offset 336 +OpMemberDecorate %197 17 MatrixStride 16 +OpMemberDecorate %197 18 ColMajor +OpMemberDecorate %197 18 Offset 384 +OpMemberDecorate %197 18 MatrixStride 16 +OpMemberDecorate %197 19 ColMajor +OpMemberDecorate %197 19 Offset 448 +OpMemberDecorate %197 19 MatrixStride 16 +OpMemberDecorate %197 20 ColMajor +OpMemberDecorate %197 20 Offset 512 +OpMemberDecorate %197 20 MatrixStride 16 +OpMemberDecorate %197 21 Offset 576 +OpMemberDecorate %197 22 Offset 592 +OpMemberDecorate %197 23 Offset 608 +OpMemberDecorate %197 24 Offset 640 +OpMemberDecorate %197 25 ColMajor +OpMemberDecorate %197 25 Offset 672 +OpMemberDecorate %197 25 MatrixStride 16 +OpMemberDecorate %197 26 ColMajor +OpMemberDecorate %197 26 Offset 704 +OpMemberDecorate %197 26 MatrixStride 32 +OpMemberDecorate %197 27 ColMajor +OpMemberDecorate %197 27 Offset 768 +OpMemberDecorate %197 27 MatrixStride 32 +OpMemberDecorate %197 28 ColMajor +OpMemberDecorate %197 28 Offset 832 +OpMemberDecorate %197 28 MatrixStride 16 +OpMemberDecorate %197 29 ColMajor +OpMemberDecorate %197 29 Offset 896 +OpMemberDecorate %197 29 MatrixStride 32 +OpMemberDecorate %197 30 ColMajor +OpMemberDecorate %197 30 Offset 992 +OpMemberDecorate %197 30 MatrixStride 32 +OpMemberDecorate %197 31 ColMajor +OpMemberDecorate %197 31 Offset 1088 +OpMemberDecorate %197 31 MatrixStride 16 +OpMemberDecorate %197 32 ColMajor +OpMemberDecorate %197 32 Offset 1152 +OpMemberDecorate %197 32 MatrixStride 32 +OpMemberDecorate %197 33 ColMajor +OpMemberDecorate %197 33 Offset 1280 +OpMemberDecorate %197 33 MatrixStride 32 +OpDecorate %202 ArrayStride 1408 +OpMemberDecorate %198 0 Offset 0 +OpDecorate %198 Block +OpDecorate %178 DescriptorSet 12 +OpDecorate %178 Binding 0 +OpDecorate %205 ArrayStride 4 +OpMemberDecorate %201 0 Offset 0 +OpDecorate %201 Block +OpDecorate %181 DescriptorSet 13 +OpDecorate %181 Binding 0 +OpDecorate %182 DescriptorSet 14 +OpDecorate %182 Binding 0 +OpDecorate %182 InputAttachmentIndex 0 +OpDecorate %185 DescriptorSet 14 +OpDecorate %185 Binding 1 +OpDecorate %185 InputAttachmentIndex 1 +OpDecorate %186 DescriptorSet 14 +OpDecorate %186 Binding 2 +OpDecorate %186 InputAttachmentIndex 2 +OpDecorate %189 DescriptorSet 14 +OpDecorate %189 Binding 3 +OpDecorate %189 InputAttachmentIndex 3 +OpDecorate %190 DescriptorSet 14 +OpDecorate %190 Binding 4 +OpDecorate %190 InputAttachmentIndex 4 +OpDecorate %193 DescriptorSet 14 +OpDecorate %193 Binding 5 +OpDecorate %193 InputAttachmentIndex 5 +OpDecorate %194 DescriptorSet 15 +OpDecorate %194 Binding 0 +%206 = OpTypeVoid +%3 = OpTypeFunction %206 %6 = OpTypeRayQueryKHR -%_ptr_Private_6 = OpTypePointer Private %6 -%ray_query = OpVariable %_ptr_Private_6 Private -%bool = OpTypeBool -%int = OpTypeInt 32 1 -%12 = OpTypeImage %int 1D 0 0 0 2 Rgba32i -%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%iImg1d = OpVariable %_ptr_UniformConstant_12 UniformConstant -%15 = OpTypeImage %int 2D 0 0 0 2 Rgba16i -%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15 -%iImg2d = OpVariable %_ptr_UniformConstant_15 UniformConstant -%18 = OpTypeImage %int 3D 0 0 0 2 Rgba8i -%_ptr_UniformConstant_18 = OpTypePointer UniformConstant %18 -%iImg3d = OpVariable %_ptr_UniformConstant_18 UniformConstant -%21 = OpTypeImage %int 1D 0 1 0 2 Rgba32i -%_ptr_UniformConstant_21 = OpTypePointer UniformConstant %21 -%iImg1dArr = OpVariable %_ptr_UniformConstant_21 UniformConstant -%24 = OpTypeImage %int 2D 0 1 0 2 Rgba32i -%_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24 -%iImg2dArr = OpVariable %_ptr_UniformConstant_24 UniformConstant -%27 = OpTypeImage %int Cube 0 0 0 2 Rgba32i -%_ptr_UniformConstant_27 = OpTypePointer UniformConstant %27 -%iImgCube = OpVariable %_ptr_UniformConstant_27 UniformConstant -%30 = OpTypeImage %int Cube 0 1 0 2 Rgba32i -%_ptr_UniformConstant_30 = OpTypePointer UniformConstant %30 -%iImgCubeArr = OpVariable %_ptr_UniformConstant_30 UniformConstant -%33 = OpTypeImage %int Buffer 0 0 0 2 Rgba32i -%_ptr_UniformConstant_33 = OpTypePointer UniformConstant %33 -%iImgBuf = OpVariable %_ptr_UniformConstant_33 UniformConstant -%uint = OpTypeInt 32 0 -%37 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui -%_ptr_UniformConstant_37 = OpTypePointer UniformConstant %37 -%uImg1d = OpVariable %_ptr_UniformConstant_37 UniformConstant -%40 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui -%_ptr_UniformConstant_40 = OpTypePointer UniformConstant %40 -%uImg2d = OpVariable %_ptr_UniformConstant_40 UniformConstant -%43 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui -%_ptr_UniformConstant_43 = OpTypePointer UniformConstant %43 -%uImg3d = OpVariable %_ptr_UniformConstant_43 UniformConstant -%46 = OpTypeImage %uint 1D 0 1 0 2 Rgba32ui -%_ptr_UniformConstant_46 = OpTypePointer UniformConstant %46 -%uImg1dArr = OpVariable %_ptr_UniformConstant_46 UniformConstant -%49 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui -%_ptr_UniformConstant_49 = OpTypePointer UniformConstant %49 -%uImg2dArr = OpVariable %_ptr_UniformConstant_49 UniformConstant -%52 = OpTypeImage %uint Cube 0 0 0 2 Rgba32ui -%_ptr_UniformConstant_52 = OpTypePointer UniformConstant %52 -%uImgCube = OpVariable %_ptr_UniformConstant_52 UniformConstant -%55 = OpTypeImage %uint Cube 0 1 0 2 Rgba32ui -%_ptr_UniformConstant_55 = OpTypePointer UniformConstant %55 -%uImgCubeArr = OpVariable %_ptr_UniformConstant_55 UniformConstant -%58 = OpTypeImage %uint Buffer 0 0 0 2 Rgba32ui -%_ptr_UniformConstant_58 = OpTypePointer UniformConstant %58 -%uImgBuf = OpVariable %_ptr_UniformConstant_58 UniformConstant -%float = OpTypeFloat 32 -%62 = OpTypeImage %float 1D 0 0 0 2 Rgba32f -%_ptr_UniformConstant_62 = OpTypePointer UniformConstant %62 -%fImg1D = OpVariable %_ptr_UniformConstant_62 UniformConstant -%65 = OpTypeImage %float 2D 0 0 0 2 Rgba16f -%_ptr_UniformConstant_65 = OpTypePointer UniformConstant %65 -%fImg2D = OpVariable %_ptr_UniformConstant_65 UniformConstant -%68 = OpTypeImage %float 3D 0 0 0 2 R32f -%_ptr_UniformConstant_68 = OpTypePointer UniformConstant %68 -%fImg3D = OpVariable %_ptr_UniformConstant_68 UniformConstant -%71 = OpTypeImage %float Cube 0 0 0 2 Rgba8 -%_ptr_UniformConstant_71 = OpTypePointer UniformConstant %71 -%fImgCube = OpVariable %_ptr_UniformConstant_71 UniformConstant -%74 = OpTypeImage %float Rect 0 0 0 2 Rgba8Snorm -%_ptr_UniformConstant_74 = OpTypePointer UniformConstant %74 -%fImg2DRect = OpVariable %_ptr_UniformConstant_74 UniformConstant -%77 = OpTypeImage %float 1D 0 1 0 2 Rgba32f -%_ptr_UniformConstant_77 = OpTypePointer UniformConstant %77 -%fImg1DArray = OpVariable %_ptr_UniformConstant_77 UniformConstant -%80 = OpTypeImage %float 2D 0 1 0 2 Rgba32f -%_ptr_UniformConstant_80 = OpTypePointer UniformConstant %80 -%fImg2DArray = OpVariable %_ptr_UniformConstant_80 UniformConstant -%83 = OpTypeImage %float Cube 0 1 0 2 Rgba32f -%_ptr_UniformConstant_83 = OpTypePointer UniformConstant %83 -%fImgCubeArray = OpVariable %_ptr_UniformConstant_83 UniformConstant -%86 = OpTypeImage %float Buffer 0 0 0 2 Rgba32f -%_ptr_UniformConstant_86 = OpTypePointer UniformConstant %86 -%fImgBuffer = OpVariable %_ptr_UniformConstant_86 UniformConstant -%89 = OpTypeImage %float 2D 0 0 1 2 Rgba32f -%_ptr_UniformConstant_89 = OpTypePointer UniformConstant %89 -%fImg2DMS = OpVariable %_ptr_UniformConstant_89 UniformConstant -%92 = OpTypeImage %float 2D 0 1 1 2 Rgba32f -%_ptr_UniformConstant_92 = OpTypePointer UniformConstant %92 -%fImg2DMSArray = OpVariable %_ptr_UniformConstant_92 UniformConstant -%95 = OpTypeImage %int 1D 0 0 0 1 Unknown +%209 = OpTypePointer Private %6 +%2 = OpVariable %209 Private +%210 = OpTypeBool +%213 = OpTypeInt 32 1 +%12 = OpTypeImage %213 1D 0 0 0 2 Rgba32i +%214 = OpTypePointer UniformConstant %12 +%4 = OpVariable %214 UniformConstant +%15 = OpTypeImage %213 2D 0 0 0 2 Rgba16i +%217 = OpTypePointer UniformConstant %15 +%7 = OpVariable %217 UniformConstant +%18 = OpTypeImage %213 3D 0 0 0 2 Rgba8i +%218 = OpTypePointer UniformConstant %18 +%8 = OpVariable %218 UniformConstant +%21 = OpTypeImage %213 1D 0 1 0 2 Rgba32i +%221 = OpTypePointer UniformConstant %21 +%9 = OpVariable %221 UniformConstant +%24 = OpTypeImage %213 2D 0 1 0 2 Rgba32i +%222 = OpTypePointer UniformConstant %24 +%11 = OpVariable %222 UniformConstant +%27 = OpTypeImage %213 Cube 0 0 0 2 Rgba32i +%225 = OpTypePointer UniformConstant %27 +%13 = OpVariable %225 UniformConstant +%30 = OpTypeImage %213 Cube 0 1 0 2 Rgba32i +%226 = OpTypePointer UniformConstant %30 +%14 = OpVariable %226 UniformConstant +%33 = OpTypeImage %213 Buffer 0 0 0 2 Rgba32i +%229 = OpTypePointer UniformConstant %33 +%16 = OpVariable %229 UniformConstant +%230 = OpTypeInt 32 0 +%37 = OpTypeImage %230 1D 0 0 0 2 Rgba32ui +%233 = OpTypePointer UniformConstant %37 +%17 = OpVariable %233 UniformConstant +%40 = OpTypeImage %230 2D 0 0 0 2 Rgba16ui +%234 = OpTypePointer UniformConstant %40 +%19 = OpVariable %234 UniformConstant +%43 = OpTypeImage %230 3D 0 0 0 2 Rgba8ui +%237 = OpTypePointer UniformConstant %43 +%20 = OpVariable %237 UniformConstant +%46 = OpTypeImage %230 1D 0 1 0 2 Rgba32ui +%238 = OpTypePointer UniformConstant %46 +%22 = OpVariable %238 UniformConstant +%49 = OpTypeImage %230 2D 0 1 0 2 Rgba32ui +%241 = OpTypePointer UniformConstant %49 +%23 = OpVariable %241 UniformConstant +%52 = OpTypeImage %230 Cube 0 0 0 2 Rgba32ui +%242 = OpTypePointer UniformConstant %52 +%25 = OpVariable %242 UniformConstant +%55 = OpTypeImage %230 Cube 0 1 0 2 Rgba32ui +%245 = OpTypePointer UniformConstant %55 +%26 = OpVariable %245 UniformConstant +%58 = OpTypeImage %230 Buffer 0 0 0 2 Rgba32ui +%246 = OpTypePointer UniformConstant %58 +%28 = OpVariable %246 UniformConstant +%249 = OpTypeFloat 32 +%62 = OpTypeImage %249 1D 0 0 0 2 Rgba32f +%250 = OpTypePointer UniformConstant %62 +%29 = OpVariable %250 UniformConstant +%65 = OpTypeImage %249 2D 0 0 0 2 Rgba16f +%253 = OpTypePointer UniformConstant %65 +%31 = OpVariable %253 UniformConstant +%68 = OpTypeImage %249 3D 0 0 0 2 R32f +%254 = OpTypePointer UniformConstant %68 +%32 = OpVariable %254 UniformConstant +%71 = OpTypeImage %249 Cube 0 0 0 2 Rgba8 +%256 = OpTypePointer UniformConstant %71 +%34 = OpVariable %256 UniformConstant +%74 = OpTypeImage %249 Rect 0 0 0 2 Rgba8Snorm +%257 = OpTypePointer UniformConstant %74 +%35 = OpVariable %257 UniformConstant +%77 = OpTypeImage %249 1D 0 1 0 2 Rgba32f +%258 = OpTypePointer UniformConstant %77 +%36 = OpVariable %258 UniformConstant +%80 = OpTypeImage %249 2D 0 1 0 2 Rgba32f +%259 = OpTypePointer UniformConstant %80 +%38 = OpVariable %259 UniformConstant +%83 = OpTypeImage %249 Cube 0 1 0 2 Rgba32f +%260 = OpTypePointer UniformConstant %83 +%39 = OpVariable %260 UniformConstant +%86 = OpTypeImage %249 Buffer 0 0 0 2 Rgba32f +%261 = OpTypePointer UniformConstant %86 +%41 = OpVariable %261 UniformConstant +%89 = OpTypeImage %249 2D 0 0 1 2 Rgba32f +%262 = OpTypePointer UniformConstant %89 +%42 = OpVariable %262 UniformConstant +%92 = OpTypeImage %249 2D 0 1 1 2 Rgba32f +%263 = OpTypePointer UniformConstant %92 +%44 = OpVariable %263 UniformConstant +%95 = OpTypeImage %213 1D 0 0 0 1 Unknown %96 = OpTypeSampledImage %95 -%_ptr_UniformConstant_96 = OpTypePointer UniformConstant %96 -%iSamp1D = OpVariable %_ptr_UniformConstant_96 UniformConstant -%99 = OpTypeImage %int 2D 0 0 0 1 Unknown +%264 = OpTypePointer UniformConstant %96 +%45 = OpVariable %264 UniformConstant +%99 = OpTypeImage %213 2D 0 0 0 1 Unknown %100 = OpTypeSampledImage %99 -%_ptr_UniformConstant_100 = OpTypePointer UniformConstant %100 -%iSamp2D = OpVariable %_ptr_UniformConstant_100 UniformConstant -%103 = OpTypeImage %int 3D 0 0 0 1 Unknown +%265 = OpTypePointer UniformConstant %100 +%47 = OpVariable %265 UniformConstant +%103 = OpTypeImage %213 3D 0 0 0 1 Unknown %104 = OpTypeSampledImage %103 -%_ptr_UniformConstant_104 = OpTypePointer UniformConstant %104 -%iSamp3D = OpVariable %_ptr_UniformConstant_104 UniformConstant -%107 = OpTypeImage %int Cube 0 0 0 1 Unknown +%266 = OpTypePointer UniformConstant %104 +%48 = OpVariable %266 UniformConstant +%107 = OpTypeImage %213 Cube 0 0 0 1 Unknown %108 = OpTypeSampledImage %107 -%_ptr_UniformConstant_108 = OpTypePointer UniformConstant %108 -%iSampCube = OpVariable %_ptr_UniformConstant_108 UniformConstant -%111 = OpTypeImage %int Rect 0 0 0 1 Unknown +%267 = OpTypePointer UniformConstant %108 +%50 = OpVariable %267 UniformConstant +%111 = OpTypeImage %213 Rect 0 0 0 1 Unknown %112 = OpTypeSampledImage %111 -%_ptr_UniformConstant_112 = OpTypePointer UniformConstant %112 -%iSamp2DRect = OpVariable %_ptr_UniformConstant_112 UniformConstant -%115 = OpTypeImage %int 1D 0 1 0 1 Unknown +%268 = OpTypePointer UniformConstant %112 +%51 = OpVariable %268 UniformConstant +%115 = OpTypeImage %213 1D 0 1 0 1 Unknown %116 = OpTypeSampledImage %115 -%_ptr_UniformConstant_116 = OpTypePointer UniformConstant %116 -%iSamp1DArray = OpVariable %_ptr_UniformConstant_116 UniformConstant -%119 = OpTypeImage %int 2D 0 1 0 1 Unknown +%269 = OpTypePointer UniformConstant %116 +%53 = OpVariable %269 UniformConstant +%119 = OpTypeImage %213 2D 0 1 0 1 Unknown %120 = OpTypeSampledImage %119 -%_ptr_UniformConstant_120 = OpTypePointer UniformConstant %120 -%iSamp2DArray = OpVariable %_ptr_UniformConstant_120 UniformConstant -%123 = OpTypeImage %int Cube 0 1 0 1 Unknown +%270 = OpTypePointer UniformConstant %120 +%54 = OpVariable %270 UniformConstant +%123 = OpTypeImage %213 Cube 0 1 0 1 Unknown %124 = OpTypeSampledImage %123 -%_ptr_UniformConstant_124 = OpTypePointer UniformConstant %124 -%iSampCubeArray = OpVariable %_ptr_UniformConstant_124 UniformConstant -%127 = OpTypeImage %int Buffer 0 0 0 1 Unknown +%271 = OpTypePointer UniformConstant %124 +%56 = OpVariable %271 UniformConstant +%127 = OpTypeImage %213 Buffer 0 0 0 1 Unknown %128 = OpTypeSampledImage %127 -%_ptr_UniformConstant_128 = OpTypePointer UniformConstant %128 -%iSampBuffer = OpVariable %_ptr_UniformConstant_128 UniformConstant -%131 = OpTypeImage %int 2D 0 0 1 1 Unknown +%272 = OpTypePointer UniformConstant %128 +%57 = OpVariable %272 UniformConstant +%131 = OpTypeImage %213 2D 0 0 1 1 Unknown %132 = OpTypeSampledImage %131 -%_ptr_UniformConstant_132 = OpTypePointer UniformConstant %132 -%iSamp2DMS = OpVariable %_ptr_UniformConstant_132 UniformConstant -%135 = OpTypeImage %int 2D 0 1 1 1 Unknown +%273 = OpTypePointer UniformConstant %132 +%59 = OpVariable %273 UniformConstant +%135 = OpTypeImage %213 2D 0 1 1 1 Unknown %136 = OpTypeSampledImage %135 -%_ptr_UniformConstant_136 = OpTypePointer UniformConstant %136 -%iSamp2DMSArray = OpVariable %_ptr_UniformConstant_136 UniformConstant -%139 = OpTypeImage %uint 1D 0 0 0 1 Unknown +%274 = OpTypePointer UniformConstant %136 +%60 = OpVariable %274 UniformConstant +%139 = OpTypeImage %230 1D 0 0 0 1 Unknown %140 = OpTypeSampledImage %139 -%_ptr_UniformConstant_140 = OpTypePointer UniformConstant %140 -%uSamp1D = OpVariable %_ptr_UniformConstant_140 UniformConstant -%143 = OpTypeImage %uint 2D 0 0 0 1 Unknown +%275 = OpTypePointer UniformConstant %140 +%61 = OpVariable %275 UniformConstant +%143 = OpTypeImage %230 2D 0 0 0 1 Unknown %144 = OpTypeSampledImage %143 -%_ptr_UniformConstant_144 = OpTypePointer UniformConstant %144 -%uSamp2D = OpVariable %_ptr_UniformConstant_144 UniformConstant -%147 = OpTypeImage %uint 3D 0 0 0 1 Unknown +%276 = OpTypePointer UniformConstant %144 +%63 = OpVariable %276 UniformConstant +%147 = OpTypeImage %230 3D 0 0 0 1 Unknown %148 = OpTypeSampledImage %147 -%_ptr_UniformConstant_148 = OpTypePointer UniformConstant %148 -%uSamp3D = OpVariable %_ptr_UniformConstant_148 UniformConstant -%151 = OpTypeImage %uint Cube 0 0 0 1 Unknown +%277 = OpTypePointer UniformConstant %148 +%64 = OpVariable %277 UniformConstant +%151 = OpTypeImage %230 Cube 0 0 0 1 Unknown %152 = OpTypeSampledImage %151 -%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152 -%uSampCube = OpVariable %_ptr_UniformConstant_152 UniformConstant -%155 = OpTypeImage %uint Rect 0 0 0 1 Unknown +%278 = OpTypePointer UniformConstant %152 +%66 = OpVariable %278 UniformConstant +%155 = OpTypeImage %230 Rect 0 0 0 1 Unknown %156 = OpTypeSampledImage %155 -%_ptr_UniformConstant_156 = OpTypePointer UniformConstant %156 -%uSamp2DRect = OpVariable %_ptr_UniformConstant_156 UniformConstant -%159 = OpTypeImage %uint 1D 0 1 0 1 Unknown +%279 = OpTypePointer UniformConstant %156 +%67 = OpVariable %279 UniformConstant +%159 = OpTypeImage %230 1D 0 1 0 1 Unknown %160 = OpTypeSampledImage %159 -%_ptr_UniformConstant_160 = OpTypePointer UniformConstant %160 -%uSamp1DArray = OpVariable %_ptr_UniformConstant_160 UniformConstant -%163 = OpTypeImage %uint 2D 0 1 0 1 Unknown +%280 = OpTypePointer UniformConstant %160 +%69 = OpVariable %280 UniformConstant +%163 = OpTypeImage %230 2D 0 1 0 1 Unknown %164 = OpTypeSampledImage %163 -%_ptr_UniformConstant_164 = OpTypePointer UniformConstant %164 -%uSamp2DArray = OpVariable %_ptr_UniformConstant_164 UniformConstant -%167 = OpTypeImage %uint Cube 0 1 0 1 Unknown +%281 = OpTypePointer UniformConstant %164 +%70 = OpVariable %281 UniformConstant +%167 = OpTypeImage %230 Cube 0 1 0 1 Unknown %168 = OpTypeSampledImage %167 -%_ptr_UniformConstant_168 = OpTypePointer UniformConstant %168 -%uSampCubeArray = OpVariable %_ptr_UniformConstant_168 UniformConstant -%171 = OpTypeImage %uint Buffer 0 0 0 1 Unknown +%282 = OpTypePointer UniformConstant %168 +%72 = OpVariable %282 UniformConstant +%171 = OpTypeImage %230 Buffer 0 0 0 1 Unknown %172 = OpTypeSampledImage %171 -%_ptr_UniformConstant_172 = OpTypePointer UniformConstant %172 -%uSampBuffer = OpVariable %_ptr_UniformConstant_172 UniformConstant -%175 = OpTypeImage %uint 2D 0 0 1 1 Unknown +%283 = OpTypePointer UniformConstant %172 +%73 = OpVariable %283 UniformConstant +%175 = OpTypeImage %230 2D 0 0 1 1 Unknown %176 = OpTypeSampledImage %175 -%_ptr_UniformConstant_176 = OpTypePointer UniformConstant %176 -%uSamp2DMS = OpVariable %_ptr_UniformConstant_176 UniformConstant -%179 = OpTypeImage %uint 2D 0 1 1 1 Unknown +%284 = OpTypePointer UniformConstant %176 +%75 = OpVariable %284 UniformConstant +%179 = OpTypeImage %230 2D 0 1 1 1 Unknown %180 = OpTypeSampledImage %179 -%_ptr_UniformConstant_180 = OpTypePointer UniformConstant %180 -%uSamp2DMSArray = OpVariable %_ptr_UniformConstant_180 UniformConstant -%183 = OpTypeImage %float 1D 0 0 0 1 Unknown +%285 = OpTypePointer UniformConstant %180 +%76 = OpVariable %285 UniformConstant +%183 = OpTypeImage %249 1D 0 0 0 1 Unknown %184 = OpTypeSampledImage %183 -%_ptr_UniformConstant_184 = OpTypePointer UniformConstant %184 -%fSamp1D = OpVariable %_ptr_UniformConstant_184 UniformConstant -%187 = OpTypeImage %float 2D 0 0 0 1 Unknown +%286 = OpTypePointer UniformConstant %184 +%78 = OpVariable %286 UniformConstant +%187 = OpTypeImage %249 2D 0 0 0 1 Unknown %188 = OpTypeSampledImage %187 -%_ptr_UniformConstant_188 = OpTypePointer UniformConstant %188 -%fSamp2D = OpVariable %_ptr_UniformConstant_188 UniformConstant -%191 = OpTypeImage %float 3D 0 0 0 1 Unknown +%287 = OpTypePointer UniformConstant %188 +%79 = OpVariable %287 UniformConstant +%191 = OpTypeImage %249 3D 0 0 0 1 Unknown %192 = OpTypeSampledImage %191 -%_ptr_UniformConstant_192 = OpTypePointer UniformConstant %192 -%fSamp3D = OpVariable %_ptr_UniformConstant_192 UniformConstant -%195 = OpTypeImage %float Cube 0 0 0 1 Unknown +%288 = OpTypePointer UniformConstant %192 +%81 = OpVariable %288 UniformConstant +%195 = OpTypeImage %249 Cube 0 0 0 1 Unknown %196 = OpTypeSampledImage %195 -%_ptr_UniformConstant_196 = OpTypePointer UniformConstant %196 -%fSampCube = OpVariable %_ptr_UniformConstant_196 UniformConstant -%199 = OpTypeImage %float Rect 0 0 0 1 Unknown +%289 = OpTypePointer UniformConstant %196 +%82 = OpVariable %289 UniformConstant +%199 = OpTypeImage %249 Rect 0 0 0 1 Unknown %200 = OpTypeSampledImage %199 -%_ptr_UniformConstant_200 = OpTypePointer UniformConstant %200 -%fSamp2DRect = OpVariable %_ptr_UniformConstant_200 UniformConstant -%203 = OpTypeImage %float 1D 0 1 0 1 Unknown +%290 = OpTypePointer UniformConstant %200 +%84 = OpVariable %290 UniformConstant +%203 = OpTypeImage %249 1D 0 1 0 1 Unknown %204 = OpTypeSampledImage %203 -%_ptr_UniformConstant_204 = OpTypePointer UniformConstant %204 -%fSamp1DArray = OpVariable %_ptr_UniformConstant_204 UniformConstant -%207 = OpTypeImage %float 2D 0 1 0 1 Unknown +%291 = OpTypePointer UniformConstant %204 +%85 = OpVariable %291 UniformConstant +%207 = OpTypeImage %249 2D 0 1 0 1 Unknown %208 = OpTypeSampledImage %207 -%_ptr_UniformConstant_208 = OpTypePointer UniformConstant %208 -%fSamp2DArray = OpVariable %_ptr_UniformConstant_208 UniformConstant -%211 = OpTypeImage %float Cube 0 1 0 1 Unknown +%292 = OpTypePointer UniformConstant %208 +%87 = OpVariable %292 UniformConstant +%211 = OpTypeImage %249 Cube 0 1 0 1 Unknown %212 = OpTypeSampledImage %211 -%_ptr_UniformConstant_212 = OpTypePointer UniformConstant %212 -%fSampCubeArray = OpVariable %_ptr_UniformConstant_212 UniformConstant -%215 = OpTypeImage %float Buffer 0 0 0 1 Unknown +%293 = OpTypePointer UniformConstant %212 +%88 = OpVariable %293 UniformConstant +%215 = OpTypeImage %249 Buffer 0 0 0 1 Unknown %216 = OpTypeSampledImage %215 -%_ptr_UniformConstant_216 = OpTypePointer UniformConstant %216 -%fSampBuffer = OpVariable %_ptr_UniformConstant_216 UniformConstant -%219 = OpTypeImage %float 2D 0 0 1 1 Unknown +%294 = OpTypePointer UniformConstant %216 +%90 = OpVariable %294 UniformConstant +%219 = OpTypeImage %249 2D 0 0 1 1 Unknown %220 = OpTypeSampledImage %219 -%_ptr_UniformConstant_220 = OpTypePointer UniformConstant %220 -%fSamp2DMS = OpVariable %_ptr_UniformConstant_220 UniformConstant -%223 = OpTypeImage %float 2D 0 1 1 1 Unknown +%295 = OpTypePointer UniformConstant %220 +%91 = OpVariable %295 UniformConstant +%223 = OpTypeImage %249 2D 0 1 1 1 Unknown %224 = OpTypeSampledImage %223 -%_ptr_UniformConstant_224 = OpTypePointer UniformConstant %224 -%fSamp2DMSArray = OpVariable %_ptr_UniformConstant_224 UniformConstant -%227 = OpTypeImage %float 1D 1 0 0 1 Unknown +%296 = OpTypePointer UniformConstant %224 +%93 = OpVariable %296 UniformConstant +%227 = OpTypeImage %249 1D 1 0 0 1 Unknown %228 = OpTypeSampledImage %227 -%_ptr_UniformConstant_228 = OpTypePointer UniformConstant %228 -%dsSamp1D = OpVariable %_ptr_UniformConstant_228 UniformConstant -%231 = OpTypeImage %float 2D 1 0 0 1 Unknown +%297 = OpTypePointer UniformConstant %228 +%94 = OpVariable %297 UniformConstant +%231 = OpTypeImage %249 2D 1 0 0 1 Unknown %232 = OpTypeSampledImage %231 -%_ptr_UniformConstant_232 = OpTypePointer UniformConstant %232 -%dsSamp2D = OpVariable %_ptr_UniformConstant_232 UniformConstant -%235 = OpTypeImage %float Cube 1 0 0 1 Unknown +%298 = OpTypePointer UniformConstant %232 +%97 = OpVariable %298 UniformConstant +%235 = OpTypeImage %249 Cube 1 0 0 1 Unknown %236 = OpTypeSampledImage %235 -%_ptr_UniformConstant_236 = OpTypePointer UniformConstant %236 -%dsSampCube = OpVariable %_ptr_UniformConstant_236 UniformConstant -%239 = OpTypeImage %float Rect 1 0 0 1 Unknown +%299 = OpTypePointer UniformConstant %236 +%98 = OpVariable %299 UniformConstant +%239 = OpTypeImage %249 Rect 1 0 0 1 Unknown %240 = OpTypeSampledImage %239 -%_ptr_UniformConstant_240 = OpTypePointer UniformConstant %240 -%dsSamp2DRect = OpVariable %_ptr_UniformConstant_240 UniformConstant -%243 = OpTypeImage %float 1D 1 1 0 1 Unknown +%300 = OpTypePointer UniformConstant %240 +%101 = OpVariable %300 UniformConstant +%243 = OpTypeImage %249 1D 1 1 0 1 Unknown %244 = OpTypeSampledImage %243 -%_ptr_UniformConstant_244 = OpTypePointer UniformConstant %244 -%dsSamp1DArray = OpVariable %_ptr_UniformConstant_244 UniformConstant -%247 = OpTypeImage %float 2D 1 1 0 1 Unknown +%301 = OpTypePointer UniformConstant %244 +%102 = OpVariable %301 UniformConstant +%247 = OpTypeImage %249 2D 1 1 0 1 Unknown %248 = OpTypeSampledImage %247 -%_ptr_UniformConstant_248 = OpTypePointer UniformConstant %248 -%dsSamp2DArray = OpVariable %_ptr_UniformConstant_248 UniformConstant -%251 = OpTypeImage %float Cube 1 1 0 1 Unknown +%302 = OpTypePointer UniformConstant %248 +%105 = OpVariable %302 UniformConstant +%251 = OpTypeImage %249 Cube 1 1 0 1 Unknown %252 = OpTypeSampledImage %251 -%_ptr_UniformConstant_252 = OpTypePointer UniformConstant %252 -%dsSampCubeArray = OpVariable %_ptr_UniformConstant_252 UniformConstant +%303 = OpTypePointer UniformConstant %252 +%106 = OpVariable %303 UniformConstant %255 = OpTypeSampler -%_ptr_UniformConstant_255 = OpTypePointer UniformConstant %255 -%samp = OpVariable %_ptr_UniformConstant_255 UniformConstant -%sampShadow = OpVariable %_ptr_UniformConstant_255 UniformConstant -%_ptr_UniformConstant_95 = OpTypePointer UniformConstant %95 -%iTex1D = OpVariable %_ptr_UniformConstant_95 UniformConstant -%_ptr_UniformConstant_99 = OpTypePointer UniformConstant %99 -%iTex2D = OpVariable %_ptr_UniformConstant_99 UniformConstant -%_ptr_UniformConstant_103 = OpTypePointer UniformConstant %103 -%iTex3D = OpVariable %_ptr_UniformConstant_103 UniformConstant -%_ptr_UniformConstant_107 = OpTypePointer UniformConstant %107 -%iTexCube = OpVariable %_ptr_UniformConstant_107 UniformConstant -%_ptr_UniformConstant_111 = OpTypePointer UniformConstant %111 -%iTex2DRect = OpVariable %_ptr_UniformConstant_111 UniformConstant -%_ptr_UniformConstant_115 = OpTypePointer UniformConstant %115 -%iTex1DArray = OpVariable %_ptr_UniformConstant_115 UniformConstant -%_ptr_UniformConstant_119 = OpTypePointer UniformConstant %119 -%iTex2DArray = OpVariable %_ptr_UniformConstant_119 UniformConstant -%_ptr_UniformConstant_123 = OpTypePointer UniformConstant %123 -%iTexCubeArray = OpVariable %_ptr_UniformConstant_123 UniformConstant -%_ptr_UniformConstant_127 = OpTypePointer UniformConstant %127 -%iTexBuffer = OpVariable %_ptr_UniformConstant_127 UniformConstant -%_ptr_UniformConstant_131 = OpTypePointer UniformConstant %131 -%iTex2DMS = OpVariable %_ptr_UniformConstant_131 UniformConstant -%_ptr_UniformConstant_135 = OpTypePointer UniformConstant %135 -%iTex2DMSArray = OpVariable %_ptr_UniformConstant_135 UniformConstant -%_ptr_UniformConstant_139 = OpTypePointer UniformConstant %139 -%uTex1D = OpVariable %_ptr_UniformConstant_139 UniformConstant -%_ptr_UniformConstant_143 = OpTypePointer UniformConstant %143 -%uTex2D = OpVariable %_ptr_UniformConstant_143 UniformConstant -%_ptr_UniformConstant_147 = OpTypePointer UniformConstant %147 -%uTex3D = OpVariable %_ptr_UniformConstant_147 UniformConstant -%_ptr_UniformConstant_151 = OpTypePointer UniformConstant %151 -%uTexCube = OpVariable %_ptr_UniformConstant_151 UniformConstant -%_ptr_UniformConstant_155 = OpTypePointer UniformConstant %155 -%uTex2DRect = OpVariable %_ptr_UniformConstant_155 UniformConstant -%_ptr_UniformConstant_159 = OpTypePointer UniformConstant %159 -%uTex1DArray = OpVariable %_ptr_UniformConstant_159 UniformConstant -%_ptr_UniformConstant_163 = OpTypePointer UniformConstant %163 -%uTex2DArray = OpVariable %_ptr_UniformConstant_163 UniformConstant -%_ptr_UniformConstant_167 = OpTypePointer UniformConstant %167 -%uTexCubeArray = OpVariable %_ptr_UniformConstant_167 UniformConstant -%_ptr_UniformConstant_171 = OpTypePointer UniformConstant %171 -%uTexBuffer = OpVariable %_ptr_UniformConstant_171 UniformConstant -%_ptr_UniformConstant_175 = OpTypePointer UniformConstant %175 -%uTex2DMS = OpVariable %_ptr_UniformConstant_175 UniformConstant -%_ptr_UniformConstant_179 = OpTypePointer UniformConstant %179 -%uTex2DMSArray = OpVariable %_ptr_UniformConstant_179 UniformConstant -%_ptr_UniformConstant_183 = OpTypePointer UniformConstant %183 -%fTex1D = OpVariable %_ptr_UniformConstant_183 UniformConstant -%_ptr_UniformConstant_187 = OpTypePointer UniformConstant %187 -%fTex2D = OpVariable %_ptr_UniformConstant_187 UniformConstant -%_ptr_UniformConstant_191 = OpTypePointer UniformConstant %191 -%fTex3D = OpVariable %_ptr_UniformConstant_191 UniformConstant -%_ptr_UniformConstant_195 = OpTypePointer UniformConstant %195 -%fTexCube = OpVariable %_ptr_UniformConstant_195 UniformConstant -%_ptr_UniformConstant_199 = OpTypePointer UniformConstant %199 -%fTex2DRect = OpVariable %_ptr_UniformConstant_199 UniformConstant -%_ptr_UniformConstant_203 = OpTypePointer UniformConstant %203 -%fTex1DArray = OpVariable %_ptr_UniformConstant_203 UniformConstant -%_ptr_UniformConstant_207 = OpTypePointer UniformConstant %207 -%fTex2DArray = OpVariable %_ptr_UniformConstant_207 UniformConstant -%_ptr_UniformConstant_211 = OpTypePointer UniformConstant %211 -%fTexCubeArray = OpVariable %_ptr_UniformConstant_211 UniformConstant -%_ptr_UniformConstant_215 = OpTypePointer UniformConstant %215 -%fTexBuffer = OpVariable %_ptr_UniformConstant_215 UniformConstant -%_ptr_UniformConstant_219 = OpTypePointer UniformConstant %219 -%fTex2DMS = OpVariable %_ptr_UniformConstant_219 UniformConstant -%_ptr_UniformConstant_223 = OpTypePointer UniformConstant %223 -%fTex2DMSArray = OpVariable %_ptr_UniformConstant_223 UniformConstant -%v2int = OpTypeVector %int 2 -%v3int = OpTypeVector %int 3 -%v4int = OpTypeVector %int 4 -%v2uint = OpTypeVector %uint 2 -%v3uint = OpTypeVector %uint 3 -%v4uint = OpTypeVector %uint 4 -%v2float = OpTypeVector %float 2 -%v3float = OpTypeVector %float 3 -%v4float = OpTypeVector %float 4 -%mat2v2float = OpTypeMatrix %v2float 2 -%mat2v3float = OpTypeMatrix %v3float 2 -%mat2v4float = OpTypeMatrix %v4float 2 -%mat3v2float = OpTypeMatrix %v2float 3 -%mat3v3float = OpTypeMatrix %v3float 3 -%mat3v4float = OpTypeMatrix %v4float 3 -%mat4v2float = OpTypeMatrix %v2float 4 -%mat4v3float = OpTypeMatrix %v3float 4 -%mat4v4float = OpTypeMatrix %v4float 4 -%double = OpTypeFloat 64 -%v2double = OpTypeVector %double 2 -%v3double = OpTypeVector %double 3 -%v4double = OpTypeVector %double 4 -%mat2v2double = OpTypeMatrix %v2double 2 -%mat2v3double = OpTypeMatrix %v3double 2 -%mat2v4double = OpTypeMatrix %v4double 2 -%mat3v2double = OpTypeMatrix %v2double 3 -%mat3v3double = OpTypeMatrix %v3double 3 -%mat3v4double = OpTypeMatrix %v4double 3 -%mat4v2double = OpTypeMatrix %v2double 4 -%mat4v3double = OpTypeMatrix %v3double 4 -%mat4v4double = OpTypeMatrix %v4double 4 -%Data = OpTypeStruct %int %v2int %v3int %v4int %uint %v2uint %v3uint %v4uint %float %v2float %v3float %v4float %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %double %v2double %v3double %v4double %mat2v2double %mat2v3double %mat2v4double %mat3v2double %mat3v3double %mat3v4double %mat4v2double %mat4v3double %mat4v4double -%uint_4 = OpConstant %uint 4 -%_arr_Data_uint_4 = OpTypeArray %Data %uint_4 -%Ubo = OpTypeStruct %_arr_Data_uint_4 -%uint_1 = OpConstant %uint 1 -%_arr_Ubo_uint_1 = OpTypeArray %Ubo %uint_1 -%_ptr_Uniform__arr_Ubo_uint_1 = OpTypePointer Uniform %_arr_Ubo_uint_1 -%ubo = OpVariable %_ptr_Uniform__arr_Ubo_uint_1 Uniform -%_runtimearr_int = OpTypeRuntimeArray %int -%Ssbo = OpTypeStruct %_runtimearr_int -%_ptr_StorageBuffer_Ssbo = OpTypePointer StorageBuffer %Ssbo -%ssbo = OpVariable %_ptr_StorageBuffer_Ssbo StorageBuffer -%368 = OpTypeImage %int SubpassData 0 0 0 2 Unknown -%_ptr_UniformConstant_368 = OpTypePointer UniformConstant %368 -%iAttm = OpVariable %_ptr_UniformConstant_368 UniformConstant -%371 = OpTypeImage %int SubpassData 0 0 1 2 Unknown -%_ptr_UniformConstant_371 = OpTypePointer UniformConstant %371 -%iAttmMS = OpVariable %_ptr_UniformConstant_371 UniformConstant -%374 = OpTypeImage %uint SubpassData 0 0 0 2 Unknown -%_ptr_UniformConstant_374 = OpTypePointer UniformConstant %374 -%uAttm = OpVariable %_ptr_UniformConstant_374 UniformConstant -%377 = OpTypeImage %uint SubpassData 0 0 1 2 Unknown -%_ptr_UniformConstant_377 = OpTypePointer UniformConstant %377 -%uAttmMS = OpVariable %_ptr_UniformConstant_377 UniformConstant -%380 = OpTypeImage %float SubpassData 0 0 0 2 Unknown -%_ptr_UniformConstant_380 = OpTypePointer UniformConstant %380 -%fAttm = OpVariable %_ptr_UniformConstant_380 UniformConstant -%383 = OpTypeImage %float SubpassData 0 0 1 2 Unknown -%_ptr_UniformConstant_383 = OpTypePointer UniformConstant %383 -%fAttmMS = OpVariable %_ptr_UniformConstant_383 UniformConstant +%304 = OpTypePointer UniformConstant %255 +%109 = OpVariable %304 UniformConstant +%110 = OpVariable %304 UniformConstant +%305 = OpTypePointer UniformConstant %95 +%113 = OpVariable %305 UniformConstant +%306 = OpTypePointer UniformConstant %99 +%114 = OpVariable %306 UniformConstant +%307 = OpTypePointer UniformConstant %103 +%117 = OpVariable %307 UniformConstant +%308 = OpTypePointer UniformConstant %107 +%118 = OpVariable %308 UniformConstant +%309 = OpTypePointer UniformConstant %111 +%121 = OpVariable %309 UniformConstant +%310 = OpTypePointer UniformConstant %115 +%122 = OpVariable %310 UniformConstant +%311 = OpTypePointer UniformConstant %119 +%125 = OpVariable %311 UniformConstant +%312 = OpTypePointer UniformConstant %123 +%126 = OpVariable %312 UniformConstant +%313 = OpTypePointer UniformConstant %127 +%129 = OpVariable %313 UniformConstant +%314 = OpTypePointer UniformConstant %131 +%130 = OpVariable %314 UniformConstant +%315 = OpTypePointer UniformConstant %135 +%133 = OpVariable %315 UniformConstant +%316 = OpTypePointer UniformConstant %139 +%134 = OpVariable %316 UniformConstant +%317 = OpTypePointer UniformConstant %143 +%137 = OpVariable %317 UniformConstant +%318 = OpTypePointer UniformConstant %147 +%138 = OpVariable %318 UniformConstant +%319 = OpTypePointer UniformConstant %151 +%141 = OpVariable %319 UniformConstant +%320 = OpTypePointer UniformConstant %155 +%142 = OpVariable %320 UniformConstant +%321 = OpTypePointer UniformConstant %159 +%145 = OpVariable %321 UniformConstant +%322 = OpTypePointer UniformConstant %163 +%146 = OpVariable %322 UniformConstant +%323 = OpTypePointer UniformConstant %167 +%149 = OpVariable %323 UniformConstant +%324 = OpTypePointer UniformConstant %171 +%150 = OpVariable %324 UniformConstant +%325 = OpTypePointer UniformConstant %175 +%153 = OpVariable %325 UniformConstant +%326 = OpTypePointer UniformConstant %179 +%154 = OpVariable %326 UniformConstant +%327 = OpTypePointer UniformConstant %183 +%157 = OpVariable %327 UniformConstant +%328 = OpTypePointer UniformConstant %187 +%158 = OpVariable %328 UniformConstant +%329 = OpTypePointer UniformConstant %191 +%161 = OpVariable %329 UniformConstant +%330 = OpTypePointer UniformConstant %195 +%162 = OpVariable %330 UniformConstant +%331 = OpTypePointer UniformConstant %199 +%165 = OpVariable %331 UniformConstant +%332 = OpTypePointer UniformConstant %203 +%166 = OpVariable %332 UniformConstant +%333 = OpTypePointer UniformConstant %207 +%169 = OpVariable %333 UniformConstant +%334 = OpTypePointer UniformConstant %211 +%170 = OpVariable %334 UniformConstant +%335 = OpTypePointer UniformConstant %215 +%173 = OpVariable %335 UniformConstant +%336 = OpTypePointer UniformConstant %219 +%174 = OpVariable %336 UniformConstant +%337 = OpTypePointer UniformConstant %223 +%177 = OpVariable %337 UniformConstant +%338 = OpTypeVector %213 2 +%339 = OpTypeVector %213 3 +%340 = OpTypeVector %213 4 +%341 = OpTypeVector %230 2 +%342 = OpTypeVector %230 3 +%343 = OpTypeVector %230 4 +%344 = OpTypeVector %249 2 +%345 = OpTypeVector %249 3 +%346 = OpTypeVector %249 4 +%347 = OpTypeMatrix %344 2 +%348 = OpTypeMatrix %345 2 +%349 = OpTypeMatrix %346 2 +%350 = OpTypeMatrix %344 3 +%351 = OpTypeMatrix %345 3 +%352 = OpTypeMatrix %346 3 +%353 = OpTypeMatrix %344 4 +%354 = OpTypeMatrix %345 4 +%355 = OpTypeMatrix %346 4 +%356 = OpTypeFloat 64 +%357 = OpTypeVector %356 2 +%358 = OpTypeVector %356 3 +%359 = OpTypeVector %356 4 +%360 = OpTypeMatrix %357 2 +%361 = OpTypeMatrix %358 2 +%362 = OpTypeMatrix %359 2 +%363 = OpTypeMatrix %357 3 +%364 = OpTypeMatrix %358 3 +%365 = OpTypeMatrix %359 3 +%366 = OpTypeMatrix %357 4 +%367 = OpTypeMatrix %358 4 +%369 = OpTypeMatrix %359 4 +%197 = OpTypeStruct %213 %338 %339 %340 %230 %341 %342 %343 %249 %344 %345 %346 %347 %348 %349 %350 %351 %352 %353 %354 %355 %356 %357 %358 %359 %360 %361 %362 %363 %364 %365 %366 %367 %369 +%370 = OpConstant %230 4 +%202 = OpTypeArray %197 %370 +%198 = OpTypeStruct %202 +%372 = OpConstant %230 1 +%373 = OpTypeArray %198 %372 +%375 = OpTypePointer Uniform %373 +%178 = OpVariable %375 Uniform +%205 = OpTypeRuntimeArray %213 +%201 = OpTypeStruct %205 +%376 = OpTypePointer StorageBuffer %201 +%181 = OpVariable %376 StorageBuffer +%368 = OpTypeImage %213 SubpassData 0 0 0 2 Unknown +%378 = OpTypePointer UniformConstant %368 +%182 = OpVariable %378 UniformConstant +%371 = OpTypeImage %213 SubpassData 0 0 1 2 Unknown +%379 = OpTypePointer UniformConstant %371 +%185 = OpVariable %379 UniformConstant +%374 = OpTypeImage %230 SubpassData 0 0 0 2 Unknown +%381 = OpTypePointer UniformConstant %374 +%186 = OpVariable %381 UniformConstant +%377 = OpTypeImage %230 SubpassData 0 0 1 2 Unknown +%382 = OpTypePointer UniformConstant %377 +%189 = OpVariable %382 UniformConstant +%380 = OpTypeImage %249 SubpassData 0 0 0 2 Unknown +%384 = OpTypePointer UniformConstant %380 +%190 = OpVariable %384 UniformConstant +%383 = OpTypeImage %249 SubpassData 0 0 1 2 Unknown +%385 = OpTypePointer UniformConstant %383 +%193 = OpVariable %385 UniformConstant %386 = OpTypeAccelerationStructureKHR -%_ptr_UniformConstant_386 = OpTypePointer UniformConstant %386 -%acc = OpVariable %_ptr_UniformConstant_386 UniformConstant -%char = OpTypeInt 8 1 -%char_1 = OpConstant %char 1 -%short = OpTypeInt 16 1 -%short_1 = OpConstant %short 1 -%int_1 = OpConstant %int 1 -%long = OpTypeInt 64 1 -%long_1 = OpConstant %long 1 -%uchar = OpTypeInt 8 0 -%uchar_1 = OpConstant %uchar 1 -%ushort = OpTypeInt 16 0 -%ushort_1 = OpConstant %ushort 1 -%ulong = OpTypeInt 64 0 -%ulong_1 = OpConstant %ulong 1 -%half = OpTypeFloat 16 -%half_0x1pn2 = OpConstant %half 0x1p-2 -%float_1 = OpConstant %float 1 -%double_1 = OpConstant %double 1 -%main = OpFunction %void None %3 +%387 = OpTypePointer UniformConstant %386 +%194 = OpVariable %387 UniformConstant +%388 = OpTypeInt 8 1 +%389 = OpConstant %388 1 +%390 = OpTypeInt 16 1 +%391 = OpConstant %390 1 +%392 = OpConstant %213 1 +%393 = OpTypeInt 64 1 +%394 = OpConstant %393 1 +%395 = OpTypeInt 8 0 +%396 = OpConstant %395 1 +%397 = OpTypeInt 16 0 +%398 = OpConstant %397 1 +%399 = OpTypeInt 64 0 +%400 = OpConstant %399 1 +%401 = OpTypeFloat 16 +%402 = OpConstant %401 0x1p-2 +%403 = OpConstant %249 1 +%404 = OpConstant %356 1 +%0 = OpFunction %206 None %3 %5 = OpLabel -%10 = OpRayQueryProceedKHR %bool %ray_query +%10 = OpRayQueryProceedKHR %210 %2 OpReturn OpFunctionEnd \ No newline at end of file From 239d664b022a5acfcfd953e7633984acc39dc48d Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 21:20:40 +0800 Subject: [PATCH 45/50] x --- .github/workflows/rust.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 74b9015..28e7692 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,15 +27,34 @@ jobs: spirq-core spirq-dis spirq-spvasm - - name: Cargo build and test - id: cargo_build_and_test + - name: Cargo Format + id: cargo_format run: | cargo fmt -- --check + - name: Cargo build + id: cargo_build + run: | cargo build --verbose + - name: Assemble-disassemble Roundtrip + id: cargo_build_and_test + run: | + cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv + cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent --raw-id + git diff --exit-code --binary + + - name: Cargo test + id: cargo_test + run: | cargo test --verbose + - name: Run SPIR-Q examples + id: spirq_examples + run: | cargo run --example gallery > spirq/examples/gallery/main.log cargo run --example inspect > spirq/examples/inspect/main.log cargo run --example walk > spirq/examples/walk/main.log + - name: Run shader-reflect + id: shader_reflect + run: | cargo run -p shader-reflect assets/gallery.frag -o assets/gallery.frag.json --reference-all-resources cargo run -p shader-reflect assets/gallery.frag.spv -o assets/gallery.frag.spv.json --reference-all-resources diff assets/gallery.frag.json assets/gallery.frag.spv.json @@ -43,6 +62,3 @@ jobs: cargo run -p shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources - cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv - cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent --raw-id - git diff --exit-code --binary From 9a1da052d8a79f7f2be4f5f0fe3bd2e467675dab Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 21:42:00 +0800 Subject: [PATCH 46/50] x --- .github/workflows/rust.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 28e7692..ad77391 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -40,7 +40,15 @@ jobs: run: | cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent --raw-id - git diff --exit-code --binary + echo git diff --exit-code --binary + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4.0.0 + with: + # Artifact name + name: gallery.frag.spv + # A file, directory or wildcard pattern that describes what to upload + path: assets/gallery.frag.spv - name: Cargo test id: cargo_test From a97551e549fae876b5e21cff3f073ced80c062e6 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 21:59:45 +0800 Subject: [PATCH 47/50] Ensure the SPIR-V strings are properly padded --- Cargo.lock | 1 - spirq-core/src/parse/instr.rs | 8 +++++++- spirq-spvasm/Cargo.toml | 1 - spirq-spvasm/src/asm/assembler.rs | 2 -- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da61af9..0a8fd40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -430,7 +430,6 @@ version = "0.1.0" dependencies = [ "anyhow", "half", - "inline-spirv", "num-traits", "pretty_assertions", "spirq", diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index b6eb61c..4896813 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -174,7 +174,13 @@ impl InstructionBuilder { let cstr = CString::new(x).unwrap(); let bytes = cstr.as_bytes(); let words = bytes.len() / 4 + 1; - let ptr = cstr.as_ptr() as *const u32; + // Pad the string with zeros. + let bytes = { + let mut out = bytes.to_owned(); + out.resize(words * 4, 0); + out + }; + let ptr = bytes.as_ptr() as *const u32; let slice = unsafe { std::slice::from_raw_parts(ptr, words) }; self.inner.extend_from_slice(slice); self diff --git a/spirq-spvasm/Cargo.toml b/spirq-spvasm/Cargo.toml index f2269c0..ffb2f08 100644 --- a/spirq-spvasm/Cargo.toml +++ b/spirq-spvasm/Cargo.toml @@ -25,5 +25,4 @@ spirq = { version = "1.0.0", path = "../spirq"} half = { version = "2.3", features = ["num-traits"] } [dev-dependencies] -inline-spirv = "0.1" pretty_assertions = "1.4" diff --git a/spirq-spvasm/src/asm/assembler.rs b/spirq-spvasm/src/asm/assembler.rs index 1d9c5be..4b21172 100644 --- a/spirq-spvasm/src/asm/assembler.rs +++ b/spirq-spvasm/src/asm/assembler.rs @@ -636,8 +636,6 @@ impl Assembler { ]; spv.extend(buf); - dbg!(&self.name2id, &self.used_ids); - let out = SpirvBinary::from(spv); Ok(out) } From ce2f5548a42d58106d869944d00fd8aaa6e562e7 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 22:21:08 +0800 Subject: [PATCH 48/50] Avoid unsafe code --- .github/workflows/rust.yml | 25 +- Cargo.lock | 7 + assets/gallery.frag.spvasm | 1690 ++++++++++++++++----------------- spirq-core/Cargo.toml | 1 + spirq-core/src/parse/instr.rs | 27 +- 5 files changed, 876 insertions(+), 874 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ad77391..546ea18 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,39 +27,29 @@ jobs: spirq-core spirq-dis spirq-spvasm + - name: Cargo Format id: cargo_format run: | cargo fmt -- --check + - name: Cargo build id: cargo_build run: | cargo build --verbose - - name: Assemble-disassemble Roundtrip - id: cargo_build_and_test - run: | - cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv - cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent --raw-id - echo git diff --exit-code --binary - - - name: Upload a Build Artifact - uses: actions/upload-artifact@v4.0.0 - with: - # Artifact name - name: gallery.frag.spv - # A file, directory or wildcard pattern that describes what to upload - path: assets/gallery.frag.spv - name: Cargo test id: cargo_test run: | cargo test --verbose + - name: Run SPIR-Q examples id: spirq_examples run: | cargo run --example gallery > spirq/examples/gallery/main.log cargo run --example inspect > spirq/examples/inspect/main.log cargo run --example walk > spirq/examples/walk/main.log + - name: Run shader-reflect id: shader_reflect run: | @@ -70,3 +60,10 @@ jobs: cargo run -p shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources + + - name: Assemble-disassemble Roundtrip + id: cargo_build_and_test + run: | + cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv + cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent + echo git diff --exit-code --binary diff --git a/Cargo.lock b/Cargo.lock index 0a8fd40..7d6743d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,6 +20,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" + [[package]] name = "byteorder" version = "1.4.3" @@ -408,6 +414,7 @@ name = "spirq-core" version = "1.0.0" dependencies = [ "anyhow", + "bytemuck", "fnv", "half", "num-traits", diff --git a/assets/gallery.frag.spvasm b/assets/gallery.frag.spvasm index 3794f68..54bdbed 100644 --- a/assets/gallery.frag.spvasm +++ b/assets/gallery.frag.spvasm @@ -24,8 +24,8 @@ OpCapability RayQueryKHR OpExtension "SPV_KHR_ray_query" %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %0 "main" %2 %4 %7 %8 %9 %11 %13 %14 %16 %17 %19 %20 %22 %23 %25 %26 %28 %29 %31 %32 %34 %35 %36 %38 %39 %41 %42 %44 %45 %47 %48 %50 %51 %53 %54 %56 %57 %59 %60 %61 %63 %64 %66 %67 %69 %70 %72 %73 %75 %76 %78 %79 %81 %82 %84 %85 %87 %88 %90 %91 %93 %94 %97 %98 %101 %102 %105 %106 %109 %110 %113 %114 %117 %118 %121 %122 %125 %126 %129 %130 %133 %134 %137 %138 %141 %142 %145 %146 %149 %150 %153 %154 %157 %158 %161 %162 %165 %166 %169 %170 %173 %174 %177 %178 %181 %182 %185 %186 %189 %190 %193 %194 -OpExecutionMode %0 OriginUpperLeft +OpEntryPoint Fragment %main "main" %ray_query %iImg1d %iImg2d %iImg3d %iImg1dArr %iImg2dArr %iImgCube %iImgCubeArr %iImgBuf %uImg1d %uImg2d %uImg3d %uImg1dArr %uImg2dArr %uImgCube %uImgCubeArr %uImgBuf %fImg1D %fImg2D %fImg3D %fImgCube %fImg2DRect %fImg1DArray %fImg2DArray %fImgCubeArray %fImgBuffer %fImg2DMS %fImg2DMSArray %iSamp1D %iSamp2D %iSamp3D %iSampCube %iSamp2DRect %iSamp1DArray %iSamp2DArray %iSampCubeArray %iSampBuffer %iSamp2DMS %iSamp2DMSArray %uSamp1D %uSamp2D %uSamp3D %uSampCube %uSamp2DRect %uSamp1DArray %uSamp2DArray %uSampCubeArray %uSampBuffer %uSamp2DMS %uSamp2DMSArray %fSamp1D %fSamp2D %fSamp3D %fSampCube %fSamp2DRect %fSamp1DArray %fSamp2DArray %fSampCubeArray %fSampBuffer %fSamp2DMS %fSamp2DMSArray %dsSamp1D %dsSamp2D %dsSampCube %dsSamp2DRect %dsSamp1DArray %dsSamp2DArray %dsSampCubeArray %samp %sampShadow %iTex1D %iTex2D %iTex3D %iTexCube %iTex2DRect %iTex1DArray %iTex2DArray %iTexCubeArray %iTexBuffer %iTex2DMS %iTex2DMSArray %uTex1D %uTex2D %uTex3D %uTexCube %uTex2DRect %uTex1DArray %uTex2DArray %uTexCubeArray %uTexBuffer %uTex2DMS %uTex2DMSArray %fTex1D %fTex2D %fTex3D %fTexCube %fTex2DRect %fTex1DArray %fTex2DArray %fTexCubeArray %fTexBuffer %fTex2DMS %fTex2DMSArray %ubo %ssbo %iAttm %iAttmMS %uAttm %uAttmMS %fAttm %fAttmMS %acc +OpExecutionMode %main OriginUpperLeft OpSource GLSL 460 OpSourceExtension "GL_EXT_ray_query" OpSourceExtension "GL_EXT_ray_tracing" @@ -36,892 +36,892 @@ OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16" OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32" OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64" OpSourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8" -OpName %0 "main" -OpName %2 "ray_query" -OpName %4 "iImg1d" -OpName %7 "iImg2d" -OpName %8 "iImg3d" -OpName %9 "iImg1dArr" -OpName %11 "iImg2dArr" -OpName %13 "iImgCube" -OpName %14 "iImgCubeArr" -OpName %16 "iImgBuf" -OpName %17 "uImg1d" -OpName %19 "uImg2d" -OpName %20 "uImg3d" -OpName %22 "uImg1dArr" -OpName %23 "uImg2dArr" -OpName %25 "uImgCube" -OpName %26 "uImgCubeArr" -OpName %28 "uImgBuf" -OpName %29 "fImg1D" -OpName %31 "fImg2D" -OpName %32 "fImg3D" -OpName %34 "fImgCube" -OpName %35 "fImg2DRect" -OpName %36 "fImg1DArray" -OpName %38 "fImg2DArray" -OpName %39 "fImgCubeArray" -OpName %41 "fImgBuffer" -OpName %42 "fImg2DMS" -OpName %44 "fImg2DMSArray" -OpName %45 "iSamp1D" -OpName %47 "iSamp2D" -OpName %48 "iSamp3D" -OpName %50 "iSampCube" -OpName %51 "iSamp2DRect" -OpName %53 "iSamp1DArray" -OpName %54 "iSamp2DArray" -OpName %56 "iSampCubeArray" -OpName %57 "iSampBuffer" -OpName %59 "iSamp2DMS" -OpName %60 "iSamp2DMSArray" -OpName %61 "uSamp1D" -OpName %63 "uSamp2D" -OpName %64 "uSamp3D" -OpName %66 "uSampCube" -OpName %67 "uSamp2DRect" -OpName %69 "uSamp1DArray" -OpName %70 "uSamp2DArray" -OpName %72 "uSampCubeArray" -OpName %73 "uSampBuffer" -OpName %75 "uSamp2DMS" -OpName %76 "uSamp2DMSArray" -OpName %78 "fSamp1D" -OpName %79 "fSamp2D" -OpName %81 "fSamp3D" -OpName %82 "fSampCube" -OpName %84 "fSamp2DRect" -OpName %85 "fSamp1DArray" -OpName %87 "fSamp2DArray" -OpName %88 "fSampCubeArray" -OpName %90 "fSampBuffer" -OpName %91 "fSamp2DMS" -OpName %93 "fSamp2DMSArray" -OpName %94 "dsSamp1D" -OpName %97 "dsSamp2D" -OpName %98 "dsSampCube" -OpName %101 "dsSamp2DRect" -OpName %102 "dsSamp1DArray" -OpName %105 "dsSamp2DArray" -OpName %106 "dsSampCubeArray" -OpName %109 "samp" -OpName %110 "sampShadow" -OpName %113 "iTex1D" -OpName %114 "iTex2D" -OpName %117 "iTex3D" -OpName %118 "iTexCube" -OpName %121 "iTex2DRect" -OpName %122 "iTex1DArray" -OpName %125 "iTex2DArray" -OpName %126 "iTexCubeArray" -OpName %129 "iTexBuffer" -OpName %130 "iTex2DMS" -OpName %133 "iTex2DMSArray" -OpName %134 "uTex1D" -OpName %137 "uTex2D" -OpName %138 "uTex3D" -OpName %141 "uTexCube" -OpName %142 "uTex2DRect" -OpName %145 "uTex1DArray" -OpName %146 "uTex2DArray" -OpName %149 "uTexCubeArray" -OpName %150 "uTexBuffer" -OpName %153 "uTex2DMS" -OpName %154 "uTex2DMSArray" -OpName %157 "fTex1D" -OpName %158 "fTex2D" -OpName %161 "fTex3D" -OpName %162 "fTexCube" -OpName %165 "fTex2DRect" -OpName %166 "fTex1DArray" -OpName %169 "fTex2DArray" -OpName %170 "fTexCubeArray" -OpName %173 "fTexBuffer" -OpName %174 "fTex2DMS" -OpName %177 "fTex2DMSArray" -OpName %197 "Data" -OpMemberName %197 0 "i0" -OpMemberName %197 1 "i1" -OpMemberName %197 2 "i2" -OpMemberName %197 3 "i3" -OpMemberName %197 4 "u0" -OpMemberName %197 5 "u1" -OpMemberName %197 6 "u2" -OpMemberName %197 7 "u3" -OpMemberName %197 8 "f0" -OpMemberName %197 9 "f1" -OpMemberName %197 10 "f2" -OpMemberName %197 11 "f3" -OpMemberName %197 12 "fMat0" -OpMemberName %197 13 "fMat1" -OpMemberName %197 14 "fMat2" -OpMemberName %197 15 "fMat3" -OpMemberName %197 16 "fMat4" -OpMemberName %197 17 "fMat5" -OpMemberName %197 18 "fMat6" -OpMemberName %197 19 "fMat7" -OpMemberName %197 20 "fMat8" -OpMemberName %197 21 "d0" -OpMemberName %197 22 "d1" -OpMemberName %197 23 "d2" -OpMemberName %197 24 "d3" -OpMemberName %197 25 "dMat0" -OpMemberName %197 26 "dMat1" -OpMemberName %197 27 "dMat2" -OpMemberName %197 28 "dMat3" -OpMemberName %197 29 "dMat4" -OpMemberName %197 30 "dMat5" -OpMemberName %197 31 "dMat6" -OpMemberName %197 32 "dMat7" -OpMemberName %197 33 "dMat8" -OpName %198 "Ubo" -OpMemberName %198 0 "ds" -OpName %178 "ubo" -OpName %201 "Ssbo" -OpMemberName %201 0 "ds" -OpName %181 "ssbo" -OpName %182 "iAttm" -OpName %185 "iAttmMS" -OpName %186 "uAttm" -OpName %189 "uAttmMS" -OpName %190 "fAttm" -OpName %193 "fAttmMS" -OpName %194 "acc" -OpDecorate %4 DescriptorSet 1 -OpDecorate %4 Binding 0 -OpDecorate %4 NonWritable -OpDecorate %7 DescriptorSet 1 -OpDecorate %7 Binding 1 -OpDecorate %7 NonWritable -OpDecorate %8 DescriptorSet 1 -OpDecorate %8 Binding 2 -OpDecorate %8 NonWritable -OpDecorate %9 DescriptorSet 1 -OpDecorate %9 Binding 3 -OpDecorate %9 NonWritable -OpDecorate %11 DescriptorSet 1 -OpDecorate %11 Binding 4 -OpDecorate %11 NonWritable -OpDecorate %13 DescriptorSet 1 -OpDecorate %13 Binding 5 -OpDecorate %13 NonWritable -OpDecorate %14 DescriptorSet 1 -OpDecorate %14 Binding 6 -OpDecorate %14 NonWritable -OpDecorate %16 DescriptorSet 1 -OpDecorate %16 Binding 7 -OpDecorate %16 NonWritable -OpDecorate %17 DescriptorSet 2 -OpDecorate %17 Binding 0 -OpDecorate %17 NonWritable -OpDecorate %19 DescriptorSet 2 -OpDecorate %19 Binding 1 -OpDecorate %19 NonWritable -OpDecorate %20 DescriptorSet 2 -OpDecorate %20 Binding 2 -OpDecorate %20 NonWritable -OpDecorate %22 DescriptorSet 2 -OpDecorate %22 Binding 3 -OpDecorate %22 NonWritable -OpDecorate %23 DescriptorSet 2 -OpDecorate %23 Binding 4 -OpDecorate %23 NonWritable -OpDecorate %25 DescriptorSet 2 -OpDecorate %25 Binding 5 -OpDecorate %25 NonWritable -OpDecorate %26 DescriptorSet 2 -OpDecorate %26 Binding 6 -OpDecorate %26 NonWritable -OpDecorate %28 DescriptorSet 2 -OpDecorate %28 Binding 7 -OpDecorate %28 NonWritable -OpDecorate %29 DescriptorSet 3 -OpDecorate %29 Binding 0 -OpDecorate %29 NonReadable -OpDecorate %31 DescriptorSet 3 -OpDecorate %31 Binding 1 -OpDecorate %31 NonReadable -OpDecorate %32 DescriptorSet 3 -OpDecorate %32 Binding 2 -OpDecorate %32 NonReadable -OpDecorate %34 DescriptorSet 3 -OpDecorate %34 Binding 3 -OpDecorate %34 NonReadable -OpDecorate %35 DescriptorSet 3 -OpDecorate %35 Binding 4 -OpDecorate %35 NonReadable -OpDecorate %36 DescriptorSet 3 -OpDecorate %36 Binding 5 -OpDecorate %36 NonReadable -OpDecorate %38 DescriptorSet 3 -OpDecorate %38 Binding 6 -OpDecorate %38 NonReadable -OpDecorate %39 DescriptorSet 3 -OpDecorate %39 Binding 7 -OpDecorate %39 NonReadable -OpDecorate %41 DescriptorSet 3 -OpDecorate %41 Binding 8 -OpDecorate %41 NonReadable -OpDecorate %42 DescriptorSet 3 -OpDecorate %42 Binding 9 -OpDecorate %42 NonReadable -OpDecorate %44 DescriptorSet 3 -OpDecorate %44 Binding 10 -OpDecorate %44 NonReadable -OpDecorate %45 DescriptorSet 4 -OpDecorate %45 Binding 0 -OpDecorate %47 DescriptorSet 4 -OpDecorate %47 Binding 1 -OpDecorate %48 DescriptorSet 4 -OpDecorate %48 Binding 2 -OpDecorate %50 DescriptorSet 4 -OpDecorate %50 Binding 3 -OpDecorate %51 DescriptorSet 4 -OpDecorate %51 Binding 4 -OpDecorate %53 DescriptorSet 4 -OpDecorate %53 Binding 5 -OpDecorate %54 DescriptorSet 4 -OpDecorate %54 Binding 6 -OpDecorate %56 DescriptorSet 4 -OpDecorate %56 Binding 7 -OpDecorate %57 DescriptorSet 4 -OpDecorate %57 Binding 8 -OpDecorate %59 DescriptorSet 4 -OpDecorate %59 Binding 9 -OpDecorate %60 DescriptorSet 4 -OpDecorate %60 Binding 10 -OpDecorate %61 DescriptorSet 5 -OpDecorate %61 Binding 0 -OpDecorate %63 DescriptorSet 5 -OpDecorate %63 Binding 1 -OpDecorate %64 DescriptorSet 5 -OpDecorate %64 Binding 2 -OpDecorate %66 DescriptorSet 5 -OpDecorate %66 Binding 3 -OpDecorate %67 DescriptorSet 5 -OpDecorate %67 Binding 4 -OpDecorate %69 DescriptorSet 5 -OpDecorate %69 Binding 5 -OpDecorate %70 DescriptorSet 5 -OpDecorate %70 Binding 6 -OpDecorate %72 DescriptorSet 5 -OpDecorate %72 Binding 7 -OpDecorate %73 DescriptorSet 5 -OpDecorate %73 Binding 8 -OpDecorate %75 DescriptorSet 5 -OpDecorate %75 Binding 9 -OpDecorate %76 DescriptorSet 5 -OpDecorate %76 Binding 10 -OpDecorate %78 DescriptorSet 6 -OpDecorate %78 Binding 0 -OpDecorate %79 DescriptorSet 6 -OpDecorate %79 Binding 1 -OpDecorate %81 DescriptorSet 6 -OpDecorate %81 Binding 2 -OpDecorate %82 DescriptorSet 6 -OpDecorate %82 Binding 3 -OpDecorate %84 DescriptorSet 6 -OpDecorate %84 Binding 4 -OpDecorate %85 DescriptorSet 6 -OpDecorate %85 Binding 5 -OpDecorate %87 DescriptorSet 6 -OpDecorate %87 Binding 6 -OpDecorate %88 DescriptorSet 6 -OpDecorate %88 Binding 7 -OpDecorate %90 DescriptorSet 6 -OpDecorate %90 Binding 8 -OpDecorate %91 DescriptorSet 6 -OpDecorate %91 Binding 9 -OpDecorate %93 DescriptorSet 6 -OpDecorate %93 Binding 10 -OpDecorate %94 DescriptorSet 7 -OpDecorate %94 Binding 0 -OpDecorate %97 DescriptorSet 7 -OpDecorate %97 Binding 1 -OpDecorate %98 DescriptorSet 7 -OpDecorate %98 Binding 2 -OpDecorate %101 DescriptorSet 7 -OpDecorate %101 Binding 3 -OpDecorate %102 DescriptorSet 7 -OpDecorate %102 Binding 4 -OpDecorate %105 DescriptorSet 7 -OpDecorate %105 Binding 5 -OpDecorate %106 DescriptorSet 7 -OpDecorate %106 Binding 6 -OpDecorate %109 DescriptorSet 8 -OpDecorate %109 Binding 0 -OpDecorate %110 DescriptorSet 8 -OpDecorate %110 Binding 1 -OpDecorate %113 DescriptorSet 9 -OpDecorate %113 Binding 0 -OpDecorate %114 DescriptorSet 9 -OpDecorate %114 Binding 1 -OpDecorate %117 DescriptorSet 9 -OpDecorate %117 Binding 2 -OpDecorate %118 DescriptorSet 9 -OpDecorate %118 Binding 3 -OpDecorate %121 DescriptorSet 9 -OpDecorate %121 Binding 4 -OpDecorate %122 DescriptorSet 9 -OpDecorate %122 Binding 5 -OpDecorate %125 DescriptorSet 9 -OpDecorate %125 Binding 6 -OpDecorate %126 DescriptorSet 9 -OpDecorate %126 Binding 7 -OpDecorate %129 DescriptorSet 9 -OpDecorate %129 Binding 8 -OpDecorate %130 DescriptorSet 9 -OpDecorate %130 Binding 9 -OpDecorate %133 DescriptorSet 9 -OpDecorate %133 Binding 10 -OpDecorate %134 DescriptorSet 10 -OpDecorate %134 Binding 0 -OpDecorate %137 DescriptorSet 10 -OpDecorate %137 Binding 1 -OpDecorate %138 DescriptorSet 10 -OpDecorate %138 Binding 2 -OpDecorate %141 DescriptorSet 10 -OpDecorate %141 Binding 3 -OpDecorate %142 DescriptorSet 10 -OpDecorate %142 Binding 4 -OpDecorate %145 DescriptorSet 10 -OpDecorate %145 Binding 5 -OpDecorate %146 DescriptorSet 10 -OpDecorate %146 Binding 6 -OpDecorate %149 DescriptorSet 10 -OpDecorate %149 Binding 7 -OpDecorate %150 DescriptorSet 10 -OpDecorate %150 Binding 8 -OpDecorate %153 DescriptorSet 10 -OpDecorate %153 Binding 9 -OpDecorate %154 DescriptorSet 10 -OpDecorate %154 Binding 10 -OpDecorate %157 DescriptorSet 11 -OpDecorate %157 Binding 0 -OpDecorate %158 DescriptorSet 11 -OpDecorate %158 Binding 1 -OpDecorate %161 DescriptorSet 11 -OpDecorate %161 Binding 2 -OpDecorate %162 DescriptorSet 11 -OpDecorate %162 Binding 3 -OpDecorate %165 DescriptorSet 11 -OpDecorate %165 Binding 4 -OpDecorate %166 DescriptorSet 11 -OpDecorate %166 Binding 5 -OpDecorate %169 DescriptorSet 11 -OpDecorate %169 Binding 6 -OpDecorate %170 DescriptorSet 11 -OpDecorate %170 Binding 7 -OpDecorate %173 DescriptorSet 11 -OpDecorate %173 Binding 8 -OpDecorate %174 DescriptorSet 11 -OpDecorate %174 Binding 9 -OpDecorate %177 DescriptorSet 11 -OpDecorate %177 Binding 10 -OpMemberDecorate %197 0 Offset 0 -OpMemberDecorate %197 1 Offset 8 -OpMemberDecorate %197 2 Offset 16 -OpMemberDecorate %197 3 Offset 32 -OpMemberDecorate %197 4 Offset 48 -OpMemberDecorate %197 5 Offset 56 -OpMemberDecorate %197 6 Offset 64 -OpMemberDecorate %197 7 Offset 80 -OpMemberDecorate %197 8 Offset 96 -OpMemberDecorate %197 9 Offset 104 -OpMemberDecorate %197 10 Offset 112 -OpMemberDecorate %197 11 Offset 128 -OpMemberDecorate %197 12 ColMajor -OpMemberDecorate %197 12 Offset 144 -OpMemberDecorate %197 12 MatrixStride 16 -OpMemberDecorate %197 13 ColMajor -OpMemberDecorate %197 13 Offset 176 -OpMemberDecorate %197 13 MatrixStride 16 -OpMemberDecorate %197 14 ColMajor -OpMemberDecorate %197 14 Offset 208 -OpMemberDecorate %197 14 MatrixStride 16 -OpMemberDecorate %197 15 ColMajor -OpMemberDecorate %197 15 Offset 240 -OpMemberDecorate %197 15 MatrixStride 16 -OpMemberDecorate %197 16 ColMajor -OpMemberDecorate %197 16 Offset 288 -OpMemberDecorate %197 16 MatrixStride 16 -OpMemberDecorate %197 17 ColMajor -OpMemberDecorate %197 17 Offset 336 -OpMemberDecorate %197 17 MatrixStride 16 -OpMemberDecorate %197 18 ColMajor -OpMemberDecorate %197 18 Offset 384 -OpMemberDecorate %197 18 MatrixStride 16 -OpMemberDecorate %197 19 ColMajor -OpMemberDecorate %197 19 Offset 448 -OpMemberDecorate %197 19 MatrixStride 16 -OpMemberDecorate %197 20 ColMajor -OpMemberDecorate %197 20 Offset 512 -OpMemberDecorate %197 20 MatrixStride 16 -OpMemberDecorate %197 21 Offset 576 -OpMemberDecorate %197 22 Offset 592 -OpMemberDecorate %197 23 Offset 608 -OpMemberDecorate %197 24 Offset 640 -OpMemberDecorate %197 25 ColMajor -OpMemberDecorate %197 25 Offset 672 -OpMemberDecorate %197 25 MatrixStride 16 -OpMemberDecorate %197 26 ColMajor -OpMemberDecorate %197 26 Offset 704 -OpMemberDecorate %197 26 MatrixStride 32 -OpMemberDecorate %197 27 ColMajor -OpMemberDecorate %197 27 Offset 768 -OpMemberDecorate %197 27 MatrixStride 32 -OpMemberDecorate %197 28 ColMajor -OpMemberDecorate %197 28 Offset 832 -OpMemberDecorate %197 28 MatrixStride 16 -OpMemberDecorate %197 29 ColMajor -OpMemberDecorate %197 29 Offset 896 -OpMemberDecorate %197 29 MatrixStride 32 -OpMemberDecorate %197 30 ColMajor -OpMemberDecorate %197 30 Offset 992 -OpMemberDecorate %197 30 MatrixStride 32 -OpMemberDecorate %197 31 ColMajor -OpMemberDecorate %197 31 Offset 1088 -OpMemberDecorate %197 31 MatrixStride 16 -OpMemberDecorate %197 32 ColMajor -OpMemberDecorate %197 32 Offset 1152 -OpMemberDecorate %197 32 MatrixStride 32 -OpMemberDecorate %197 33 ColMajor -OpMemberDecorate %197 33 Offset 1280 -OpMemberDecorate %197 33 MatrixStride 32 -OpDecorate %202 ArrayStride 1408 -OpMemberDecorate %198 0 Offset 0 -OpDecorate %198 Block -OpDecorate %178 DescriptorSet 12 -OpDecorate %178 Binding 0 -OpDecorate %205 ArrayStride 4 -OpMemberDecorate %201 0 Offset 0 -OpDecorate %201 Block -OpDecorate %181 DescriptorSet 13 -OpDecorate %181 Binding 0 -OpDecorate %182 DescriptorSet 14 -OpDecorate %182 Binding 0 -OpDecorate %182 InputAttachmentIndex 0 -OpDecorate %185 DescriptorSet 14 -OpDecorate %185 Binding 1 -OpDecorate %185 InputAttachmentIndex 1 -OpDecorate %186 DescriptorSet 14 -OpDecorate %186 Binding 2 -OpDecorate %186 InputAttachmentIndex 2 -OpDecorate %189 DescriptorSet 14 -OpDecorate %189 Binding 3 -OpDecorate %189 InputAttachmentIndex 3 -OpDecorate %190 DescriptorSet 14 -OpDecorate %190 Binding 4 -OpDecorate %190 InputAttachmentIndex 4 -OpDecorate %193 DescriptorSet 14 -OpDecorate %193 Binding 5 -OpDecorate %193 InputAttachmentIndex 5 -OpDecorate %194 DescriptorSet 15 -OpDecorate %194 Binding 0 -%206 = OpTypeVoid -%3 = OpTypeFunction %206 +OpName %main "main" +OpName %ray_query "ray_query" +OpName %iImg1d "iImg1d" +OpName %iImg2d "iImg2d" +OpName %iImg3d "iImg3d" +OpName %iImg1dArr "iImg1dArr" +OpName %iImg2dArr "iImg2dArr" +OpName %iImgCube "iImgCube" +OpName %iImgCubeArr "iImgCubeArr" +OpName %iImgBuf "iImgBuf" +OpName %uImg1d "uImg1d" +OpName %uImg2d "uImg2d" +OpName %uImg3d "uImg3d" +OpName %uImg1dArr "uImg1dArr" +OpName %uImg2dArr "uImg2dArr" +OpName %uImgCube "uImgCube" +OpName %uImgCubeArr "uImgCubeArr" +OpName %uImgBuf "uImgBuf" +OpName %fImg1D "fImg1D" +OpName %fImg2D "fImg2D" +OpName %fImg3D "fImg3D" +OpName %fImgCube "fImgCube" +OpName %fImg2DRect "fImg2DRect" +OpName %fImg1DArray "fImg1DArray" +OpName %fImg2DArray "fImg2DArray" +OpName %fImgCubeArray "fImgCubeArray" +OpName %fImgBuffer "fImgBuffer" +OpName %fImg2DMS "fImg2DMS" +OpName %fImg2DMSArray "fImg2DMSArray" +OpName %iSamp1D "iSamp1D" +OpName %iSamp2D "iSamp2D" +OpName %iSamp3D "iSamp3D" +OpName %iSampCube "iSampCube" +OpName %iSamp2DRect "iSamp2DRect" +OpName %iSamp1DArray "iSamp1DArray" +OpName %iSamp2DArray "iSamp2DArray" +OpName %iSampCubeArray "iSampCubeArray" +OpName %iSampBuffer "iSampBuffer" +OpName %iSamp2DMS "iSamp2DMS" +OpName %iSamp2DMSArray "iSamp2DMSArray" +OpName %uSamp1D "uSamp1D" +OpName %uSamp2D "uSamp2D" +OpName %uSamp3D "uSamp3D" +OpName %uSampCube "uSampCube" +OpName %uSamp2DRect "uSamp2DRect" +OpName %uSamp1DArray "uSamp1DArray" +OpName %uSamp2DArray "uSamp2DArray" +OpName %uSampCubeArray "uSampCubeArray" +OpName %uSampBuffer "uSampBuffer" +OpName %uSamp2DMS "uSamp2DMS" +OpName %uSamp2DMSArray "uSamp2DMSArray" +OpName %fSamp1D "fSamp1D" +OpName %fSamp2D "fSamp2D" +OpName %fSamp3D "fSamp3D" +OpName %fSampCube "fSampCube" +OpName %fSamp2DRect "fSamp2DRect" +OpName %fSamp1DArray "fSamp1DArray" +OpName %fSamp2DArray "fSamp2DArray" +OpName %fSampCubeArray "fSampCubeArray" +OpName %fSampBuffer "fSampBuffer" +OpName %fSamp2DMS "fSamp2DMS" +OpName %fSamp2DMSArray "fSamp2DMSArray" +OpName %dsSamp1D "dsSamp1D" +OpName %dsSamp2D "dsSamp2D" +OpName %dsSampCube "dsSampCube" +OpName %dsSamp2DRect "dsSamp2DRect" +OpName %dsSamp1DArray "dsSamp1DArray" +OpName %dsSamp2DArray "dsSamp2DArray" +OpName %dsSampCubeArray "dsSampCubeArray" +OpName %samp "samp" +OpName %sampShadow "sampShadow" +OpName %iTex1D "iTex1D" +OpName %iTex2D "iTex2D" +OpName %iTex3D "iTex3D" +OpName %iTexCube "iTexCube" +OpName %iTex2DRect "iTex2DRect" +OpName %iTex1DArray "iTex1DArray" +OpName %iTex2DArray "iTex2DArray" +OpName %iTexCubeArray "iTexCubeArray" +OpName %iTexBuffer "iTexBuffer" +OpName %iTex2DMS "iTex2DMS" +OpName %iTex2DMSArray "iTex2DMSArray" +OpName %uTex1D "uTex1D" +OpName %uTex2D "uTex2D" +OpName %uTex3D "uTex3D" +OpName %uTexCube "uTexCube" +OpName %uTex2DRect "uTex2DRect" +OpName %uTex1DArray "uTex1DArray" +OpName %uTex2DArray "uTex2DArray" +OpName %uTexCubeArray "uTexCubeArray" +OpName %uTexBuffer "uTexBuffer" +OpName %uTex2DMS "uTex2DMS" +OpName %uTex2DMSArray "uTex2DMSArray" +OpName %fTex1D "fTex1D" +OpName %fTex2D "fTex2D" +OpName %fTex3D "fTex3D" +OpName %fTexCube "fTexCube" +OpName %fTex2DRect "fTex2DRect" +OpName %fTex1DArray "fTex1DArray" +OpName %fTex2DArray "fTex2DArray" +OpName %fTexCubeArray "fTexCubeArray" +OpName %fTexBuffer "fTexBuffer" +OpName %fTex2DMS "fTex2DMS" +OpName %fTex2DMSArray "fTex2DMSArray" +OpName %Data "Data" +OpMemberName %Data 0 "i0" +OpMemberName %Data 1 "i1" +OpMemberName %Data 2 "i2" +OpMemberName %Data 3 "i3" +OpMemberName %Data 4 "u0" +OpMemberName %Data 5 "u1" +OpMemberName %Data 6 "u2" +OpMemberName %Data 7 "u3" +OpMemberName %Data 8 "f0" +OpMemberName %Data 9 "f1" +OpMemberName %Data 10 "f2" +OpMemberName %Data 11 "f3" +OpMemberName %Data 12 "fMat0" +OpMemberName %Data 13 "fMat1" +OpMemberName %Data 14 "fMat2" +OpMemberName %Data 15 "fMat3" +OpMemberName %Data 16 "fMat4" +OpMemberName %Data 17 "fMat5" +OpMemberName %Data 18 "fMat6" +OpMemberName %Data 19 "fMat7" +OpMemberName %Data 20 "fMat8" +OpMemberName %Data 21 "d0" +OpMemberName %Data 22 "d1" +OpMemberName %Data 23 "d2" +OpMemberName %Data 24 "d3" +OpMemberName %Data 25 "dMat0" +OpMemberName %Data 26 "dMat1" +OpMemberName %Data 27 "dMat2" +OpMemberName %Data 28 "dMat3" +OpMemberName %Data 29 "dMat4" +OpMemberName %Data 30 "dMat5" +OpMemberName %Data 31 "dMat6" +OpMemberName %Data 32 "dMat7" +OpMemberName %Data 33 "dMat8" +OpName %Ubo "Ubo" +OpMemberName %Ubo 0 "ds" +OpName %ubo "ubo" +OpName %Ssbo "Ssbo" +OpMemberName %Ssbo 0 "ds" +OpName %ssbo "ssbo" +OpName %iAttm "iAttm" +OpName %iAttmMS "iAttmMS" +OpName %uAttm "uAttm" +OpName %uAttmMS "uAttmMS" +OpName %fAttm "fAttm" +OpName %fAttmMS "fAttmMS" +OpName %acc "acc" +OpDecorate %iImg1d DescriptorSet 1 +OpDecorate %iImg1d Binding 0 +OpDecorate %iImg1d NonWritable +OpDecorate %iImg2d DescriptorSet 1 +OpDecorate %iImg2d Binding 1 +OpDecorate %iImg2d NonWritable +OpDecorate %iImg3d DescriptorSet 1 +OpDecorate %iImg3d Binding 2 +OpDecorate %iImg3d NonWritable +OpDecorate %iImg1dArr DescriptorSet 1 +OpDecorate %iImg1dArr Binding 3 +OpDecorate %iImg1dArr NonWritable +OpDecorate %iImg2dArr DescriptorSet 1 +OpDecorate %iImg2dArr Binding 4 +OpDecorate %iImg2dArr NonWritable +OpDecorate %iImgCube DescriptorSet 1 +OpDecorate %iImgCube Binding 5 +OpDecorate %iImgCube NonWritable +OpDecorate %iImgCubeArr DescriptorSet 1 +OpDecorate %iImgCubeArr Binding 6 +OpDecorate %iImgCubeArr NonWritable +OpDecorate %iImgBuf DescriptorSet 1 +OpDecorate %iImgBuf Binding 7 +OpDecorate %iImgBuf NonWritable +OpDecorate %uImg1d DescriptorSet 2 +OpDecorate %uImg1d Binding 0 +OpDecorate %uImg1d NonWritable +OpDecorate %uImg2d DescriptorSet 2 +OpDecorate %uImg2d Binding 1 +OpDecorate %uImg2d NonWritable +OpDecorate %uImg3d DescriptorSet 2 +OpDecorate %uImg3d Binding 2 +OpDecorate %uImg3d NonWritable +OpDecorate %uImg1dArr DescriptorSet 2 +OpDecorate %uImg1dArr Binding 3 +OpDecorate %uImg1dArr NonWritable +OpDecorate %uImg2dArr DescriptorSet 2 +OpDecorate %uImg2dArr Binding 4 +OpDecorate %uImg2dArr NonWritable +OpDecorate %uImgCube DescriptorSet 2 +OpDecorate %uImgCube Binding 5 +OpDecorate %uImgCube NonWritable +OpDecorate %uImgCubeArr DescriptorSet 2 +OpDecorate %uImgCubeArr Binding 6 +OpDecorate %uImgCubeArr NonWritable +OpDecorate %uImgBuf DescriptorSet 2 +OpDecorate %uImgBuf Binding 7 +OpDecorate %uImgBuf NonWritable +OpDecorate %fImg1D DescriptorSet 3 +OpDecorate %fImg1D Binding 0 +OpDecorate %fImg1D NonReadable +OpDecorate %fImg2D DescriptorSet 3 +OpDecorate %fImg2D Binding 1 +OpDecorate %fImg2D NonReadable +OpDecorate %fImg3D DescriptorSet 3 +OpDecorate %fImg3D Binding 2 +OpDecorate %fImg3D NonReadable +OpDecorate %fImgCube DescriptorSet 3 +OpDecorate %fImgCube Binding 3 +OpDecorate %fImgCube NonReadable +OpDecorate %fImg2DRect DescriptorSet 3 +OpDecorate %fImg2DRect Binding 4 +OpDecorate %fImg2DRect NonReadable +OpDecorate %fImg1DArray DescriptorSet 3 +OpDecorate %fImg1DArray Binding 5 +OpDecorate %fImg1DArray NonReadable +OpDecorate %fImg2DArray DescriptorSet 3 +OpDecorate %fImg2DArray Binding 6 +OpDecorate %fImg2DArray NonReadable +OpDecorate %fImgCubeArray DescriptorSet 3 +OpDecorate %fImgCubeArray Binding 7 +OpDecorate %fImgCubeArray NonReadable +OpDecorate %fImgBuffer DescriptorSet 3 +OpDecorate %fImgBuffer Binding 8 +OpDecorate %fImgBuffer NonReadable +OpDecorate %fImg2DMS DescriptorSet 3 +OpDecorate %fImg2DMS Binding 9 +OpDecorate %fImg2DMS NonReadable +OpDecorate %fImg2DMSArray DescriptorSet 3 +OpDecorate %fImg2DMSArray Binding 10 +OpDecorate %fImg2DMSArray NonReadable +OpDecorate %iSamp1D DescriptorSet 4 +OpDecorate %iSamp1D Binding 0 +OpDecorate %iSamp2D DescriptorSet 4 +OpDecorate %iSamp2D Binding 1 +OpDecorate %iSamp3D DescriptorSet 4 +OpDecorate %iSamp3D Binding 2 +OpDecorate %iSampCube DescriptorSet 4 +OpDecorate %iSampCube Binding 3 +OpDecorate %iSamp2DRect DescriptorSet 4 +OpDecorate %iSamp2DRect Binding 4 +OpDecorate %iSamp1DArray DescriptorSet 4 +OpDecorate %iSamp1DArray Binding 5 +OpDecorate %iSamp2DArray DescriptorSet 4 +OpDecorate %iSamp2DArray Binding 6 +OpDecorate %iSampCubeArray DescriptorSet 4 +OpDecorate %iSampCubeArray Binding 7 +OpDecorate %iSampBuffer DescriptorSet 4 +OpDecorate %iSampBuffer Binding 8 +OpDecorate %iSamp2DMS DescriptorSet 4 +OpDecorate %iSamp2DMS Binding 9 +OpDecorate %iSamp2DMSArray DescriptorSet 4 +OpDecorate %iSamp2DMSArray Binding 10 +OpDecorate %uSamp1D DescriptorSet 5 +OpDecorate %uSamp1D Binding 0 +OpDecorate %uSamp2D DescriptorSet 5 +OpDecorate %uSamp2D Binding 1 +OpDecorate %uSamp3D DescriptorSet 5 +OpDecorate %uSamp3D Binding 2 +OpDecorate %uSampCube DescriptorSet 5 +OpDecorate %uSampCube Binding 3 +OpDecorate %uSamp2DRect DescriptorSet 5 +OpDecorate %uSamp2DRect Binding 4 +OpDecorate %uSamp1DArray DescriptorSet 5 +OpDecorate %uSamp1DArray Binding 5 +OpDecorate %uSamp2DArray DescriptorSet 5 +OpDecorate %uSamp2DArray Binding 6 +OpDecorate %uSampCubeArray DescriptorSet 5 +OpDecorate %uSampCubeArray Binding 7 +OpDecorate %uSampBuffer DescriptorSet 5 +OpDecorate %uSampBuffer Binding 8 +OpDecorate %uSamp2DMS DescriptorSet 5 +OpDecorate %uSamp2DMS Binding 9 +OpDecorate %uSamp2DMSArray DescriptorSet 5 +OpDecorate %uSamp2DMSArray Binding 10 +OpDecorate %fSamp1D DescriptorSet 6 +OpDecorate %fSamp1D Binding 0 +OpDecorate %fSamp2D DescriptorSet 6 +OpDecorate %fSamp2D Binding 1 +OpDecorate %fSamp3D DescriptorSet 6 +OpDecorate %fSamp3D Binding 2 +OpDecorate %fSampCube DescriptorSet 6 +OpDecorate %fSampCube Binding 3 +OpDecorate %fSamp2DRect DescriptorSet 6 +OpDecorate %fSamp2DRect Binding 4 +OpDecorate %fSamp1DArray DescriptorSet 6 +OpDecorate %fSamp1DArray Binding 5 +OpDecorate %fSamp2DArray DescriptorSet 6 +OpDecorate %fSamp2DArray Binding 6 +OpDecorate %fSampCubeArray DescriptorSet 6 +OpDecorate %fSampCubeArray Binding 7 +OpDecorate %fSampBuffer DescriptorSet 6 +OpDecorate %fSampBuffer Binding 8 +OpDecorate %fSamp2DMS DescriptorSet 6 +OpDecorate %fSamp2DMS Binding 9 +OpDecorate %fSamp2DMSArray DescriptorSet 6 +OpDecorate %fSamp2DMSArray Binding 10 +OpDecorate %dsSamp1D DescriptorSet 7 +OpDecorate %dsSamp1D Binding 0 +OpDecorate %dsSamp2D DescriptorSet 7 +OpDecorate %dsSamp2D Binding 1 +OpDecorate %dsSampCube DescriptorSet 7 +OpDecorate %dsSampCube Binding 2 +OpDecorate %dsSamp2DRect DescriptorSet 7 +OpDecorate %dsSamp2DRect Binding 3 +OpDecorate %dsSamp1DArray DescriptorSet 7 +OpDecorate %dsSamp1DArray Binding 4 +OpDecorate %dsSamp2DArray DescriptorSet 7 +OpDecorate %dsSamp2DArray Binding 5 +OpDecorate %dsSampCubeArray DescriptorSet 7 +OpDecorate %dsSampCubeArray Binding 6 +OpDecorate %samp DescriptorSet 8 +OpDecorate %samp Binding 0 +OpDecorate %sampShadow DescriptorSet 8 +OpDecorate %sampShadow Binding 1 +OpDecorate %iTex1D DescriptorSet 9 +OpDecorate %iTex1D Binding 0 +OpDecorate %iTex2D DescriptorSet 9 +OpDecorate %iTex2D Binding 1 +OpDecorate %iTex3D DescriptorSet 9 +OpDecorate %iTex3D Binding 2 +OpDecorate %iTexCube DescriptorSet 9 +OpDecorate %iTexCube Binding 3 +OpDecorate %iTex2DRect DescriptorSet 9 +OpDecorate %iTex2DRect Binding 4 +OpDecorate %iTex1DArray DescriptorSet 9 +OpDecorate %iTex1DArray Binding 5 +OpDecorate %iTex2DArray DescriptorSet 9 +OpDecorate %iTex2DArray Binding 6 +OpDecorate %iTexCubeArray DescriptorSet 9 +OpDecorate %iTexCubeArray Binding 7 +OpDecorate %iTexBuffer DescriptorSet 9 +OpDecorate %iTexBuffer Binding 8 +OpDecorate %iTex2DMS DescriptorSet 9 +OpDecorate %iTex2DMS Binding 9 +OpDecorate %iTex2DMSArray DescriptorSet 9 +OpDecorate %iTex2DMSArray Binding 10 +OpDecorate %uTex1D DescriptorSet 10 +OpDecorate %uTex1D Binding 0 +OpDecorate %uTex2D DescriptorSet 10 +OpDecorate %uTex2D Binding 1 +OpDecorate %uTex3D DescriptorSet 10 +OpDecorate %uTex3D Binding 2 +OpDecorate %uTexCube DescriptorSet 10 +OpDecorate %uTexCube Binding 3 +OpDecorate %uTex2DRect DescriptorSet 10 +OpDecorate %uTex2DRect Binding 4 +OpDecorate %uTex1DArray DescriptorSet 10 +OpDecorate %uTex1DArray Binding 5 +OpDecorate %uTex2DArray DescriptorSet 10 +OpDecorate %uTex2DArray Binding 6 +OpDecorate %uTexCubeArray DescriptorSet 10 +OpDecorate %uTexCubeArray Binding 7 +OpDecorate %uTexBuffer DescriptorSet 10 +OpDecorate %uTexBuffer Binding 8 +OpDecorate %uTex2DMS DescriptorSet 10 +OpDecorate %uTex2DMS Binding 9 +OpDecorate %uTex2DMSArray DescriptorSet 10 +OpDecorate %uTex2DMSArray Binding 10 +OpDecorate %fTex1D DescriptorSet 11 +OpDecorate %fTex1D Binding 0 +OpDecorate %fTex2D DescriptorSet 11 +OpDecorate %fTex2D Binding 1 +OpDecorate %fTex3D DescriptorSet 11 +OpDecorate %fTex3D Binding 2 +OpDecorate %fTexCube DescriptorSet 11 +OpDecorate %fTexCube Binding 3 +OpDecorate %fTex2DRect DescriptorSet 11 +OpDecorate %fTex2DRect Binding 4 +OpDecorate %fTex1DArray DescriptorSet 11 +OpDecorate %fTex1DArray Binding 5 +OpDecorate %fTex2DArray DescriptorSet 11 +OpDecorate %fTex2DArray Binding 6 +OpDecorate %fTexCubeArray DescriptorSet 11 +OpDecorate %fTexCubeArray Binding 7 +OpDecorate %fTexBuffer DescriptorSet 11 +OpDecorate %fTexBuffer Binding 8 +OpDecorate %fTex2DMS DescriptorSet 11 +OpDecorate %fTex2DMS Binding 9 +OpDecorate %fTex2DMSArray DescriptorSet 11 +OpDecorate %fTex2DMSArray Binding 10 +OpMemberDecorate %Data 0 Offset 0 +OpMemberDecorate %Data 1 Offset 8 +OpMemberDecorate %Data 2 Offset 16 +OpMemberDecorate %Data 3 Offset 32 +OpMemberDecorate %Data 4 Offset 48 +OpMemberDecorate %Data 5 Offset 56 +OpMemberDecorate %Data 6 Offset 64 +OpMemberDecorate %Data 7 Offset 80 +OpMemberDecorate %Data 8 Offset 96 +OpMemberDecorate %Data 9 Offset 104 +OpMemberDecorate %Data 10 Offset 112 +OpMemberDecorate %Data 11 Offset 128 +OpMemberDecorate %Data 12 ColMajor +OpMemberDecorate %Data 12 Offset 144 +OpMemberDecorate %Data 12 MatrixStride 16 +OpMemberDecorate %Data 13 ColMajor +OpMemberDecorate %Data 13 Offset 176 +OpMemberDecorate %Data 13 MatrixStride 16 +OpMemberDecorate %Data 14 ColMajor +OpMemberDecorate %Data 14 Offset 208 +OpMemberDecorate %Data 14 MatrixStride 16 +OpMemberDecorate %Data 15 ColMajor +OpMemberDecorate %Data 15 Offset 240 +OpMemberDecorate %Data 15 MatrixStride 16 +OpMemberDecorate %Data 16 ColMajor +OpMemberDecorate %Data 16 Offset 288 +OpMemberDecorate %Data 16 MatrixStride 16 +OpMemberDecorate %Data 17 ColMajor +OpMemberDecorate %Data 17 Offset 336 +OpMemberDecorate %Data 17 MatrixStride 16 +OpMemberDecorate %Data 18 ColMajor +OpMemberDecorate %Data 18 Offset 384 +OpMemberDecorate %Data 18 MatrixStride 16 +OpMemberDecorate %Data 19 ColMajor +OpMemberDecorate %Data 19 Offset 448 +OpMemberDecorate %Data 19 MatrixStride 16 +OpMemberDecorate %Data 20 ColMajor +OpMemberDecorate %Data 20 Offset 512 +OpMemberDecorate %Data 20 MatrixStride 16 +OpMemberDecorate %Data 21 Offset 576 +OpMemberDecorate %Data 22 Offset 592 +OpMemberDecorate %Data 23 Offset 608 +OpMemberDecorate %Data 24 Offset 640 +OpMemberDecorate %Data 25 ColMajor +OpMemberDecorate %Data 25 Offset 672 +OpMemberDecorate %Data 25 MatrixStride 16 +OpMemberDecorate %Data 26 ColMajor +OpMemberDecorate %Data 26 Offset 704 +OpMemberDecorate %Data 26 MatrixStride 32 +OpMemberDecorate %Data 27 ColMajor +OpMemberDecorate %Data 27 Offset 768 +OpMemberDecorate %Data 27 MatrixStride 32 +OpMemberDecorate %Data 28 ColMajor +OpMemberDecorate %Data 28 Offset 832 +OpMemberDecorate %Data 28 MatrixStride 16 +OpMemberDecorate %Data 29 ColMajor +OpMemberDecorate %Data 29 Offset 896 +OpMemberDecorate %Data 29 MatrixStride 32 +OpMemberDecorate %Data 30 ColMajor +OpMemberDecorate %Data 30 Offset 992 +OpMemberDecorate %Data 30 MatrixStride 32 +OpMemberDecorate %Data 31 ColMajor +OpMemberDecorate %Data 31 Offset 1088 +OpMemberDecorate %Data 31 MatrixStride 16 +OpMemberDecorate %Data 32 ColMajor +OpMemberDecorate %Data 32 Offset 1152 +OpMemberDecorate %Data 32 MatrixStride 32 +OpMemberDecorate %Data 33 ColMajor +OpMemberDecorate %Data 33 Offset 1280 +OpMemberDecorate %Data 33 MatrixStride 32 +OpDecorate %_arr_Data_uint_4 ArrayStride 1408 +OpMemberDecorate %Ubo 0 Offset 0 +OpDecorate %Ubo Block +OpDecorate %ubo DescriptorSet 12 +OpDecorate %ubo Binding 0 +OpDecorate %_runtimearr_int ArrayStride 4 +OpMemberDecorate %Ssbo 0 Offset 0 +OpDecorate %Ssbo Block +OpDecorate %ssbo DescriptorSet 13 +OpDecorate %ssbo Binding 0 +OpDecorate %iAttm DescriptorSet 14 +OpDecorate %iAttm Binding 0 +OpDecorate %iAttm InputAttachmentIndex 0 +OpDecorate %iAttmMS DescriptorSet 14 +OpDecorate %iAttmMS Binding 1 +OpDecorate %iAttmMS InputAttachmentIndex 1 +OpDecorate %uAttm DescriptorSet 14 +OpDecorate %uAttm Binding 2 +OpDecorate %uAttm InputAttachmentIndex 2 +OpDecorate %uAttmMS DescriptorSet 14 +OpDecorate %uAttmMS Binding 3 +OpDecorate %uAttmMS InputAttachmentIndex 3 +OpDecorate %fAttm DescriptorSet 14 +OpDecorate %fAttm Binding 4 +OpDecorate %fAttm InputAttachmentIndex 4 +OpDecorate %fAttmMS DescriptorSet 14 +OpDecorate %fAttmMS Binding 5 +OpDecorate %fAttmMS InputAttachmentIndex 5 +OpDecorate %acc DescriptorSet 15 +OpDecorate %acc Binding 0 +%void = OpTypeVoid +%3 = OpTypeFunction %void %6 = OpTypeRayQueryKHR -%209 = OpTypePointer Private %6 -%2 = OpVariable %209 Private -%210 = OpTypeBool -%213 = OpTypeInt 32 1 -%12 = OpTypeImage %213 1D 0 0 0 2 Rgba32i -%214 = OpTypePointer UniformConstant %12 -%4 = OpVariable %214 UniformConstant -%15 = OpTypeImage %213 2D 0 0 0 2 Rgba16i -%217 = OpTypePointer UniformConstant %15 -%7 = OpVariable %217 UniformConstant -%18 = OpTypeImage %213 3D 0 0 0 2 Rgba8i -%218 = OpTypePointer UniformConstant %18 -%8 = OpVariable %218 UniformConstant -%21 = OpTypeImage %213 1D 0 1 0 2 Rgba32i -%221 = OpTypePointer UniformConstant %21 -%9 = OpVariable %221 UniformConstant -%24 = OpTypeImage %213 2D 0 1 0 2 Rgba32i -%222 = OpTypePointer UniformConstant %24 -%11 = OpVariable %222 UniformConstant -%27 = OpTypeImage %213 Cube 0 0 0 2 Rgba32i -%225 = OpTypePointer UniformConstant %27 -%13 = OpVariable %225 UniformConstant -%30 = OpTypeImage %213 Cube 0 1 0 2 Rgba32i -%226 = OpTypePointer UniformConstant %30 -%14 = OpVariable %226 UniformConstant -%33 = OpTypeImage %213 Buffer 0 0 0 2 Rgba32i -%229 = OpTypePointer UniformConstant %33 -%16 = OpVariable %229 UniformConstant -%230 = OpTypeInt 32 0 -%37 = OpTypeImage %230 1D 0 0 0 2 Rgba32ui -%233 = OpTypePointer UniformConstant %37 -%17 = OpVariable %233 UniformConstant -%40 = OpTypeImage %230 2D 0 0 0 2 Rgba16ui -%234 = OpTypePointer UniformConstant %40 -%19 = OpVariable %234 UniformConstant -%43 = OpTypeImage %230 3D 0 0 0 2 Rgba8ui -%237 = OpTypePointer UniformConstant %43 -%20 = OpVariable %237 UniformConstant -%46 = OpTypeImage %230 1D 0 1 0 2 Rgba32ui -%238 = OpTypePointer UniformConstant %46 -%22 = OpVariable %238 UniformConstant -%49 = OpTypeImage %230 2D 0 1 0 2 Rgba32ui -%241 = OpTypePointer UniformConstant %49 -%23 = OpVariable %241 UniformConstant -%52 = OpTypeImage %230 Cube 0 0 0 2 Rgba32ui -%242 = OpTypePointer UniformConstant %52 -%25 = OpVariable %242 UniformConstant -%55 = OpTypeImage %230 Cube 0 1 0 2 Rgba32ui -%245 = OpTypePointer UniformConstant %55 -%26 = OpVariable %245 UniformConstant -%58 = OpTypeImage %230 Buffer 0 0 0 2 Rgba32ui -%246 = OpTypePointer UniformConstant %58 -%28 = OpVariable %246 UniformConstant -%249 = OpTypeFloat 32 -%62 = OpTypeImage %249 1D 0 0 0 2 Rgba32f -%250 = OpTypePointer UniformConstant %62 -%29 = OpVariable %250 UniformConstant -%65 = OpTypeImage %249 2D 0 0 0 2 Rgba16f -%253 = OpTypePointer UniformConstant %65 -%31 = OpVariable %253 UniformConstant -%68 = OpTypeImage %249 3D 0 0 0 2 R32f -%254 = OpTypePointer UniformConstant %68 -%32 = OpVariable %254 UniformConstant -%71 = OpTypeImage %249 Cube 0 0 0 2 Rgba8 -%256 = OpTypePointer UniformConstant %71 -%34 = OpVariable %256 UniformConstant -%74 = OpTypeImage %249 Rect 0 0 0 2 Rgba8Snorm -%257 = OpTypePointer UniformConstant %74 -%35 = OpVariable %257 UniformConstant -%77 = OpTypeImage %249 1D 0 1 0 2 Rgba32f -%258 = OpTypePointer UniformConstant %77 -%36 = OpVariable %258 UniformConstant -%80 = OpTypeImage %249 2D 0 1 0 2 Rgba32f -%259 = OpTypePointer UniformConstant %80 -%38 = OpVariable %259 UniformConstant -%83 = OpTypeImage %249 Cube 0 1 0 2 Rgba32f -%260 = OpTypePointer UniformConstant %83 -%39 = OpVariable %260 UniformConstant -%86 = OpTypeImage %249 Buffer 0 0 0 2 Rgba32f -%261 = OpTypePointer UniformConstant %86 -%41 = OpVariable %261 UniformConstant -%89 = OpTypeImage %249 2D 0 0 1 2 Rgba32f -%262 = OpTypePointer UniformConstant %89 -%42 = OpVariable %262 UniformConstant -%92 = OpTypeImage %249 2D 0 1 1 2 Rgba32f -%263 = OpTypePointer UniformConstant %92 -%44 = OpVariable %263 UniformConstant -%95 = OpTypeImage %213 1D 0 0 0 1 Unknown +%_ptr_Private_6 = OpTypePointer Private %6 +%ray_query = OpVariable %_ptr_Private_6 Private +%bool = OpTypeBool +%int = OpTypeInt 32 1 +%12 = OpTypeImage %int 1D 0 0 0 2 Rgba32i +%_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 +%iImg1d = OpVariable %_ptr_UniformConstant_12 UniformConstant +%15 = OpTypeImage %int 2D 0 0 0 2 Rgba16i +%_ptr_UniformConstant_15 = OpTypePointer UniformConstant %15 +%iImg2d = OpVariable %_ptr_UniformConstant_15 UniformConstant +%18 = OpTypeImage %int 3D 0 0 0 2 Rgba8i +%_ptr_UniformConstant_18 = OpTypePointer UniformConstant %18 +%iImg3d = OpVariable %_ptr_UniformConstant_18 UniformConstant +%21 = OpTypeImage %int 1D 0 1 0 2 Rgba32i +%_ptr_UniformConstant_21 = OpTypePointer UniformConstant %21 +%iImg1dArr = OpVariable %_ptr_UniformConstant_21 UniformConstant +%24 = OpTypeImage %int 2D 0 1 0 2 Rgba32i +%_ptr_UniformConstant_24 = OpTypePointer UniformConstant %24 +%iImg2dArr = OpVariable %_ptr_UniformConstant_24 UniformConstant +%27 = OpTypeImage %int Cube 0 0 0 2 Rgba32i +%_ptr_UniformConstant_27 = OpTypePointer UniformConstant %27 +%iImgCube = OpVariable %_ptr_UniformConstant_27 UniformConstant +%30 = OpTypeImage %int Cube 0 1 0 2 Rgba32i +%_ptr_UniformConstant_30 = OpTypePointer UniformConstant %30 +%iImgCubeArr = OpVariable %_ptr_UniformConstant_30 UniformConstant +%33 = OpTypeImage %int Buffer 0 0 0 2 Rgba32i +%_ptr_UniformConstant_33 = OpTypePointer UniformConstant %33 +%iImgBuf = OpVariable %_ptr_UniformConstant_33 UniformConstant +%uint = OpTypeInt 32 0 +%37 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui +%_ptr_UniformConstant_37 = OpTypePointer UniformConstant %37 +%uImg1d = OpVariable %_ptr_UniformConstant_37 UniformConstant +%40 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui +%_ptr_UniformConstant_40 = OpTypePointer UniformConstant %40 +%uImg2d = OpVariable %_ptr_UniformConstant_40 UniformConstant +%43 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui +%_ptr_UniformConstant_43 = OpTypePointer UniformConstant %43 +%uImg3d = OpVariable %_ptr_UniformConstant_43 UniformConstant +%46 = OpTypeImage %uint 1D 0 1 0 2 Rgba32ui +%_ptr_UniformConstant_46 = OpTypePointer UniformConstant %46 +%uImg1dArr = OpVariable %_ptr_UniformConstant_46 UniformConstant +%49 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui +%_ptr_UniformConstant_49 = OpTypePointer UniformConstant %49 +%uImg2dArr = OpVariable %_ptr_UniformConstant_49 UniformConstant +%52 = OpTypeImage %uint Cube 0 0 0 2 Rgba32ui +%_ptr_UniformConstant_52 = OpTypePointer UniformConstant %52 +%uImgCube = OpVariable %_ptr_UniformConstant_52 UniformConstant +%55 = OpTypeImage %uint Cube 0 1 0 2 Rgba32ui +%_ptr_UniformConstant_55 = OpTypePointer UniformConstant %55 +%uImgCubeArr = OpVariable %_ptr_UniformConstant_55 UniformConstant +%58 = OpTypeImage %uint Buffer 0 0 0 2 Rgba32ui +%_ptr_UniformConstant_58 = OpTypePointer UniformConstant %58 +%uImgBuf = OpVariable %_ptr_UniformConstant_58 UniformConstant +%float = OpTypeFloat 32 +%62 = OpTypeImage %float 1D 0 0 0 2 Rgba32f +%_ptr_UniformConstant_62 = OpTypePointer UniformConstant %62 +%fImg1D = OpVariable %_ptr_UniformConstant_62 UniformConstant +%65 = OpTypeImage %float 2D 0 0 0 2 Rgba16f +%_ptr_UniformConstant_65 = OpTypePointer UniformConstant %65 +%fImg2D = OpVariable %_ptr_UniformConstant_65 UniformConstant +%68 = OpTypeImage %float 3D 0 0 0 2 R32f +%_ptr_UniformConstant_68 = OpTypePointer UniformConstant %68 +%fImg3D = OpVariable %_ptr_UniformConstant_68 UniformConstant +%71 = OpTypeImage %float Cube 0 0 0 2 Rgba8 +%_ptr_UniformConstant_71 = OpTypePointer UniformConstant %71 +%fImgCube = OpVariable %_ptr_UniformConstant_71 UniformConstant +%74 = OpTypeImage %float Rect 0 0 0 2 Rgba8Snorm +%_ptr_UniformConstant_74 = OpTypePointer UniformConstant %74 +%fImg2DRect = OpVariable %_ptr_UniformConstant_74 UniformConstant +%77 = OpTypeImage %float 1D 0 1 0 2 Rgba32f +%_ptr_UniformConstant_77 = OpTypePointer UniformConstant %77 +%fImg1DArray = OpVariable %_ptr_UniformConstant_77 UniformConstant +%80 = OpTypeImage %float 2D 0 1 0 2 Rgba32f +%_ptr_UniformConstant_80 = OpTypePointer UniformConstant %80 +%fImg2DArray = OpVariable %_ptr_UniformConstant_80 UniformConstant +%83 = OpTypeImage %float Cube 0 1 0 2 Rgba32f +%_ptr_UniformConstant_83 = OpTypePointer UniformConstant %83 +%fImgCubeArray = OpVariable %_ptr_UniformConstant_83 UniformConstant +%86 = OpTypeImage %float Buffer 0 0 0 2 Rgba32f +%_ptr_UniformConstant_86 = OpTypePointer UniformConstant %86 +%fImgBuffer = OpVariable %_ptr_UniformConstant_86 UniformConstant +%89 = OpTypeImage %float 2D 0 0 1 2 Rgba32f +%_ptr_UniformConstant_89 = OpTypePointer UniformConstant %89 +%fImg2DMS = OpVariable %_ptr_UniformConstant_89 UniformConstant +%92 = OpTypeImage %float 2D 0 1 1 2 Rgba32f +%_ptr_UniformConstant_92 = OpTypePointer UniformConstant %92 +%fImg2DMSArray = OpVariable %_ptr_UniformConstant_92 UniformConstant +%95 = OpTypeImage %int 1D 0 0 0 1 Unknown %96 = OpTypeSampledImage %95 -%264 = OpTypePointer UniformConstant %96 -%45 = OpVariable %264 UniformConstant -%99 = OpTypeImage %213 2D 0 0 0 1 Unknown +%_ptr_UniformConstant_96 = OpTypePointer UniformConstant %96 +%iSamp1D = OpVariable %_ptr_UniformConstant_96 UniformConstant +%99 = OpTypeImage %int 2D 0 0 0 1 Unknown %100 = OpTypeSampledImage %99 -%265 = OpTypePointer UniformConstant %100 -%47 = OpVariable %265 UniformConstant -%103 = OpTypeImage %213 3D 0 0 0 1 Unknown +%_ptr_UniformConstant_100 = OpTypePointer UniformConstant %100 +%iSamp2D = OpVariable %_ptr_UniformConstant_100 UniformConstant +%103 = OpTypeImage %int 3D 0 0 0 1 Unknown %104 = OpTypeSampledImage %103 -%266 = OpTypePointer UniformConstant %104 -%48 = OpVariable %266 UniformConstant -%107 = OpTypeImage %213 Cube 0 0 0 1 Unknown +%_ptr_UniformConstant_104 = OpTypePointer UniformConstant %104 +%iSamp3D = OpVariable %_ptr_UniformConstant_104 UniformConstant +%107 = OpTypeImage %int Cube 0 0 0 1 Unknown %108 = OpTypeSampledImage %107 -%267 = OpTypePointer UniformConstant %108 -%50 = OpVariable %267 UniformConstant -%111 = OpTypeImage %213 Rect 0 0 0 1 Unknown +%_ptr_UniformConstant_108 = OpTypePointer UniformConstant %108 +%iSampCube = OpVariable %_ptr_UniformConstant_108 UniformConstant +%111 = OpTypeImage %int Rect 0 0 0 1 Unknown %112 = OpTypeSampledImage %111 -%268 = OpTypePointer UniformConstant %112 -%51 = OpVariable %268 UniformConstant -%115 = OpTypeImage %213 1D 0 1 0 1 Unknown +%_ptr_UniformConstant_112 = OpTypePointer UniformConstant %112 +%iSamp2DRect = OpVariable %_ptr_UniformConstant_112 UniformConstant +%115 = OpTypeImage %int 1D 0 1 0 1 Unknown %116 = OpTypeSampledImage %115 -%269 = OpTypePointer UniformConstant %116 -%53 = OpVariable %269 UniformConstant -%119 = OpTypeImage %213 2D 0 1 0 1 Unknown +%_ptr_UniformConstant_116 = OpTypePointer UniformConstant %116 +%iSamp1DArray = OpVariable %_ptr_UniformConstant_116 UniformConstant +%119 = OpTypeImage %int 2D 0 1 0 1 Unknown %120 = OpTypeSampledImage %119 -%270 = OpTypePointer UniformConstant %120 -%54 = OpVariable %270 UniformConstant -%123 = OpTypeImage %213 Cube 0 1 0 1 Unknown +%_ptr_UniformConstant_120 = OpTypePointer UniformConstant %120 +%iSamp2DArray = OpVariable %_ptr_UniformConstant_120 UniformConstant +%123 = OpTypeImage %int Cube 0 1 0 1 Unknown %124 = OpTypeSampledImage %123 -%271 = OpTypePointer UniformConstant %124 -%56 = OpVariable %271 UniformConstant -%127 = OpTypeImage %213 Buffer 0 0 0 1 Unknown +%_ptr_UniformConstant_124 = OpTypePointer UniformConstant %124 +%iSampCubeArray = OpVariable %_ptr_UniformConstant_124 UniformConstant +%127 = OpTypeImage %int Buffer 0 0 0 1 Unknown %128 = OpTypeSampledImage %127 -%272 = OpTypePointer UniformConstant %128 -%57 = OpVariable %272 UniformConstant -%131 = OpTypeImage %213 2D 0 0 1 1 Unknown +%_ptr_UniformConstant_128 = OpTypePointer UniformConstant %128 +%iSampBuffer = OpVariable %_ptr_UniformConstant_128 UniformConstant +%131 = OpTypeImage %int 2D 0 0 1 1 Unknown %132 = OpTypeSampledImage %131 -%273 = OpTypePointer UniformConstant %132 -%59 = OpVariable %273 UniformConstant -%135 = OpTypeImage %213 2D 0 1 1 1 Unknown +%_ptr_UniformConstant_132 = OpTypePointer UniformConstant %132 +%iSamp2DMS = OpVariable %_ptr_UniformConstant_132 UniformConstant +%135 = OpTypeImage %int 2D 0 1 1 1 Unknown %136 = OpTypeSampledImage %135 -%274 = OpTypePointer UniformConstant %136 -%60 = OpVariable %274 UniformConstant -%139 = OpTypeImage %230 1D 0 0 0 1 Unknown +%_ptr_UniformConstant_136 = OpTypePointer UniformConstant %136 +%iSamp2DMSArray = OpVariable %_ptr_UniformConstant_136 UniformConstant +%139 = OpTypeImage %uint 1D 0 0 0 1 Unknown %140 = OpTypeSampledImage %139 -%275 = OpTypePointer UniformConstant %140 -%61 = OpVariable %275 UniformConstant -%143 = OpTypeImage %230 2D 0 0 0 1 Unknown +%_ptr_UniformConstant_140 = OpTypePointer UniformConstant %140 +%uSamp1D = OpVariable %_ptr_UniformConstant_140 UniformConstant +%143 = OpTypeImage %uint 2D 0 0 0 1 Unknown %144 = OpTypeSampledImage %143 -%276 = OpTypePointer UniformConstant %144 -%63 = OpVariable %276 UniformConstant -%147 = OpTypeImage %230 3D 0 0 0 1 Unknown +%_ptr_UniformConstant_144 = OpTypePointer UniformConstant %144 +%uSamp2D = OpVariable %_ptr_UniformConstant_144 UniformConstant +%147 = OpTypeImage %uint 3D 0 0 0 1 Unknown %148 = OpTypeSampledImage %147 -%277 = OpTypePointer UniformConstant %148 -%64 = OpVariable %277 UniformConstant -%151 = OpTypeImage %230 Cube 0 0 0 1 Unknown +%_ptr_UniformConstant_148 = OpTypePointer UniformConstant %148 +%uSamp3D = OpVariable %_ptr_UniformConstant_148 UniformConstant +%151 = OpTypeImage %uint Cube 0 0 0 1 Unknown %152 = OpTypeSampledImage %151 -%278 = OpTypePointer UniformConstant %152 -%66 = OpVariable %278 UniformConstant -%155 = OpTypeImage %230 Rect 0 0 0 1 Unknown +%_ptr_UniformConstant_152 = OpTypePointer UniformConstant %152 +%uSampCube = OpVariable %_ptr_UniformConstant_152 UniformConstant +%155 = OpTypeImage %uint Rect 0 0 0 1 Unknown %156 = OpTypeSampledImage %155 -%279 = OpTypePointer UniformConstant %156 -%67 = OpVariable %279 UniformConstant -%159 = OpTypeImage %230 1D 0 1 0 1 Unknown +%_ptr_UniformConstant_156 = OpTypePointer UniformConstant %156 +%uSamp2DRect = OpVariable %_ptr_UniformConstant_156 UniformConstant +%159 = OpTypeImage %uint 1D 0 1 0 1 Unknown %160 = OpTypeSampledImage %159 -%280 = OpTypePointer UniformConstant %160 -%69 = OpVariable %280 UniformConstant -%163 = OpTypeImage %230 2D 0 1 0 1 Unknown +%_ptr_UniformConstant_160 = OpTypePointer UniformConstant %160 +%uSamp1DArray = OpVariable %_ptr_UniformConstant_160 UniformConstant +%163 = OpTypeImage %uint 2D 0 1 0 1 Unknown %164 = OpTypeSampledImage %163 -%281 = OpTypePointer UniformConstant %164 -%70 = OpVariable %281 UniformConstant -%167 = OpTypeImage %230 Cube 0 1 0 1 Unknown +%_ptr_UniformConstant_164 = OpTypePointer UniformConstant %164 +%uSamp2DArray = OpVariable %_ptr_UniformConstant_164 UniformConstant +%167 = OpTypeImage %uint Cube 0 1 0 1 Unknown %168 = OpTypeSampledImage %167 -%282 = OpTypePointer UniformConstant %168 -%72 = OpVariable %282 UniformConstant -%171 = OpTypeImage %230 Buffer 0 0 0 1 Unknown +%_ptr_UniformConstant_168 = OpTypePointer UniformConstant %168 +%uSampCubeArray = OpVariable %_ptr_UniformConstant_168 UniformConstant +%171 = OpTypeImage %uint Buffer 0 0 0 1 Unknown %172 = OpTypeSampledImage %171 -%283 = OpTypePointer UniformConstant %172 -%73 = OpVariable %283 UniformConstant -%175 = OpTypeImage %230 2D 0 0 1 1 Unknown +%_ptr_UniformConstant_172 = OpTypePointer UniformConstant %172 +%uSampBuffer = OpVariable %_ptr_UniformConstant_172 UniformConstant +%175 = OpTypeImage %uint 2D 0 0 1 1 Unknown %176 = OpTypeSampledImage %175 -%284 = OpTypePointer UniformConstant %176 -%75 = OpVariable %284 UniformConstant -%179 = OpTypeImage %230 2D 0 1 1 1 Unknown +%_ptr_UniformConstant_176 = OpTypePointer UniformConstant %176 +%uSamp2DMS = OpVariable %_ptr_UniformConstant_176 UniformConstant +%179 = OpTypeImage %uint 2D 0 1 1 1 Unknown %180 = OpTypeSampledImage %179 -%285 = OpTypePointer UniformConstant %180 -%76 = OpVariable %285 UniformConstant -%183 = OpTypeImage %249 1D 0 0 0 1 Unknown +%_ptr_UniformConstant_180 = OpTypePointer UniformConstant %180 +%uSamp2DMSArray = OpVariable %_ptr_UniformConstant_180 UniformConstant +%183 = OpTypeImage %float 1D 0 0 0 1 Unknown %184 = OpTypeSampledImage %183 -%286 = OpTypePointer UniformConstant %184 -%78 = OpVariable %286 UniformConstant -%187 = OpTypeImage %249 2D 0 0 0 1 Unknown +%_ptr_UniformConstant_184 = OpTypePointer UniformConstant %184 +%fSamp1D = OpVariable %_ptr_UniformConstant_184 UniformConstant +%187 = OpTypeImage %float 2D 0 0 0 1 Unknown %188 = OpTypeSampledImage %187 -%287 = OpTypePointer UniformConstant %188 -%79 = OpVariable %287 UniformConstant -%191 = OpTypeImage %249 3D 0 0 0 1 Unknown +%_ptr_UniformConstant_188 = OpTypePointer UniformConstant %188 +%fSamp2D = OpVariable %_ptr_UniformConstant_188 UniformConstant +%191 = OpTypeImage %float 3D 0 0 0 1 Unknown %192 = OpTypeSampledImage %191 -%288 = OpTypePointer UniformConstant %192 -%81 = OpVariable %288 UniformConstant -%195 = OpTypeImage %249 Cube 0 0 0 1 Unknown +%_ptr_UniformConstant_192 = OpTypePointer UniformConstant %192 +%fSamp3D = OpVariable %_ptr_UniformConstant_192 UniformConstant +%195 = OpTypeImage %float Cube 0 0 0 1 Unknown %196 = OpTypeSampledImage %195 -%289 = OpTypePointer UniformConstant %196 -%82 = OpVariable %289 UniformConstant -%199 = OpTypeImage %249 Rect 0 0 0 1 Unknown +%_ptr_UniformConstant_196 = OpTypePointer UniformConstant %196 +%fSampCube = OpVariable %_ptr_UniformConstant_196 UniformConstant +%199 = OpTypeImage %float Rect 0 0 0 1 Unknown %200 = OpTypeSampledImage %199 -%290 = OpTypePointer UniformConstant %200 -%84 = OpVariable %290 UniformConstant -%203 = OpTypeImage %249 1D 0 1 0 1 Unknown +%_ptr_UniformConstant_200 = OpTypePointer UniformConstant %200 +%fSamp2DRect = OpVariable %_ptr_UniformConstant_200 UniformConstant +%203 = OpTypeImage %float 1D 0 1 0 1 Unknown %204 = OpTypeSampledImage %203 -%291 = OpTypePointer UniformConstant %204 -%85 = OpVariable %291 UniformConstant -%207 = OpTypeImage %249 2D 0 1 0 1 Unknown +%_ptr_UniformConstant_204 = OpTypePointer UniformConstant %204 +%fSamp1DArray = OpVariable %_ptr_UniformConstant_204 UniformConstant +%207 = OpTypeImage %float 2D 0 1 0 1 Unknown %208 = OpTypeSampledImage %207 -%292 = OpTypePointer UniformConstant %208 -%87 = OpVariable %292 UniformConstant -%211 = OpTypeImage %249 Cube 0 1 0 1 Unknown +%_ptr_UniformConstant_208 = OpTypePointer UniformConstant %208 +%fSamp2DArray = OpVariable %_ptr_UniformConstant_208 UniformConstant +%211 = OpTypeImage %float Cube 0 1 0 1 Unknown %212 = OpTypeSampledImage %211 -%293 = OpTypePointer UniformConstant %212 -%88 = OpVariable %293 UniformConstant -%215 = OpTypeImage %249 Buffer 0 0 0 1 Unknown +%_ptr_UniformConstant_212 = OpTypePointer UniformConstant %212 +%fSampCubeArray = OpVariable %_ptr_UniformConstant_212 UniformConstant +%215 = OpTypeImage %float Buffer 0 0 0 1 Unknown %216 = OpTypeSampledImage %215 -%294 = OpTypePointer UniformConstant %216 -%90 = OpVariable %294 UniformConstant -%219 = OpTypeImage %249 2D 0 0 1 1 Unknown +%_ptr_UniformConstant_216 = OpTypePointer UniformConstant %216 +%fSampBuffer = OpVariable %_ptr_UniformConstant_216 UniformConstant +%219 = OpTypeImage %float 2D 0 0 1 1 Unknown %220 = OpTypeSampledImage %219 -%295 = OpTypePointer UniformConstant %220 -%91 = OpVariable %295 UniformConstant -%223 = OpTypeImage %249 2D 0 1 1 1 Unknown +%_ptr_UniformConstant_220 = OpTypePointer UniformConstant %220 +%fSamp2DMS = OpVariable %_ptr_UniformConstant_220 UniformConstant +%223 = OpTypeImage %float 2D 0 1 1 1 Unknown %224 = OpTypeSampledImage %223 -%296 = OpTypePointer UniformConstant %224 -%93 = OpVariable %296 UniformConstant -%227 = OpTypeImage %249 1D 1 0 0 1 Unknown +%_ptr_UniformConstant_224 = OpTypePointer UniformConstant %224 +%fSamp2DMSArray = OpVariable %_ptr_UniformConstant_224 UniformConstant +%227 = OpTypeImage %float 1D 1 0 0 1 Unknown %228 = OpTypeSampledImage %227 -%297 = OpTypePointer UniformConstant %228 -%94 = OpVariable %297 UniformConstant -%231 = OpTypeImage %249 2D 1 0 0 1 Unknown +%_ptr_UniformConstant_228 = OpTypePointer UniformConstant %228 +%dsSamp1D = OpVariable %_ptr_UniformConstant_228 UniformConstant +%231 = OpTypeImage %float 2D 1 0 0 1 Unknown %232 = OpTypeSampledImage %231 -%298 = OpTypePointer UniformConstant %232 -%97 = OpVariable %298 UniformConstant -%235 = OpTypeImage %249 Cube 1 0 0 1 Unknown +%_ptr_UniformConstant_232 = OpTypePointer UniformConstant %232 +%dsSamp2D = OpVariable %_ptr_UniformConstant_232 UniformConstant +%235 = OpTypeImage %float Cube 1 0 0 1 Unknown %236 = OpTypeSampledImage %235 -%299 = OpTypePointer UniformConstant %236 -%98 = OpVariable %299 UniformConstant -%239 = OpTypeImage %249 Rect 1 0 0 1 Unknown +%_ptr_UniformConstant_236 = OpTypePointer UniformConstant %236 +%dsSampCube = OpVariable %_ptr_UniformConstant_236 UniformConstant +%239 = OpTypeImage %float Rect 1 0 0 1 Unknown %240 = OpTypeSampledImage %239 -%300 = OpTypePointer UniformConstant %240 -%101 = OpVariable %300 UniformConstant -%243 = OpTypeImage %249 1D 1 1 0 1 Unknown +%_ptr_UniformConstant_240 = OpTypePointer UniformConstant %240 +%dsSamp2DRect = OpVariable %_ptr_UniformConstant_240 UniformConstant +%243 = OpTypeImage %float 1D 1 1 0 1 Unknown %244 = OpTypeSampledImage %243 -%301 = OpTypePointer UniformConstant %244 -%102 = OpVariable %301 UniformConstant -%247 = OpTypeImage %249 2D 1 1 0 1 Unknown +%_ptr_UniformConstant_244 = OpTypePointer UniformConstant %244 +%dsSamp1DArray = OpVariable %_ptr_UniformConstant_244 UniformConstant +%247 = OpTypeImage %float 2D 1 1 0 1 Unknown %248 = OpTypeSampledImage %247 -%302 = OpTypePointer UniformConstant %248 -%105 = OpVariable %302 UniformConstant -%251 = OpTypeImage %249 Cube 1 1 0 1 Unknown +%_ptr_UniformConstant_248 = OpTypePointer UniformConstant %248 +%dsSamp2DArray = OpVariable %_ptr_UniformConstant_248 UniformConstant +%251 = OpTypeImage %float Cube 1 1 0 1 Unknown %252 = OpTypeSampledImage %251 -%303 = OpTypePointer UniformConstant %252 -%106 = OpVariable %303 UniformConstant +%_ptr_UniformConstant_252 = OpTypePointer UniformConstant %252 +%dsSampCubeArray = OpVariable %_ptr_UniformConstant_252 UniformConstant %255 = OpTypeSampler -%304 = OpTypePointer UniformConstant %255 -%109 = OpVariable %304 UniformConstant -%110 = OpVariable %304 UniformConstant -%305 = OpTypePointer UniformConstant %95 -%113 = OpVariable %305 UniformConstant -%306 = OpTypePointer UniformConstant %99 -%114 = OpVariable %306 UniformConstant -%307 = OpTypePointer UniformConstant %103 -%117 = OpVariable %307 UniformConstant -%308 = OpTypePointer UniformConstant %107 -%118 = OpVariable %308 UniformConstant -%309 = OpTypePointer UniformConstant %111 -%121 = OpVariable %309 UniformConstant -%310 = OpTypePointer UniformConstant %115 -%122 = OpVariable %310 UniformConstant -%311 = OpTypePointer UniformConstant %119 -%125 = OpVariable %311 UniformConstant -%312 = OpTypePointer UniformConstant %123 -%126 = OpVariable %312 UniformConstant -%313 = OpTypePointer UniformConstant %127 -%129 = OpVariable %313 UniformConstant -%314 = OpTypePointer UniformConstant %131 -%130 = OpVariable %314 UniformConstant -%315 = OpTypePointer UniformConstant %135 -%133 = OpVariable %315 UniformConstant -%316 = OpTypePointer UniformConstant %139 -%134 = OpVariable %316 UniformConstant -%317 = OpTypePointer UniformConstant %143 -%137 = OpVariable %317 UniformConstant -%318 = OpTypePointer UniformConstant %147 -%138 = OpVariable %318 UniformConstant -%319 = OpTypePointer UniformConstant %151 -%141 = OpVariable %319 UniformConstant -%320 = OpTypePointer UniformConstant %155 -%142 = OpVariable %320 UniformConstant -%321 = OpTypePointer UniformConstant %159 -%145 = OpVariable %321 UniformConstant -%322 = OpTypePointer UniformConstant %163 -%146 = OpVariable %322 UniformConstant -%323 = OpTypePointer UniformConstant %167 -%149 = OpVariable %323 UniformConstant -%324 = OpTypePointer UniformConstant %171 -%150 = OpVariable %324 UniformConstant -%325 = OpTypePointer UniformConstant %175 -%153 = OpVariable %325 UniformConstant -%326 = OpTypePointer UniformConstant %179 -%154 = OpVariable %326 UniformConstant -%327 = OpTypePointer UniformConstant %183 -%157 = OpVariable %327 UniformConstant -%328 = OpTypePointer UniformConstant %187 -%158 = OpVariable %328 UniformConstant -%329 = OpTypePointer UniformConstant %191 -%161 = OpVariable %329 UniformConstant -%330 = OpTypePointer UniformConstant %195 -%162 = OpVariable %330 UniformConstant -%331 = OpTypePointer UniformConstant %199 -%165 = OpVariable %331 UniformConstant -%332 = OpTypePointer UniformConstant %203 -%166 = OpVariable %332 UniformConstant -%333 = OpTypePointer UniformConstant %207 -%169 = OpVariable %333 UniformConstant -%334 = OpTypePointer UniformConstant %211 -%170 = OpVariable %334 UniformConstant -%335 = OpTypePointer UniformConstant %215 -%173 = OpVariable %335 UniformConstant -%336 = OpTypePointer UniformConstant %219 -%174 = OpVariable %336 UniformConstant -%337 = OpTypePointer UniformConstant %223 -%177 = OpVariable %337 UniformConstant -%338 = OpTypeVector %213 2 -%339 = OpTypeVector %213 3 -%340 = OpTypeVector %213 4 -%341 = OpTypeVector %230 2 -%342 = OpTypeVector %230 3 -%343 = OpTypeVector %230 4 -%344 = OpTypeVector %249 2 -%345 = OpTypeVector %249 3 -%346 = OpTypeVector %249 4 -%347 = OpTypeMatrix %344 2 -%348 = OpTypeMatrix %345 2 -%349 = OpTypeMatrix %346 2 -%350 = OpTypeMatrix %344 3 -%351 = OpTypeMatrix %345 3 -%352 = OpTypeMatrix %346 3 -%353 = OpTypeMatrix %344 4 -%354 = OpTypeMatrix %345 4 -%355 = OpTypeMatrix %346 4 -%356 = OpTypeFloat 64 -%357 = OpTypeVector %356 2 -%358 = OpTypeVector %356 3 -%359 = OpTypeVector %356 4 -%360 = OpTypeMatrix %357 2 -%361 = OpTypeMatrix %358 2 -%362 = OpTypeMatrix %359 2 -%363 = OpTypeMatrix %357 3 -%364 = OpTypeMatrix %358 3 -%365 = OpTypeMatrix %359 3 -%366 = OpTypeMatrix %357 4 -%367 = OpTypeMatrix %358 4 -%369 = OpTypeMatrix %359 4 -%197 = OpTypeStruct %213 %338 %339 %340 %230 %341 %342 %343 %249 %344 %345 %346 %347 %348 %349 %350 %351 %352 %353 %354 %355 %356 %357 %358 %359 %360 %361 %362 %363 %364 %365 %366 %367 %369 -%370 = OpConstant %230 4 -%202 = OpTypeArray %197 %370 -%198 = OpTypeStruct %202 -%372 = OpConstant %230 1 -%373 = OpTypeArray %198 %372 -%375 = OpTypePointer Uniform %373 -%178 = OpVariable %375 Uniform -%205 = OpTypeRuntimeArray %213 -%201 = OpTypeStruct %205 -%376 = OpTypePointer StorageBuffer %201 -%181 = OpVariable %376 StorageBuffer -%368 = OpTypeImage %213 SubpassData 0 0 0 2 Unknown -%378 = OpTypePointer UniformConstant %368 -%182 = OpVariable %378 UniformConstant -%371 = OpTypeImage %213 SubpassData 0 0 1 2 Unknown -%379 = OpTypePointer UniformConstant %371 -%185 = OpVariable %379 UniformConstant -%374 = OpTypeImage %230 SubpassData 0 0 0 2 Unknown -%381 = OpTypePointer UniformConstant %374 -%186 = OpVariable %381 UniformConstant -%377 = OpTypeImage %230 SubpassData 0 0 1 2 Unknown -%382 = OpTypePointer UniformConstant %377 -%189 = OpVariable %382 UniformConstant -%380 = OpTypeImage %249 SubpassData 0 0 0 2 Unknown -%384 = OpTypePointer UniformConstant %380 -%190 = OpVariable %384 UniformConstant -%383 = OpTypeImage %249 SubpassData 0 0 1 2 Unknown -%385 = OpTypePointer UniformConstant %383 -%193 = OpVariable %385 UniformConstant +%_ptr_UniformConstant_255 = OpTypePointer UniformConstant %255 +%samp = OpVariable %_ptr_UniformConstant_255 UniformConstant +%sampShadow = OpVariable %_ptr_UniformConstant_255 UniformConstant +%_ptr_UniformConstant_95 = OpTypePointer UniformConstant %95 +%iTex1D = OpVariable %_ptr_UniformConstant_95 UniformConstant +%_ptr_UniformConstant_99 = OpTypePointer UniformConstant %99 +%iTex2D = OpVariable %_ptr_UniformConstant_99 UniformConstant +%_ptr_UniformConstant_103 = OpTypePointer UniformConstant %103 +%iTex3D = OpVariable %_ptr_UniformConstant_103 UniformConstant +%_ptr_UniformConstant_107 = OpTypePointer UniformConstant %107 +%iTexCube = OpVariable %_ptr_UniformConstant_107 UniformConstant +%_ptr_UniformConstant_111 = OpTypePointer UniformConstant %111 +%iTex2DRect = OpVariable %_ptr_UniformConstant_111 UniformConstant +%_ptr_UniformConstant_115 = OpTypePointer UniformConstant %115 +%iTex1DArray = OpVariable %_ptr_UniformConstant_115 UniformConstant +%_ptr_UniformConstant_119 = OpTypePointer UniformConstant %119 +%iTex2DArray = OpVariable %_ptr_UniformConstant_119 UniformConstant +%_ptr_UniformConstant_123 = OpTypePointer UniformConstant %123 +%iTexCubeArray = OpVariable %_ptr_UniformConstant_123 UniformConstant +%_ptr_UniformConstant_127 = OpTypePointer UniformConstant %127 +%iTexBuffer = OpVariable %_ptr_UniformConstant_127 UniformConstant +%_ptr_UniformConstant_131 = OpTypePointer UniformConstant %131 +%iTex2DMS = OpVariable %_ptr_UniformConstant_131 UniformConstant +%_ptr_UniformConstant_135 = OpTypePointer UniformConstant %135 +%iTex2DMSArray = OpVariable %_ptr_UniformConstant_135 UniformConstant +%_ptr_UniformConstant_139 = OpTypePointer UniformConstant %139 +%uTex1D = OpVariable %_ptr_UniformConstant_139 UniformConstant +%_ptr_UniformConstant_143 = OpTypePointer UniformConstant %143 +%uTex2D = OpVariable %_ptr_UniformConstant_143 UniformConstant +%_ptr_UniformConstant_147 = OpTypePointer UniformConstant %147 +%uTex3D = OpVariable %_ptr_UniformConstant_147 UniformConstant +%_ptr_UniformConstant_151 = OpTypePointer UniformConstant %151 +%uTexCube = OpVariable %_ptr_UniformConstant_151 UniformConstant +%_ptr_UniformConstant_155 = OpTypePointer UniformConstant %155 +%uTex2DRect = OpVariable %_ptr_UniformConstant_155 UniformConstant +%_ptr_UniformConstant_159 = OpTypePointer UniformConstant %159 +%uTex1DArray = OpVariable %_ptr_UniformConstant_159 UniformConstant +%_ptr_UniformConstant_163 = OpTypePointer UniformConstant %163 +%uTex2DArray = OpVariable %_ptr_UniformConstant_163 UniformConstant +%_ptr_UniformConstant_167 = OpTypePointer UniformConstant %167 +%uTexCubeArray = OpVariable %_ptr_UniformConstant_167 UniformConstant +%_ptr_UniformConstant_171 = OpTypePointer UniformConstant %171 +%uTexBuffer = OpVariable %_ptr_UniformConstant_171 UniformConstant +%_ptr_UniformConstant_175 = OpTypePointer UniformConstant %175 +%uTex2DMS = OpVariable %_ptr_UniformConstant_175 UniformConstant +%_ptr_UniformConstant_179 = OpTypePointer UniformConstant %179 +%uTex2DMSArray = OpVariable %_ptr_UniformConstant_179 UniformConstant +%_ptr_UniformConstant_183 = OpTypePointer UniformConstant %183 +%fTex1D = OpVariable %_ptr_UniformConstant_183 UniformConstant +%_ptr_UniformConstant_187 = OpTypePointer UniformConstant %187 +%fTex2D = OpVariable %_ptr_UniformConstant_187 UniformConstant +%_ptr_UniformConstant_191 = OpTypePointer UniformConstant %191 +%fTex3D = OpVariable %_ptr_UniformConstant_191 UniformConstant +%_ptr_UniformConstant_195 = OpTypePointer UniformConstant %195 +%fTexCube = OpVariable %_ptr_UniformConstant_195 UniformConstant +%_ptr_UniformConstant_199 = OpTypePointer UniformConstant %199 +%fTex2DRect = OpVariable %_ptr_UniformConstant_199 UniformConstant +%_ptr_UniformConstant_203 = OpTypePointer UniformConstant %203 +%fTex1DArray = OpVariable %_ptr_UniformConstant_203 UniformConstant +%_ptr_UniformConstant_207 = OpTypePointer UniformConstant %207 +%fTex2DArray = OpVariable %_ptr_UniformConstant_207 UniformConstant +%_ptr_UniformConstant_211 = OpTypePointer UniformConstant %211 +%fTexCubeArray = OpVariable %_ptr_UniformConstant_211 UniformConstant +%_ptr_UniformConstant_215 = OpTypePointer UniformConstant %215 +%fTexBuffer = OpVariable %_ptr_UniformConstant_215 UniformConstant +%_ptr_UniformConstant_219 = OpTypePointer UniformConstant %219 +%fTex2DMS = OpVariable %_ptr_UniformConstant_219 UniformConstant +%_ptr_UniformConstant_223 = OpTypePointer UniformConstant %223 +%fTex2DMSArray = OpVariable %_ptr_UniformConstant_223 UniformConstant +%v2int = OpTypeVector %int 2 +%v3int = OpTypeVector %int 3 +%v4int = OpTypeVector %int 4 +%v2uint = OpTypeVector %uint 2 +%v3uint = OpTypeVector %uint 3 +%v4uint = OpTypeVector %uint 4 +%v2float = OpTypeVector %float 2 +%v3float = OpTypeVector %float 3 +%v4float = OpTypeVector %float 4 +%mat2v2float = OpTypeMatrix %v2float 2 +%mat2v3float = OpTypeMatrix %v3float 2 +%mat2v4float = OpTypeMatrix %v4float 2 +%mat3v2float = OpTypeMatrix %v2float 3 +%mat3v3float = OpTypeMatrix %v3float 3 +%mat3v4float = OpTypeMatrix %v4float 3 +%mat4v2float = OpTypeMatrix %v2float 4 +%mat4v3float = OpTypeMatrix %v3float 4 +%mat4v4float = OpTypeMatrix %v4float 4 +%double = OpTypeFloat 64 +%v2double = OpTypeVector %double 2 +%v3double = OpTypeVector %double 3 +%v4double = OpTypeVector %double 4 +%mat2v2double = OpTypeMatrix %v2double 2 +%mat2v3double = OpTypeMatrix %v3double 2 +%mat2v4double = OpTypeMatrix %v4double 2 +%mat3v2double = OpTypeMatrix %v2double 3 +%mat3v3double = OpTypeMatrix %v3double 3 +%mat3v4double = OpTypeMatrix %v4double 3 +%mat4v2double = OpTypeMatrix %v2double 4 +%mat4v3double = OpTypeMatrix %v3double 4 +%mat4v4double = OpTypeMatrix %v4double 4 +%Data = OpTypeStruct %int %v2int %v3int %v4int %uint %v2uint %v3uint %v4uint %float %v2float %v3float %v4float %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %double %v2double %v3double %v4double %mat2v2double %mat2v3double %mat2v4double %mat3v2double %mat3v3double %mat3v4double %mat4v2double %mat4v3double %mat4v4double +%uint_4 = OpConstant %uint 4 +%_arr_Data_uint_4 = OpTypeArray %Data %uint_4 +%Ubo = OpTypeStruct %_arr_Data_uint_4 +%uint_1 = OpConstant %uint 1 +%_arr_Ubo_uint_1 = OpTypeArray %Ubo %uint_1 +%_ptr_Uniform__arr_Ubo_uint_1 = OpTypePointer Uniform %_arr_Ubo_uint_1 +%ubo = OpVariable %_ptr_Uniform__arr_Ubo_uint_1 Uniform +%_runtimearr_int = OpTypeRuntimeArray %int +%Ssbo = OpTypeStruct %_runtimearr_int +%_ptr_StorageBuffer_Ssbo = OpTypePointer StorageBuffer %Ssbo +%ssbo = OpVariable %_ptr_StorageBuffer_Ssbo StorageBuffer +%368 = OpTypeImage %int SubpassData 0 0 0 2 Unknown +%_ptr_UniformConstant_368 = OpTypePointer UniformConstant %368 +%iAttm = OpVariable %_ptr_UniformConstant_368 UniformConstant +%371 = OpTypeImage %int SubpassData 0 0 1 2 Unknown +%_ptr_UniformConstant_371 = OpTypePointer UniformConstant %371 +%iAttmMS = OpVariable %_ptr_UniformConstant_371 UniformConstant +%374 = OpTypeImage %uint SubpassData 0 0 0 2 Unknown +%_ptr_UniformConstant_374 = OpTypePointer UniformConstant %374 +%uAttm = OpVariable %_ptr_UniformConstant_374 UniformConstant +%377 = OpTypeImage %uint SubpassData 0 0 1 2 Unknown +%_ptr_UniformConstant_377 = OpTypePointer UniformConstant %377 +%uAttmMS = OpVariable %_ptr_UniformConstant_377 UniformConstant +%380 = OpTypeImage %float SubpassData 0 0 0 2 Unknown +%_ptr_UniformConstant_380 = OpTypePointer UniformConstant %380 +%fAttm = OpVariable %_ptr_UniformConstant_380 UniformConstant +%383 = OpTypeImage %float SubpassData 0 0 1 2 Unknown +%_ptr_UniformConstant_383 = OpTypePointer UniformConstant %383 +%fAttmMS = OpVariable %_ptr_UniformConstant_383 UniformConstant %386 = OpTypeAccelerationStructureKHR -%387 = OpTypePointer UniformConstant %386 -%194 = OpVariable %387 UniformConstant -%388 = OpTypeInt 8 1 -%389 = OpConstant %388 1 -%390 = OpTypeInt 16 1 -%391 = OpConstant %390 1 -%392 = OpConstant %213 1 -%393 = OpTypeInt 64 1 -%394 = OpConstant %393 1 -%395 = OpTypeInt 8 0 -%396 = OpConstant %395 1 -%397 = OpTypeInt 16 0 -%398 = OpConstant %397 1 -%399 = OpTypeInt 64 0 -%400 = OpConstant %399 1 -%401 = OpTypeFloat 16 -%402 = OpConstant %401 0x1p-2 -%403 = OpConstant %249 1 -%404 = OpConstant %356 1 -%0 = OpFunction %206 None %3 +%_ptr_UniformConstant_386 = OpTypePointer UniformConstant %386 +%acc = OpVariable %_ptr_UniformConstant_386 UniformConstant +%char = OpTypeInt 8 1 +%char_1 = OpConstant %char 1 +%short = OpTypeInt 16 1 +%short_1 = OpConstant %short 1 +%int_1 = OpConstant %int 1 +%long = OpTypeInt 64 1 +%long_1 = OpConstant %long 1 +%uchar = OpTypeInt 8 0 +%uchar_1 = OpConstant %uchar 1 +%ushort = OpTypeInt 16 0 +%ushort_1 = OpConstant %ushort 1 +%ulong = OpTypeInt 64 0 +%ulong_1 = OpConstant %ulong 1 +%half = OpTypeFloat 16 +%half_0x1pn2 = OpConstant %half 0x1p-2 +%float_1 = OpConstant %float 1 +%double_1 = OpConstant %double 1 +%main = OpFunction %void None %3 %5 = OpLabel -%10 = OpRayQueryProceedKHR %210 %2 +%10 = OpRayQueryProceedKHR %bool %ray_query OpReturn OpFunctionEnd \ No newline at end of file diff --git a/spirq-core/Cargo.toml b/spirq-core/Cargo.toml index 1c8b769..040723a 100644 --- a/spirq-core/Cargo.toml +++ b/spirq-core/Cargo.toml @@ -24,3 +24,4 @@ anyhow = "1.0" ordered-float = "3.4" num-traits = "0.2" half = { version = "2.3", features = ["num-traits"] } +bytemuck = "1.14" diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 4896813..01ed2fd 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -1,5 +1,6 @@ //! SPIR-V instruction parser. use anyhow::bail; +use bytemuck::Pod; use num_traits::FromPrimitive; use spirv::Op; use std::{borrow::Borrow, fmt, ops::Deref}; @@ -169,7 +170,6 @@ impl InstructionBuilder { self } pub fn push_str(mut self, x: &str) -> Self { - // FIXME: (penguinliong) Avoid unsafe code. use std::ffi::CString; let cstr = CString::new(x).unwrap(); let bytes = cstr.as_bytes(); @@ -180,8 +180,7 @@ impl InstructionBuilder { out.resize(words * 4, 0); out }; - let ptr = bytes.as_ptr() as *const u32; - let slice = unsafe { std::slice::from_raw_parts(ptr, words) }; + let slice: &[u32] = bytemuck::cast_slice(&bytes); self.inner.extend_from_slice(slice); self } @@ -219,19 +218,17 @@ impl<'a> Operands<'a> { self.read_u32() } pub fn read_str(&mut self) -> Result<&'a str> { - // FIXME: (penguinliong) Avoid unsafe code. use std::ffi::CStr; - use std::os::raw::c_char; - let ptr = self.0.as_ptr() as *const c_char; - let char_slice = unsafe { std::slice::from_raw_parts(ptr, self.0.len() * 4) }; - if let Some(nul_pos) = char_slice.into_iter().position(|x| *x == 0) { - let nword = nul_pos / 4 + 1; - self.0 = &self.0[nword..]; - if let Ok(string) = unsafe { CStr::from_ptr(ptr) }.to_str() { - return Ok(string); - } - } - Err(anyhow!("string is not null-terminated")) + // Find the word with a trailing zero. + let ieos = self.0.iter() + .position(|x| (x >> 24) == 0) + .ok_or(anyhow!("string is not null-terminated"))?; + + let slice: &[u32] = &self.0[..ieos + 1]; + self.0 = &self.0[ieos + 1..]; + let bytes: &[u8] = bytemuck::cast_slice(slice); + let cstr = CStr::from_bytes_until_nul(bytes)?; + Ok(cstr.to_str()?) } pub fn read_enum(&mut self) -> Result { self.read_u32() From 20ba132197457c1b0bc76cec84237f4e9ef5e0df Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 22:22:17 +0800 Subject: [PATCH 49/50] Format --- .github/workflows/rust.yml | 8 ++++---- spirq-core/src/parse/instr.rs | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 546ea18..a4ddd2c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,17 +33,17 @@ jobs: run: | cargo fmt -- --check - - name: Cargo build + - name: Cargo Build id: cargo_build run: | cargo build --verbose - - name: Cargo test + - name: Cargo Test id: cargo_test run: | cargo test --verbose - - name: Run SPIR-Q examples + - name: Run SPIR-Q Examples id: spirq_examples run: | cargo run --example gallery > spirq/examples/gallery/main.log @@ -61,7 +61,7 @@ jobs: diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources - - name: Assemble-disassemble Roundtrip + - name: Assemble Disassemble Roundtrip id: cargo_build_and_test run: | cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index 01ed2fd..ffe3fea 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -220,7 +220,9 @@ impl<'a> Operands<'a> { pub fn read_str(&mut self) -> Result<&'a str> { use std::ffi::CStr; // Find the word with a trailing zero. - let ieos = self.0.iter() + let ieos = self + .0 + .iter() .position(|x| (x >> 24) == 0) .ok_or(anyhow!("string is not null-terminated"))?; From 213e4b0846b7f2887396ff90a712c5ffc5313c69 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Mon, 25 Dec 2023 22:27:21 +0800 Subject: [PATCH 50/50] Remove unused import --- spirq-core/src/parse/instr.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/spirq-core/src/parse/instr.rs b/spirq-core/src/parse/instr.rs index ffe3fea..65966ff 100644 --- a/spirq-core/src/parse/instr.rs +++ b/spirq-core/src/parse/instr.rs @@ -1,6 +1,5 @@ //! SPIR-V instruction parser. use anyhow::bail; -use bytemuck::Pod; use num_traits::FromPrimitive; use spirv::Op; use std::{borrow::Borrow, fmt, ops::Deref};