diff --git a/renderdoc/driver/shaders/spirv/spir-v.xml b/renderdoc/driver/shaders/spirv/spir-v.xml
index 4a2de8314..f9b23ac41 100644
--- a/renderdoc/driver/shaders/spirv/spir-v.xml
+++ b/renderdoc/driver/shaders/spirv/spir-v.xml
@@ -92,7 +92,9 @@
-
+
+
+
@@ -155,7 +157,7 @@
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
-
+
@@ -188,7 +190,7 @@
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
-
+
@@ -208,8 +210,8 @@
-
-
+
+
@@ -269,8 +271,8 @@
-
-
+
+
diff --git a/renderdoc/driver/shaders/spirv/spirv.core.grammar.json b/renderdoc/driver/shaders/spirv/spirv.core.grammar.json
index ba4493352..980b5dc3a 100644
--- a/renderdoc/driver/shaders/spirv/spirv.core.grammar.json
+++ b/renderdoc/driver/shaders/spirv/spirv.core.grammar.json
@@ -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"
}
]
},
diff --git a/renderdoc/driver/shaders/spirv/spirv_debug.cpp b/renderdoc/driver/shaders/spirv/spirv_debug.cpp
index ad7b219dd..98493d832 100644
--- a/renderdoc/driver/shaders/spirv/spirv_debug.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_debug.cpp
@@ -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
//////////////////////////////////////////////////////////////////////////////
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
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());
diff --git a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp
index cad6403c8..ca7dad2f7 100644
--- a/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_debug_setup.cpp
@@ -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);
diff --git a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
index 3dfd33e9f..4a0c21573 100644
--- a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp
@@ -1563,6 +1563,7 @@ rdcstr Reflector::Disassemble(const rdcstr &entryPoint,
}
case Op::ExtInst:
+ case Op::ExtInstWithForwardRefsKHR:
{
OpExtInst decoded(it);
diff --git a/renderdoc/driver/shaders/spirv/spirv_gen.cpp b/renderdoc/driver/shaders/spirv/spirv_gen.cpp
index 36b408573..8cd9cdf19 100644
--- a/renderdoc/driver/shaders/spirv/spirv_gen.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_gen.cpp
@@ -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 &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
};
template<>
-struct ExecutionModeParam
+struct ExecutionModeParam
{
- 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 &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 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)
diff --git a/renderdoc/driver/shaders/spirv/spirv_reflect.cpp b/renderdoc/driver/shaders/spirv/spirv_reflect.cpp
index 9aaf8066b..bac3f9051 100644
--- a/renderdoc/driver/shaders/spirv/spirv_reflect.cpp
+++ b/renderdoc/driver/shaders/spirv/spirv_reflect.cpp
@@ -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);
diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp
index 8705b8f29..82a416d6a 100644
--- a/renderdoc/driver/vulkan/vk_postvs.cpp
+++ b/renderdoc/driver/vulkan/vk_postvs.cpp
@@ -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)
{
diff --git a/renderdoc/driver/vulkan/vk_shader_feedback.cpp b/renderdoc/driver/vulkan/vk_shader_feedback.cpp
index 28f84b7b5..25e0c8fb1 100644
--- a/renderdoc/driver/vulkan/vk_shader_feedback.cpp
+++ b/renderdoc/driver/vulkan/vk_shader_feedback.cpp
@@ -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?