Update SPIR-V headers and allow OpExtInstWithForwardRefsKHR

* For our purposes we can trivially treat this as equal to OpExtInst since we
  mostly don't care about forward references and don't use the debug information
  where forward references are likely to be generated (class member function
  type information).
This commit is contained in:
baldurk
2024-06-24 12:10:51 +01:00
parent b6bc8fe80f
commit 217d52da2a
11 changed files with 526 additions and 134 deletions
+9 -7
View File
@@ -92,7 +92,9 @@
<id value="39" vendor="SirLynix" tool="Nazara ShaderLang Compiler" comment="Contact Jérôme Leclercq, https://github.com/NazaraEngine/ShaderLang"/>
<id value="40" vendor="NVIDIA" tool="Slang Compiler" comment="Contact Theresa Foley, tfoley@nvidia.com, https://github.com/shader-slang/slang/"/>
<id value="41" vendor="Zig Software Foundation" tool="Zig Compiler" comment="Contact Robin Voetter, https://github.com/Snektron"/>
<unused start="42" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
<id value="42" vendor="Rendong Liang" tool="spq" comment="Contact Rendong Liang, admin@penguinliong.moe, https://github.com/PENGUINLIONG/spq-rs"/>
<id value="43" vendor="LLVM" tool="LLVM SPIR-V Backend" comment="Contact Michal Paszkowski, michal.paszkowski@intel.com, https://github.com/llvm/llvm-project/tree/main/llvm/lib/Target/SPIRV"/>
<unused start="44" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
</ids>
<!-- SECTION: SPIR-V Opcodes and Enumerants -->
@@ -155,7 +157,7 @@
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
<ids type="opcode" start="6656" end="65535" comment="Opcode range reservable for future use by vendors"/>
<ids type="opcode" start="6720" end="65535" comment="Opcode range reservable for future use by vendors"/>
<!-- End reservations of opcodes -->
@@ -188,7 +190,7 @@
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="enumerant" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
<ids type="enumerant" start="6656" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
<ids type="enumerant" start="6720" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
<!-- End reservations of enumerants -->
@@ -208,8 +210,8 @@
<!-- Reserved loop control bits -->
<ids type="LoopControl" start="0" end="15" vendor="Khronos" comment="Reserved LoopControl bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="LoopControl" start="16" end="25" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="LoopControl" start="26" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="LoopControl" start="16" end="27" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="LoopControl" start="28" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="LoopControl" start="31" end="31" vendor="Khronos" comment="Reserved LoopControl bit, not available to vendors"/>
@@ -269,8 +271,8 @@
<!-- Reserved memory operand bits -->
<ids type="MemoryOperand" start="0" end="15" vendor="Khronos" comment="Reserved MemoryOperand bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="MemoryOperand" start="16" end="17" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="MemoryOperand" start="18" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="MemoryOperand" start="16" end="18" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="MemoryOperand" start="19" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="MemoryOperand" start="31" end="31" vendor="Khronos" comment="Reserved MemoryOperand bit, not available to vendors"/>
<!-- SECTION: SPIR-V Image Operand Bit Reservations -->
@@ -4539,6 +4539,20 @@
"extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "None"
},
{
"opname" : "OpExtInstWithForwardRefsKHR",
"class" : "Extension",
"opcode" : 4433,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Set'" },
{ "kind" : "LiteralExtInstInteger", "name" : "'Instruction'" },
{ "kind" : "IdRef", "quantifier" : "*", "name" : "'Operand 1', +\n'Operand 2', +\n..." }
],
"extensions" : [ "SPV_KHR_relaxed_extended_instruction" ],
"version": "None"
},
{
"opname" : "OpTraceRayKHR",
"class" : "Reserved",
@@ -4854,6 +4868,42 @@
"capabilities" : [ "CooperativeMatrixKHR" ],
"version" : "None"
},
{
"opname" : "OpConstantCompositeReplicateEXT",
"class" : "Constant-Creation",
"opcode" : 4461,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Value'" }
],
"capabilities" : [ "ReplicatedCompositesEXT" ],
"version" : "None"
},
{
"opname" : "OpSpecConstantCompositeReplicateEXT",
"class" : "Constant-Creation",
"opcode" : 4462,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Value'" }
],
"capabilities" : [ "ReplicatedCompositesEXT" ],
"version" : "None"
},
{
"opname" : "OpCompositeConstructReplicateEXT",
"class" : "Composite",
"opcode" : 4463,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Value'" }
],
"capabilities" : [ "ReplicatedCompositesEXT" ],
"version" : "None"
},
{
"opname" : "OpTypeRayQueryKHR",
"class" : "Type-Declaration",
@@ -5888,7 +5938,7 @@
"version" : "None"
},
{
"opname" : "OpReportIntersectionNV",
"opname" : "OpReportIntersectionKHR",
"class" : "Reserved",
"opcode" : 5334,
"operands" : [
@@ -5902,7 +5952,7 @@
"version" : "None"
},
{
"opname" : "OpReportIntersectionKHR",
"opname" : "OpReportIntersectionNV",
"class" : "Reserved",
"opcode" : 5334,
"operands" : [
@@ -6019,7 +6069,7 @@
"version" : "None"
},
{
"opname" : "OpTypeAccelerationStructureNV",
"opname" : "OpTypeAccelerationStructureKHR",
"class" : "Type-Declaration",
"opcode" : 5341,
"operands" : [
@@ -6030,7 +6080,7 @@
"version" : "None"
},
{
"opname" : "OpTypeAccelerationStructureKHR",
"opname" : "OpTypeAccelerationStructureNV",
"class" : "Type-Declaration",
"opcode" : 5341,
"operands" : [
@@ -6251,6 +6301,24 @@
"capabilities" : [ "BindlessTextureNV" ],
"version" : "None"
},
{
"opname" : "OpRawAccessChainNV",
"class" : "Memory",
"opcode" : 5398,
"operands" : [
{ "kind" : "IdResultType" },
{ "kind" : "IdResult" },
{ "kind" : "IdRef", "name" : "'Base'" },
{ "kind" : "IdRef", "name" : "'Byte stride'" },
{ "kind" : "IdRef", "name" : "'Element index'" },
{ "kind" : "IdRef", "name" : "'Byte offset'" },
{ "kind" : "RawAccessChainOperands", "quantifier" : "?" }
],
"capabilities" : [
"RawAccessChainsNV"
],
"version" : "None"
},
{
"opname" : "OpSubgroupShuffleINTEL",
"class" : "Group",
@@ -10667,6 +10735,28 @@
}
]
},
{
"category" : "BitEnum",
"kind" : "RawAccessChainOperands",
"enumerants" : [
{
"enumerant" : "None",
"value" : "0x0000"
},
{
"enumerant" : "RobustnessPerComponentNV",
"value" : "0x0001",
"capabilities" : [ "RawAccessChainsNV" ],
"version" : "None"
},
{
"enumerant" : "RobustnessPerElementNV",
"value" : "0x0002",
"capabilities" : [ "RawAccessChainsNV" ],
"version" : "None"
}
]
},
{
"category" : "ValueEnum",
"kind" : "SourceLanguage",
@@ -10796,12 +10886,6 @@
"capabilities" : [ "MeshShadingNV" ],
"version" : "None"
},
{
"enumerant" : "RayGenerationNV",
"value" : 5313,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
{
"enumerant" : "RayGenerationKHR",
"value" : 5313,
@@ -10809,8 +10893,8 @@
"version" : "None"
},
{
"enumerant" : "IntersectionNV",
"value" : 5314,
"enumerant" : "RayGenerationNV",
"value" : 5313,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
@@ -10821,8 +10905,8 @@
"version" : "None"
},
{
"enumerant" : "AnyHitNV",
"value" : 5315,
"enumerant" : "IntersectionNV",
"value" : 5314,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
@@ -10833,8 +10917,8 @@
"version" : "None"
},
{
"enumerant" : "ClosestHitNV",
"value" : 5316,
"enumerant" : "AnyHitNV",
"value" : 5315,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
@@ -10845,8 +10929,8 @@
"version" : "None"
},
{
"enumerant" : "MissNV",
"value" : 5317,
"enumerant" : "ClosestHitNV",
"value" : 5316,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
@@ -10857,8 +10941,8 @@
"version" : "None"
},
{
"enumerant" : "CallableNV",
"value" : 5318,
"enumerant" : "MissNV",
"value" : 5317,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
@@ -10868,6 +10952,12 @@
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
{
"enumerant" : "CallableNV",
"value" : 5318,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
{
"enumerant" : "TaskEXT",
"value" : 5364,
@@ -11420,13 +11510,6 @@
"capabilities" : [ "QuadControlKHR" ],
"version" : "None"
},
{
"enumerant" : "OutputLinesNV",
"value" : 5269,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ],
"version" : "None"
},
{
"enumerant" : "OutputLinesEXT",
"value" : 5269,
@@ -11435,7 +11518,14 @@
"version" : "None"
},
{
"enumerant" : "OutputPrimitivesNV",
"enumerant" : "OutputLinesNV",
"value" : 5269,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ],
"version" : "None"
},
{
"enumerant" : "OutputPrimitivesEXT",
"value" : 5270,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"parameters" : [
@@ -11445,7 +11535,7 @@
"version" : "None"
},
{
"enumerant" : "OutputPrimitivesEXT",
"enumerant" : "OutputPrimitivesNV",
"value" : 5270,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"parameters" : [
@@ -11469,14 +11559,14 @@
"version" : "None"
},
{
"enumerant" : "OutputTrianglesNV",
"enumerant" : "OutputTrianglesEXT",
"value" : 5298,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ],
"version" : "None"
},
{
"enumerant" : "OutputTrianglesEXT",
"enumerant" : "OutputTrianglesNV",
"value" : 5298,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ],
@@ -11788,13 +11878,6 @@
"capabilities" : [ "ShaderEnqueueAMDX" ],
"version" : "None"
},
{
"enumerant" : "CallableDataNV",
"value" : 5328,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
{
"enumerant" : "CallableDataKHR",
"value" : 5328,
@@ -11803,8 +11886,8 @@
"version" : "None"
},
{
"enumerant" : "IncomingCallableDataNV",
"value" : 5329,
"enumerant" : "CallableDataNV",
"value" : 5328,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
@@ -11817,8 +11900,8 @@
"version" : "None"
},
{
"enumerant" : "RayPayloadNV",
"value" : 5338,
"enumerant" : "IncomingCallableDataNV",
"value" : 5329,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
@@ -11831,8 +11914,8 @@
"version" : "None"
},
{
"enumerant" : "HitAttributeNV",
"value" : 5339,
"enumerant" : "RayPayloadNV",
"value" : 5338,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
@@ -11845,8 +11928,8 @@
"version" : "None"
},
{
"enumerant" : "IncomingRayPayloadNV",
"value" : 5342,
"enumerant" : "HitAttributeNV",
"value" : 5339,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
@@ -11859,8 +11942,8 @@
"version" : "None"
},
{
"enumerant" : "ShaderRecordBufferNV",
"value" : 5343,
"enumerant" : "IncomingRayPayloadNV",
"value" : 5342,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
@@ -11872,6 +11955,13 @@
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
{
"enumerant" : "ShaderRecordBufferNV",
"value" : 5343,
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"version" : "None"
},
{
"enumerant" : "PhysicalStorageBuffer",
"value" : 5349,
@@ -13223,14 +13313,14 @@
]
},
{
"enumerant" : "PerPrimitiveNV",
"enumerant" : "PerPrimitiveEXT",
"value" : 5271,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ],
"version" : "None"
},
{
"enumerant" : "PerPrimitiveEXT",
"enumerant" : "PerPrimitiveNV",
"value" : 5271,
"capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ],
"extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ],
@@ -14529,13 +14619,6 @@
"extensions" : [ "SPV_EXT_mesh_shader" ],
"version" : "None"
},
{
"enumerant" : "LaunchIdNV",
"value" : 5319,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "LaunchIdKHR",
"value" : 5319,
@@ -14544,8 +14627,8 @@
"version" : "None"
},
{
"enumerant" : "LaunchSizeNV",
"value" : 5320,
"enumerant" : "LaunchIdNV",
"value" : 5319,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14558,8 +14641,8 @@
"version" : "None"
},
{
"enumerant" : "WorldRayOriginNV",
"value" : 5321,
"enumerant" : "LaunchSizeNV",
"value" : 5320,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14572,8 +14655,8 @@
"version" : "None"
},
{
"enumerant" : "WorldRayDirectionNV",
"value" : 5322,
"enumerant" : "WorldRayOriginNV",
"value" : 5321,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14586,8 +14669,8 @@
"version" : "None"
},
{
"enumerant" : "ObjectRayOriginNV",
"value" : 5323,
"enumerant" : "WorldRayDirectionNV",
"value" : 5322,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14600,8 +14683,8 @@
"version" : "None"
},
{
"enumerant" : "ObjectRayDirectionNV",
"value" : 5324,
"enumerant" : "ObjectRayOriginNV",
"value" : 5323,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14614,8 +14697,8 @@
"version" : "None"
},
{
"enumerant" : "RayTminNV",
"value" : 5325,
"enumerant" : "ObjectRayDirectionNV",
"value" : 5324,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14628,8 +14711,8 @@
"version" : "None"
},
{
"enumerant" : "RayTmaxNV",
"value" : 5326,
"enumerant" : "RayTminNV",
"value" : 5325,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14642,8 +14725,8 @@
"version" : "None"
},
{
"enumerant" : "InstanceCustomIndexNV",
"value" : 5327,
"enumerant" : "RayTmaxNV",
"value" : 5326,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14656,8 +14739,8 @@
"version" : "None"
},
{
"enumerant" : "ObjectToWorldNV",
"value" : 5330,
"enumerant" : "InstanceCustomIndexNV",
"value" : 5327,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14670,8 +14753,8 @@
"version" : "None"
},
{
"enumerant" : "WorldToObjectNV",
"value" : 5331,
"enumerant" : "ObjectToWorldNV",
"value" : 5330,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
@@ -14683,6 +14766,13 @@
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "WorldToObjectNV",
"value" : 5331,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "HitTNV",
"value" : 5332,
@@ -14691,14 +14781,14 @@
"version" : "None"
},
{
"enumerant" : "HitKindNV",
"enumerant" : "HitKindKHR",
"value" : 5333,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "HitKindKHR",
"enumerant" : "HitKindNV",
"value" : 5333,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
@@ -14730,14 +14820,14 @@
"version" : "None"
},
{
"enumerant" : "IncomingRayFlagsNV",
"enumerant" : "IncomingRayFlagsKHR",
"value" : 5351,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "IncomingRayFlagsKHR",
"enumerant" : "IncomingRayFlagsNV",
"value" : 5351,
"capabilities" : [ "RayTracingNV" , "RayTracingKHR" ],
"extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
@@ -15356,6 +15446,12 @@
"extensions" : [ "SPV_EXT_shader_tile_image" ],
"version" : "None"
},
{
"enumerant" : "CooperativeMatrixLayoutsARM",
"value" : 4201,
"extensions" : [ "SPV_ARM_cooperative_matrix_layouts" ],
"version" : "None"
},
{
"enumerant" : "FragmentShadingRateKHR",
"value" : 4422,
@@ -16083,6 +16179,12 @@
"extensions" : [ "SPV_NV_displacement_micromap" ],
"version" : "None"
},
{
"enumerant" : "RawAccessChainsNV",
"value" : 5414,
"extensions" : [ "SPV_NV_raw_access_chains" ],
"version" : "None"
},
{
"enumerant" : "SubgroupShuffleINTEL",
"value" : 5568,
@@ -16396,6 +16498,12 @@
"extensions" : [ "SPV_KHR_cooperative_matrix" ],
"version" : "None"
},
{
"enumerant" : "ReplicatedCompositesEXT",
"value" : 6024,
"extensions" : [ "SPV_EXT_replicated_composites" ],
"version" : "None"
},
{
"enumerant" : "BitInstructions",
"value" : 6025,
@@ -16659,6 +16767,16 @@
"enumerant" : "ColumnMajorKHR",
"value" : 1,
"version" : "None"
},
{
"enumerant" : "RowBlockedInterleavedARM",
"value" : 4202,
"version" : "None"
},
{
"enumerant" : "ColumnBlockedInterleavedARM",
"value" : 4203,
"version" : "None"
}
]
},
@@ -587,7 +587,7 @@ void ThreadState::SkipIgnoredInstructions()
continue;
}
if(op == Op::ExtInst)
if(op == Op::ExtInst || op == Op::ExtInstWithForwardRefsKHR)
{
if(debugger.IsDebugExtInstSet(Id::fromWord(it.word(3))))
{
@@ -1369,6 +1369,7 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
//////////////////////////////////////////////////////////////////////////////
case Op::ExtInst:
case Op::ExtInstWithForwardRefsKHR:
{
Id result = Id::fromWord(it.word(2));
Id extinst = Id::fromWord(it.word(3));
@@ -3812,6 +3813,10 @@ void ThreadState::StepNext(ShaderDebugState *state, const rdcarray<ThreadState>
case Op::CompositeConstructContinuedINTEL:
case Op::MaskedGatherINTEL:
case Op::MaskedScatterINTEL:
case Op::CompositeConstructReplicateEXT:
case Op::ConstantCompositeReplicateEXT:
case Op::SpecConstantCompositeReplicateEXT:
case Op::RawAccessChainNV:
{
RDCERR("Unsupported extension opcode used %s", ToStr(opdata.op).c_str());
@@ -436,6 +436,7 @@ void Reflector::CheckDebuggable(bool &debuggable, rdcstr &debugStatus) const
"SPV_EXT_shader_image_int64",
"SPV_GOOGLE_user_type",
"SPV_KHR_physical_storage_buffer",
"SPV_KHR_relaxed_extended_instruction",
};
// whitelist supported extensions
@@ -758,6 +759,9 @@ void Reflector::CheckDebuggable(bool &debuggable, rdcstr &debugStatus) const
case Capability::CacheControlsINTEL:
case Capability::RegisterLimitsINTEL:
case Capability::GlobalVariableHostAccessINTEL:
case Capability::CooperativeMatrixLayoutsARM:
case Capability::RawAccessChainsNV:
case Capability::ReplicatedCompositesEXT:
case Capability::Max:
case Capability::Invalid:
{
@@ -3838,7 +3842,7 @@ void Debugger::RegisterOp(Iter it)
const uint32_t curInstIndex = (uint32_t)instructionOffsets.size();
if(opdata.op == Op::ExtInst)
if(opdata.op == Op::ExtInst || opdata.op == Op::ExtInstWithForwardRefsKHR)
{
OpExtInst extinst(it);
@@ -1563,6 +1563,7 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
}
case Op::ExtInst:
case Op::ExtInstWithForwardRefsKHR:
{
OpExtInst decoded(it);
+107 -2
View File
@@ -257,6 +257,19 @@ rdcstr DoStringise(const rdcspv::FragmentShadingRate &el)
END_BITFIELD_STRINGISE();
}
template <>
rdcstr DoStringise(const rdcspv::RawAccessChainOperands &el)
{
BEGIN_BITFIELD_STRINGISE(rdcspv::RawAccessChainOperands);
{
STRINGISE_BITFIELD_CLASS_VALUE(None);
STRINGISE_BITFIELD_CLASS_BIT(RobustnessPerComponentNV);
STRINGISE_BITFIELD_CLASS_BIT(RobustnessPerElementNV);
}
END_BITFIELD_STRINGISE();
}
template <>
rdcstr DoStringise(const rdcspv::SourceLanguage &el)
{
@@ -1131,6 +1144,7 @@ rdcstr DoStringise(const rdcspv::Capability &el)
STRINGISE_ENUM_CLASS(TileImageColorReadAccessEXT);
STRINGISE_ENUM_CLASS(TileImageDepthReadAccessEXT);
STRINGISE_ENUM_CLASS(TileImageStencilReadAccessEXT);
STRINGISE_ENUM_CLASS(CooperativeMatrixLayoutsARM);
STRINGISE_ENUM_CLASS(FragmentShadingRateKHR);
STRINGISE_ENUM_CLASS(SubgroupBallotKHR);
STRINGISE_ENUM_CLASS(DrawParameters);
@@ -1217,6 +1231,7 @@ rdcstr DoStringise(const rdcspv::Capability &el)
STRINGISE_ENUM_CLASS(RayQueryPositionFetchKHR);
STRINGISE_ENUM_CLASS(AtomicFloat16VectorNV);
STRINGISE_ENUM_CLASS(RayTracingDisplacementMicromapNV);
STRINGISE_ENUM_CLASS(RawAccessChainsNV);
STRINGISE_ENUM_CLASS(SubgroupShuffleINTEL);
STRINGISE_ENUM_CLASS(SubgroupBufferBlockIOINTEL);
STRINGISE_ENUM_CLASS(SubgroupImageBlockIOINTEL);
@@ -1265,6 +1280,7 @@ rdcstr DoStringise(const rdcspv::Capability &el)
STRINGISE_ENUM_CLASS(DotProduct);
STRINGISE_ENUM_CLASS(RayCullMaskKHR);
STRINGISE_ENUM_CLASS(CooperativeMatrixKHR);
STRINGISE_ENUM_CLASS(ReplicatedCompositesEXT);
STRINGISE_ENUM_CLASS(BitInstructions);
STRINGISE_ENUM_CLASS(GroupNonUniformRotateKHR);
STRINGISE_ENUM_CLASS(FloatControls2);
@@ -1358,6 +1374,8 @@ rdcstr DoStringise(const rdcspv::CooperativeMatrixLayout &el)
{
STRINGISE_ENUM_CLASS(RowMajorKHR);
STRINGISE_ENUM_CLASS(ColumnMajorKHR);
STRINGISE_ENUM_CLASS(RowBlockedInterleavedARM);
STRINGISE_ENUM_CLASS(ColumnBlockedInterleavedARM);
}
END_ENUM_STRINGISE();
}
@@ -1782,6 +1800,7 @@ rdcstr DoStringise(const rdcspv::Op &el)
STRINGISE_ENUM_CLASS(SubgroupAllEqualKHR);
STRINGISE_ENUM_CLASS(GroupNonUniformRotateKHR);
STRINGISE_ENUM_CLASS(SubgroupReadInvocationKHR);
STRINGISE_ENUM_CLASS(ExtInstWithForwardRefsKHR);
STRINGISE_ENUM_CLASS(TraceRayKHR);
STRINGISE_ENUM_CLASS(ExecuteCallableKHR);
STRINGISE_ENUM_CLASS(ConvertUToAccelerationStructureKHR);
@@ -1798,6 +1817,9 @@ rdcstr DoStringise(const rdcspv::Op &el)
STRINGISE_ENUM_CLASS(CooperativeMatrixStoreKHR);
STRINGISE_ENUM_CLASS(CooperativeMatrixMulAddKHR);
STRINGISE_ENUM_CLASS(CooperativeMatrixLengthKHR);
STRINGISE_ENUM_CLASS(ConstantCompositeReplicateEXT);
STRINGISE_ENUM_CLASS(SpecConstantCompositeReplicateEXT);
STRINGISE_ENUM_CLASS(CompositeConstructReplicateEXT);
STRINGISE_ENUM_CLASS(TypeRayQueryKHR);
STRINGISE_ENUM_CLASS(RayQueryInitializeKHR);
STRINGISE_ENUM_CLASS(RayQueryTerminateKHR);
@@ -1894,6 +1916,7 @@ rdcstr DoStringise(const rdcspv::Op &el)
STRINGISE_ENUM_CLASS(ConvertUToSampledImageNV);
STRINGISE_ENUM_CLASS(ConvertSampledImageToUNV);
STRINGISE_ENUM_CLASS(SamplerImageAddressingModeNV);
STRINGISE_ENUM_CLASS(RawAccessChainNV);
STRINGISE_ENUM_CLASS(SubgroupShuffleINTEL);
STRINGISE_ENUM_CLASS(SubgroupShuffleDownINTEL);
STRINGISE_ENUM_CLASS(SubgroupShuffleUpINTEL);
@@ -2172,8 +2195,8 @@ rdcstr ParamToStr(const std::function<rdcstr(rdcspv::Id)> &idName, const rdcspv:
ret += "(" + idName(el.shaderIndexAMDX) + ")"; break;
case ExecutionMode::MaxNumWorkgroupsAMDX:
ret += "(" + idName(el.maxNumWorkgroupsAMDX.xsize) + ", " + idName(el.maxNumWorkgroupsAMDX.ysize) + ", " + idName(el.maxNumWorkgroupsAMDX.zsize) + ")"; break;
case ExecutionMode::OutputPrimitivesNV:
ret += "(" + ToStr(el.outputPrimitivesNV) + ")"; break;
case ExecutionMode::OutputPrimitivesEXT:
ret += "(" + ToStr(el.outputPrimitivesEXT) + ")"; break;
case ExecutionMode::SharedLocalMemorySizeINTEL:
ret += "(" + ToStr(el.sharedLocalMemorySizeINTEL) + ")"; break;
case ExecutionMode::RoundingModeRTPINTEL:
@@ -4308,6 +4331,8 @@ void OpDecoder::ForEachID(const ConstIter &it, const std::function<void(Id,bool)
callback(Id::fromWord(it.word(3)), false);
callback(Id::fromWord(it.word(4)), false);
break;
case rdcspv::Op::ExtInstWithForwardRefsKHR:
break;
case rdcspv::Op::TraceRayKHR:
callback(Id::fromWord(it.word(1)), false);
callback(Id::fromWord(it.word(2)), false);
@@ -4406,6 +4431,21 @@ void OpDecoder::ForEachID(const ConstIter &it, const std::function<void(Id,bool)
callback(Id::fromWord(it.word(2)), true);
callback(Id::fromWord(it.word(3)), false);
break;
case rdcspv::Op::ConstantCompositeReplicateEXT:
callback(Id::fromWord(it.word(1)), false);
callback(Id::fromWord(it.word(2)), true);
callback(Id::fromWord(it.word(3)), false);
break;
case rdcspv::Op::SpecConstantCompositeReplicateEXT:
callback(Id::fromWord(it.word(1)), false);
callback(Id::fromWord(it.word(2)), true);
callback(Id::fromWord(it.word(3)), false);
break;
case rdcspv::Op::CompositeConstructReplicateEXT:
callback(Id::fromWord(it.word(1)), false);
callback(Id::fromWord(it.word(2)), true);
callback(Id::fromWord(it.word(3)), false);
break;
case rdcspv::Op::TypeRayQueryKHR:
callback(Id::fromWord(it.word(1)), true);
break;
@@ -5005,6 +5045,14 @@ void OpDecoder::ForEachID(const ConstIter &it, const std::function<void(Id,bool)
break;
case rdcspv::Op::SamplerImageAddressingModeNV:
break;
case rdcspv::Op::RawAccessChainNV:
callback(Id::fromWord(it.word(1)), false);
callback(Id::fromWord(it.word(2)), true);
callback(Id::fromWord(it.word(3)), false);
callback(Id::fromWord(it.word(4)), false);
callback(Id::fromWord(it.word(5)), false);
callback(Id::fromWord(it.word(6)), false);
break;
case rdcspv::Op::SubgroupShuffleINTEL:
callback(Id::fromWord(it.word(1)), false);
callback(Id::fromWord(it.word(2)), true);
@@ -9398,6 +9446,13 @@ rdcstr OpDecoder::Disassemble(const ConstIter &it, const std::function<rdcstr(Id
+ ")";
break;
}
case rdcspv::Op::ExtInstWithForwardRefsKHR:
{
OpDecoder decoded(it);
ret += declName(decoded.resultType, decoded.result) + " = ";
ret += "ExtInstWithForwardRefsKHR(...)";
break;
}
case rdcspv::Op::TraceRayKHR:
{
OpTraceRayKHR decoded(it);
@@ -9604,6 +9659,33 @@ rdcstr OpDecoder::Disassemble(const ConstIter &it, const std::function<rdcstr(Id
+ ")";
break;
}
case rdcspv::Op::ConstantCompositeReplicateEXT:
{
OpConstantCompositeReplicateEXT decoded(it);
ret += declName(decoded.resultType, decoded.result) + " = ";
ret += rdcstr("ConstantCompositeReplicateEXT("_lit)
+ ParamToStr(idName, decoded.value)
+ ")";
break;
}
case rdcspv::Op::SpecConstantCompositeReplicateEXT:
{
OpSpecConstantCompositeReplicateEXT decoded(it);
ret += declName(decoded.resultType, decoded.result) + " = ";
ret += rdcstr("SpecConstantCompositeReplicateEXT("_lit)
+ ParamToStr(idName, decoded.value)
+ ")";
break;
}
case rdcspv::Op::CompositeConstructReplicateEXT:
{
OpCompositeConstructReplicateEXT decoded(it);
ret += declName(decoded.resultType, decoded.result) + " = ";
ret += rdcstr("CompositeConstructReplicateEXT("_lit)
+ ParamToStr(idName, decoded.value)
+ ")";
break;
}
case rdcspv::Op::TypeRayQueryKHR:
{
OpTypeRayQueryKHR decoded(it);
@@ -10840,6 +10922,22 @@ rdcstr OpDecoder::Disassemble(const ConstIter &it, const std::function<rdcstr(Id
+ ")";
break;
}
case rdcspv::Op::RawAccessChainNV:
{
OpRawAccessChainNV decoded(it);
ret += declName(decoded.resultType, decoded.result) + " = ";
ret += rdcstr("RawAccessChainNV("_lit)
+ ParamToStr(idName, decoded.base)
+ ", "
+ ParamToStr(idName, decoded.bytestride)
+ ", "
+ ParamToStr(idName, decoded.elementindex)
+ ", "
+ ParamToStr(idName, decoded.byteoffset)
+ (7 < size ? ", " + ParamToStr(idName, decoded.rawAccessChainOperands) : "")
+ ")";
break;
}
case rdcspv::Op::SubgroupShuffleINTEL:
{
OpSubgroupShuffleINTEL decoded(it);
@@ -11998,6 +12096,7 @@ OpDecoder::OpDecoder(const ConstIter &it)
case rdcspv::Op::SubgroupAllEqualKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::GroupNonUniformRotateKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::SubgroupReadInvocationKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::ExtInstWithForwardRefsKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::TraceRayKHR: result = Id(); resultType = Id(); break;
case rdcspv::Op::ExecuteCallableKHR: result = Id(); resultType = Id(); break;
case rdcspv::Op::ConvertUToAccelerationStructureKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
@@ -12014,6 +12113,9 @@ OpDecoder::OpDecoder(const ConstIter &it)
case rdcspv::Op::CooperativeMatrixStoreKHR: result = Id(); resultType = Id(); break;
case rdcspv::Op::CooperativeMatrixMulAddKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::CooperativeMatrixLengthKHR: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::ConstantCompositeReplicateEXT: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::SpecConstantCompositeReplicateEXT: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::CompositeConstructReplicateEXT: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::TypeRayQueryKHR: result = Id::fromWord(it.word(1)); resultType = Id(); break;
case rdcspv::Op::RayQueryInitializeKHR: result = Id(); resultType = Id(); break;
case rdcspv::Op::RayQueryTerminateKHR: result = Id(); resultType = Id(); break;
@@ -12110,6 +12212,7 @@ OpDecoder::OpDecoder(const ConstIter &it)
case rdcspv::Op::ConvertUToSampledImageNV: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::ConvertSampledImageToUNV: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::SamplerImageAddressingModeNV: result = Id(); resultType = Id(); break;
case rdcspv::Op::RawAccessChainNV: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::SubgroupShuffleINTEL: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::SubgroupShuffleDownINTEL: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
case rdcspv::Op::SubgroupShuffleUpINTEL: result = Id::fromWord(it.word(2)); resultType = Id::fromWord(it.word(1)); break;
@@ -12367,6 +12470,8 @@ rdcstr DoStringise(const rdcspv::Generator &el)
STRINGISE_ENUM_CLASS_NAMED(NazaraShaderLangCompiler, "Nazara ShaderLang Compiler from SirLynix - Contact Jérôme Leclercq, https://github.com/NazaraEngine/ShaderLang");
STRINGISE_ENUM_CLASS_NAMED(SlangCompiler, "Slang Compiler from NVIDIA - Contact Theresa Foley, tfoley@nvidia.com, https://github.com/shader-slang/slang/");
STRINGISE_ENUM_CLASS_NAMED(ZigCompiler, "Zig Compiler from Zig Software Foundation - Contact Robin Voetter, https://github.com/Snektron");
STRINGISE_ENUM_CLASS_NAMED(spq, "spq from Rendong Liang - Contact Rendong Liang, admin@penguinliong.moe, https://github.com/PENGUINLIONG/spq-rs");
STRINGISE_ENUM_CLASS_NAMED(LLVMSPIRVBackend, "LLVM SPIR-V Backend from LLVM - Contact Michal Paszkowski, michal.paszkowski@intel.com, https://github.com/llvm/llvm-project/tree/main/llvm/lib/Target/SPIRV");
}
END_ENUM_STRINGISE();
}
+54 -30
View File
@@ -130,6 +130,8 @@ enum class Generator : uint32_t
NazaraShaderLangCompiler = 39,
SlangCompiler = 40,
ZigCompiler = 41,
spq = 42,
LLVMSPIRVBackend = 43,
};
enum class ImageOperands : uint32_t
@@ -322,6 +324,17 @@ enum class FragmentShadingRate : uint32_t
BITMASK_OPERATORS(FragmentShadingRate);
enum class RawAccessChainOperands : uint32_t
{
None = 0x0000,
RobustnessPerComponentNV = 0x0001,
RobustnessPerElementNV = 0x0002,
Max,
Invalid = ~0U,
};
BITMASK_OPERATORS(RawAccessChainOperands);
enum class SourceLanguage : uint32_t
{
Unknown = 0,
@@ -352,18 +365,18 @@ enum class ExecutionModel : uint32_t
Kernel = 6,
TaskNV = 5267,
MeshNV = 5268,
RayGenerationNV = 5313,
RayGenerationKHR = 5313,
IntersectionNV = 5314,
RayGenerationNV = 5313,
IntersectionKHR = 5314,
AnyHitNV = 5315,
IntersectionNV = 5314,
AnyHitKHR = 5315,
ClosestHitNV = 5316,
AnyHitNV = 5315,
ClosestHitKHR = 5316,
MissNV = 5317,
ClosestHitNV = 5316,
MissKHR = 5317,
CallableNV = 5318,
MissNV = 5317,
CallableKHR = 5318,
CallableNV = 5318,
TaskEXT = 5364,
MeshEXT = 5365,
Max,
@@ -457,14 +470,14 @@ enum class ExecutionMode : uint32_t
StencilRefLessBackAMD = 5084,
QuadDerivativesKHR = 5088,
RequireFullQuadsKHR = 5089,
OutputLinesNV = 5269,
OutputLinesEXT = 5269,
OutputPrimitivesNV = 5270,
OutputLinesNV = 5269,
OutputPrimitivesEXT = 5270,
OutputPrimitivesNV = 5270,
DerivativeGroupQuadsNV = 5289,
DerivativeGroupLinearNV = 5290,
OutputTrianglesNV = 5298,
OutputTrianglesEXT = 5298,
OutputTrianglesNV = 5298,
PixelInterlockOrderedEXT = 5366,
PixelInterlockUnorderedEXT = 5367,
SampleInterlockOrderedEXT = 5368,
@@ -511,18 +524,18 @@ enum class StorageClass : uint32_t
TileImageEXT = 4172,
NodePayloadAMDX = 5068,
NodeOutputPayloadAMDX = 5076,
CallableDataNV = 5328,
CallableDataKHR = 5328,
IncomingCallableDataNV = 5329,
CallableDataNV = 5328,
IncomingCallableDataKHR = 5329,
RayPayloadNV = 5338,
IncomingCallableDataNV = 5329,
RayPayloadKHR = 5338,
HitAttributeNV = 5339,
RayPayloadNV = 5338,
HitAttributeKHR = 5339,
IncomingRayPayloadNV = 5342,
HitAttributeNV = 5339,
IncomingRayPayloadKHR = 5342,
ShaderRecordBufferNV = 5343,
IncomingRayPayloadNV = 5342,
ShaderRecordBufferKHR = 5343,
ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349,
HitObjectAttributeNV = 5385,
@@ -822,8 +835,8 @@ enum class Decoration : uint32_t
PassthroughNV = 5250,
ViewportRelativeNV = 5252,
SecondaryViewportRelativeNV = 5256,
PerPrimitiveNV = 5271,
PerPrimitiveEXT = 5271,
PerPrimitiveNV = 5271,
PerViewNV = 5272,
PerTaskNV = 5273,
PerVertexKHR = 5285,
@@ -1011,37 +1024,37 @@ enum class BuiltIn : uint32_t
PrimitiveLineIndicesEXT = 5295,
PrimitiveTriangleIndicesEXT = 5296,
CullPrimitiveEXT = 5299,
LaunchIdNV = 5319,
LaunchIdKHR = 5319,
LaunchSizeNV = 5320,
LaunchIdNV = 5319,
LaunchSizeKHR = 5320,
WorldRayOriginNV = 5321,
LaunchSizeNV = 5320,
WorldRayOriginKHR = 5321,
WorldRayDirectionNV = 5322,
WorldRayOriginNV = 5321,
WorldRayDirectionKHR = 5322,
ObjectRayOriginNV = 5323,
WorldRayDirectionNV = 5322,
ObjectRayOriginKHR = 5323,
ObjectRayDirectionNV = 5324,
ObjectRayOriginNV = 5323,
ObjectRayDirectionKHR = 5324,
RayTminNV = 5325,
ObjectRayDirectionNV = 5324,
RayTminKHR = 5325,
RayTmaxNV = 5326,
RayTminNV = 5325,
RayTmaxKHR = 5326,
InstanceCustomIndexNV = 5327,
RayTmaxNV = 5326,
InstanceCustomIndexKHR = 5327,
ObjectToWorldNV = 5330,
InstanceCustomIndexNV = 5327,
ObjectToWorldKHR = 5330,
WorldToObjectNV = 5331,
ObjectToWorldNV = 5330,
WorldToObjectKHR = 5331,
WorldToObjectNV = 5331,
HitTNV = 5332,
HitKindNV = 5333,
HitKindKHR = 5333,
HitKindNV = 5333,
CurrentRayTimeNV = 5334,
HitTriangleVertexPositionsKHR = 5335,
HitMicroTriangleVertexPositionsNV = 5337,
HitMicroTriangleVertexBarycentricsNV = 5344,
IncomingRayFlagsNV = 5351,
IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
RayGeometryIndexKHR = 5352,
WarpsPerSMNV = 5374,
SMCountNV = 5375,
@@ -1166,6 +1179,7 @@ enum class Capability : uint32_t
TileImageColorReadAccessEXT = 4166,
TileImageDepthReadAccessEXT = 4167,
TileImageStencilReadAccessEXT = 4168,
CooperativeMatrixLayoutsARM = 4201,
FragmentShadingRateKHR = 4422,
SubgroupBallotKHR = 4423,
DrawParameters = 4427,
@@ -1276,6 +1290,7 @@ enum class Capability : uint32_t
RayQueryPositionFetchKHR = 5391,
AtomicFloat16VectorNV = 5404,
RayTracingDisplacementMicromapNV = 5409,
RawAccessChainsNV = 5414,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
@@ -1328,6 +1343,7 @@ enum class Capability : uint32_t
DotProductKHR = 6019,
RayCullMaskKHR = 6020,
CooperativeMatrixKHR = 6022,
ReplicatedCompositesEXT = 6024,
BitInstructions = 6025,
GroupNonUniformRotateKHR = 6026,
FloatControls2 = 6029,
@@ -1405,6 +1421,8 @@ enum class CooperativeMatrixLayout : uint32_t
{
RowMajorKHR = 0,
ColumnMajorKHR = 1,
RowBlockedInterleavedARM = 4202,
ColumnBlockedInterleavedARM = 4203,
Max,
Invalid = ~0U,
};
@@ -1716,8 +1734,8 @@ struct ExecutionModeAndParamData
StaticNumWorkgroupsAMDXParams staticNumWorkgroupsAMDX;
Id shaderIndexAMDX;
MaxNumWorkgroupsAMDXParams maxNumWorkgroupsAMDX;
uint32_t outputPrimitivesNV;
uint32_t outputPrimitivesEXT;
uint32_t outputPrimitivesNV;
uint32_t sharedLocalMemorySizeINTEL;
uint32_t roundingModeRTPINTEL;
uint32_t roundingModeRTNINTEL;
@@ -2216,6 +2234,7 @@ enum class Op : uint16_t
SubgroupAllEqualKHR = 4430,
GroupNonUniformRotateKHR = 4431,
SubgroupReadInvocationKHR = 4432,
ExtInstWithForwardRefsKHR = 4433,
TraceRayKHR = 4445,
ExecuteCallableKHR = 4446,
ConvertUToAccelerationStructureKHR = 4447,
@@ -2238,6 +2257,9 @@ enum class Op : uint16_t
CooperativeMatrixStoreKHR = 4458,
CooperativeMatrixMulAddKHR = 4459,
CooperativeMatrixLengthKHR = 4460,
ConstantCompositeReplicateEXT = 4461,
SpecConstantCompositeReplicateEXT = 4462,
CompositeConstructReplicateEXT = 4463,
TypeRayQueryKHR = 4472,
RayQueryInitializeKHR = 4473,
RayQueryTerminateKHR = 4474,
@@ -2335,6 +2357,7 @@ enum class Op : uint16_t
ConvertUToSampledImageNV = 5395,
ConvertSampledImageToUNV = 5396,
SamplerImageAddressingModeNV = 5397,
RawAccessChainNV = 5398,
SubgroupShuffleINTEL = 5571,
SubgroupShuffleDownINTEL = 5572,
SubgroupShuffleUpINTEL = 5573,
@@ -2567,6 +2590,7 @@ DECLARE_STRINGISE_TYPE(rdcspv::MemoryAccess);
DECLARE_STRINGISE_TYPE(rdcspv::KernelProfilingInfo);
DECLARE_STRINGISE_TYPE(rdcspv::RayFlags);
DECLARE_STRINGISE_TYPE(rdcspv::FragmentShadingRate);
DECLARE_STRINGISE_TYPE(rdcspv::RawAccessChainOperands);
DECLARE_STRINGISE_TYPE(rdcspv::SourceLanguage);
DECLARE_STRINGISE_TYPE(rdcspv::ExecutionModel);
DECLARE_STRINGISE_TYPE(rdcspv::AddressingModel);
+141 -10
View File
@@ -560,6 +560,8 @@ inline uint16_t OptionalWordCount(const KernelProfilingInfo val) { return val !=
inline uint16_t OptionalWordCount(const RayFlags val) { return val != RayFlags::NoneKHR ? 1 : 0; }
inline uint16_t OptionalWordCount(const RawAccessChainOperands val) { return val != RawAccessChainOperands::None ? 1 : 0; }
inline uint16_t OptionalWordCount(const SourceLanguage val) { return val != SourceLanguage::Invalid ? 1 : 0; }
inline uint16_t OptionalWordCount(const ExecutionModel val) { return val != ExecutionModel::Invalid ? 1 : 0; }
@@ -830,14 +832,14 @@ struct ExecutionModeParam<ExecutionMode::MaxNumWorkgroupsAMDX>
};
template<>
struct ExecutionModeParam<ExecutionMode::OutputPrimitivesNV>
struct ExecutionModeParam<ExecutionMode::OutputPrimitivesEXT>
{
uint32_t outputPrimitivesNV;
ExecutionModeParam(uint32_t outputPrimitivesNVParam) { outputPrimitivesNV = outputPrimitivesNVParam; }
uint32_t outputPrimitivesEXT;
ExecutionModeParam(uint32_t outputPrimitivesEXTParam) { outputPrimitivesEXT = outputPrimitivesEXTParam; }
operator ExecutionModeAndParamData()
{
ExecutionModeAndParamData ret(ExecutionMode::OutputPrimitivesNV);
ret.outputPrimitivesNV = outputPrimitivesNV;
ExecutionModeAndParamData ret(ExecutionMode::OutputPrimitivesEXT);
ret.outputPrimitivesEXT = outputPrimitivesEXT;
return ret;
}
};
@@ -1152,8 +1154,8 @@ inline ExecutionModeAndParamData DecodeParam(const ConstIter &it, uint32_t &word
ret.maxNumWorkgroupsAMDX.zsize = Id::fromWord(it.word(word+2));
word += 3;
break;
case ExecutionMode::OutputPrimitivesNV:
ret.outputPrimitivesNV = (uint32_t)it.word(word);
case ExecutionMode::OutputPrimitivesEXT:
ret.outputPrimitivesEXT = (uint32_t)it.word(word);
word += 1;
break;
case ExecutionMode::SharedLocalMemorySizeINTEL:
@@ -1302,8 +1304,8 @@ inline void EncodeParam(rdcarray<uint32_t> &words, const ExecutionModeAndParamDa
words.push_back(param.maxNumWorkgroupsAMDX.ysize.value());
words.push_back(param.maxNumWorkgroupsAMDX.zsize.value());
break;
case ExecutionMode::OutputPrimitivesNV:
words.push_back((uint32_t)param.outputPrimitivesNV);
case ExecutionMode::OutputPrimitivesEXT:
words.push_back((uint32_t)param.outputPrimitivesEXT);
break;
case ExecutionMode::SharedLocalMemorySizeINTEL:
words.push_back((uint32_t)param.sharedLocalMemorySizeINTEL);
@@ -1383,7 +1385,7 @@ inline uint16_t ExtraWordCount(const ExecutionMode executionMode)
case ExecutionMode::StaticNumWorkgroupsAMDX: return 3;
case ExecutionMode::ShaderIndexAMDX: return 1;
case ExecutionMode::MaxNumWorkgroupsAMDX: return 3;
case ExecutionMode::OutputPrimitivesNV: return 1;
case ExecutionMode::OutputPrimitivesEXT: return 1;
case ExecutionMode::SharedLocalMemorySizeINTEL: return 1;
case ExecutionMode::RoundingModeRTPINTEL: return 1;
case ExecutionMode::RoundingModeRTNINTEL: return 1;
@@ -13464,6 +13466,8 @@ struct OpSubgroupReadInvocationKHR
Id index;
};
struct OpExtInstWithForwardRefsKHR; // has operands with variable sizes
struct OpTraceRayKHR
{
OpTraceRayKHR(const ConstIter &it)
@@ -14087,6 +14091,78 @@ struct OpCooperativeMatrixLengthKHR
Id type;
};
struct OpConstantCompositeReplicateEXT
{
OpConstantCompositeReplicateEXT(const ConstIter &it)
{
memcpy(this, it.words(), sizeof(*this));
}
OpConstantCompositeReplicateEXT(IdResultType resultType, IdResult result, Id value)
: op(Op::ConstantCompositeReplicateEXT)
, wordCount(FixedWordSize)
{
this->resultType = resultType;
this->result = result;
this->value = value;
}
static constexpr Op OpCode = Op::ConstantCompositeReplicateEXT;
static constexpr uint16_t FixedWordSize = 4U;
Op op;
uint16_t wordCount;
IdResultType resultType;
IdResult result;
Id value;
};
struct OpSpecConstantCompositeReplicateEXT
{
OpSpecConstantCompositeReplicateEXT(const ConstIter &it)
{
memcpy(this, it.words(), sizeof(*this));
}
OpSpecConstantCompositeReplicateEXT(IdResultType resultType, IdResult result, Id value)
: op(Op::SpecConstantCompositeReplicateEXT)
, wordCount(FixedWordSize)
{
this->resultType = resultType;
this->result = result;
this->value = value;
}
static constexpr Op OpCode = Op::SpecConstantCompositeReplicateEXT;
static constexpr uint16_t FixedWordSize = 4U;
Op op;
uint16_t wordCount;
IdResultType resultType;
IdResult result;
Id value;
};
struct OpCompositeConstructReplicateEXT
{
OpCompositeConstructReplicateEXT(const ConstIter &it)
{
memcpy(this, it.words(), sizeof(*this));
}
OpCompositeConstructReplicateEXT(IdResultType resultType, IdResult result, Id value)
: op(Op::CompositeConstructReplicateEXT)
, wordCount(FixedWordSize)
{
this->resultType = resultType;
this->result = result;
this->value = value;
}
static constexpr Op OpCode = Op::CompositeConstructReplicateEXT;
static constexpr uint16_t FixedWordSize = 4U;
Op op;
uint16_t wordCount;
IdResultType resultType;
IdResult result;
Id value;
};
struct OpTypeRayQueryKHR
{
OpTypeRayQueryKHR(const ConstIter &it)
@@ -16756,6 +16832,61 @@ struct OpSamplerImageAddressingModeNV
uint32_t bitWidth;
};
struct OpRawAccessChainNV
{
OpRawAccessChainNV(const ConstIter &it)
{
uint32_t word = 0;(void)word;
this->op = OpCode;
this->wordCount = (uint16_t)it.size();
this->resultType = Id::fromWord(it.word(1));
this->result = Id::fromWord(it.word(2));
this->base = Id::fromWord(it.word(3));
this->bytestride = Id::fromWord(it.word(4));
this->elementindex = Id::fromWord(it.word(5));
this->byteoffset = Id::fromWord(it.word(6));
this->rawAccessChainOperands = (it.size() > 7) ? (RawAccessChainOperands)it.word(7) : RawAccessChainOperands::None;
}
OpRawAccessChainNV(IdResultType resultType, IdResult result, Id base, Id bytestride, Id elementindex, Id byteoffset, RawAccessChainOperands rawAccessChainOperands = RawAccessChainOperands::None)
: op(Op::RawAccessChainNV)
, wordCount(MinWordSize + OptionalWordCount(rawAccessChainOperands))
{
this->resultType = resultType;
this->result = result;
this->base = base;
this->bytestride = bytestride;
this->elementindex = elementindex;
this->byteoffset = byteoffset;
this->rawAccessChainOperands = rawAccessChainOperands;
}
operator Operation() const
{
rdcarray<uint32_t> words;
words.push_back(resultType.value());
words.push_back(result.value());
words.push_back(base.value());
words.push_back(bytestride.value());
words.push_back(elementindex.value());
words.push_back(byteoffset.value());
if(rawAccessChainOperands != RawAccessChainOperands::None) words.push_back((uint32_t)rawAccessChainOperands);
return Operation(OpCode, words);
}
static constexpr Op OpCode = Op::RawAccessChainNV;
static constexpr uint16_t MinWordSize = 7U;
Op op;
uint16_t wordCount;
IdResultType resultType;
IdResult result;
Id base;
Id bytestride;
Id elementindex;
Id byteoffset;
RawAccessChainOperands rawAccessChainOperands;
bool HasRawAccessChainOperands() const { return wordCount > 7; }
};
struct OpSubgroupShuffleINTEL
{
OpSubgroupShuffleINTEL(const ConstIter &it)
@@ -651,7 +651,7 @@ void Reflector::RegisterOp(Iter it)
{
loopBlocks.insert(curBlock);
}
else if(opdata.op == Op::ExtInst)
else if(opdata.op == Op::ExtInst || opdata.op == Op::ExtInstWithForwardRefsKHR)
{
OpShaderDbg dbg(it);
+1
View File
@@ -446,6 +446,7 @@ static void ConvertToMeshOutputCompute(const ShaderReflection &refl,
it.opcode() == rdcspv::Op::Variable || it.opcode() == rdcspv::Op::AccessChain ||
it.opcode() == rdcspv::Op::InBoundsAccessChain || it.opcode() == rdcspv::Op::Bitcast ||
it.opcode() == rdcspv::Op::Undef || it.opcode() == rdcspv::Op::ExtInst ||
it.opcode() == rdcspv::Op::ExtInstWithForwardRefsKHR ||
it.opcode() == rdcspv::Op::FunctionCall || it.opcode() == rdcspv::Op::Phi ||
it.opcode() == rdcspv::Op::Select)
{
@@ -1159,7 +1159,8 @@ void AnnotateShader(const ShaderReflection &refl, const SPIRVPatchData &patchDat
functionPatchQueue[call.function] = patchArgs;
}
if(it.opcode() == rdcspv::Op::ExtInst && Vulkan_PrintfFetch())
if((it.opcode() == rdcspv::Op::ExtInst || it.opcode() == rdcspv::Op::ExtInstWithForwardRefsKHR) &&
Vulkan_PrintfFetch())
{
rdcspv::OpExtInst extinst(it);
// is this a printf extinst?