Browse Source

Updated spirv-headers.

Бранимир Караџић 6 years ago
parent
commit
44b5913550

+ 2 - 1
3rdparty/spirv-headers/include/spirv/spir-v.xml

@@ -70,7 +70,8 @@
         <id value="18"  vendor="Wine" tool="VKD3D Shader Compiler" comment="Contact [email protected]"/>
         <id value="19"  vendor="Clay" tool="Clay Shader Compiler" comment="Contact [email protected]"/>
         <id value="20"  vendor="W3C WebGPU Group" tool="WHLSL Shader Translator" comment="https://github.com/gpuweb/WHLSL"/>
-        <unused start="21" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
+        <id value="21"  vendor="Google" tool="Clspv" comment="Contact David Neto, [email protected]"/>
+        <unused start="22" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
     </ids>
 
     <!-- SECTION: SPIR-V Opcodes and Enumerants -->

+ 459 - 141
3rdparty/spirv-headers/include/spirv/unified1/spirv.core.grammar.json

@@ -26,7 +26,7 @@
   ],
   "magic_number" : "0x07230203",
   "major_version" : 1,
-  "minor_version" : 3,
+  "minor_version" : 4,
   "revision" : 1,
   "instructions" : [
     {
@@ -519,6 +519,7 @@
       "operands" : [
         { "kind" : "IdRef",                            "name" : "'Target'" },
         { "kind" : "IdRef",                            "name" : "'Source'" },
+        { "kind" : "MemoryAccess", "quantifier" : "?" },
         { "kind" : "MemoryAccess", "quantifier" : "?" }
       ]
     },
@@ -529,6 +530,7 @@
         { "kind" : "IdRef",                            "name" : "'Target'" },
         { "kind" : "IdRef",                            "name" : "'Source'" },
         { "kind" : "IdRef",                            "name" : "'Size'" },
+        { "kind" : "MemoryAccess", "quantifier" : "?" },
         { "kind" : "MemoryAccess", "quantifier" : "?" }
       ],
       "capabilities" : [ "Addresses" ]
@@ -2100,7 +2102,8 @@
         { "kind" : "IdRef",             "name" : "'Value'" },
         { "kind" : "IdRef",             "name" : "'Comparator'" }
       ],
-      "capabilities" : [ "Kernel" ]
+      "capabilities" : [ "Kernel" ],
+      "lastVersion" : "1.3"
     },
     {
       "opname" : "OpAtomicIIncrement",
@@ -3605,6 +3608,50 @@
       "capabilities" : [ "GroupNonUniformQuad" ],
       "version" : "1.3"
     },
+    {
+      "opname" : "OpCopyLogical",
+      "opcode" : 400,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand'" }
+      ],
+      "version" : "1.4"
+    },
+    {
+      "opname" : "OpPtrEqual",
+      "opcode" : 401,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "version" : "1.4"
+    },
+    {
+      "opname" : "OpPtrNotEqual",
+      "opcode" : 402,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "version" : "1.4"
+    },
+    {
+      "opname" : "OpPtrDiff",
+      "opcode" : 403,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "Addresses", "VariablePointers", "VariablePointersStorageBuffer" ],
+      "version" : "1.4"
+    },
     {
       "opname" : "OpSubgroupBallotKHR",
       "opcode" : 4421,
@@ -3823,6 +3870,34 @@
       "extensions" : [ "SPV_AMD_shader_fragment_mask" ],
       "version" : "None"
     },
+    {
+      "opname" : "OpImageSampleFootprintNV",
+      "opcode" : 5283,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Sampled Image'" },
+        { "kind" : "IdRef", "name" : "'Coordinate'" },
+        { "kind" : "IdRef", "name" : "'Granularity'" },
+        { "kind" : "IdRef", "name" : "'Coarse'" },
+        { "kind" : "ImageOperands", "quantifier" : "?" }
+      ],
+      "capabilities" : [ "ImageFootprintNV" ],
+      "extensions" : [ "SPV_NV_shader_image_footprint" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpGroupNonUniformPartitionNV",
+      "opcode" : 5296,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Value'" }
+      ],
+      "capabilities" : [ "GroupNonUniformPartitionedNV" ],
+      "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ],
+      "version" : "None"
+    },
     {
       "opname" : "OpWritePackedPrimitiveIndices4x8NV",
       "opcode" : 5299,
@@ -3900,6 +3975,75 @@
       "capabilities" : [ "RayTracingNV" ],
       "extensions" : [ "SPV_NV_ray_tracing" ]
     },
