From aaffbc59b41bf8faea671b0d1c6b34a584c45171 Mon Sep 17 00:00:00 2001
From: Jeff Bolz <jbolz@nvidia.com>
Date: Fri, 15 May 2026 10:51:25 -0500
Subject: [PATCH 15/26] SPV_NV_cooperative_matrix_decode_vector (#601)

---
 include/spirv/unified1/spirv.bf                |  3 +++
 include/spirv/unified1/spirv.core.grammar.json | 16 ++++++++++++++++
 include/spirv/unified1/spirv.cs                |  3 +++
 include/spirv/unified1/spirv.h                 |  4 ++++
 include/spirv/unified1/spirv.hpp               |  4 ++++
 include/spirv/unified1/spirv.hpp11             |  4 ++++
 include/spirv/unified1/spirv.json              |  4 +++-
 include/spirv/unified1/spirv.lua               |  3 +++
 include/spirv/unified1/spirv.py                |  3 +++
 include/spirv/unified1/spv.d                   |  3 +++
 10 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/include/spirv/unified1/spirv.bf b/include/spirv/unified1/spirv.bf
index 0ecf295..9497023 100644
--- a/include/spirv/unified1/spirv.bf
+++ b/include/spirv/unified1/spirv.bf
@@ -1325,6 +1325,7 @@ namespace Spv
             CooperativeVectorTrainingNV = 5435,
             RayTracingClusterAccelerationStructureNV = 5437,
             TensorAddressingNV = 5439,
+            CooperativeMatrixDecodeVectorNV = 5447,
             SubgroupShuffleINTEL = 5568,
             SubgroupBufferBlockIOINTEL = 5569,
             SubgroupImageBlockIOINTEL = 5570,
@@ -1633,6 +1634,7 @@ namespace Spv
         {
             TensorView = 0,
             DecodeFunc = 1,
+            DecodeVectorFunc = 2,
             Max = 0x7fffffff,
         }
 
@@ -1641,6 +1643,7 @@ namespace Spv
             MaskNone = 0,
             TensorView = 0x00000001,
             DecodeFunc = 0x00000002,
+            DecodeVectorFunc = 0x00000004,
         }
 
         [AllowDuplicates, CRepr] public enum TensorOperandsShift
diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json
index b2b665b..4f96982 100644
--- a/include/spirv/unified1/spirv.core.grammar.json
+++ b/include/spirv/unified1/spirv.core.grammar.json
@@ -18200,6 +18200,13 @@
           "extensions" : [ "SPV_NV_tensor_addressing" ],
           "version" : "None"
         },
+        {
+          "enumerant" : "CooperativeMatrixDecodeVectorNV",
+          "value" : 5447,
+          "capabilities" : [ "CooperativeMatrixBlockLoadsNV" ],
+          "extensions" : [ "SPV_NV_cooperative_matrix_decode_vector" ],
+          "version" : "None"
+        },
         {
           "enumerant" : "SubgroupShuffleINTEL",
           "value" : 5568,
@@ -19035,6 +19042,15 @@
           ],
           "capabilities" : [ "CooperativeMatrixBlockLoadsNV" ],
           "version" : "None"
+        },
+        {
+          "enumerant" : "DecodeVectorFunc",
+          "value" : "0x0004",
+          "parameters" : [
+            { "kind" : "IdRef" }
+          ],
+          "capabilities" : [ "CooperativeMatrixDecodeVectorNV" ],
+          "version" : "None"
         }
       ]
     },
diff --git a/include/spirv/unified1/spirv.cs b/include/spirv/unified1/spirv.cs
index 06845bb..7631bf2 100644
--- a/include/spirv/unified1/spirv.cs
+++ b/include/spirv/unified1/spirv.cs
@@ -1324,6 +1324,7 @@ namespace Spv
             CooperativeVectorTrainingNV = 5435,
             RayTracingClusterAccelerationStructureNV = 5437,
             TensorAddressingNV = 5439,
+            CooperativeMatrixDecodeVectorNV = 5447,
             SubgroupShuffleINTEL = 5568,
             SubgroupBufferBlockIOINTEL = 5569,
             SubgroupImageBlockIOINTEL = 5570,
@@ -1632,6 +1633,7 @@ namespace Spv
         {
             TensorView = 0,
             DecodeFunc = 1,
+            DecodeVectorFunc = 2,
             Max = 0x7fffffff,
         }
 
@@ -1640,6 +1642,7 @@ namespace Spv
             MaskNone = 0,
             TensorView = 0x00000001,
             DecodeFunc = 0x00000002,
+            DecodeVectorFunc = 0x00000004,
         }
 
         public enum TensorOperandsShift
diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h
index 964f5aa..5ab265f 100644
--- a/include/spirv/unified1/spirv.h
+++ b/include/spirv/unified1/spirv.h
@@ -1295,6 +1295,7 @@ typedef enum SpvCapability_ {
     SpvCapabilityCooperativeVectorTrainingNV = 5435,
     SpvCapabilityRayTracingClusterAccelerationStructureNV = 5437,
     SpvCapabilityTensorAddressingNV = 5439,
+    SpvCapabilityCooperativeMatrixDecodeVectorNV = 5447,
     SpvCapabilitySubgroupShuffleINTEL = 5568,
     SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
     SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
@@ -1583,6 +1584,7 @@ typedef enum SpvTensorClampMode_ {
 typedef enum SpvTensorAddressingOperandsShift_ {
     SpvTensorAddressingOperandsTensorViewShift = 0,
     SpvTensorAddressingOperandsDecodeFuncShift = 1,
+    SpvTensorAddressingOperandsDecodeVectorFuncShift = 2,
     SpvTensorAddressingOperandsMax = 0x7fffffff,
 } SpvTensorAddressingOperandsShift;
 
@@ -1590,6 +1592,7 @@ typedef enum SpvTensorAddressingOperandsMask_ {
     SpvTensorAddressingOperandsMaskNone = 0,
     SpvTensorAddressingOperandsTensorViewMask = 0x00000001,
     SpvTensorAddressingOperandsDecodeFuncMask = 0x00000002,
+    SpvTensorAddressingOperandsDecodeVectorFuncMask = 0x00000004,
 } SpvTensorAddressingOperandsMask;
 
 typedef enum SpvTensorOperandsShift_ {
@@ -4457,6 +4460,7 @@ inline const char* SpvCapabilityToString(SpvCapability value) {
     case SpvCapabilityCooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV";
     case SpvCapabilityRayTracingClusterAccelerationStructureNV: return "RayTracingClusterAccelerationStructureNV";
     case SpvCapabilityTensorAddressingNV: return "TensorAddressingNV";
+    case SpvCapabilityCooperativeMatrixDecodeVectorNV: return "CooperativeMatrixDecodeVectorNV";
     case SpvCapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL";
     case SpvCapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL";
     case SpvCapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL";
diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp
index 655a79c..33b4a8b 100644
--- a/include/spirv/unified1/spirv.hpp
+++ b/include/spirv/unified1/spirv.hpp
@@ -1291,6 +1291,7 @@ enum Capability {
     CapabilityCooperativeVectorTrainingNV = 5435,
     CapabilityRayTracingClusterAccelerationStructureNV = 5437,
     CapabilityTensorAddressingNV = 5439,
+    CapabilityCooperativeMatrixDecodeVectorNV = 5447,
     CapabilitySubgroupShuffleINTEL = 5568,
     CapabilitySubgroupBufferBlockIOINTEL = 5569,
     CapabilitySubgroupImageBlockIOINTEL = 5570,
@@ -1579,6 +1580,7 @@ enum TensorClampMode {
 enum TensorAddressingOperandsShift {
     TensorAddressingOperandsTensorViewShift = 0,
     TensorAddressingOperandsDecodeFuncShift = 1,
+    TensorAddressingOperandsDecodeVectorFuncShift = 2,
     TensorAddressingOperandsMax = 0x7fffffff,
 };
 
@@ -1586,6 +1588,7 @@ enum TensorAddressingOperandsMask {
     TensorAddressingOperandsMaskNone = 0,
     TensorAddressingOperandsTensorViewMask = 0x00000001,
     TensorAddressingOperandsDecodeFuncMask = 0x00000002,
+    TensorAddressingOperandsDecodeVectorFuncMask = 0x00000004,
 };
 
 enum TensorOperandsShift {
@@ -4453,6 +4456,7 @@ inline const char* CapabilityToString(Capability value) {
     case CapabilityCooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV";
     case CapabilityRayTracingClusterAccelerationStructureNV: return "RayTracingClusterAccelerationStructureNV";
     case CapabilityTensorAddressingNV: return "TensorAddressingNV";
+    case CapabilityCooperativeMatrixDecodeVectorNV: return "CooperativeMatrixDecodeVectorNV";
     case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL";
     case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL";
     case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL";
diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11
index 270b33f..eb15ea2 100644
--- a/include/spirv/unified1/spirv.hpp11
+++ b/include/spirv/unified1/spirv.hpp11
@@ -1291,6 +1291,7 @@ enum class Capability : unsigned {
     CooperativeVectorTrainingNV = 5435,
     RayTracingClusterAccelerationStructureNV = 5437,
     TensorAddressingNV = 5439,
+    CooperativeMatrixDecodeVectorNV = 5447,
     SubgroupShuffleINTEL = 5568,
     SubgroupBufferBlockIOINTEL = 5569,
     SubgroupImageBlockIOINTEL = 5570,
@@ -1579,6 +1580,7 @@ enum class TensorClampMode : unsigned {
 enum class TensorAddressingOperandsShift : unsigned {
     TensorView = 0,
     DecodeFunc = 1,
+    DecodeVectorFunc = 2,
     Max = 0x7fffffff,
 };
 
@@ -1586,6 +1588,7 @@ enum class TensorAddressingOperandsMask : unsigned {
     MaskNone = 0,
     TensorView = 0x00000001,
     DecodeFunc = 0x00000002,
+    DecodeVectorFunc = 0x00000004,
 };
 
 enum class TensorOperandsShift : unsigned {
@@ -4453,6 +4456,7 @@ inline const char* CapabilityToString(Capability value) {
     case Capability::CooperativeVectorTrainingNV: return "CooperativeVectorTrainingNV";
     case Capability::RayTracingClusterAccelerationStructureNV: return "RayTracingClusterAccelerationStructureNV";
     case Capability::TensorAddressingNV: return "TensorAddressingNV";
+    case Capability::CooperativeMatrixDecodeVectorNV: return "CooperativeMatrixDecodeVectorNV";
     case Capability::SubgroupShuffleINTEL: return "SubgroupShuffleINTEL";
     case Capability::SubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL";
     case Capability::SubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL";
diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json
index 5a21f07..35f85d9 100644
--- a/include/spirv/unified1/spirv.json
+++ b/include/spirv/unified1/spirv.json
@@ -1257,6 +1257,7 @@
                     "CooperativeVectorTrainingNV": 5435,
                     "RayTracingClusterAccelerationStructureNV": 5437,
                     "TensorAddressingNV": 5439,
+                    "CooperativeMatrixDecodeVectorNV": 5447,
                     "SubgroupShuffleINTEL": 5568,
                     "SubgroupBufferBlockIOINTEL": 5569,
                     "SubgroupImageBlockIOINTEL": 5570,
@@ -1551,7 +1552,8 @@
                 "Values":
                 {
                     "TensorView": 0,
-                    "DecodeFunc": 1
+                    "DecodeFunc": 1,
+                    "DecodeVectorFunc": 2
                 }
             },
             {
diff --git a/include/spirv/unified1/spirv.lua b/include/spirv/unified1/spirv.lua
index 64b0a1f..f244e9a 100644
--- a/include/spirv/unified1/spirv.lua
+++ b/include/spirv/unified1/spirv.lua
@@ -1282,6 +1282,7 @@ spv = {
         CooperativeVectorTrainingNV = 5435,
         RayTracingClusterAccelerationStructureNV = 5437,
         TensorAddressingNV = 5439,
+        CooperativeMatrixDecodeVectorNV = 5447,
         SubgroupShuffleINTEL = 5568,
         SubgroupBufferBlockIOINTEL = 5569,
         SubgroupImageBlockIOINTEL = 5570,
@@ -1570,6 +1571,7 @@ spv = {
     TensorAddressingOperandsShift = {
         TensorView = 0,
         DecodeFunc = 1,
+        DecodeVectorFunc = 2,
         Max = 0x7fffffff,
     },
 
@@ -1577,6 +1579,7 @@ spv = {
         MaskNone = 0,
         TensorView = 0x00000001,
         DecodeFunc = 0x00000002,
+        DecodeVectorFunc = 0x00000004,
     },
 
     TensorOperandsShift = {
diff --git a/include/spirv/unified1/spirv.py b/include/spirv/unified1/spirv.py
index 5f3bae6..af0e61f 100644
--- a/include/spirv/unified1/spirv.py
+++ b/include/spirv/unified1/spirv.py
@@ -1253,6 +1253,7 @@ spv = {
         'CooperativeVectorTrainingNV' : 5435,
         'RayTracingClusterAccelerationStructureNV' : 5437,
         'TensorAddressingNV' : 5439,
+        'CooperativeMatrixDecodeVectorNV' : 5447,
         'SubgroupShuffleINTEL' : 5568,
         'SubgroupBufferBlockIOINTEL' : 5569,
         'SubgroupImageBlockIOINTEL' : 5570,
@@ -1525,12 +1526,14 @@ spv = {
     'TensorAddressingOperandsShift' : {
         'TensorView' : 0,
         'DecodeFunc' : 1,
+        'DecodeVectorFunc' : 2,
     },
 
     'TensorAddressingOperandsMask' : {
         'MaskNone' : 0,
         'TensorView' : 0x00000001,
         'DecodeFunc' : 0x00000002,
+        'DecodeVectorFunc' : 0x00000004,
     },
 
     'TensorOperandsShift' : {
diff --git a/include/spirv/unified1/spv.d b/include/spirv/unified1/spv.d
index 4e4e3dc..1ed7d76 100644
--- a/include/spirv/unified1/spv.d
+++ b/include/spirv/unified1/spv.d
@@ -1327,6 +1327,7 @@ enum Capability : uint
     CooperativeVectorTrainingNV = 5435,
     RayTracingClusterAccelerationStructureNV = 5437,
     TensorAddressingNV = 5439,
+    CooperativeMatrixDecodeVectorNV = 5447,
     SubgroupShuffleINTEL = 5568,
     SubgroupBufferBlockIOINTEL = 5569,
     SubgroupImageBlockIOINTEL = 5570,
@@ -1635,6 +1636,7 @@ enum TensorAddressingOperandsShift : uint
 {
     TensorView = 0,
     DecodeFunc = 1,
+    DecodeVectorFunc = 2,
     Max = 0x7fffffff,
 }
 
@@ -1643,6 +1645,7 @@ enum TensorAddressingOperandsMask : uint
     MaskNone = 0,
     TensorView = 0x00000001,
     DecodeFunc = 0x00000002,
+    DecodeVectorFunc = 0x00000004,
 }
 
 enum TensorOperandsShift : uint
-- 
2.54.0

