Support SPV_KHR_expect_assume
authorDavid Neto <dneto@google.com>
Fri, 3 Jul 2020 19:53:15 +0000 (15:53 -0400)
committerDavid Neto <dneto@google.com>
Fri, 5 Mar 2021 16:01:14 +0000 (11:01 -0500)
include/spirv/unified1/spirv.core.grammar.json
include/spirv/unified1/spirv.cs
include/spirv/unified1/spirv.h
include/spirv/unified1/spirv.hpp
include/spirv/unified1/spirv.hpp11
include/spirv/unified1/spirv.json
include/spirv/unified1/spirv.lua
include/spirv/unified1/spirv.py
include/spirv/unified1/spv.d

index bb653c5..b6eeee2 100644 (file)
       "version" : "None"
     },
     {
+      "opname" : "OpAssumeTrueKHR",
+      "class"  : "Miscellaneous",
+      "opcode" : 5630,
+      "operands" : [
+        { "kind" : "IdRef", "name" : "'Condition'" }
+      ],
+      "capabilities" : [ "ExpectAssumeKHR" ],
+      "extensions" : [ "SPV_KHR_expect_assume" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpExpectKHR",
+      "class"  : "Miscellaneous",
+      "opcode" : 5631,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Value'" },
+        { "kind" : "IdRef", "name" : "'ExpectedValue'" }
+      ],
+      "capabilities" : [ "ExpectAssumeKHR" ],
+      "extensions" : [ "SPV_KHR_expect_assume" ],
+      "version" : "None"
+    },
+    {
       "opname" : "OpDecorateString",
       "class"  : "Annotation",
       "opcode" : 5632,
           "version" : "None"
         },
         {
+          "enumerant" : "ExpectAssumeKHR",
+          "value" : 5629,
+          "extensions" : [ "SPV_KHR_expect_assume" ],
+          "version" : "None"
+        },
+        {
           "enumerant" : "SubgroupAvcMotionEstimationINTEL",
           "value" : 5696,
           "extensions" : [ "SPV_INTEL_device_side_avc_motion_estimation" ],
index 7d9bf01..a90996c 100644 (file)
@@ -1020,6 +1020,7 @@ namespace Spv
             AtomicFloat16MinMaxEXT = 5616,
             VectorComputeINTEL = 5617,
             VectorAnyINTEL = 5619,
+            ExpectAssumeKHR = 5629,
             SubgroupAvcMotionEstimationINTEL = 5696,
             SubgroupAvcMotionEstimationIntraINTEL = 5697,
             SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1549,6 +1550,8 @@ namespace Spv
             OpAsmCallINTEL = 5611,
             OpAtomicFMinEXT = 5614,
             OpAtomicFMaxEXT = 5615,
+            OpAssumeTrueKHR = 5630,
+            OpExpectKHR = 5631,
             OpDecorateString = 5632,
             OpDecorateStringGOOGLE = 5632,
             OpMemberDecorateString = 5633,
index 6ed11d4..1bab0aa 100644 (file)
@@ -1020,6 +1020,7 @@ typedef enum SpvCapability_ {
     SpvCapabilityAtomicFloat16MinMaxEXT = 5616,
     SpvCapabilityVectorComputeINTEL = 5617,
     SpvCapabilityVectorAnyINTEL = 5619,
+    SpvCapabilityExpectAssumeKHR = 5629,
     SpvCapabilitySubgroupAvcMotionEstimationINTEL = 5696,
     SpvCapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
     SpvCapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1547,6 +1548,8 @@ typedef enum SpvOp_ {
     SpvOpAsmCallINTEL = 5611,
     SpvOpAtomicFMinEXT = 5614,
     SpvOpAtomicFMaxEXT = 5615,
+    SpvOpAssumeTrueKHR = 5630,
+    SpvOpExpectKHR = 5631,
     SpvOpDecorateString = 5632,
     SpvOpDecorateStringGOOGLE = 5632,
     SpvOpMemberDecorateString = 5633,
@@ -2131,6 +2134,8 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
     case SpvOpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
     case SpvOpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
     case SpvOpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
+    case SpvOpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
+    case SpvOpExpectKHR: *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;
index 1266acd..5df8e47 100644 (file)
@@ -1016,6 +1016,7 @@ enum Capability {
     CapabilityAtomicFloat16MinMaxEXT = 5616,
     CapabilityVectorComputeINTEL = 5617,
     CapabilityVectorAnyINTEL = 5619,
+    CapabilityExpectAssumeKHR = 5629,
     CapabilitySubgroupAvcMotionEstimationINTEL = 5696,
     CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697,
     CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1543,6 +1544,8 @@ enum Op {
     OpAsmCallINTEL = 5611,
     OpAtomicFMinEXT = 5614,
     OpAtomicFMaxEXT = 5615,
+    OpAssumeTrueKHR = 5630,
+    OpExpectKHR = 5631,
     OpDecorateString = 5632,
     OpDecorateStringGOOGLE = 5632,
     OpMemberDecorateString = 5633,
@@ -2127,6 +2130,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
     case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
     case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
+    case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
+    case OpExpectKHR: *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;
index b9c3422..539ddd6 100644 (file)
@@ -1016,6 +1016,7 @@ enum class Capability : unsigned {
     AtomicFloat16MinMaxEXT = 5616,
     VectorComputeINTEL = 5617,
     VectorAnyINTEL = 5619,
+    ExpectAssumeKHR = 5629,
     SubgroupAvcMotionEstimationINTEL = 5696,
     SubgroupAvcMotionEstimationIntraINTEL = 5697,
     SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1543,6 +1544,8 @@ enum class Op : unsigned {
     OpAsmCallINTEL = 5611,
     OpAtomicFMinEXT = 5614,
     OpAtomicFMaxEXT = 5615,
+    OpAssumeTrueKHR = 5630,
+    OpExpectKHR = 5631,
     OpDecorateString = 5632,
     OpDecorateStringGOOGLE = 5632,
     OpMemberDecorateString = 5633,
@@ -2127,6 +2130,8 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
     case Op::OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break;
     case Op::OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break;
     case Op::OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break;
+    case Op::OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break;
+    case Op::OpExpectKHR: *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;
index db2926b..a03be06 100644 (file)
                     "AtomicFloat16MinMaxEXT": 5616,
                     "VectorComputeINTEL": 5617,
                     "VectorAnyINTEL": 5619,
+                    "ExpectAssumeKHR": 5629,
                     "SubgroupAvcMotionEstimationINTEL": 5696,
                     "SubgroupAvcMotionEstimationIntraINTEL": 5697,
                     "SubgroupAvcMotionEstimationChromaINTEL": 5698,
                     "OpAsmCallINTEL": 5611,
                     "OpAtomicFMinEXT": 5614,
                     "OpAtomicFMaxEXT": 5615,
+                    "OpAssumeTrueKHR": 5630,
+                    "OpExpectKHR": 5631,
                     "OpDecorateString": 5632,
                     "OpDecorateStringGOOGLE": 5632,
                     "OpMemberDecorateString": 5633,
index b90f7ae..ed0549b 100644 (file)
@@ -978,6 +978,7 @@ spv = {
         AtomicFloat16MinMaxEXT = 5616,
         VectorComputeINTEL = 5617,
         VectorAnyINTEL = 5619,
+        ExpectAssumeKHR = 5629,
         SubgroupAvcMotionEstimationINTEL = 5696,
         SubgroupAvcMotionEstimationIntraINTEL = 5697,
         SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1497,6 +1498,8 @@ spv = {
         OpAsmCallINTEL = 5611,
         OpAtomicFMinEXT = 5614,
         OpAtomicFMaxEXT = 5615,
+        OpAssumeTrueKHR = 5630,
+        OpExpectKHR = 5631,
         OpDecorateString = 5632,
         OpDecorateStringGOOGLE = 5632,
         OpMemberDecorateString = 5633,
index f228b3f..90e71c4 100644 (file)
@@ -978,6 +978,7 @@ spv = {
         'AtomicFloat16MinMaxEXT' : 5616,
         'VectorComputeINTEL' : 5617,
         'VectorAnyINTEL' : 5619,
+        'ExpectAssumeKHR' : 5629,
         'SubgroupAvcMotionEstimationINTEL' : 5696,
         'SubgroupAvcMotionEstimationIntraINTEL' : 5697,
         'SubgroupAvcMotionEstimationChromaINTEL' : 5698,
@@ -1497,6 +1498,8 @@ spv = {
         'OpAsmCallINTEL' : 5611,
         'OpAtomicFMinEXT' : 5614,
         'OpAtomicFMaxEXT' : 5615,
+        'OpAssumeTrueKHR' : 5630,
+        'OpExpectKHR' : 5631,
         'OpDecorateString' : 5632,
         'OpDecorateStringGOOGLE' : 5632,
         'OpMemberDecorateString' : 5633,
index ec12581..95c61c0 100644 (file)
@@ -1023,6 +1023,7 @@ enum Capability : uint
     AtomicFloat16MinMaxEXT = 5616,
     VectorComputeINTEL = 5617,
     VectorAnyINTEL = 5619,
+    ExpectAssumeKHR = 5629,
     SubgroupAvcMotionEstimationINTEL = 5696,
     SubgroupAvcMotionEstimationIntraINTEL = 5697,
     SubgroupAvcMotionEstimationChromaINTEL = 5698,
@@ -1552,6 +1553,8 @@ enum Op : uint
     OpAsmCallINTEL = 5611,
     OpAtomicFMinEXT = 5614,
     OpAtomicFMaxEXT = 5615,
+    OpAssumeTrueKHR = 5630,
+    OpExpectKHR = 5631,
     OpDecorateString = 5632,
     OpDecorateStringGOOGLE = 5632,
     OpMemberDecorateString = 5633,