Align spirv.hpp to SPIRV-Headers for SPV_KHR_cooperative_matrix

Some of the enumerants used by this extension were missing a KHR suffix.
This commit is contained in:
Kévin Petit 2023-10-26 00:59:52 +01:00 committed by GitHub
parent ffac211098
commit a9e698322e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 24 deletions

View File

@ -3715,13 +3715,13 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// Determine Cooperative Matrix Operands bits from the signedness of the types.
if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType()))
matrixOperands |= spv::CooperativeMatrixOperandsMatrixASignedComponentsMask;
matrixOperands |= spv::CooperativeMatrixOperandsMatrixASignedComponentsKHRMask;
if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType()))
matrixOperands |= spv::CooperativeMatrixOperandsMatrixBSignedComponentsMask;
matrixOperands |= spv::CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask;
if (isTypeSignedInt(glslangOperands[2]->getAsTyped()->getBasicType()))
matrixOperands |= spv::CooperativeMatrixOperandsMatrixCSignedComponentsMask;
matrixOperands |= spv::CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask;
if (isTypeSignedInt(node->getBasicType()))
matrixOperands |= spv::CooperativeMatrixOperandsMatrixResultSignedComponentsMask;
matrixOperands |= spv::CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask;
std::vector<spv::IdImmediate> idImmOps;
idImmOps.push_back(spv::IdImmediate(true, operands[0]));

View File

@ -802,11 +802,11 @@ const int CooperativeMatrixOperandsCeiling = 6;
const char* CooperativeMatrixOperandsString(int op)
{
switch (op) {
case CooperativeMatrixOperandsMatrixASignedComponentsShift: return "ASignedComponents";
case CooperativeMatrixOperandsMatrixBSignedComponentsShift: return "BSignedComponents";
case CooperativeMatrixOperandsMatrixCSignedComponentsShift: return "CSignedComponents";
case CooperativeMatrixOperandsMatrixResultSignedComponentsShift: return "ResultSignedComponents";
case CooperativeMatrixOperandsSaturatingAccumulationShift: return "SaturatingAccumulation";
case CooperativeMatrixOperandsMatrixASignedComponentsKHRShift: return "ASignedComponentsKHR";
case CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift: return "BSignedComponentsKHR";
case CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift: return "CSignedComponentsKHR";
case CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift: return "ResultSignedComponentsKHR";
case CooperativeMatrixOperandsSaturatingAccumulationKHRShift: return "SaturatingAccumulationKHR";
default: return "Bad";
}

View File

@ -1274,26 +1274,26 @@ enum PackedVectorFormat {
};
enum CooperativeMatrixOperandsShift {
CooperativeMatrixOperandsMatrixASignedComponentsShift = 0,
CooperativeMatrixOperandsMatrixBSignedComponentsShift = 1,
CooperativeMatrixOperandsMatrixCSignedComponentsShift = 2,
CooperativeMatrixOperandsMatrixResultSignedComponentsShift = 3,
CooperativeMatrixOperandsSaturatingAccumulationShift = 4,
CooperativeMatrixOperandsMatrixASignedComponentsKHRShift = 0,
CooperativeMatrixOperandsMatrixBSignedComponentsKHRShift = 1,
CooperativeMatrixOperandsMatrixCSignedComponentsKHRShift = 2,
CooperativeMatrixOperandsMatrixResultSignedComponentsKHRShift = 3,
CooperativeMatrixOperandsSaturatingAccumulationKHRShift = 4,
CooperativeMatrixOperandsMax = 0x7fffffff,
};
enum CooperativeMatrixOperandsMask {
CooperativeMatrixOperandsMaskNone = 0,
CooperativeMatrixOperandsMatrixASignedComponentsMask = 0x00000001,
CooperativeMatrixOperandsMatrixBSignedComponentsMask = 0x00000002,
CooperativeMatrixOperandsMatrixCSignedComponentsMask = 0x00000004,
CooperativeMatrixOperandsMatrixResultSignedComponentsMask = 0x00000008,
CooperativeMatrixOperandsSaturatingAccumulationMask = 0x00000010,
CooperativeMatrixOperandsMatrixASignedComponentsKHRMask = 0x00000001,
CooperativeMatrixOperandsMatrixBSignedComponentsKHRMask = 0x00000002,
CooperativeMatrixOperandsMatrixCSignedComponentsKHRMask = 0x00000004,
CooperativeMatrixOperandsMatrixResultSignedComponentsKHRMask = 0x00000008,
CooperativeMatrixOperandsSaturatingAccumulationKHRMask = 0x00000010,
};
enum CooperativeMatrixLayout {
CooperativeMatrixLayoutCooperativeMatrixRowMajorKHR = 0,
CooperativeMatrixLayoutCooperativeMatrixColumnMajorKHR = 1,
CooperativeMatrixLayoutRowMajorKHR = 0,
CooperativeMatrixLayoutColumnMajorKHR = 1,
CooperativeMatrixLayoutMax = 0x7fffffff,
};

View File

@ -372,15 +372,15 @@ spv.coopmatKHR.comp
205: 202 Load 204(ms8A)
209: 206 Load 208(ms8B)
213: 210 Load 212(ms8C)
214: 210 CooperativeMatrixMulAddKHR 205 209 213 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents
214: 210 CooperativeMatrixMulAddKHR 205 209 213 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR
215: 202 Load 204(ms8A)
216: 206 Load 208(ms8B)
217: 210 Load 212(ms8C)
218: 210 CooperativeMatrixMulAddKHR 215 216 217 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents
218: 210 CooperativeMatrixMulAddKHR 215 216 217 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR
219: 202 Load 204(ms8A)
220: 206 Load 208(ms8B)
221: 210 Load 212(ms8C)
223: 210 CooperativeMatrixMulAddKHR 219 220 221 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents SaturatingAccumulation
223: 210 CooperativeMatrixMulAddKHR 219 220 221 ASignedComponentsKHR BSignedComponentsKHR CSignedComponentsKHR ResultSignedComponentsKHR SaturatingAccumulationKHR
228: 225 Load 227(m16)
229: 194(ptr) AccessChain 193(shmatrix) 82
CooperativeMatrixStoreKHR 229 228 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10