+    {
+      "opname" : "OpTypeCooperativeMatrixNV",
+      "opcode" : 5358,
+      "operands" : [
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Component Type'" },
+        { "kind" : "IdScope",      "name" : "'Execution'" },
+        { "kind" : "IdRef",        "name" : "'Rows'" },
+        { "kind" : "IdRef",        "name" : "'Columns'" }
+      ],
+      "capabilities" : [ "CooperativeMatrixNV" ],
+      "extensions" : [ "SPV_NV_cooperative_matrix" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpCooperativeMatrixLoadNV",
+      "opcode" : 5359,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",             "name" : "'Pointer'" },
+        { "kind" : "IdRef",             "name" : "'Stride'" },
+        { "kind" : "IdRef",             "name" : "'Column Major'" },
+        { "kind" : "MemoryAccess",      "quantifier" : "?" }
+      ],
+      "capabilities" : [ "CooperativeMatrixNV" ],
+      "extensions" : [ "SPV_NV_cooperative_matrix" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpCooperativeMatrixStoreNV",
+      "opcode" : 5360,
+      "operands" : [
+        { "kind" : "IdRef",             "name" : "'Pointer'" },
+        { "kind" : "IdRef",             "name" : "'Object'" },
+        { "kind" : "IdRef",             "name" : "'Stride'" },
+        { "kind" : "IdRef",             "name" : "'Column Major'" },
+        { "kind" : "MemoryAccess",      "quantifier" : "?" }
+      ],
+      "capabilities" : [ "CooperativeMatrixNV" ],
+      "extensions" : [ "SPV_NV_cooperative_matrix" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpCooperativeMatrixMulAddNV",
+      "opcode" : 5361,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",             "name" : "'A'" },
+        { "kind" : "IdRef",             "name" : "'B'" },
+        { "kind" : "IdRef",             "name" : "'C'" }
+      ],
+      "capabilities" : [ "CooperativeMatrixNV" ],
+      "extensions" : [ "SPV_NV_cooperative_matrix" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpCooperativeMatrixLengthNV",
+      "opcode" : 5362,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Type'" }
+      ],
+      "capabilities" : [ "CooperativeMatrixNV" ],
+      "extensions" : [ "SPV_NV_cooperative_matrix" ],
+      "version" : "None"
+    },
     {
       "opname" : "OpSubgroupShuffleINTEL",
       "opcode" : 5571,
@@ -4021,6 +4165,214 @@
       "capabilities" : [ "SubgroupImageMediaBlockIOINTEL" ],
       "version" : "None"
     },
+    {
+      "opname" : "OpUCountLeadingZerosINTEL",
+      "opcode" : 5585,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpUCountTrailingZerosINTEL",
+      "opcode" : 5586,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpAbsISubINTEL",
+      "opcode" : 5587,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpAbsUSubINTEL",
+      "opcode" : 5588,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpIAddSatINTEL",
+      "opcode" : 5589,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpUAddSatINTEL",
+      "opcode" : 5590,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpIAverageINTEL",
+      "opcode" : 5591,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpUAverageINTEL",
+      "opcode" : 5592,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpIAverageRoundedINTEL",
+      "opcode" : 5593,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpUAverageRoundedINTEL",
+      "opcode" : 5594,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpISubSatINTEL",
+      "opcode" : 5595,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpUSubSatINTEL",
+      "opcode" : 5596,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpIMul32x16INTEL",
+      "opcode" : 5597,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpUMul32x16INTEL",
+      "opcode" : 5598,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef",        "name" : "'Operand 1'" },
+        { "kind" : "IdRef",        "name" : "'Operand 2'" }
+      ],
+      "capabilities" : [ "IntegerFunctions2INTEL" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpDecorateString",
+      "opcode" : 5632,
+      "operands" : [
+        { "kind" : "IdRef",         "name" : "'Target'" },
+        { "kind" : "Decoration" }
+      ],
+      "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ],
+      "version" : "1.4"
+    },
+    {
+      "opname" : "OpDecorateStringGOOGLE",
+      "opcode" : 5632,
+      "operands" : [
+        { "kind" : "IdRef",         "name" : "'Target'" },
+        { "kind" : "Decoration" }
+      ],
+      "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ],
+      "version" : "1.4"
+    },
+    {
+      "opname" : "OpMemberDecorateString",
+      "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",
+      "opcode" : 5633,
+      "operands" : [
+        { "kind" : "IdRef",          "name" : "'Struct Type'" },
+        { "kind" : "LiteralInteger", "name" : "'Member'" },
+        { "kind" : "Decoration" }
+      ],
+      "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ],
+      "version" : "1.4"
+    },
     {
       "opname" : "OpVmeImageINTEL",
       "opcode" : 5699,
@@ -5419,124 +5771,6 @@
       ],
       "capabilities" : [ "SubgroupAvcMotionEstimationINTEL" ],
       "version" : "None"
-    },	
-    {
-      "opname" : "OpDecorateStringGOOGLE",
-      "opcode" : 5632,
-      "operands" : [
-        { "kind" : "IdRef",         "name" : "'Target'" },
-        { "kind" : "Decoration" }
-      ],
-      "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpMemberDecorateStringGOOGLE",
-      "opcode" : 5633,
-      "operands" : [
-        { "kind" : "IdRef",          "name" : "'Struct Type'" },
-        { "kind" : "LiteralInteger", "name" : "'Member'" },
-        { "kind" : "Decoration" }
-      ],
-      "extensions" : [ "SPV_GOOGLE_decorate_string", "SPV_GOOGLE_hlsl_functionality1" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpGroupNonUniformPartitionNV",
-      "opcode" : 5296,
-      "operands" : [
-        { "kind" : "IdResultType" },
-        { "kind" : "IdResult" },
-        { "kind" : "IdRef", "name" : "'Value'" }
-      ],
-      "capabilities" : [ "GroupNonUniformPartitionedNV" ],
-      "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ],
-      "version" : "None"
-    },
-	{
-      "opname" : "OpImageSampleFootprintNV",
-      "opcode" : 5283,
-      "operands" : [
-        { "kind" : "IdResultType" },
-        { "kind" : "IdResult" },
-        { "kind" : "IdRef", "name" : "'Sampled Image'" },
-        { "kind" : "IdRef", "name" : "'Coordinate'" },
-        { "kind" : "IdRef", "name" : "'Granularity'" },
-        { "kind" : "IdRef", "name" : "'Coarse'" },
-        { "kind" : "ImageOperands", "quantifier" : "?" }
-      ],
-      "capabilities" : [ "ImageFootprintNV" ],
-      "extensions" : [ "SPV_NV_shader_image_footprint" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpTypeCooperativeMatrixNV",
-      "opcode" : 5358,
-      "operands" : [
-        { "kind" : "IdResult" },
-        { "kind" : "IdRef",        "name" : "'Component Type'" },
-        { "kind" : "IdScope",      "name" : "'Execution'" },
-        { "kind" : "IdRef",        "name" : "'Rows'" },
-        { "kind" : "IdRef",        "name" : "'Columns'" }
-      ],
-      "capabilities" : [ "CooperativeMatrixNV" ],
-      "extensions" : [ "SPV_NV_cooperative_matrix" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpCooperativeMatrixLoadNV",
-      "opcode" : 5359,
-      "operands" : [
-        { "kind" : "IdResultType" },
-        { "kind" : "IdResult" },
-        { "kind" : "IdRef",             "name" : "'Pointer'" },
-        { "kind" : "IdRef",             "name" : "'Stride'" },
-        { "kind" : "IdRef",             "name" : "'Column Major'" },
-        { "kind" : "MemoryAccess",      "quantifier" : "?" }
-      ],
-      "capabilities" : [ "CooperativeMatrixNV" ],
-      "extensions" : [ "SPV_NV_cooperative_matrix" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpCooperativeMatrixStoreNV",
-      "opcode" : 5360,
-      "operands" : [
-        { "kind" : "IdRef",             "name" : "'Pointer'" },
-        { "kind" : "IdRef",             "name" : "'Object'" },
-        { "kind" : "IdRef",             "name" : "'Stride'" },
-        { "kind" : "IdRef",             "name" : "'Column Major'" },
-        { "kind" : "MemoryAccess",      "quantifier" : "?" }
-      ],
-      "capabilities" : [ "CooperativeMatrixNV" ],
-      "extensions" : [ "SPV_NV_cooperative_matrix" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpCooperativeMatrixMulAddNV",
-      "opcode" : 5361,
-      "operands" : [
-        { "kind" : "IdResultType" },
-        { "kind" : "IdResult" },
-        { "kind" : "IdRef",             "name" : "'A'" },
-        { "kind" : "IdRef",             "name" : "'B'" },
-        { "kind" : "IdRef",             "name" : "'C'" }
-      ],
-      "capabilities" : [ "CooperativeMatrixNV" ],
-      "extensions" : [ "SPV_NV_cooperative_matrix" ],
-      "version" : "None"
-    },
-    {
-      "opname" : "OpCooperativeMatrixLengthNV",
-      "opcode" : 5362,
-      "operands" : [
-        { "kind" : "IdResultType" },
-        { "kind" : "IdResult" },
-        { "kind" : "IdRef",        "name" : "'Type'" }
-      ],
-      "capabilities" : [ "CooperativeMatrixNV" ],
-      "extensions" : [ "SPV_NV_cooperative_matrix" ],
-      "version" : "None"
     }
   ],
   "operand_kinds" : [
@@ -5634,6 +5868,16 @@
           "enumerant" : "VolatileTexelKHR",
           "value" : "0x0800",
           "capabilities" : [ "VulkanMemoryModelKHR" ]
+        },
+        {
+          "enumerant" : "SignExtend",
+          "value" : "0x1000",
+          "version" : "1.4"
+        },
+        {
+          "enumerant" : "ZeroExtend",
+          "value" : "0x2000",
+          "version" : "1.4"
         }
       ]
     },
@@ -5718,6 +5962,46 @@
             { "kind" : "LiteralInteger" }
           ],
           "version" : "1.1"
+        },
+        {
+          "enumerant" : "MinIterations",
+          "value" : "0x0010",
+          "parameters" : [
+            { "kind" : "LiteralInteger" }
+          ],
+          "version" : "1.4"
+        },
+        {
+          "enumerant" : "MaxIterations",
+          "value" : "0x0020",
+          "parameters" : [
+            { "kind" : "LiteralInteger" }
+          ],
+          "version" : "1.4"
+        },
+        {
+          "enumerant" : "IterationMultiple",
+          "value" : "0x0040",
+          "parameters" : [
+            { "kind" : "LiteralInteger" }
+          ],
+          "version" : "1.4"
+        },
+        {
+          "enumerant" : "PeelCount",
+          "value" : "0x0080",
+          "parameters" : [
+            { "kind" : "LiteralInteger" }
+          ],
+          "version" : "1.4"
+        },
+        {
+          "enumerant" : "PartialCount",
+          "value" : "0x0100",
+          "parameters" : [
+            { "kind" : "LiteralInteger" }
+          ],
+          "version" : "1.4"
         }
       ]
     },
@@ -6284,55 +6568,55 @@
           "extensions" : [ "SPV_KHR_post_depth_coverage" ],
           "version" : "None"
         },
-{
+        {
           "enumerant" : "DenormPreserve",
           "value" : 4459,
-          "capabilities" : [ "DenormPreserve"],
+          "capabilities" : [ "DenormPreserve" ],
           "extensions" : [ "SPV_KHR_float_controls" ],
           "parameters" : [
             { "kind" : "LiteralInteger", "name" : "'Target Width'" }
           ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "DenormFlushToZero",
           "value" : 4460,
-          "capabilities" : [ "DenormFlushToZero"],
+          "capabilities" : [ "DenormFlushToZero" ],
           "extensions" : [ "SPV_KHR_float_controls" ],
           "parameters" : [
             { "kind" : "LiteralInteger", "name" : "'Target Width'" }
           ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "SignedZeroInfNanPreserve",
           "value" : 4461,
-          "capabilities" : [ "SignedZeroInfNanPreserve"],
+          "capabilities" : [ "SignedZeroInfNanPreserve" ],
           "extensions" : [ "SPV_KHR_float_controls" ],
           "parameters" : [
             { "kind" : "LiteralInteger", "name" : "'Target Width'" }
           ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "RoundingModeRTE",
           "value" : 4462,
-          "capabilities" : [ "RoundingModeRTE"],
+          "capabilities" : [ "RoundingModeRTE" ],
           "extensions" : [ "SPV_KHR_float_controls" ],
           "parameters" : [
             { "kind" : "LiteralInteger", "name" : "'Target Width'" }
           ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "RoundingModeRTZ",
           "value" : 4463,
-          "capabilities" : [ "RoundingModeRTZ"],
+          "capabilities" : [ "RoundingModeRTZ" ],
           "extensions" : [ "SPV_KHR_float_controls" ],
           "parameters" : [
             { "kind" : "LiteralInteger", "name" : "'Target Width'" }
           ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "StencilRefReplacingEXT",
@@ -7112,7 +7396,8 @@
         {
           "enumerant" : "BufferBlock",
           "value" : 3,
-          "capabilities" : [ "Shader" ]
+          "capabilities" : [ "Shader" ],
+          "lastVersion" : "1.3"
         },
         {
           "enumerant" : "RowMajor",
@@ -7226,6 +7511,15 @@
           "value" : 26,
           "capabilities" : [ "Shader" ]
         },
+        {
+          "enumerant" : "UniformId",
+          "value" : 27,
+          "capabilities" : [ "Shader" ],
+          "parameters" : [
+            { "kind" : "IdScope",           "name" : "'Execution'" }
+          ],
+          "version" : "1.4"
+        },
         {
           "enumerant" : "SaturatedConversion",
           "value" : 28,
@@ -7387,13 +7681,13 @@
           "enumerant" : "NoSignedWrap",
           "value" : 4469,
           "extensions" : [ "SPV_KHR_no_integer_wrap_decoration" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "NoUnsignedWrap",
           "value" : 4470,
           "extensions" : [ "SPV_KHR_no_integer_wrap_decoration" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "ExplicitInterpAMD",
@@ -7452,7 +7746,7 @@
           "extensions" : [ "SPV_NV_mesh_shader" ],
           "version" : "None"
         },
-		{
+        {
           "enumerant" : "PerVertexNV",
           "value" : 5285,
           "capabilities" : [ "FragmentBarycentricNV" ],
@@ -7464,6 +7758,14 @@
           "value" : 5300,
           "capabilities" : [ "ShaderNonUniformEXT" ]
         },
+        {
+          "enumerant" : "CounterBuffer",
+          "value" : 5634,
+          "parameters" : [
+            { "kind" : "IdRef", "name" : "'Counter Buffer'" }
+          ],
+          "version" : "1.4"
+        },
         {
           "enumerant" : "HlslCounterBufferGOOGLE",
           "value" : 5634,
@@ -7473,6 +7775,14 @@
           "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ],
           "version" : "None"
         },
+        {
+          "enumerant" : "UserSemantic",
+          "value" : 5635,
+          "parameters" : [
+            { "kind" : "LiteralString", "name" : "'Semantic'" }
+          ],
+          "version" : "1.4"
+        },
         {
           "enumerant" : "HlslSemanticGOOGLE",
           "value" : 5635,
@@ -8260,7 +8570,8 @@
         },
         {
           "enumerant" : "Groups",
-          "value" : 18
+          "value" : 18,
+          "extensions" : [ "SPV_AMD_shader_ballot" ]
         },
         {
           "enumerant" : "DeviceEnqueue",
@@ -8638,31 +8949,31 @@
           "enumerant" : "DenormPreserve",
           "value" : 4464,
           "extensions" : [ "SPV_KHR_float_controls" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "DenormFlushToZero",
           "value" : 4465,
           "extensions" : [ "SPV_KHR_float_controls" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "SignedZeroInfNanPreserve",
           "value" : 4466,
           "extensions" : [ "SPV_KHR_float_controls" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "RoundingModeRTE",
           "value" : 4467,
           "extensions" : [ "SPV_KHR_float_controls" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "RoundingModeRTZ",
           "value" : 4468,
           "extensions" : [ "SPV_KHR_float_controls" ],
-          "version" : "None"
+          "version" : "1.4"
         },
         {
           "enumerant" : "Float16ImageAMD",
@@ -8877,6 +9188,13 @@
           "extensions" : [ "SPV_INTEL_media_block_io" ],
           "version" : "None"
         },
+        {
+          "enumerant" : "IntegerFunctions2INTEL",
+          "value" : 5584,
+          "capabilities" : [ "Shader" ],
+          "extensions" : [ "SPV_INTEL_shader_integer_functions2" ],
+          "version" : "None"
+        },
         {
           "enumerant" : "SubgroupAvcMotionEstimationINTEL",
           "value" : 5696,

+ 40 - 2
3rdparty/spirv-headers/include/spirv/unified1/spirv.cs

@@ -48,8 +48,8 @@ namespace Spv
     public static class Specification
     {
         public const uint MagicNumber = 0x07230203;
-        public const uint Version = 0x00010300;
-        public const uint Revision = 7;
+        public const uint Version = 0x00010400;
+        public const uint Revision = 1;
         public const uint OpCodeMask = 0xffff;
         public const uint WordCountShift = 16;
 
@@ -305,6 +305,8 @@ namespace Spv
             MakeTexelVisibleKHR = 9,
             NonPrivateTexelKHR = 10,
             VolatileTexelKHR = 11,
+            SignExtend = 12,
+            ZeroExtend = 13,
         }
 
         public enum ImageOperandsMask
@@ -322,6 +324,8 @@ namespace Spv
             MakeTexelVisibleKHR = 0x00000200,
             NonPrivateTexelKHR = 0x00000400,
             VolatileTexelKHR = 0x00000800,
+            SignExtend = 0x00001000,
+            ZeroExtend = 0x00002000,
         }
 
         public enum FPFastMathModeShift
@@ -404,6 +408,7 @@ namespace Spv
             NonWritable = 24,
             NonReadable = 25,
             Uniform = 26,
+            UniformId = 27,
             SaturatedConversion = 28,
             Stream = 29,
             Location = 30,
@@ -438,8 +443,10 @@ namespace Spv
             NonUniformEXT = 5300,
             RestrictPointerEXT = 5355,
             AliasedPointerEXT = 5356,
+            CounterBuffer = 5634,
             HlslCounterBufferGOOGLE = 5634,
             HlslSemanticGOOGLE = 5635,
+            UserSemantic = 5635,
         }
 
         public enum BuiltIn
@@ -563,6 +570,11 @@ namespace Spv
             DontUnroll = 1,
             DependencyInfinite = 2,
             DependencyLength = 3,
+            MinIterations = 4,
+            MaxIterations = 5,
+            IterationMultiple = 6,
+            PeelCount = 7,
+            PartialCount = 8,
         }
 
         public enum LoopControlMask
@@ -572,6 +584,11 @@ namespace Spv
             DontUnroll = 0x00000002,
             DependencyInfinite = 0x00000004,
             DependencyLength = 0x00000008,
+            MinIterations = 0x00000010,
+            MaxIterations = 0x00000020,
+            IterationMultiple = 0x00000040,
+            PeelCount = 0x00000080,
+            PartialCount = 0x00000100,
         }
 
         public enum FunctionControlShift
@@ -820,6 +837,7 @@ namespace Spv
             SubgroupBufferBlockIOINTEL = 5569,
             SubgroupImageBlockIOINTEL = 5570,
             SubgroupImageMediaBlockIOINTEL = 5579,
+            IntegerFunctions2INTEL = 5584,
             SubgroupAvcMotionEstimationINTEL = 5696,
             SubgroupAvcMotionEstimationIntraINTEL = 5697,
             SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1167,6 +1185,10 @@ namespace Spv
             OpGroupNonUniformLogicalXor = 364,
             OpGroupNonUniformQuadBroadcast = 365,
             OpGroupNonUniformQuadSwap = 366,
+            OpCopyLogical = 400,
+            OpPtrEqual = 401,
+            OpPtrNotEqual = 402,
+            OpPtrDiff = 403,
             OpSubgroupBallotKHR = 4421,
             OpSubgroupFirstInvocationKHR = 4422,
             OpSubgroupAllKHR = 4428,
@@ -1207,7 +1229,23 @@ namespace Spv
             OpSubgroupImageBlockWriteINTEL = 5578,
             OpSubgroupImageMediaBlockReadINTEL = 5580,
             OpSubgroupImageMediaBlockWriteINTEL = 5581,
+            OpUCountLeadingZerosINTEL = 5585,
+            OpUCountTrailingZerosINTEL = 5586,
+            OpAbsISubINTEL = 5587,
+            OpAbsUSubINTEL = 5588,
+            OpIAddSatINTEL = 5589,
+            OpUAddSatINTEL = 5590,
+            OpIAverageINTEL = 5591,
+            OpUAverageINTEL = 5592,
+            OpIAverageRoundedINTEL = 5593,
+            OpUAverageRoundedINTEL = 5594,
+            OpISubSatINTEL = 5595,
+            OpUSubSatINTEL = 5596,
+            OpIMul32x16INTEL = 5597,
+            OpUMul32x16INTEL = 5598,
+            OpDecorateString = 5632,
             OpDecorateStringGOOGLE = 5632,
+            OpMemberDecorateString = 5633,
             OpMemberDecorateStringGOOGLE = 5633,
             OpVmeImageINTEL = 5699,
             OpTypeVmeImageINTEL = 5700,

+ 69 - 13
3rdparty/spirv-headers/include/spirv/unified1/spirv.h

@@ -53,12 +53,12 @@
 
 typedef unsigned int SpvId;
 
-#define SPV_VERSION 0x10300
-#define SPV_REVISION 7
+#define SPV_VERSION 0x10400
+#define SPV_REVISION 1
 
 static const unsigned int SpvMagicNumber = 0x07230203;
-static const unsigned int SpvVersion = 0x00010300;
-static const unsigned int SpvRevision = 7;
+static const unsigned int SpvVersion = 0x00010400;
+static const unsigned int SpvRevision = 1;
 static const unsigned int SpvOpCodeMask = 0xffff;
 static const unsigned int SpvWordCountShift = 16;
 
@@ -313,6 +313,8 @@ typedef enum SpvImageOperandsShift_ {
     SpvImageOperandsMakeTexelVisibleKHRShift = 9,
     SpvImageOperandsNonPrivateTexelKHRShift = 10,
     SpvImageOperandsVolatileTexelKHRShift = 11,
+    SpvImageOperandsSignExtendShift = 12,
+    SpvImageOperandsZeroExtendShift = 13,
     SpvImageOperandsMax = 0x7fffffff,
 } SpvImageOperandsShift;
 
@@ -330,6 +332,8 @@ typedef enum SpvImageOperandsMask_ {
     SpvImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
     SpvImageOperandsNonPrivateTexelKHRMask = 0x00000400,
     SpvImageOperandsVolatileTexelKHRMask = 0x00000800,
+    SpvImageOperandsSignExtendMask = 0x00001000,
+    SpvImageOperandsZeroExtendMask = 0x00002000,
 } SpvImageOperandsMask;
 
 typedef enum SpvFPFastMathModeShift_ {
@@ -410,6 +414,7 @@ typedef enum SpvDecoration_ {
     SpvDecorationNonWritable = 24,
     SpvDecorationNonReadable = 25,
     SpvDecorationUniform = 26,
+    SpvDecorationUniformId = 27,
     SpvDecorationSaturatedConversion = 28,
     SpvDecorationStream = 29,
     SpvDecorationLocation = 30,
@@ -444,8 +449,10 @@ typedef enum SpvDecoration_ {
     SpvDecorationNonUniformEXT = 5300,
     SpvDecorationRestrictPointerEXT = 5355,
     SpvDecorationAliasedPointerEXT = 5356,
+    SpvDecorationCounterBuffer = 5634,
     SpvDecorationHlslCounterBufferGOOGLE = 5634,
     SpvDecorationHlslSemanticGOOGLE = 5635,
+    SpvDecorationUserSemantic = 5635,
     SpvDecorationMax = 0x7fffffff,
 } SpvDecoration;
 
@@ -568,6 +575,11 @@ typedef enum SpvLoopControlShift_ {
     SpvLoopControlDontUnrollShift = 1,
     SpvLoopControlDependencyInfiniteShift = 2,
     SpvLoopControlDependencyLengthShift = 3,
+    SpvLoopControlMinIterationsShift = 4,
+    SpvLoopControlMaxIterationsShift = 5,
+    SpvLoopControlIterationMultipleShift = 6,
+    SpvLoopControlPeelCountShift = 7,
+    SpvLoopControlPartialCountShift = 8,
     SpvLoopControlMax = 0x7fffffff,
 } SpvLoopControlShift;
 
@@ -577,6 +589,11 @@ typedef enum SpvLoopControlMask_ {
     SpvLoopControlDontUnrollMask = 0x00000002,
     SpvLoopControlDependencyInfiniteMask = 0x00000004,
     SpvLoopControlDependencyLengthMask = 0x00000008,
+    SpvLoopControlMinIterationsMask = 0x00000010,
+    SpvLoopControlMaxIterationsMask = 0x00000020,
+    SpvLoopControlIterationMultipleMask = 0x00000040,
+    SpvLoopControlPeelCountMask = 0x00000080,
+    SpvLoopControlPartialCountMask = 0x00000100,
 } SpvLoopControlMask;
 
 typedef enum SpvFunctionControlShift_ {
@@ -820,6 +837,7 @@ typedef enum SpvCapability_ {
     SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
     SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
     SpvCapabilitySubgroupImageMediaBlockIOINTEL = 5579,
+    SpvCapabilityIntegerFunctions2INTEL = 5584,
     SpvCapabilitySubgroupAvcMotionEstimationINTEL = 5696,
     SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
     SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1167,6 +1185,10 @@ typedef enum SpvOp_ {
     SpvOpGroupNonUniformLogicalXor = 364,
     SpvOpGroupNonUniformQuadBroadcast = 365,
     SpvOpGroupNonUniformQuadSwap = 366,
+    SpvOpCopyLogical = 400,
+    SpvOpPtrEqual = 401,
+    SpvOpPtrNotEqual = 402,
+    SpvOpPtrDiff = 403,
     SpvOpSubgroupBallotKHR = 4421,
     SpvOpSubgroupFirstInvocationKHR = 4422,
     SpvOpSubgroupAllKHR = 4428,
@@ -1207,7 +1229,23 @@ typedef enum SpvOp_ {
     SpvOpSubgroupImageBlockWriteINTEL = 5578,
     SpvOpSubgroupImageMediaBlockReadINTEL = 5580,
     SpvOpSubgroupImageMediaBlockWriteINTEL = 5581,
+    SpvOpUCountLeadingZerosINTEL = 5585,
+    SpvOpUCountTrailingZerosINTEL = 5586,
+    SpvOpAbsISubINTEL = 5587,
+    SpvOpAbsUSubINTEL = 5588,
+    SpvOpIAddSatINTEL = 5589,
+    SpvOpUAddSatINTEL = 5590,
+    SpvOpIAverageINTEL = 5591,
+    SpvOpUAverageINTEL = 5592,
+    SpvOpIAverageRoundedINTEL = 5593,
+    SpvOpUAverageRoundedINTEL = 5594,
+    SpvOpISubSatINTEL = 5595,
+    SpvOpUSubSatINTEL = 5596,
+    SpvOpIMul32x16INTEL = 5597,
+    SpvOpUMul32x16INTEL = 5598,
+    SpvOpDecorateString = 5632,
     SpvOpDecorateStringGOOGLE = 5632,
+    SpvOpMemberDecorateString = 5633,
     SpvOpMemberDecorateStringGOOGLE = 5633,
     SpvOpVmeImageINTEL = 5699,
     SpvOpTypeVmeImageINTEL = 5700,
@@ -1675,6 +1713,10 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
     case SpvOpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break;
     case SpvOpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break;
     case SpvOpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break;
+    case SpvOpCopyLogical: *hasResult = true; *hasResultType = true; break;
+    case SpvOpPtrEqual: *hasResult = true; *hasResultType = true; break;
+    case SpvOpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
+    case SpvOpPtrDiff: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
@@ -1691,6 +1733,8 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
     case SpvOpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case SpvOpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
     case SpvOpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
+    case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
+    case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
     case SpvOpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
     case SpvOpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
     case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
@@ -1698,6 +1742,11 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
     case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
     case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
     case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
+    case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
+    case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
+    case SpvOpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
+    case SpvOpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
+    case SpvOpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -1708,6 +1757,22 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
     case SpvOpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
     case SpvOpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
+    case SpvOpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpAbsISubINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpIAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpUAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpIAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpUAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpISubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case SpvOpDecorateString: *hasResult = false; *hasResultType = false; break;
+    case SpvOpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
     case SpvOpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break;
     case SpvOpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break;
@@ -1826,15 +1891,6 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
     case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
-    case SpvOpDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
-    case SpvOpMemberDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
-    case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
-    case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
-    case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
-    case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
-    case SpvOpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
-    case SpvOpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
-    case SpvOpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
     }
 }
 #endif /* SPV_ENABLE_UTILITY_CODE */

+ 69 - 13
3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp

@@ -49,12 +49,12 @@ namespace spv {
 
 typedef unsigned int Id;
 
-#define SPV_VERSION 0x10300
-#define SPV_REVISION 7
+#define SPV_VERSION 0x10400
+#define SPV_REVISION 1
 
 static const unsigned int MagicNumber = 0x07230203;
-static const unsigned int Version = 0x00010300;
-static const unsigned int Revision = 7;
+static const unsigned int Version = 0x00010400;
+static const unsigned int Revision = 1;
 static const unsigned int OpCodeMask = 0xffff;
 static const unsigned int WordCountShift = 16;
 
@@ -309,6 +309,8 @@ enum ImageOperandsShift {
     ImageOperandsMakeTexelVisibleKHRShift = 9,
     ImageOperandsNonPrivateTexelKHRShift = 10,
     ImageOperandsVolatileTexelKHRShift = 11,
+    ImageOperandsSignExtendShift = 12,
+    ImageOperandsZeroExtendShift = 13,
     ImageOperandsMax = 0x7fffffff,
 };
 
@@ -326,6 +328,8 @@ enum ImageOperandsMask {
     ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
     ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
     ImageOperandsVolatileTexelKHRMask = 0x00000800,
+    ImageOperandsSignExtendMask = 0x00001000,
+    ImageOperandsZeroExtendMask = 0x00002000,
 };
 
 enum FPFastMathModeShift {
@@ -406,6 +410,7 @@ enum Decoration {
     DecorationNonWritable = 24,
     DecorationNonReadable = 25,
     DecorationUniform = 26,
+    DecorationUniformId = 27,
     DecorationSaturatedConversion = 28,
     DecorationStream = 29,
     DecorationLocation = 30,
@@ -440,8 +445,10 @@ enum Decoration {
     DecorationNonUniformEXT = 5300,
     DecorationRestrictPointerEXT = 5355,
     DecorationAliasedPointerEXT = 5356,
+    DecorationCounterBuffer = 5634,
     DecorationHlslCounterBufferGOOGLE = 5634,
     DecorationHlslSemanticGOOGLE = 5635,
+    DecorationUserSemantic = 5635,
     DecorationMax = 0x7fffffff,
 };
 
@@ -564,6 +571,11 @@ enum LoopControlShift {
     LoopControlDontUnrollShift = 1,
     LoopControlDependencyInfiniteShift = 2,
     LoopControlDependencyLengthShift = 3,
+    LoopControlMinIterationsShift = 4,
+    LoopControlMaxIterationsShift = 5,
+    LoopControlIterationMultipleShift = 6,
+    LoopControlPeelCountShift = 7,
+    LoopControlPartialCountShift = 8,
     LoopControlMax = 0x7fffffff,
 };
 
@@ -573,6 +585,11 @@ enum LoopControlMask {
     LoopControlDontUnrollMask = 0x00000002,
     LoopControlDependencyInfiniteMask = 0x00000004,
     LoopControlDependencyLengthMask = 0x00000008,
+    LoopControlMinIterationsMask = 0x00000010,
+    LoopControlMaxIterationsMask = 0x00000020,
+    LoopControlIterationMultipleMask = 0x00000040,
+    LoopControlPeelCountMask = 0x00000080,
+    LoopControlPartialCountMask = 0x00000100,
 };
 
 enum FunctionControlShift {
@@ -816,6 +833,7 @@ enum Capability {
     CapabilitySubgroupBufferBlockIOINTEL = 5569,
     CapabilitySubgroupImageBlockIOINTEL = 5570,
     CapabilitySubgroupImageMediaBlockIOINTEL = 5579,
+    CapabilityIntegerFunctions2INTEL = 5584,
     CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
     CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
     CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1163,6 +1181,10 @@ enum Op {
     OpGroupNonUniformLogicalXor = 364,
     OpGroupNonUniformQuadBroadcast = 365,
     OpGroupNonUniformQuadSwap = 366,
+    OpCopyLogical = 400,
+    OpPtrEqual = 401,
+    OpPtrNotEqual = 402,
+    OpPtrDiff = 403,
     OpSubgroupBallotKHR = 4421,
     OpSubgroupFirstInvocationKHR = 4422,
     OpSubgroupAllKHR = 4428,
@@ -1203,7 +1225,23 @@ enum Op {
     OpSubgroupImageBlockWriteINTEL = 5578,
     OpSubgroupImageMediaBlockReadINTEL = 5580,
     OpSubgroupImageMediaBlockWriteINTEL = 5581,
+    OpUCountLeadingZerosINTEL = 5585,
+    OpUCountTrailingZerosINTEL = 5586,
+    OpAbsISubINTEL = 5587,
+    OpAbsUSubINTEL = 5588,
+    OpIAddSatINTEL = 5589,
+    OpUAddSatINTEL = 5590,
+    OpIAverageINTEL = 5591,
+    OpUAverageINTEL = 5592,
+    OpIAverageRoundedINTEL = 5593,
+    OpUAverageRoundedINTEL = 5594,
+    OpISubSatINTEL = 5595,
+    OpUSubSatINTEL = 5596,
+    OpIMul32x16INTEL = 5597,
+    OpUMul32x16INTEL = 5598,
+    OpDecorateString = 5632,
     OpDecorateStringGOOGLE = 5632,
+    OpMemberDecorateString = 5633,
     OpMemberDecorateStringGOOGLE = 5633,
     OpVmeImageINTEL = 5699,
     OpTypeVmeImageINTEL = 5700,
@@ -1671,6 +1709,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break;
     case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break;
     case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break;
+    case OpCopyLogical: *hasResult = true; *hasResultType = true; break;
+    case OpPtrEqual: *hasResult = true; *hasResultType = true; break;
+    case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
+    case OpPtrDiff: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
@@ -1687,6 +1729,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
     case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
+    case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
     case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
     case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
     case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
@@ -1694,6 +1738,11 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case OpTraceNV: *hasResult = false; *hasResultType = false; break;
     case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
     case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
+    case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
+    case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
+    case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
+    case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
+    case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -1704,6 +1753,22 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
     case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
+    case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case OpDecorateString: *hasResult = false; *hasResultType = false; break;
+    case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
     case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
     case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break;
     case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break;
@@ -1822,15 +1887,6 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
     case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
-    case OpDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
-    case OpMemberDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
-    case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
-    case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
-    case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
-    case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
-    case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
-    case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
-    case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
     }
 }
 #endif /* SPV_ENABLE_UTILITY_CODE */

+ 69 - 13
3rdparty/spirv-headers/include/spirv/unified1/spirv.hpp11

@@ -49,12 +49,12 @@ namespace spv {
 
 typedef unsigned int Id;
 
-#define SPV_VERSION 0x10300
-#define SPV_REVISION 7
+#define SPV_VERSION 0x10400
+#define SPV_REVISION 1
 
 static const unsigned int MagicNumber = 0x07230203;
-static const unsigned int Version = 0x00010300;
-static const unsigned int Revision = 7;
+static const unsigned int Version = 0x00010400;
+static const unsigned int Revision = 1;
 static const unsigned int OpCodeMask = 0xffff;
 static const unsigned int WordCountShift = 16;
 
@@ -309,6 +309,8 @@ enum class ImageOperandsShift : unsigned {
     MakeTexelVisibleKHR = 9,
     NonPrivateTexelKHR = 10,
     VolatileTexelKHR = 11,
+    SignExtend = 12,
+    ZeroExtend = 13,
     Max = 0x7fffffff,
 };
 
@@ -326,6 +328,8 @@ enum class ImageOperandsMask : unsigned {
     MakeTexelVisibleKHR = 0x00000200,
     NonPrivateTexelKHR = 0x00000400,
     VolatileTexelKHR = 0x00000800,
+    SignExtend = 0x00001000,
+    ZeroExtend = 0x00002000,
 };
 
 enum class FPFastMathModeShift : unsigned {
@@ -406,6 +410,7 @@ enum class Decoration : unsigned {
     NonWritable = 24,
     NonReadable = 25,
     Uniform = 26,
+    UniformId = 27,
     SaturatedConversion = 28,
     Stream = 29,
     Location = 30,
@@ -440,8 +445,10 @@ enum class Decoration : unsigned {
     NonUniformEXT = 5300,
     RestrictPointerEXT = 5355,
     AliasedPointerEXT = 5356,
+    CounterBuffer = 5634,
     HlslCounterBufferGOOGLE = 5634,
     HlslSemanticGOOGLE = 5635,
+    UserSemantic = 5635,
     Max = 0x7fffffff,
 };
 
@@ -564,6 +571,11 @@ enum class LoopControlShift : unsigned {
     DontUnroll = 1,
     DependencyInfinite = 2,
     DependencyLength = 3,
+    MinIterations = 4,
+    MaxIterations = 5,
+    IterationMultiple = 6,
+    PeelCount = 7,
+    PartialCount = 8,
     Max = 0x7fffffff,
 };
 
@@ -573,6 +585,11 @@ enum class LoopControlMask : unsigned {
     DontUnroll = 0x00000002,
     DependencyInfinite = 0x00000004,
     DependencyLength = 0x00000008,
+    MinIterations = 0x00000010,
+    MaxIterations = 0x00000020,
+    IterationMultiple = 0x00000040,
+    PeelCount = 0x00000080,
+    PartialCount = 0x00000100,
 };
 
 enum class FunctionControlShift : unsigned {
@@ -816,6 +833,7 @@ enum class Capability : unsigned {
     SubgroupBufferBlockIOINTEL = 5569,
     SubgroupImageBlockIOINTEL = 5570,
     SubgroupImageMediaBlockIOINTEL = 5579,
+    IntegerFunctions2INTEL = 5584,
     SubgroupAvcMotionEstimationINTEL = 5696,
     SubgroupAvcMotionEstimationIntraINTEL = 5697,
     SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1163,6 +1181,10 @@ enum class Op : unsigned {
     OpGroupNonUniformLogicalXor = 364,
     OpGroupNonUniformQuadBroadcast = 365,
     OpGroupNonUniformQuadSwap = 366,
+    OpCopyLogical = 400,
+    OpPtrEqual = 401,
+    OpPtrNotEqual = 402,
+    OpPtrDiff = 403,
     OpSubgroupBallotKHR = 4421,
     OpSubgroupFirstInvocationKHR = 4422,
     OpSubgroupAllKHR = 4428,
@@ -1203,7 +1225,23 @@ enum class Op : unsigned {
     OpSubgroupImageBlockWriteINTEL = 5578,
     OpSubgroupImageMediaBlockReadINTEL = 5580,
     OpSubgroupImageMediaBlockWriteINTEL = 5581,
+    OpUCountLeadingZerosINTEL = 5585,
+    OpUCountTrailingZerosINTEL = 5586,
+    OpAbsISubINTEL = 5587,
+    OpAbsUSubINTEL = 5588,
+    OpIAddSatINTEL = 5589,
+    OpUAddSatINTEL = 5590,
+    OpIAverageINTEL = 5591,
+    OpUAverageINTEL = 5592,
+    OpIAverageRoundedINTEL = 5593,
+    OpUAverageRoundedINTEL = 5594,
+    OpISubSatINTEL = 5595,
+    OpUSubSatINTEL = 5596,
+    OpIMul32x16INTEL = 5597,
+    OpUMul32x16INTEL = 5598,
+    OpDecorateString = 5632,
     OpDecorateStringGOOGLE = 5632,
+    OpMemberDecorateString = 5633,
     OpMemberDecorateStringGOOGLE = 5633,
     OpVmeImageINTEL = 5699,
     OpTypeVmeImageINTEL = 5700,
@@ -1671,6 +1709,10 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case Op::OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break;
     case Op::OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break;
     case Op::OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break;
+    case Op::OpCopyLogical: *hasResult = true; *hasResultType = true; break;
+    case Op::OpPtrEqual: *hasResult = true; *hasResultType = true; break;
+    case Op::OpPtrNotEqual: *hasResult = true; *hasResultType = true; break;
+    case Op::OpPtrDiff: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break;
@@ -1687,6 +1729,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case Op::OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case Op::OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break;
     case Op::OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break;
+    case Op::OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
+    case Op::OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
     case Op::OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break;
     case Op::OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break;
     case Op::OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break;
@@ -1694,6 +1738,11 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break;
     case Op::OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
     case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
+    case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
+    case Op::OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
+    case Op::OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
+    case Op::OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
+    case Op::OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break;
@@ -1704,6 +1753,22 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case Op::OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
     case Op::OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break;
+    case Op::OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpIAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpUAverageINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpISubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break;
+    case Op::OpDecorateString: *hasResult = false; *hasResultType = false; break;
+    case Op::OpMemberDecorateString: *hasResult = false; *hasResultType = false; break;
     case Op::OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break;
     case Op::OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break;
@@ -1822,15 +1887,6 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case Op::OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break;
-    case Op::OpDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
-    case Op::OpMemberDecorateStringGOOGLE: *hasResult = false; *hasResultType = false; break;
-    case Op::OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break;
-    case Op::OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break;
-    case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
-    case Op::OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
-    case Op::OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break;
-    case Op::OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break;
-    case Op::OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break;
     }
 }
 #endif /* SPV_ENABLE_UTILITY_CODE */

+ 36 - 5
3rdparty/spirv-headers/include/spirv/unified1/spirv.json

@@ -54,8 +54,8 @@
                 ]
             ],
             "MagicNumber": 119734787,
-            "Version": 66304,
-            "Revision": 7,
+            "Version": 66560,
+            "Revision": 1,
             "OpCodeMask": 65535,
             "WordCountShift": 16
         },
@@ -351,7 +351,9 @@
                     "MakeTexelAvailableKHR": 8,
                     "MakeTexelVisibleKHR": 9,
                     "NonPrivateTexelKHR": 10,
-                    "VolatileTexelKHR": 11
+                    "VolatileTexelKHR": 11,
+                    "SignExtend": 12,
+                    "ZeroExtend": 13
                 }
             },
             {
@@ -442,6 +444,7 @@
                     "NonWritable": 24,
                     "NonReadable": 25,
                     "Uniform": 26,
+                    "UniformId": 27,
                     "SaturatedConversion": 28,
                     "Stream": 29,
                     "Location": 30,
@@ -476,8 +479,10 @@
                     "NonUniformEXT": 5300,
                     "RestrictPointerEXT": 5355,
                     "AliasedPointerEXT": 5356,
+                    "CounterBuffer": 5634,
                     "HlslCounterBufferGOOGLE": 5634,
-                    "HlslSemanticGOOGLE": 5635
+                    "HlslSemanticGOOGLE": 5635,
+                    "UserSemantic": 5635
                 }
             },
             {
@@ -602,7 +607,12 @@
                     "Unroll": 0,
                     "DontUnroll": 1,
                     "DependencyInfinite": 2,
-                    "DependencyLength": 3
+                    "DependencyLength": 3,
+                    "MinIterations": 4,
+                    "MaxIterations": 5,
+                    "IterationMultiple": 6,
+                    "PeelCount": 7,
+                    "PartialCount": 8
                 }
             },
             {
@@ -831,6 +841,7 @@
                     "SubgroupBufferBlockIOINTEL": 5569,
                     "SubgroupImageBlockIOINTEL": 5570,
                     "SubgroupImageMediaBlockIOINTEL": 5579,
+                    "IntegerFunctions2INTEL": 5584,
                     "SubgroupAvcMotionEstimationINTEL": 5696,
                     "SubgroupAvcMotionEstimationIntraINTEL": 5697,
                     "SubgroupAvcMotionEstimationChromaINTEL": 5698
@@ -1181,6 +1192,10 @@
                     "OpGroupNonUniformLogicalXor": 364,
                     "OpGroupNonUniformQuadBroadcast": 365,
                     "OpGroupNonUniformQuadSwap": 366,
+                    "OpCopyLogical": 400,
+                    "OpPtrEqual": 401,
+                    "OpPtrNotEqual": 402,
+                    "OpPtrDiff": 403,
                     "OpSubgroupBallotKHR": 4421,
                     "OpSubgroupFirstInvocationKHR": 4422,
                     "OpSubgroupAllKHR": 4428,
@@ -1221,7 +1236,23 @@
                     "OpSubgroupImageBlockWriteINTEL": 5578,
                     "OpSubgroupImageMediaBlockReadINTEL": 5580,
                     "OpSubgroupImageMediaBlockWriteINTEL": 5581,
+                    "OpUCountLeadingZerosINTEL": 5585,
+                    "OpUCountTrailingZerosINTEL": 5586,
+                    "OpAbsISubINTEL": 5587,
+                    "OpAbsUSubINTEL": 5588,
+                    "OpIAddSatINTEL": 5589,
+                    "OpUAddSatINTEL": 5590,
+                    "OpIAverageINTEL": 5591,
+                    "OpUAverageINTEL": 5592,
+                    "OpIAverageRoundedINTEL": 5593,
+                    "OpUAverageRoundedINTEL": 5594,
+                    "OpISubSatINTEL": 5595,
+                    "OpUSubSatINTEL": 5596,
+                    "OpIMul32x16INTEL": 5597,
+                    "OpUMul32x16INTEL": 5598,
+                    "OpDecorateString": 5632,
                     "OpDecorateStringGOOGLE": 5632,
+                    "OpMemberDecorateString": 5633,
                     "OpMemberDecorateStringGOOGLE": 5633,
                     "OpVmeImageINTEL": 5699,
                     "OpTypeVmeImageINTEL": 5700,

+ 40 - 2
3rdparty/spirv-headers/include/spirv/unified1/spirv.lua

@@ -44,8 +44,8 @@
 
 spv = {
     MagicNumber = 0x07230203,
-    Version = 0x00010300,
-    Revision = 7,
+    Version = 0x00010400,
+    Revision = 1,
     OpCodeMask = 0xffff,
     WordCountShift = 16,
 
@@ -288,6 +288,8 @@ spv = {
         MakeTexelVisibleKHR = 9,
         NonPrivateTexelKHR = 10,
         VolatileTexelKHR = 11,
+        SignExtend = 12,
+        ZeroExtend = 13,
     },
 
     ImageOperandsMask = {
@@ -304,6 +306,8 @@ spv = {
         MakeTexelVisibleKHR = 0x00000200,
         NonPrivateTexelKHR = 0x00000400,
         VolatileTexelKHR = 0x00000800,
+        SignExtend = 0x00001000,
+        ZeroExtend = 0x00002000,
     },
 
     FPFastMathModeShift = {
@@ -379,6 +383,7 @@ spv = {
         NonWritable = 24,
         NonReadable = 25,
         Uniform = 26,
+        UniformId = 27,
         SaturatedConversion = 28,
         Stream = 29,
         Location = 30,
@@ -413,8 +418,10 @@ spv = {
         NonUniformEXT = 5300,
         RestrictPointerEXT = 5355,
         AliasedPointerEXT = 5356,
+        CounterBuffer = 5634,
         HlslCounterBufferGOOGLE = 5634,
         HlslSemanticGOOGLE = 5635,
+        UserSemantic = 5635,
     },
 
     BuiltIn = {
@@ -534,6 +541,11 @@ spv = {
         DontUnroll = 1,
         DependencyInfinite = 2,
         DependencyLength = 3,
+        MinIterations = 4,
+        MaxIterations = 5,
+        IterationMultiple = 6,
+        PeelCount = 7,
+        PartialCount = 8,
     },
 
     LoopControlMask = {
@@ -542,6 +554,11 @@ spv = {
         DontUnroll = 0x00000002,
         DependencyInfinite = 0x00000004,
         DependencyLength = 0x00000008,
+        MinIterations = 0x00000010,
+        MaxIterations = 0x00000020,
+        IterationMultiple = 0x00000040,
+        PeelCount = 0x00000080,
+        PartialCount = 0x00000100,
     },
 
     FunctionControlShift = {
@@ -778,6 +795,7 @@ spv = {
         SubgroupBufferBlockIOINTEL = 5569,
         SubgroupImageBlockIOINTEL = 5570,
         SubgroupImageMediaBlockIOINTEL = 5579,
+        IntegerFunctions2INTEL = 5584,
         SubgroupAvcMotionEstimationINTEL = 5696,
         SubgroupAvcMotionEstimationIntraINTEL = 5697,
         SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1124,6 +1142,10 @@ spv = {
         OpGroupNonUniformLogicalXor = 364,
         OpGroupNonUniformQuadBroadcast = 365,
         OpGroupNonUniformQuadSwap = 366,
+        OpCopyLogical = 400,
+        OpPtrEqual = 401,
+        OpPtrNotEqual = 402,
+        OpPtrDiff = 403,
         OpSubgroupBallotKHR = 4421,
         OpSubgroupFirstInvocationKHR = 4422,
         OpSubgroupAllKHR = 4428,
@@ -1164,7 +1186,23 @@ spv = {
         OpSubgroupImageBlockWriteINTEL = 5578,
         OpSubgroupImageMediaBlockReadINTEL = 5580,
         OpSubgroupImageMediaBlockWriteINTEL = 5581,
+        OpUCountLeadingZerosINTEL = 5585,
+        OpUCountTrailingZerosINTEL = 5586,
+        OpAbsISubINTEL = 5587,
+        OpAbsUSubINTEL = 5588,
+        OpIAddSatINTEL = 5589,
+        OpUAddSatINTEL = 5590,
+        OpIAverageINTEL = 5591,
+        OpUAverageINTEL = 5592,
+        OpIAverageRoundedINTEL = 5593,
+        OpUAverageRoundedINTEL = 5594,
+        OpISubSatINTEL = 5595,
+        OpUSubSatINTEL = 5596,
+        OpIMul32x16INTEL = 5597,
+        OpUMul32x16INTEL = 5598,
+        OpDecorateString = 5632,
         OpDecorateStringGOOGLE = 5632,
+        OpMemberDecorateString = 5633,
         OpMemberDecorateStringGOOGLE = 5633,
         OpVmeImageINTEL = 5699,
         OpTypeVmeImageINTEL = 5700,

+ 40 - 2
3rdparty/spirv-headers/include/spirv/unified1/spirv.py

@@ -44,8 +44,8 @@
 
 spv = {
     'MagicNumber' : 0x07230203,
-    'Version' : 0x00010300,
-    'Revision' : 7,
+    'Version' : 0x00010400,
+    'Revision' : 1,
     'OpCodeMask' : 0xffff,
     'WordCountShift' : 16,
 
@@ -288,6 +288,8 @@ spv = {
         'MakeTexelVisibleKHR' : 9,
         'NonPrivateTexelKHR' : 10,
         'VolatileTexelKHR' : 11,
+        'SignExtend' : 12,
+        'ZeroExtend' : 13,
     },
 
     'ImageOperandsMask' : {
@@ -304,6 +306,8 @@ spv = {
         'MakeTexelVisibleKHR' : 0x00000200,
         'NonPrivateTexelKHR' : 0x00000400,
         'VolatileTexelKHR' : 0x00000800,
+        'SignExtend' : 0x00001000,
+        'ZeroExtend' : 0x00002000,
     },
 
     'FPFastMathModeShift' : {
@@ -379,6 +383,7 @@ spv = {
         'NonWritable' : 24,
         'NonReadable' : 25,
         'Uniform' : 26,
+        'UniformId' : 27,
         'SaturatedConversion' : 28,
         'Stream' : 29,
         'Location' : 30,
@@ -413,8 +418,10 @@ spv = {
         'NonUniformEXT' : 5300,
         'RestrictPointerEXT' : 5355,
         'AliasedPointerEXT' : 5356,
+        'CounterBuffer' : 5634,
         'HlslCounterBufferGOOGLE' : 5634,
         'HlslSemanticGOOGLE' : 5635,
+        'UserSemantic' : 5635,
     },
 
     'BuiltIn' : {
@@ -534,6 +541,11 @@ spv = {
         'DontUnroll' : 1,
         'DependencyInfinite' : 2,
         'DependencyLength' : 3,
+        'MinIterations' : 4,
+        'MaxIterations' : 5,
+        'IterationMultiple' : 6,
+        'PeelCount' : 7,
+        'PartialCount' : 8,
     },
 
     'LoopControlMask' : {
@@ -542,6 +554,11 @@ spv = {
         'DontUnroll' : 0x00000002,
         'DependencyInfinite' : 0x00000004,
         'DependencyLength' : 0x00000008,
+        'MinIterations' : 0x00000010,
+        'MaxIterations' : 0x00000020,
+        'IterationMultiple' : 0x00000040,
+        'PeelCount' : 0x00000080,
+        'PartialCount' : 0x00000100,
     },
 
     'FunctionControlShift' : {
@@ -778,6 +795,7 @@ spv = {
         'SubgroupBufferBlockIOINTEL' : 5569,
         'SubgroupImageBlockIOINTEL' : 5570,
         'SubgroupImageMediaBlockIOINTEL' : 5579,
+        'IntegerFunctions2INTEL' : 5584,
         'SubgroupAvcMotionEstimationINTEL' : 5696,
         'SubgroupAvcMotionEstimationIntraINTEL' : 5697,
         'SubgroupAvcMotionEstimationChromaINTEL' : 5698,
@@ -1124,6 +1142,10 @@ spv = {
         'OpGroupNonUniformLogicalXor' : 364,
         'OpGroupNonUniformQuadBroadcast' : 365,
         'OpGroupNonUniformQuadSwap' : 366,
+        'OpCopyLogical' : 400,
+        'OpPtrEqual' : 401,
+        'OpPtrNotEqual' : 402,
+        'OpPtrDiff' : 403,
         'OpSubgroupBallotKHR' : 4421,
         'OpSubgroupFirstInvocationKHR' : 4422,
         'OpSubgroupAllKHR' : 4428,
@@ -1164,7 +1186,23 @@ spv = {
         'OpSubgroupImageBlockWriteINTEL' : 5578,
         'OpSubgroupImageMediaBlockReadINTEL' : 5580,
         'OpSubgroupImageMediaBlockWriteINTEL' : 5581,
+        'OpUCountLeadingZerosINTEL' : 5585,
+        'OpUCountTrailingZerosINTEL' : 5586,
+        'OpAbsISubINTEL' : 5587,
+        'OpAbsUSubINTEL' : 5588,
+        'OpIAddSatINTEL' : 5589,
+        'OpUAddSatINTEL' : 5590,
+        'OpIAverageINTEL' : 5591,
+        'OpUAverageINTEL' : 5592,
+        'OpIAverageRoundedINTEL' : 5593,
+        'OpUAverageRoundedINTEL' : 5594,
+        'OpISubSatINTEL' : 5595,
+        'OpUSubSatINTEL' : 5596,
+        'OpIMul32x16INTEL' : 5597,
+        'OpUMul32x16INTEL' : 5598,
+        'OpDecorateString' : 5632,
         'OpDecorateStringGOOGLE' : 5632,
+        'OpMemberDecorateString' : 5633,
         'OpMemberDecorateStringGOOGLE' : 5633,
         'OpVmeImageINTEL' : 5699,
         'OpTypeVmeImageINTEL' : 5700,

+ 40 - 2
3rdparty/spirv-headers/include/spirv/unified1/spv.d

@@ -51,8 +51,8 @@
 module spv;
 
 enum uint MagicNumber = 0x07230203;
-enum uint Version = 0x00010300;
-enum uint Revision = 7;
+enum uint Version = 0x00010400;
+enum uint Revision = 1;
 enum uint OpCodeMask = 0xffff;
 enum uint WordCountShift = 16;
 
@@ -308,6 +308,8 @@ enum ImageOperandsShift : uint
     MakeTexelVisibleKHR = 9,
     NonPrivateTexelKHR = 10,
     VolatileTexelKHR = 11,
+    SignExtend = 12,
+    ZeroExtend = 13,
 }
 
 enum ImageOperandsMask : uint
@@ -325,6 +327,8 @@ enum ImageOperandsMask : uint
     MakeTexelVisibleKHR = 0x00000200,
     NonPrivateTexelKHR = 0x00000400,
     VolatileTexelKHR = 0x00000800,
+    SignExtend = 0x00001000,
+    ZeroExtend = 0x00002000,
 }
 
 enum FPFastMathModeShift : uint
@@ -407,6 +411,7 @@ enum Decoration : uint
     NonWritable = 24,
     NonReadable = 25,
     Uniform = 26,
+    UniformId = 27,
     SaturatedConversion = 28,
     Stream = 29,
     Location = 30,
@@ -441,8 +446,10 @@ enum Decoration : uint
     NonUniformEXT = 5300,
     RestrictPointerEXT = 5355,
     AliasedPointerEXT = 5356,
+    CounterBuffer = 5634,
     HlslCounterBufferGOOGLE = 5634,
     HlslSemanticGOOGLE = 5635,
+    UserSemantic = 5635,
 }
 
 enum BuiltIn : uint
@@ -566,6 +573,11 @@ enum LoopControlShift : uint
     DontUnroll = 1,
     DependencyInfinite = 2,
     DependencyLength = 3,
+    MinIterations = 4,
+    MaxIterations = 5,
+    IterationMultiple = 6,
+    PeelCount = 7,
+    PartialCount = 8,
 }
 
 enum LoopControlMask : uint
@@ -575,6 +587,11 @@ enum LoopControlMask : uint
     DontUnroll = 0x00000002,
     DependencyInfinite = 0x00000004,
     DependencyLength = 0x00000008,
+    MinIterations = 0x00000010,
+    MaxIterations = 0x00000020,
+    IterationMultiple = 0x00000040,
+    PeelCount = 0x00000080,
+    PartialCount = 0x00000100,
 }
 
 enum FunctionControlShift : uint
@@ -823,6 +840,7 @@ enum Capability : uint
     SubgroupBufferBlockIOINTEL = 5569,
     SubgroupImageBlockIOINTEL = 5570,
     SubgroupImageMediaBlockIOINTEL = 5579,
+    IntegerFunctions2INTEL = 5584,
     SubgroupAvcMotionEstimationINTEL = 5696,
     SubgroupAvcMotionEstimationIntraINTEL = 5697,
     SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1170,6 +1188,10 @@ enum Op : uint
     OpGroupNonUniformLogicalXor = 364,
     OpGroupNonUniformQuadBroadcast = 365,
     OpGroupNonUniformQuadSwap = 366,
+    OpCopyLogical = 400,
+    OpPtrEqual = 401,
+    OpPtrNotEqual = 402,
+    OpPtrDiff = 403,
     OpSubgroupBallotKHR = 4421,
     OpSubgroupFirstInvocationKHR = 4422,
     OpSubgroupAllKHR = 4428,
@@ -1210,7 +1232,23 @@ enum Op : uint
     OpSubgroupImageBlockWriteINTEL = 5578,
     OpSubgroupImageMediaBlockReadINTEL = 5580,
     OpSubgroupImageMediaBlockWriteINTEL = 5581,
+    OpUCountLeadingZerosINTEL = 5585,
+    OpUCountTrailingZerosINTEL = 5586,
+    OpAbsISubINTEL = 5587,
+    OpAbsUSubINTEL = 5588,
+    OpIAddSatINTEL = 5589,
+    OpUAddSatINTEL = 5590,
+    OpIAverageINTEL = 5591,
+    OpUAverageINTEL = 5592,
+    OpIAverageRoundedINTEL = 5593,
+    OpUAverageRoundedINTEL = 5594,
+    OpISubSatINTEL = 5595,
+    OpUSubSatINTEL = 5596,
+    OpIMul32x16INTEL = 5597,
+    OpUMul32x16INTEL = 5598,
+    OpDecorateString = 5632,
     OpDecorateStringGOOGLE = 5632,
+    OpMemberDecorateString = 5633,
     OpMemberDecorateStringGOOGLE = 5633,
     OpVmeImageINTEL = 5699,
     OpTypeVmeImageINTEL = 5700,

+ 15 - 4
3rdparty/spirv-headers/tools/buildHeaders/header.cpp

@@ -42,6 +42,7 @@
 #include <cctype>
 #include <vector>
 #include <utility>
+#include <set>
 
 #include "jsoncpp/dist/json/json.h"
 
@@ -68,9 +69,9 @@ namespace {
         TPrinter();
 
         static const int         DocMagicNumber = 0x07230203;
-        static const int         DocVersion     = 0x00010300;
-        static const int         DocRevision    = 7;
-        #define DocRevisionString                "7"
+        static const int         DocVersion     = 0x00010400;
+        static const int         DocRevision    = 1;
+        #define DocRevisionString                "1"
         static const std::string DocCopyright;
         static const std::string DocComment1;
         static const std::string DocComment2;
@@ -347,7 +348,7 @@ namespace {
                 bool printMax = (style != enumMask && maxEnum.size() > 0);
 
                 for (const auto& v : sorted)
-                    out << enumFmt(opPrefix, v, style, !printMax && v.first == sorted.back().first);
+                    out << enumFmt(opPrefix, v, style, !printMax && v.second == sorted.back().second);
 
                 if (printMax)
                     out << maxEnum;
@@ -503,6 +504,8 @@ namespace {
         {
             const Json::Value& enums = spvRoot["spv"]["enum"];
 
+            std::set<unsigned> seenValues;
+
             for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
                 const auto opName   = (*opClass)["Name"].asString();
                 if (opName != "Op") {
@@ -516,6 +519,14 @@ namespace {
                 out << "    default: /* unknown opcode */ break;" << std::endl;
 
                 for (auto& inst : spv::InstructionDesc) {
+
+                    // Filter out duplicate enum values, which would break the switch statement.
+                    // These are probably just extension enums promoted to core.
+                    if (seenValues.find(inst.value) != seenValues.end()) {
+                        continue;
+                    }
+                    seenValues.insert(inst.value);
+
                     std::string name = inst.name;
                     out << "    case " << fmtEnumUse("Op", name) << ": *hasResult = " << (inst.hasResult() ? "true" : "false") << "; *hasResultType = " << (inst.hasType() ? "true" : "false") << "; break;" << std::endl;
                 }

+ 7 - 6
3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.cpp

@@ -119,8 +119,7 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
         else if (quantifier == "?")
             return {OperandLiteralString, true};
         else {
-            assert(0 && "this case should not exist");
-            return {OperandNone, false};
+            return {OperandOptionalLiteralStrings, false};
         }
     } else if (operandKind == "PairLiteralIntegerIdRef") {
         // Used by OpSwitch in the grammar
@@ -198,7 +197,7 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
         } else if (operandKind == "FunctionControl") {
             type = OperandFunction;
         } else if (operandKind == "MemoryAccess") {
-            type = OperandMemoryAccess;
+            type = OperandMemoryOperands;
         }
 
         if (type == OperandNone) {
@@ -307,6 +306,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
         const std::string name = inst["opname"].asString();
         EnumCaps caps = getCaps(inst);
         std::string version = inst["version"].asString();
+        std::string lastVersion = inst["lastVersion"].asString();
         Extensions exts = getExts(inst);
         OperandParameters operands;
         bool defResultId = false;
@@ -322,7 +322,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
         }
         InstructionDesc.emplace_back(
             std::move(EnumValue(opcode, name,
-                                std::move(caps), std::move(version), std::move(exts),
+                                std::move(caps), std::move(version), std::move(lastVersion), std::move(exts),
                                 std::move(operands))),
             defTypeId, defResultId);
     }
@@ -355,6 +355,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
                 continue;
             EnumCaps caps(getCaps(enumerant));
             std::string version = enumerant["version"].asString();
+            std::string lastVersion = enumerant["lastVersion"].asString();
             Extensions exts(getExts(enumerant));
             OperandParameters params;
             const Json::Value& paramsJson = enumerant["parameters"];
@@ -369,7 +370,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
             }
             dest->emplace_back(
                 value, enumerant["enumerant"].asString(),
-                std::move(caps), std::move(version), std::move(exts), std::move(params));
+                std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(params));
         }
     };
 
@@ -437,7 +438,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
         } else if (enumName == "Dim") {
             establishOperandClass(enumName, OperandDimensionality, &DimensionalityParams, operandEnum, category);
         } else if (enumName == "MemoryAccess") {
-            establishOperandClass(enumName, OperandMemoryAccess, &MemoryAccessParams, operandEnum, category);
+            establishOperandClass(enumName, OperandMemoryOperands, &MemoryAccessParams, operandEnum, category);
         } else if (enumName == "Scope") {
             establishOperandClass(enumName, OperandScope, &ScopeParams, operandEnum, category);
         } else if (enumName == "GroupOperation") {

+ 26 - 6
3rdparty/spirv-headers/tools/buildHeaders/jsonToSpirv.h

@@ -47,6 +47,7 @@ enum OperandClass {
     OperandVariableIds,
     OperandOptionalLiteral,
     OperandOptionalLiteralString,
+    OperandOptionalLiteralStrings,
     OperandVariableLiterals,
     OperandVariableIdLiteral,
     OperandVariableLiteralId,
@@ -76,7 +77,7 @@ enum OperandClass {
     OperandLoop,
     OperandFunction,
     OperandMemorySemantics,
-    OperandMemoryAccess,
+    OperandMemoryOperands,
     OperandScope,
 	OperandGroupOperation,
     OperandKernelEnqueueFlags,
@@ -145,6 +146,12 @@ public:
         assert((where != end()) && "Could not find enum in the enum list");
         return *where;
     }
+    // gets *all* entries for the value, including the first one
+    void gatherAliases(unsigned value, std::vector<EValue*>& aliases) {
+        std::for_each(begin(), end(), [&](EValue& e) {
+            if (value == e.value)
+                aliases.push_back(&e);});
+    }
     // Returns the EValue with the given name.  We assume uniqueness
     // by name.
     EValue& at(std::string name) {
@@ -167,9 +174,11 @@ private:
 class EnumValue {
 public:
     EnumValue() : value(0), desc(nullptr) {}
-    EnumValue(unsigned int the_value, const std::string& the_name, EnumCaps&& the_caps, const std::string& the_version,
-              Extensions&& the_extensions, OperandParameters&& the_operands) :
-      value(the_value), name(the_name), capabilities(std::move(the_caps)), version(std::move(the_version)),
+    EnumValue(unsigned int the_value, const std::string& the_name, 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)),
+      firstVersion(std::move(the_firstVersion)), lastVersion(std::move(the_lastVersion)),
       extensions(std::move(the_extensions)), operands(std::move(the_operands)), desc(nullptr) { }
 
     // For ValueEnum, the value from the JSON file.
@@ -178,7 +187,8 @@ public:
     unsigned value;
     std::string name;
     EnumCaps capabilities;
-    std::string version;
+    std::string firstVersion;
+    std::string lastVersion;
     // A feature only be enabled by certain extensions.
     // An empty list means the feature does not require an extension.
     // Normally, only Capability enums are enabled by extension.  In turn,
@@ -233,10 +243,19 @@ public:
        opDesc("TBD"),
        opClass(0),
        typePresent(has_type),
-       resultPresent(has_result) {}
+       resultPresent(has_result),
+       alias(this) { }
+    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; }
 
     const char* opDesc;
     int opClass;
@@ -244,6 +263,7 @@ public:
 protected:
     int typePresent   : 1;
     int resultPresent : 1;
+    const InstructionValue* alias;    // correct only after discovering the aliases; otherwise points to this
 };
 
 using InstructionValues = EnumValuesContainer<InstructionValue>;