Add support for the ARM extended matrix layout
This commit is contained in:
parent
68821c4da8
commit
02263efcd6
8 changed files with 548 additions and 0 deletions
|
|
@ -3705,6 +3705,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
||||
if (node->getOp() == glslang::EOpCooperativeMatrixLoad) {
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
||||
auto layout = builder.getConstantScalar(operands[3]);
|
||||
if (layout == spv::CooperativeMatrixLayoutRowBlockedInterleavedARM ||
|
||||
layout == spv::CooperativeMatrixLayoutColumnBlockedInterleavedARM) {
|
||||
builder.addExtension(spv::E_SPV_ARM_cooperative_matrix_layouts);
|
||||
builder.addCapability(spv::CapabilityCooperativeMatrixLayoutsARM);
|
||||
}
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||
} else {
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||
|
|
@ -3729,6 +3735,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object
|
||||
if (node->getOp() == glslang::EOpCooperativeMatrixStore) {
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
||||
auto layout = builder.getConstantScalar(operands[3]);
|
||||
if (layout == spv::CooperativeMatrixLayoutRowBlockedInterleavedARM ||
|
||||
layout == spv::CooperativeMatrixLayoutColumnBlockedInterleavedARM) {
|
||||
builder.addExtension(spv::E_SPV_ARM_cooperative_matrix_layouts);
|
||||
builder.addCapability(spv::CapabilityCooperativeMatrixLayoutsARM);
|
||||
}
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||
} else {
|
||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue