Merge pull request #320 from CodeLinaro/spv-qcom-image-processing

SPV_QCOM_image_processing, fixes #307
diff --git a/include/spirv/unified1/spirv.bf b/include/spirv/unified1/spirv.bf
index 7e1fe19..f8a5bb2 100644
--- a/include/spirv/unified1/spirv.bf
+++ b/include/spirv/unified1/spirv.bf
@@ -508,6 +508,8 @@
             MaxByteOffsetId = 47,
             NoSignedWrap = 4469,
             NoUnsignedWrap = 4470,
+            WeightTextureQCOM = 4487,
+            BlockMatchTextureQCOM = 4488,
             ExplicitInterpAMD = 4999,
             OverrideCoverageNV = 5248,
             PassthroughNV = 5250,
@@ -1022,6 +1024,9 @@
             RayQueryKHR = 4472,
             RayTraversalPrimitiveCullingKHR = 4478,
             RayTracingKHR = 4479,
+            TextureSampleWeightedQCOM = 4484,
+            TextureBoxFilterQCOM = 4485,
+            TextureBlockMatchQCOM = 4486,
             Float16ImageAMD = 5008,
             ImageGatherBiasLodAMD = 5009,
             FragmentMaskAMD = 5010,
@@ -1640,6 +1645,10 @@
             OpRayQueryConfirmIntersectionKHR = 4476,
             OpRayQueryProceedKHR = 4477,
             OpRayQueryGetIntersectionTypeKHR = 4479,
+            OpImageSampleWeightedQCOM = 4480,
+            OpImageBoxFilterQCOM = 4481,
+            OpImageBlockMatchSSDQCOM = 4482,
+            OpImageBlockMatchSADQCOM = 4483,
             OpGroupIAddNonUniformAMD = 5000,
             OpGroupFAddNonUniformAMD = 5001,
             OpGroupFMinNonUniformAMD = 5002,
diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json
index dd33af4..c740663 100644
--- a/include/spirv/unified1/spirv.core.grammar.json
+++ b/include/spirv/unified1/spirv.core.grammar.json
@@ -4593,6 +4593,66 @@
         "version" : "None"
     },
     {
+      "opname" : "OpImageSampleWeightedQCOM",
+      "class"  : "Image",
+      "opcode" : 4480,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Texture'" },
+        { "kind" : "IdRef", "name" : "'Coordinates'" },
+        { "kind" : "IdRef", "name" : "'Weights'" }
+      ],
+      "capabilities" : [ "TextureSampleWeightedQCOM" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpImageBoxFilterQCOM",
+      "class"  : "Image",
+      "opcode" : 4481,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Texture'" },
+        { "kind" : "IdRef", "name" : "'Coordinates'" },
+        { "kind" : "IdRef", "name" : "'Box Size'" }
+      ],
+      "capabilities" : [ "TextureBoxFilterQCOM" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpImageBlockMatchSSDQCOM",
+      "class"  : "Image",
+      "opcode" : 4482,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Target'" },
+        { "kind" : "IdRef", "name" : "'Target Coordinates'" },
+        { "kind" : "IdRef", "name" : "'Reference'" },
+        { "kind" : "IdRef", "name" : "'Reference Coordinates'" },
+        { "kind" : "IdRef", "name" : "'Block Size'" }
+      ],
+      "capabilities" : [ "TextureBlockMatchQCOM" ],
+      "version" : "None"
+    },
+    {
+      "opname" : "OpImageBlockMatchSADQCOM",
+      "class"  : "Image",
+      "opcode" : 4483,
+      "operands" : [
+        { "kind" : "IdResultType" },
+        { "kind" : "IdResult" },
+        { "kind" : "IdRef", "name" : "'Target'" },
+        { "kind" : "IdRef", "name" : "'Target Coordinates'" },
+        { "kind" : "IdRef", "name" : "'Reference'" },
+        { "kind" : "IdRef", "name" : "'Reference Coordinates'" },
+        { "kind" : "IdRef", "name" : "'Block Size'" }
+      ],
+      "capabilities" : [ "TextureBlockMatchQCOM" ],
+      "version" : "None"
+    },
+    {
       "opname" : "OpGroupIAddNonUniformAMD",
       "class"  : "Group",
       "opcode" : 5000,
@@ -12020,6 +12080,18 @@
           "version" : "1.4"
         },
         {
+          "enumerant" : "WeightTextureQCOM",
+          "value" : 4487,
+          "extensions" : [ "SPV_QCOM_image_processing" ],
+          "version" : "None"
+        },
+        {
+          "enumerant" : "BlockMatchTextureQCOM",
+          "value" : 4488,
+          "extensions" : [ "SPV_QCOM_image_processing" ],
+          "version" : "None"
+        },
+        {
           "enumerant" : "ExplicitInterpAMD",
           "value" : 4999,
           "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ],
@@ -14136,6 +14208,24 @@
           "version" : "None"
         },
         {
+          "enumerant" : "TextureSampleWeightedQCOM",
+          "value" : 4484,
+          "extensions" : [ "SPV_QCOM_image_processing" ],
+          "version" : "None"
+        },
+        {
+          "enumerant" : "TextureBoxFilterQCOM",
+          "value" : 4485,
+          "extensions" : [ "SPV_QCOM_image_processing" ],
+          "version" : "None"
+        },
+        {
+          "enumerant" : "TextureBlockMatchQCOM",
+          "value" : 4486,
+          "extensions" : [ "SPV_QCOM_image_processing" ],
+          "version" : "None"
+        },
+        {
           "enumerant" : "Float16ImageAMD",
           "value" : 5008,
           "capabilities" : [ "Shader" ],
diff --git a/include/spirv/unified1/spirv.cs b/include/spirv/unified1/spirv.cs
index fa4cff7..cb6c4f1 100644
--- a/include/spirv/unified1/spirv.cs
+++ b/include/spirv/unified1/spirv.cs
@@ -507,6 +507,8 @@
             MaxByteOffsetId = 47,
             NoSignedWrap = 4469,
             NoUnsignedWrap = 4470,
+            WeightTextureQCOM = 4487,
+            BlockMatchTextureQCOM = 4488,
             ExplicitInterpAMD = 4999,
             OverrideCoverageNV = 5248,
             PassthroughNV = 5250,
@@ -1021,6 +1023,9 @@
             RayQueryKHR = 4472,
             RayTraversalPrimitiveCullingKHR = 4478,
             RayTracingKHR = 4479,
+            TextureSampleWeightedQCOM = 4484,
+            TextureBoxFilterQCOM = 4485,
+            TextureBlockMatchQCOM = 4486,
             Float16ImageAMD = 5008,
             ImageGatherBiasLodAMD = 5009,
             FragmentMaskAMD = 5010,
@@ -1639,6 +1644,10 @@
             OpRayQueryConfirmIntersectionKHR = 4476,
             OpRayQueryProceedKHR = 4477,
             OpRayQueryGetIntersectionTypeKHR = 4479,
+            OpImageSampleWeightedQCOM = 4480,
+            OpImageBoxFilterQCOM = 4481,
+            OpImageBlockMatchSSDQCOM = 4482,
+            OpImageBlockMatchSADQCOM = 4483,
             OpGroupIAddNonUniformAMD = 5000,
             OpGroupFAddNonUniformAMD = 5001,
             OpGroupFMinNonUniformAMD = 5002,
diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h
index 9aa359b..28eb8ff 100644
--- a/include/spirv/unified1/spirv.h
+++ b/include/spirv/unified1/spirv.h
@@ -513,6 +513,8 @@
     SpvDecorationMaxByteOffsetId = 47,
     SpvDecorationNoSignedWrap = 4469,
     SpvDecorationNoUnsignedWrap = 4470,
+    SpvDecorationWeightTextureQCOM = 4487,
+    SpvDecorationBlockMatchTextureQCOM = 4488,
     SpvDecorationExplicitInterpAMD = 4999,
     SpvDecorationOverrideCoverageNV = 5248,
     SpvDecorationPassthroughNV = 5250,
@@ -1021,6 +1023,9 @@
     SpvCapabilityRayQueryKHR = 4472,
     SpvCapabilityRayTraversalPrimitiveCullingKHR = 4478,
     SpvCapabilityRayTracingKHR = 4479,
+    SpvCapabilityTextureSampleWeightedQCOM = 4484,
+    SpvCapabilityTextureBoxFilterQCOM = 4485,
+    SpvCapabilityTextureBlockMatchQCOM = 4486,
     SpvCapabilityFloat16ImageAMD = 5008,
     SpvCapabilityImageGatherBiasLodAMD = 5009,
     SpvCapabilityFragmentMaskAMD = 5010,
@@ -1637,6 +1642,10 @@
     SpvOpRayQueryConfirmIntersectionKHR = 4476,
     SpvOpRayQueryProceedKHR = 4477,
     SpvOpRayQueryGetIntersectionTypeKHR = 4479,
+    SpvOpImageSampleWeightedQCOM = 4480,
+    SpvOpImageBoxFilterQCOM = 4481,
+    SpvOpImageBlockMatchSSDQCOM = 4482,
+    SpvOpImageBlockMatchSADQCOM = 4483,
     SpvOpGroupIAddNonUniformAMD = 5000,
     SpvOpGroupFAddNonUniformAMD = 5001,
     SpvOpGroupFMinNonUniformAMD = 5002,
@@ -2347,6 +2356,10 @@
     case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
     case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
     case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+    case SpvOpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
+    case SpvOpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
+    case SpvOpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
+    case SpvOpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
     case SpvOpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case SpvOpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case SpvOpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp
index 1f5acda..6fd7956 100644
--- a/include/spirv/unified1/spirv.hpp
+++ b/include/spirv/unified1/spirv.hpp
@@ -509,6 +509,8 @@
     DecorationMaxByteOffsetId = 47,
     DecorationNoSignedWrap = 4469,
     DecorationNoUnsignedWrap = 4470,
+    DecorationWeightTextureQCOM = 4487,
+    DecorationBlockMatchTextureQCOM = 4488,
     DecorationExplicitInterpAMD = 4999,
     DecorationOverrideCoverageNV = 5248,
     DecorationPassthroughNV = 5250,
@@ -1017,6 +1019,9 @@
     CapabilityRayQueryKHR = 4472,
     CapabilityRayTraversalPrimitiveCullingKHR = 4478,
     CapabilityRayTracingKHR = 4479,
+    CapabilityTextureSampleWeightedQCOM = 4484,
+    CapabilityTextureBoxFilterQCOM = 4485,
+    CapabilityTextureBlockMatchQCOM = 4486,
     CapabilityFloat16ImageAMD = 5008,
     CapabilityImageGatherBiasLodAMD = 5009,
     CapabilityFragmentMaskAMD = 5010,
@@ -1633,6 +1638,10 @@
     OpRayQueryConfirmIntersectionKHR = 4476,
     OpRayQueryProceedKHR = 4477,
     OpRayQueryGetIntersectionTypeKHR = 4479,
+    OpImageSampleWeightedQCOM = 4480,
+    OpImageBoxFilterQCOM = 4481,
+    OpImageBlockMatchSSDQCOM = 4482,
+    OpImageBlockMatchSADQCOM = 4483,
     OpGroupIAddNonUniformAMD = 5000,
     OpGroupFAddNonUniformAMD = 5001,
     OpGroupFMinNonUniformAMD = 5002,
@@ -2343,6 +2352,10 @@
     case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
     case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
     case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+    case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
+    case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
     case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11
index 42a369a..362e8fa 100644
--- a/include/spirv/unified1/spirv.hpp11
+++ b/include/spirv/unified1/spirv.hpp11
@@ -509,6 +509,8 @@
     MaxByteOffsetId = 47,
     NoSignedWrap = 4469,
     NoUnsignedWrap = 4470,
+    WeightTextureQCOM = 4487,
+    BlockMatchTextureQCOM = 4488,
     ExplicitInterpAMD = 4999,
     OverrideCoverageNV = 5248,
     PassthroughNV = 5250,
@@ -1017,6 +1019,9 @@
     RayQueryKHR = 4472,
     RayTraversalPrimitiveCullingKHR = 4478,
     RayTracingKHR = 4479,
+    TextureSampleWeightedQCOM = 4484,
+    TextureBoxFilterQCOM = 4485,
+    TextureBlockMatchQCOM = 4486,
     Float16ImageAMD = 5008,
     ImageGatherBiasLodAMD = 5009,
     FragmentMaskAMD = 5010,
@@ -1633,6 +1638,10 @@
     OpRayQueryConfirmIntersectionKHR = 4476,
     OpRayQueryProceedKHR = 4477,
     OpRayQueryGetIntersectionTypeKHR = 4479,
+    OpImageSampleWeightedQCOM = 4480,
+    OpImageBoxFilterQCOM = 4481,
+    OpImageBlockMatchSSDQCOM = 4482,
+    OpImageBlockMatchSADQCOM = 4483,
     OpGroupIAddNonUniformAMD = 5000,
     OpGroupFAddNonUniformAMD = 5001,
     OpGroupFMinNonUniformAMD = 5002,
@@ -2343,6 +2352,10 @@
     case Op::OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
     case Op::OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
     case Op::OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+    case Op::OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
+    case Op::OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
+    case Op::OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
+    case Op::OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
     case Op::OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case Op::OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
     case Op::OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json
index ef124dc..5cad41c 100644
--- a/include/spirv/unified1/spirv.json
+++ b/include/spirv/unified1/spirv.json
@@ -535,6 +535,8 @@
                     "MaxByteOffsetId": 47,
                     "NoSignedWrap": 4469,
                     "NoUnsignedWrap": 4470,
+                    "WeightTextureQCOM": 4487,
+                    "BlockMatchTextureQCOM": 4488,
                     "ExplicitInterpAMD": 4999,
                     "OverrideCoverageNV": 5248,
                     "PassthroughNV": 5250,
@@ -997,6 +999,9 @@
                     "RayQueryKHR": 4472,
                     "RayTraversalPrimitiveCullingKHR": 4478,
                     "RayTracingKHR": 4479,
+                    "TextureSampleWeightedQCOM": 4484,
+                    "TextureBoxFilterQCOM": 4485,
+                    "TextureBlockMatchQCOM": 4486,
                     "Float16ImageAMD": 5008,
                     "ImageGatherBiasLodAMD": 5009,
                     "FragmentMaskAMD": 5010,
@@ -1623,6 +1628,10 @@
                     "OpRayQueryConfirmIntersectionKHR": 4476,
                     "OpRayQueryProceedKHR": 4477,
                     "OpRayQueryGetIntersectionTypeKHR": 4479,
+                    "OpImageSampleWeightedQCOM": 4480,
+                    "OpImageBoxFilterQCOM": 4481,
+                    "OpImageBlockMatchSSDQCOM": 4482,
+                    "OpImageBlockMatchSADQCOM": 4483,
                     "OpGroupIAddNonUniformAMD": 5000,
                     "OpGroupFAddNonUniformAMD": 5001,
                     "OpGroupFMinNonUniformAMD": 5002,
diff --git a/include/spirv/unified1/spirv.lua b/include/spirv/unified1/spirv.lua
index 24699cd..88b6547 100644
--- a/include/spirv/unified1/spirv.lua
+++ b/include/spirv/unified1/spirv.lua
@@ -482,6 +482,8 @@
         MaxByteOffsetId = 47,
         NoSignedWrap = 4469,
         NoUnsignedWrap = 4470,
+        WeightTextureQCOM = 4487,
+        BlockMatchTextureQCOM = 4488,
         ExplicitInterpAMD = 4999,
         OverrideCoverageNV = 5248,
         PassthroughNV = 5250,
@@ -979,6 +981,9 @@
         RayQueryKHR = 4472,
         RayTraversalPrimitiveCullingKHR = 4478,
         RayTracingKHR = 4479,
+        TextureSampleWeightedQCOM = 4484,
+        TextureBoxFilterQCOM = 4485,
+        TextureBlockMatchQCOM = 4486,
         Float16ImageAMD = 5008,
         ImageGatherBiasLodAMD = 5009,
         FragmentMaskAMD = 5010,
@@ -1584,6 +1589,10 @@
         OpRayQueryConfirmIntersectionKHR = 4476,
         OpRayQueryProceedKHR = 4477,
         OpRayQueryGetIntersectionTypeKHR = 4479,
+        OpImageSampleWeightedQCOM = 4480,
+        OpImageBoxFilterQCOM = 4481,
+        OpImageBlockMatchSSDQCOM = 4482,
+        OpImageBlockMatchSADQCOM = 4483,
         OpGroupIAddNonUniformAMD = 5000,
         OpGroupFAddNonUniformAMD = 5001,
         OpGroupFMinNonUniformAMD = 5002,
diff --git a/include/spirv/unified1/spirv.py b/include/spirv/unified1/spirv.py
index 69cb94c..884f31a 100644
--- a/include/spirv/unified1/spirv.py
+++ b/include/spirv/unified1/spirv.py
@@ -482,6 +482,8 @@
         'MaxByteOffsetId' : 47,
         'NoSignedWrap' : 4469,
         'NoUnsignedWrap' : 4470,
+        'WeightTextureQCOM' : 4487,
+        'BlockMatchTextureQCOM' : 4488,
         'ExplicitInterpAMD' : 4999,
         'OverrideCoverageNV' : 5248,
         'PassthroughNV' : 5250,
@@ -979,6 +981,9 @@
         'RayQueryKHR' : 4472,
         'RayTraversalPrimitiveCullingKHR' : 4478,
         'RayTracingKHR' : 4479,
+        'TextureSampleWeightedQCOM' : 4484,
+        'TextureBoxFilterQCOM' : 4485,
+        'TextureBlockMatchQCOM' : 4486,
         'Float16ImageAMD' : 5008,
         'ImageGatherBiasLodAMD' : 5009,
         'FragmentMaskAMD' : 5010,
@@ -1584,6 +1589,10 @@
         'OpRayQueryConfirmIntersectionKHR' : 4476,
         'OpRayQueryProceedKHR' : 4477,
         'OpRayQueryGetIntersectionTypeKHR' : 4479,
+        'OpImageSampleWeightedQCOM' : 4480,
+        'OpImageBoxFilterQCOM' : 4481,
+        'OpImageBlockMatchSSDQCOM' : 4482,
+        'OpImageBlockMatchSADQCOM' : 4483,
         'OpGroupIAddNonUniformAMD' : 5000,
         'OpGroupFAddNonUniformAMD' : 5001,
         'OpGroupFMinNonUniformAMD' : 5002,
diff --git a/include/spirv/unified1/spv.d b/include/spirv/unified1/spv.d
index 3b88fc2..315b7c8 100644
--- a/include/spirv/unified1/spv.d
+++ b/include/spirv/unified1/spv.d
@@ -510,6 +510,8 @@
     MaxByteOffsetId = 47,
     NoSignedWrap = 4469,
     NoUnsignedWrap = 4470,
+    WeightTextureQCOM = 4487,
+    BlockMatchTextureQCOM = 4488,
     ExplicitInterpAMD = 4999,
     OverrideCoverageNV = 5248,
     PassthroughNV = 5250,
@@ -1024,6 +1026,9 @@
     RayQueryKHR = 4472,
     RayTraversalPrimitiveCullingKHR = 4478,
     RayTracingKHR = 4479,
+    TextureSampleWeightedQCOM = 4484,
+    TextureBoxFilterQCOM = 4485,
+    TextureBlockMatchQCOM = 4486,
     Float16ImageAMD = 5008,
     ImageGatherBiasLodAMD = 5009,
     FragmentMaskAMD = 5010,
@@ -1642,6 +1647,10 @@
     OpRayQueryConfirmIntersectionKHR = 4476,
     OpRayQueryProceedKHR = 4477,
     OpRayQueryGetIntersectionTypeKHR = 4479,
+    OpImageSampleWeightedQCOM = 4480,
+    OpImageBoxFilterQCOM = 4481,
+    OpImageBlockMatchSSDQCOM = 4482,
+    OpImageBlockMatchSADQCOM = 4483,
     OpGroupIAddNonUniformAMD = 5000,
     OpGroupFAddNonUniformAMD = 5001,
     OpGroupFMinNonUniformAMD = 5002,