From d612c54ed68ec0af83f32347722095e222d5cce9 Mon Sep 17 00:00:00 2001 From: Victor Lomuller Date: Wed, 31 Jul 2024 12:33:16 +0100 Subject: [PATCH] Add "aliases" fields to the grammar Promotion of extensions lead to duplicated entries. The patch introduce a new entry "aliases" to the grammar. It is a list of strings, where each string is an alternative name for the token, and applies on instructions and operand kind's enumerants. The grammar is updated to use the fields and all duplicated were removed. The header generator now processes the aliases when generating the headers to acount for the change. This ensure the generated headers doesn't change. --- .../spirv/unified1/spirv.core.grammar.json | 870 +++--------------- tools/buildHeaders/header.cpp | 8 + tools/buildHeaders/jsonToSpirv.cpp | 66 +- tools/buildHeaders/jsonToSpirv.h | 18 +- 4 files changed, 152 insertions(+), 810 deletions(-) diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json index d56296436..b244a244e 100644 --- a/include/spirv/unified1/spirv.core.grammar.json +++ b/include/spirv/unified1/spirv.core.grammar.json @@ -4737,6 +4737,7 @@ { "opname" : "OpSDot", "class" : "Arithmetic", + "aliases" : ["OpSDotKHR"], "opcode" : 4450, "operands" : [ { "kind" : "IdResultType" }, @@ -4746,26 +4747,13 @@ { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } ], "capabilities" : [ "DotProduct" ], - "version" : "1.6" - }, - { - "opname" : "OpSDotKHR", - "class" : "Arithmetic", - "opcode" : 4450, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Vector 1'" }, - { "kind" : "IdRef", "name" : "'Vector 2'" }, - { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } - ], - "capabilities" : [ "DotProductKHR" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "opname" : "OpUDot", "class" : "Arithmetic", + "aliases" : ["OpUDotKHR"], "opcode" : 4451, "operands" : [ { "kind" : "IdResultType" }, @@ -4775,26 +4763,13 @@ { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } ], "capabilities" : [ "DotProduct" ], - "version" : "1.6" - }, - { - "opname" : "OpUDotKHR", - "class" : "Arithmetic", - "opcode" : 4451, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Vector 1'" }, - { "kind" : "IdRef", "name" : "'Vector 2'" }, - { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } - ], - "capabilities" : [ "DotProductKHR" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "opname" : "OpSUDot", "class" : "Arithmetic", + "aliases" : ["OpSUDotKHR"], "opcode" : 4452, "operands" : [ { "kind" : "IdResultType" }, @@ -4804,26 +4779,13 @@ { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } ], "capabilities" : [ "DotProduct" ], - "version" : "1.6" - }, - { - "opname" : "OpSUDotKHR", - "class" : "Arithmetic", - "opcode" : 4452, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Vector 1'" }, - { "kind" : "IdRef", "name" : "'Vector 2'" }, - { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } - ], - "capabilities" : [ "DotProductKHR" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "opname" : "OpSDotAccSat", "class" : "Arithmetic", + "aliases" : ["OpSDotAccSatKHR"], "opcode" : 4453, "operands" : [ { "kind" : "IdResultType" }, @@ -4834,27 +4796,13 @@ { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } ], "capabilities" : [ "DotProduct" ], - "version" : "1.6" - }, - { - "opname" : "OpSDotAccSatKHR", - "class" : "Arithmetic", - "opcode" : 4453, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Vector 1'" }, - { "kind" : "IdRef", "name" : "'Vector 2'" }, - { "kind" : "IdRef", "name" : "'Accumulator'" }, - { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } - ], - "capabilities" : [ "DotProductKHR" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "opname" : "OpUDotAccSat", "class" : "Arithmetic", + "aliases" : ["OpUDotAccSatKHR"], "opcode" : 4454, "operands" : [ { "kind" : "IdResultType" }, @@ -4865,27 +4813,13 @@ { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } ], "capabilities" : [ "DotProduct" ], - "version" : "1.6" - }, - { - "opname" : "OpUDotAccSatKHR", - "class" : "Arithmetic", - "opcode" : 4454, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Vector 1'" }, - { "kind" : "IdRef", "name" : "'Vector 2'" }, - { "kind" : "IdRef", "name" : "'Accumulator'" }, - { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } - ], - "capabilities" : [ "DotProductKHR" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "opname" : "OpSUDotAccSat", "class" : "Arithmetic", + "aliases" : ["OpSUDotAccSatKHR"], "opcode" : 4455, "operands" : [ { "kind" : "IdResultType" }, @@ -4896,21 +4830,6 @@ { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } ], "capabilities" : [ "DotProduct" ], - "version" : "1.6" - }, - { - "opname" : "OpSUDotAccSatKHR", - "class" : "Arithmetic", - "opcode" : 4455, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Vector 1'" }, - { "kind" : "IdRef", "name" : "'Vector 2'" }, - { "kind" : "IdRef", "name" : "'Accumulator'" }, - { "kind" : "PackedVectorFormat", "name" : "'Packed Vector Format'", "quantifier" : "?" } - ], - "capabilities" : [ "DotProductKHR" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, @@ -6057,20 +5976,7 @@ { "opname" : "OpReportIntersectionKHR", "class" : "Reserved", - "opcode" : 5334, - "operands" : [ - { "kind" : "IdResultType" }, - { "kind" : "IdResult" }, - { "kind" : "IdRef", "name" : "'Hit'" }, - { "kind" : "IdRef", "name" : "'HitKind'" } - ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "opname" : "OpReportIntersectionNV", - "class" : "Reserved", + "aliases" : ["OpReportIntersectionNV"], "opcode" : 5334, "operands" : [ { "kind" : "IdResultType" }, @@ -6188,17 +6094,7 @@ { "opname" : "OpTypeAccelerationStructureKHR", "class" : "Type-Declaration", - "opcode" : 5341, - "operands" : [ - { "kind" : "IdResult" } - ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR", "RayQueryKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing", "SPV_KHR_ray_query" ], - "version" : "None" - }, - { - "opname" : "OpTypeAccelerationStructureNV", - "class" : "Type-Declaration", + "aliases" : ["OpTypeAccelerationStructureNV"], "opcode" : 5341, "operands" : [ { "kind" : "IdResult" } @@ -6313,17 +6209,11 @@ { "opname" : "OpDemoteToHelperInvocation", "class" : "Control-Flow", + "aliases" : ["OpDemoteToHelperInvocationEXT"], "opcode" : 5380, "capabilities" : [ "DemoteToHelperInvocation" ], "version" : "1.6" }, - { - "opname" : "OpDemoteToHelperInvocationEXT", - "class" : "Control-Flow", - "opcode" : 5380, - "capabilities" : [ "DemoteToHelperInvocationEXT" ], - "version" : "1.6" - }, { "opname" : "OpIsHelperInvocationEXT", "class" : "Reserved", @@ -6332,7 +6222,7 @@ { "kind" : "IdResultType" }, { "kind" : "IdResult" } ], - "capabilities" : [ "DemoteToHelperInvocationEXT" ], + "capabilities" : [ "DemoteToHelperInvocation" ], "extensions" : [ "SPV_EXT_demote_to_helper_invocation" ], "version" : "None" }, @@ -6871,17 +6761,7 @@ { "opname" : "OpDecorateString", "class" : "Annotation", - "opcode" : 5632, - "operands" : [ - { "kind" : "IdRef", "name" : "'Target'" }, - { "kind" : "Decoration" } - ], - "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], - "version" : "1.4" - }, - { - "opname" : "OpDecorateStringGOOGLE", - "class" : "Annotation", + "aliases" : ["OpDecorateStringGOOGLE"], "opcode" : 5632, "operands" : [ { "kind" : "IdRef", "name" : "'Target'" }, @@ -6893,18 +6773,7 @@ { "opname" : "OpMemberDecorateString", "class" : "Annotation", - "opcode" : 5633, - "operands" : [ - { "kind" : "IdRef", "name" : "'Struct Type'" }, - { "kind" : "LiteralInteger", "name" : "'Member'" }, - { "kind" : "Decoration" } - ], - "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ], - "version" : "1.4" - }, - { - "opname" : "OpMemberDecorateStringGOOGLE", - "class" : "Annotation", + "aliases" : ["OpMemberDecorateStringGOOGLE"], "opcode" : 5633, "operands" : [ { "kind" : "IdRef", "name" : "'Struct Type'" }, @@ -10153,15 +10022,7 @@ }, { "enumerant" : "MakeTexelAvailable", - "value" : "0x0100", - "capabilities" : [ "VulkanMemoryModel" ], - "parameters" : [ - { "kind" : "IdScope" } - ], - "version" : "1.5" - }, - { - "enumerant" : "MakeTexelAvailableKHR", + "aliases" : [ "MakeTexelAvailableKHR" ], "value" : "0x0100", "capabilities" : [ "VulkanMemoryModel" ], "parameters" : [ @@ -10172,15 +10033,7 @@ }, { "enumerant" : "MakeTexelVisible", - "value" : "0x0200", - "capabilities" : [ "VulkanMemoryModel" ], - "parameters" : [ - { "kind" : "IdScope" } - ], - "version" : "1.5" - }, - { - "enumerant" : "MakeTexelVisibleKHR", + "aliases" : [ "MakeTexelVisibleKHR" ], "value" : "0x0200", "capabilities" : [ "VulkanMemoryModel" ], "parameters" : [ @@ -10191,12 +10044,7 @@ }, { "enumerant" : "NonPrivateTexel", - "value" : "0x0400", - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "NonPrivateTexelKHR", + "aliases" : [ "NonPrivateTexelKHR" ], "value" : "0x0400", "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -10204,12 +10052,7 @@ }, { "enumerant" : "VolatileTexel", - "value" : "0x0800", - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "VolatileTexelKHR", + "aliases" : [ "VolatileTexelKHR" ], "value" : "0x0800", "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -10276,24 +10119,14 @@ }, { "enumerant" : "AllowContract", - "value" : "0x10000", - "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], - "version" : "None" - }, - { - "enumerant" : "AllowContractFastINTEL", + "aliases" : ["AllowContractFastINTEL"], "value" : "0x10000", "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], "version" : "None" }, { "enumerant" : "AllowReassoc", - "value" : "0x20000", - "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], - "version" : "None" - }, - { - "enumerant" : "AllowReassocINTEL", + "aliases" : ["AllowReassocINTEL"], "value" : "0x20000", "capabilities" : [ "FloatControls2", "FPFastMathModeINTEL" ], "version" : "None" @@ -10531,11 +10364,7 @@ "enumerants" : [ { "enumerant" : "Relaxed", - "value" : "0x0000", - "version" : "1.0" - }, - { - "enumerant" : "None", + "aliases" : ["None"], "value" : "0x0000", "version" : "1.0" }, @@ -10593,12 +10422,7 @@ }, { "enumerant" : "OutputMemory", - "value" : "0x1000", - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "OutputMemoryKHR", + "aliases" : ["OutputMemoryKHR"], "value" : "0x1000", "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -10606,12 +10430,7 @@ }, { "enumerant" : "MakeAvailable", - "value" : "0x2000", - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "MakeAvailableKHR", + "aliases" : ["MakeAvailableKHR"], "value" : "0x2000", "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -10619,12 +10438,7 @@ }, { "enumerant" : "MakeVisible", - "value" : "0x4000", - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "MakeVisibleKHR", + "aliases" : ["MakeVisibleKHR"], "value" : "0x4000", "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -10668,15 +10482,7 @@ }, { "enumerant" : "MakePointerAvailable", - "value" : "0x0008", - "parameters" : [ - { "kind" : "IdScope" } - ], - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "MakePointerAvailableKHR", + "aliases" : ["MakePointerAvailableKHR"], "value" : "0x0008", "parameters" : [ { "kind" : "IdScope" } @@ -10687,15 +10493,7 @@ }, { "enumerant" : "MakePointerVisible", - "value" : "0x0010", - "parameters" : [ - { "kind" : "IdScope" } - ], - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "MakePointerVisibleKHR", + "aliases" : ["MakePointerVisibleKHR"], "value" : "0x0010", "parameters" : [ { "kind" : "IdScope" } @@ -10706,12 +10504,7 @@ }, { "enumerant" : "NonPrivatePointer", - "value" : "0x0020", - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "NonPrivatePointerKHR", + "aliases" : ["NonPrivatePointerKHR"], "value" : "0x0020", "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -11017,72 +10810,42 @@ }, { "enumerant" : "RayGenerationKHR", - "value" : 5313, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "RayGenerationNV", + "aliases" : ["RayGenerationNV"], "value" : 5313, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { "enumerant" : "IntersectionKHR", - "value" : 5314, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "IntersectionNV", + "aliases" : ["IntersectionNV"], "value" : 5314, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { "enumerant" : "AnyHitKHR", - "value" : 5315, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "AnyHitNV", + "aliases" : ["AnyHitNV"], "value" : 5315, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { "enumerant" : "ClosestHitKHR", - "value" : 5316, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "ClosestHitNV", + "aliases" : ["ClosestHitNV"], "value" : 5316, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { "enumerant" : "MissKHR", - "value" : 5317, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "MissNV", + "aliases" : ["MissNV"], "value" : 5317, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" }, { "enumerant" : "CallableKHR", - "value" : 5318, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "CallableNV", + "aliases" : ["CallableNV"], "value" : 5318, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "version" : "None" @@ -11124,17 +10887,11 @@ }, { "enumerant" : "PhysicalStorageBuffer64", + "aliases" : ["PhysicalStorageBuffer64EXT"], "value" : 5348, "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], "capabilities" : [ "PhysicalStorageBufferAddresses" ], "version" : "1.5" - }, - { - "enumerant" : "PhysicalStorageBuffer64EXT", - "value" : 5348, - "extensions" : [ "SPV_EXT_physical_storage_buffer" ], - "capabilities" : [ "PhysicalStorageBufferAddresses" ], - "version" : "1.5" } ] }, @@ -11162,12 +10919,7 @@ }, { "enumerant" : "Vulkan", - "value" : 3, - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "VulkanKHR", + "aliases" : ["VulkanKHR"], "value" : 3, "capabilities" : [ "VulkanMemoryModel" ], "extensions" : [ "SPV_KHR_vulkan_memory_model" ], @@ -11641,13 +11393,7 @@ }, { "enumerant" : "OutputLinesEXT", - "value" : 5269, - "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], - "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], - "version" : "None" - }, - { - "enumerant" : "OutputLinesNV", + "aliases" : ["OutputLinesNV"], "value" : 5269, "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], @@ -11655,16 +11401,7 @@ }, { "enumerant" : "OutputPrimitivesEXT", - "value" : 5270, - "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], - "parameters" : [ - { "kind" : "LiteralInteger", "name" : "'Primitive count'" } - ], - "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], - "version" : "None" - }, - { - "enumerant" : "OutputPrimitivesNV", + "aliases" : ["OutputPrimitivesNV"], "value" : 5270, "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], "parameters" : [ @@ -11675,13 +11412,7 @@ }, { "enumerant" : "DerivativeGroupQuadsKHR", - "value" : 5289, - "capabilities" : [ "ComputeDerivativeGroupQuadsNV", "ComputeDerivativeGroupQuadsKHR" ], - "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], - "version" : "None" - }, - { - "enumerant" : "DerivativeGroupQuadsNV", + "aliases" : ["DerivativeGroupQuadsNV"], "value" : 5289, "capabilities" : [ "ComputeDerivativeGroupQuadsNV", "ComputeDerivativeGroupQuadsKHR" ], "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], @@ -11689,13 +11420,7 @@ }, { "enumerant" : "DerivativeGroupLinearKHR", - "value" : 5290, - "capabilities" : [ "ComputeDerivativeGroupLinearNV", "ComputeDerivativeGroupLinearKHR" ], - "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], - "version" : "None" - }, - { - "enumerant" : "DerivativeGroupLinearNV", + "aliases" : ["DerivativeGroupLinearNV"], "value" : 5290, "capabilities" : [ "ComputeDerivativeGroupLinearNV", "ComputeDerivativeGroupLinearKHR" ], "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], @@ -11703,13 +11428,7 @@ }, { "enumerant" : "OutputTrianglesEXT", - "value" : 5298, - "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], - "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], - "version" : "None" - }, - { - "enumerant" : "OutputTrianglesNV", + "aliases" : ["OutputTrianglesNV"], "value" : 5298, "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], @@ -12023,13 +11742,7 @@ }, { "enumerant" : "CallableDataKHR", - "value" : 5328, - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "CallableDataNV", + "aliases" : ["CallableDataNV"], "value" : 5328, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -12037,13 +11750,7 @@ }, { "enumerant" : "IncomingCallableDataKHR", - "value" : 5329, - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "IncomingCallableDataNV", + "aliases" : ["IncomingCallableDataNV"], "value" : 5329, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -12051,13 +11758,7 @@ }, { "enumerant" : "RayPayloadKHR", - "value" : 5338, - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "RayPayloadNV", + "aliases" : ["RayPayloadNV"], "value" : 5338, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -12065,13 +11766,7 @@ }, { "enumerant" : "HitAttributeKHR", - "value" : 5339, - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "HitAttributeNV", + "aliases" : ["HitAttributeNV"], "value" : 5339, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -12079,13 +11774,7 @@ }, { "enumerant" : "IncomingRayPayloadKHR", - "value" : 5342, - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "IncomingRayPayloadNV", + "aliases" : ["IncomingRayPayloadNV"], "value" : 5342, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -12093,13 +11782,7 @@ }, { "enumerant" : "ShaderRecordBufferKHR", - "value" : 5343, - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "version" : "None" - }, - { - "enumerant" : "ShaderRecordBufferNV", + "aliases" : ["ShaderRecordBufferNV"], "value" : 5343, "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], @@ -12107,18 +11790,12 @@ }, { "enumerant" : "PhysicalStorageBuffer", + "aliases" : ["PhysicalStorageBufferEXT"], "value" : 5349, "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], "capabilities" : [ "PhysicalStorageBufferAddresses" ], "version" : "1.5" }, - { - "enumerant" : "PhysicalStorageBufferEXT", - "value" : 5349, - "extensions" : [ "SPV_EXT_physical_storage_buffer" ], - "capabilities" : [ "PhysicalStorageBufferAddresses" ], - "version" : "1.5" - }, { "enumerant" : "HitObjectAttributeNV", "value" : 5385, @@ -13462,13 +13139,7 @@ }, { "enumerant" : "PerPrimitiveEXT", - "value" : 5271, - "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], - "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], - "version" : "None" - }, - { - "enumerant" : "PerPrimitiveNV", + "aliases" : ["PerPrimitiveNV"], "value" : 5271, "capabilities" : [ "MeshShadingNV", "MeshShadingEXT" ], "extensions" : [ "SPV_NV_mesh_shader", "SPV_EXT_mesh_shader" ], @@ -13490,26 +13161,15 @@ }, { "enumerant" : "PerVertexKHR", + "aliases" : ["PerVertexNV"], "value" : 5285, - "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], - "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], - "version" : "None" - }, - { - "enumerant" : "PerVertexNV", - "value" : 5285, - "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "capabilities" : [ "FragmentBarycentricKHR" ], "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], "version" : "None" }, { "enumerant" : "NonUniform", - "value" : 5300, - "capabilities" : [ "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "NonUniformEXT", + "aliases" : ["NonUniformEXT"], "value" : 5300, "capabilities" : [ "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -13517,32 +13177,20 @@ }, { "enumerant" : "RestrictPointer", + "aliases" : ["RestrictPointerEXT"], "value" : 5355, "capabilities" : [ "PhysicalStorageBufferAddresses" ], "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], "version" : "1.5" }, - { - "enumerant" : "RestrictPointerEXT", - "value" : 5355, - "capabilities" : [ "PhysicalStorageBufferAddresses" ], - "extensions" : [ "SPV_EXT_physical_storage_buffer" ], - "version" : "1.5" - }, { "enumerant" : "AliasedPointer", + "aliases" : ["AliasedPointerEXT"], "value" : 5356, "capabilities" : [ "PhysicalStorageBufferAddresses" ], "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], "version" : "1.5" }, - { - "enumerant" : "AliasedPointerEXT", - "value" : 5356, - "capabilities" : [ "PhysicalStorageBufferAddresses" ], - "extensions" : [ "SPV_EXT_physical_storage_buffer" ], - "version" : "1.5" - }, { "enumerant" : "HitObjectShaderRecordBufferNV", "value" : 5386, @@ -13642,37 +13290,23 @@ }, { "enumerant" : "CounterBuffer", - "value" : 5634, - "parameters" : [ - { "kind" : "IdRef", "name" : "'Counter Buffer'" } - ], - "version" : "1.4" - }, - { - "enumerant" : "HlslCounterBufferGOOGLE", + "aliases" : ["HlslCounterBufferGOOGLE"], "value" : 5634, "parameters" : [ { "kind" : "IdRef", "name" : "'Counter Buffer'" } ], "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], - "version" : "None" - }, - { - "enumerant" : "UserSemantic", - "value" : 5635, - "parameters" : [ - { "kind" : "LiteralString", "name" : "'Semantic'" } - ], "version" : "1.4" }, { - "enumerant" : "HlslSemanticGOOGLE", + "enumerant" : "UserSemantic", + "aliases" : ["HlslSemanticGOOGLE"], "value" : 5635, "parameters" : [ { "kind" : "LiteralString", "name" : "'Semantic'" } ], "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ], - "version" : "None" + "version" : "1.4" }, { "enumerant" : "UserTypeGOOGLE", @@ -14412,12 +14046,7 @@ }, { "enumerant" : "SubgroupEqMask", - "value" : 4416, - "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], - "version" : "1.3" - }, - { - "enumerant" : "SubgroupEqMaskKHR", + "aliases" : ["SubgroupEqMaskKHR"], "value" : 4416, "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], "extensions" : [ "SPV_KHR_shader_ballot" ], @@ -14425,12 +14054,7 @@ }, { "enumerant" : "SubgroupGeMask", - "value" : 4417, - "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], - "version" : "1.3" - }, - { - "enumerant" : "SubgroupGeMaskKHR", + "aliases" : ["SubgroupGeMaskKHR"], "value" : 4417, "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], "extensions" : [ "SPV_KHR_shader_ballot" ], @@ -14438,12 +14062,7 @@ }, { "enumerant" : "SubgroupGtMask", - "value" : 4418, - "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], - "version" : "1.3" - }, - { - "enumerant" : "SubgroupGtMaskKHR", + "aliases" : ["SubgroupGtMaskKHR"], "value" : 4418, "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], "extensions" : [ "SPV_KHR_shader_ballot" ], @@ -14451,12 +14070,7 @@ }, { "enumerant" : "SubgroupLeMask", - "value" : 4419, - "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], - "version" : "1.3" - }, - { - "enumerant" : "SubgroupLeMaskKHR", + "aliases" : ["SubgroupLeMaskKHR"], "value" : 4419, "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], "extensions" : [ "SPV_KHR_shader_ballot" ], @@ -14464,12 +14078,7 @@ }, { "enumerant" : "SubgroupLtMask", - "value" : 4420, - "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], - "version" : "1.3" - }, - { - "enumerant" : "SubgroupLtMaskKHR", + "aliases" : ["SubgroupLtMaskKHR"], "value" : 4420, "capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ], "extensions" : [ "SPV_KHR_shader_ballot" ], @@ -14685,60 +14294,36 @@ }, { "enumerant" : "BaryCoordKHR", + "aliases" : ["BaryCoordNV"], "value" : 5286, - "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], - "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], - "version" : "None" - }, - { - "enumerant" : "BaryCoordNV", - "value" : 5286, - "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "capabilities" : [ "FragmentBarycentricKHR" ], "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], "version" : "None" }, { "enumerant" : "BaryCoordNoPerspKHR", + "aliases" : ["BaryCoordNoPerspNV"], "value" : 5287, - "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], - "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], - "version" : "None" - }, - { - "enumerant" : "BaryCoordNoPerspNV", - "value" : 5287, - "capabilities" : [ "FragmentBarycentricNV", "FragmentBarycentricKHR" ], + "capabilities" : [ "FragmentBarycentricKHR" ], "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], "version" : "None" }, { "enumerant" : "FragSizeEXT", + "aliases" : ["FragmentSizeNV"], "value" : 5292 , - "capabilities" : [ "FragmentDensityEXT", "ShadingRateNV" ], + "capabilities" : [ "FragmentDensityEXT" ], "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ], "version" : "None" }, - { - "enumerant" : "FragmentSizeNV", - "value" : 5292 , - "capabilities" : [ "ShadingRateNV", "FragmentDensityEXT" ], - "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ], - "version" : "None" - }, { "enumerant" : "FragInvocationCountEXT", + "aliases" : ["InvocationsPerPixelNV"], "value" : 5293, - "capabilities" : [ "FragmentDensityEXT", "ShadingRateNV" ], + "capabilities" : [ "FragmentDensityEXT" ], "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ], "version" : "None" }, - { - "enumerant" : "InvocationsPerPixelNV", - "value" : 5293, - "capabilities" : [ "ShadingRateNV", "FragmentDensityEXT" ], - "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ], - "version" : "None" - }, { "enumerant" : "PrimitivePointIndicesEXT", "value" : 5294, @@ -14769,13 +14354,7 @@ }, { "enumerant" : "LaunchIdKHR", - "value" : 5319, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "LaunchIdNV", + "aliases" : ["LaunchIdNV"], "value" : 5319, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14783,13 +14362,7 @@ }, { "enumerant" : "LaunchSizeKHR", - "value" : 5320, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "LaunchSizeNV", + "aliases" : ["LaunchSizeNV"], "value" : 5320, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14797,13 +14370,7 @@ }, { "enumerant" : "WorldRayOriginKHR", - "value" : 5321, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "WorldRayOriginNV", + "aliases" : ["WorldRayOriginNV"], "value" : 5321, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14811,13 +14378,7 @@ }, { "enumerant" : "WorldRayDirectionKHR", - "value" : 5322, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "WorldRayDirectionNV", + "aliases" : ["WorldRayDirectionNV"], "value" : 5322, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14825,13 +14386,7 @@ }, { "enumerant" : "ObjectRayOriginKHR", - "value" : 5323, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "ObjectRayOriginNV", + "aliases" : ["ObjectRayOriginNV"], "value" : 5323, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14839,13 +14394,7 @@ }, { "enumerant" : "ObjectRayDirectionKHR", - "value" : 5324, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "ObjectRayDirectionNV", + "aliases" : ["ObjectRayDirectionNV"], "value" : 5324, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14853,13 +14402,7 @@ }, { "enumerant" : "RayTminKHR", - "value" : 5325, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "RayTminNV", + "aliases" : ["RayTminNV"], "value" : 5325, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14867,13 +14410,7 @@ }, { "enumerant" : "RayTmaxKHR", - "value" : 5326, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "RayTmaxNV", + "aliases" : ["RayTmaxNV"], "value" : 5326, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14881,13 +14418,7 @@ }, { "enumerant" : "InstanceCustomIndexKHR", - "value" : 5327, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "InstanceCustomIndexNV", + "aliases" : ["InstanceCustomIndexNV"], "value" : 5327, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14895,13 +14426,7 @@ }, { "enumerant" : "ObjectToWorldKHR", - "value" : 5330, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "ObjectToWorldNV", + "aliases" : ["ObjectToWorldNV"], "value" : 5330, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14909,13 +14434,7 @@ }, { "enumerant" : "WorldToObjectKHR", - "value" : 5331, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "WorldToObjectNV", + "aliases" : ["WorldToObjectNV"], "value" : 5331, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14930,13 +14449,7 @@ }, { "enumerant" : "HitKindKHR", - "value" : 5333, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "HitKindNV", + "aliases" : ["HitKindNV"], "value" : 5333, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -14969,13 +14482,7 @@ }, { "enumerant" : "IncomingRayFlagsKHR", - "value" : 5351, - "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], - "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], - "version" : "None" - }, - { - "enumerant" : "IncomingRayFlagsNV", + "aliases" : ["IncomingRayFlagsNV"], "value" : 5351, "capabilities" : [ "RayTracingNV" , "RayTracingKHR" ], "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ], @@ -15068,12 +14575,7 @@ }, { "enumerant" : "QueueFamily", - "value" : 5, - "capabilities" : [ "VulkanMemoryModel" ], - "version" : "1.5" - }, - { - "enumerant" : "QueueFamilyKHR", + "aliases" : ["QueueFamilyKHR"], "value" : 5, "capabilities" : [ "VulkanMemoryModel" ], "version" : "1.5" @@ -15649,33 +15151,16 @@ }, { "enumerant" : "StorageBuffer16BitAccess", - "value" : 4433, - "extensions" : [ "SPV_KHR_16bit_storage" ], - "version" : "1.3" - }, - { - "enumerant" : "StorageUniformBufferBlock16", + "aliases" : ["StorageUniformBufferBlock16"], "value" : 4433, "extensions" : [ "SPV_KHR_16bit_storage" ], "version" : "1.3" }, { "enumerant" : "UniformAndStorageBuffer16BitAccess", + "aliases" : ["StorageUniform16"], "value" : 4434, - "capabilities" : [ - "StorageBuffer16BitAccess", - "StorageUniformBufferBlock16" - ], - "extensions" : [ "SPV_KHR_16bit_storage" ], - "version" : "1.3" - }, - { - "enumerant" : "StorageUniform16", - "value" : 4434, - "capabilities" : [ - "StorageBuffer16BitAccess", - "StorageUniformBufferBlock16" - ], + "capabilities" : [ "StorageBuffer16BitAccess" ], "extensions" : [ "SPV_KHR_16bit_storage" ], "version" : "1.3" }, @@ -15914,22 +15399,16 @@ }, { "enumerant" : "ShaderViewportIndexLayerEXT", + "aliases" : ["ShaderViewportIndexLayerNV"], "value" : 5254, "capabilities" : [ "MultiViewport" ], - "extensions" : [ "SPV_EXT_shader_viewport_index_layer" ], - "version" : "None" - }, - { - "enumerant" : "ShaderViewportIndexLayerNV", - "value" : 5254, - "capabilities" : [ "MultiViewport" ], - "extensions" : [ "SPV_NV_viewport_array2" ], + "extensions" : [ "SPV_EXT_shader_viewport_index_layer", "SPV_NV_viewport_array2" ], "version" : "None" }, { "enumerant" : "ShaderViewportMaskNV", "value" : 5255, - "capabilities" : [ "ShaderViewportIndexLayerNV" ], + "capabilities" : [ "ShaderViewportIndexLayerEXT" ], "extensions" : [ "SPV_NV_viewport_array2" ], "version" : "None" }, @@ -15976,25 +15455,14 @@ }, { "enumerant" : "FragmentBarycentricKHR", - "value" : 5284, - "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], - "version" : "None" - }, - { - "enumerant" : "FragmentBarycentricNV", + "aliases" : ["FragmentBarycentricNV"], "value" : 5284, "extensions" : [ "SPV_NV_fragment_shader_barycentric", "SPV_KHR_fragment_shader_barycentric" ], "version" : "None" }, { "enumerant" : "ComputeDerivativeGroupQuadsKHR", - "value" : 5288, - "capabilities" : [ "Shader" ], - "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], - "version" : "None" - }, - { - "enumerant" : "ComputeDerivativeGroupQuadsNV", + "aliases" : ["ComputeDerivativeGroupQuadsNV"], "value" : 5288, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], @@ -16002,18 +15470,12 @@ }, { "enumerant" : "FragmentDensityEXT", + "aliases" : ["ShadingRateNV"], "value" : 5291, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_EXT_fragment_invocation_density", "SPV_NV_shading_rate" ], "version" : "None" }, - { - "enumerant" : "ShadingRateNV", - "value" : 5291, - "capabilities" : [ "Shader" ], - "extensions" : [ "SPV_NV_shading_rate", "SPV_EXT_fragment_invocation_density" ], - "version" : "None" - }, { "enumerant" : "GroupNonUniformPartitionedNV", "value" : 5297, @@ -16022,12 +15484,7 @@ }, { "enumerant" : "ShaderNonUniform", - "value" : 5301, - "capabilities" : [ "Shader" ], - "version" : "1.5" - }, - { - "enumerant" : "ShaderNonUniformEXT", + "aliases" : ["ShaderNonUniformEXT"], "value" : 5301, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16035,12 +15492,7 @@ }, { "enumerant" : "RuntimeDescriptorArray", - "value" : 5302, - "capabilities" : [ "Shader" ], - "version" : "1.5" - }, - { - "enumerant" : "RuntimeDescriptorArrayEXT", + "aliases" : ["RuntimeDescriptorArrayEXT"], "value" : 5302, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16048,12 +15500,7 @@ }, { "enumerant" : "InputAttachmentArrayDynamicIndexing", - "value" : 5303, - "capabilities" : [ "InputAttachment" ], - "version" : "1.5" - }, - { - "enumerant" : "InputAttachmentArrayDynamicIndexingEXT", + "aliases" : ["InputAttachmentArrayDynamicIndexingEXT"], "value" : 5303, "capabilities" : [ "InputAttachment" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16061,12 +15508,7 @@ }, { "enumerant" : "UniformTexelBufferArrayDynamicIndexing", - "value" : 5304, - "capabilities" : [ "SampledBuffer" ], - "version" : "1.5" - }, - { - "enumerant" : "UniformTexelBufferArrayDynamicIndexingEXT", + "aliases" : ["UniformTexelBufferArrayDynamicIndexingEXT"], "value" : 5304, "capabilities" : [ "SampledBuffer" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16074,12 +15516,7 @@ }, { "enumerant" : "StorageTexelBufferArrayDynamicIndexing", - "value" : 5305, - "capabilities" : [ "ImageBuffer" ], - "version" : "1.5" - }, - { - "enumerant" : "StorageTexelBufferArrayDynamicIndexingEXT", + "aliases" : ["StorageTexelBufferArrayDynamicIndexingEXT"], "value" : 5305, "capabilities" : [ "ImageBuffer" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16087,12 +15524,7 @@ }, { "enumerant" : "UniformBufferArrayNonUniformIndexing", - "value" : 5306, - "capabilities" : [ "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "UniformBufferArrayNonUniformIndexingEXT", + "aliases" : ["UniformBufferArrayNonUniformIndexingEXT"], "value" : 5306, "capabilities" : [ "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16100,12 +15532,7 @@ }, { "enumerant" : "SampledImageArrayNonUniformIndexing", - "value" : 5307, - "capabilities" : [ "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "SampledImageArrayNonUniformIndexingEXT", + "aliases" : ["SampledImageArrayNonUniformIndexingEXT"], "value" : 5307, "capabilities" : [ "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16113,12 +15540,7 @@ }, { "enumerant" : "StorageBufferArrayNonUniformIndexing", - "value" : 5308, - "capabilities" : [ "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "StorageBufferArrayNonUniformIndexingEXT", + "aliases" : ["StorageBufferArrayNonUniformIndexingEXT"], "value" : 5308, "capabilities" : [ "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16126,12 +15548,7 @@ }, { "enumerant" : "StorageImageArrayNonUniformIndexing", - "value" : 5309, - "capabilities" : [ "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "StorageImageArrayNonUniformIndexingEXT", + "aliases" : ["StorageImageArrayNonUniformIndexingEXT"], "value" : 5309, "capabilities" : [ "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16139,12 +15556,7 @@ }, { "enumerant" : "InputAttachmentArrayNonUniformIndexing", - "value" : 5310, - "capabilities" : [ "InputAttachment", "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "InputAttachmentArrayNonUniformIndexingEXT", + "aliases" : ["InputAttachmentArrayNonUniformIndexingEXT"], "value" : 5310, "capabilities" : [ "InputAttachment", "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16152,12 +15564,7 @@ }, { "enumerant" : "UniformTexelBufferArrayNonUniformIndexing", - "value" : 5311, - "capabilities" : [ "SampledBuffer", "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "UniformTexelBufferArrayNonUniformIndexingEXT", + "aliases" : ["UniformTexelBufferArrayNonUniformIndexingEXT"], "value" : 5311, "capabilities" : [ "SampledBuffer", "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16165,12 +15572,7 @@ }, { "enumerant" : "StorageTexelBufferArrayNonUniformIndexing", - "value" : 5312, - "capabilities" : [ "ImageBuffer", "ShaderNonUniform" ], - "version" : "1.5" - }, - { - "enumerant" : "StorageTexelBufferArrayNonUniformIndexingEXT", + "aliases" : ["StorageTexelBufferArrayNonUniformIndexingEXT"], "value" : 5312, "capabilities" : [ "ImageBuffer", "ShaderNonUniform" ], "extensions" : [ "SPV_EXT_descriptor_indexing" ], @@ -16199,49 +15601,29 @@ }, { "enumerant" : "VulkanMemoryModel", - "value" : 5345, - "version" : "1.5" - }, - { - "enumerant" : "VulkanMemoryModelKHR", + "aliases" : ["VulkanMemoryModelKHR"], "value" : 5345, "extensions" : [ "SPV_KHR_vulkan_memory_model" ], "version" : "1.5" }, { "enumerant" : "VulkanMemoryModelDeviceScope", - "value" : 5346, - "version" : "1.5" - }, - { - "enumerant" : "VulkanMemoryModelDeviceScopeKHR", + "aliases" : ["VulkanMemoryModelDeviceScopeKHR"], "value" : 5346, "extensions" : [ "SPV_KHR_vulkan_memory_model" ], "version" : "1.5" }, { "enumerant" : "PhysicalStorageBufferAddresses", + "aliases" : ["PhysicalStorageBufferAddressesEXT"], "value" : 5347, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_EXT_physical_storage_buffer", "SPV_KHR_physical_storage_buffer" ], "version" : "1.5" }, - { - "enumerant" : "PhysicalStorageBufferAddressesEXT", - "value" : 5347, - "capabilities" : [ "Shader" ], - "extensions" : [ "SPV_EXT_physical_storage_buffer" ], - "version" : "1.5" - }, { "enumerant" : "ComputeDerivativeGroupLinearKHR", - "value" : 5350, - "capabilities" : [ "Shader" ], - "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], - "version" : "None" - }, - { - "enumerant" : "ComputeDerivativeGroupLinearNV", + "aliases" : ["ComputeDerivativeGroupLinearNV"], "value" : 5350, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_NV_compute_shader_derivatives", "SPV_KHR_compute_shader_derivatives" ], @@ -16291,12 +15673,7 @@ }, { "enumerant" : "DemoteToHelperInvocation", - "value" : 5379, - "capabilities" : [ "Shader" ], - "version" : "1.6" - }, - { - "enumerant" : "DemoteToHelperInvocationEXT", + "aliases" : ["DemoteToHelperInvocationEXT"], "value" : 5379, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_EXT_demote_to_helper_invocation" ], @@ -16612,23 +15989,14 @@ }, { "enumerant" : "DotProductInputAll", - "value" : 6016, - "version" : "1.6" - }, - { - "enumerant" : "DotProductInputAllKHR", + "aliases" : ["DotProductInputAllKHR"], "value" : 6016, "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "enumerant" : "DotProductInput4x8Bit", - "value" : 6017, - "capabilities" : [ "Int8" ], - "version" : "1.6" - }, - { - "enumerant" : "DotProductInput4x8BitKHR", + "aliases" : ["DotProductInput4x8BitKHR"], "value" : 6017, "capabilities" : [ "Int8" ], "extensions" : [ "SPV_KHR_integer_dot_product" ], @@ -16636,22 +16004,14 @@ }, { "enumerant" : "DotProductInput4x8BitPacked", - "value" : 6018, - "version" : "1.6" - }, - { - "enumerant" : "DotProductInput4x8BitPackedKHR", + "aliases" : ["DotProductInput4x8BitPackedKHR"], "value" : 6018, "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" }, { "enumerant" : "DotProduct", - "value" : 6019, - "version" : "1.6" - }, - { - "enumerant" : "DotProductKHR", + "aliases" : ["DotProductKHR"], "value" : 6019, "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" @@ -16883,11 +16243,7 @@ "enumerants" : [ { "enumerant" : "PackedVectorFormat4x8Bit", - "value" : 0, - "version" : "1.6" - }, - { - "enumerant" : "PackedVectorFormat4x8BitKHR", + "aliases" : ["PackedVectorFormat4x8BitKHR"], "value" : 0, "extensions" : [ "SPV_KHR_integer_dot_product" ], "version" : "1.6" diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp index 9f7264abf..f8e462724 100644 --- a/tools/buildHeaders/header.cpp +++ b/tools/buildHeaders/header.cpp @@ -243,6 +243,10 @@ IN THE MATERIALS. for (auto& enumRow : enumSet) { std::string name = enumRow.name; enums[e - spv::OperandSource]["Values"][name] = enumRow.value; + // Add aliases + for (auto& alias : enumRow.aliases) { + enums[e - spv::OperandSource]["Values"][alias] = enumRow.value; + } } enums[e - spv::OperandSource]["Type"] = mask ? "Bit" : "Value"; @@ -255,6 +259,10 @@ IN THE MATERIALS. for (auto& enumRow : spv::InstructionDesc) { std::string name = enumRow.name; entry["Values"][name] = enumRow.value; + // Add aliases + for (auto& alias : enumRow.aliases) { + entry["Values"][alias] = enumRow.value; + } } entry["Type"] = "Value"; entry["Name"] = "Op"; diff --git a/tools/buildHeaders/jsonToSpirv.cpp b/tools/buildHeaders/jsonToSpirv.cpp index a821a1c28..46cf83e7d 100644 --- a/tools/buildHeaders/jsonToSpirv.cpp +++ b/tools/buildHeaders/jsonToSpirv.cpp @@ -474,37 +474,6 @@ unsigned int NumberStringToBit(const std::string& str) return bit; } -// Given two pairs (name and in core) compares if the order is correct for naming -// conventions. The conventions are: -// * Core -// * KHR -// * EXT -// * Vendor (no preference between vendors) -// -// Returns true if the order is valid. -bool SuffixComparison(const std::string& prev, bool prevCore, - const std::string& cur, bool curCore) -{ - // Duplicate entry - if (prev == cur) return false; - - if (prevCore) return true; - if (curCore) return false; - - // Both are suffixed names. - const bool prevKHR = prev.substr(prev.size() - 3) == "KHR"; - const bool prevEXT = prev.substr(prev.size() - 3) == "EXT"; - const bool curKHR = cur.substr(cur.size() - 3) == "KHR"; - const bool curEXT = cur.substr(cur.size() - 3) == "EXT"; - - if (prevKHR) return true; - if (curKHR) return false; - if (prevEXT) return true; - if (curEXT) return false; - - return true; -} - void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) { // only do this once. @@ -562,6 +531,18 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) return result; }; + const auto getAliases = [](const Json::Value& object) { + Aliases result; + const auto& aliases = object["aliases"]; + if (!aliases.empty()) { + assert(aliases.isArray()); + for (const auto& alias : aliases) { + result.emplace_back(alias.asString()); + } + } + return result; + }; + // set up the printing classes std::unordered_set tags; // short-lived local for error checking below const Json::Value printingClasses = root["instruction_printing_class"]; @@ -613,12 +594,9 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) << " is out of order. It follows the instruction with opcode " << maxOpcode << std::endl; std::exit(1); - } else if (maxOpcode == opcode && - !SuffixComparison(maxName, maxCore, name, - version != "None")) { - std::cerr << "Error: " << name - << " is out of order. It follows alias " << maxName - << std::endl; + } else if (maxOpcode == opcode) { + std::cerr << "Error: " << name << " is an alias of " << maxName + << ". Use \"aliases\" instead." << std::endl; std::exit(1); } else { maxOpcode = opcode; @@ -626,6 +604,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) maxCore = version != "None"; } } + Aliases aliases = getAliases(inst); EnumCaps caps = getCaps(inst); std::string lastVersion = inst["lastVersion"].asString(); Extensions exts = getExts(inst); @@ -642,7 +621,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) } } InstructionDesc.emplace_back( - std::move(EnumValue(opcode, name, + std::move(EnumValue(opcode, name, std::move(aliases), std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(operands))), printingClass, defTypeId, defResultId); @@ -654,7 +633,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) // Specific additional context-dependent operands // Populate dest with EnumValue objects constructed from source. - const auto populateEnumValues = [&getCaps,&getExts,&errorCount](EnumValues* dest, const Json::Value& source, bool bitEnum) { + const auto populateEnumValues = [&getCaps,&getAliases,&getExts,&errorCount](EnumValues* dest, const Json::Value& source, bool bitEnum) { // A lambda for determining the numeric value to be used for a given // enumerant in JSON form, and whether that value is a 0 in a bitfield. auto getValue = [&bitEnum](const Json::Value& enumerant) { @@ -694,11 +673,9 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) << " is out of order. It has value " << value << " but follows the enumerant with value " << maxValue << std::endl; std::exit(1); - } else if (maxValue == value && - !SuffixComparison(maxName, maxCore, name, - version != "None")) { + } else if (maxValue == value ) { std::cerr << "Error: " << source["kind"] << " enumerant " << name - << " is out of order. It follows alias " << maxName << std::endl; + << " is an alias of " << maxName << ". Use \"aliases\" instead." << std::endl; std::exit(1); } else { maxValue = value; @@ -706,6 +683,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) maxCore = version != "None"; } } + Aliases aliases = getAliases(enumerant); EnumCaps caps(getCaps(enumerant)); std::string lastVersion = enumerant["lastVersion"].asString(); Extensions exts(getExts(enumerant)); @@ -721,7 +699,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) } } dest->emplace_back( - value, enumerant["enumerant"].asString(), + value, enumerant["enumerant"].asString(), std::move(aliases), std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(params)); } }; diff --git a/tools/buildHeaders/jsonToSpirv.h b/tools/buildHeaders/jsonToSpirv.h index f07e96a76..19376cad9 100644 --- a/tools/buildHeaders/jsonToSpirv.h +++ b/tools/buildHeaders/jsonToSpirv.h @@ -125,6 +125,9 @@ typedef std::vector EnumCaps; // A set of extensions. typedef std::vector Extensions; +// A set of aliases. +typedef std::vector Aliases; + // Parameterize a set of operands with their OperandClass(es) and descriptions. class OperandParameters { public: @@ -205,18 +208,21 @@ class EnumValuesContainer { class EnumValue { public: EnumValue() : value(0), desc(nullptr) {} - EnumValue(unsigned int the_value, const std::string& the_name, EnumCaps&& the_caps, + EnumValue(unsigned int the_value, const std::string& the_name, Aliases&& the_aliases, EnumCaps&& the_caps, const std::string& the_firstVersion, const std::string& the_lastVersion, Extensions&& the_extensions, OperandParameters&& the_operands) : - value(the_value), name(the_name), capabilities(std::move(the_caps)), + value(the_value), name(the_name), aliases(std::move(the_aliases)), capabilities(std::move(the_caps)), firstVersion(std::move(the_firstVersion)), lastVersion(std::move(the_lastVersion)), extensions(std::move(the_extensions)), operands(std::move(the_operands)), desc(nullptr) { } + bool hasAliases() const { return !aliases.empty(); } + // For ValueEnum, the value from the JSON file. // For BitEnum, the index of the bit position represented by this mask. // (That is, what you shift 1 by to get the mask.) unsigned value; std::string name; + Aliases aliases; EnumCaps capabilities; std::string firstVersion; std::string lastVersion; @@ -278,19 +284,14 @@ class InstructionValue : public EnumValue { printingClass(printClass), opDesc("TBD."), typePresent(has_type), - resultPresent(has_result), - alias(this) { } + resultPresent(has_result) { } InstructionValue(const InstructionValue& v) { *this = v; - alias = this; } bool hasResult() const { return resultPresent != 0; } bool hasType() const { return typePresent != 0; } - void setAlias(const InstructionValue& a) { alias = &a; } - const InstructionValue& getAlias() const { return *alias; } - bool isAlias() const { return alias != this; } std::string printingClass; const char* opDesc; @@ -298,7 +299,6 @@ class InstructionValue : public EnumValue { protected: int typePresent : 1; int resultPresent : 1; - const InstructionValue* alias; // correct only after discovering the aliases; otherwise points to this }; using InstructionValues = EnumValuesContainer;