${spirv-tools_SOURCE_DIR}
COMMENT "Update build-version.inc in the Spirv-tools build directory (if necessary).")
+add_custom_target(spirv-tools-build-tables
+ ${PYTHON_EXECUTABLE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/utils/generate_grammar_tables.py
+ ${spirv-tools_SOURCE_DIR}/source/grammar.json
+ --opcode-file=${spirv-tools_BINARY_DIR}/opcode.inc
+ --operand-file=${spirv-tools_BINARY_DIR}/operand.inc
+ COMMENT "Generate info tables for SPIR-V instructions and operands.")
+
# Defaults to OFF if the user didn't set it.
option(SPIRV_SKIP_EXECUTABLES
"Skip building the executable and tests along with the library"
add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES})
spvtools_default_compile_options(${SPIRV_TOOLS})
-target_include_directories(${SPIRV_TOOLS} PUBLIC ${spirv-tools_SOURCE_DIR}/include)
+target_include_directories(${SPIRV_TOOLS}
+ PUBLIC ${spirv-tools_SOURCE_DIR}/include
+ PRIVATE ${spirv-tools_BINARY_DIR}
+ )
+add_dependencies(${SPIRV_TOOLS} spirv-tools-build-tables)
install(TARGETS ${SPIRV_TOOLS}
RUNTIME DESTINATION bin
--- /dev/null
+{
+ "copyright" : [
+ "Copyright (c) 2014-2016 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."
+ ],
+ "instructions" : [
+ {
+ "opname" : "OpNop",
+ "opcode" : 0
+ },
+ {
+ "opname" : "OpUndef",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpSourceContinued",
+ "opcode" : 2,
+ "operands" : [
+ { "kind" : "LiteralString", "name" : "'Continued Source'" }
+ ]
+ },
+ {
+ "opname" : "OpSource",
+ "opcode" : 3,
+ "operands" : [
+ { "kind" : "SourceLanguage" },
+ { "kind" : "LiteralInteger", "name" : "'Version'" },
+ { "kind" : "IdRef", "quantifier" : "?", "name" : "'File'" },
+ { "kind" : "LiteralString", "quantifier" : "?", "name" : "'Source'" }
+ ]
+ },
+ {
+ "opname" : "OpSourceExtension",
+ "opcode" : 4,
+ "operands" : [
+ { "kind" : "LiteralString", "name" : "'Extension'" }
+ ]
+ },
+ {
+ "opname" : "OpName",
+ "opcode" : 5,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "LiteralString", "name" : "'Name'" }
+ ]
+ },
+ {
+ "opname" : "OpMemberName",
+ "opcode" : 6,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Member'" },
+ { "kind" : "LiteralString", "name" : "'Name'" }
+ ]
+ },
+ {
+ "opname" : "OpString",
+ "opcode" : 7,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralString", "name" : "'String'" }
+ ]
+ },
+ {
+ "opname" : "OpLine",
+ "opcode" : 8,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'File'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" }
+ ]
+ },
+ {
+ "opname" : "OpExtension",
+ "opcode" : 10,
+ "operands" : [
+ { "kind" : "LiteralString", "name" : "'Name'" }
+ ]
+ },
+ {
+ "opname" : "OpExtInstImport",
+ "opcode" : 11,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralString", "name" : "'Name'" }
+ ]
+ },
+ {
+ "opname" : "OpExtInst",
+ "opcode" : 12,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Set'" },
+ { "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." }
+ ]
+ },
+ {
+ "opname" : "OpMemoryModel",
+ "opcode" : 14,
+ "operands" : [
+ { "kind" : "AddressingModel" },
+ { "kind" : "MemoryModel" }
+ ]
+ },
+ {
+ "opname" : "OpEntryPoint",
+ "opcode" : 15,
+ "operands" : [
+ { "kind" : "ExecutionModel" },
+ { "kind" : "IdRef", "name" : "'Entry Point'" },
+ { "kind" : "LiteralString", "name" : "'Name'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Interface'" }
+ ]
+ },
+ {
+ "opname" : "OpExecutionMode",
+ "opcode" : 16,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Entry Point'" },
+ { "kind" : "ExecutionMode", "name" : "'Mode'" }
+ ]
+ },
+ {
+ "opname" : "OpCapability",
+ "opcode" : 17,
+ "operands" : [
+ { "kind" : "Capability", "name" : "'Capability'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeVoid",
+ "opcode" : 19,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpTypeBool",
+ "opcode" : 20,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpTypeInt",
+ "opcode" : 21,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralInteger", "name" : "'Width'" },
+ { "kind" : "LiteralInteger", "name" : "'Signedness'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeFloat",
+ "opcode" : 22,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralInteger", "name" : "'Width'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeVector",
+ "opcode" : 23,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Component Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Component Count'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeMatrix",
+ "opcode" : 24,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Column Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Column Count'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpTypeImage",
+ "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" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpTypeSampler",
+ "opcode" : 26,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpTypeSampledImage",
+ "opcode" : 27,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image Type'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeArray",
+ "opcode" : 28,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Element Type'" },
+ { "kind" : "IdRef", "name" : "'Length'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeRuntimeArray",
+ "opcode" : 29,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Element Type'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpTypeStruct",
+ "opcode" : 30,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Member 0 type', +\n'member 1 type', +\n..." }
+ ]
+ },
+ {
+ "opname" : "OpTypeOpaque",
+ "opcode" : 31,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralString", "name" : "The name of the opaque type." }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpTypePointer",
+ "opcode" : 32,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "StorageClass" },
+ { "kind" : "IdRef", "name" : "'Type'" }
+ ]
+ },
+ {
+ "opname" : "OpTypeFunction",
+ "opcode" : 33,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Return Type'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..." }
+ ]
+ },
+ {
+ "opname" : "OpTypeEvent",
+ "opcode" : 34,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpTypeDeviceEvent",
+ "opcode" : 35,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpTypeReserveId",
+ "opcode" : 36,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpTypeQueue",
+ "opcode" : 37,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpTypePipe",
+ "opcode" : 38,
+ "operands" : [
+ { "kind" : "IdResult" },
+ { "kind" : "AccessQualifier", "name" : "'Qualifier'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpTypeForwardPointer",
+ "opcode" : 39,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pointer Type'" },
+ { "kind" : "StorageClass" }
+ ],
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "opname" : "OpConstantTrue",
+ "opcode" : 41,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpConstantFalse",
+ "opcode" : 42,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpConstant",
+ "opcode" : 43,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpConstantComposite",
+ "opcode" : 44,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" }
+ ]
+ },
+ {
+ "opname" : "OpConstantSampler",
+ "opcode" : 45,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "SamplerAddressingMode" },
+ { "kind" : "LiteralInteger", "name" : "'Param'" },
+ { "kind" : "SamplerFilterMode" }
+ ],
+ "capabilities" : [ "LiteralSampler" ]
+ },
+ {
+ "opname" : "OpConstantNull",
+ "opcode" : 46,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpSpecConstantTrue",
+ "opcode" : 48,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpSpecConstantFalse",
+ "opcode" : 49,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpSpecConstant",
+ "opcode" : 50,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralContextDependentNumber", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpSpecConstantComposite",
+ "opcode" : 51,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" }
+ ]
+ },
+ {
+ "opname" : "OpSpecConstantOp",
+ "opcode" : 52,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "LiteralSpecConstantOpInteger", "name" : "'Opcode'" }
+ ]
+ },
+ {
+ "opname" : "OpFunction",
+ "opcode" : 54,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "FunctionControl" },
+ { "kind" : "IdRef", "name" : "'Function Type'" }
+ ]
+ },
+ {
+ "opname" : "OpFunctionParameter",
+ "opcode" : 55,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpFunctionEnd",
+ "opcode" : 56
+ },
+ {
+ "opname" : "OpFunctionCall",
+ "opcode" : 57,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Function'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Argument 0', +\n'Argument 1', +\n..." }
+ ]
+ },
+ {
+ "opname" : "OpVariable",
+ "opcode" : 59,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "StorageClass" },
+ { "kind" : "IdRef", "quantifier" : "?", "name" : "'Initializer'" }
+ ]
+ },
+ {
+ "opname" : "OpImageTexelPointer",
+ "opcode" : 60,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'Sample'" }
+ ]
+ },
+ {
+ "opname" : "OpLoad",
+ "opcode" : 61,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "MemoryAccess", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpStore",
+ "opcode" : 62,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdRef", "name" : "'Object'" },
+ { "kind" : "MemoryAccess", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpCopyMemory",
+ "opcode" : 63,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "MemoryAccess", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpCopyMemorySized",
+ "opcode" : 64,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "MemoryAccess", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "opname" : "OpAccessChain",
+ "opcode" : 65,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" }
+ ]
+ },
+ {
+ "opname" : "OpInBoundsAccessChain",
+ "opcode" : 66,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" }
+ ]
+ },
+ {
+ "opname" : "OpPtrAccessChain",
+ "opcode" : 67,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Element'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" }
+ ],
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "opname" : "OpArrayLength",
+ "opcode" : 68,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Structure'" },
+ { "kind" : "LiteralInteger", "name" : "'Array member'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpGenericPtrMemSemantics",
+ "opcode" : 69,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpInBoundsPtrAccessChain",
+ "opcode" : 70,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Element'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Indexes'" }
+ ],
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "opname" : "OpDecorate",
+ "opcode" : 71,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "Decoration" }
+ ]
+ },
+ {
+ "opname" : "OpMemberDecorate",
+ "opcode" : 72,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Structure Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Member'" },
+ { "kind" : "Decoration" }
+ ]
+ },
+ {
+ "opname" : "OpDecorationGroup",
+ "opcode" : 73,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpGroupDecorate",
+ "opcode" : 74,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Decoration Group'" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Targets'" }
+ ]
+ },
+ {
+ "opname" : "OpGroupMemberDecorate",
+ "opcode" : 75,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Decoration Group'" },
+ { "kind" : "PairIdRefLiteralInteger", "quantifier" : "*", "name" : "'Targets'" }
+ ]
+ },
+ {
+ "opname" : "OpVectorExtractDynamic",
+ "opcode" : 77,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector'" },
+ { "kind" : "IdRef", "name" : "'Index'" }
+ ]
+ },
+ {
+ "opname" : "OpVectorInsertDynamic",
+ "opcode" : 78,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector'" },
+ { "kind" : "IdRef", "name" : "'Component'" },
+ { "kind" : "IdRef", "name" : "'Index'" }
+ ]
+ },
+ {
+ "opname" : "OpVectorShuffle",
+ "opcode" : 79,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector 1'" },
+ { "kind" : "IdRef", "name" : "'Vector 2'" },
+ { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Components'" }
+ ]
+ },
+ {
+ "opname" : "OpCompositeConstruct",
+ "opcode" : 80,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Constituents'" }
+ ]
+ },
+ {
+ "opname" : "OpCompositeExtract",
+ "opcode" : 81,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Composite'" },
+ { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" }
+ ]
+ },
+ {
+ "opname" : "OpCompositeInsert",
+ "opcode" : 82,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Object'" },
+ { "kind" : "IdRef", "name" : "'Composite'" },
+ { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Indexes'" }
+ ]
+ },
+ {
+ "opname" : "OpCopyObject",
+ "opcode" : 83,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand'" }
+ ]
+ },
+ {
+ "opname" : "OpTranspose",
+ "opcode" : 84,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Matrix'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpSampledImage",
+ "opcode" : 86,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Sampler'" }
+ ]
+ },
+ {
+ "opname" : "OpImageSampleImplicitLod",
+ "opcode" : 87,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageSampleExplicitLod",
+ "opcode" : 88,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands" }
+ ]
+ },
+ {
+ "opname" : "OpImageSampleDrefImplicitLod",
+ "opcode" : 89,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageSampleDrefExplicitLod",
+ "opcode" : 90,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageSampleProjImplicitLod",
+ "opcode" : 91,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageSampleProjExplicitLod",
+ "opcode" : 92,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageSampleProjDrefImplicitLod",
+ "opcode" : 93,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageSampleProjDrefExplicitLod",
+ "opcode" : 94,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageFetch",
+ "opcode" : 95,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpImageGather",
+ "opcode" : 96,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'Component'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageDrefGather",
+ "opcode" : 97,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpImageRead",
+ "opcode" : 98,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpImageWrite",
+ "opcode" : 99,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'Texel'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "OpImage",
+ "opcode" : 100,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" }
+ ]
+ },
+ {
+ "opname" : "OpImageQueryFormat",
+ "opcode" : 101,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpImageQueryOrder",
+ "opcode" : 102,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpImageQuerySizeLod",
+ "opcode" : 103,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Level of Detail'" }
+ ],
+ "capabilities" : [ "Kernel", "ImageQuery" ]
+ },
+ {
+ "opname" : "OpImageQuerySize",
+ "opcode" : 104,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" }
+ ],
+ "capabilities" : [ "Kernel", "ImageQuery" ]
+ },
+ {
+ "opname" : "OpImageQueryLod",
+ "opcode" : 105,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" }
+ ],
+ "capabilities" : [ "ImageQuery" ]
+ },
+ {
+ "opname" : "OpImageQueryLevels",
+ "opcode" : 106,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" }
+ ],
+ "capabilities" : [ "Kernel", "ImageQuery" ]
+ },
+ {
+ "opname" : "OpImageQuerySamples",
+ "opcode" : 107,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" }
+ ],
+ "capabilities" : [ "Kernel", "ImageQuery" ]
+ },
+ {
+ "opname" : "OpConvertFToU",
+ "opcode" : 109,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Float Value'" }
+ ]
+ },
+ {
+ "opname" : "OpConvertFToS",
+ "opcode" : 110,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Float Value'" }
+ ]
+ },
+ {
+ "opname" : "OpConvertSToF",
+ "opcode" : 111,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Signed Value'" }
+ ]
+ },
+ {
+ "opname" : "OpConvertUToF",
+ "opcode" : 112,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Unsigned Value'" }
+ ]
+ },
+ {
+ "opname" : "OpUConvert",
+ "opcode" : 113,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Unsigned Value'" }
+ ]
+ },
+ {
+ "opname" : "OpSConvert",
+ "opcode" : 114,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Signed Value'" }
+ ]
+ },
+ {
+ "opname" : "OpFConvert",
+ "opcode" : 115,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Float Value'" }
+ ]
+ },
+ {
+ "opname" : "OpQuantizeToF16",
+ "opcode" : 116,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpConvertPtrToU",
+ "opcode" : 117,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" }
+ ],
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "opname" : "OpSatConvertSToU",
+ "opcode" : 118,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Signed Value'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpSatConvertUToS",
+ "opcode" : 119,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Unsigned Value'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpConvertUToPtr",
+ "opcode" : 120,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Integer Value'" }
+ ],
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "opname" : "OpPtrCastToGeneric",
+ "opcode" : 121,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpGenericCastToPtr",
+ "opcode" : 122,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpGenericCastToPtrExplicit",
+ "opcode" : 123,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "StorageClass", "name" : "'Storage'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpBitcast",
+ "opcode" : 124,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand'" }
+ ]
+ },
+ {
+ "opname" : "OpSNegate",
+ "opcode" : 126,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand'" }
+ ]
+ },
+ {
+ "opname" : "OpFNegate",
+ "opcode" : 127,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand'" }
+ ]
+ },
+ {
+ "opname" : "OpIAdd",
+ "opcode" : 128,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFAdd",
+ "opcode" : 129,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpISub",
+ "opcode" : 130,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFSub",
+ "opcode" : 131,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpIMul",
+ "opcode" : 132,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFMul",
+ "opcode" : 133,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpUDiv",
+ "opcode" : 134,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSDiv",
+ "opcode" : 135,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFDiv",
+ "opcode" : 136,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpUMod",
+ "opcode" : 137,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSRem",
+ "opcode" : 138,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSMod",
+ "opcode" : 139,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFRem",
+ "opcode" : 140,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFMod",
+ "opcode" : 141,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpVectorTimesScalar",
+ "opcode" : 142,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector'" },
+ { "kind" : "IdRef", "name" : "'Scalar'" }
+ ]
+ },
+ {
+ "opname" : "OpMatrixTimesScalar",
+ "opcode" : 143,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Matrix'" },
+ { "kind" : "IdRef", "name" : "'Scalar'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpVectorTimesMatrix",
+ "opcode" : 144,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector'" },
+ { "kind" : "IdRef", "name" : "'Matrix'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpMatrixTimesVector",
+ "opcode" : 145,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Matrix'" },
+ { "kind" : "IdRef", "name" : "'Vector'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpMatrixTimesMatrix",
+ "opcode" : 146,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'LeftMatrix'" },
+ { "kind" : "IdRef", "name" : "'RightMatrix'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpOuterProduct",
+ "opcode" : 147,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector 1'" },
+ { "kind" : "IdRef", "name" : "'Vector 2'" }
+ ],
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "opname" : "OpDot",
+ "opcode" : 148,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector 1'" },
+ { "kind" : "IdRef", "name" : "'Vector 2'" }
+ ]
+ },
+ {
+ "opname" : "OpIAddCarry",
+ "opcode" : 149,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpISubBorrow",
+ "opcode" : 150,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpUMulExtended",
+ "opcode" : 151,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSMulExtended",
+ "opcode" : 152,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpAny",
+ "opcode" : 154,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector'" }
+ ]
+ },
+ {
+ "opname" : "OpAll",
+ "opcode" : 155,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Vector'" }
+ ]
+ },
+ {
+ "opname" : "OpIsNan",
+ "opcode" : 156,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" }
+ ]
+ },
+ {
+ "opname" : "OpIsInf",
+ "opcode" : 157,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" }
+ ]
+ },
+ {
+ "opname" : "OpIsFinite",
+ "opcode" : 158,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpIsNormal",
+ "opcode" : 159,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpSignBitSet",
+ "opcode" : 160,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpLessOrGreater",
+ "opcode" : 161,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpOrdered",
+ "opcode" : 162,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpUnordered",
+ "opcode" : 163,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpLogicalEqual",
+ "opcode" : 164,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpLogicalNotEqual",
+ "opcode" : 165,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpLogicalOr",
+ "opcode" : 166,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpLogicalAnd",
+ "opcode" : 167,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpLogicalNot",
+ "opcode" : 168,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand'" }
+ ]
+ },
+ {
+ "opname" : "OpSelect",
+ "opcode" : 169,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Condition'" },
+ { "kind" : "IdRef", "name" : "'Object 1'" },
+ { "kind" : "IdRef", "name" : "'Object 2'" }
+ ]
+ },
+ {
+ "opname" : "OpIEqual",
+ "opcode" : 170,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpINotEqual",
+ "opcode" : 171,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpUGreaterThan",
+ "opcode" : 172,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSGreaterThan",
+ "opcode" : 173,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpUGreaterThanEqual",
+ "opcode" : 174,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSGreaterThanEqual",
+ "opcode" : 175,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpULessThan",
+ "opcode" : 176,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSLessThan",
+ "opcode" : 177,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpULessThanEqual",
+ "opcode" : 178,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpSLessThanEqual",
+ "opcode" : 179,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFOrdEqual",
+ "opcode" : 180,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFUnordEqual",
+ "opcode" : 181,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFOrdNotEqual",
+ "opcode" : 182,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFUnordNotEqual",
+ "opcode" : 183,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFOrdLessThan",
+ "opcode" : 184,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFUnordLessThan",
+ "opcode" : 185,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFOrdGreaterThan",
+ "opcode" : 186,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFUnordGreaterThan",
+ "opcode" : 187,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFOrdLessThanEqual",
+ "opcode" : 188,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFUnordLessThanEqual",
+ "opcode" : 189,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFOrdGreaterThanEqual",
+ "opcode" : 190,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpFUnordGreaterThanEqual",
+ "opcode" : 191,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpShiftRightLogical",
+ "opcode" : 194,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Shift'" }
+ ]
+ },
+ {
+ "opname" : "OpShiftRightArithmetic",
+ "opcode" : 195,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Shift'" }
+ ]
+ },
+ {
+ "opname" : "OpShiftLeftLogical",
+ "opcode" : 196,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Shift'" }
+ ]
+ },
+ {
+ "opname" : "OpBitwiseOr",
+ "opcode" : 197,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpBitwiseXor",
+ "opcode" : 198,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpBitwiseAnd",
+ "opcode" : 199,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand 1'" },
+ { "kind" : "IdRef", "name" : "'Operand 2'" }
+ ]
+ },
+ {
+ "opname" : "OpNot",
+ "opcode" : 200,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Operand'" }
+ ]
+ },
+ {
+ "opname" : "OpBitFieldInsert",
+ "opcode" : 201,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Insert'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Count'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpBitFieldSExtract",
+ "opcode" : 202,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Count'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpBitFieldUExtract",
+ "opcode" : 203,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Count'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpBitReverse",
+ "opcode" : 204,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpBitCount",
+ "opcode" : 205,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Base'" }
+ ]
+ },
+ {
+ "opname" : "OpDPdx",
+ "opcode" : 207,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpDPdy",
+ "opcode" : 208,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpFwidth",
+ "opcode" : 209,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpDPdxFine",
+ "opcode" : 210,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "DerivativeControl" ]
+ },
+ {
+ "opname" : "OpDPdyFine",
+ "opcode" : 211,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "DerivativeControl" ]
+ },
+ {
+ "opname" : "OpFwidthFine",
+ "opcode" : 212,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "DerivativeControl" ]
+ },
+ {
+ "opname" : "OpDPdxCoarse",
+ "opcode" : 213,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "DerivativeControl" ]
+ },
+ {
+ "opname" : "OpDPdyCoarse",
+ "opcode" : 214,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "DerivativeControl" ]
+ },
+ {
+ "opname" : "OpFwidthCoarse",
+ "opcode" : 215,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "capabilities" : [ "DerivativeControl" ]
+ },
+ {
+ "opname" : "OpEmitVertex",
+ "opcode" : 218,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "opname" : "OpEndPrimitive",
+ "opcode" : 219,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "opname" : "OpEmitStreamVertex",
+ "opcode" : 220,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Stream'" }
+ ],
+ "capabilities" : [ "GeometryStreams" ]
+ },
+ {
+ "opname" : "OpEndStreamPrimitive",
+ "opcode" : 221,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Stream'" }
+ ],
+ "capabilities" : [ "GeometryStreams" ]
+ },
+ {
+ "opname" : "OpControlBarrier",
+ "opcode" : 224,
+ "operands" : [
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "IdScope", "name" : "'Memory'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ]
+ },
+ {
+ "opname" : "OpMemoryBarrier",
+ "opcode" : 225,
+ "operands" : [
+ { "kind" : "IdScope", "name" : "'Memory'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicLoad",
+ "opcode" : 227,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicStore",
+ "opcode" : 228,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicExchange",
+ "opcode" : 229,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicCompareExchange",
+ "opcode" : 230,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Equal'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Unequal'" },
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'Comparator'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicCompareExchangeWeak",
+ "opcode" : 231,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Equal'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Unequal'" },
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'Comparator'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpAtomicIIncrement",
+ "opcode" : 232,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicIDecrement",
+ "opcode" : 233,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicIAdd",
+ "opcode" : 234,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicISub",
+ "opcode" : 235,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicSMin",
+ "opcode" : 236,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicUMin",
+ "opcode" : 237,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicSMax",
+ "opcode" : 238,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicUMax",
+ "opcode" : 239,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicAnd",
+ "opcode" : 240,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicOr",
+ "opcode" : 241,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpAtomicXor",
+ "opcode" : 242,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpPhi",
+ "opcode" : 245,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "quantifier" : "*", "name" : "'Variable, Parent, ...'" }
+ ]
+ },
+ {
+ "opname" : "OpLoopMerge",
+ "opcode" : 246,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Merge Block'" },
+ { "kind" : "IdRef", "name" : "'Continue Target'" },
+ { "kind" : "LoopControl" }
+ ]
+ },
+ {
+ "opname" : "OpSelectionMerge",
+ "opcode" : 247,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Merge Block'" },
+ { "kind" : "SelectionControl" }
+ ]
+ },
+ {
+ "opname" : "OpLabel",
+ "opcode" : 248,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ]
+ },
+ {
+ "opname" : "OpBranch",
+ "opcode" : 249,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target Label'" }
+ ]
+ },
+ {
+ "opname" : "OpBranchConditional",
+ "opcode" : 250,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Condition'" },
+ { "kind" : "IdRef", "name" : "'True Label'" },
+ { "kind" : "IdRef", "name" : "'False Label'" },
+ { "kind" : "LiteralInteger", "quantifier" : "*", "name" : "'Branch weights'" }
+ ]
+ },
+ {
+ "opname" : "OpSwitch",
+ "opcode" : 251,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Selector'" },
+ { "kind" : "IdRef", "name" : "'Default'" },
+ { "kind" : "PairLiteralIntegerIdRef", "quantifier" : "*", "name" : "'Target'" }
+ ]
+ },
+ {
+ "opname" : "OpKill",
+ "opcode" : 252,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "opname" : "OpReturn",
+ "opcode" : 253
+ },
+ {
+ "opname" : "OpReturnValue",
+ "opcode" : 254,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ]
+ },
+ {
+ "opname" : "OpUnreachable",
+ "opcode" : 255
+ },
+ {
+ "opname" : "OpLifetimeStart",
+ "opcode" : 256,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "LiteralInteger", "name" : "'Size'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpLifetimeStop",
+ "opcode" : 257,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "LiteralInteger", "name" : "'Size'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpGroupAsyncCopy",
+ "opcode" : 259,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpGroupWaitEvents",
+ "opcode" : 260,
+ "operands" : [
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "IdRef", "name" : "'Num Events'" },
+ { "kind" : "IdRef", "name" : "'Events List'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpGroupAll",
+ "opcode" : 261,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "IdRef", "name" : "'Predicate'" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupAny",
+ "opcode" : 262,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "IdRef", "name" : "'Predicate'" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupBroadcast",
+ "opcode" : 263,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'LocalId'" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupIAdd",
+ "opcode" : 264,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "'X'" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupFAdd",
+ "opcode" : 265,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "'X'" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupFMin",
+ "opcode" : 266,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "X" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupUMin",
+ "opcode" : 267,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "'X'" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupSMin",
+ "opcode" : 268,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "X" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupFMax",
+ "opcode" : 269,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "X" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupUMax",
+ "opcode" : 270,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "X" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpGroupSMax",
+ "opcode" : 271,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdScope", "name" : "'Execution'" },
+ { "kind" : "GroupOperation", "name" : "'Operation'" },
+ { "kind" : "IdRef", "name" : "X" }
+ ],
+ "capabilities" : [ "Groups" ]
+ },
+ {
+ "opname" : "OpReadPipe",
+ "opcode" : 274,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpWritePipe",
+ "opcode" : 275,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpReservedReadPipe",
+ "opcode" : 276,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpReservedWritePipe",
+ "opcode" : 277,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpReserveReadPipePackets",
+ "opcode" : 278,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Num Packets'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpReserveWritePipePackets",
+ "opcode" : 279,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Num Packets'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpCommitReadPipe",
+ "opcode" : 280,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Reserve Id'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpCommitWritePipe",
+ "opcode" : 281,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Reserve Id'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpIsValidReserveId",
+ "opcode" : 282,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Reserve Id'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpGetNumPipePackets",
+ "opcode" : 283,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpGetMaxPipePackets",
+ "opcode" : 284,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pipe'" },
+ { "kind" : "IdRef", "name" : "'Packet Size'" },
+ { "kind" : "IdRef", "name" : "'Packet Alignment'" }
+ ],
+ "capabilities" : [ "Pipes" ]
+ },
+ {
+ "opname" : "OpGroupReserveReadPipePackets",
+ "opcode" : 285,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpGroupReserveWritePipePackets",
+ "opcode" : 286,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpGroupCommitReadPipe",
+ "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" ]
+ },
+ {
+ "opname" : "OpGroupCommitWritePipe",
+ "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" ]
+ },
+ {
+ "opname" : "OpEnqueueMarker",
+ "opcode" : 291,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Queue'" },
+ { "kind" : "IdRef", "name" : "'Num Events'" },
+ { "kind" : "IdRef", "name" : "'Wait Events'" },
+ { "kind" : "IdRef", "name" : "'Ret Event'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpEnqueueKernel",
+ "opcode" : 292,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpGetKernelNDrangeSubGroupCount",
+ "opcode" : 293,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpGetKernelNDrangeMaxSubGroupSize",
+ "opcode" : 294,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "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" ]
+ },
+ {
+ "opname" : "OpGetKernelWorkGroupSize",
+ "opcode" : 295,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Invoke'" },
+ { "kind" : "IdRef", "name" : "'Param'" },
+ { "kind" : "IdRef", "name" : "'Param Size'" },
+ { "kind" : "IdRef", "name" : "'Param Align'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpGetKernelPreferredWorkGroupSizeMultiple",
+ "opcode" : 296,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Invoke'" },
+ { "kind" : "IdRef", "name" : "'Param'" },
+ { "kind" : "IdRef", "name" : "'Param Size'" },
+ { "kind" : "IdRef", "name" : "'Param Align'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpRetainEvent",
+ "opcode" : 297,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Event'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpReleaseEvent",
+ "opcode" : 298,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Event'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpCreateUserEvent",
+ "opcode" : 299,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpIsValidEvent",
+ "opcode" : 300,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Event'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpSetUserEventStatus",
+ "opcode" : 301,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Event'" },
+ { "kind" : "IdRef", "name" : "'Status'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpCaptureEventProfilingInfo",
+ "opcode" : 302,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Event'" },
+ { "kind" : "IdRef", "name" : "'Profiling Info'" },
+ { "kind" : "IdRef", "name" : "'Value'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpGetDefaultQueue",
+ "opcode" : 303,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpBuildNDRange",
+ "opcode" : 304,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'GlobalWorkSize'" },
+ { "kind" : "IdRef", "name" : "'LocalWorkSize'" },
+ { "kind" : "IdRef", "name" : "'GlobalWorkOffset'" }
+ ],
+ "capabilities" : [ "DeviceEnqueue" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleImplicitLod",
+ "opcode" : 305,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleExplicitLod",
+ "opcode" : 306,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleDrefImplicitLod",
+ "opcode" : 307,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleDrefExplicitLod",
+ "opcode" : 308,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleProjImplicitLod",
+ "opcode" : 309,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleProjExplicitLod",
+ "opcode" : 310,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleProjDrefImplicitLod",
+ "opcode" : 311,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseSampleProjDrefExplicitLod",
+ "opcode" : 312,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseFetch",
+ "opcode" : 313,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseGather",
+ "opcode" : 314,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'Component'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseDrefGather",
+ "opcode" : 315,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Sampled Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "IdRef", "name" : "'D~ref~'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpImageSparseTexelsResident",
+ "opcode" : 316,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Resident Code'" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ },
+ {
+ "opname" : "OpNoLine",
+ "opcode" : 317
+ },
+ {
+ "opname" : "OpAtomicFlagTestAndSet",
+ "opcode" : 318,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpAtomicFlagClear",
+ "opcode" : 319,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Pointer'" },
+ { "kind" : "IdScope", "name" : "'Scope'" },
+ { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
+ ],
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "opname" : "OpImageSparseRead",
+ "opcode" : 320,
+ "operands" : [
+ { "kind" : "IdType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Image'" },
+ { "kind" : "IdRef", "name" : "'Coordinate'" },
+ { "kind" : "ImageOperands", "quantifier" : "?" }
+ ],
+ "capabilities" : [ "SparseResidency" ]
+ }
+ ],
+ "operand_kinds" : [
+ {
+ "category" : "BitEnum",
+ "kind" : "ImageOperands",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "Bias",
+ "value" : "0x0001",
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "Lod",
+ "value" : "0x0002",
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "Grad",
+ "value" : "0x0004",
+ "parameters" : [
+ { "kind" : "IdRef" },
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "ConstOffset",
+ "value" : "0x0008",
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "Offset",
+ "value" : "0x0010",
+ "capabilities" : [ "ImageGatherExtended" ],
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "ConstOffsets",
+ "value" : "0x0020",
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "Sample",
+ "value" : "0x0040",
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ },
+ {
+ "enumerant" : "MinLod",
+ "value" : "0x0080",
+ "capabilities" : [ "MinLod" ],
+ "parameters" : [
+ { "kind" : "IdRef" }
+ ]
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "FPFastMathMode",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "NotNaN",
+ "value" : "0x0001",
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NotInf",
+ "value" : "0x0002",
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NSZ",
+ "value" : "0x0004",
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "AllowRecip",
+ "value" : "0x0008",
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Fast",
+ "value" : "0x0010",
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "SelectionControl",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "Flatten",
+ "value" : "0x0001"
+ },
+ {
+ "enumerant" : "DontFlatten",
+ "value" : "0x0002"
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "LoopControl",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "Unroll",
+ "value" : "0x0001"
+ },
+ {
+ "enumerant" : "DontUnroll",
+ "value" : "0x0002"
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "FunctionControl",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "Inline",
+ "value" : "0x0001"
+ },
+ {
+ "enumerant" : "DontInline",
+ "value" : "0x0002"
+ },
+ {
+ "enumerant" : "Pure",
+ "value" : "0x0004"
+ },
+ {
+ "enumerant" : "Const",
+ "value" : "0x0008"
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "IdMemorySemantics",
+ "doc" : "Reference to an <id> representing a 32-bit integer that contains a mask. The rest of this object is about that mask.",
+ "enumerants" : [
+ {
+ "enumerant" : "Relaxed",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "SequentiallyConsistent",
+ "value" : "0x0010"
+ },
+ {
+ "enumerant" : "Acquire",
+ "value" : "0x0002"
+ },
+ {
+ "enumerant" : "Release",
+ "value" : "0x0004"
+ },
+ {
+ "enumerant" : "AcquireRelease",
+ "value" : "0x0008"
+ },
+ {
+ "enumerant" : "UniformMemory",
+ "value" : "0x0040",
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SubgroupMemory",
+ "value" : "0x0080"
+ },
+ {
+ "enumerant" : "WorkgroupMemory",
+ "value" : "0x0100"
+ },
+ {
+ "enumerant" : "CrossWorkgroupMemory",
+ "value" : "0x0200"
+ },
+ {
+ "enumerant" : "AtomicCounterMemory",
+ "value" : "0x0400",
+ "capabilities" : [ "AtomicStorage" ]
+ },
+ {
+ "enumerant" : "ImageMemory",
+ "value" : "0x0800"
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "MemoryAccess",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "Volatile",
+ "value" : "0x0001"
+ },
+ {
+ "enumerant" : "Aligned",
+ "value" : "0x0002",
+ "parameters" : [
+ { "kind" : "LiteralInteger" }
+ ]
+ },
+ {
+ "enumerant" : "Nontemporal",
+ "value" : "0x0004"
+ }
+ ]
+ },
+ {
+ "category" : "BitEnum",
+ "kind" : "KernelProfilingInfo",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : "0x0000"
+ },
+ {
+ "enumerant" : "CmdExecTime",
+ "value" : "0x0001",
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "SourceLanguage",
+ "enumerants" : [
+ {
+ "enumerant" : "Unknown",
+ "value" : 0
+ },
+ {
+ "enumerant" : "ESSL",
+ "value" : 1
+ },
+ {
+ "enumerant" : "GLSL",
+ "value" : 2
+ },
+ {
+ "enumerant" : "OpenCL_C",
+ "value" : 3
+ },
+ {
+ "enumerant" : "OpenCL_CPP",
+ "value" : 4
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "ExecutionModel",
+ "enumerants" : [
+ {
+ "enumerant" : "Vertex",
+ "value" : 0,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "TessellationControl",
+ "value" : 1,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "TessellationEvaluation",
+ "value" : 2,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "Geometry",
+ "value" : 3,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "Fragment",
+ "value" : 4,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "GLCompute",
+ "value" : 5,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Kernel",
+ "value" : 6,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "AddressingModel",
+ "enumerants" : [
+ {
+ "enumerant" : "Logical",
+ "value" : 0
+ },
+ {
+ "enumerant" : "Physical32",
+ "value" : 1,
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "enumerant" : "Physical64",
+ "value" : 2,
+ "capabilities" : [ "Addresses" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "MemoryModel",
+ "enumerants" : [
+ {
+ "enumerant" : "Simple",
+ "value" : 0,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "GLSL450",
+ "value" : 1,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "OpenCL",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "ExecutionMode",
+ "enumerants" : [
+ {
+ "enumerant" : "Invocations",
+ "value" : 0,
+ "capabilities" : [ "Geometry" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Number of <<Invocation,invocations>>'" }
+ ]
+ },
+ {
+ "enumerant" : "SpacingEqual",
+ "value" : 1,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "SpacingFractionalEven",
+ "value" : 2,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "SpacingFractionalOdd",
+ "value" : 3,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "VertexOrderCw",
+ "value" : 4,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "VertexOrderCcw",
+ "value" : 5,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "PixelCenterInteger",
+ "value" : 6,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "OriginUpperLeft",
+ "value" : 7,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "OriginLowerLeft",
+ "value" : 8,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "EarlyFragmentTests",
+ "value" : 9,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "PointMode",
+ "value" : 10,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "Xfb",
+ "value" : 11,
+ "capabilities" : [ "TransformFeedback" ]
+ },
+ {
+ "enumerant" : "DepthReplacing",
+ "value" : 12,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "DepthGreater",
+ "value" : 14,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "DepthLess",
+ "value" : 15,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "DepthUnchanged",
+ "value" : 16,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "LocalSize",
+ "value" : 17,
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'x size'" },
+ { "kind" : "LiteralInteger", "name" : "'y size'" },
+ { "kind" : "LiteralInteger", "name" : "'z size'" }
+ ]
+ },
+ {
+ "enumerant" : "LocalSizeHint",
+ "value" : 18,
+ "capabilities" : [ "Kernel" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'x size'" },
+ { "kind" : "LiteralInteger", "name" : "'y size'" },
+ { "kind" : "LiteralInteger", "name" : "'z size'" }
+ ]
+ },
+ {
+ "enumerant" : "InputPoints",
+ "value" : 19,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "InputLines",
+ "value" : 20,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "InputLinesAdjacency",
+ "value" : 21,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "Triangles",
+ "value" : 22,
+ "capabilities" : [ "Geometry", "Tessellation" ]
+ },
+ {
+ "enumerant" : "InputTrianglesAdjacency",
+ "value" : 23,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "Quads",
+ "value" : 24,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "Isolines",
+ "value" : 25,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "OutputVertices",
+ "value" : 26,
+ "capabilities" : [ "Geometry", "Tessellation" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Vertex count'" }
+ ]
+ },
+ {
+ "enumerant" : "OutputPoints",
+ "value" : 27,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "OutputLineStrip",
+ "value" : 28,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "OutputTriangleStrip",
+ "value" : 29,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "VecTypeHint",
+ "value" : 30,
+ "capabilities" : [ "Kernel" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Vector type'" }
+ ]
+ },
+ {
+ "enumerant" : "ContractionOff",
+ "value" : 31,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "StorageClass",
+ "enumerants" : [
+ {
+ "enumerant" : "UniformConstant",
+ "value" : 0
+ },
+ {
+ "enumerant" : "Input",
+ "value" : 1,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Uniform",
+ "value" : 2,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Output",
+ "value" : 3,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Workgroup",
+ "value" : 4
+ },
+ {
+ "enumerant" : "CrossWorkgroup",
+ "value" : 5
+ },
+ {
+ "enumerant" : "Private",
+ "value" : 6,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Function",
+ "value" : 7
+ },
+ {
+ "enumerant" : "Generic",
+ "value" : 8,
+ "capabilities" : [ "GenericPointer" ]
+ },
+ {
+ "enumerant" : "PushConstant",
+ "value" : 9,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "AtomicCounter",
+ "value" : 10,
+ "capabilities" : [ "AtomicStorage" ]
+ },
+ {
+ "enumerant" : "Image",
+ "value" : 11
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "Dim",
+ "enumerants" : [
+ {
+ "enumerant" : "1D",
+ "value" : 0,
+ "capabilities" : [ "Sampled1D" ]
+ },
+ {
+ "enumerant" : "2D",
+ "value" : 1
+ },
+ {
+ "enumerant" : "3D",
+ "value" : 2
+ },
+ {
+ "enumerant" : "Cube",
+ "value" : 3,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rect",
+ "value" : 4,
+ "capabilities" : [ "SampledRect" ]
+ },
+ {
+ "enumerant" : "Buffer",
+ "value" : 5,
+ "capabilities" : [ "SampledBuffer" ]
+ },
+ {
+ "enumerant" : "SubpassData",
+ "value" : 6,
+ "capabilities" : [ "InputAttachment" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "SamplerAddressingMode",
+ "enumerants" : [
+ {
+ "enumerant" : "None",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "ClampToEdge",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Clamp",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Repeat",
+ "value" : 3,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RepeatMirrored",
+ "value" : 4,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "SamplerFilterMode",
+ "enumerants" : [
+ {
+ "enumerant" : "Nearest",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Linear",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "ImageFormat",
+ "enumerants" : [
+ {
+ "enumerant" : "Unknown",
+ "value" : 0
+ },
+ {
+ "enumerant" : "Rgba32f",
+ "value" : 1,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba16f",
+ "value" : 2,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "R32f",
+ "value" : 3,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba8",
+ "value" : 4,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba8Snorm",
+ "value" : 5,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rg32f",
+ "value" : 6,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg16f",
+ "value" : 7,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R11fG11fB10f",
+ "value" : 8,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R16f",
+ "value" : 9,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rgba16",
+ "value" : 10,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rgb10A2",
+ "value" : 11,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg16",
+ "value" : 12,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg8",
+ "value" : 13,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R16",
+ "value" : 14,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R8",
+ "value" : 15,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rgba16Snorm",
+ "value" : 16,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg16Snorm",
+ "value" : 17,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg8Snorm",
+ "value" : 18,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R16Snorm",
+ "value" : 19,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R8Snorm",
+ "value" : 20,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rgba32i",
+ "value" : 21,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba16i",
+ "value" : 22,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba8i",
+ "value" : 23,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "R32i",
+ "value" : 24,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rg32i",
+ "value" : 25,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg16i",
+ "value" : 26,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg8i",
+ "value" : 27,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R16i",
+ "value" : 28,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R8i",
+ "value" : 29,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rgba32ui",
+ "value" : 30,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba16ui",
+ "value" : 31,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgba8ui",
+ "value" : 32,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "R32ui",
+ "value" : 33,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Rgb10a2ui",
+ "value" : 34,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg32ui",
+ "value" : 35,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg16ui",
+ "value" : 36,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "Rg8ui",
+ "value" : 37,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R16ui",
+ "value" : 38,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ },
+ {
+ "enumerant" : "R8ui",
+ "value" : 39,
+ "capabilities" : [ "StorageImageExtendedFormats" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "ImageChannelOrder",
+ "enumerants" : [
+ {
+ "enumerant" : "R",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "A",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RG",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RA",
+ "value" : 3,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RGB",
+ "value" : 4,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RGBA",
+ "value" : 5,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "BGRA",
+ "value" : 6,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "ARGB",
+ "value" : 7,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Intensity",
+ "value" : 8,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Luminance",
+ "value" : 9,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Rx",
+ "value" : 10,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RGx",
+ "value" : 11,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RGBx",
+ "value" : 12,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Depth",
+ "value" : 13,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "DepthStencil",
+ "value" : 14,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "sRGB",
+ "value" : 15,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "sRGBx",
+ "value" : 16,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "sRGBA",
+ "value" : 17,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "sBGRA",
+ "value" : 18,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "ImageChannelDataType",
+ "enumerants" : [
+ {
+ "enumerant" : "SnormInt8",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SnormInt16",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormInt8",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormInt16",
+ "value" : 3,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormShort565",
+ "value" : 4,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormShort555",
+ "value" : 5,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormInt101010",
+ "value" : 6,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SignedInt8",
+ "value" : 7,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SignedInt16",
+ "value" : 8,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SignedInt32",
+ "value" : 9,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnsignedInt8",
+ "value" : 10,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnsignedInt16",
+ "value" : 11,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnsignedInt32",
+ "value" : 12,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "HalfFloat",
+ "value" : 13,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Float",
+ "value" : 14,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormInt24",
+ "value" : 15,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "UnormInt101010_2",
+ "value" : 16,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "FPRoundingMode",
+ "enumerants" : [
+ {
+ "enumerant" : "RTE",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RTZ",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RTP",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "RTN",
+ "value" : 3,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "LinkageType",
+ "enumerants" : [
+ {
+ "enumerant" : "Export",
+ "value" : 0,
+ "capabilities" : [ "Linkage" ]
+ },
+ {
+ "enumerant" : "Import",
+ "value" : 1,
+ "capabilities" : [ "Linkage" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "AccessQualifier",
+ "enumerants" : [
+ {
+ "enumerant" : "ReadOnly",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "WriteOnly",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "ReadWrite",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "FunctionParameterAttribute",
+ "enumerants" : [
+ {
+ "enumerant" : "Zext",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Sext",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "ByVal",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Sret",
+ "value" : 3,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NoAlias",
+ "value" : 4,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NoCapture",
+ "value" : 5,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NoWrite",
+ "value" : 6,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NoReadWrite",
+ "value" : 7,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "Decoration",
+ "enumerants" : [
+ {
+ "enumerant" : "RelaxedPrecision",
+ "value" : 0,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SpecId",
+ "value" : 1,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Specialization Constant ID'" }
+ ]
+ },
+ {
+ "enumerant" : "Block",
+ "value" : 2,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "BufferBlock",
+ "value" : 3,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "RowMajor",
+ "value" : 4,
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "enumerant" : "ColMajor",
+ "value" : 5,
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "enumerant" : "ArrayStride",
+ "value" : 6,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Array Stride'" }
+ ]
+ },
+ {
+ "enumerant" : "MatrixStride",
+ "value" : 7,
+ "capabilities" : [ "Matrix" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Matrix Stride'" }
+ ]
+ },
+ {
+ "enumerant" : "GLSLShared",
+ "value" : 8,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "GLSLPacked",
+ "value" : 9,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "CPacked",
+ "value" : 10,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "BuiltIn",
+ "value" : 11,
+ "parameters" : [
+ { "kind" : "BuiltIn" }
+ ]
+ },
+ {
+ "enumerant" : "NoPerspective",
+ "value" : 13,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Flat",
+ "value" : 14,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Patch",
+ "value" : 15,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "Centroid",
+ "value" : 16,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Sample",
+ "value" : 17,
+ "capabilities" : [ "SampleRateShading" ]
+ },
+ {
+ "enumerant" : "Invariant",
+ "value" : 18,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Restrict",
+ "value" : 19
+ },
+ {
+ "enumerant" : "Aliased",
+ "value" : 20
+ },
+ {
+ "enumerant" : "Volatile",
+ "value" : 21
+ },
+ {
+ "enumerant" : "Constant",
+ "value" : 22,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Coherent",
+ "value" : 23
+ },
+ {
+ "enumerant" : "NonWritable",
+ "value" : 24
+ },
+ {
+ "enumerant" : "NonReadable",
+ "value" : 25
+ },
+ {
+ "enumerant" : "Uniform",
+ "value" : 26,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SaturatedConversion",
+ "value" : 28,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Stream",
+ "value" : 29,
+ "capabilities" : [ "GeometryStreams" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Stream Number'" }
+ ]
+ },
+ {
+ "enumerant" : "Location",
+ "value" : 30,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Location'" }
+ ]
+ },
+ {
+ "enumerant" : "Component",
+ "value" : 31,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Component'" }
+ ]
+ },
+ {
+ "enumerant" : "Index",
+ "value" : 32,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Index'" }
+ ]
+ },
+ {
+ "enumerant" : "Binding",
+ "value" : 33,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Binding Point'" }
+ ]
+ },
+ {
+ "enumerant" : "DescriptorSet",
+ "value" : 34,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Descriptor Set'" }
+ ]
+ },
+ {
+ "enumerant" : "Offset",
+ "value" : 35,
+ "capabilities" : [ "Shader" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Byte Offset'" }
+ ]
+ },
+ {
+ "enumerant" : "XfbBuffer",
+ "value" : 36,
+ "capabilities" : [ "TransformFeedback" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'XFB Buffer Number'" }
+ ]
+ },
+ {
+ "enumerant" : "XfbStride",
+ "value" : 37,
+ "capabilities" : [ "TransformFeedback" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'XFB Stride'" }
+ ]
+ },
+ {
+ "enumerant" : "FuncParamAttr",
+ "value" : 38,
+ "capabilities" : [ "Kernel" ],
+ "parameters" : [
+ { "kind" : "FunctionParameterAttribute", "name" : "'Function Parameter Attribute'" }
+ ]
+ },
+ {
+ "enumerant" : "FPRoundingMode",
+ "value" : 39,
+ "capabilities" : [ "Kernel" ],
+ "parameters" : [
+ { "kind" : "FPRoundingMode", "name" : "'Floating-Point Rounding Mode'" }
+ ]
+ },
+ {
+ "enumerant" : "FPFastMathMode",
+ "value" : 40,
+ "capabilities" : [ "Kernel" ],
+ "parameters" : [
+ { "kind" : "FPFastMathMode", "name" : "'Fast-Math Mode'" }
+ ]
+ },
+ {
+ "enumerant" : "LinkageAttributes",
+ "value" : 41,
+ "capabilities" : [ "Linkage" ],
+ "parameters" : [
+ { "kind" : "LiteralString", "name" : "'Name'" },
+ { "kind" : "LinkageType", "name" : "'Linkage Type'" }
+ ]
+ },
+ {
+ "enumerant" : "NoContraction",
+ "value" : 42,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "InputAttachmentIndex",
+ "value" : 43,
+ "capabilities" : [ "InputAttachment" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Attachment Index'" }
+ ]
+ },
+ {
+ "enumerant" : "Alignment",
+ "value" : 44,
+ "capabilities" : [ "Kernel" ],
+ "parameters" : [
+ { "kind" : "LiteralInteger", "name" : "'Alignment'" }
+ ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "BuiltIn",
+ "enumerants" : [
+ {
+ "enumerant" : "Position",
+ "value" : 0,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "PointSize",
+ "value" : 1,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "ClipDistance",
+ "value" : 3,
+ "capabilities" : [ "ClipDistance" ]
+ },
+ {
+ "enumerant" : "CullDistance",
+ "value" : 4,
+ "capabilities" : [ "CullDistance" ]
+ },
+ {
+ "enumerant" : "VertexId",
+ "value" : 5,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "InstanceId",
+ "value" : 6,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "PrimitiveId",
+ "value" : 7,
+ "capabilities" : [ "Geometry", "Tessellation" ]
+ },
+ {
+ "enumerant" : "InvocationId",
+ "value" : 8,
+ "capabilities" : [ "Geometry", "Tessellation" ]
+ },
+ {
+ "enumerant" : "Layer",
+ "value" : 9,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "ViewportIndex",
+ "value" : 10,
+ "capabilities" : [ "MultiViewport" ]
+ },
+ {
+ "enumerant" : "TessLevelOuter",
+ "value" : 11,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "TessLevelInner",
+ "value" : 12,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "TessCoord",
+ "value" : 13,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "PatchVertices",
+ "value" : 14,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "FragCoord",
+ "value" : 15,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "PointCoord",
+ "value" : 16,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "FrontFacing",
+ "value" : 17,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SampleId",
+ "value" : 18,
+ "capabilities" : [ "SampleRateShading" ]
+ },
+ {
+ "enumerant" : "SamplePosition",
+ "value" : 19,
+ "capabilities" : [ "SampleRateShading" ]
+ },
+ {
+ "enumerant" : "SampleMask",
+ "value" : 20,
+ "capabilities" : [ "SampleRateShading" ]
+ },
+ {
+ "enumerant" : "FragDepth",
+ "value" : 22,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "HelperInvocation",
+ "value" : 23,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "NumWorkgroups",
+ "value" : 24
+ },
+ {
+ "enumerant" : "WorkgroupSize",
+ "value" : 25
+ },
+ {
+ "enumerant" : "WorkgroupId",
+ "value" : 26
+ },
+ {
+ "enumerant" : "LocalInvocationId",
+ "value" : 27
+ },
+ {
+ "enumerant" : "GlobalInvocationId",
+ "value" : 28
+ },
+ {
+ "enumerant" : "LocalInvocationIndex",
+ "value" : 29
+ },
+ {
+ "enumerant" : "WorkDim",
+ "value" : 30,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "GlobalSize",
+ "value" : 31,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "EnqueuedWorkgroupSize",
+ "value" : 32,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "GlobalOffset",
+ "value" : 33,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "GlobalLinearId",
+ "value" : 34,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SubgroupSize",
+ "value" : 36,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SubgroupMaxSize",
+ "value" : 37,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NumSubgroups",
+ "value" : 38,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "NumEnqueuedSubgroups",
+ "value" : 39,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SubgroupId",
+ "value" : 40,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "SubgroupLocalInvocationId",
+ "value" : 41,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "VertexIndex",
+ "value" : 42,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "InstanceIndex",
+ "value" : 43,
+ "capabilities" : [ "Shader" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "IdScope",
+ "doc" : "Reference to an <id> representing a 32-bit integer that contains a mask. The rest of this object is about that mask.",
+ "enumerants" : [
+ {
+ "enumerant" : "CrossDevice",
+ "value" : 0
+ },
+ {
+ "enumerant" : "Device",
+ "value" : 1
+ },
+ {
+ "enumerant" : "Workgroup",
+ "value" : 2
+ },
+ {
+ "enumerant" : "Subgroup",
+ "value" : 3
+ },
+ {
+ "enumerant" : "Invocation",
+ "value" : 4
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "GroupOperation",
+ "enumerants" : [
+ {
+ "enumerant" : "Reduce",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "InclusiveScan",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "ExclusiveScan",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "KernelEnqueueFlags",
+ "enumerants" : [
+ {
+ "enumerant" : "NoWait",
+ "value" : 0,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "WaitKernel",
+ "value" : 1,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "WaitWorkGroup",
+ "value" : 2,
+ "capabilities" : [ "Kernel" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "Capability",
+ "enumerants" : [
+ {
+ "enumerant" : "Matrix",
+ "value" : 0
+ },
+ {
+ "enumerant" : "Shader",
+ "value" : 1,
+ "capabilities" : [ "Matrix" ]
+ },
+ {
+ "enumerant" : "Geometry",
+ "value" : 2,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Tessellation",
+ "value" : 3,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Addresses",
+ "value" : 4
+ },
+ {
+ "enumerant" : "Linkage",
+ "value" : 5
+ },
+ {
+ "enumerant" : "Kernel",
+ "value" : 6
+ },
+ {
+ "enumerant" : "Vector16",
+ "value" : 7,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Float16Buffer",
+ "value" : 8,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Float16",
+ "value" : 9
+ },
+ {
+ "enumerant" : "Float64",
+ "value" : 10
+ },
+ {
+ "enumerant" : "Int64",
+ "value" : 11
+ },
+ {
+ "enumerant" : "Int64Atomics",
+ "value" : 12,
+ "capabilities" : [ "Int64" ]
+ },
+ {
+ "enumerant" : "ImageBasic",
+ "value" : 13,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "ImageReadWrite",
+ "value" : 14,
+ "capabilities" : [ "ImageBasic" ]
+ },
+ {
+ "enumerant" : "ImageMipmap",
+ "value" : 15,
+ "capabilities" : [ "ImageBasic" ]
+ },
+ {
+ "enumerant" : "Pipes",
+ "value" : 17,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "Groups",
+ "value" : 18
+ },
+ {
+ "enumerant" : "DeviceEnqueue",
+ "value" : 19,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "LiteralSampler",
+ "value" : 20,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "AtomicStorage",
+ "value" : 21,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Int16",
+ "value" : 22
+ },
+ {
+ "enumerant" : "TessellationPointSize",
+ "value" : 23,
+ "capabilities" : [ "Tessellation" ]
+ },
+ {
+ "enumerant" : "GeometryPointSize",
+ "value" : 24,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "ImageGatherExtended",
+ "value" : 25,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "StorageImageMultisample",
+ "value" : 27,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "UniformBufferArrayDynamicIndexing",
+ "value" : 28,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SampledImageArrayDynamicIndexing",
+ "value" : 29,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "StorageBufferArrayDynamicIndexing",
+ "value" : 30,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "StorageImageArrayDynamicIndexing",
+ "value" : 31,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "ClipDistance",
+ "value" : 32,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "CullDistance",
+ "value" : 33,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "ImageCubeArray",
+ "value" : 34,
+ "capabilities" : [ "SampledCubeArray" ]
+ },
+ {
+ "enumerant" : "SampleRateShading",
+ "value" : 35,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "ImageRect",
+ "value" : 36,
+ "capabilities" : [ "SampledRect" ]
+ },
+ {
+ "enumerant" : "SampledRect",
+ "value" : 37,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "GenericPointer",
+ "value" : 38,
+ "capabilities" : [ "Addresses" ]
+ },
+ {
+ "enumerant" : "Int8",
+ "value" : 39,
+ "capabilities" : [ "Kernel" ]
+ },
+ {
+ "enumerant" : "InputAttachment",
+ "value" : 40,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SparseResidency",
+ "value" : 41,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "MinLod",
+ "value" : 42,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Sampled1D",
+ "value" : 43,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "Image1D",
+ "value" : 44,
+ "capabilities" : [ "Sampled1D" ]
+ },
+ {
+ "enumerant" : "SampledCubeArray",
+ "value" : 45,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "SampledBuffer",
+ "value" : 46,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "ImageBuffer",
+ "value" : 47,
+ "capabilities" : [ "SampledBuffer" ]
+ },
+ {
+ "enumerant" : "ImageMSArray",
+ "value" : 48,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "StorageImageExtendedFormats",
+ "value" : 49,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "ImageQuery",
+ "value" : 50,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "DerivativeControl",
+ "value" : 51,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "InterpolationFunction",
+ "value" : 52,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "TransformFeedback",
+ "value" : 53,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "GeometryStreams",
+ "value" : 54,
+ "capabilities" : [ "Geometry" ]
+ },
+ {
+ "enumerant" : "StorageImageReadWithoutFormat",
+ "value" : 55,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "StorageImageWriteWithoutFormat",
+ "value" : 56,
+ "capabilities" : [ "Shader" ]
+ },
+ {
+ "enumerant" : "MultiViewport",
+ "value" : 57,
+ "capabilities" : [ "Geometry" ]
+ }
+ ]
+ },
+ {
+ "category" : "Id",
+ "kind" : "IdType",
+ "doc" : "Reference to an <id> representing a type"
+ },
+ {
+ "category" : "Id",
+ "kind" : "IdResult",
+ "doc" : "Definition of an <id> representing the result of the enclosing instruction"
+ },
+ {
+ "category" : "Id",
+ "kind" : "IdRef",
+ "doc" : "Reference to an <id>"
+ },
+ {
+ "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" : "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" ]
+ }
+ ]
+}
#include "spirv-tools/libspirv.h"
#include "spirv_constant.h"
#include "spirv_endian.h"
-#include "spirv_operands.h"
namespace {
// TODO(dneto): Some of the macros are quite unreadable. We could make
// good use of constexpr functions, but some compilers don't support that yet.
const spv_opcode_desc_t opcodeTableEntries[] = {
-#define EmptyList \
- {}
-#define List(...) \
- { __VA_ARGS__ }
-#define Capability(X) SPV_CAPABILITY_AS_MASK(SpvCapability##X)
-#define Capability2(X, Y) Capability(X) | Capability(Y)
-#define SpvCapabilityNone \
- 0 // Needed so Capability(None) still expands to valid syntax.
-#define Instruction(Name, HasResult, HasType, NumLogicalOperands, \
- NumCapabilities, CapabilityRequired, IsVariable, \
- LogicalArgsList) \
- {#Name, SpvOp##Name, (NumCapabilities) ? (CapabilityRequired) : 0, \
- 0, {}, /* Filled in later. Operand list, including \
- result id and type id, if needed */ \
- HasResult, HasType, LogicalArgsList},
#include "opcode.inc"
-#undef EmptyList
-#undef List
-#undef Capability
-#undef Capability2
-#undef CapabilityNone
-#undef Instruction
};
-// Opcode API
-
-// Converts the given operand class enum (from the SPIR-V document generation
-// logic) to the operand type required by the parser. The SPV_OPERAND_TYPE_NONE
-// value indicates there is no current operand and no further operands.
-// This only applies to logical operands.
-spv_operand_type_t convertOperandClassToType(SpvOp opcode,
- OperandClass operandClass) {
- // The spec document generator uses OptionalOperandLiteral for several kinds
- // of repeating values. Our parser needs more specific information about
- // what is being repeated.
- if (operandClass == OperandOptionalLiteral) {
- switch (opcode) {
- case SpvOpExecutionMode:
- // An OpExecutionMode only takes a single ExecutionMode operand and the
- // operands for that execution mode. The OperandOptionalLiteral in the
- // grammar from the spec is only used to generate the text "Optional
- // literal(s)". But we've already recorded the
- // SPV_OPERAND_TYPE_EXECUTION_MODE which will absorb those extra
- // literals. Use a NONE operand type here to terminate the operands
- // to the instruction.
- return SPV_OPERAND_TYPE_NONE;
- default:
- break;
- }
- } else if (operandClass == OperandVariableLiterals) {
- switch (opcode) {
- case SpvOpConstant:
- case SpvOpSpecConstant:
- // The number type is determined by the type Id operand.
- return SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER;
- case SpvOpDecorate:
- case SpvOpMemberDecorate:
- // The operand types at the end of the instruction are
- // determined instead by the decoration kind.
- return SPV_OPERAND_TYPE_NONE;
- default:
- break;
- }
- }
-
- switch (operandClass) {
- case OperandNone:
- return SPV_OPERAND_TYPE_NONE;
- case OperandId:
- return SPV_OPERAND_TYPE_ID;
- case OperandOptionalId:
- return SPV_OPERAND_TYPE_OPTIONAL_ID;
- case OperandVariableIds:
- if (opcode == SpvOpSpecConstantOp) {
- // These are the operands to the specialization constant opcode.
- // The assembler and binary parser set up the extra Id and literal
- // arguments when processing the opcode operand. So don't add
- // an operand type for them here.
- return SPV_OPERAND_TYPE_NONE;
- }
- return SPV_OPERAND_TYPE_VARIABLE_ID;
- // The spec only uses OptionalLiteral for an optional literal number.
- case OperandOptionalLiteral:
- return SPV_OPERAND_TYPE_OPTIONAL_LITERAL_INTEGER;
- case OperandOptionalLiteralString:
- return SPV_OPERAND_TYPE_OPTIONAL_LITERAL_STRING;
- // This is only used for sequences of literal numbers.
- case OperandVariableLiterals:
- return SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER;
- case OperandLiteralNumber:
- if (opcode == SpvOpExtInst) {
- // We use a special operand type for the extension instruction number.
- // For now, we assume there is only one LiteraNumber argument to
- // OpExtInst, and it is the extension instruction argument.
- // See the ExtInst entry in opcode.inc
- // TODO(dneto): Use a function to confirm the assumption, and to verify
- // that the index into the operandClass is 1, as expected.
- return SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER;
- } else if (opcode == SpvOpSpecConstantOp) {
- // Use a special operand type for the opcode operand, so we can
- // use mnemonic names instead of the numbers. For example, the
- // assembler should accept "IAdd" instead of the numeric value of
- // SpvOpIAdd.
- return SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER;
- }
- return SPV_OPERAND_TYPE_LITERAL_INTEGER;
- case OperandLiteralString:
- return SPV_OPERAND_TYPE_LITERAL_STRING;
- case OperandSource:
- return SPV_OPERAND_TYPE_SOURCE_LANGUAGE;
- case OperandExecutionModel:
- return SPV_OPERAND_TYPE_EXECUTION_MODEL;
- case OperandAddressing:
- return SPV_OPERAND_TYPE_ADDRESSING_MODEL;
- case OperandMemory:
- return SPV_OPERAND_TYPE_MEMORY_MODEL;
- case OperandExecutionMode:
- return SPV_OPERAND_TYPE_EXECUTION_MODE;
- case OperandStorage:
- return SPV_OPERAND_TYPE_STORAGE_CLASS;
- case OperandDimensionality:
- return SPV_OPERAND_TYPE_DIMENSIONALITY;
- case OperandSamplerAddressingMode:
- return SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE;
- case OperandSamplerFilterMode:
- return SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE;
- case OperandSamplerImageFormat:
- return SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT;
- case OperandImageChannelOrder:
- // This is only used to describe the value generated by OpImageQueryOrder.
- // It is not used as an operand.
- break;
- case OperandImageChannelDataType:
- // This is only used to describe the value generated by
- // OpImageQueryFormat. It is not used as an operand.
- break;
- case OperandImageOperands:
- return SPV_OPERAND_TYPE_IMAGE;
- case OperandOptionalImageOperands:
- return SPV_OPERAND_TYPE_OPTIONAL_IMAGE;
- case OperandFPFastMath:
- return SPV_OPERAND_TYPE_FP_FAST_MATH_MODE;
- case OperandFPRoundingMode:
- return SPV_OPERAND_TYPE_FP_ROUNDING_MODE;
- case OperandLinkageType:
- return SPV_OPERAND_TYPE_LINKAGE_TYPE;
- case OperandAccessQualifier:
- return SPV_OPERAND_TYPE_ACCESS_QUALIFIER;
- case OperandOptionalAccessQualifier:
- return SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER;
- case OperandFuncParamAttr:
- return SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE;
- case OperandDecoration:
- return SPV_OPERAND_TYPE_DECORATION;
- case OperandBuiltIn:
- return SPV_OPERAND_TYPE_BUILT_IN;
- case OperandSelect:
- return SPV_OPERAND_TYPE_SELECTION_CONTROL;
- case OperandLoop:
- return SPV_OPERAND_TYPE_LOOP_CONTROL;
- case OperandFunction:
- return SPV_OPERAND_TYPE_FUNCTION_CONTROL;
- case OperandMemorySemantics:
- return SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID;
- case OperandMemoryAccess:
- // This case does not occur in the table for SPIR-V 0.99 Rev 32.
- // We expect that it will become SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS,
- // and we can remove the special casing above for memory operation
- // instructions.
- break;
- case OperandOptionalMemoryAccess:
- // Expect an optional mask. When the Aligned bit is set in the mask,
- // we will later add the expectation of a literal number operand.
- return SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS;
- case OperandScope:
- return SPV_OPERAND_TYPE_SCOPE_ID;
- case OperandGroupOperation:
- return SPV_OPERAND_TYPE_GROUP_OPERATION;
- case OperandKernelEnqueueFlags:
- return SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS;
- case OperandKernelProfilingInfo:
- return SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO;
- case OperandCapability:
- return SPV_OPERAND_TYPE_CAPABILITY;
-
- // Used by GroupMemberDecorate
- case OperandVariableIdLiteral:
- return SPV_OPERAND_TYPE_VARIABLE_ID_LITERAL_INTEGER;
-
- // Used by Switch
- case OperandVariableLiteralId:
- return SPV_OPERAND_TYPE_VARIABLE_LITERAL_INTEGER_ID;
-
- // These exceptional cases shouldn't occur.
- case OperandCount:
- default:
- break;
- }
- assert(0 && "Unexpected operand class");
- return SPV_OPERAND_TYPE_NONE;
-}
-
} // anonymous namespace
-// Finish populating the opcodeTableEntries array.
-void spvOpcodeTableInitialize(spv_opcode_desc_t* entries,
- uint32_t num_entries) {
- // Compute the operandTypes field for each entry.
- for (uint32_t i = 0; i < num_entries; ++i) {
- spv_opcode_desc_t& opcode = entries[i];
- opcode.numTypes = 0;
- // Type ID always comes first, if present.
- if (opcode.hasType)
- opcode.operandTypes[opcode.numTypes++] = SPV_OPERAND_TYPE_TYPE_ID;
- // Result ID always comes next, if present
- if (opcode.hasResult)
- opcode.operandTypes[opcode.numTypes++] = SPV_OPERAND_TYPE_RESULT_ID;
- const uint16_t maxNumOperands = static_cast<uint16_t>(
- sizeof(opcode.operandTypes) / sizeof(opcode.operandTypes[0]));
- const uint16_t maxNumClasses = static_cast<uint16_t>(
- sizeof(opcode.operandClass) / sizeof(opcode.operandClass[0]));
- for (uint16_t classIndex = 0;
- opcode.numTypes < maxNumOperands && classIndex < maxNumClasses;
- classIndex++) {
- const OperandClass operandClass = opcode.operandClass[classIndex];
- const auto operandType =
- convertOperandClassToType(opcode.opcode, operandClass);
- opcode.operandTypes[opcode.numTypes++] = operandType;
- // The OperandNone value is not explicitly represented in the .inc file.
- // However, it is the zero value, and is created via implicit value
- // initialization. It converts to SPV_OPERAND_TYPE_NONE.
- // The SPV_OPERAND_TYPE_NONE operand type indicates no current or futher
- // operands.
- if (operandType == SPV_OPERAND_TYPE_NONE) {
- opcode.numTypes--;
- break;
- }
- }
-
- // We should have written the terminating SPV_OPERAND_TYPE_NONE entry, but
- // also without overflowing.
- assert((opcode.numTypes < maxNumOperands) &&
- "Operand class list is too long. Expand "
- "spv_opcode_desc_t.operandClass");
- }
-}
-
const char* spvGeneratorStr(uint32_t generator) {
switch (generator) {
case SPV_GENERATOR_KHRONOS:
}
}
+// Evaluates to the number of elements of array A.
+// If we could use constexpr, then we could make this a template function.
+// If the source arrays were std::array, then we could have used
+// std::array::size.
+#define ARRAY_SIZE(A) (static_cast<uint32_t>(sizeof(A) / sizeof(A[0])))
+
spv_result_t spvOpcodeTableGet(spv_opcode_table* pInstTable) {
if (!pInstTable) return SPV_ERROR_INVALID_POINTER;
- const uint32_t size = sizeof(opcodeTableEntries);
- spv_opcode_desc_t* copied_entries =
- static_cast<spv_opcode_desc_t*>(::malloc(size));
- if (!copied_entries) return SPV_ERROR_OUT_OF_MEMORY;
- ::memcpy(copied_entries, opcodeTableEntries, size);
-
- const uint32_t count = static_cast<uint32_t>(sizeof(opcodeTableEntries) /
- sizeof(spv_opcode_desc_t));
- spv_opcode_table_t* table = new spv_opcode_table_t{count, copied_entries};
-
- spvOpcodeTableInitialize(copied_entries, count);
+ static const spv_opcode_table_t table = {ARRAY_SIZE(opcodeTableEntries),
+ opcodeTableEntries};
- *pInstTable = table;
+ *pInstTable = &table;
return SPV_SUCCESS;
}
}
const char* spvOpcodeString(const SpvOp opcode) {
-// Use the syntax table so it's sure to be complete.
-#define Instruction(Name, ...) \
- case SpvOp##Name: \
- return #Name;
- switch (opcode) {
-#include "opcode.inc"
- default:
- assert(0 && "Unreachable!");
+ for (uint32_t i = 0;
+ i < sizeof(opcodeTableEntries) / sizeof(spv_opcode_desc_t); ++i) {
+ if (opcodeTableEntries[i].opcode == opcode)
+ return opcodeTableEntries[i].name;
}
+ assert(0 && "Unreachable!");
return "unknown";
-#undef Instruction
}
int32_t spvOpcodeIsScalarType(const SpvOp opcode) {
+++ /dev/null
-// Instruction fields are:
-// name - skips the "Op" prefix
-// {0|1} - whether the instruction generates a result Id
-// {0|1} - whether the instruction encodes the type of the result Id
-// numLogicalOperands - does not include result id or type id
-// numCapabilities - we only handle 0 or 1 required capabilities
-// Capability(<capability-name>) - capability required to use this instruction. Might be None.
-// There can be Capability2(a,b) for dependence on two capabilities.
-// {0|1} - whether the instruction is variable number of logical operands
-// EmptyList or List(...) - list of classes of logical operands
-// Example use:
-// #define EmptyList {}
-// #define List(...) {__VA_ARGS__}
-// #define Capability(C) Capability##C
-// #define CapabilityNone -1
-// #define Instruction(Name,HasResult,HasType,NumLogicalOperands,CapabiltyRequired,IsVariable,LogicalArgsList)
-Instruction(Nop, 0, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(Undef, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(SourceContinued, 0, 0, 1, 0, Capability(None), 1, List(OperandLiteralString))
-Instruction(Source, 0, 0, 4, 0, Capability(None), 1, List(OperandSource, OperandLiteralNumber, OperandOptionalId, OperandOptionalLiteralString))
-Instruction(SourceExtension, 0, 0, 1, 0, Capability(None), 1, List(OperandLiteralString))
-Instruction(Name, 0, 0, 2, 0, Capability(None), 1, List(OperandId, OperandLiteralString))
-Instruction(MemberName, 0, 0, 3, 0, Capability(None), 1, List(OperandId, OperandLiteralNumber, OperandLiteralString))
-Instruction(String, 1, 0, 1, 0, Capability(None), 1, List(OperandLiteralString))
-Instruction(Line, 0, 0, 3, 0, Capability(None), 0, List(OperandId, OperandLiteralNumber, OperandLiteralNumber))
-Instruction(Extension, 0, 0, 1, 0, Capability(None), 1, List(OperandLiteralString))
-Instruction(ExtInstImport, 1, 0, 1, 0, Capability(None), 1, List(OperandLiteralString))
-Instruction(ExtInst, 1, 1, 3, 0, Capability(None), 1, List(OperandId, OperandLiteralNumber, OperandVariableIds))
-Instruction(MemoryModel, 0, 0, 2, 0, Capability(None), 0, List(OperandAddressing, OperandMemory))
-Instruction(EntryPoint, 0, 0, 4, 0, Capability(None), 1, List(OperandExecutionModel, OperandId, OperandLiteralString, OperandVariableIds))
-Instruction(ExecutionMode, 0, 0, 3, 0, Capability(None), 1, List(OperandId, OperandExecutionMode, OperandOptionalLiteral))
-Instruction(Capability, 0, 0, 1, 0, Capability(None), 0, List(OperandCapability))
-Instruction(TypeVoid, 1, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(TypeBool, 1, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(TypeInt, 1, 0, 2, 0, Capability(None), 0, List(OperandLiteralNumber, OperandLiteralNumber))
-Instruction(TypeFloat, 1, 0, 1, 0, Capability(None), 0, List(OperandLiteralNumber))
-Instruction(TypeVector, 1, 0, 2, 0, Capability(None), 0, List(OperandId, OperandLiteralNumber))
-Instruction(TypeMatrix, 1, 0, 2, 1, Capability(Matrix), 0, List(OperandId, OperandLiteralNumber))
-Instruction(TypeImage, 1, 0, 8, 0, Capability(None), 1, List(OperandId, OperandDimensionality, OperandLiteralNumber, OperandLiteralNumber, OperandLiteralNumber, OperandLiteralNumber, OperandSamplerImageFormat, OperandOptionalAccessQualifier))
-Instruction(TypeSampler, 1, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(TypeSampledImage, 1, 0, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(TypeArray, 1, 0, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(TypeRuntimeArray, 1, 0, 1, 1, Capability(Shader), 0, List(OperandId))
-Instruction(TypeStruct, 1, 0, 1, 0, Capability(None), 1, List(OperandVariableIds))
-Instruction(TypeOpaque, 1, 0, 1, 1, Capability(Kernel), 1, List(OperandLiteralString))
-Instruction(TypePointer, 1, 0, 2, 0, Capability(None), 0, List(OperandStorage, OperandId))
-Instruction(TypeFunction, 1, 0, 2, 0, Capability(None), 1, List(OperandId, OperandVariableIds))
-Instruction(TypeEvent, 1, 0, 0, 1, Capability(Kernel), 0, EmptyList)
-Instruction(TypeDeviceEvent, 1, 0, 0, 1, Capability(DeviceEnqueue), 0, EmptyList)
-Instruction(TypeReserveId, 1, 0, 0, 1, Capability(Pipes), 0, EmptyList)
-Instruction(TypeQueue, 1, 0, 0, 1, Capability(DeviceEnqueue), 0, EmptyList)
-Instruction(TypePipe, 1, 0, 1, 1, Capability(Pipes), 0, List(OperandAccessQualifier))
-Instruction(TypeForwardPointer, 0, 0, 2, 1, Capability(Addresses), 0, List(OperandId, OperandStorage))
-Instruction(ConstantTrue, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(ConstantFalse, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(Constant, 1, 1, 1, 0, Capability(None), 1, List(OperandVariableLiterals))
-Instruction(ConstantComposite, 1, 1, 1, 0, Capability(None), 1, List(OperandVariableIds))
-Instruction(ConstantSampler, 1, 1, 3, 1, Capability(LiteralSampler), 0, List(OperandSamplerAddressingMode, OperandLiteralNumber, OperandSamplerFilterMode))
-Instruction(ConstantNull, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(SpecConstantTrue, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(SpecConstantFalse, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(SpecConstant, 1, 1, 1, 0, Capability(None), 1, List(OperandVariableLiterals))
-Instruction(SpecConstantComposite, 1, 1, 1, 0, Capability(None), 1, List(OperandVariableIds))
-Instruction(SpecConstantOp, 1, 1, 2, 0, Capability(None), 1, List(OperandLiteralNumber, OperandVariableIds))
-Instruction(Function, 1, 1, 2, 0, Capability(None), 0, List(OperandFunction, OperandId))
-Instruction(FunctionParameter, 1, 1, 0, 0, Capability(None), 0, EmptyList)
-Instruction(FunctionEnd, 0, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(FunctionCall, 1, 1, 2, 0, Capability(None), 1, List(OperandId, OperandVariableIds))
-Instruction(Variable, 1, 1, 2, 0, Capability(None), 1, List(OperandStorage, OperandOptionalId))
-Instruction(ImageTexelPointer, 1, 1, 3, 0, Capability(None), 0, List(OperandId, OperandId, OperandId))
-Instruction(Load, 1, 1, 2, 0, Capability(None), 1, List(OperandId, OperandOptionalMemoryAccess))
-Instruction(Store, 0, 0, 3, 0, Capability(None), 1, List(OperandId, OperandId, OperandOptionalMemoryAccess))
-Instruction(CopyMemory, 0, 0, 3, 0, Capability(None), 1, List(OperandId, OperandId, OperandOptionalMemoryAccess))
-Instruction(CopyMemorySized, 0, 0, 4, 1, Capability(Addresses), 1, List(OperandId, OperandId, OperandId, OperandOptionalMemoryAccess))
-Instruction(AccessChain, 1, 1, 2, 0, Capability(None), 1, List(OperandId, OperandVariableIds))
-Instruction(InBoundsAccessChain, 1, 1, 2, 0, Capability(None), 1, List(OperandId, OperandVariableIds))
-Instruction(PtrAccessChain, 1, 1, 3, 1, Capability(Addresses), 1, List(OperandId, OperandId, OperandVariableIds))
-Instruction(ArrayLength, 1, 1, 2, 1, Capability(Shader), 0, List(OperandId, OperandLiteralNumber))
-Instruction(GenericPtrMemSemantics, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(InBoundsPtrAccessChain, 1, 1, 3, 1, Capability(Addresses), 1, List(OperandId, OperandId, OperandVariableIds))
-Instruction(Decorate, 0, 0, 3, 0, Capability(None), 1, List(OperandId, OperandDecoration, OperandVariableLiterals))
-Instruction(MemberDecorate, 0, 0, 4, 0, Capability(None), 1, List(OperandId, OperandLiteralNumber, OperandDecoration, OperandVariableLiterals))
-Instruction(DecorationGroup, 1, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(GroupDecorate, 0, 0, 2, 0, Capability(None), 1, List(OperandId, OperandVariableIds))
-Instruction(GroupMemberDecorate, 0, 0, 2, 0, Capability(None), 1, List(OperandId, OperandVariableIdLiteral))
-Instruction(VectorExtractDynamic, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(VectorInsertDynamic, 1, 1, 3, 0, Capability(None), 0, List(OperandId, OperandId, OperandId))
-Instruction(VectorShuffle, 1, 1, 3, 0, Capability(None), 1, List(OperandId, OperandId, OperandVariableLiterals))
-Instruction(CompositeConstruct, 1, 1, 1, 0, Capability(None), 1, List(OperandVariableIds))
-Instruction(CompositeExtract, 1, 1, 2, 0, Capability(None), 1, List(OperandId, OperandVariableLiterals))
-Instruction(CompositeInsert, 1, 1, 3, 0, Capability(None), 1, List(OperandId, OperandId, OperandVariableLiterals))
-Instruction(CopyObject, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(Transpose, 1, 1, 1, 1, Capability(Matrix), 0, List(OperandId))
-Instruction(SampledImage, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ImageSampleImplicitLod, 1, 1, 4, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSampleExplicitLod, 1, 1, 5, 0, Capability(None), 1, List(OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSampleDrefImplicitLod, 1, 1, 5, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSampleDrefExplicitLod, 1, 1, 6, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSampleProjImplicitLod, 1, 1, 4, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSampleProjExplicitLod, 1, 1, 5, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSampleProjDrefImplicitLod, 1, 1, 5, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSampleProjDrefExplicitLod, 1, 1, 6, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandId, OperandImageOperands))
-Instruction(ImageFetch, 1, 1, 4, 0, Capability(None), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageGather, 1, 1, 5, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageDrefGather, 1, 1, 5, 1, Capability(Shader), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageRead, 1, 1, 4, 0, Capability(None), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageWrite, 0, 0, 5, 0, Capability(None), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(Image, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(ImageQueryFormat, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(ImageQueryOrder, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(ImageQuerySizeLod, 1, 1, 2, 2, Capability2(Kernel,ImageQuery), 0, List(OperandId, OperandId))
-Instruction(ImageQuerySize, 1, 1, 1, 2, Capability2(Kernel,ImageQuery), 0, List(OperandId))
-Instruction(ImageQueryLod, 1, 1, 2, 1, Capability(ImageQuery), 0, List(OperandId, OperandId))
-Instruction(ImageQueryLevels, 1, 1, 1, 2, Capability2(Kernel,ImageQuery), 0, List(OperandId))
-Instruction(ImageQuerySamples, 1, 1, 1, 2, Capability2(Kernel,ImageQuery), 0, List(OperandId))
-Instruction(ConvertFToU, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(ConvertFToS, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(ConvertSToF, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(ConvertUToF, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(UConvert, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(SConvert, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(FConvert, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(QuantizeToF16, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(ConvertPtrToU, 1, 1, 1, 1, Capability(Addresses), 0, List(OperandId))
-Instruction(SatConvertSToU, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(SatConvertUToS, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(ConvertUToPtr, 1, 1, 1, 1, Capability(Addresses), 0, List(OperandId))
-Instruction(PtrCastToGeneric, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(GenericCastToPtr, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(GenericCastToPtrExplicit, 1, 1, 2, 1, Capability(Kernel), 0, List(OperandId, OperandStorage))
-Instruction(Bitcast, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(SNegate, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(FNegate, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(IAdd, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FAdd, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ISub, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FSub, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(IMul, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FMul, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(UDiv, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SDiv, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FDiv, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(UMod, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SRem, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SMod, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FRem, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FMod, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(VectorTimesScalar, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(MatrixTimesScalar, 1, 1, 2, 1, Capability(Matrix), 0, List(OperandId, OperandId))
-Instruction(VectorTimesMatrix, 1, 1, 2, 1, Capability(Matrix), 0, List(OperandId, OperandId))
-Instruction(MatrixTimesVector, 1, 1, 2, 1, Capability(Matrix), 0, List(OperandId, OperandId))
-Instruction(MatrixTimesMatrix, 1, 1, 2, 1, Capability(Matrix), 0, List(OperandId, OperandId))
-Instruction(OuterProduct, 1, 1, 2, 1, Capability(Matrix), 0, List(OperandId, OperandId))
-Instruction(Dot, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(IAddCarry, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ISubBorrow, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(UMulExtended, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SMulExtended, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(Any, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(All, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(IsNan, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(IsInf, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(IsFinite, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(IsNormal, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(SignBitSet, 1, 1, 1, 1, Capability(Kernel), 0, List(OperandId))
-Instruction(LessOrGreater, 1, 1, 2, 1, Capability(Kernel), 0, List(OperandId, OperandId))
-Instruction(Ordered, 1, 1, 2, 1, Capability(Kernel), 0, List(OperandId, OperandId))
-Instruction(Unordered, 1, 1, 2, 1, Capability(Kernel), 0, List(OperandId, OperandId))
-Instruction(LogicalEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(LogicalNotEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(LogicalOr, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(LogicalAnd, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(LogicalNot, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(Select, 1, 1, 3, 0, Capability(None), 0, List(OperandId, OperandId, OperandId))
-Instruction(IEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(INotEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(UGreaterThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SGreaterThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(UGreaterThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SGreaterThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ULessThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SLessThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ULessThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(SLessThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FOrdEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FUnordEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FOrdNotEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FUnordNotEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FOrdLessThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FUnordLessThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FOrdGreaterThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FUnordGreaterThan, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FOrdLessThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FUnordLessThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FOrdGreaterThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(FUnordGreaterThanEqual, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ShiftRightLogical, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ShiftRightArithmetic, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(ShiftLeftLogical, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(BitwiseOr, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(BitwiseXor, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(BitwiseAnd, 1, 1, 2, 0, Capability(None), 0, List(OperandId, OperandId))
-Instruction(Not, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(BitFieldInsert, 1, 1, 4, 1, Capability(Shader), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(BitFieldSExtract, 1, 1, 3, 1, Capability(Shader), 0, List(OperandId, OperandId, OperandId))
-Instruction(BitFieldUExtract, 1, 1, 3, 1, Capability(Shader), 0, List(OperandId, OperandId, OperandId))
-Instruction(BitReverse, 1, 1, 1, 1, Capability(Shader), 0, List(OperandId))
-Instruction(BitCount, 1, 1, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(DPdx, 1, 1, 1, 1, Capability(Shader), 0, List(OperandId))
-Instruction(DPdy, 1, 1, 1, 1, Capability(Shader), 0, List(OperandId))
-Instruction(Fwidth, 1, 1, 1, 1, Capability(Shader), 0, List(OperandId))
-Instruction(DPdxFine, 1, 1, 1, 1, Capability(DerivativeControl), 0, List(OperandId))
-Instruction(DPdyFine, 1, 1, 1, 1, Capability(DerivativeControl), 0, List(OperandId))
-Instruction(FwidthFine, 1, 1, 1, 1, Capability(DerivativeControl), 0, List(OperandId))
-Instruction(DPdxCoarse, 1, 1, 1, 1, Capability(DerivativeControl), 0, List(OperandId))
-Instruction(DPdyCoarse, 1, 1, 1, 1, Capability(DerivativeControl), 0, List(OperandId))
-Instruction(FwidthCoarse, 1, 1, 1, 1, Capability(DerivativeControl), 0, List(OperandId))
-Instruction(EmitVertex, 0, 0, 0, 1, Capability(Geometry), 0, EmptyList)
-Instruction(EndPrimitive, 0, 0, 0, 1, Capability(Geometry), 0, EmptyList)
-Instruction(EmitStreamVertex, 0, 0, 1, 1, Capability(GeometryStreams), 0, List(OperandId))
-Instruction(EndStreamPrimitive, 0, 0, 1, 1, Capability(GeometryStreams), 0, List(OperandId))
-Instruction(ControlBarrier, 0, 0, 3, 0, Capability(None), 0, List(OperandScope, OperandScope, OperandMemorySemantics))
-Instruction(MemoryBarrier, 0, 0, 2, 0, Capability(None), 0, List(OperandScope, OperandMemorySemantics))
-Instruction(AtomicLoad, 1, 1, 3, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics))
-Instruction(AtomicStore, 0, 0, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicExchange, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicCompareExchange, 1, 1, 6, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandMemorySemantics, OperandId, OperandId))
-Instruction(AtomicCompareExchangeWeak, 1, 1, 6, 1, Capability(Kernel), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandMemorySemantics, OperandId, OperandId))
-Instruction(AtomicIIncrement, 1, 1, 3, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics))
-Instruction(AtomicIDecrement, 1, 1, 3, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics))
-Instruction(AtomicIAdd, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicISub, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicSMin, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicUMin, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicSMax, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicUMax, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicAnd, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicOr, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(AtomicXor, 1, 1, 4, 0, Capability(None), 0, List(OperandId, OperandScope, OperandMemorySemantics, OperandId))
-Instruction(Phi, 1, 1, 1, 0, Capability(None), 1, List(OperandVariableIds))
-Instruction(LoopMerge, 0, 0, 3, 0, Capability(None), 0, List(OperandId, OperandId, OperandLoop))
-Instruction(SelectionMerge, 0, 0, 2, 0, Capability(None), 0, List(OperandId, OperandSelect))
-Instruction(Label, 1, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(Branch, 0, 0, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(BranchConditional, 0, 0, 4, 0, Capability(None), 1, List(OperandId, OperandId, OperandId, OperandVariableLiterals))
-Instruction(Switch, 0, 0, 3, 0, Capability(None), 1, List(OperandId, OperandId, OperandVariableLiteralId))
-Instruction(Kill, 0, 0, 0, 1, Capability(Shader), 0, EmptyList)
-Instruction(Return, 0, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(ReturnValue, 0, 0, 1, 0, Capability(None), 0, List(OperandId))
-Instruction(Unreachable, 0, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(LifetimeStart, 0, 0, 2, 1, Capability(Kernel), 0, List(OperandId, OperandLiteralNumber))
-Instruction(LifetimeStop, 0, 0, 2, 1, Capability(Kernel), 0, List(OperandId, OperandLiteralNumber))
-Instruction(GroupAsyncCopy, 1, 1, 6, 1, Capability(Kernel), 0, List(OperandScope, OperandId, OperandId, OperandId, OperandId, OperandId))
-Instruction(GroupWaitEvents, 0, 0, 3, 1, Capability(Kernel), 0, List(OperandScope, OperandId, OperandId))
-Instruction(GroupAll, 1, 1, 2, 1, Capability(Groups), 0, List(OperandScope, OperandId))
-Instruction(GroupAny, 1, 1, 2, 1, Capability(Groups), 0, List(OperandScope, OperandId))
-Instruction(GroupBroadcast, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandId, OperandId))
-Instruction(GroupIAdd, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupFAdd, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupFMin, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupUMin, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupSMin, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupFMax, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupUMax, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(GroupSMax, 1, 1, 3, 1, Capability(Groups), 0, List(OperandScope, OperandGroupOperation, OperandId))
-Instruction(ReadPipe, 1, 1, 4, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(WritePipe, 1, 1, 4, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(ReservedReadPipe, 1, 1, 6, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId, OperandId, OperandId))
-Instruction(ReservedWritePipe, 1, 1, 6, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId, OperandId, OperandId))
-Instruction(ReserveReadPipePackets, 1, 1, 4, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(ReserveWritePipePackets, 1, 1, 4, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(CommitReadPipe, 0, 0, 4, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(CommitWritePipe, 0, 0, 4, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(IsValidReserveId, 1, 1, 1, 1, Capability(Pipes), 0, List(OperandId))
-Instruction(GetNumPipePackets, 1, 1, 3, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId))
-Instruction(GetMaxPipePackets, 1, 1, 3, 1, Capability(Pipes), 0, List(OperandId, OperandId, OperandId))
-Instruction(GroupReserveReadPipePackets, 1, 1, 5, 1, Capability(Pipes), 0, List(OperandScope, OperandId, OperandId, OperandId, OperandId))
-Instruction(GroupReserveWritePipePackets, 1, 1, 5, 1, Capability(Pipes), 0, List(OperandScope, OperandId, OperandId, OperandId, OperandId))
-Instruction(GroupCommitReadPipe, 0, 0, 5, 1, Capability(Pipes), 0, List(OperandScope, OperandId, OperandId, OperandId, OperandId))
-Instruction(GroupCommitWritePipe, 0, 0, 5, 1, Capability(Pipes), 0, List(OperandScope, OperandId, OperandId, OperandId, OperandId))
-Instruction(EnqueueMarker, 1, 1, 4, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(EnqueueKernel, 1, 1, 11, 1, Capability(DeviceEnqueue), 1, List(OperandId, OperandId, OperandId, OperandId, OperandId, OperandId, OperandId, OperandId, OperandId, OperandId, OperandVariableIds))
-Instruction(GetKernelNDrangeSubGroupCount, 1, 1, 5, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId, OperandId, OperandId))
-Instruction(GetKernelNDrangeMaxSubGroupSize, 1, 1, 5, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId, OperandId, OperandId))
-Instruction(GetKernelWorkGroupSize, 1, 1, 4, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(GetKernelPreferredWorkGroupSizeMultiple, 1, 1, 4, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId, OperandId))
-Instruction(RetainEvent, 0, 0, 1, 1, Capability(DeviceEnqueue), 0, List(OperandId))
-Instruction(ReleaseEvent, 0, 0, 1, 1, Capability(DeviceEnqueue), 0, List(OperandId))
-Instruction(CreateUserEvent, 1, 1, 0, 1, Capability(DeviceEnqueue), 0, EmptyList)
-Instruction(IsValidEvent, 1, 1, 1, 1, Capability(DeviceEnqueue), 0, List(OperandId))
-Instruction(SetUserEventStatus, 0, 0, 2, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId))
-Instruction(CaptureEventProfilingInfo, 0, 0, 3, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId))
-Instruction(GetDefaultQueue, 1, 1, 0, 1, Capability(DeviceEnqueue), 0, EmptyList)
-Instruction(BuildNDRange, 1, 1, 3, 1, Capability(DeviceEnqueue), 0, List(OperandId, OperandId, OperandId))
-Instruction(ImageSparseSampleImplicitLod, 1, 1, 4, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseSampleExplicitLod, 1, 1, 5, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSparseSampleDrefImplicitLod, 1, 1, 5, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseSampleDrefExplicitLod, 1, 1, 6, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSparseSampleProjImplicitLod, 1, 1, 4, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseSampleProjExplicitLod, 1, 1, 5, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSparseSampleProjDrefImplicitLod, 1, 1, 5, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseSampleProjDrefExplicitLod, 1, 1, 6, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandId, OperandImageOperands))
-Instruction(ImageSparseFetch, 1, 1, 4, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseGather, 1, 1, 5, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseDrefGather, 1, 1, 5, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandId, OperandOptionalImageOperands))
-Instruction(ImageSparseTexelsResident, 1, 1, 1, 1, Capability(SparseResidency), 0, List(OperandId))
-Instruction(NoLine, 0, 0, 0, 0, Capability(None), 0, EmptyList)
-Instruction(AtomicFlagTestAndSet, 1, 1, 3, 1, Capability(Kernel), 0, List(OperandId, OperandScope, OperandMemorySemantics))
-Instruction(AtomicFlagClear, 0, 0, 3, 1, Capability(Kernel), 0, List(OperandId, OperandScope, OperandMemorySemantics))
-Instruction(ImageSparseRead, 1, 1, 4, 1, Capability(SparseResidency), 1, List(OperandId, OperandId, OperandOptionalImageOperands))
#include <assert.h>
#include <string.h>
-static const spv_operand_desc_t sourceLanguageEntries[] = {
- {"Unknown", SpvSourceLanguageUnknown, 0, {SPV_OPERAND_TYPE_NONE}},
- {"ESSL", SpvSourceLanguageESSL, 0, {SPV_OPERAND_TYPE_NONE}},
- {"GLSL", SpvSourceLanguageGLSL, 0, {SPV_OPERAND_TYPE_NONE}},
- {"OpenCL_C", SpvSourceLanguageOpenCL_C, 0, {SPV_OPERAND_TYPE_NONE}},
- {"OpenCL_CPP", SpvSourceLanguageOpenCL_CPP, 0, {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t executionModelEntries[] = {
- {"Vertex",
- SpvExecutionModelVertex,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"TessellationControl",
- SpvExecutionModelTessellationControl,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"TessellationEvaluation",
- SpvExecutionModelTessellationEvaluation,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"Geometry",
- SpvExecutionModelGeometry,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry),
- {SPV_OPERAND_TYPE_NONE}},
- {"Fragment",
- SpvExecutionModelFragment,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"GLCompute",
- SpvExecutionModelGLCompute,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Kernel",
- SpvExecutionModelKernel,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t addressingModelEntries[] = {
- {"Logical", SpvAddressingModelLogical, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Physical32",
- SpvAddressingModelPhysical32,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityAddresses),
- {SPV_OPERAND_TYPE_NONE}},
- {"Physical64",
- SpvAddressingModelPhysical64,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityAddresses),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t memoryModelEntries[] = {
- {"Simple",
- SpvMemoryModelSimple,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"GLSL450",
- SpvMemoryModelGLSL450,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"OpenCL",
- SpvMemoryModelOpenCL,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-// Execution mode requiring the given capability and having no operands.
-#define ExecMode0(mode, cap) \
- #mode, SpvExecutionMode##mode, SPV_CAPABILITY_AS_MASK(SpvCapability##cap), { \
- SPV_OPERAND_TYPE_NONE \
- }
-// Execution mode requiring the given capability and having one literal number
-// operand.
-#define ExecMode1(mode, cap) \
- #mode, SpvExecutionMode##mode, SPV_CAPABILITY_AS_MASK(SpvCapability##cap), { \
- SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE \
- }
-static const spv_operand_desc_t executionModeEntries[] = {
- {ExecMode1(Invocations, Geometry)},
- {ExecMode0(SpacingEqual, Tessellation)},
- {ExecMode0(SpacingFractionalEven, Tessellation)},
- {ExecMode0(SpacingFractionalOdd, Tessellation)},
- {ExecMode0(VertexOrderCw, Tessellation)},
- {ExecMode0(VertexOrderCcw, Tessellation)},
- {ExecMode0(PixelCenterInteger, Shader)},
- {ExecMode0(OriginUpperLeft, Shader)},
- {ExecMode0(OriginLowerLeft, Shader)},
- {ExecMode0(EarlyFragmentTests, Shader)},
- {ExecMode0(PointMode, Tessellation)},
- {ExecMode0(Xfb, TransformFeedback)},
- {ExecMode0(DepthReplacing, Shader)},
- {ExecMode0(DepthGreater, Shader)},
- {ExecMode0(DepthLess, Shader)},
- {ExecMode0(DepthUnchanged, Shader)},
- {"LocalSize",
- SpvExecutionModeLocalSize,
- 0,
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER,
- SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"LocalSizeHint",
- SpvExecutionModeLocalSizeHint,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_LITERAL_INTEGER,
- SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {ExecMode0(InputPoints, Geometry)},
- {ExecMode0(InputLines, Geometry)},
- {ExecMode0(InputLinesAdjacency, Geometry)},
- {"Triangles",
- SpvExecutionModeTriangles,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry) |
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {ExecMode0(InputTrianglesAdjacency, Geometry)},
- {ExecMode0(Quads, Tessellation)},
- {ExecMode0(Isolines, Tessellation)},
- {"OutputVertices",
- SpvExecutionModeOutputVertices,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry) |
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {ExecMode0(OutputPoints, Geometry)},
- {ExecMode0(OutputLineStrip, Geometry)},
- {ExecMode0(OutputTriangleStrip, Geometry)},
- {ExecMode1(VecTypeHint, Kernel)},
- {ExecMode0(ContractionOff, Kernel)},
-};
-#undef ExecMode0
-#undef ExecMode1
-
-static const spv_operand_desc_t storageClassEntries[] = {
- // TODO(dneto): There are more storage classes in Rev32 and later.
- {"UniformConstant",
- SpvStorageClassUniformConstant,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"Input",
- SpvStorageClassInput,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Uniform",
- SpvStorageClassUniform,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Output",
- SpvStorageClassOutput,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Workgroup", SpvStorageClassWorkgroup, 0, {SPV_OPERAND_TYPE_NONE}},
- {"CrossWorkgroup",
- SpvStorageClassCrossWorkgroup,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"Private",
- SpvStorageClassPrivate,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Function", SpvStorageClassFunction, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Generic",
- SpvStorageClassGeneric,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGenericPointer),
- {SPV_OPERAND_TYPE_NONE}},
- {"PushConstant",
- SpvStorageClassPushConstant,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"AtomicCounter",
- SpvStorageClassAtomicCounter,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityAtomicStorage),
- {SPV_OPERAND_TYPE_NONE}},
- {"Image", SpvStorageClassImage, 0, {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t dimensionalityEntries[] = {
- {"1D",
- SpvDim1D,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampled1D),
- {SPV_OPERAND_TYPE_NONE}},
- {"2D", SpvDim2D, 0, {SPV_OPERAND_TYPE_NONE}},
- {"3D", SpvDim3D, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Cube",
- SpvDimCube,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Rect",
- SpvDimRect,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampledRect),
- {SPV_OPERAND_TYPE_NONE}},
- {"Buffer",
- SpvDimBuffer,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampledBuffer),
- {SPV_OPERAND_TYPE_NONE}},
- {"SubpassData",
- SpvDimSubpassData,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityInputAttachment),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t samplerAddressingModeEntries[] = {
- {"None",
- SpvSamplerAddressingModeNone,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"ClampToEdge",
- SpvSamplerAddressingModeClampToEdge,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Clamp",
- SpvSamplerAddressingModeClamp,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Repeat",
- SpvSamplerAddressingModeRepeat,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"RepeatMirrored",
- SpvSamplerAddressingModeRepeatMirrored,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t samplerFilterModeEntries[] = {
- {"Nearest",
- SpvSamplerFilterModeNearest,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Linear",
- SpvSamplerFilterModeLinear,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t samplerImageFormatEntries[] = {
-#define CASE0(NAME) \
- { \
- #NAME, SpvImageFormat##NAME, 0, { SPV_OPERAND_TYPE_NONE } \
- }
-#define CASE(NAME, CAP) \
- { \
- #NAME, SpvImageFormat##NAME, SPV_CAPABILITY_AS_MASK(SpvCapability##CAP), { \
- SPV_OPERAND_TYPE_NONE \
- } \
- }
- // clang-format off
- CASE0(Unknown),
- CASE(Rgba32f, Shader),
- CASE(Rgba16f, Shader),
- CASE(R32f, Shader),
- CASE(Rgba8, Shader),
- CASE(Rgba8Snorm, Shader),
- CASE(Rg32f, StorageImageExtendedFormats),
- CASE(Rg16f, StorageImageExtendedFormats),
- CASE(R11fG11fB10f, StorageImageExtendedFormats),
- CASE(R16f, StorageImageExtendedFormats),
- CASE(Rgba16, StorageImageExtendedFormats),
- CASE(Rgb10A2, StorageImageExtendedFormats),
- CASE(Rg16, StorageImageExtendedFormats),
- CASE(Rg8, StorageImageExtendedFormats),
- CASE(R16, StorageImageExtendedFormats),
- CASE(R8, StorageImageExtendedFormats),
- CASE(Rgba16Snorm, StorageImageExtendedFormats),
- CASE(Rg16Snorm, StorageImageExtendedFormats),
- CASE(Rg8Snorm, StorageImageExtendedFormats),
- CASE(R16Snorm, StorageImageExtendedFormats),
- CASE(R8Snorm, StorageImageExtendedFormats),
- CASE(Rgba32i, Shader),
- CASE(Rgba16i, Shader),
- CASE(Rgba8i, Shader),
- CASE(R32i, Shader),
- CASE(Rg32i, StorageImageExtendedFormats),
- CASE(Rg16i, StorageImageExtendedFormats),
- CASE(Rg8i, StorageImageExtendedFormats),
- CASE(R16i, StorageImageExtendedFormats),
- CASE(R8i, StorageImageExtendedFormats),
- CASE(Rgba32ui, Shader),
- CASE(Rgba16ui, Shader),
- CASE(Rgba8ui, Shader),
- CASE(R32ui, Shader),
- CASE(Rgb10a2ui, StorageImageExtendedFormats),
- CASE(Rg32ui, StorageImageExtendedFormats),
- CASE(Rg16ui, StorageImageExtendedFormats),
- CASE(Rg8ui, StorageImageExtendedFormats),
- CASE(R16ui, StorageImageExtendedFormats),
- CASE(R8ui, StorageImageExtendedFormats),
-// clang-format on
-#undef CASE
-};
-
-// All image channel orders depend on the Kernel capability.
-#define CASE(NAME) \
- { \
- #NAME, SpvImageChannelOrder##NAME, \
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel), { \
- SPV_OPERAND_TYPE_NONE \
- } \
- }
-static const spv_operand_desc_t imageChannelOrderEntries[] = {
- CASE(R), CASE(A), CASE(RG), CASE(RA), CASE(RGB),
- CASE(RGBA), CASE(BGRA), CASE(ARGB), CASE(Intensity), CASE(Luminance),
- CASE(Rx), CASE(RGx), CASE(RGBx), CASE(Depth), CASE(DepthStencil),
- CASE(sRGB), CASE(sRGBx), CASE(sRGBA), CASE(sBGRA),
-};
-#undef CASE
-
-// All image channel data types depend on the Kernel capability.
-#define CASE(NAME) \
- { \
- #NAME, SpvImageChannelDataType##NAME, \
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel), { \
- SPV_OPERAND_TYPE_NONE \
- } \
- }
-static const spv_operand_desc_t imageChannelDataTypeEntries[] = {
- CASE(SnormInt8), CASE(SnormInt16), CASE(UnormInt8),
- CASE(UnormInt16), CASE(UnormShort565), CASE(UnormShort555),
- CASE(UnormInt101010), CASE(SignedInt8), CASE(SignedInt16),
- CASE(SignedInt32), CASE(UnsignedInt8), CASE(UnsignedInt16),
- CASE(UnsignedInt32), CASE(HalfFloat), CASE(Float),
- CASE(UnormInt24), CASE(UnormInt101010_2),
-};
-#undef CASE
-
-// Image operand definitions. Each enum value is a mask. When that mask
-// bit is set, the instruction should have further ID operands.
-// Some mask values depend on a capability.
-static const spv_operand_desc_t imageOperandEntries[] = {
-// Rev32 and later adds many more enums.
-#define CASE(NAME) #NAME, SpvImageOperands##NAME##Mask, 0
-#define CASE_CAP(NAME, CAP) #NAME, SpvImageOperands##NAME##Mask, CAP
-#define ID SPV_OPERAND_TYPE_ID
-#define NONE SPV_OPERAND_TYPE_NONE
- {"None", SpvImageOperandsMaskNone, 0, {NONE}},
- {CASE_CAP(Bias, SPV_CAPABILITY_AS_MASK(SpvCapabilityShader)), {ID, NONE}},
- {CASE(Lod), {ID, NONE}},
- {CASE(Grad), {ID, ID, NONE}},
- {CASE(ConstOffset), {ID, NONE}},
- {CASE_CAP(Offset, SPV_CAPABILITY_AS_MASK(SpvCapabilityImageGatherExtended)),
- {ID, NONE}},
- {CASE(ConstOffsets), {ID, NONE}},
- {CASE(Sample), {ID, NONE}},
- {CASE_CAP(MinLod, SPV_CAPABILITY_AS_MASK(SpvCapabilityMinLod)), {ID, NONE}},
-#undef CASE
-#undef CASE_CAP
-#undef ID
-#undef NONE
-};
-
-static const spv_operand_desc_t fpFastMathModeEntries[] = {
- {"None", SpvFPFastMathModeMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"NotNaN",
- SpvFPFastMathModeNotNaNMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NotInf",
- SpvFPFastMathModeNotInfMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NSZ",
- SpvFPFastMathModeNSZMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"AllowRecip",
- SpvFPFastMathModeAllowRecipMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Fast",
- SpvFPFastMathModeFastMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t fpRoundingModeEntries[] = {
- {"RTE",
- SpvFPRoundingModeRTE,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"RTZ",
- SpvFPRoundingModeRTZ,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"RTP",
- SpvFPRoundingModeRTP,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"RTN",
- SpvFPRoundingModeRTN,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t linkageTypeEntries[] = {
- {"Export",
- SpvLinkageTypeExport,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityLinkage),
- {SPV_OPERAND_TYPE_NONE}},
- {"Import",
- SpvLinkageTypeImport,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityLinkage),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t accessQualifierEntries[] = {
- {"ReadOnly",
- SpvAccessQualifierReadOnly,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"WriteOnly",
- SpvAccessQualifierWriteOnly,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"ReadWrite",
- SpvAccessQualifierReadWrite,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t functionParameterAttributeEntries[] = {
- {"Zext",
- SpvFunctionParameterAttributeZext,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Sext",
- SpvFunctionParameterAttributeSext,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"ByVal",
- SpvFunctionParameterAttributeByVal,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Sret",
- SpvFunctionParameterAttributeSret,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NoAlias",
- SpvFunctionParameterAttributeNoAlias,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NoCapture",
- SpvFunctionParameterAttributeNoCapture,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NoWrite",
- SpvFunctionParameterAttributeNoWrite,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NoReadWrite",
- SpvFunctionParameterAttributeNoReadWrite,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t decorationEntries[] = {
- {"RelaxedPrecision",
- SpvDecorationRelaxedPrecision,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {
- "SpecId",
- SpvDecorationSpecId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER},
- },
- {"Block",
- SpvDecorationBlock,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"BufferBlock",
- SpvDecorationBufferBlock,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"RowMajor",
- SpvDecorationRowMajor,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityMatrix),
- {SPV_OPERAND_TYPE_NONE}},
- {"ColMajor",
- SpvDecorationColMajor,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityMatrix),
- {SPV_OPERAND_TYPE_NONE}},
- {"ArrayStride",
- SpvDecorationArrayStride,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"MatrixStride",
- SpvDecorationMatrixStride,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityMatrix),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"GLSLShared",
- SpvDecorationGLSLShared,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"GLSLPacked",
- SpvDecorationGLSLPacked,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"CPacked",
- SpvDecorationCPacked,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"BuiltIn",
- SpvDecorationBuiltIn,
- 0,
- {SPV_OPERAND_TYPE_BUILT_IN, SPV_OPERAND_TYPE_NONE}},
- {"NoPerspective",
- SpvDecorationNoPerspective,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Flat",
- SpvDecorationFlat,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Patch",
- SpvDecorationPatch,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"Centroid",
- SpvDecorationCentroid,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Sample",
- SpvDecorationSample,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading),
- {SPV_OPERAND_TYPE_NONE}},
- {"Invariant",
- SpvDecorationInvariant,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"Restrict", SpvDecorationRestrict, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Aliased", SpvDecorationAliased, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Volatile", SpvDecorationVolatile, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Constant",
- SpvDecorationConstant,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Coherent", SpvDecorationCoherent, 0, {SPV_OPERAND_TYPE_NONE}},
- {"NonWritable", SpvDecorationNonWritable, 0, {SPV_OPERAND_TYPE_NONE}},
- {"NonReadable", SpvDecorationNonReadable, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Uniform",
- SpvDecorationUniform,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"SaturatedConversion",
- SpvDecorationSaturatedConversion,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"Stream",
- SpvDecorationStream,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometryStreams),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"Location",
- SpvDecorationLocation,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"Component",
- SpvDecorationComponent,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"Index",
- SpvDecorationIndex,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"Binding",
- SpvDecorationBinding,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"DescriptorSet",
- SpvDecorationDescriptorSet,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"Offset",
- SpvDecorationOffset,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"XfbBuffer",
- SpvDecorationXfbBuffer,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTransformFeedback),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"XfbStride",
- SpvDecorationXfbStride,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTransformFeedback),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"FuncParamAttr",
- SpvDecorationFuncParamAttr,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE, SPV_OPERAND_TYPE_NONE}},
- {"FPRoundingMode",
- SpvDecorationFPRoundingMode,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_FP_ROUNDING_MODE, SPV_OPERAND_TYPE_NONE}},
- {"FPFastMathMode",
- SpvDecorationFPFastMathMode,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, SPV_OPERAND_TYPE_NONE}},
- {"LinkageAttributes",
- SpvDecorationLinkageAttributes,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityLinkage),
- {SPV_OPERAND_TYPE_LITERAL_STRING, SPV_OPERAND_TYPE_LINKAGE_TYPE,
- SPV_OPERAND_TYPE_NONE}},
- {"NoContraction",
- SpvDecorationNoContraction,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"InputAttachmentIndex",
- SpvDecorationInputAttachmentIndex,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityInputAttachment),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
- {"Alignment",
- SpvDecorationAlignment,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t builtInEntries[] = {
- {"Position",
- SpvBuiltInPosition,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"PointSize",
- SpvBuiltInPointSize,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"ClipDistance",
- SpvBuiltInClipDistance,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityClipDistance),
- {SPV_OPERAND_TYPE_NONE}},
- {"CullDistance",
- SpvBuiltInCullDistance,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityCullDistance),
- {SPV_OPERAND_TYPE_NONE}},
- {"VertexId",
- SpvBuiltInVertexId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"InstanceId",
- SpvBuiltInInstanceId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"PrimitiveId",
- SpvBuiltInPrimitiveId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry) |
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"InvocationId",
- SpvBuiltInInvocationId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry) |
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"Layer",
- SpvBuiltInLayer,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityGeometry),
- {SPV_OPERAND_TYPE_NONE}},
- {"ViewportIndex",
- SpvBuiltInViewportIndex,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityMultiViewport),
- {SPV_OPERAND_TYPE_NONE}},
- {"TessLevelOuter",
- SpvBuiltInTessLevelOuter,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"TessLevelInner",
- SpvBuiltInTessLevelInner,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"TessCoord",
- SpvBuiltInTessCoord,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"PatchVertices",
- SpvBuiltInPatchVertices,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityTessellation),
- {SPV_OPERAND_TYPE_NONE}},
- {"FragCoord",
- SpvBuiltInFragCoord,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"PointCoord",
- SpvBuiltInPointCoord,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"FrontFacing",
- SpvBuiltInFrontFacing,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"SampleId",
- SpvBuiltInSampleId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading),
- {SPV_OPERAND_TYPE_NONE}},
- {"SamplePosition",
- SpvBuiltInSamplePosition,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading),
- {SPV_OPERAND_TYPE_NONE}},
- {"SampleMask",
- SpvBuiltInSampleMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilitySampleRateShading),
- {SPV_OPERAND_TYPE_NONE}},
- {"FragDepth",
- SpvBuiltInFragDepth,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"HelperInvocation",
- SpvBuiltInHelperInvocation,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"NumWorkgroups", SpvBuiltInNumWorkgroups, 0, {SPV_OPERAND_TYPE_NONE}},
- {"WorkgroupSize", SpvBuiltInWorkgroupSize, 0, {SPV_OPERAND_TYPE_NONE}},
- {"WorkgroupId", SpvBuiltInWorkgroupId, 0, {SPV_OPERAND_TYPE_NONE}},
- {"LocalInvocationId",
- SpvBuiltInLocalInvocationId,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"GlobalInvocationId",
- SpvBuiltInGlobalInvocationId,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"LocalInvocationIndex",
- SpvBuiltInLocalInvocationIndex,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"WorkDim",
- SpvBuiltInWorkDim,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"GlobalSize",
- SpvBuiltInGlobalSize,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"EnqueuedWorkgroupSize",
- SpvBuiltInEnqueuedWorkgroupSize,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"GlobalOffset",
- SpvBuiltInGlobalOffset,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"GlobalLinearId",
- SpvBuiltInGlobalLinearId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"SubgroupSize",
- SpvBuiltInSubgroupSize,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"SubgroupMaxSize",
- SpvBuiltInSubgroupMaxSize,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NumSubgroups",
- SpvBuiltInNumSubgroups,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"NumEnqueuedSubgroups",
- SpvBuiltInNumEnqueuedSubgroups,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"SubgroupId",
- SpvBuiltInSubgroupId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"SubgroupLocalInvocationId",
- SpvBuiltInSubgroupLocalInvocationId,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"VertexIndex",
- SpvBuiltInVertexIndex,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"InstanceIndex",
- SpvBuiltInInstanceIndex,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t selectionControlEntries[] = {
- {"None", SpvSelectionControlMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Flatten", SpvSelectionControlFlattenMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {"DontFlatten",
- SpvSelectionControlDontFlattenMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t loopControlEntries[] = {
- {"None", SpvLoopControlMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Unroll", SpvLoopControlUnrollMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {"DontUnroll", SpvLoopControlDontUnrollMask, 0, {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t functionControlEntries[] = {
- {"None", SpvFunctionControlMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Inline", SpvFunctionControlInlineMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {"DontInline",
- SpvFunctionControlDontInlineMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"Pure", SpvFunctionControlPureMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Const", SpvFunctionControlConstMask, 0, {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t memorySemanticsEntries[] = {
- // "Relaxed" should be a synonym for "None".
- // Put the Relaxed entry first so that the disassembler
- // will prefer to emit "Relaxed".
- {"Relaxed", SpvMemorySemanticsMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"None", SpvMemorySemanticsMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"SequentiallyConsistent",
- SpvMemorySemanticsSequentiallyConsistentMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"Acquire", SpvMemorySemanticsAcquireMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Release", SpvMemorySemanticsReleaseMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {"AcquireRelease",
- SpvMemorySemanticsAcquireReleaseMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"UniformMemory",
- SpvMemorySemanticsUniformMemoryMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityShader),
- {SPV_OPERAND_TYPE_NONE}},
- {"SubgroupMemory",
- SpvMemorySemanticsSubgroupMemoryMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"WorkgroupMemory",
- SpvMemorySemanticsWorkgroupMemoryMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"CrossWorkgroupMemory",
- SpvMemorySemanticsCrossWorkgroupMemoryMask,
- 0,
- {SPV_OPERAND_TYPE_NONE}},
- {"AtomicCounterMemory",
- SpvMemorySemanticsAtomicCounterMemoryMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityAtomicStorage),
- {SPV_OPERAND_TYPE_NONE}},
- {
- "ImageMemory",
- SpvMemorySemanticsImageMemoryMask,
- 0,
- {SPV_OPERAND_TYPE_NONE},
- },
-};
-
-static const spv_operand_desc_t memoryAccessEntries[] = {
- {"None", SpvMemoryAccessMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Volatile", SpvMemoryAccessVolatileMask, 0, {SPV_OPERAND_TYPE_NONE}},
- {
- "Aligned",
- SpvMemoryAccessAlignedMask,
- 0,
- {SPV_OPERAND_TYPE_LITERAL_INTEGER, SPV_OPERAND_TYPE_NONE},
- },
- {"Nontemporal", SpvMemoryAccessNontemporalMask, 0, {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t scopeEntries[] = {
- {"CrossDevice", SpvScopeCrossDevice, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Device", SpvScopeDevice, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Workgroup", SpvScopeWorkgroup, 0, {SPV_OPERAND_TYPE_NONE}},
- {"Subgroup", SpvScopeSubgroup, 0, {SPV_OPERAND_TYPE_NONE}},
- {
- "Invocation", SpvScopeInvocation, 0, {SPV_OPERAND_TYPE_NONE},
- },
-};
-
-static const spv_operand_desc_t groupOperationEntries[] = {
- {"Reduce",
- SpvGroupOperationReduce,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"InclusiveScan",
- SpvGroupOperationInclusiveScan,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"ExclusiveScan",
- SpvGroupOperationExclusiveScan,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t kernelKernelEnqueueFlagssEntries[] = {
- {"NoWait",
- SpvKernelEnqueueFlagsNoWait,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"WaitKernel",
- SpvKernelEnqueueFlagsWaitKernel,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
- {"WaitWorkGroup",
- SpvKernelEnqueueFlagsWaitWorkGroup,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-static const spv_operand_desc_t kernelProfilingInfoEntries[] = {
- {"None", SpvKernelProfilingInfoMaskNone, 0, {SPV_OPERAND_TYPE_NONE}},
- {"CmdExecTime",
- SpvKernelProfilingInfoCmdExecTimeMask,
- SPV_CAPABILITY_AS_MASK(SpvCapabilityKernel),
- {SPV_OPERAND_TYPE_NONE}},
-};
-
-// A macro for defining a capability that doesn't depend on another capability.
-#define CASE(NAME) \
- { \
- #NAME, SpvCapability##NAME, 0, { SPV_OPERAND_TYPE_NONE } \
- }
-
-// A macro for defining a capability that depends on another.
-#define CASE_CAP(NAME, CAP) \
- { \
- #NAME, SpvCapability##NAME, SPV_CAPABILITY_AS_MASK(SpvCapability##CAP), { \
- SPV_OPERAND_TYPE_NONE \
- } \
- }
-
-// clang-format off
-static const spv_operand_desc_t capabilityInfoEntries[] = {
- CASE(Matrix),
- CASE_CAP(Shader, Matrix),
- CASE_CAP(Geometry, Shader),
- CASE_CAP(Tessellation, Shader),
- CASE(Addresses),
- CASE(Linkage),
- CASE(Kernel),
- CASE_CAP(Vector16, Kernel),
- CASE_CAP(Float16Buffer, Kernel),
- CASE(Float16),
- CASE(Float64),
- CASE(Int64),
- CASE_CAP(Int64Atomics, Int64),
- CASE_CAP(ImageBasic, Kernel),
- CASE_CAP(ImageReadWrite, ImageBasic),
- CASE_CAP(ImageMipmap, ImageBasic),
- // Value 16 intentionally missing.
- CASE_CAP(Pipes, Kernel),
- CASE(Groups),
- CASE_CAP(DeviceEnqueue, Kernel),
- CASE_CAP(LiteralSampler, Kernel),
- CASE_CAP(AtomicStorage, Shader),
- CASE(Int16),
- CASE_CAP(TessellationPointSize, Tessellation),
- CASE_CAP(GeometryPointSize, Geometry),
- CASE_CAP(ImageGatherExtended, Shader),
- // Value 26 intentionally missing.
- CASE_CAP(StorageImageMultisample, Shader),
- CASE_CAP(UniformBufferArrayDynamicIndexing, Shader),
- CASE_CAP(SampledImageArrayDynamicIndexing, Shader),
- CASE_CAP(StorageBufferArrayDynamicIndexing, Shader),
- CASE_CAP(StorageImageArrayDynamicIndexing, Shader),
- CASE_CAP(ClipDistance, Shader),
- CASE_CAP(CullDistance, Shader),
- CASE_CAP(ImageCubeArray, SampledCubeArray),
- CASE_CAP(SampleRateShading, Shader),
- CASE_CAP(ImageRect, SampledRect),
- CASE_CAP(SampledRect, Shader),
- CASE_CAP(GenericPointer, Addresses),
- CASE_CAP(Int8, Kernel),
- CASE_CAP(InputAttachment, Shader),
- CASE_CAP(SparseResidency, Shader),
- CASE_CAP(MinLod, Shader),
- CASE_CAP(Sampled1D, Shader),
- CASE_CAP(Image1D, Sampled1D),
- CASE_CAP(SampledCubeArray, Shader),
- CASE_CAP(SampledBuffer, Shader),
- CASE_CAP(ImageBuffer, SampledBuffer),
- CASE_CAP(ImageMSArray, Shader),
- CASE_CAP(StorageImageExtendedFormats, Shader),
- CASE_CAP(ImageQuery, Shader),
- CASE_CAP(DerivativeControl, Shader),
- CASE_CAP(InterpolationFunction, Shader),
- CASE_CAP(TransformFeedback, Shader),
- CASE_CAP(GeometryStreams, Geometry),
- CASE_CAP(StorageImageReadWithoutFormat, Shader),
- CASE_CAP(StorageImageWriteWithoutFormat, Shader),
- CASE_CAP(MultiViewport, Geometry),
-};
-// clang-format on
-#undef CASE
-#undef CASE_CAP
-
// Evaluates to the number of elements of array A.
// If we could use constexpr, then we could make this a template function.
// If the source arrays were std::array, then we could have used
// std::array::size.
#define ARRAY_SIZE(A) (static_cast<uint32_t>(sizeof(A) / sizeof(A[0])))
-static const spv_operand_desc_group_t opcodeEntryTypes[] = {
- // TODO(dneto): Reformat this table.
- {SPV_OPERAND_TYPE_SOURCE_LANGUAGE, ARRAY_SIZE(sourceLanguageEntries),
- sourceLanguageEntries},
- {SPV_OPERAND_TYPE_EXECUTION_MODEL, ARRAY_SIZE(executionModelEntries),
- executionModelEntries},
- {SPV_OPERAND_TYPE_ADDRESSING_MODEL, ARRAY_SIZE(addressingModelEntries),
- addressingModelEntries},
- {SPV_OPERAND_TYPE_MEMORY_MODEL, ARRAY_SIZE(memoryModelEntries),
- memoryModelEntries},
- {SPV_OPERAND_TYPE_EXECUTION_MODE, ARRAY_SIZE(executionModeEntries),
- executionModeEntries},
- {SPV_OPERAND_TYPE_STORAGE_CLASS, ARRAY_SIZE(storageClassEntries),
- storageClassEntries},
- {SPV_OPERAND_TYPE_DIMENSIONALITY, ARRAY_SIZE(dimensionalityEntries),
- dimensionalityEntries},
- {SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE,
- ARRAY_SIZE(samplerAddressingModeEntries), samplerAddressingModeEntries},
- {SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE, ARRAY_SIZE(samplerFilterModeEntries),
- samplerFilterModeEntries},
- {SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT,
- ARRAY_SIZE(samplerImageFormatEntries), samplerImageFormatEntries},
- {SPV_OPERAND_TYPE_IMAGE_CHANNEL_ORDER, ARRAY_SIZE(imageChannelOrderEntries),
- imageChannelOrderEntries},
- {SPV_OPERAND_TYPE_IMAGE_CHANNEL_DATA_TYPE,
- ARRAY_SIZE(imageChannelDataTypeEntries), imageChannelDataTypeEntries},
- {SPV_OPERAND_TYPE_IMAGE, ARRAY_SIZE(imageOperandEntries),
- imageOperandEntries},
- {SPV_OPERAND_TYPE_OPTIONAL_IMAGE, // Same as *_IMAGE
- ARRAY_SIZE(imageOperandEntries), imageOperandEntries},
- {SPV_OPERAND_TYPE_FP_FAST_MATH_MODE, ARRAY_SIZE(fpFastMathModeEntries),
- fpFastMathModeEntries},
- {SPV_OPERAND_TYPE_FP_ROUNDING_MODE, ARRAY_SIZE(fpRoundingModeEntries),
- fpRoundingModeEntries},
- {SPV_OPERAND_TYPE_LINKAGE_TYPE, ARRAY_SIZE(linkageTypeEntries),
- linkageTypeEntries},
- {SPV_OPERAND_TYPE_ACCESS_QUALIFIER, ARRAY_SIZE(accessQualifierEntries),
- accessQualifierEntries},
- {SPV_OPERAND_TYPE_OPTIONAL_ACCESS_QUALIFIER, // Same as *_ACCESS_QUALIFIER
- ARRAY_SIZE(accessQualifierEntries), accessQualifierEntries},
- {SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE,
- ARRAY_SIZE(functionParameterAttributeEntries),
- functionParameterAttributeEntries},
- {SPV_OPERAND_TYPE_DECORATION, ARRAY_SIZE(decorationEntries),
- decorationEntries},
- {SPV_OPERAND_TYPE_BUILT_IN, ARRAY_SIZE(builtInEntries), builtInEntries},
- {SPV_OPERAND_TYPE_SELECTION_CONTROL, ARRAY_SIZE(selectionControlEntries),
- selectionControlEntries},
- {SPV_OPERAND_TYPE_LOOP_CONTROL, ARRAY_SIZE(loopControlEntries),
- loopControlEntries},
- {SPV_OPERAND_TYPE_FUNCTION_CONTROL, ARRAY_SIZE(functionControlEntries),
- functionControlEntries},
- {SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID, ARRAY_SIZE(memorySemanticsEntries),
- memorySemanticsEntries},
- {SPV_OPERAND_TYPE_MEMORY_ACCESS, ARRAY_SIZE(memoryAccessEntries),
- memoryAccessEntries},
- {SPV_OPERAND_TYPE_OPTIONAL_MEMORY_ACCESS, // Same as *_MEMORY_ACCESS
- ARRAY_SIZE(memoryAccessEntries), memoryAccessEntries},
- {SPV_OPERAND_TYPE_SCOPE_ID, ARRAY_SIZE(scopeEntries), scopeEntries},
- {SPV_OPERAND_TYPE_GROUP_OPERATION, ARRAY_SIZE(groupOperationEntries),
- groupOperationEntries},
- {SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS,
- ARRAY_SIZE(kernelKernelEnqueueFlagssEntries),
- kernelKernelEnqueueFlagssEntries},
- {SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO,
- ARRAY_SIZE(kernelProfilingInfoEntries), kernelProfilingInfoEntries},
- {SPV_OPERAND_TYPE_CAPABILITY, ARRAY_SIZE(capabilityInfoEntries),
- capabilityInfoEntries},
-};
+// Pull in operand info tables automatically generated from JSON grammar.
+#include "operand.inc"
spv_result_t spvOperandTableGet(spv_operand_table* pOperandTable) {
if (!pOperandTable) return SPV_ERROR_INVALID_POINTER;
- static const spv_operand_table_t table = {ARRAY_SIZE(opcodeEntryTypes),
- opcodeEntryTypes};
+ static const spv_operand_table_t table = {
+ ARRAY_SIZE(pygen_variable_OperandInfoTable),
+ pygen_variable_OperandInfoTable};
*pOperandTable = &table;
+++ /dev/null
-//
-// Copyright (C) 2014-2016 LunarG, Inc.
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-// Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//
-// Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following
-// disclaimer in the documentation and/or other materials provided
-// with the distribution.
-//
-// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-//
-// Author: John Kessenich, LunarG
-//
-
-// The contents of this file were extracted from the SPIR-V spec-generating
-// code.
-
-#ifndef LIBSPIRV_SPIRV_OPERANDS_H_
-#define LIBSPIRV_SPIRV_OPERANDS_H_
-
-// Classify the kinds of logical operands of an instruction.
-enum OperandClass {
- OperandNone,
- OperandId,
- OperandOptionalId,
- OperandVariableIds,
- OperandOptionalLiteral,
- OperandOptionalLiteralString,
- OperandVariableLiterals,
- OperandVariableIdLiteral,
- OperandVariableLiteralId, // zero or more pairs of (Literal, Id)
- OperandLiteralNumber,
- OperandLiteralString,
- OperandSource,
- OperandExecutionModel,
- OperandAddressing,
- OperandMemory,
- OperandExecutionMode,
- OperandStorage,
- OperandDimensionality,
- OperandSamplerAddressingMode,
- OperandSamplerFilterMode,
- OperandSamplerImageFormat,
- OperandImageChannelOrder,
- OperandImageChannelDataType,
- OperandImageOperands,
- OperandOptionalImageOperands,
- OperandFPFastMath,
- OperandFPRoundingMode,
- OperandLinkageType,
- OperandAccessQualifier,
- OperandOptionalAccessQualifier,
- OperandFuncParamAttr,
- OperandDecoration,
- OperandBuiltIn,
- OperandSelect,
- OperandLoop,
- OperandFunction,
- OperandMemorySemantics,
- OperandMemoryAccess,
- OperandOptionalMemoryAccess,
- OperandScope,
- OperandGroupOperation,
- OperandKernelEnqueueFlags,
- OperandKernelProfilingInfo,
- OperandCapability,
-
- OperandOpcode,
-
- OperandCount
-};
-
-#endif // LIBSPIRV_SPIRV_OPERANDS_H_
return new spv_context_t{opcode_table, operand_table, ext_inst_table};
}
-void spvContextDestroy(spv_context context) {
- ::free(context->opcode_table->entries);
- delete context->opcode_table;
- delete context;
-}
+void spvContextDestroy(spv_context context) { delete context; }
#include "spirv-tools/libspirv.h"
#include "spirv_definition.h"
-#include "spirv_operands.h"
typedef struct spv_opcode_desc_t {
const char* name;
spv_operand_type_t operandTypes[16]; // TODO: Smaller/larger?
const bool hasResult; // Does the instruction have a result ID operand?
const bool hasType; // Does the instruction have a type ID operand?
- // The operand class for each logical argument. This does *not* include
- // the result Id or type ID. The list is terminated by SPV_OPERAND_TYPE_NONE.
- const OperandClass operandClass[16];
} spv_opcode_desc_t;
typedef struct spv_operand_desc_t {
typedef struct spv_opcode_table_t {
const uint32_t count;
- spv_opcode_desc_t* entries;
+ const spv_opcode_desc_t* entries;
} spv_opcode_table_t;
typedef struct spv_operand_table_t {
0,
{},
false,
- false,
- {}}) {}
+ false}) {}
virtual void SetUp() {}
SpvCapabilityClipDistance,
// Transformfeedback has value 53,
// and is the last capability.
- SpvCapabilityTransformFeedback),);
+ SpvCapabilityTransformFeedback), );
TEST(OpcodeRequiresCapability, None) {
- spv_opcode_desc_t entry = {nullptr, (SpvOp)0, 0, 0, {}, false, false, {}};
+ spv_opcode_desc_t entry = {nullptr, (SpvOp)0, 0, 0, {}, false, false};
ASSERT_EQ(0, spvOpcodeRequiresCapabilities(&entry));
}
ExpectedOpCodeCapabilities{SpvOpFunction, 0},
ExpectedOpCodeCapabilities{SpvOpConvertFToS, 0},
ExpectedOpCodeCapabilities{SpvOpEmitStreamVertex,
- mask(SpvCapabilityGeometryStreams)}),);
+ mask(SpvCapabilityGeometryStreams)}), );
} // anonymous namespace
--- /dev/null
+#!/usr/bin/env python
+"""Generates various info tables from SPIR-V JSON grammar."""
+
+from __future__ import print_function
+
+import functools
+import json
+import re
+
+# Prefix for all C variables generated by this script.
+PYGEN_VARIABLE_PREFIX = 'pygen_variable'
+
+CAPABILITY_BIT_MAPPING = {}
+
+
+def populate_capability_bit_mapping_dict(cap_dict):
+ """Populates CAPABILITY_BIT_MAPPING.
+
+ Arguments:
+ - cap_dict: a dict containing all capability names and values
+ """
+ assert cap_dict['category'] == 'ValueEnum'
+ assert cap_dict['kind'] == 'Capability'
+ for enumerant in cap_dict['enumerants']:
+ CAPABILITY_BIT_MAPPING[enumerant['enumerant']] = enumerant['value']
+
+
+def compose_capability_mask(caps):
+ """Returns a bit mask for a sequence of capabilities
+
+ Arguments:
+ - caps: a sequence of capability names
+
+ Returns:
+ a string containing the hexadecimal value of the bit mask
+ """
+ assert len(CAPABILITY_BIT_MAPPING) != 0
+ bits = [CAPABILITY_BIT_MAPPING[c] for c in caps]
+ caps_mask = functools.reduce(lambda m, b: m | (1 << b), bits, 0)
+ return '0x{:04x}'.format(caps_mask)
+
+
+def convert_operand_kind(operand_tuple):
+ """Returns the corresponding operand type used in spirv-tools for
+ the given operand kind and quantifier used in the JSON grammar.
+
+ Arguments:
+ - operand_tuple: a tuple of two elements:
+ - operand kind: used in the JSON grammar
+ - quantifier: '', '?', or '*'
+
+ Returns:
+ a string of the enumerant name in spv_operand_type_t
+ """
+ kind, quantifier = operand_tuple
+ # The following cases are where we differ between the JSON grammar and
+ # spirv-tools.
+ if kind == 'IdType':
+ kind = 'TypeId'
+ elif kind == 'IdResult':
+ kind = 'ResultId'
+ elif kind == 'IdMemorySemantics':
+ kind = 'MemorySemanticsId'
+ elif kind == 'IdScope':
+ kind = 'ScopeId'
+ elif kind == 'IdRef':
+ kind = 'Id'
+
+ elif kind == 'ImageOperands':
+ kind = 'Image'
+ elif kind == 'Dim':
+ kind = 'Dimensionality'
+ elif kind == 'ImageFormat':
+ kind = 'SamplerImageFormat'
+ elif kind == 'KernelEnqueueFlags':
+ kind = 'KernelEnqFlags'
+
+ elif kind == 'LiteralExtInstInteger':
+ kind = 'ExtensionInstructionNumber'
+ elif kind == 'LiteralSpecConstantOpInteger':
+ kind = 'SpecConstantOpNumber'
+ elif kind == 'LiteralContextDependentNumber':
+ kind = 'TypedLiteralNumber'
+
+ elif kind == 'PairLiteralIntegerIdRef':
+ kind = 'LiteralIntegerId'
+ elif kind == 'PairIdRefLiteralInteger':
+ kind = 'IdLiteralInteger'
+
+ if kind == 'FPRoundingMode':
+ kind = 'FpRoundingMode'
+ elif kind == 'FPFastMathMode':
+ kind = 'FpFastMathMode'
+
+ if quantifier == '?':
+ kind = 'Optional{}'.format(kind)
+ elif quantifier == '*':
+ kind = 'Variable{}'.format(kind)
+
+ return 'SPV_OPERAND_TYPE_{}'.format(
+ re.sub(r'([a-z])([A-Z])', r'\1_\2', kind).upper())
+
+
+class InstInitializer(object):
+ """Prints a SPIR-V instruction as the initializer for spv_opcode_desc_t."""
+
+ def __init__(self, opname, caps, operands):
+ """Initialization.
+
+ Arguments:
+ - opname: opcode name (with the 'Op' prefix)
+ - caps: a sequence of capability names required by this opcode
+ - operands: a sequence of (operand-kind, operand-quantifier) tuples
+ """
+ assert opname.startswith('Op')
+ self.opname = opname[2:] # Remove the "Op" prefix.
+ self.caps_mask = compose_capability_mask(caps)
+ self.operands = [convert_operand_kind(o) for o in operands]
+
+ operands = [o[0] for o in operands]
+ self.ref_type_id = 'IdType' in operands
+ self.def_result_id = 'IdResult' in operands
+
+ def __str__(self):
+ template = ['{{"{opname}"', 'SpvOp{opname}', '{caps_mask}',
+ '{num_operands}', '{{{operands}}}',
+ '{def_result_id}', '{ref_type_id}}}']
+ return ', '.join(template).format(
+ opname=self.opname,
+ caps_mask=self.caps_mask,
+ num_operands=len(self.operands),
+ operands=', '.join(self.operands),
+ def_result_id=(1 if self.def_result_id else 0),
+ ref_type_id=(1 if self.ref_type_id else 0))
+
+
+def generate_instruction(inst):
+ """Returns the C initializer for the given SPIR-V instruction.
+
+ Arguments:
+ - inst: a dict containing information about a SPIR-V instruction
+
+ Returns:
+ a string containing the C initializer for spv_opcode_desc_t
+ """
+ opname = inst.get('opname')
+ caps = inst.get('capabilities', [])
+ operands = inst.get('operands', {})
+ operands = [(o['kind'], o.get('quantifier', '')) for o in operands]
+
+ assert opname is not None
+
+ return str(InstInitializer(opname, caps, operands))
+
+
+def generate_instruction_table(inst_table):
+ """Returns the info table containing all SPIR-V instructions.
+
+ Arguments:
+ - inst_table: a dict containing all SPIR-V instructions.
+ """
+ return ',\n'.join([generate_instruction(inst) for inst in inst_table])
+
+
+class EnumerantInitializer(object):
+ """Prints an enumerant as the initializer for spv_operand_desc_t."""
+
+ def __init__(self, enumerant, value, caps, parameters):
+ """Initialization.
+
+ Arguments:
+ - enumerant: enumerant name
+ - value: enumerant value
+ - caps: a sequence of capability names required by this enumerant
+ - parameters: a sequence of (operand-kind, operand-quantifier) tuples
+ """
+ self.enumerant = enumerant
+ self.value = value
+ self.caps_mask = compose_capability_mask(caps)
+ self.parameters = [convert_operand_kind(p) for p in parameters]
+
+ def __str__(self):
+ template = ['{{"{enumerant}"', '{value}',
+ '{caps_mask}', '{{{parameters}}}}}']
+ return ', '.join(template).format(
+ enumerant=self.enumerant,
+ value=self.value,
+ caps_mask=self.caps_mask,
+ parameters=', '.join(self.parameters))
+
+
+def generate_enum_operand_kind_entry(entry):
+ """Returns the C initializer for the given operand enum entry.
+
+ Arguments:
+ - entry: a dict containing information about an enum entry
+
+ Returns:
+ a string containing the C initializer for spv_operand_desc_t
+ """
+ enumerant = entry.get('enumerant')
+ value = entry.get('value')
+ caps = entry.get('capabilities', [])
+ params = entry.get('parameters', [])
+ params = [p.get('kind') for p in params]
+ params = zip(params, [''] * len(params))
+
+ assert enumerant is not None
+ assert value is not None
+
+ return str(EnumerantInitializer(enumerant, value, caps, params))
+
+
+def generate_enum_operand_kind(enum):
+ """Returns the C definition for the given operand kind."""
+ kind = enum.get('kind')
+ assert kind is not None
+
+ name = '{}_{}Entries'.format(PYGEN_VARIABLE_PREFIX, kind)
+ entries = [' {}'.format(generate_enum_operand_kind_entry(e))
+ for e in enum.get('enumerants', [])]
+
+ template = ['static const spv_operand_desc_t {name}[] = {{',
+ '{entries}', '}};']
+ entries = '\n'.join(template).format(
+ name=name,
+ entries=',\n'.join(entries))
+
+ return kind, name, entries
+
+
+def generate_operand_kind_table(enums):
+ """Returns the info table containing all SPIR-V operand kinds."""
+ # We only need to output info tables for those operand kinds that are enums.
+ enums = [generate_enum_operand_kind(e)
+ for e in enums
+ if e.get('category') in ['ValueEnum', 'BitEnum']]
+ # We have three operand kinds that requires their optional counterpart to
+ # exist in the operand info table.
+ three_optional_enums = ['ImageOperands', 'AccessQualifier', 'MemoryAccess']
+ three_optional_enums = [e for e in enums if e[0] in three_optional_enums]
+ enums.extend(three_optional_enums)
+
+ enum_kinds, enum_names, enum_entries = zip(*enums)
+ # Mark the last three as optional ones.
+ enum_quantifiers = [''] * (len(enums) - 3) + ['?'] * 3
+ # And we don't want redefinition of them.
+ enum_entries = enum_entries[:-3]
+ enum_kinds = [convert_operand_kind(e)
+ for e in zip(enum_kinds, enum_quantifiers)]
+ table_entries = zip(enum_kinds, enum_names, enum_names)
+ table_entries = [' {{{}, ARRAY_SIZE({}), {}}}'.format(*e)
+ for e in table_entries]
+
+ template = [
+ 'static const spv_operand_desc_group_t {p}_OperandInfoTable[] = {{',
+ '{enums}', '}};']
+ table = '\n'.join(template).format(
+ p=PYGEN_VARIABLE_PREFIX, enums=',\n'.join(table_entries))
+
+ return '\n\n'.join(enum_entries + (table,))
+
+
+def main():
+ import argparse
+ parser = argparse.ArgumentParser(description='Generate SPIR-V info tables')
+ parser.add_argument('grammar', metavar='<json-grammar-path>', type=str,
+ help='input JSON file path for SPIR-V grammar')
+ parser.add_argument('--opcode-file', dest='opcode', metavar='<path>',
+ type=str, required=True,
+ help='output file path for SPIR-V instructions')
+ parser.add_argument('--operand-file', dest='operand', metavar='<path>',
+ type=str, required=True,
+ help='output file path for SPIR-V operands')
+ args = parser.parse_args()
+
+ with open(args.grammar) as json_file:
+ grammar = json.loads(json_file.read())
+
+ # Get the dict for the Capability operand kind.
+ cap_dict = [o for o in grammar['operand_kinds']
+ if o['kind'] == 'Capability']
+ assert len(cap_dict) == 1
+ populate_capability_bit_mapping_dict(cap_dict[0])
+
+ print(generate_instruction_table(grammar['instructions']),
+ file=open(args.opcode, 'w'))
+ print(generate_operand_kind_table(grammar['operand_kinds']),
+ file=open(args.operand, 'w'))
+
+if __name__ == '__main__':
+ main()