Implement support for GL_KHR_cooperative_matrix extension
This commit is contained in:
parent
91a97b4c69
commit
808c7ed17c
@ -55,5 +55,6 @@ static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subg
|
|||||||
static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
|
static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric";
|
||||||
static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
|
static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests";
|
||||||
static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch";
|
static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch";
|
||||||
|
static const char* const E_SPV_KHR_cooperative_matrix = "SPV_KHR_cooperative_matrix";
|
||||||
|
|
||||||
#endif // #ifndef GLSLextKHR_H
|
#endif // #ifndef GLSLextKHR_H
|
||||||
|
@ -176,7 +176,7 @@ protected:
|
|||||||
glslang::TLayoutPacking, const glslang::TQualifier&);
|
glslang::TLayoutPacking, const glslang::TQualifier&);
|
||||||
void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking,
|
void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking,
|
||||||
const glslang::TQualifier&, spv::Id, const std::vector<spv::Id>& spvMembers);
|
const glslang::TQualifier&, spv::Id, const std::vector<spv::Id>& spvMembers);
|
||||||
spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim);
|
spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim, bool allowZero = false);
|
||||||
spv::Id accessChainLoad(const glslang::TType& type);
|
spv::Id accessChainLoad(const glslang::TType& type);
|
||||||
void accessChainStore(const glslang::TType& type, spv::Id rvalue);
|
void accessChainStore(const glslang::TType& type, spv::Id rvalue);
|
||||||
void multiTypeStore(const glslang::TType&, spv::Id rValue);
|
void multiTypeStore(const glslang::TType&, spv::Id rValue);
|
||||||
@ -212,7 +212,7 @@ protected:
|
|||||||
glslang::TBasicType typeProxy);
|
glslang::TBasicType typeProxy);
|
||||||
spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand,
|
spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand,
|
||||||
glslang::TBasicType typeProxy);
|
glslang::TBasicType typeProxy);
|
||||||
spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize);
|
spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType);
|
||||||
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
|
spv::Id makeSmearedConstant(spv::Id constant, int vectorSize);
|
||||||
spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId,
|
spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId,
|
||||||
std::vector<spv::Id>& operands, glslang::TBasicType typeProxy,
|
std::vector<spv::Id>& operands, glslang::TBasicType typeProxy,
|
||||||
@ -2560,12 +2560,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
|
|||||||
|
|
||||||
spv::Id length;
|
spv::Id length;
|
||||||
if (node->getOperand()->getType().isCoopMat()) {
|
if (node->getOperand()->getType().isCoopMat()) {
|
||||||
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
|
|
||||||
|
|
||||||
spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType());
|
spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType());
|
||||||
assert(builder.isCooperativeMatrixType(typeId));
|
assert(builder.isCooperativeMatrixType(typeId));
|
||||||
|
|
||||||
length = builder.createCooperativeMatrixLength(typeId);
|
if (node->getOperand()->getType().isCoopMatKHR()) {
|
||||||
|
length = builder.createCooperativeMatrixLengthKHR(typeId);
|
||||||
|
} else {
|
||||||
|
spec_constant_op_mode_setter.turnOnSpecConstantOpMode();
|
||||||
|
length = builder.createCooperativeMatrixLengthNV(typeId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft();
|
glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft();
|
||||||
block->traverse(this);
|
block->traverse(this);
|
||||||
@ -3099,7 +3102,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
case glslang::EOpConstructStruct:
|
case glslang::EOpConstructStruct:
|
||||||
case glslang::EOpConstructTextureSampler:
|
case glslang::EOpConstructTextureSampler:
|
||||||
case glslang::EOpConstructReference:
|
case glslang::EOpConstructReference:
|
||||||
case glslang::EOpConstructCooperativeMatrix:
|
case glslang::EOpConstructCooperativeMatrixNV:
|
||||||
|
case glslang::EOpConstructCooperativeMatrixKHR:
|
||||||
{
|
{
|
||||||
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
||||||
std::vector<spv::Id> arguments;
|
std::vector<spv::Id> arguments;
|
||||||
@ -3116,7 +3120,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
} else
|
} else
|
||||||
constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments);
|
constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments);
|
||||||
} else if (node->getOp() == glslang::EOpConstructStruct ||
|
} else if (node->getOp() == glslang::EOpConstructStruct ||
|
||||||
node->getOp() == glslang::EOpConstructCooperativeMatrix ||
|
node->getOp() == glslang::EOpConstructCooperativeMatrixNV ||
|
||||||
|
node->getOp() == glslang::EOpConstructCooperativeMatrixKHR ||
|
||||||
node->getType().isArray()) {
|
node->getType().isArray()) {
|
||||||
std::vector<spv::Id> constituents;
|
std::vector<spv::Id> constituents;
|
||||||
for (int c = 0; c < (int)arguments.size(); ++c)
|
for (int c = 0; c < (int)arguments.size(); ++c)
|
||||||
@ -3291,6 +3296,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
break;
|
break;
|
||||||
case glslang::EOpCooperativeMatrixLoad:
|
case glslang::EOpCooperativeMatrixLoad:
|
||||||
case glslang::EOpCooperativeMatrixStore:
|
case glslang::EOpCooperativeMatrixStore:
|
||||||
|
case glslang::EOpCooperativeMatrixLoadNV:
|
||||||
|
case glslang::EOpCooperativeMatrixStoreNV:
|
||||||
noReturnValue = true;
|
noReturnValue = true;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpBeginInvocationInterlock:
|
case glslang::EOpBeginInvocationInterlock:
|
||||||
@ -3502,10 +3509,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
lvalue = true;
|
lvalue = true;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpCooperativeMatrixLoad:
|
case glslang::EOpCooperativeMatrixLoad:
|
||||||
|
case glslang::EOpCooperativeMatrixLoadNV:
|
||||||
if (arg == 0 || arg == 1)
|
if (arg == 0 || arg == 1)
|
||||||
lvalue = true;
|
lvalue = true;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpCooperativeMatrixStore:
|
case glslang::EOpCooperativeMatrixStore:
|
||||||
|
case glslang::EOpCooperativeMatrixStoreNV:
|
||||||
if (arg == 1)
|
if (arg == 1)
|
||||||
lvalue = true;
|
lvalue = true;
|
||||||
break;
|
break;
|
||||||
@ -3534,7 +3543,9 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
|
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (node->getOp() == glslang::EOpCooperativeMatrixLoad ||
|
if (node->getOp() == glslang::EOpCooperativeMatrixLoad ||
|
||||||
node->getOp() == glslang::EOpCooperativeMatrixStore) {
|
node->getOp() == glslang::EOpCooperativeMatrixStore ||
|
||||||
|
node->getOp() == glslang::EOpCooperativeMatrixLoadNV ||
|
||||||
|
node->getOp() == glslang::EOpCooperativeMatrixStoreNV) {
|
||||||
|
|
||||||
if (arg == 1) {
|
if (arg == 1) {
|
||||||
// fold "element" parameter into the access chain
|
// fold "element" parameter into the access chain
|
||||||
@ -3555,9 +3566,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
unsigned int alignment = builder.getAccessChain().alignment;
|
unsigned int alignment = builder.getAccessChain().alignment;
|
||||||
|
|
||||||
int memoryAccess = TranslateMemoryAccess(coherentFlags);
|
int memoryAccess = TranslateMemoryAccess(coherentFlags);
|
||||||
if (node->getOp() == glslang::EOpCooperativeMatrixLoad)
|
if (node->getOp() == glslang::EOpCooperativeMatrixLoad ||
|
||||||
|
node->getOp() == glslang::EOpCooperativeMatrixLoadNV)
|
||||||
memoryAccess &= ~spv::MemoryAccessMakePointerAvailableKHRMask;
|
memoryAccess &= ~spv::MemoryAccessMakePointerAvailableKHRMask;
|
||||||
if (node->getOp() == glslang::EOpCooperativeMatrixStore)
|
if (node->getOp() == glslang::EOpCooperativeMatrixStore ||
|
||||||
|
node->getOp() == glslang::EOpCooperativeMatrixStoreNV)
|
||||||
memoryAccess &= ~spv::MemoryAccessMakePointerVisibleKHRMask;
|
memoryAccess &= ~spv::MemoryAccessMakePointerVisibleKHRMask;
|
||||||
if (builder.getStorageClass(builder.getAccessChain().base) ==
|
if (builder.getStorageClass(builder.getAccessChain().base) ==
|
||||||
spv::StorageClassPhysicalStorageBufferEXT) {
|
spv::StorageClassPhysicalStorageBufferEXT) {
|
||||||
@ -3655,30 +3668,47 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
|
|
||||||
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
builder.setLine(node->getLoc().line, node->getLoc().getFilename());
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
if (node->getOp() == glslang::EOpCooperativeMatrixLoad) {
|
if (node->getOp() == glslang::EOpCooperativeMatrixLoad ||
|
||||||
|
node->getOp() == glslang::EOpCooperativeMatrixLoadNV) {
|
||||||
std::vector<spv::IdImmediate> idImmOps;
|
std::vector<spv::IdImmediate> idImmOps;
|
||||||
|
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
||||||
|
if (node->getOp() == glslang::EOpCooperativeMatrixLoad) {
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
|
} else {
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor
|
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor
|
||||||
|
}
|
||||||
idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end());
|
idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end());
|
||||||
// get the pointee type
|
// get the pointee type
|
||||||
spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0]));
|
spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0]));
|
||||||
assert(builder.isCooperativeMatrixType(typeId));
|
assert(builder.isCooperativeMatrixType(typeId));
|
||||||
// do the op
|
// do the op
|
||||||
spv::Id result = builder.createOp(spv::OpCooperativeMatrixLoadNV, typeId, idImmOps);
|
spv::Id result = node->getOp() == glslang::EOpCooperativeMatrixLoad
|
||||||
|
? builder.createOp(spv::OpCooperativeMatrixLoadKHR, typeId, idImmOps)
|
||||||
|
: builder.createOp(spv::OpCooperativeMatrixLoadNV, typeId, idImmOps);
|
||||||
// store the result to the pointer (out param 'm')
|
// store the result to the pointer (out param 'm')
|
||||||
builder.createStore(result, operands[0]);
|
builder.createStore(result, operands[0]);
|
||||||
result = 0;
|
result = 0;
|
||||||
} else if (node->getOp() == glslang::EOpCooperativeMatrixStore) {
|
} else if (node->getOp() == glslang::EOpCooperativeMatrixStore ||
|
||||||
|
node->getOp() == glslang::EOpCooperativeMatrixStoreNV) {
|
||||||
std::vector<spv::IdImmediate> idImmOps;
|
std::vector<spv::IdImmediate> idImmOps;
|
||||||
|
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object
|
idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object
|
||||||
|
if (node->getOp() == glslang::EOpCooperativeMatrixStore) {
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
|
} else {
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride
|
||||||
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor
|
idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor
|
||||||
|
}
|
||||||
idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end());
|
idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end());
|
||||||
|
|
||||||
|
if (node->getOp() == glslang::EOpCooperativeMatrixStore)
|
||||||
|
builder.createNoResultOp(spv::OpCooperativeMatrixStoreKHR, idImmOps);
|
||||||
|
else
|
||||||
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
|
builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps);
|
||||||
result = 0;
|
result = 0;
|
||||||
} else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) {
|
} else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) {
|
||||||
@ -3694,6 +3724,32 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
|
|||||||
// store the result to the pointer (out param 'm')
|
// store the result to the pointer (out param 'm')
|
||||||
builder.createStore(result, operands[2]);
|
builder.createStore(result, operands[2]);
|
||||||
result = 0;
|
result = 0;
|
||||||
|
} else if (node->getOp() == glslang::EOpCooperativeMatrixMulAdd) {
|
||||||
|
uint32_t matrixOperands = 0;
|
||||||
|
|
||||||
|
// If the optional operand is present, initialize matrixOperands to that value.
|
||||||
|
if (glslangOperands.size() == 4 && glslangOperands[3]->getAsConstantUnion()) {
|
||||||
|
matrixOperands = glslangOperands[3]->getAsConstantUnion()->getConstArray()[0].getIConst();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Determine Cooperative Matrix Operands bits from the signedness of the types.
|
||||||
|
if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType()))
|
||||||
|
matrixOperands |= spv::CooperativeMatrixOperandsMatrixASignedComponentsMask;
|
||||||
|
if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType()))
|
||||||
|
matrixOperands |= spv::CooperativeMatrixOperandsMatrixBSignedComponentsMask;
|
||||||
|
if (isTypeSignedInt(glslangOperands[2]->getAsTyped()->getBasicType()))
|
||||||
|
matrixOperands |= spv::CooperativeMatrixOperandsMatrixCSignedComponentsMask;
|
||||||
|
if (isTypeSignedInt(node->getBasicType()))
|
||||||
|
matrixOperands |= spv::CooperativeMatrixOperandsMatrixResultSignedComponentsMask;
|
||||||
|
|
||||||
|
std::vector<spv::IdImmediate> idImmOps;
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[0]));
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[1]));
|
||||||
|
idImmOps.push_back(spv::IdImmediate(true, operands[2]));
|
||||||
|
if (matrixOperands != 0)
|
||||||
|
idImmOps.push_back(spv::IdImmediate(false, matrixOperands));
|
||||||
|
|
||||||
|
result = builder.createOp(spv::OpCooperativeMatrixMulAddKHR, resultType(), idImmOps);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (atomic) {
|
if (atomic) {
|
||||||
@ -4586,9 +4642,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||||||
spvType = builder.makeVectorType(spvType, type.getVectorSize());
|
spvType = builder.makeVectorType(spvType, type.getVectorSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.isCoopMat()) {
|
if (type.isCoopMatNV()) {
|
||||||
builder.addCapability(spv::CapabilityCooperativeMatrixNV);
|
builder.addCapability(spv::CapabilityCooperativeMatrixNV);
|
||||||
builder.addExtension(spv::E_SPV_NV_cooperative_matrix);
|
builder.addExtension(spv::E_SPV_NV_cooperative_matrix);
|
||||||
|
|
||||||
if (type.getBasicType() == glslang::EbtFloat16)
|
if (type.getBasicType() == glslang::EbtFloat16)
|
||||||
builder.addCapability(spv::CapabilityFloat16);
|
builder.addCapability(spv::CapabilityFloat16);
|
||||||
if (type.getBasicType() == glslang::EbtUint8 ||
|
if (type.getBasicType() == glslang::EbtUint8 ||
|
||||||
@ -4596,11 +4653,29 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||||||
builder.addCapability(spv::CapabilityInt8);
|
builder.addCapability(spv::CapabilityInt8);
|
||||||
}
|
}
|
||||||
|
|
||||||
spv::Id scope = makeArraySizeId(*type.getTypeParameters(), 1);
|
spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1);
|
||||||
spv::Id rows = makeArraySizeId(*type.getTypeParameters(), 2);
|
spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2);
|
||||||
spv::Id cols = makeArraySizeId(*type.getTypeParameters(), 3);
|
spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 3);
|
||||||
|
|
||||||
spvType = builder.makeCooperativeMatrixType(spvType, scope, rows, cols);
|
spvType = builder.makeCooperativeMatrixTypeNV(spvType, scope, rows, cols);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type.isCoopMatKHR()) {
|
||||||
|
builder.addCapability(spv::CapabilityCooperativeMatrixKHR);
|
||||||
|
builder.addExtension(spv::E_SPV_KHR_cooperative_matrix);
|
||||||
|
|
||||||
|
if (type.getBasicType() == glslang::EbtFloat16)
|
||||||
|
builder.addCapability(spv::CapabilityFloat16);
|
||||||
|
if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) {
|
||||||
|
builder.addCapability(spv::CapabilityInt8);
|
||||||
|
}
|
||||||
|
|
||||||
|
spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 0);
|
||||||
|
spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1);
|
||||||
|
spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2);
|
||||||
|
spv::Id use = builder.makeUintConstant(type.getCoopMatKHRuse());
|
||||||
|
|
||||||
|
spvType = builder.makeCooperativeMatrixTypeKHR(spvType, scope, rows, cols, use);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.isArray()) {
|
if (type.isArray()) {
|
||||||
@ -4951,7 +5026,7 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type,
|
|||||||
// This is not quite trivial, because of specialization constants.
|
// This is not quite trivial, because of specialization constants.
|
||||||
// Sometimes, a raw constant is turned into an Id, and sometimes
|
// Sometimes, a raw constant is turned into an Id, and sometimes
|
||||||
// a specialization constant expression is.
|
// a specialization constant expression is.
|
||||||
spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim)
|
spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim, bool allowZero)
|
||||||
{
|
{
|
||||||
// First, see if this is sized with a node, meaning a specialization constant:
|
// First, see if this is sized with a node, meaning a specialization constant:
|
||||||
glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim);
|
glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim);
|
||||||
@ -4965,7 +5040,10 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra
|
|||||||
|
|
||||||
// Otherwise, need a compile-time (front end) size, get it:
|
// Otherwise, need a compile-time (front end) size, get it:
|
||||||
int size = arraySizes.getDimSize(dim);
|
int size = arraySizes.getDimSize(dim);
|
||||||
|
|
||||||
|
if (!allowZero)
|
||||||
assert(size > 0);
|
assert(size > 0);
|
||||||
|
|
||||||
return builder.makeUintConstant(size);
|
return builder.makeUintConstant(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7287,7 +7365,9 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat
|
|||||||
// For converting integers where both the bitwidth and the signedness could
|
// For converting integers where both the bitwidth and the signedness could
|
||||||
// change, but only do the width change here. The caller is still responsible
|
// change, but only do the width change here. The caller is still responsible
|
||||||
// for the signedness conversion.
|
// for the signedness conversion.
|
||||||
spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize)
|
// destType is the final type that will be converted to, but this function
|
||||||
|
// may only be doing part of that conversion.
|
||||||
|
spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType)
|
||||||
{
|
{
|
||||||
// Get the result type width, based on the type to convert to.
|
// Get the result type width, based on the type to convert to.
|
||||||
int width = 32;
|
int width = 32;
|
||||||
@ -7358,6 +7438,11 @@ spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op,
|
|||||||
|
|
||||||
if (vectorSize > 0)
|
if (vectorSize > 0)
|
||||||
type = builder.makeVectorType(type, vectorSize);
|
type = builder.makeVectorType(type, vectorSize);
|
||||||
|
else if (builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixKHR ||
|
||||||
|
builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixNV) {
|
||||||
|
|
||||||
|
type = builder.makeCooperativeMatrixTypeWithSameShape(type, destType);
|
||||||
|
}
|
||||||
|
|
||||||
return builder.createUnaryOp(convOp, type, operand);
|
return builder.createUnaryOp(convOp, type, operand);
|
||||||
}
|
}
|
||||||
@ -7630,7 +7715,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
|
|||||||
case glslang::EOpConvUint64ToInt16:
|
case glslang::EOpConvUint64ToInt16:
|
||||||
case glslang::EOpConvUint64ToInt:
|
case glslang::EOpConvUint64ToInt:
|
||||||
// OpSConvert/OpUConvert + OpBitCast
|
// OpSConvert/OpUConvert + OpBitCast
|
||||||
operand = createIntWidthConversion(op, operand, vectorSize);
|
operand = createIntWidthConversion(op, operand, vectorSize, destType);
|
||||||
|
|
||||||
if (builder.isInSpecConstCodeGenMode()) {
|
if (builder.isInSpecConstCodeGenMode()) {
|
||||||
// Build zero scalar or vector for OpIAdd.
|
// Build zero scalar or vector for OpIAdd.
|
||||||
@ -8963,7 +9048,7 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
|
|||||||
case glslang::EOpSetMeshOutputsEXT:
|
case glslang::EOpSetMeshOutputsEXT:
|
||||||
builder.createNoResultOp(spv::OpSetMeshOutputsEXT, operands);
|
builder.createNoResultOp(spv::OpSetMeshOutputsEXT, operands);
|
||||||
return 0;
|
return 0;
|
||||||
case glslang::EOpCooperativeMatrixMulAdd:
|
case glslang::EOpCooperativeMatrixMulAddNV:
|
||||||
opCode = spv::OpCooperativeMatrixMulAddNV;
|
opCode = spv::OpCooperativeMatrixMulAddNV;
|
||||||
break;
|
break;
|
||||||
case glslang::EOpHitObjectTraceRayNV:
|
case glslang::EOpHitObjectTraceRayNV:
|
||||||
|
@ -680,6 +680,7 @@ namespace spv {
|
|||||||
case spv::OperandKernelEnqueueFlags:
|
case spv::OperandKernelEnqueueFlags:
|
||||||
case spv::OperandKernelProfilingInfo:
|
case spv::OperandKernelProfilingInfo:
|
||||||
case spv::OperandCapability:
|
case spv::OperandCapability:
|
||||||
|
case spv::OperandCooperativeMatrixOperands:
|
||||||
++word;
|
++word;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -481,15 +481,41 @@ Id Builder::makeMatrixType(Id component, int cols, int rows)
|
|||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols)
|
Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use)
|
||||||
|
{
|
||||||
|
// try to find it
|
||||||
|
Instruction* type;
|
||||||
|
for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixKHR].size(); ++t) {
|
||||||
|
type = groupedTypes[OpTypeCooperativeMatrixKHR][t];
|
||||||
|
if (type->getIdOperand(0) == component &&
|
||||||
|
type->getIdOperand(1) == scope &&
|
||||||
|
type->getIdOperand(2) == rows &&
|
||||||
|
type->getIdOperand(3) == cols &&
|
||||||
|
type->getIdOperand(4) == use)
|
||||||
|
return type->getResultId();
|
||||||
|
}
|
||||||
|
|
||||||
|
// not found, make it
|
||||||
|
type = new Instruction(getUniqueId(), NoType, OpTypeCooperativeMatrixKHR);
|
||||||
|
type->addIdOperand(component);
|
||||||
|
type->addIdOperand(scope);
|
||||||
|
type->addIdOperand(rows);
|
||||||
|
type->addIdOperand(cols);
|
||||||
|
type->addIdOperand(use);
|
||||||
|
groupedTypes[OpTypeCooperativeMatrixKHR].push_back(type);
|
||||||
|
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(type));
|
||||||
|
module.mapInstruction(type);
|
||||||
|
|
||||||
|
return type->getResultId();
|
||||||
|
}
|
||||||
|
|
||||||
|
Id Builder::makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols)
|
||||||
{
|
{
|
||||||
// try to find it
|
// try to find it
|
||||||
Instruction* type;
|
Instruction* type;
|
||||||
for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixNV].size(); ++t) {
|
for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixNV].size(); ++t) {
|
||||||
type = groupedTypes[OpTypeCooperativeMatrixNV][t];
|
type = groupedTypes[OpTypeCooperativeMatrixNV][t];
|
||||||
if (type->getIdOperand(0) == component &&
|
if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows &&
|
||||||
type->getIdOperand(1) == scope &&
|
|
||||||
type->getIdOperand(2) == rows &&
|
|
||||||
type->getIdOperand(3) == cols)
|
type->getIdOperand(3) == cols)
|
||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
@ -507,6 +533,17 @@ Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols)
|
|||||||
return type->getResultId();
|
return type->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType)
|
||||||
|
{
|
||||||
|
Instruction* instr = module.getInstruction(otherType);
|
||||||
|
if (instr->getOpCode() == OpTypeCooperativeMatrixNV) {
|
||||||
|
return makeCooperativeMatrixTypeNV(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3));
|
||||||
|
} else {
|
||||||
|
assert(instr->getOpCode() == OpTypeCooperativeMatrixKHR);
|
||||||
|
return makeCooperativeMatrixTypeKHR(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3), instr->getIdOperand(4));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Id Builder::makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands)
|
Id Builder::makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands)
|
||||||
{
|
{
|
||||||
// try to find it
|
// try to find it
|
||||||
@ -1254,6 +1291,7 @@ int Builder::getNumTypeConstituents(Id typeId) const
|
|||||||
}
|
}
|
||||||
case OpTypeStruct:
|
case OpTypeStruct:
|
||||||
return instr->getNumOperands();
|
return instr->getNumOperands();
|
||||||
|
case OpTypeCooperativeMatrixKHR:
|
||||||
case OpTypeCooperativeMatrixNV:
|
case OpTypeCooperativeMatrixNV:
|
||||||
// has only one constituent when used with OpCompositeConstruct.
|
// has only one constituent when used with OpCompositeConstruct.
|
||||||
return 1;
|
return 1;
|
||||||
@ -1303,6 +1341,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const
|
|||||||
case OpTypeMatrix:
|
case OpTypeMatrix:
|
||||||
case OpTypeArray:
|
case OpTypeArray:
|
||||||
case OpTypeRuntimeArray:
|
case OpTypeRuntimeArray:
|
||||||
|
case OpTypeCooperativeMatrixKHR:
|
||||||
case OpTypeCooperativeMatrixNV:
|
case OpTypeCooperativeMatrixNV:
|
||||||
return instr->getIdOperand(0);
|
return instr->getIdOperand(0);
|
||||||
case OpTypePointer:
|
case OpTypePointer:
|
||||||
@ -1769,6 +1808,7 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector<Id>& members, boo
|
|||||||
case OpTypeVector:
|
case OpTypeVector:
|
||||||
case OpTypeArray:
|
case OpTypeArray:
|
||||||
case OpTypeMatrix:
|
case OpTypeMatrix:
|
||||||
|
case OpTypeCooperativeMatrixKHR:
|
||||||
case OpTypeCooperativeMatrixNV:
|
case OpTypeCooperativeMatrixNV:
|
||||||
if (! specConstant) {
|
if (! specConstant) {
|
||||||
Id existing = findCompositeConstant(typeClass, typeId, members);
|
Id existing = findCompositeConstant(typeClass, typeId, members);
|
||||||
@ -2405,7 +2445,24 @@ Id Builder::createArrayLength(Id base, unsigned int member)
|
|||||||
return length->getResultId();
|
return length->getResultId();
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Builder::createCooperativeMatrixLength(Id type)
|
Id Builder::createCooperativeMatrixLengthKHR(Id type)
|
||||||
|
{
|
||||||
|
spv::Id intType = makeUintType(32);
|
||||||
|
|
||||||
|
// Generate code for spec constants if in spec constant operation
|
||||||
|
// generation mode.
|
||||||
|
if (generatingOpCodeForSpecConst) {
|
||||||
|
return createSpecConstantOp(OpCooperativeMatrixLengthKHR, intType, std::vector<Id>(1, type), std::vector<Id>());
|
||||||
|
}
|
||||||
|
|
||||||
|
Instruction* length = new Instruction(getUniqueId(), intType, OpCooperativeMatrixLengthKHR);
|
||||||
|
length->addIdOperand(type);
|
||||||
|
buildPoint->addInstruction(std::unique_ptr<Instruction>(length));
|
||||||
|
|
||||||
|
return length->getResultId();
|
||||||
|
}
|
||||||
|
|
||||||
|
Id Builder::createCooperativeMatrixLengthNV(Id type)
|
||||||
{
|
{
|
||||||
spv::Id intType = makeUintType(32);
|
spv::Id intType = makeUintType(32);
|
||||||
|
|
||||||
|
@ -203,7 +203,9 @@ public:
|
|||||||
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
|
Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format);
|
||||||
Id makeSamplerType();
|
Id makeSamplerType();
|
||||||
Id makeSampledImageType(Id imageType);
|
Id makeSampledImageType(Id imageType);
|
||||||
Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols);
|
Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use);
|
||||||
|
Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols);
|
||||||
|
Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType);
|
||||||
Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
|
Id makeGenericType(spv::Op opcode, std::vector<spv::IdImmediate>& operands);
|
||||||
|
|
||||||
// SPIR-V NonSemantic Shader DebugInfo Instructions
|
// SPIR-V NonSemantic Shader DebugInfo Instructions
|
||||||
@ -286,7 +288,10 @@ public:
|
|||||||
#ifdef GLSLANG_WEB
|
#ifdef GLSLANG_WEB
|
||||||
bool isCooperativeMatrixType(Id typeId)const { return false; }
|
bool isCooperativeMatrixType(Id typeId)const { return false; }
|
||||||
#else
|
#else
|
||||||
bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; }
|
bool isCooperativeMatrixType(Id typeId)const
|
||||||
|
{
|
||||||
|
return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
bool isAggregateType(Id typeId) const
|
bool isAggregateType(Id typeId) const
|
||||||
{ return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
|
{ return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); }
|
||||||
@ -464,8 +469,10 @@ public:
|
|||||||
// Create an OpArrayLength instruction
|
// Create an OpArrayLength instruction
|
||||||
Id createArrayLength(Id base, unsigned int member);
|
Id createArrayLength(Id base, unsigned int member);
|
||||||
|
|
||||||
|
// Create an OpCooperativeMatrixLengthKHR instruction
|
||||||
|
Id createCooperativeMatrixLengthKHR(Id type);
|
||||||
// Create an OpCooperativeMatrixLengthNV instruction
|
// Create an OpCooperativeMatrixLengthNV instruction
|
||||||
Id createCooperativeMatrixLength(Id type);
|
Id createCooperativeMatrixLengthNV(Id type);
|
||||||
|
|
||||||
// Create an OpCompositeExtract instruction
|
// Create an OpCompositeExtract instruction
|
||||||
Id createCompositeExtract(Id composite, Id typeId, unsigned index);
|
Id createCompositeExtract(Id composite, Id typeId, unsigned index);
|
||||||
|
@ -790,6 +790,21 @@ const char* MemoryAccessString(int mem)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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";
|
||||||
|
|
||||||
|
default: return "Bad";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const char* ScopeString(int mem)
|
const char* ScopeString(int mem)
|
||||||
{
|
{
|
||||||
switch (mem) {
|
switch (mem) {
|
||||||
@ -993,6 +1008,7 @@ const char* CapabilityString(int info)
|
|||||||
case CapabilityVariablePointers: return "VariablePointers";
|
case CapabilityVariablePointers: return "VariablePointers";
|
||||||
|
|
||||||
case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV";
|
case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV";
|
||||||
|
case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR";
|
||||||
case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV";
|
case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV";
|
||||||
|
|
||||||
case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT";
|
case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT";
|
||||||
@ -1473,6 +1489,11 @@ const char* OpcodeString(int op)
|
|||||||
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
|
case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV";
|
||||||
case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV";
|
case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV";
|
||||||
case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV";
|
case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV";
|
||||||
|
case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR";
|
||||||
|
case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR";
|
||||||
|
case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR";
|
||||||
|
case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR";
|
||||||
|
case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR";
|
||||||
case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT";
|
case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT";
|
||||||
case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT";
|
case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT";
|
||||||
|
|
||||||
@ -1536,6 +1557,7 @@ EnumParameters LoopControlParams[FunctionControlCeiling];
|
|||||||
EnumParameters SelectionControlParams[SelectControlCeiling];
|
EnumParameters SelectionControlParams[SelectControlCeiling];
|
||||||
EnumParameters FunctionControlParams[FunctionControlCeiling];
|
EnumParameters FunctionControlParams[FunctionControlCeiling];
|
||||||
EnumParameters MemoryAccessParams[MemoryAccessCeiling];
|
EnumParameters MemoryAccessParams[MemoryAccessCeiling];
|
||||||
|
EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling];
|
||||||
|
|
||||||
// Set up all the parameterizing descriptions of the opcodes, operands, etc.
|
// Set up all the parameterizing descriptions of the opcodes, operands, etc.
|
||||||
void Parameterize()
|
void Parameterize()
|
||||||
@ -1630,6 +1652,8 @@ void Parameterize()
|
|||||||
InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
|
InstructionDesc[OpModuleProcessed].setResultAndType(false, false);
|
||||||
InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
|
InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false);
|
||||||
InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
|
InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false);
|
||||||
|
InstructionDesc[OpTypeCooperativeMatrixKHR].setResultAndType(true, false);
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].setResultAndType(false, false);
|
||||||
InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
|
InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false);
|
||||||
InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false);
|
InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false);
|
||||||
|
|
||||||
@ -1701,6 +1725,7 @@ void Parameterize()
|
|||||||
OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
|
OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr);
|
||||||
OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
|
OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true);
|
||||||
OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
|
OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr);
|
||||||
|
OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true);
|
||||||
OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr);
|
OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr);
|
||||||
|
|
||||||
// set name of operator, an initial set of <id> style operands, and the description
|
// set name of operator, an initial set of <id> style operands, and the description
|
||||||
@ -3093,6 +3118,34 @@ void Parameterize()
|
|||||||
|
|
||||||
InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
|
InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'");
|
||||||
|
|
||||||
|
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Component Type'");
|
||||||
|
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Scope'");
|
||||||
|
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Rows'");
|
||||||
|
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Columns'");
|
||||||
|
InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Use'");
|
||||||
|
|
||||||
|
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Pointer'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Memory Layout'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Stride'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandMemoryAccess, "'Memory Access'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandLiteralNumber, "", true);
|
||||||
|
InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "", true);
|
||||||
|
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Pointer'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Object'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Memory Layout'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Stride'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandMemoryAccess, "'Memory Access'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandLiteralNumber, "", true);
|
||||||
|
InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "", true);
|
||||||
|
|
||||||
|
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'A'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'B'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'C'");
|
||||||
|
InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true);
|
||||||
|
|
||||||
|
InstructionDesc[OpCooperativeMatrixLengthKHR].operands.push(OperandId, "'Type'");
|
||||||
|
|
||||||
InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
|
InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false);
|
||||||
|
|
||||||
InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
|
InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'");
|
||||||
|
@ -156,6 +156,7 @@ enum OperandClass {
|
|||||||
OperandKernelEnqueueFlags,
|
OperandKernelEnqueueFlags,
|
||||||
OperandKernelProfilingInfo,
|
OperandKernelProfilingInfo,
|
||||||
OperandCapability,
|
OperandCapability,
|
||||||
|
OperandCooperativeMatrixOperands,
|
||||||
|
|
||||||
OperandOpcode,
|
OperandOpcode,
|
||||||
|
|
||||||
|
@ -1144,6 +1144,7 @@ enum Capability {
|
|||||||
CapabilityDotProduct = 6019,
|
CapabilityDotProduct = 6019,
|
||||||
CapabilityDotProductKHR = 6019,
|
CapabilityDotProductKHR = 6019,
|
||||||
CapabilityRayCullMaskKHR = 6020,
|
CapabilityRayCullMaskKHR = 6020,
|
||||||
|
CapabilityCooperativeMatrixKHR = 6022,
|
||||||
CapabilityBitInstructions = 6025,
|
CapabilityBitInstructions = 6025,
|
||||||
CapabilityGroupNonUniformRotateKHR = 6026,
|
CapabilityGroupNonUniformRotateKHR = 6026,
|
||||||
CapabilityAtomicFloat32AddEXT = 6033,
|
CapabilityAtomicFloat32AddEXT = 6033,
|
||||||
@ -1261,6 +1262,37 @@ enum PackedVectorFormat {
|
|||||||
PackedVectorFormatMax = 0x7fffffff,
|
PackedVectorFormatMax = 0x7fffffff,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum CooperativeMatrixOperandsShift {
|
||||||
|
CooperativeMatrixOperandsMatrixASignedComponentsShift = 0,
|
||||||
|
CooperativeMatrixOperandsMatrixBSignedComponentsShift = 1,
|
||||||
|
CooperativeMatrixOperandsMatrixCSignedComponentsShift = 2,
|
||||||
|
CooperativeMatrixOperandsMatrixResultSignedComponentsShift = 3,
|
||||||
|
CooperativeMatrixOperandsSaturatingAccumulationShift = 4,
|
||||||
|
CooperativeMatrixOperandsMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CooperativeMatrixOperandsMask {
|
||||||
|
CooperativeMatrixOperandsMaskNone = 0,
|
||||||
|
CooperativeMatrixOperandsMatrixASignedComponentsMask = 0x00000001,
|
||||||
|
CooperativeMatrixOperandsMatrixBSignedComponentsMask = 0x00000002,
|
||||||
|
CooperativeMatrixOperandsMatrixCSignedComponentsMask = 0x00000004,
|
||||||
|
CooperativeMatrixOperandsMatrixResultSignedComponentsMask = 0x00000008,
|
||||||
|
CooperativeMatrixOperandsSaturatingAccumulationMask = 0x00000010,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CooperativeMatrixLayout {
|
||||||
|
CooperativeMatrixLayoutCooperativeMatrixRowMajorKHR = 0,
|
||||||
|
CooperativeMatrixLayoutCooperativeMatrixColumnMajorKHR = 1,
|
||||||
|
CooperativeMatrixLayoutMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CooperativeMatrixUse {
|
||||||
|
CooperativeMatrixUseMatrixAKHR = 0,
|
||||||
|
CooperativeMatrixUseMatrixBKHR = 1,
|
||||||
|
CooperativeMatrixUseMatrixAccumulatorKHR = 2,
|
||||||
|
CooperativeMatrixUseMax = 0x7fffffff,
|
||||||
|
};
|
||||||
|
|
||||||
enum Op {
|
enum Op {
|
||||||
OpNop = 0,
|
OpNop = 0,
|
||||||
OpUndef = 1,
|
OpUndef = 1,
|
||||||
@ -1634,6 +1666,11 @@ enum Op {
|
|||||||
OpUDotAccSatKHR = 4454,
|
OpUDotAccSatKHR = 4454,
|
||||||
OpSUDotAccSat = 4455,
|
OpSUDotAccSat = 4455,
|
||||||
OpSUDotAccSatKHR = 4455,
|
OpSUDotAccSatKHR = 4455,
|
||||||
|
OpTypeCooperativeMatrixKHR = 4456,
|
||||||
|
OpCooperativeMatrixLoadKHR = 4457,
|
||||||
|
OpCooperativeMatrixStoreKHR = 4458,
|
||||||
|
OpCooperativeMatrixMulAddKHR = 4459,
|
||||||
|
OpCooperativeMatrixLengthKHR = 4460,
|
||||||
OpTypeRayQueryKHR = 4472,
|
OpTypeRayQueryKHR = 4472,
|
||||||
OpRayQueryInitializeKHR = 4473,
|
OpRayQueryInitializeKHR = 4473,
|
||||||
OpRayQueryTerminateKHR = 4474,
|
OpRayQueryTerminateKHR = 4474,
|
||||||
@ -2346,6 +2383,11 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
|
|||||||
case OpSDotAccSat: *hasResult = true; *hasResultType = true; break;
|
case OpSDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
case OpUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
|
case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
|
case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
|
case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break;
|
||||||
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break;
|
||||||
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
|
||||||
@ -2722,6 +2764,10 @@ inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShad
|
|||||||
inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
|
inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); }
|
||||||
inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
|
inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); }
|
||||||
inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
|
inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); }
|
||||||
|
inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); }
|
||||||
|
inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); }
|
||||||
|
inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); }
|
||||||
|
inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); }
|
||||||
|
|
||||||
} // end namespace spv
|
} // end namespace spv
|
||||||
|
|
||||||
|
402
Test/baseResults/spv.coopmatKHR.comp.out
Normal file
402
Test/baseResults/spv.coopmatKHR.comp.out
Normal file
@ -0,0 +1,402 @@
|
|||||||
|
spv.coopmatKHR.comp
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 250
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Float16
|
||||||
|
Capability Int16
|
||||||
|
Capability Int8
|
||||||
|
Capability StorageUniformBufferBlock16
|
||||||
|
Capability VulkanMemoryModelKHR
|
||||||
|
Capability PhysicalStorageBufferAddressesEXT
|
||||||
|
Capability CooperativeMatrixKHR
|
||||||
|
Extension "SPV_KHR_16bit_storage"
|
||||||
|
Extension "SPV_KHR_cooperative_matrix"
|
||||||
|
Extension "SPV_KHR_physical_storage_buffer"
|
||||||
|
Extension "SPV_KHR_storage_buffer_storage_class"
|
||||||
|
Extension "SPV_KHR_vulkan_memory_model"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel PhysicalStorageBuffer64EXT VulkanKHR
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 64 1 1
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_buffer_reference"
|
||||||
|
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
|
||||||
|
SourceExtension "GL_KHR_cooperative_matrix"
|
||||||
|
SourceExtension "GL_KHR_memory_scope_semantics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 15 "f16(f161;"
|
||||||
|
Name 14 "m"
|
||||||
|
Name 22 "f32(f1;"
|
||||||
|
Name 21 "m"
|
||||||
|
Name 35 "m"
|
||||||
|
Name 53 "m2"
|
||||||
|
Name 57 "x"
|
||||||
|
Name 65 "tempArg"
|
||||||
|
Name 69 "Block"
|
||||||
|
MemberName 69(Block) 0 "y"
|
||||||
|
MemberName 69(Block) 1 "x"
|
||||||
|
Name 71 "block"
|
||||||
|
Name 80 "tempArg"
|
||||||
|
Name 85 "Block16"
|
||||||
|
MemberName 85(Block16) 0 "y"
|
||||||
|
MemberName 85(Block16) 1 "x"
|
||||||
|
MemberName 85(Block16) 2 "b"
|
||||||
|
Name 88 "Block"
|
||||||
|
MemberName 88(Block) 0 "y"
|
||||||
|
MemberName 88(Block) 1 "x"
|
||||||
|
Name 90 "block16"
|
||||||
|
Name 97 "tempArg"
|
||||||
|
Name 110 "D"
|
||||||
|
Name 114 "A"
|
||||||
|
Name 118 "B"
|
||||||
|
Name 120 "C"
|
||||||
|
Name 124 "l"
|
||||||
|
Name 128 "Y"
|
||||||
|
Name 129 "Z"
|
||||||
|
Name 132 "F"
|
||||||
|
Name 137 "a"
|
||||||
|
Name 141 "md1"
|
||||||
|
Name 152 "mC2"
|
||||||
|
Name 157 "tempArg"
|
||||||
|
Name 163 "tempArg"
|
||||||
|
Name 169 "p1"
|
||||||
|
Name 170 "param"
|
||||||
|
Name 173 "p2"
|
||||||
|
Name 174 "param"
|
||||||
|
Name 188 "tempArg"
|
||||||
|
Name 193 "shmatrix"
|
||||||
|
Name 197 "ms"
|
||||||
|
Name 204 "ms8A"
|
||||||
|
Name 208 "ms8B"
|
||||||
|
Name 212 "ms8C"
|
||||||
|
Name 227 "m16"
|
||||||
|
Name 233 "mC"
|
||||||
|
Name 234 "F"
|
||||||
|
Name 239 "S"
|
||||||
|
MemberName 239(S) 0 "a"
|
||||||
|
MemberName 239(S) 1 "b"
|
||||||
|
MemberName 239(S) 2 "c"
|
||||||
|
Name 244 "SC"
|
||||||
|
Name 249 "scm"
|
||||||
|
Decorate 67 ArrayStride 4
|
||||||
|
Decorate 68 ArrayStride 4
|
||||||
|
MemberDecorate 69(Block) 0 Offset 0
|
||||||
|
MemberDecorate 69(Block) 1 Offset 4194304
|
||||||
|
Decorate 69(Block) Block
|
||||||
|
Decorate 71(block) DescriptorSet 0
|
||||||
|
Decorate 71(block) Binding 0
|
||||||
|
Decorate 81 ArrayStride 2
|
||||||
|
Decorate 83 ArrayStride 2
|
||||||
|
MemberDecorate 85(Block16) 0 Offset 0
|
||||||
|
MemberDecorate 85(Block16) 1 Offset 2097152
|
||||||
|
MemberDecorate 85(Block16) 2 Offset 2097160
|
||||||
|
Decorate 85(Block16) Block
|
||||||
|
Decorate 86 ArrayStride 4
|
||||||
|
Decorate 87 ArrayStride 4
|
||||||
|
MemberDecorate 88(Block) 0 Offset 0
|
||||||
|
MemberDecorate 88(Block) 1 Offset 4194304
|
||||||
|
Decorate 88(Block) Block
|
||||||
|
Decorate 90(block16) DescriptorSet 0
|
||||||
|
Decorate 90(block16) Binding 0
|
||||||
|
Decorate 128(Y) SpecId 0
|
||||||
|
Decorate 232 BuiltIn WorkgroupSize
|
||||||
|
Decorate 234(F) SpecId 1
|
||||||
|
Decorate 244(SC) SpecId 2
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 16
|
||||||
|
7: TypeInt 32 0
|
||||||
|
8: 7(int) Constant 3
|
||||||
|
9: 7(int) Constant 8
|
||||||
|
10: 7(int) Constant 2
|
||||||
|
11: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 10
|
||||||
|
12: TypePointer Function 11
|
||||||
|
13: TypeFunction 11 12(ptr)
|
||||||
|
17: TypeFloat 32
|
||||||
|
18: TypeCooperativeMatrixKHR 17(float) 8 9 9 10
|
||||||
|
19: TypePointer Function 18
|
||||||
|
20: TypeFunction 18 19(ptr)
|
||||||
|
32: 7(int) Constant 16
|
||||||
|
33: TypeCooperativeMatrixKHR 17(float) 8 32 9 10
|
||||||
|
34: TypePointer Function 33
|
||||||
|
36: 17(float) Constant 0
|
||||||
|
37: 33 ConstantComposite 36
|
||||||
|
46: 17(float) Constant 1073741824
|
||||||
|
51: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 10
|
||||||
|
52: TypePointer Function 51
|
||||||
|
56: TypePointer Function 17(float)
|
||||||
|
58: TypeInt 32 1
|
||||||
|
59: 58(int) Constant 1
|
||||||
|
62: 58(int) Constant 0
|
||||||
|
66: 7(int) Constant 1048576
|
||||||
|
67: TypeArray 17(float) 66
|
||||||
|
68: TypeRuntimeArray 17(float)
|
||||||
|
69(Block): TypeStruct 67 68
|
||||||
|
70: TypePointer StorageBuffer 69(Block)
|
||||||
|
71(block): 70(ptr) Variable StorageBuffer
|
||||||
|
72: 7(int) Constant 5
|
||||||
|
73: TypePointer StorageBuffer 17(float)
|
||||||
|
75: 7(int) Constant 128
|
||||||
|
81: TypeArray 6(float16_t) 66
|
||||||
|
82: 7(int) Constant 1
|
||||||
|
83: TypeArray 6(float16_t) 82
|
||||||
|
TypeForwardPointer 84 PhysicalStorageBufferEXT
|
||||||
|
85(Block16): TypeStruct 81 83 84
|
||||||
|
86: TypeArray 17(float) 66
|
||||||
|
87: TypeRuntimeArray 17(float)
|
||||||
|
88(Block): TypeStruct 86 87
|
||||||
|
84: TypePointer PhysicalStorageBufferEXT 88(Block)
|
||||||
|
89: TypePointer StorageBuffer 85(Block16)
|
||||||
|
90(block16): 89(ptr) Variable StorageBuffer
|
||||||
|
91: TypePointer StorageBuffer 6(float16_t)
|
||||||
|
98: 58(int) Constant 2
|
||||||
|
99: TypePointer StorageBuffer 84(ptr)
|
||||||
|
102: TypePointer PhysicalStorageBufferEXT 17(float)
|
||||||
|
111: 7(int) Constant 0
|
||||||
|
112: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 111
|
||||||
|
113: TypePointer Function 112
|
||||||
|
116: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 82
|
||||||
|
117: TypePointer Function 116
|
||||||
|
123: TypePointer Function 58(int)
|
||||||
|
127: 58(int) Constant 8
|
||||||
|
128(Y): 58(int) SpecConstant 2
|
||||||
|
129(Z): 58(int) SpecConstantOp 132 127 128(Y)
|
||||||
|
130: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 129(Z) 10
|
||||||
|
131: TypePointer Function 130
|
||||||
|
133:6(float16_t) Constant 0
|
||||||
|
134: 130 ConstantComposite 133
|
||||||
|
135: TypeArray 33 72
|
||||||
|
136: TypePointer Function 135
|
||||||
|
138: 58(int) Constant 3
|
||||||
|
139: 17(float) Constant 1065353216
|
||||||
|
145: 58(int) Constant 1234
|
||||||
|
149: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 9 10
|
||||||
|
150: TypeArray 149 8
|
||||||
|
151: TypePointer Private 150
|
||||||
|
152(mC2): 151(ptr) Variable Private
|
||||||
|
153: TypePointer Private 149
|
||||||
|
177: 11 ConstantComposite 133
|
||||||
|
178: 18 ConstantComposite 36
|
||||||
|
182:6(float16_t) Constant 16384
|
||||||
|
185: 17(float) Constant 1082130432
|
||||||
|
189: TypeVector 7(int) 4
|
||||||
|
190: 7(int) Constant 32
|
||||||
|
191: TypeArray 189(ivec4) 190
|
||||||
|
192: TypePointer Workgroup 191
|
||||||
|
193(shmatrix): 192(ptr) Variable Workgroup
|
||||||
|
194: TypePointer Workgroup 189(ivec4)
|
||||||
|
201: TypeInt 8 1
|
||||||
|
202: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 111
|
||||||
|
203: TypePointer Function 202
|
||||||
|
206: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 82
|
||||||
|
207: TypePointer Function 206
|
||||||
|
210: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 10
|
||||||
|
211: TypePointer Function 210
|
||||||
|
222: 58(int) Constant 16
|
||||||
|
224: TypeInt 16 1
|
||||||
|
225: TypeCooperativeMatrixKHR 224(int16_t) 8 9 9 111
|
||||||
|
226: TypePointer Function 225
|
||||||
|
230: TypeVector 7(int) 3
|
||||||
|
231: 7(int) Constant 64
|
||||||
|
232: 230(ivec3) ConstantComposite 231 82 82
|
||||||
|
233(mC): 153(ptr) Variable Private
|
||||||
|
234(F): 17(float) SpecConstant 1077936128
|
||||||
|
235: TypeCooperativeMatrixKHR 17(float) 8 129(Z) 9 10
|
||||||
|
236: 235 ConstantComposite 36
|
||||||
|
237:6(float16_t) Constant 15360
|
||||||
|
238: 11 ConstantComposite 237
|
||||||
|
239(S): TypeStruct 58(int) 58(int) 58(int)
|
||||||
|
240: 58(int) Constant 12
|
||||||
|
241: 58(int) Constant 23
|
||||||
|
242: 58(int) Constant 34
|
||||||
|
243: 239(S) ConstantComposite 240 241 242
|
||||||
|
244(SC): 58(int) SpecConstant 1
|
||||||
|
245: TypeCooperativeMatrixKHR 6(float16_t) 8 244(SC) 244(SC) 10
|
||||||
|
246: TypeArray 245 244(SC)
|
||||||
|
247: TypeArray 246 244(SC)
|
||||||
|
248: TypePointer Private 247
|
||||||
|
249(scm): 248(ptr) Variable Private
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
35(m): 34(ptr) Variable Function
|
||||||
|
53(m2): 52(ptr) Variable Function
|
||||||
|
57(x): 56(ptr) Variable Function
|
||||||
|
65(tempArg): 34(ptr) Variable Function
|
||||||
|
80(tempArg): 52(ptr) Variable Function
|
||||||
|
97(tempArg): 34(ptr) Variable Function
|
||||||
|
110(D): 34(ptr) Variable Function
|
||||||
|
114(A): 113(ptr) Variable Function
|
||||||
|
118(B): 117(ptr) Variable Function
|
||||||
|
120(C): 34(ptr) Variable Function
|
||||||
|
124(l): 123(ptr) Variable Function
|
||||||
|
132(F): 131(ptr) Variable Function
|
||||||
|
137(a): 136(ptr) Variable Function
|
||||||
|
141(md1): 56(ptr) Variable Function
|
||||||
|
157(tempArg): 34(ptr) Variable Function
|
||||||
|
163(tempArg): 52(ptr) Variable Function
|
||||||
|
169(p1): 12(ptr) Variable Function
|
||||||
|
170(param): 12(ptr) Variable Function
|
||||||
|
173(p2): 19(ptr) Variable Function
|
||||||
|
174(param): 19(ptr) Variable Function
|
||||||
|
188(tempArg): 52(ptr) Variable Function
|
||||||
|
197(ms): 52(ptr) Variable Function
|
||||||
|
204(ms8A): 203(ptr) Variable Function
|
||||||
|
208(ms8B): 207(ptr) Variable Function
|
||||||
|
212(ms8C): 211(ptr) Variable Function
|
||||||
|
227(m16): 226(ptr) Variable Function
|
||||||
|
Store 35(m) 37
|
||||||
|
38: 33 Load 35(m)
|
||||||
|
39: 33 Load 35(m)
|
||||||
|
40: 33 FAdd 38 39
|
||||||
|
Store 35(m) 40
|
||||||
|
41: 33 Load 35(m)
|
||||||
|
42: 33 Load 35(m)
|
||||||
|
43: 33 FSub 41 42
|
||||||
|
Store 35(m) 43
|
||||||
|
44: 33 Load 35(m)
|
||||||
|
45: 33 FNegate 44
|
||||||
|
Store 35(m) 45
|
||||||
|
47: 33 Load 35(m)
|
||||||
|
48: 33 MatrixTimesScalar 47 46
|
||||||
|
Store 35(m) 48
|
||||||
|
49: 33 Load 35(m)
|
||||||
|
50: 33 MatrixTimesScalar 49 46
|
||||||
|
Store 35(m) 50
|
||||||
|
54: 33 Load 35(m)
|
||||||
|
55: 51 FConvert 54
|
||||||
|
Store 53(m2) 55
|
||||||
|
60: 56(ptr) AccessChain 35(m) 59
|
||||||
|
61: 17(float) Load 60
|
||||||
|
Store 57(x) 61
|
||||||
|
63: 17(float) Load 57(x)
|
||||||
|
64: 56(ptr) AccessChain 35(m) 62
|
||||||
|
Store 64 63
|
||||||
|
74: 73(ptr) AccessChain 71(block) 59 32
|
||||||
|
76: 33 CooperativeMatrixLoadKHR 74 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 65(tempArg) 76
|
||||||
|
77: 33 Load 65(tempArg)
|
||||||
|
Store 35(m) 77
|
||||||
|
78: 33 Load 35(m)
|
||||||
|
79: 73(ptr) AccessChain 71(block) 59 32
|
||||||
|
CooperativeMatrixStoreKHR 79 78 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
92: 91(ptr) AccessChain 90(block16) 59 32
|
||||||
|
93: 51 CooperativeMatrixLoadKHR 92 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 80(tempArg) 93
|
||||||
|
94: 51 Load 80(tempArg)
|
||||||
|
Store 53(m2) 94
|
||||||
|
95: 51 Load 53(m2)
|
||||||
|
96: 91(ptr) AccessChain 90(block16) 59 32
|
||||||
|
CooperativeMatrixStoreKHR 96 95 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
100: 99(ptr) AccessChain 90(block16) 98
|
||||||
|
101: 84(ptr) Load 100 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
103: 102(ptr) AccessChain 101 59 32
|
||||||
|
104: 33 CooperativeMatrixLoadKHR 103 62 75 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 72
|
||||||
|
Store 97(tempArg) 104
|
||||||
|
105: 33 Load 97(tempArg)
|
||||||
|
Store 35(m) 105
|
||||||
|
106: 33 Load 35(m)
|
||||||
|
107: 99(ptr) AccessChain 90(block16) 98
|
||||||
|
108: 84(ptr) Load 107 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
109: 102(ptr) AccessChain 108 59 32
|
||||||
|
CooperativeMatrixStoreKHR 109 106 62 75 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 72
|
||||||
|
115: 112 Load 114(A)
|
||||||
|
119: 116 Load 118(B)
|
||||||
|
121: 33 Load 120(C)
|
||||||
|
122: 33 CooperativeMatrixMulAddKHR 115 119 121
|
||||||
|
Store 110(D) 122
|
||||||
|
125: 7(int) CooperativeMatrixLengthKHR 33
|
||||||
|
126: 58(int) Bitcast 125
|
||||||
|
Store 124(l) 126
|
||||||
|
Store 132(F) 134
|
||||||
|
140: 56(ptr) AccessChain 137(a) 138 62
|
||||||
|
Store 140 139
|
||||||
|
Store 141(md1) 36
|
||||||
|
142: 33 Load 35(m)
|
||||||
|
143: 33 Load 35(m)
|
||||||
|
144: 33 FAdd 143 142
|
||||||
|
Store 35(m) 144
|
||||||
|
146: 17(float) CompositeExtract 144 1234
|
||||||
|
147: 17(float) Load 141(md1)
|
||||||
|
148: 17(float) FAdd 147 146
|
||||||
|
Store 141(md1) 148
|
||||||
|
154: 153(ptr) AccessChain 152(mC2) 98
|
||||||
|
155: 149 Load 154
|
||||||
|
156: 153(ptr) AccessChain 152(mC2) 59
|
||||||
|
Store 156 155
|
||||||
|
158: 73(ptr) AccessChain 71(block) 62 32
|
||||||
|
159: 33 CooperativeMatrixLoadKHR 158 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 157(tempArg) 159
|
||||||
|
160: 33 Load 157(tempArg)
|
||||||
|
Store 35(m) 160
|
||||||
|
161: 33 Load 35(m)
|
||||||
|
162: 73(ptr) AccessChain 71(block) 62 32
|
||||||
|
CooperativeMatrixStoreKHR 162 161 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
164: 91(ptr) AccessChain 90(block16) 62 32
|
||||||
|
165: 51 CooperativeMatrixLoadKHR 164 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72
|
||||||
|
Store 163(tempArg) 165
|
||||||
|
166: 51 Load 163(tempArg)
|
||||||
|
Store 53(m2) 166
|
||||||
|
167: 51 Load 53(m2)
|
||||||
|
168: 91(ptr) AccessChain 90(block16) 62 32
|
||||||
|
CooperativeMatrixStoreKHR 168 167 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72
|
||||||
|
171: 11 Load 169(p1)
|
||||||
|
Store 170(param) 171
|
||||||
|
172: 11 FunctionCall 15(f16(f161;) 170(param)
|
||||||
|
Store 169(p1) 172
|
||||||
|
175: 18 Load 173(p2)
|
||||||
|
Store 174(param) 175
|
||||||
|
176: 18 FunctionCall 22(f32(f1;) 174(param)
|
||||||
|
Store 173(p2) 176
|
||||||
|
Store 169(p1) 177
|
||||||
|
Store 173(p2) 178
|
||||||
|
179: 11 Load 169(p1)
|
||||||
|
180: 11 Load 169(p1)
|
||||||
|
181: 11 FDiv 180 179
|
||||||
|
Store 169(p1) 181
|
||||||
|
183: 11 Load 169(p1)
|
||||||
|
184: 11 MatrixTimesScalar 183 182
|
||||||
|
Store 169(p1) 184
|
||||||
|
186: 18 Load 173(p2)
|
||||||
|
187: 18 MatrixTimesScalar 186 185
|
||||||
|
Store 173(p2) 187
|
||||||
|
195: 194(ptr) AccessChain 193(shmatrix) 82
|
||||||
|
196: 51 CooperativeMatrixLoadKHR 195 62 10 MakePointerVisibleKHR NonPrivatePointerKHR 10
|
||||||
|
Store 188(tempArg) 196
|
||||||
|
198: 51 Load 188(tempArg)
|
||||||
|
Store 197(ms) 198
|
||||||
|
199: 51 Load 197(ms)
|
||||||
|
200: 194(ptr) AccessChain 193(shmatrix) 82
|
||||||
|
CooperativeMatrixStoreKHR 200 199 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
228: 225 Load 227(m16)
|
||||||
|
229: 194(ptr) AccessChain 193(shmatrix) 82
|
||||||
|
CooperativeMatrixStoreKHR 229 228 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
15(f16(f161;): 11 Function None 13
|
||||||
|
14(m): 12(ptr) FunctionParameter
|
||||||
|
16: Label
|
||||||
|
24: 11 Load 14(m)
|
||||||
|
25: 11 FNegate 24
|
||||||
|
ReturnValue 25
|
||||||
|
FunctionEnd
|
||||||
|
22(f32(f1;): 18 Function None 20
|
||||||
|
21(m): 19(ptr) FunctionParameter
|
||||||
|
23: Label
|
||||||
|
28: 18 Load 21(m)
|
||||||
|
29: 18 FNegate 28
|
||||||
|
ReturnValue 29
|
||||||
|
FunctionEnd
|
38
Test/baseResults/spv.coopmatKHR_Error.comp.out
Normal file
38
Test/baseResults/spv.coopmatKHR_Error.comp.out
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
spv.coopmatKHR_Error.comp
|
||||||
|
ERROR: 0:8: 'ftemplate16' : unexpected type parameters
|
||||||
|
ERROR: 0:10: '' : coopmat missing type parameters
|
||||||
|
ERROR: 0:10: 'fnoparams' : unexpected number type parameters
|
||||||
|
ERROR: 0:17: 'void' : coopmat invalid basic type
|
||||||
|
ERROR: 0:17: 'fbadtype' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type
|
||||||
|
ERROR: 0:17: 'fbadtype' : illegal use of type 'void'
|
||||||
|
ERROR: 0:18: '' : type parameter must be a constant integer expression
|
||||||
|
ERROR: 0:18: 'void' : coopmat invalid basic type
|
||||||
|
ERROR: 0:18: '' : coopmat incorrect number of type parameters
|
||||||
|
ERROR: 0:18: 'fbadtype2' : unexpected number type parameters
|
||||||
|
ERROR: 0:18: 'fbadtype2' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type
|
||||||
|
ERROR: 0:18: 'fbadtype2' : illegal use of type 'void'
|
||||||
|
ERROR: 0:19: 'void' : coopmat invalid basic type
|
||||||
|
ERROR: 0:19: '' : coopmat incorrect number of type parameters
|
||||||
|
ERROR: 0:19: 'fbadtype3' : unexpected number type parameters
|
||||||
|
ERROR: 0:19: 'fbadtype3' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type
|
||||||
|
ERROR: 0:19: 'fbadtype3' : illegal use of type 'void'
|
||||||
|
ERROR: 0:21: '' : coopmat incorrect number of type parameters
|
||||||
|
ERROR: 0:25: '' : type parameter must be a constant integer expression
|
||||||
|
ERROR: 0:29: '' : coopmat incorrect number of type parameters
|
||||||
|
ERROR: 0:29: 'Cooperative matrix types must not be used in shared memory' : qualifier
|
||||||
|
ERROR: 0:32: 'bufmat' : member of block cannot be or contain a cooperative matrix type
|
||||||
|
ERROR: 0:41: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float'
|
||||||
|
ERROR: 0:42: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float'
|
||||||
|
ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float16_t'
|
||||||
|
ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 8, 1, 0> float16_t' to ' temp coopmat<3, 8, 1, 0> float16_t'
|
||||||
|
ERROR: 0:56: 'constructor' : too many arguments
|
||||||
|
ERROR: 0:56: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float16_t'
|
||||||
|
ERROR: 0:60: 'constructor' : Cooperative matrix constructor argument must be scalar or cooperative matrix
|
||||||
|
ERROR: 0:60: '=' : cannot convert from ' const float' to ' temp coopmat<3, 4, 4, 0> float'
|
||||||
|
ERROR: 0:63: 'expression' : left of '[' is not of type array, matrix, or vector
|
||||||
|
ERROR: 0:66: '.' : cannot apply to a cooperative matrix type: x
|
||||||
|
ERROR: 0:68: 'transpose' : no matching overloaded function found
|
||||||
|
ERROR: 33 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
248
Test/baseResults/spv.coopmatKHR_arithmetic.comp.out
Normal file
248
Test/baseResults/spv.coopmatKHR_arithmetic.comp.out
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
spv.coopmatKHR_arithmetic.comp
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 196
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Float16
|
||||||
|
Capability Int8
|
||||||
|
Capability VulkanMemoryModelKHR
|
||||||
|
Capability CooperativeMatrixKHR
|
||||||
|
Extension "SPV_KHR_cooperative_matrix"
|
||||||
|
Extension "SPV_KHR_vulkan_memory_model"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical VulkanKHR
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 64 1 1
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
|
||||||
|
SourceExtension "GL_KHR_cooperative_matrix"
|
||||||
|
SourceExtension "GL_KHR_memory_scope_semantics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 13 "f"
|
||||||
|
Name 48 "f16"
|
||||||
|
Name 82 "u32"
|
||||||
|
Name 117 "u8"
|
||||||
|
Name 152 "i8"
|
||||||
|
Decorate 195 BuiltIn WorkgroupSize
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeInt 32 0
|
||||||
|
8: 7(int) Constant 3
|
||||||
|
9: 7(int) Constant 8
|
||||||
|
10: 7(int) Constant 0
|
||||||
|
11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10
|
||||||
|
12: TypePointer Function 11
|
||||||
|
39: 6(float) Constant 1073741824
|
||||||
|
45: TypeFloat 16
|
||||||
|
46: TypeCooperativeMatrixKHR 45(float16_t) 8 9 9 10
|
||||||
|
47: TypePointer Function 46
|
||||||
|
74:45(float16_t) Constant 16384
|
||||||
|
80: TypeCooperativeMatrixKHR 7(int) 8 9 9 10
|
||||||
|
81: TypePointer Function 80
|
||||||
|
108: 7(int) Constant 2
|
||||||
|
114: TypeInt 8 0
|
||||||
|
115: TypeCooperativeMatrixKHR 114(int8_t) 8 9 9 10
|
||||||
|
116: TypePointer Function 115
|
||||||
|
143: 114(int8_t) Constant 2
|
||||||
|
149: TypeInt 8 1
|
||||||
|
150: TypeCooperativeMatrixKHR 149(int8_t) 8 9 9 10
|
||||||
|
151: TypePointer Function 150
|
||||||
|
178: 149(int8_t) Constant 2
|
||||||
|
192: TypeVector 7(int) 3
|
||||||
|
193: 7(int) Constant 64
|
||||||
|
194: 7(int) Constant 1
|
||||||
|
195: 192(ivec3) ConstantComposite 193 194 194
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
13(f): 12(ptr) Variable Function
|
||||||
|
48(f16): 47(ptr) Variable Function
|
||||||
|
82(u32): 81(ptr) Variable Function
|
||||||
|
117(u8): 116(ptr) Variable Function
|
||||||
|
152(i8): 151(ptr) Variable Function
|
||||||
|
14: 11 Load 13(f)
|
||||||
|
15: 11 Load 13(f)
|
||||||
|
16: 11 FAdd 14 15
|
||||||
|
17: 11 Load 13(f)
|
||||||
|
18: 11 Load 13(f)
|
||||||
|
19: 11 FSub 17 18
|
||||||
|
20: 11 Load 13(f)
|
||||||
|
21: 11 Load 13(f)
|
||||||
|
22: 11 FMul 20 21
|
||||||
|
23: 11 Load 13(f)
|
||||||
|
24: 11 Load 13(f)
|
||||||
|
25: 11 FDiv 23 24
|
||||||
|
26: 11 Load 13(f)
|
||||||
|
27: 11 Load 13(f)
|
||||||
|
28: 11 FAdd 27 26
|
||||||
|
Store 13(f) 28
|
||||||
|
29: 11 Load 13(f)
|
||||||
|
30: 11 Load 13(f)
|
||||||
|
31: 11 FSub 30 29
|
||||||
|
Store 13(f) 31
|
||||||
|
32: 11 Load 13(f)
|
||||||
|
33: 11 Load 13(f)
|
||||||
|
34: 11 FMul 33 32
|
||||||
|
Store 13(f) 34
|
||||||
|
35: 11 Load 13(f)
|
||||||
|
36: 11 Load 13(f)
|
||||||
|
37: 11 FDiv 36 35
|
||||||
|
Store 13(f) 37
|
||||||
|
38: 11 Load 13(f)
|
||||||
|
40: 11 MatrixTimesScalar 38 39
|
||||||
|
41: 11 Load 13(f)
|
||||||
|
42: 11 MatrixTimesScalar 41 39
|
||||||
|
43: 11 Load 13(f)
|
||||||
|
44: 11 MatrixTimesScalar 43 39
|
||||||
|
Store 13(f) 44
|
||||||
|
49: 46 Load 48(f16)
|
||||||
|
50: 46 Load 48(f16)
|
||||||
|
51: 46 FAdd 49 50
|
||||||
|
52: 46 Load 48(f16)
|
||||||
|
53: 46 Load 48(f16)
|
||||||
|
54: 46 FSub 52 53
|
||||||
|
55: 46 Load 48(f16)
|
||||||
|
56: 46 Load 48(f16)
|
||||||
|
57: 46 FMul 55 56
|
||||||
|
58: 46 Load 48(f16)
|
||||||
|
59: 46 Load 48(f16)
|
||||||
|
60: 46 FDiv 58 59
|
||||||
|
61: 46 Load 48(f16)
|
||||||
|
62: 46 Load 48(f16)
|
||||||
|
63: 46 FAdd 62 61
|
||||||
|
Store 48(f16) 63
|
||||||
|
64: 46 Load 48(f16)
|
||||||
|
65: 46 Load 48(f16)
|
||||||
|
66: 46 FSub 65 64
|
||||||
|
Store 48(f16) 66
|
||||||
|
67: 46 Load 48(f16)
|
||||||
|
68: 46 Load 48(f16)
|
||||||
|
69: 46 FMul 68 67
|
||||||
|
Store 48(f16) 69
|
||||||
|
70: 46 Load 48(f16)
|
||||||
|
71: 46 Load 48(f16)
|
||||||
|
72: 46 FDiv 71 70
|
||||||
|
Store 48(f16) 72
|
||||||
|
73: 46 Load 48(f16)
|
||||||
|
75: 46 MatrixTimesScalar 73 74
|
||||||
|
76: 46 Load 48(f16)
|
||||||
|
77: 46 MatrixTimesScalar 76 74
|
||||||
|
78: 46 Load 48(f16)
|
||||||
|
79: 46 MatrixTimesScalar 78 74
|
||||||
|
Store 48(f16) 79
|
||||||
|
83: 80 Load 82(u32)
|
||||||
|
84: 80 Load 82(u32)
|
||||||
|
85: 80 IAdd 83 84
|
||||||
|
86: 80 Load 82(u32)
|
||||||
|
87: 80 Load 82(u32)
|
||||||
|
88: 80 ISub 86 87
|
||||||
|
89: 80 Load 82(u32)
|
||||||
|
90: 80 Load 82(u32)
|
||||||
|
91: 80 IMul 89 90
|
||||||
|
92: 80 Load 82(u32)
|
||||||
|
93: 80 Load 82(u32)
|
||||||
|
94: 80 UDiv 92 93
|
||||||
|
95: 80 Load 82(u32)
|
||||||
|
96: 80 Load 82(u32)
|
||||||
|
97: 80 IAdd 96 95
|
||||||
|
Store 82(u32) 97
|
||||||
|
98: 80 Load 82(u32)
|
||||||
|
99: 80 Load 82(u32)
|
||||||
|
100: 80 ISub 99 98
|
||||||
|
Store 82(u32) 100
|
||||||
|
101: 80 Load 82(u32)
|
||||||
|
102: 80 Load 82(u32)
|
||||||
|
103: 80 IMul 102 101
|
||||||
|
Store 82(u32) 103
|
||||||
|
104: 80 Load 82(u32)
|
||||||
|
105: 80 Load 82(u32)
|
||||||
|
106: 80 UDiv 105 104
|
||||||
|
Store 82(u32) 106
|
||||||
|
107: 80 Load 82(u32)
|
||||||
|
109: 80 MatrixTimesScalar 107 108
|
||||||
|
110: 80 Load 82(u32)
|
||||||
|
111: 80 MatrixTimesScalar 110 108
|
||||||
|
112: 80 Load 82(u32)
|
||||||
|
113: 80 MatrixTimesScalar 112 108
|
||||||
|
Store 82(u32) 113
|
||||||
|
118: 115 Load 117(u8)
|
||||||
|
119: 115 Load 117(u8)
|
||||||
|
120: 115 IAdd 118 119
|
||||||
|
121: 115 Load 117(u8)
|
||||||
|
122: 115 Load 117(u8)
|
||||||
|
123: 115 ISub 121 122
|
||||||
|
124: 115 Load 117(u8)
|
||||||
|
125: 115 Load 117(u8)
|
||||||
|
126: 115 IMul 124 125
|
||||||
|
127: 115 Load 117(u8)
|
||||||
|
128: 115 Load 117(u8)
|
||||||
|
129: 115 UDiv 127 128
|
||||||
|
130: 115 Load 117(u8)
|
||||||
|
131: 115 Load 117(u8)
|
||||||
|
132: 115 IAdd 131 130
|
||||||
|
Store 117(u8) 132
|
||||||
|
133: 115 Load 117(u8)
|
||||||
|
134: 115 Load 117(u8)
|
||||||
|
135: 115 ISub 134 133
|
||||||
|
Store 117(u8) 135
|
||||||
|
136: 115 Load 117(u8)
|
||||||
|
137: 115 Load 117(u8)
|
||||||
|
138: 115 IMul 137 136
|
||||||
|
Store 117(u8) 138
|
||||||
|
139: 115 Load 117(u8)
|
||||||
|
140: 115 Load 117(u8)
|
||||||
|
141: 115 UDiv 140 139
|
||||||
|
Store 117(u8) 141
|
||||||
|
142: 115 Load 117(u8)
|
||||||
|
144: 115 MatrixTimesScalar 142 143
|
||||||
|
145: 115 Load 117(u8)
|
||||||
|
146: 115 MatrixTimesScalar 145 143
|
||||||
|
147: 115 Load 117(u8)
|
||||||
|
148: 115 MatrixTimesScalar 147 143
|
||||||
|
Store 117(u8) 148
|
||||||
|
153: 150 Load 152(i8)
|
||||||
|
154: 150 Load 152(i8)
|
||||||
|
155: 150 IAdd 153 154
|
||||||
|
156: 150 Load 152(i8)
|
||||||
|
157: 150 Load 152(i8)
|
||||||
|
158: 150 ISub 156 157
|
||||||
|
159: 150 Load 152(i8)
|
||||||
|
160: 150 Load 152(i8)
|
||||||
|
161: 150 IMul 159 160
|
||||||
|
162: 150 Load 152(i8)
|
||||||
|
163: 150 Load 152(i8)
|
||||||
|
164: 150 SDiv 162 163
|
||||||
|
165: 150 Load 152(i8)
|
||||||
|
166: 150 Load 152(i8)
|
||||||
|
167: 150 IAdd 166 165
|
||||||
|
Store 152(i8) 167
|
||||||
|
168: 150 Load 152(i8)
|
||||||
|
169: 150 Load 152(i8)
|
||||||
|
170: 150 ISub 169 168
|
||||||
|
Store 152(i8) 170
|
||||||
|
171: 150 Load 152(i8)
|
||||||
|
172: 150 Load 152(i8)
|
||||||
|
173: 150 IMul 172 171
|
||||||
|
Store 152(i8) 173
|
||||||
|
174: 150 Load 152(i8)
|
||||||
|
175: 150 Load 152(i8)
|
||||||
|
176: 150 SDiv 175 174
|
||||||
|
Store 152(i8) 176
|
||||||
|
177: 150 Load 152(i8)
|
||||||
|
179: 150 MatrixTimesScalar 177 178
|
||||||
|
180: 150 Load 152(i8)
|
||||||
|
181: 150 MatrixTimesScalar 180 178
|
||||||
|
182: 150 Load 152(i8)
|
||||||
|
183: 150 MatrixTimesScalar 182 178
|
||||||
|
Store 152(i8) 183
|
||||||
|
184: 11 Load 13(f)
|
||||||
|
185: 11 FNegate 184
|
||||||
|
186: 46 Load 48(f16)
|
||||||
|
187: 46 FNegate 186
|
||||||
|
188: 150 Load 152(i8)
|
||||||
|
189: 150 SNegate 188
|
||||||
|
190: 115 Load 117(u8)
|
||||||
|
191: 115 SNegate 190
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
64
Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out
Normal file
64
Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
spv.coopmatKHR_arithmeticError.comp
|
||||||
|
ERROR: 0:21: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:22: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:23: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:24: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:25: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:26: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:27: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:28: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:29: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:31: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:32: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:33: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:34: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:35: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:36: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:37: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:38: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:40: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:41: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:42: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:43: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:44: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:45: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:46: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:49: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:50: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:51: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:52: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:54: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:55: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:56: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float'
|
||||||
|
ERROR: 0:58: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:59: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:60: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:61: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:62: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:63: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:64: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:65: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:67: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:68: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:69: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:70: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:71: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:72: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t'
|
||||||
|
ERROR: 0:74: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:75: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:76: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:77: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t'
|
||||||
|
ERROR: 0:78: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t'
|
||||||
|
ERROR: 0:79: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t'
|
||||||
|
ERROR: 0:81: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:82: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:83: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion)
|
||||||
|
ERROR: 0:84: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int'
|
||||||
|
ERROR: 0:85: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int'
|
||||||
|
ERROR: 0:86: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int'
|
||||||
|
ERROR: 59 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
632
Test/baseResults/spv.coopmatKHR_constructor.comp.out
Normal file
632
Test/baseResults/spv.coopmatKHR_constructor.comp.out
Normal file
@ -0,0 +1,632 @@
|
|||||||
|
spv.coopmatKHR_constructor.comp
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 8000b
|
||||||
|
// Id's are bound by 481
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
Capability Float16
|
||||||
|
Capability Int16
|
||||||
|
Capability Int8
|
||||||
|
Capability VulkanMemoryModelKHR
|
||||||
|
Capability CooperativeMatrixKHR
|
||||||
|
Extension "SPV_KHR_cooperative_matrix"
|
||||||
|
Extension "SPV_KHR_vulkan_memory_model"
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical VulkanKHR
|
||||||
|
EntryPoint GLCompute 4 "main"
|
||||||
|
ExecutionMode 4 LocalSize 64 1 1
|
||||||
|
Source GLSL 450
|
||||||
|
SourceExtension "GL_EXT_shader_explicit_arithmetic_types"
|
||||||
|
SourceExtension "GL_KHR_cooperative_matrix"
|
||||||
|
SourceExtension "GL_KHR_memory_scope_semantics"
|
||||||
|
Name 4 "main"
|
||||||
|
Name 154 "v"
|
||||||
|
Name 158 "v"
|
||||||
|
Name 164 "v"
|
||||||
|
Name 170 "v"
|
||||||
|
Name 176 "v"
|
||||||
|
Name 182 "v"
|
||||||
|
Name 188 "v"
|
||||||
|
Name 194 "v"
|
||||||
|
Name 199 "v"
|
||||||
|
Name 204 "v"
|
||||||
|
Name 207 "v"
|
||||||
|
Name 212 "v"
|
||||||
|
Name 217 "v"
|
||||||
|
Name 222 "v"
|
||||||
|
Name 227 "v"
|
||||||
|
Name 232 "v"
|
||||||
|
Name 237 "v"
|
||||||
|
Name 242 "v"
|
||||||
|
Name 247 "v"
|
||||||
|
Name 250 "v"
|
||||||
|
Name 255 "v"
|
||||||
|
Name 260 "v"
|
||||||
|
Name 265 "v"
|
||||||
|
Name 271 "v"
|
||||||
|
Name 277 "v"
|
||||||
|
Name 282 "v"
|
||||||
|
Name 287 "v"
|
||||||
|
Name 292 "v"
|
||||||
|
Name 295 "v"
|
||||||
|
Name 300 "v"
|
||||||
|
Name 306 "v"
|
||||||
|
Name 311 "v"
|
||||||
|
Name 317 "v"
|
||||||
|
Name 322 "v"
|
||||||
|
Name 327 "v"
|
||||||
|
Name 332 "v"
|
||||||
|
Name 337 "v"
|
||||||
|
Name 340 "v"
|
||||||
|
Name 346 "v"
|
||||||
|
Name 352 "v"
|
||||||
|
Name 357 "v"
|
||||||
|
Name 362 "v"
|
||||||
|
Name 367 "v"
|
||||||
|
Name 372 "v"
|
||||||
|
Name 378 "v"
|
||||||
|
Name 384 "v"
|
||||||
|
Name 387 "v"
|
||||||
|
Name 392 "v"
|
||||||
|
Name 397 "v"
|
||||||
|
Name 402 "v"
|
||||||
|
Name 407 "v"
|
||||||
|
Name 413 "v"
|
||||||
|
Name 418 "v"
|
||||||
|
Name 424 "v"
|
||||||
|
Name 429 "v"
|
||||||
|
Name 432 "v"
|
||||||
|
Name 437 "v"
|
||||||
|
Name 442 "v"
|
||||||
|
Name 447 "v"
|
||||||
|
Name 453 "v"
|
||||||
|
Name 459 "v"
|
||||||
|
Name 464 "v"
|
||||||
|
Name 469 "v"
|
||||||
|
Name 474 "v"
|
||||||
|
Decorate 480 BuiltIn WorkgroupSize
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypeInt 32 0
|
||||||
|
8: 7(int) Constant 3
|
||||||
|
9: 7(int) Constant 8
|
||||||
|
10: 7(int) Constant 0
|
||||||
|
11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10
|
||||||
|
12: 6(float) Constant 1065353216
|
||||||
|
13: 11 ConstantComposite 12
|
||||||
|
14: 6(float) Constant 1073741824
|
||||||
|
15: 11 ConstantComposite 14
|
||||||
|
16: 6(float) Constant 1077936128
|
||||||
|
17: 11 ConstantComposite 16
|
||||||
|
18: 6(float) Constant 1082130432
|
||||||
|
19: 11 ConstantComposite 18
|
||||||
|
20: 6(float) Constant 1084227584
|
||||||
|
21: 11 ConstantComposite 20
|
||||||
|
22: 6(float) Constant 1086324736
|
||||||
|
23: 11 ConstantComposite 22
|
||||||
|
24: 6(float) Constant 1088421888
|
||||||
|
25: 11 ConstantComposite 24
|
||||||
|
26: 6(float) Constant 1090519040
|
||||||
|
27: 11 ConstantComposite 26
|
||||||
|
28: TypeFloat 16
|
||||||
|
29: TypeCooperativeMatrixKHR 28(float16_t) 8 9 9 10
|
||||||
|
30:28(float16_t) Constant 18816
|
||||||
|
31: 29 ConstantComposite 30
|
||||||
|
32:28(float16_t) Constant 18944
|
||||||
|
33: 29 ConstantComposite 32
|
||||||
|
34:28(float16_t) Constant 19072
|
||||||
|
35: 29 ConstantComposite 34
|
||||||
|
36:28(float16_t) Constant 19200
|
||||||
|
37: 29 ConstantComposite 36
|
||||||
|
38:28(float16_t) Constant 19328
|
||||||
|
39: 29 ConstantComposite 38
|
||||||
|
40:28(float16_t) Constant 19456
|
||||||
|
41: 29 ConstantComposite 40
|
||||||
|
42:28(float16_t) Constant 19520
|
||||||
|
43: 29 ConstantComposite 42
|
||||||
|
44:28(float16_t) Constant 19584
|
||||||
|
45: 29 ConstantComposite 44
|
||||||
|
46: TypeCooperativeMatrixKHR 7(int) 8 9 9 10
|
||||||
|
47: 7(int) Constant 21
|
||||||
|
48: 46 ConstantComposite 47
|
||||||
|
49: 7(int) Constant 22
|
||||||
|
50: 46 ConstantComposite 49
|
||||||
|
51: 7(int) Constant 23
|
||||||
|
52: 46 ConstantComposite 51
|
||||||
|
53: 7(int) Constant 24
|
||||||
|
54: 46 ConstantComposite 53
|
||||||
|
55: 7(int) Constant 25
|
||||||
|
56: 46 ConstantComposite 55
|
||||||
|
57: 7(int) Constant 26
|
||||||
|
58: 46 ConstantComposite 57
|
||||||
|
59: 7(int) Constant 27
|
||||||
|
60: 46 ConstantComposite 59
|
||||||
|
61: 7(int) Constant 28
|
||||||
|
62: 46 ConstantComposite 61
|
||||||
|
63: TypeInt 16 0
|
||||||
|
64: TypeCooperativeMatrixKHR 63(int16_t) 8 9 9 10
|
||||||
|
65: 63(int16_t) Constant 31
|
||||||
|
66: 64 ConstantComposite 65
|
||||||
|
67: 63(int16_t) Constant 32
|
||||||
|
68: 64 ConstantComposite 67
|
||||||
|
69: 63(int16_t) Constant 33
|
||||||
|
70: 64 ConstantComposite 69
|
||||||
|
71: 63(int16_t) Constant 34
|
||||||
|
72: 64 ConstantComposite 71
|
||||||
|
73: 63(int16_t) Constant 35
|
||||||
|
74: 64 ConstantComposite 73
|
||||||
|
75: 63(int16_t) Constant 36
|
||||||
|
76: 64 ConstantComposite 75
|
||||||
|
77: 63(int16_t) Constant 37
|
||||||
|
78: 64 ConstantComposite 77
|
||||||
|
79: 63(int16_t) Constant 38
|
||||||
|
80: 64 ConstantComposite 79
|
||||||
|
81: TypeInt 8 0
|
||||||
|
82: TypeCooperativeMatrixKHR 81(int8_t) 8 9 9 10
|
||||||
|
83: 81(int8_t) Constant 41
|
||||||
|
84: 82 ConstantComposite 83
|
||||||
|
85: 81(int8_t) Constant 42
|
||||||
|
86: 82 ConstantComposite 85
|
||||||
|
87: 81(int8_t) Constant 43
|
||||||
|
88: 82 ConstantComposite 87
|
||||||
|
89: 81(int8_t) Constant 44
|
||||||
|
90: 82 ConstantComposite 89
|
||||||
|
91: 81(int8_t) Constant 45
|
||||||
|
92: 82 ConstantComposite 91
|
||||||
|
93: 81(int8_t) Constant 46
|
||||||
|
94: 82 ConstantComposite 93
|
||||||
|
95: 81(int8_t) Constant 47
|
||||||
|
96: 82 ConstantComposite 95
|
||||||
|
97: 81(int8_t) Constant 48
|
||||||
|
98: 82 ConstantComposite 97
|
||||||
|
99: TypeInt 32 1
|
||||||
|
100: TypeCooperativeMatrixKHR 99(int) 8 9 9 10
|
||||||
|
101: 99(int) Constant 51
|
||||||
|
102: 100 ConstantComposite 101
|
||||||
|
103: 99(int) Constant 52
|
||||||
|
104: 100 ConstantComposite 103
|
||||||
|
105: 99(int) Constant 53
|
||||||
|
106: 100 ConstantComposite 105
|
||||||
|
107: 99(int) Constant 54
|
||||||
|
108: 100 ConstantComposite 107
|
||||||
|
109: 99(int) Constant 55
|
||||||
|
110: 100 ConstantComposite 109
|
||||||
|
111: 99(int) Constant 56
|
||||||
|
112: 100 ConstantComposite 111
|
||||||
|
113: 99(int) Constant 57
|
||||||
|
114: 100 ConstantComposite 113
|
||||||
|
115: 99(int) Constant 58
|
||||||
|
116: 100 ConstantComposite 115
|
||||||
|
117: TypeInt 16 1
|
||||||
|
118: TypeCooperativeMatrixKHR 117(int16_t) 8 9 9 10
|
||||||
|
119:117(int16_t) Constant 61
|
||||||
|
120: 118 ConstantComposite 119
|
||||||
|
121:117(int16_t) Constant 62
|
||||||
|
122: 118 ConstantComposite 121
|
||||||
|
123:117(int16_t) Constant 63
|
||||||
|
124: 118 ConstantComposite 123
|
||||||
|
125:117(int16_t) Constant 64
|
||||||
|
126: 118 ConstantComposite 125
|
||||||
|
127:117(int16_t) Constant 65
|
||||||
|
128: 118 ConstantComposite 127
|
||||||
|
129:117(int16_t) Constant 66
|
||||||
|
130: 118 ConstantComposite 129
|
||||||
|
131:117(int16_t) Constant 67
|
||||||
|
132: 118 ConstantComposite 131
|
||||||
|
133:117(int16_t) Constant 68
|
||||||
|
134: 118 ConstantComposite 133
|
||||||
|
135: TypeInt 8 1
|
||||||
|
136: TypeCooperativeMatrixKHR 135(int8_t) 8 9 9 10
|
||||||
|
137: 135(int8_t) Constant 71
|
||||||
|
138: 136 ConstantComposite 137
|
||||||
|
139: 135(int8_t) Constant 72
|
||||||
|
140: 136 ConstantComposite 139
|
||||||
|
141: 135(int8_t) Constant 73
|
||||||
|
142: 136 ConstantComposite 141
|
||||||
|
143: 135(int8_t) Constant 74
|
||||||
|
144: 136 ConstantComposite 143
|
||||||
|
145: 135(int8_t) Constant 75
|
||||||
|
146: 136 ConstantComposite 145
|
||||||
|
147: 135(int8_t) Constant 76
|
||||||
|
148: 136 ConstantComposite 147
|
||||||
|
149: 135(int8_t) Constant 77
|
||||||
|
150: 136 ConstantComposite 149
|
||||||
|
151: 135(int8_t) Constant 78
|
||||||
|
152: 136 ConstantComposite 151
|
||||||
|
153: TypePointer Function 11
|
||||||
|
155: 6(float) Constant 1120534528
|
||||||
|
156: 11 ConstantComposite 155
|
||||||
|
157: TypePointer Function 29
|
||||||
|
159:28(float16_t) Constant 22112
|
||||||
|
160: 29 ConstantComposite 159
|
||||||
|
163: TypePointer Function 46
|
||||||
|
165: 7(int) Constant 103
|
||||||
|
166: 46 ConstantComposite 165
|
||||||
|
169: TypePointer Function 64
|
||||||
|
171: 63(int16_t) Constant 104
|
||||||
|
172: 64 ConstantComposite 171
|
||||||
|
175: TypePointer Function 82
|
||||||
|
177: 81(int8_t) Constant 105
|
||||||
|
178: 82 ConstantComposite 177
|
||||||
|
181: TypePointer Function 100
|
||||||
|
183: 99(int) Constant 106
|
||||||
|
184: 100 ConstantComposite 183
|
||||||
|
187: TypePointer Function 118
|
||||||
|
189:117(int16_t) Constant 107
|
||||||
|
190: 118 ConstantComposite 189
|
||||||
|
193: TypePointer Function 136
|
||||||
|
195: 135(int8_t) Constant 108
|
||||||
|
196: 136 ConstantComposite 195
|
||||||
|
200: 6(float) Constant 1121845248
|
||||||
|
201: 11 ConstantComposite 200
|
||||||
|
205:28(float16_t) Constant 22272
|
||||||
|
206: 29 ConstantComposite 205
|
||||||
|
208: 7(int) Constant 113
|
||||||
|
209: 46 ConstantComposite 208
|
||||||
|
213: 63(int16_t) Constant 114
|
||||||
|
214: 64 ConstantComposite 213
|
||||||
|
218: 81(int8_t) Constant 115
|
||||||
|
219: 82 ConstantComposite 218
|
||||||
|
223: 99(int) Constant 116
|
||||||
|
224: 100 ConstantComposite 223
|
||||||
|
228:117(int16_t) Constant 117
|
||||||
|
229: 118 ConstantComposite 228
|
||||||
|
233: 135(int8_t) Constant 118
|
||||||
|
234: 136 ConstantComposite 233
|
||||||
|
238: 6(float) Constant 1123155968
|
||||||
|
239: 11 ConstantComposite 238
|
||||||
|
243:28(float16_t) Constant 22432
|
||||||
|
244: 29 ConstantComposite 243
|
||||||
|
248: 7(int) Constant 123
|
||||||
|
249: 46 ConstantComposite 248
|
||||||
|
251: 63(int16_t) Constant 124
|
||||||
|
252: 64 ConstantComposite 251
|
||||||
|
256: 81(int8_t) Constant 125
|
||||||
|
257: 82 ConstantComposite 256
|
||||||
|
261: 99(int) Constant 126
|
||||||
|
262: 100 ConstantComposite 261
|
||||||
|
266:117(int16_t) Constant 127
|
||||||
|
267: 118 ConstantComposite 266
|
||||||
|
272: 135(int8_t) Constant 4294967168
|
||||||
|
273: 136 ConstantComposite 272
|
||||||
|
278: 6(float) Constant 1124270080
|
||||||
|
279: 11 ConstantComposite 278
|
||||||
|
283:28(float16_t) Constant 22560
|
||||||
|
284: 29 ConstantComposite 283
|
||||||
|
288: 7(int) Constant 133
|
||||||
|
289: 46 ConstantComposite 288
|
||||||
|
293: 63(int16_t) Constant 134
|
||||||
|
294: 64 ConstantComposite 293
|
||||||
|
296: 81(int8_t) Constant 135
|
||||||
|
297: 82 ConstantComposite 296
|
||||||
|
301: 99(int) Constant 136
|
||||||
|
302: 100 ConstantComposite 301
|
||||||
|
307:117(int16_t) Constant 137
|
||||||
|
308: 118 ConstantComposite 307
|
||||||
|
312: 135(int8_t) Constant 4294967178
|
||||||
|
313: 136 ConstantComposite 312
|
||||||
|
318: 6(float) Constant 1124925440
|
||||||
|
319: 11 ConstantComposite 318
|
||||||
|
323:28(float16_t) Constant 22640
|
||||||
|
324: 29 ConstantComposite 323
|
||||||
|
328: 7(int) Constant 143
|
||||||
|
329: 46 ConstantComposite 328
|
||||||
|
333: 63(int16_t) Constant 144
|
||||||
|
334: 64 ConstantComposite 333
|
||||||
|
338: 81(int8_t) Constant 145
|
||||||
|
339: 82 ConstantComposite 338
|
||||||
|
341: 99(int) Constant 146
|
||||||
|
342: 100 ConstantComposite 341
|
||||||
|
347:117(int16_t) Constant 147
|
||||||
|
348: 118 ConstantComposite 347
|
||||||
|
353: 135(int8_t) Constant 4294967188
|
||||||
|
354: 136 ConstantComposite 353
|
||||||
|
358: 6(float) Constant 1125580800
|
||||||
|
359: 11 ConstantComposite 358
|
||||||
|
363:28(float16_t) Constant 22720
|
||||||
|
364: 29 ConstantComposite 363
|
||||||
|
368: 7(int) Constant 153
|
||||||
|
369: 46 ConstantComposite 368
|
||||||
|
373: 63(int16_t) Constant 154
|
||||||
|
374: 64 ConstantComposite 373
|
||||||
|
379: 81(int8_t) Constant 155
|
||||||
|
380: 82 ConstantComposite 379
|
||||||
|
385: 99(int) Constant 156
|
||||||
|
386: 100 ConstantComposite 385
|
||||||
|
388:117(int16_t) Constant 157
|
||||||
|
389: 118 ConstantComposite 388
|
||||||
|
393: 135(int8_t) Constant 4294967198
|
||||||
|
394: 136 ConstantComposite 393
|
||||||
|
398: 6(float) Constant 1126236160
|
||||||
|
399: 11 ConstantComposite 398
|
||||||
|
403:28(float16_t) Constant 22800
|
||||||
|
404: 29 ConstantComposite 403
|
||||||
|
408: 7(int) Constant 163
|
||||||
|
409: 46 ConstantComposite 408
|
||||||
|
414: 63(int16_t) Constant 164
|
||||||
|
415: 64 ConstantComposite 414
|
||||||
|
419: 81(int8_t) Constant 165
|
||||||
|
420: 82 ConstantComposite 419
|
||||||
|
425: 99(int) Constant 166
|
||||||
|
426: 100 ConstantComposite 425
|
||||||
|
430:117(int16_t) Constant 167
|
||||||
|
431: 118 ConstantComposite 430
|
||||||
|
433: 135(int8_t) Constant 4294967208
|
||||||
|
434: 136 ConstantComposite 433
|
||||||
|
438: 6(float) Constant 1126891520
|
||||||
|
439: 11 ConstantComposite 438
|
||||||
|
443:28(float16_t) Constant 22880
|
||||||
|
444: 29 ConstantComposite 443
|
||||||
|
448: 7(int) Constant 173
|
||||||
|
449: 46 ConstantComposite 448
|
||||||
|
454: 63(int16_t) Constant 174
|
||||||
|
455: 64 ConstantComposite 454
|
||||||
|
460: 81(int8_t) Constant 175
|
||||||
|
461: 82 ConstantComposite 460
|
||||||
|
465: 99(int) Constant 176
|
||||||
|
466: 100 ConstantComposite 465
|
||||||
|
470:117(int16_t) Constant 177
|
||||||
|
471: 118 ConstantComposite 470
|
||||||
|
475: 135(int8_t) Constant 4294967218
|
||||||
|
476: 136 ConstantComposite 475
|
||||||
|
477: TypeVector 7(int) 3
|
||||||
|
478: 7(int) Constant 64
|
||||||
|
479: 7(int) Constant 1
|
||||||
|
480: 477(ivec3) ConstantComposite 478 479 479
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
154(v): 153(ptr) Variable Function
|
||||||
|
158(v): 157(ptr) Variable Function
|
||||||
|
164(v): 163(ptr) Variable Function
|
||||||
|
170(v): 169(ptr) Variable Function
|
||||||
|
176(v): 175(ptr) Variable Function
|
||||||
|
182(v): 181(ptr) Variable Function
|
||||||
|
188(v): 187(ptr) Variable Function
|
||||||
|
194(v): 193(ptr) Variable Function
|
||||||
|
199(v): 153(ptr) Variable Function
|
||||||
|
204(v): 157(ptr) Variable Function
|
||||||
|
207(v): 163(ptr) Variable Function
|
||||||
|
212(v): 169(ptr) Variable Function
|
||||||
|
217(v): 175(ptr) Variable Function
|
||||||
|
222(v): 181(ptr) Variable Function
|
||||||
|
227(v): 187(ptr) Variable Function
|
||||||
|
232(v): 193(ptr) Variable Function
|
||||||
|
237(v): 153(ptr) Variable Function
|
||||||
|
242(v): 157(ptr) Variable Function
|
||||||
|
247(v): 163(ptr) Variable Function
|
||||||
|
250(v): 169(ptr) Variable Function
|
||||||
|
255(v): 175(ptr) Variable Function
|
||||||
|
260(v): 181(ptr) Variable Function
|
||||||
|
265(v): 187(ptr) Variable Function
|
||||||
|
271(v): 193(ptr) Variable Function
|
||||||
|
277(v): 153(ptr) Variable Function
|
||||||
|
282(v): 157(ptr) Variable Function
|
||||||
|
287(v): 163(ptr) Variable Function
|
||||||
|
292(v): 169(ptr) Variable Function
|
||||||
|
295(v): 175(ptr) Variable Function
|
||||||
|
300(v): 181(ptr) Variable Function
|
||||||
|
306(v): 187(ptr) Variable Function
|
||||||
|
311(v): 193(ptr) Variable Function
|
||||||
|
317(v): 153(ptr) Variable Function
|
||||||
|
322(v): 157(ptr) Variable Function
|
||||||
|
327(v): 163(ptr) Variable Function
|
||||||
|
332(v): 169(ptr) Variable Function
|
||||||
|
337(v): 175(ptr) Variable Function
|
||||||
|
340(v): 181(ptr) Variable Function
|
||||||
|
346(v): 187(ptr) Variable Function
|
||||||
|
352(v): 193(ptr) Variable Function
|
||||||
|
357(v): 153(ptr) Variable Function
|
||||||
|
362(v): 157(ptr) Variable Function
|
||||||
|
367(v): 163(ptr) Variable Function
|
||||||
|
372(v): 169(ptr) Variable Function
|
||||||
|
378(v): 175(ptr) Variable Function
|
||||||
|
384(v): 181(ptr) Variable Function
|
||||||
|
387(v): 187(ptr) Variable Function
|
||||||
|
392(v): 193(ptr) Variable Function
|
||||||
|
397(v): 153(ptr) Variable Function
|
||||||
|
402(v): 157(ptr) Variable Function
|
||||||
|
407(v): 163(ptr) Variable Function
|
||||||
|
413(v): 169(ptr) Variable Function
|
||||||
|
418(v): 175(ptr) Variable Function
|
||||||
|
424(v): 181(ptr) Variable Function
|
||||||
|
429(v): 187(ptr) Variable Function
|
||||||
|
432(v): 193(ptr) Variable Function
|
||||||
|
437(v): 153(ptr) Variable Function
|
||||||
|
442(v): 157(ptr) Variable Function
|
||||||
|
447(v): 163(ptr) Variable Function
|
||||||
|
453(v): 169(ptr) Variable Function
|
||||||
|
459(v): 175(ptr) Variable Function
|
||||||
|
464(v): 181(ptr) Variable Function
|
||||||
|
469(v): 187(ptr) Variable Function
|
||||||
|
474(v): 193(ptr) Variable Function
|
||||||
|
Store 154(v) 156
|
||||||
|
Store 158(v) 160
|
||||||
|
161: 29 Load 158(v)
|
||||||
|
162: 11 FConvert 161
|
||||||
|
Store 164(v) 166
|
||||||
|
167: 46 Load 164(v)
|
||||||
|
168: 11 ConvertUToF 167
|
||||||
|
Store 170(v) 172
|
||||||
|
173: 64 Load 170(v)
|
||||||
|
174: 11 ConvertUToF 173
|
||||||
|
Store 176(v) 178
|
||||||
|
179: 82 Load 176(v)
|
||||||
|
180: 11 ConvertUToF 179
|
||||||
|
Store 182(v) 184
|
||||||
|
185: 100 Load 182(v)
|
||||||
|
186: 11 ConvertSToF 185
|
||||||
|
Store 188(v) 190
|
||||||
|
191: 118 Load 188(v)
|
||||||
|
192: 11 ConvertSToF 191
|
||||||
|
Store 194(v) 196
|
||||||
|
197: 136 Load 194(v)
|
||||||
|
198: 11 ConvertSToF 197
|
||||||
|
Store 199(v) 201
|
||||||
|
202: 11 Load 199(v)
|
||||||
|
203: 29 FConvert 202
|
||||||
|
Store 204(v) 206
|
||||||
|
Store 207(v) 209
|
||||||
|
210: 46 Load 207(v)
|
||||||
|
211: 29 ConvertUToF 210
|
||||||
|
Store 212(v) 214
|
||||||
|
215: 64 Load 212(v)
|
||||||
|
216: 29 ConvertUToF 215
|
||||||
|
Store 217(v) 219
|
||||||
|
220: 82 Load 217(v)
|
||||||
|
221: 29 ConvertUToF 220
|
||||||
|
Store 222(v) 224
|
||||||
|
225: 100 Load 222(v)
|
||||||
|
226: 29 ConvertSToF 225
|
||||||
|
Store 227(v) 229
|
||||||
|
230: 118 Load 227(v)
|
||||||
|
231: 29 ConvertSToF 230
|
||||||
|
Store 232(v) 234
|
||||||
|
235: 136 Load 232(v)
|
||||||
|
236: 29 ConvertSToF 235
|
||||||
|
Store 237(v) 239
|
||||||
|
240: 11 Load 237(v)
|
||||||
|
241: 46 ConvertFToU 240
|
||||||
|
Store 242(v) 244
|
||||||
|
245: 29 Load 242(v)
|
||||||
|
246: 46 ConvertFToU 245
|
||||||
|
Store 247(v) 249
|
||||||
|
Store 250(v) 252
|
||||||
|
253: 64 Load 250(v)
|
||||||
|
254: 46 UConvert 253
|
||||||
|
Store 255(v) 257
|
||||||
|
258: 82 Load 255(v)
|
||||||
|
259: 46 UConvert 258
|
||||||
|
Store 260(v) 262
|
||||||
|
263: 100 Load 260(v)
|
||||||
|
264: 46 Bitcast 263
|
||||||
|
Store 265(v) 267
|
||||||
|
268: 118 Load 265(v)
|
||||||
|
269: 100 SConvert 268
|
||||||
|
270: 46 Bitcast 269
|
||||||
|
Store 271(v) 273
|
||||||
|
274: 136 Load 271(v)
|
||||||
|
275: 100 SConvert 274
|
||||||
|
276: 46 Bitcast 275
|
||||||
|
Store 277(v) 279
|
||||||
|
280: 11 Load 277(v)
|
||||||
|
281: 64 ConvertFToU 280
|
||||||
|
Store 282(v) 284
|
||||||
|
285: 29 Load 282(v)
|
||||||
|
286: 64 ConvertFToU 285
|
||||||
|
Store 287(v) 289
|
||||||
|
290: 46 Load 287(v)
|
||||||
|
291: 64 UConvert 290
|
||||||
|
Store 292(v) 294
|
||||||
|
Store 295(v) 297
|
||||||
|
298: 82 Load 295(v)
|
||||||
|
299: 64 UConvert 298
|
||||||
|
Store 300(v) 302
|
||||||
|
303: 100 Load 300(v)
|
||||||
|
304: 118 SConvert 303
|
||||||
|
305: 64 Bitcast 304
|
||||||
|
Store 306(v) 308
|
||||||
|
309: 118 Load 306(v)
|
||||||
|
310: 64 Bitcast 309
|
||||||
|
Store 311(v) 313
|
||||||
|
314: 136 Load 311(v)
|
||||||
|
315: 118 SConvert 314
|
||||||
|
316: 64 Bitcast 315
|
||||||
|
Store 317(v) 319
|
||||||
|
320: 11 Load 317(v)
|
||||||
|
321: 82 ConvertFToU 320
|
||||||
|
Store 322(v) 324
|
||||||
|
325: 29 Load 322(v)
|
||||||
|
326: 82 ConvertFToU 325
|
||||||
|
Store 327(v) 329
|
||||||
|
330: 46 Load 327(v)
|
||||||
|
331: 82 UConvert 330
|
||||||
|
Store 332(v) 334
|
||||||
|
335: 64 Load 332(v)
|
||||||
|
336: 82 UConvert 335
|
||||||
|
Store 337(v) 339
|
||||||
|
Store 340(v) 342
|
||||||
|
343: 100 Load 340(v)
|
||||||
|
344: 136 SConvert 343
|
||||||
|
345: 82 Bitcast 344
|
||||||
|
Store 346(v) 348
|
||||||
|
349: 118 Load 346(v)
|
||||||
|
350: 136 SConvert 349
|
||||||
|
351: 82 Bitcast 350
|
||||||
|
Store 352(v) 354
|
||||||
|
355: 136 Load 352(v)
|
||||||
|
356: 82 Bitcast 355
|
||||||
|
Store 357(v) 359
|
||||||
|
360: 11 Load 357(v)
|
||||||
|
361: 100 ConvertFToS 360
|
||||||
|
Store 362(v) 364
|
||||||
|
365: 29 Load 362(v)
|
||||||
|
366: 100 ConvertFToS 365
|
||||||
|
Store 367(v) 369
|
||||||
|
370: 46 Load 367(v)
|
||||||
|
371: 100 Bitcast 370
|
||||||
|
Store 372(v) 374
|
||||||
|
375: 64 Load 372(v)
|
||||||
|
376: 46 UConvert 375
|
||||||
|
377: 100 Bitcast 376
|
||||||
|
Store 378(v) 380
|
||||||
|
381: 82 Load 378(v)
|
||||||
|
382: 46 UConvert 381
|
||||||
|
383: 100 Bitcast 382
|
||||||
|
Store 384(v) 386
|
||||||
|
Store 387(v) 389
|
||||||
|
390: 118 Load 387(v)
|
||||||
|
391: 100 SConvert 390
|
||||||
|
Store 392(v) 394
|
||||||
|
395: 136 Load 392(v)
|
||||||
|
396: 100 SConvert 395
|
||||||
|
Store 397(v) 399
|
||||||
|
400: 11 Load 397(v)
|
||||||
|
401: 118 ConvertFToS 400
|
||||||
|
Store 402(v) 404
|
||||||
|
405: 29 Load 402(v)
|
||||||
|
406: 118 ConvertFToS 405
|
||||||
|
Store 407(v) 409
|
||||||
|
410: 46 Load 407(v)
|
||||||
|
411: 64 UConvert 410
|
||||||
|
412: 118 Bitcast 411
|
||||||
|
Store 413(v) 415
|
||||||
|
416: 64 Load 413(v)
|
||||||
|
417: 118 Bitcast 416
|
||||||
|
Store 418(v) 420
|
||||||
|
421: 82 Load 418(v)
|
||||||
|
422: 64 UConvert 421
|
||||||
|
423: 118 Bitcast 422
|
||||||
|
Store 424(v) 426
|
||||||
|
427: 100 Load 424(v)
|
||||||
|
428: 118 SConvert 427
|
||||||
|
Store 429(v) 431
|
||||||
|
Store 432(v) 434
|
||||||
|
435: 136 Load 432(v)
|
||||||
|
436: 118 SConvert 435
|
||||||
|
Store 437(v) 439
|
||||||
|
440: 11 Load 437(v)
|
||||||
|
441: 136 ConvertFToS 440
|
||||||
|
Store 442(v) 444
|
||||||
|
445: 29 Load 442(v)
|
||||||
|
446: 136 ConvertFToS 445
|
||||||
|
Store 447(v) 449
|
||||||
|
450: 46 Load 447(v)
|
||||||
|
451: 82 UConvert 450
|
||||||
|
452: 136 Bitcast 451
|
||||||
|
Store 453(v) 455
|
||||||
|
456: 64 Load 453(v)
|
||||||
|
457: 82 UConvert 456
|
||||||
|
458: 136 Bitcast 457
|
||||||
|
Store 459(v) 461
|
||||||
|
462: 82 Load 459(v)
|
||||||
|
463: 136 Bitcast 462
|
||||||
|
Store 464(v) 466
|
||||||
|
467: 100 Load 464(v)
|
||||||
|
468: 136 SConvert 467
|
||||||
|
Store 469(v) 471
|
||||||
|
472: 118 Load 469(v)
|
||||||
|
473: 136 SConvert 472
|
||||||
|
Store 474(v) 476
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
@ -0,0 +1,9 @@
|
|||||||
|
spv.coopmatKHR_constructorError.comp
|
||||||
|
ERROR: 0:12: 'constructor' : Cooperative matrix type parameters mismatch
|
||||||
|
ERROR: 0:13: 'constructor' : Cooperative matrix type parameters mismatch
|
||||||
|
ERROR: 0:14: 'constructor' : Cooperative matrix type parameters mismatch
|
||||||
|
ERROR: 0:15: 'constructor' : Cooperative matrix type parameters mismatch
|
||||||
|
ERROR: 4 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
@ -1,10 +1,11 @@
|
|||||||
spv.intcoopmat.comp
|
spv.intcoopmat.comp
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000b
|
// Generated by (magic number): 8000b
|
||||||
// Id's are bound by 262
|
// Id's are bound by 286
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability Float16
|
Capability Float16
|
||||||
|
Capability Int16
|
||||||
Capability Int8
|
Capability Int8
|
||||||
Capability StorageBuffer8BitAccess
|
Capability StorageBuffer8BitAccess
|
||||||
Capability VulkanMemoryModelKHR
|
Capability VulkanMemoryModelKHR
|
||||||
@ -72,18 +73,22 @@ spv.intcoopmat.comp
|
|||||||
Name 207 "tempArg"
|
Name 207 "tempArg"
|
||||||
Name 212 "shmatrix"
|
Name 212 "shmatrix"
|
||||||
Name 217 "ms"
|
Name 217 "ms"
|
||||||
Name 225 "miC"
|
Name 224 "i16"
|
||||||
Name 226 "muC"
|
Name 230 "u16"
|
||||||
Name 231 "iarr"
|
Name 233 "tempArg"
|
||||||
Name 236 "iarr2"
|
Name 239 "tempArg"
|
||||||
Name 241 "uarr"
|
Name 249 "miC"
|
||||||
Name 246 "uarr2"
|
Name 250 "muC"
|
||||||
Name 251 "S"
|
Name 255 "iarr"
|
||||||
MemberName 251(S) 0 "a"
|
Name 260 "iarr2"
|
||||||
MemberName 251(S) 1 "b"
|
Name 265 "uarr"
|
||||||
MemberName 251(S) 2 "c"
|
Name 270 "uarr2"
|
||||||
Name 256 "SC"
|
Name 275 "S"
|
||||||
Name 261 "scm"
|
MemberName 275(S) 0 "a"
|
||||||
|
MemberName 275(S) 1 "b"
|
||||||
|
MemberName 275(S) 2 "c"
|
||||||
|
Name 280 "SC"
|
||||||
|
Name 285 "scm"
|
||||||
Decorate 83 ArrayStride 4
|
Decorate 83 ArrayStride 4
|
||||||
Decorate 84 ArrayStride 4
|
Decorate 84 ArrayStride 4
|
||||||
MemberDecorate 85(Block) 0 Offset 0
|
MemberDecorate 85(Block) 0 Offset 0
|
||||||
@ -105,8 +110,8 @@ spv.intcoopmat.comp
|
|||||||
Decorate 108(block8) DescriptorSet 0
|
Decorate 108(block8) DescriptorSet 0
|
||||||
Decorate 108(block8) Binding 0
|
Decorate 108(block8) Binding 0
|
||||||
Decorate 156(Y) SpecId 0
|
Decorate 156(Y) SpecId 0
|
||||||
Decorate 223 BuiltIn WorkgroupSize
|
Decorate 247 BuiltIn WorkgroupSize
|
||||||
Decorate 256(SC) SpecId 2
|
Decorate 280(SC) SpecId 2
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 8 1
|
6: TypeInt 8 1
|
||||||
@ -196,47 +201,57 @@ spv.intcoopmat.comp
|
|||||||
212(shmatrix): 211(ptr) Variable Workgroup
|
212(shmatrix): 211(ptr) Variable Workgroup
|
||||||
213: 7(int) Constant 2
|
213: 7(int) Constant 2
|
||||||
214: TypePointer Workgroup 208(ivec4)
|
214: TypePointer Workgroup 208(ivec4)
|
||||||
221: TypeVector 7(int) 3
|
221: TypeInt 16 1
|
||||||
222: 7(int) Constant 64
|
222: TypeCooperativeMatrixNV 221(int16_t) 8 32 9
|
||||||
223: 221(ivec3) ConstantComposite 222 100 100
|
223: TypePointer Function 222
|
||||||
224: TypePointer Private 166
|
225:221(int16_t) Constant 0
|
||||||
225(miC): 224(ptr) Variable Private
|
226: 222 ConstantComposite 225
|
||||||
226(muC): 162(ptr) Variable Private
|
227: TypeInt 16 0
|
||||||
227: 7(int) SpecConstantOp 5362 166
|
228: TypeCooperativeMatrixNV 227(int16_t) 8 32 9
|
||||||
228: 72(int) SpecConstantOp 128 227 76
|
229: TypePointer Function 228
|
||||||
229: TypeArray 72(int) 228
|
231:227(int16_t) Constant 0
|
||||||
230: TypePointer Private 229
|
232: 228 ConstantComposite 231
|
||||||
231(iarr): 230(ptr) Variable Private
|
245: TypeVector 7(int) 3
|
||||||
232: 7(int) SpecConstantOp 5362 166
|
246: 7(int) Constant 64
|
||||||
233: 72(int) SpecConstantOp 128 232 76
|
247: 245(ivec3) ConstantComposite 246 100 100
|
||||||
234: TypeArray 72(int) 233
|
248: TypePointer Private 166
|
||||||
235: TypePointer Private 234
|
249(miC): 248(ptr) Variable Private
|
||||||
236(iarr2): 235(ptr) Variable Private
|
250(muC): 162(ptr) Variable Private
|
||||||
237: 7(int) SpecConstantOp 5362 158
|
251: 7(int) SpecConstantOp 5362 166
|
||||||
238: 72(int) SpecConstantOp 128 237 76
|
252: 72(int) SpecConstantOp 128 251 76
|
||||||
239: TypeArray 72(int) 238
|
253: TypeArray 72(int) 252
|
||||||
240: TypePointer Private 239
|
254: TypePointer Private 253
|
||||||
241(uarr): 240(ptr) Variable Private
|
255(iarr): 254(ptr) Variable Private
|
||||||
242: 7(int) SpecConstantOp 5362 158
|
256: 7(int) SpecConstantOp 5362 166
|
||||||
243: 72(int) SpecConstantOp 128 242 76
|
257: 72(int) SpecConstantOp 128 256 76
|
||||||
244: TypeArray 72(int) 243
|
258: TypeArray 72(int) 257
|
||||||
245: TypePointer Private 244
|
259: TypePointer Private 258
|
||||||
246(uarr2): 245(ptr) Variable Private
|
260(iarr2): 259(ptr) Variable Private
|
||||||
247: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9
|
261: 7(int) SpecConstantOp 5362 158
|
||||||
248: 247 ConstantComposite 73
|
262: 72(int) SpecConstantOp 128 261 76
|
||||||
249: 16(int8_t) Constant 1
|
263: TypeArray 72(int) 262
|
||||||
250: 17 ConstantComposite 249
|
264: TypePointer Private 263
|
||||||
251(S): TypeStruct 72(int) 72(int) 72(int)
|
265(uarr): 264(ptr) Variable Private
|
||||||
252: 72(int) Constant 12
|
266: 7(int) SpecConstantOp 5362 158
|
||||||
253: 72(int) Constant 23
|
267: 72(int) SpecConstantOp 128 266 76
|
||||||
254: 72(int) Constant 34
|
268: TypeArray 72(int) 267
|
||||||
255: 251(S) ConstantComposite 252 253 254
|
269: TypePointer Private 268
|
||||||
256(SC): 72(int) SpecConstant 1
|
270(uarr2): 269(ptr) Variable Private
|
||||||
257: TypeCooperativeMatrixNV 7(int) 8 256(SC) 256(SC)
|
271: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9
|
||||||
258: TypeArray 257 256(SC)
|
272: 271 ConstantComposite 73
|
||||||
259: TypeArray 258 256(SC)
|
273: 16(int8_t) Constant 1
|
||||||
260: TypePointer Private 259
|
274: 17 ConstantComposite 273
|
||||||
261(scm): 260(ptr) Variable Private
|
275(S): TypeStruct 72(int) 72(int) 72(int)
|
||||||
|
276: 72(int) Constant 12
|
||||||
|
277: 72(int) Constant 23
|
||||||
|
278: 72(int) Constant 34
|
||||||
|
279: 275(S) ConstantComposite 276 277 278
|
||||||
|
280(SC): 72(int) SpecConstant 1
|
||||||
|
281: TypeCooperativeMatrixNV 7(int) 8 280(SC) 280(SC)
|
||||||
|
282: TypeArray 281 280(SC)
|
||||||
|
283: TypeArray 282 280(SC)
|
||||||
|
284: TypePointer Private 283
|
||||||
|
285(scm): 284(ptr) Variable Private
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
35(mu): 34(ptr) Variable Function
|
35(mu): 34(ptr) Variable Function
|
||||||
@ -264,6 +279,10 @@ spv.intcoopmat.comp
|
|||||||
193(param): 18(ptr) Variable Function
|
193(param): 18(ptr) Variable Function
|
||||||
207(tempArg): 38(ptr) Variable Function
|
207(tempArg): 38(ptr) Variable Function
|
||||||
217(ms): 38(ptr) Variable Function
|
217(ms): 38(ptr) Variable Function
|
||||||
|
224(i16): 223(ptr) Variable Function
|
||||||
|
230(u16): 229(ptr) Variable Function
|
||||||
|
233(tempArg): 223(ptr) Variable Function
|
||||||
|
239(tempArg): 229(ptr) Variable Function
|
||||||
Store 35(mu) 36
|
Store 35(mu) 36
|
||||||
Store 39(mi) 41
|
Store 39(mi) 41
|
||||||
42: 33 Load 35(mu)
|
42: 33 Load 35(mu)
|
||||||
@ -400,6 +419,24 @@ spv.intcoopmat.comp
|
|||||||
219: 37 Load 217(ms)
|
219: 37 Load 217(ms)
|
||||||
220: 214(ptr) AccessChain 212(shmatrix) 100
|
220: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
CooperativeMatrixStoreNV 220 219 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213
|
CooperativeMatrixStoreNV 220 219 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213
|
||||||
|
Store 224(i16) 226
|
||||||
|
Store 230(u16) 232
|
||||||
|
234: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
|
235: 222 CooperativeMatrixLoadNV 234 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213
|
||||||
|
Store 233(tempArg) 235
|
||||||
|
236: 222 Load 233(tempArg)
|
||||||
|
Store 224(i16) 236
|
||||||
|
237: 222 Load 224(i16)
|
||||||
|
238: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
|
CooperativeMatrixStoreNV 238 237 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213
|
||||||
|
240: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
|
241: 228 CooperativeMatrixLoadNV 240 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213
|
||||||
|
Store 239(tempArg) 241
|
||||||
|
242: 228 Load 239(tempArg)
|
||||||
|
Store 230(u16) 242
|
||||||
|
243: 228 Load 230(u16)
|
||||||
|
244: 214(ptr) AccessChain 212(shmatrix) 100
|
||||||
|
CooperativeMatrixStoreNV 244 243 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
14(ineg(i81;): 10 Function None 12
|
14(ineg(i81;): 10 Function None 12
|
||||||
|
121
Test/spv.coopmatKHR.comp
Normal file
121
Test/spv.coopmatKHR.comp
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
#extension GL_EXT_buffer_reference : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
const int X = 8;
|
||||||
|
layout(constant_id = 0) const int Y = 2;
|
||||||
|
const int Z = X*Y;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator> mC;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator> mC2[3];
|
||||||
|
|
||||||
|
layout(constant_id = 1) const float F = 3.0;
|
||||||
|
|
||||||
|
const coopmat<float, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator> mD = coopmat<float, gl_ScopeSubgroup, Z, 8, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
const coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> mD2 = coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator>(1);
|
||||||
|
|
||||||
|
struct S { int a; int b; int c; };
|
||||||
|
|
||||||
|
const S s = S(12, 23, 34);
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0, buffer_reference) coherent buffer Block {
|
||||||
|
float y[1024*1024];
|
||||||
|
float x[];
|
||||||
|
} block;
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0) coherent buffer Block16 {
|
||||||
|
float16_t y[1024*1024];
|
||||||
|
float16_t x[];
|
||||||
|
|
||||||
|
Block b;
|
||||||
|
} block16;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> f16(coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> m) { return -m; }
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> f32(coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> m) { return -m; }
|
||||||
|
|
||||||
|
layout(constant_id = 2) const int SC = 1;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, SC, SC, gl_MatrixUseAccumulator> scm[SC][SC];
|
||||||
|
|
||||||
|
// sized for coopmat<float16_t, gl_ScopeSubgroup, 16, 16, gl_MatrixUseAccumulator>
|
||||||
|
shared uvec4 shmatrix[16*16*2/16];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, (2>1?8:4), gl_MatrixUseAccumulator> m = coopmat<float, gl_ScopeSubgroup, 16, (2>1?8:4), gl_MatrixUseAccumulator>(0.0);
|
||||||
|
|
||||||
|
m = m + m;
|
||||||
|
m = m - m;
|
||||||
|
m = -m;
|
||||||
|
m = 2.0*m;
|
||||||
|
m = m*2.0;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> m2 = coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator>(m);
|
||||||
|
|
||||||
|
float x = m[1];
|
||||||
|
m[0] = x;
|
||||||
|
|
||||||
|
coopMatLoad(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatStore(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatLoad(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatStore(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatLoad(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatStore(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA> A;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB> B;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> C;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> D;
|
||||||
|
D = coopMatMulAdd(A, B, C);
|
||||||
|
|
||||||
|
int l = D.length();
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> E;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, Z, Z, gl_MatrixUseAccumulator> F = coopmat<float16_t, gl_ScopeSubgroup, Z, Z, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, (2>1?8:4), gl_MatrixUseAccumulator> a[5];
|
||||||
|
a[3][0] = 1.0;
|
||||||
|
|
||||||
|
float md1 = mD[1];
|
||||||
|
|
||||||
|
md1 += (m += m)[1234];
|
||||||
|
|
||||||
|
mC2[1] = mC2[2];
|
||||||
|
|
||||||
|
coopMatLoad(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatStore(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatLoad(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatStore(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> p1;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> p2;
|
||||||
|
|
||||||
|
p1 = f16(p1);
|
||||||
|
p2 = f32(p2);
|
||||||
|
|
||||||
|
p1 = coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
p2 = coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator>(0.0);
|
||||||
|
|
||||||
|
p1 /= p1;
|
||||||
|
|
||||||
|
p1 *= float16_t(2.0);
|
||||||
|
p2 *= 4.0;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseAccumulator> ms;
|
||||||
|
coopMatLoad(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
coopMatStore(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> ms8A;
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB> ms8B;
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseAccumulator> ms8C;
|
||||||
|
coopMatMulAdd(ms8A, ms8B, ms8C);
|
||||||
|
coopMatMulAdd(ms8A, ms8B, ms8C, 0);
|
||||||
|
coopMatMulAdd(ms8A, ms8B, ms8C, gl_MatrixOperandsSaturatingAccumulation);
|
||||||
|
|
||||||
|
coopmat<int16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> m16;
|
||||||
|
coopMatStore(m16, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor);
|
||||||
|
}
|
69
Test/spv.coopmatKHR_Error.comp
Normal file
69
Test/spv.coopmatKHR_Error.comp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
float<16> ftemplate16;
|
||||||
|
|
||||||
|
coopmat fnoparams;
|
||||||
|
|
||||||
|
struct S
|
||||||
|
{
|
||||||
|
int s;
|
||||||
|
};
|
||||||
|
|
||||||
|
coopmat<void, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> fbadtype;
|
||||||
|
coopmat<S, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> fbadtype2;
|
||||||
|
coopmat<16, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> fbadtype3;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, gl_MatrixUseA> fbadnumparams;
|
||||||
|
|
||||||
|
int X = 8;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, X, gl_MatrixUseA> fbadparam;
|
||||||
|
|
||||||
|
layout(constant_id = 0) const int Y = 1;
|
||||||
|
|
||||||
|
shared coopmat<float16_t, gl_ScopeSubgroup, 16, 16> sharedmat;
|
||||||
|
|
||||||
|
layout(set = 0, binding = 0) buffer InvBlock {
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 16, gl_MatrixUseA> bufmat;
|
||||||
|
} invblock;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA> f32_16_8;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA> f16_16_8;
|
||||||
|
|
||||||
|
// invalid implicit conversions
|
||||||
|
f32_16_8 = f16_16_8;
|
||||||
|
f32_16_8 = f16_16_8 + f16_16_8;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> f16_8_8;
|
||||||
|
|
||||||
|
// mismatching dimensions
|
||||||
|
f16_16_8 = f16_8_8;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, Y, gl_MatrixUseA> f16_8_Y;
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, (Y+1), gl_MatrixUseA> f16_8_Y1;
|
||||||
|
|
||||||
|
// mismatching dimensions with specialization constants
|
||||||
|
f16_8_Y = f16_8_Y1;
|
||||||
|
|
||||||
|
// wrong arguments for constructor
|
||||||
|
f16_8_8 = coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(1, 1);
|
||||||
|
|
||||||
|
// can't construct from a builtin type
|
||||||
|
mat4 m4;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 4, 4, gl_MatrixUseA> f32_4_4 = coopmat<float, gl_ScopeSubgroup, 4, 4, gl_MatrixUseA>(m4);
|
||||||
|
|
||||||
|
// only support a single array subscript
|
||||||
|
f16_16_8[0][0];
|
||||||
|
|
||||||
|
// don't support scalar component selection
|
||||||
|
f16_16_8.x;
|
||||||
|
|
||||||
|
transpose(f16_8_8);
|
||||||
|
}
|
85
Test/spv.coopmatKHR_arithmetic.comp
Normal file
85
Test/spv.coopmatKHR_arithmetic.comp
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> f;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB> f2;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA> f3;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> f16;
|
||||||
|
|
||||||
|
coopmat<uint8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> u8;
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> i8;
|
||||||
|
coopmat<uint32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> u32;
|
||||||
|
|
||||||
|
f+f;
|
||||||
|
f-f;
|
||||||
|
f*f;
|
||||||
|
f/f;
|
||||||
|
f+=f;
|
||||||
|
f-=f;
|
||||||
|
f*=f;
|
||||||
|
f/=f;
|
||||||
|
f*2.0;
|
||||||
|
2.0*f;
|
||||||
|
f*=2.0;
|
||||||
|
|
||||||
|
f16+f16;
|
||||||
|
f16-f16;
|
||||||
|
f16*f16;
|
||||||
|
f16/f16;
|
||||||
|
f16+=f16;
|
||||||
|
f16-=f16;
|
||||||
|
f16*=f16;
|
||||||
|
f16/=f16;
|
||||||
|
f16*float16_t(2.0);
|
||||||
|
float16_t(2.0)*f16;
|
||||||
|
f16*=float16_t(2.0);
|
||||||
|
|
||||||
|
u32+u32;
|
||||||
|
u32-u32;
|
||||||
|
u32*u32;
|
||||||
|
u32/u32;
|
||||||
|
u32+=u32;
|
||||||
|
u32-=u32;
|
||||||
|
u32*=u32;
|
||||||
|
u32/=u32;
|
||||||
|
u32*uint32_t(2);
|
||||||
|
uint32_t(2)*u32;
|
||||||
|
u32*=uint32_t(2);
|
||||||
|
|
||||||
|
u8+u8;
|
||||||
|
u8-u8;
|
||||||
|
u8*u8;
|
||||||
|
u8/u8;
|
||||||
|
u8+=u8;
|
||||||
|
u8-=u8;
|
||||||
|
u8*=u8;
|
||||||
|
u8/=u8;
|
||||||
|
u8*uint8_t(2);
|
||||||
|
uint8_t(2)*u8;
|
||||||
|
u8*=uint8_t(2);
|
||||||
|
|
||||||
|
i8+i8;
|
||||||
|
i8-i8;
|
||||||
|
i8*i8;
|
||||||
|
i8/i8;
|
||||||
|
i8+=i8;
|
||||||
|
i8-=i8;
|
||||||
|
i8*=i8;
|
||||||
|
i8/=i8;
|
||||||
|
i8*int8_t(2);
|
||||||
|
int8_t(2)*i8;
|
||||||
|
i8*=int8_t(2);
|
||||||
|
|
||||||
|
-f;
|
||||||
|
-f16;
|
||||||
|
-i8;
|
||||||
|
-u8;
|
||||||
|
}
|
87
Test/spv.coopmatKHR_arithmeticError.comp
Normal file
87
Test/spv.coopmatKHR_arithmeticError.comp
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> f;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB> f2;
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA> f3;
|
||||||
|
|
||||||
|
coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> f16;
|
||||||
|
|
||||||
|
coopmat<uint8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> u8;
|
||||||
|
coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> i8;
|
||||||
|
coopmat<int32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> i32;
|
||||||
|
|
||||||
|
f+1.0;
|
||||||
|
f-1.0;
|
||||||
|
f/1.0;
|
||||||
|
1.0+f;
|
||||||
|
1.0-f;
|
||||||
|
1.0/f;
|
||||||
|
f+=1.0;
|
||||||
|
f-=1.0;
|
||||||
|
f/=1.0;
|
||||||
|
|
||||||
|
f+f16;
|
||||||
|
f-f16;
|
||||||
|
f*f16;
|
||||||
|
f/f16;
|
||||||
|
f+=f16;
|
||||||
|
f-=f16;
|
||||||
|
f*=f16;
|
||||||
|
f/=f16;
|
||||||
|
|
||||||
|
f+f2;
|
||||||
|
f-f2;
|
||||||
|
f*f2;
|
||||||
|
f/f2;
|
||||||
|
f+=f2;
|
||||||
|
f-=f2;
|
||||||
|
f*=f2;
|
||||||
|
f/=f2;
|
||||||
|
|
||||||
|
f+f3;
|
||||||
|
f-f3;
|
||||||
|
f*f3;
|
||||||
|
f/f3;
|
||||||
|
f+=f3;
|
||||||
|
f-=f3;
|
||||||
|
f*=f3;
|
||||||
|
f/=f3;
|
||||||
|
|
||||||
|
u8+i8;
|
||||||
|
u8-i8;
|
||||||
|
u8*i8;
|
||||||
|
u8/i8;
|
||||||
|
u8+=i8;
|
||||||
|
u8-=i8;
|
||||||
|
u8*=i8;
|
||||||
|
u8/=i8;
|
||||||
|
|
||||||
|
u8+uint8_t(1);
|
||||||
|
u8-uint8_t(1);
|
||||||
|
u8/uint8_t(1);
|
||||||
|
u8+=uint8_t(1);
|
||||||
|
u8-=uint8_t(1);
|
||||||
|
u8/=uint8_t(1);
|
||||||
|
|
||||||
|
i8+int8_t(1);
|
||||||
|
i8-int8_t(1);
|
||||||
|
i8/int8_t(1);
|
||||||
|
i8+=int8_t(1);
|
||||||
|
i8-=int8_t(1);
|
||||||
|
i8/=int8_t(1);
|
||||||
|
|
||||||
|
i32+1;
|
||||||
|
i32-1;
|
||||||
|
i32/1;
|
||||||
|
i32+=1;
|
||||||
|
i32-=1;
|
||||||
|
i32/=1;
|
||||||
|
}
|
49
Test/spv.coopmatKHR_constructor.comp
Normal file
49
Test/spv.coopmatKHR_constructor.comp
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
|
||||||
|
#define TESTCONST(T, BASE) \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+1.0)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+2.0)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<uint32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+3)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<uint16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+4)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<uint8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+5)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<int32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+6)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<int16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+7)); \
|
||||||
|
coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+8));
|
||||||
|
|
||||||
|
TESTCONST(float, 0)
|
||||||
|
TESTCONST(float16_t, 10)
|
||||||
|
TESTCONST(uint32_t, 20)
|
||||||
|
TESTCONST(uint16_t, 30)
|
||||||
|
TESTCONST(uint8_t, 40)
|
||||||
|
TESTCONST(int32_t, 50)
|
||||||
|
TESTCONST(int16_t, 60)
|
||||||
|
TESTCONST(int8_t, 70)
|
||||||
|
|
||||||
|
#define TESTVAR(T, BASE) \
|
||||||
|
{ coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+1.0); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<float16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+2.0); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<uint32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<uint32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+3); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<uint16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<uint16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+4); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<uint8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<uint8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+5); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<int32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<int32_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+6); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<int16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<int16_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+7); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); } \
|
||||||
|
{ coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> v = coopmat<int8_t, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(BASE+8); coopmat<T, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(v); }
|
||||||
|
|
||||||
|
TESTVAR(float, 100)
|
||||||
|
TESTVAR(float16_t, 110)
|
||||||
|
TESTVAR(uint32_t, 120)
|
||||||
|
TESTVAR(uint16_t, 130)
|
||||||
|
TESTVAR(uint8_t, 140)
|
||||||
|
TESTVAR(int32_t, 150)
|
||||||
|
TESTVAR(int16_t, 160)
|
||||||
|
TESTVAR(int8_t, 170)
|
||||||
|
}
|
16
Test/spv.coopmatKHR_constructorError.comp
Normal file
16
Test/spv.coopmatKHR_constructorError.comp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#version 450 core
|
||||||
|
#extension GL_KHR_memory_scope_semantics : enable
|
||||||
|
#extension GL_KHR_cooperative_matrix : enable
|
||||||
|
#extension GL_EXT_shader_explicit_arithmetic_types : enable
|
||||||
|
|
||||||
|
layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||||
|
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// Test each kind of shape mismatch
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<float, gl_ScopeWorkgroup, 8, 8, gl_MatrixUseA>(0.0));
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<float, gl_ScopeSubgroup, 16, 8, gl_MatrixUseA>(0.0));
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<float, gl_ScopeSubgroup, 8, 16, gl_MatrixUseA>(0.0));
|
||||||
|
coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA>(coopmat<float, gl_ScopeSubgroup, 8, 8, gl_MatrixUseB>(0.0));
|
||||||
|
}
|
@ -114,4 +114,10 @@ void main()
|
|||||||
coopMatLoadNV(ms, shmatrix, 1, 2, false);
|
coopMatLoadNV(ms, shmatrix, 1, 2, false);
|
||||||
coopMatStoreNV(ms, shmatrix, 1, 2, false);
|
coopMatStoreNV(ms, shmatrix, 1, 2, false);
|
||||||
|
|
||||||
|
icoopmatNV<16, gl_ScopeSubgroup, 16, 8> i16 = icoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0);
|
||||||
|
ucoopmatNV<16, gl_ScopeSubgroup, 16, 8> u16 = ucoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0);
|
||||||
|
coopMatLoadNV(i16, shmatrix, 1, 2, false);
|
||||||
|
coopMatStoreNV(i16, shmatrix, 1, 2, false);
|
||||||
|
coopMatLoadNV(u16, shmatrix, 1, 2, false);
|
||||||
|
coopMatStoreNV(u16, shmatrix, 1, 2, false);
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,7 @@ enum TBasicType {
|
|||||||
EbtReference,
|
EbtReference,
|
||||||
EbtRayQuery,
|
EbtRayQuery,
|
||||||
EbtHitObjectNV,
|
EbtHitObjectNV,
|
||||||
|
EbtCoopmat,
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
// SPIR-V type defined by spirv_type
|
// SPIR-V type defined by spirv_type
|
||||||
EbtSpirvType,
|
EbtSpirvType,
|
||||||
|
@ -1541,6 +1541,19 @@ struct TShaderQualifiers {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TTypeParameters {
|
||||||
|
public:
|
||||||
|
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
|
||||||
|
|
||||||
|
TTypeParameters() : basicType(EbtVoid), arraySizes(nullptr) {}
|
||||||
|
|
||||||
|
TBasicType basicType;
|
||||||
|
TArraySizes *arraySizes;
|
||||||
|
|
||||||
|
bool operator==(const TTypeParameters& rhs) const { return basicType == rhs.basicType && *arraySizes == *rhs.arraySizes; }
|
||||||
|
bool operator!=(const TTypeParameters& rhs) const { return basicType != rhs.basicType || *arraySizes != *rhs.arraySizes; }
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// TPublicType is just temporarily used while parsing and not quite the same
|
// TPublicType is just temporarily used while parsing and not quite the same
|
||||||
// information kept per node in TType. Due to the bison stack, it can't have
|
// information kept per node in TType. Due to the bison stack, it can't have
|
||||||
@ -1558,11 +1571,12 @@ public:
|
|||||||
int vectorSize : 4;
|
int vectorSize : 4;
|
||||||
int matrixCols : 4;
|
int matrixCols : 4;
|
||||||
int matrixRows : 4;
|
int matrixRows : 4;
|
||||||
bool coopmat : 1;
|
bool coopmatNV : 1;
|
||||||
|
bool coopmatKHR : 1;
|
||||||
TArraySizes* arraySizes;
|
TArraySizes* arraySizes;
|
||||||
const TType* userDef;
|
const TType* userDef;
|
||||||
TSourceLoc loc;
|
TSourceLoc loc;
|
||||||
TArraySizes* typeParameters;
|
TTypeParameters* typeParameters;
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
// SPIR-V type defined by spirv_type directive
|
// SPIR-V type defined by spirv_type directive
|
||||||
TSpirvType* spirvType;
|
TSpirvType* spirvType;
|
||||||
@ -1570,8 +1584,12 @@ public:
|
|||||||
|
|
||||||
#ifdef GLSLANG_WEB
|
#ifdef GLSLANG_WEB
|
||||||
bool isCoopmat() const { return false; }
|
bool isCoopmat() const { return false; }
|
||||||
|
bool isCoopmatNV() const { return false; }
|
||||||
|
bool isCoopmatKHR() const { return false; }
|
||||||
#else
|
#else
|
||||||
bool isCoopmat() const { return coopmat; }
|
bool isCoopmat() const { return coopmatNV || coopmatKHR; }
|
||||||
|
bool isCoopmatNV() const { return coopmatNV; }
|
||||||
|
bool isCoopmatKHR() const { return coopmatKHR; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void initType(const TSourceLoc& l)
|
void initType(const TSourceLoc& l)
|
||||||
@ -1584,7 +1602,8 @@ public:
|
|||||||
userDef = nullptr;
|
userDef = nullptr;
|
||||||
loc = l;
|
loc = l;
|
||||||
typeParameters = nullptr;
|
typeParameters = nullptr;
|
||||||
coopmat = false;
|
coopmatNV = false;
|
||||||
|
coopmatKHR = false;
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
spirvType = nullptr;
|
spirvType = nullptr;
|
||||||
#endif
|
#endif
|
||||||
@ -1645,7 +1664,7 @@ public:
|
|||||||
// for "empty" type (no args) or simple scalar/vector/matrix
|
// for "empty" type (no args) or simple scalar/vector/matrix
|
||||||
explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0,
|
explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0,
|
||||||
bool isVector = false) :
|
bool isVector = false) :
|
||||||
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
|
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1),
|
||||||
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
, spirvType(nullptr)
|
, spirvType(nullptr)
|
||||||
@ -1659,7 +1678,7 @@ public:
|
|||||||
// for explicit precision qualifier
|
// for explicit precision qualifier
|
||||||
TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0,
|
TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0,
|
||||||
bool isVector = false) :
|
bool isVector = false) :
|
||||||
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false),
|
basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1),
|
||||||
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
, spirvType(nullptr)
|
, spirvType(nullptr)
|
||||||
@ -1675,7 +1694,7 @@ public:
|
|||||||
// for turning a TPublicType into a TType, using a shallow copy
|
// for turning a TPublicType into a TType, using a shallow copy
|
||||||
explicit TType(const TPublicType& p) :
|
explicit TType(const TPublicType& p) :
|
||||||
basicType(p.basicType),
|
basicType(p.basicType),
|
||||||
vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat),
|
vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmatNV(p.coopmatNV), coopmatKHR(p.coopmatKHR), coopmatKHRuse(-1),
|
||||||
arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters)
|
arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
, spirvType(p.spirvType)
|
, spirvType(p.spirvType)
|
||||||
@ -1695,23 +1714,37 @@ public:
|
|||||||
}
|
}
|
||||||
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
|
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
|
||||||
}
|
}
|
||||||
if (p.isCoopmat() && p.typeParameters && p.typeParameters->getNumDims() > 0) {
|
if (p.isCoopmatNV() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) {
|
||||||
int numBits = p.typeParameters->getDimSize(0);
|
int numBits = p.typeParameters->arraySizes->getDimSize(0);
|
||||||
if (p.basicType == EbtFloat && numBits == 16) {
|
if (p.basicType == EbtFloat && numBits == 16) {
|
||||||
basicType = EbtFloat16;
|
basicType = EbtFloat16;
|
||||||
qualifier.precision = EpqNone;
|
qualifier.precision = EpqNone;
|
||||||
} else if (p.basicType == EbtUint && numBits == 8) {
|
} else if (p.basicType == EbtUint && numBits == 8) {
|
||||||
basicType = EbtUint8;
|
basicType = EbtUint8;
|
||||||
qualifier.precision = EpqNone;
|
qualifier.precision = EpqNone;
|
||||||
|
} else if (p.basicType == EbtUint && numBits == 16) {
|
||||||
|
basicType = EbtUint16;
|
||||||
|
qualifier.precision = EpqNone;
|
||||||
} else if (p.basicType == EbtInt && numBits == 8) {
|
} else if (p.basicType == EbtInt && numBits == 8) {
|
||||||
basicType = EbtInt8;
|
basicType = EbtInt8;
|
||||||
qualifier.precision = EpqNone;
|
qualifier.precision = EpqNone;
|
||||||
|
} else if (p.basicType == EbtInt && numBits == 16) {
|
||||||
|
basicType = EbtInt16;
|
||||||
|
qualifier.precision = EpqNone;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (p.isCoopmatKHR() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) {
|
||||||
|
basicType = p.typeParameters->basicType;
|
||||||
|
|
||||||
|
if (p.typeParameters->arraySizes->getNumDims() == 4) {
|
||||||
|
coopmatKHRuse = p.typeParameters->arraySizes->getDimSize(3);
|
||||||
|
p.typeParameters->arraySizes->removeLastSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for construction of sampler types
|
// for construction of sampler types
|
||||||
TType(const TSampler& sampler, TStorageQualifier q = EvqUniform, TArraySizes* as = nullptr) :
|
TType(const TSampler& sampler, TStorageQualifier q = EvqUniform, TArraySizes* as = nullptr) :
|
||||||
basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1),
|
||||||
arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr),
|
arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr),
|
||||||
sampler(sampler), typeParameters(nullptr)
|
sampler(sampler), typeParameters(nullptr)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
@ -1758,14 +1791,16 @@ public:
|
|||||||
vectorSize = 1;
|
vectorSize = 1;
|
||||||
vector1 = false;
|
vector1 = false;
|
||||||
} else if (isCoopMat()) {
|
} else if (isCoopMat()) {
|
||||||
coopmat = false;
|
coopmatNV = false;
|
||||||
|
coopmatKHR = false;
|
||||||
|
coopmatKHRuse = -1;
|
||||||
typeParameters = nullptr;
|
typeParameters = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for making structures, ...
|
// for making structures, ...
|
||||||
TType(TTypeList* userDef, const TString& n) :
|
TType(TTypeList* userDef, const TString& n) :
|
||||||
basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1),
|
||||||
arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
, spirvType(nullptr)
|
, spirvType(nullptr)
|
||||||
@ -1777,7 +1812,7 @@ public:
|
|||||||
}
|
}
|
||||||
// For interface blocks
|
// For interface blocks
|
||||||
TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
|
TType(TTypeList* userDef, const TString& n, const TQualifier& q) :
|
||||||
basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1),
|
||||||
qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
, spirvType(nullptr)
|
, spirvType(nullptr)
|
||||||
@ -1788,7 +1823,7 @@ public:
|
|||||||
}
|
}
|
||||||
// for block reference (first parameter must be EbtReference)
|
// for block reference (first parameter must be EbtReference)
|
||||||
explicit TType(TBasicType t, const TType &p, const TString& n) :
|
explicit TType(TBasicType t, const TType &p, const TString& n) :
|
||||||
basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false),
|
basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1),
|
||||||
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr)
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
, spirvType(nullptr)
|
, spirvType(nullptr)
|
||||||
@ -1827,7 +1862,9 @@ public:
|
|||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
spirvType = copyOf.spirvType;
|
spirvType = copyOf.spirvType;
|
||||||
#endif
|
#endif
|
||||||
coopmat = copyOf.isCoopMat();
|
coopmatNV = copyOf.isCoopMatNV();
|
||||||
|
coopmatKHR = copyOf.isCoopMatKHR();
|
||||||
|
coopmatKHRuse = copyOf.coopmatKHRuse;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make complete copy of the whole type graph rooted at 'copyOf'.
|
// Make complete copy of the whole type graph rooted at 'copyOf'.
|
||||||
@ -1912,8 +1949,8 @@ public:
|
|||||||
virtual const TArraySizes* getArraySizes() const { return arraySizes; }
|
virtual const TArraySizes* getArraySizes() const { return arraySizes; }
|
||||||
virtual TArraySizes* getArraySizes() { return arraySizes; }
|
virtual TArraySizes* getArraySizes() { return arraySizes; }
|
||||||
virtual TType* getReferentType() const { return referentType; }
|
virtual TType* getReferentType() const { return referentType; }
|
||||||
virtual const TArraySizes* getTypeParameters() const { return typeParameters; }
|
virtual const TTypeParameters* getTypeParameters() const { return typeParameters; }
|
||||||
virtual TArraySizes* getTypeParameters() { return typeParameters; }
|
virtual TTypeParameters* getTypeParameters() { return typeParameters; }
|
||||||
|
|
||||||
virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); }
|
virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); }
|
||||||
virtual bool isScalarOrVec1() const { return isScalar() || vector1; }
|
virtual bool isScalarOrVec1() const { return isScalar() || vector1; }
|
||||||
@ -1968,14 +2005,19 @@ public:
|
|||||||
#ifdef GLSLANG_WEB
|
#ifdef GLSLANG_WEB
|
||||||
bool isAtomic() const { return false; }
|
bool isAtomic() const { return false; }
|
||||||
bool isCoopMat() const { return false; }
|
bool isCoopMat() const { return false; }
|
||||||
|
bool isCoopMatNV() const { return false; }
|
||||||
|
bool isCoopMatKHR() const { return false; }
|
||||||
bool isReference() const { return false; }
|
bool isReference() const { return false; }
|
||||||
bool isSpirvType() const { return false; }
|
bool isSpirvType() const { return false; }
|
||||||
#else
|
#else
|
||||||
bool isAtomic() const { return basicType == EbtAtomicUint; }
|
bool isAtomic() const { return basicType == EbtAtomicUint; }
|
||||||
bool isCoopMat() const { return coopmat; }
|
bool isCoopMat() const { return coopmatNV || coopmatKHR; }
|
||||||
|
bool isCoopMatNV() const { return coopmatNV; }
|
||||||
|
bool isCoopMatKHR() const { return coopmatKHR; }
|
||||||
bool isReference() const { return getBasicType() == EbtReference; }
|
bool isReference() const { return getBasicType() == EbtReference; }
|
||||||
bool isSpirvType() const { return getBasicType() == EbtSpirvType; }
|
bool isSpirvType() const { return getBasicType() == EbtSpirvType; }
|
||||||
#endif
|
#endif
|
||||||
|
int getCoopMatKHRuse() const { return coopmatKHRuse; }
|
||||||
|
|
||||||
// return true if this type contains any subtype which satisfies the given predicate.
|
// return true if this type contains any subtype which satisfies the given predicate.
|
||||||
template <typename P>
|
template <typename P>
|
||||||
@ -2092,7 +2134,7 @@ public:
|
|||||||
}
|
}
|
||||||
bool containsCoopMat() const
|
bool containsCoopMat() const
|
||||||
{
|
{
|
||||||
return contains([](const TType* t) { return t->coopmat; } );
|
return contains([](const TType* t) { return t->coopmatNV || t->coopmatKHR; } );
|
||||||
}
|
}
|
||||||
bool containsReference() const
|
bool containsReference() const
|
||||||
{
|
{
|
||||||
@ -2174,43 +2216,12 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void copyTypeParameters(const TTypeParameters& s)
|
||||||
void updateTypeParameters(const TType& type)
|
|
||||||
{
|
|
||||||
// For when we may already be sharing existing array descriptors,
|
|
||||||
// keeping the pointers the same, just updating the contents.
|
|
||||||
assert(typeParameters != nullptr);
|
|
||||||
assert(type.typeParameters != nullptr);
|
|
||||||
*typeParameters = *type.typeParameters;
|
|
||||||
}
|
|
||||||
void copyTypeParameters(const TArraySizes& s)
|
|
||||||
{
|
{
|
||||||
// For setting a fresh new set of type parameters, not yet worrying about sharing.
|
// For setting a fresh new set of type parameters, not yet worrying about sharing.
|
||||||
typeParameters = new TArraySizes;
|
typeParameters = new TTypeParameters;
|
||||||
*typeParameters = s;
|
*typeParameters = s;
|
||||||
}
|
}
|
||||||
void transferTypeParameters(TArraySizes* s)
|
|
||||||
{
|
|
||||||
// For setting an already allocated set of sizes that this type can use
|
|
||||||
// (no copy made).
|
|
||||||
typeParameters = s;
|
|
||||||
}
|
|
||||||
void clearTypeParameters()
|
|
||||||
{
|
|
||||||
typeParameters = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add inner array sizes, to any existing sizes, via copy; the
|
|
||||||
// sizes passed in can still be reused for other purposes.
|
|
||||||
void copyTypeParametersInnerSizes(const TArraySizes* s)
|
|
||||||
{
|
|
||||||
if (s != nullptr) {
|
|
||||||
if (typeParameters == nullptr)
|
|
||||||
copyTypeParameters(*s);
|
|
||||||
else
|
|
||||||
typeParameters->addInnerSizes(*s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* getBasicString() const
|
const char* getBasicString() const
|
||||||
{
|
{
|
||||||
@ -2243,6 +2254,7 @@ public:
|
|||||||
case EbtReference: return "reference";
|
case EbtReference: return "reference";
|
||||||
case EbtString: return "string";
|
case EbtString: return "string";
|
||||||
case EbtSpirvType: return "spirv_type";
|
case EbtSpirvType: return "spirv_type";
|
||||||
|
case EbtCoopmat: return "coopmat";
|
||||||
#endif
|
#endif
|
||||||
default: return "unknown type";
|
default: return "unknown type";
|
||||||
}
|
}
|
||||||
@ -2553,12 +2565,21 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isParameterized()) {
|
if (isParameterized()) {
|
||||||
|
if (isCoopMatKHR()) {
|
||||||
|
appendStr(" ");
|
||||||
|
appendStr("coopmat");
|
||||||
|
}
|
||||||
|
|
||||||
appendStr("<");
|
appendStr("<");
|
||||||
for (int i = 0; i < (int)typeParameters->getNumDims(); ++i) {
|
for (int i = 0; i < (int)typeParameters->arraySizes->getNumDims(); ++i) {
|
||||||
appendInt(typeParameters->getDimSize(i));
|
appendInt(typeParameters->arraySizes->getDimSize(i));
|
||||||
if (i != (int)typeParameters->getNumDims() - 1)
|
if (i != (int)typeParameters->arraySizes->getNumDims() - 1)
|
||||||
appendStr(", ");
|
appendStr(", ");
|
||||||
}
|
}
|
||||||
|
if (coopmatKHRuse != -1) {
|
||||||
|
appendStr(", ");
|
||||||
|
appendInt(coopmatKHRuse);
|
||||||
|
}
|
||||||
appendStr(">");
|
appendStr(">");
|
||||||
}
|
}
|
||||||
if (getPrecision && qualifier.precision != EpqNone) {
|
if (getPrecision && qualifier.precision != EpqNone) {
|
||||||
@ -2835,7 +2856,8 @@ public:
|
|||||||
matrixCols == right.matrixCols &&
|
matrixCols == right.matrixCols &&
|
||||||
matrixRows == right.matrixRows &&
|
matrixRows == right.matrixRows &&
|
||||||
vector1 == right.vector1 &&
|
vector1 == right.vector1 &&
|
||||||
isCoopMat() == right.isCoopMat() &&
|
isCoopMatNV() == right.isCoopMatNV() &&
|
||||||
|
isCoopMatKHR() == right.isCoopMatKHR() &&
|
||||||
sameStructType(right, lpidx, rpidx) &&
|
sameStructType(right, lpidx, rpidx) &&
|
||||||
sameReferenceType(right);
|
sameReferenceType(right);
|
||||||
}
|
}
|
||||||
@ -2844,29 +2866,70 @@ public:
|
|||||||
// an OK function parameter
|
// an OK function parameter
|
||||||
bool coopMatParameterOK(const TType& right) const
|
bool coopMatParameterOK(const TType& right) const
|
||||||
{
|
{
|
||||||
return isCoopMat() && right.isCoopMat() && (getBasicType() == right.getBasicType()) &&
|
if (isCoopMatNV()) {
|
||||||
|
return right.isCoopMatNV() && (getBasicType() == right.getBasicType()) && typeParameters == nullptr &&
|
||||||
|
right.typeParameters != nullptr;
|
||||||
|
}
|
||||||
|
if (isCoopMatKHR() && right.isCoopMatKHR()) {
|
||||||
|
return ((getBasicType() == right.getBasicType()) || (getBasicType() == EbtCoopmat) ||
|
||||||
|
(right.getBasicType() == EbtCoopmat)) &&
|
||||||
typeParameters == nullptr && right.typeParameters != nullptr;
|
typeParameters == nullptr && right.typeParameters != nullptr;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool sameCoopMatBaseType(const TType &right) const {
|
bool sameCoopMatBaseType(const TType &right) const {
|
||||||
bool rv = coopmat && right.coopmat;
|
bool rv = false;
|
||||||
|
|
||||||
|
if (isCoopMatNV()) {
|
||||||
|
rv = isCoopMatNV() && right.isCoopMatNV();
|
||||||
if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16)
|
if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16)
|
||||||
rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16;
|
rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16;
|
||||||
else if (getBasicType() == EbtUint || getBasicType() == EbtUint8)
|
else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16)
|
||||||
rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8;
|
rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16;
|
||||||
else if (getBasicType() == EbtInt || getBasicType() == EbtInt8)
|
else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16)
|
||||||
rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8;
|
rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16;
|
||||||
else
|
else
|
||||||
rv = false;
|
rv = false;
|
||||||
|
} else if (isCoopMatKHR() && right.isCoopMatKHR()) {
|
||||||
|
if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16)
|
||||||
|
rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16 || right.getBasicType() == EbtCoopmat;
|
||||||
|
else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16)
|
||||||
|
rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16 || right.getBasicType() == EbtCoopmat;
|
||||||
|
else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16)
|
||||||
|
rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16 || right.getBasicType() == EbtCoopmat;
|
||||||
|
else
|
||||||
|
rv = false;
|
||||||
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool sameCoopMatUse(const TType &right) const {
|
||||||
|
return coopmatKHRuse == right.coopmatKHRuse;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool sameCoopMatShapeAndUse(const TType &right) const
|
||||||
|
{
|
||||||
|
if (!isCoopMat() || !right.isCoopMat() || isCoopMatKHR() != right.isCoopMatKHR())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (coopmatKHRuse != right.coopmatKHRuse)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Skip bit width type parameter (first array size) for coopmatNV
|
||||||
|
int firstArrayDimToCompare = isCoopMatNV() ? 1 : 0;
|
||||||
|
for (int i = firstArrayDimToCompare; i < typeParameters->arraySizes->getNumDims(); ++i) {
|
||||||
|
if (typeParameters->arraySizes->getDimSize(i) != right.typeParameters->arraySizes->getDimSize(i))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// See if two types match in all ways (just the actual type, not qualification)
|
// See if two types match in all ways (just the actual type, not qualification)
|
||||||
bool operator==(const TType& right) const
|
bool operator==(const TType& right) const
|
||||||
{
|
{
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameSpirvType(right);
|
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameCoopMatUse(right) && sameSpirvType(right);
|
||||||
#else
|
#else
|
||||||
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right);
|
return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right);
|
||||||
#endif
|
#endif
|
||||||
@ -2923,8 +2986,10 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (copyOf.typeParameters) {
|
if (copyOf.typeParameters) {
|
||||||
typeParameters = new TArraySizes;
|
typeParameters = new TTypeParameters;
|
||||||
*typeParameters = *copyOf.typeParameters;
|
typeParameters->arraySizes = new TArraySizes;
|
||||||
|
*typeParameters->arraySizes = *copyOf.typeParameters->arraySizes;
|
||||||
|
typeParameters->basicType = copyOf.basicType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copyOf.isStruct() && copyOf.structure) {
|
if (copyOf.isStruct() && copyOf.structure) {
|
||||||
@ -2962,7 +3027,9 @@ protected:
|
|||||||
// functionality is added.
|
// functionality is added.
|
||||||
// HLSL does have a 1-component vectors, so this will be true to disambiguate
|
// HLSL does have a 1-component vectors, so this will be true to disambiguate
|
||||||
// from a scalar.
|
// from a scalar.
|
||||||
bool coopmat : 1;
|
bool coopmatNV : 1;
|
||||||
|
bool coopmatKHR : 1;
|
||||||
|
int coopmatKHRuse : 4; // Accepts one of three values: 0, 1, 2 (gl_MatrixUseA, gl_MatrixUseB, gl_MatrixUseAccumulator)
|
||||||
TQualifier qualifier;
|
TQualifier qualifier;
|
||||||
|
|
||||||
TArraySizes* arraySizes; // nullptr unless an array; can be shared across types
|
TArraySizes* arraySizes; // nullptr unless an array; can be shared across types
|
||||||
@ -2975,7 +3042,7 @@ protected:
|
|||||||
TString *fieldName; // for structure field names
|
TString *fieldName; // for structure field names
|
||||||
TString *typeName; // for structure type name
|
TString *typeName; // for structure type name
|
||||||
TSampler sampler;
|
TSampler sampler;
|
||||||
TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types
|
TTypeParameters *typeParameters;// nullptr unless a parameterized type; can be shared across types
|
||||||
#ifndef GLSLANG_WEB
|
#ifndef GLSLANG_WEB
|
||||||
TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive
|
TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive
|
||||||
#endif
|
#endif
|
||||||
|
@ -147,6 +147,15 @@ struct TSmallArrayVector {
|
|||||||
sizes->erase(sizes->begin());
|
sizes->erase(sizes->begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pop_back()
|
||||||
|
{
|
||||||
|
assert(sizes != nullptr && sizes->size() > 0);
|
||||||
|
if (sizes->size() == 1)
|
||||||
|
dealloc();
|
||||||
|
else
|
||||||
|
sizes->resize(sizes->size() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
// 'this' should currently not be holding anything, and copyNonFront
|
// 'this' should currently not be holding anything, and copyNonFront
|
||||||
// will make it hold a copy of all but the first element of rhs.
|
// will make it hold a copy of all but the first element of rhs.
|
||||||
// (This would be useful for making a type that is dereferenced by
|
// (This would be useful for making a type that is dereferenced by
|
||||||
@ -306,6 +315,7 @@ struct TArraySizes {
|
|||||||
bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; }
|
bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; }
|
||||||
void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; }
|
void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; }
|
||||||
void dereference() { sizes.pop_front(); }
|
void dereference() { sizes.pop_front(); }
|
||||||
|
void removeLastSize() { sizes.pop_back(); }
|
||||||
void copyDereferenced(const TArraySizes& rhs)
|
void copyDereferenced(const TArraySizes& rhs)
|
||||||
{
|
{
|
||||||
assert(sizes.size() == 0);
|
assert(sizes.size() == 0);
|
||||||
|
@ -629,6 +629,9 @@ enum TOperator {
|
|||||||
EOpCooperativeMatrixLoad,
|
EOpCooperativeMatrixLoad,
|
||||||
EOpCooperativeMatrixStore,
|
EOpCooperativeMatrixStore,
|
||||||
EOpCooperativeMatrixMulAdd,
|
EOpCooperativeMatrixMulAdd,
|
||||||
|
EOpCooperativeMatrixLoadNV,
|
||||||
|
EOpCooperativeMatrixStoreNV,
|
||||||
|
EOpCooperativeMatrixMulAddNV,
|
||||||
|
|
||||||
EOpBeginInvocationInterlock, // Fragment only
|
EOpBeginInvocationInterlock, // Fragment only
|
||||||
EOpEndInvocationInterlock, // Fragment only
|
EOpEndInvocationInterlock, // Fragment only
|
||||||
@ -766,7 +769,8 @@ enum TOperator {
|
|||||||
EOpConstructTextureSampler,
|
EOpConstructTextureSampler,
|
||||||
EOpConstructNonuniform, // expected to be transformed away, not present in final AST
|
EOpConstructNonuniform, // expected to be transformed away, not present in final AST
|
||||||
EOpConstructReference,
|
EOpConstructReference,
|
||||||
EOpConstructCooperativeMatrix,
|
EOpConstructCooperativeMatrixNV,
|
||||||
|
EOpConstructCooperativeMatrixKHR,
|
||||||
EOpConstructAccStruct,
|
EOpConstructAccStruct,
|
||||||
EOpConstructGuardEnd,
|
EOpConstructGuardEnd,
|
||||||
|
|
||||||
|
@ -4397,6 +4397,94 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
"icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n"
|
"icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n"
|
||||||
"ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n"
|
"ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
std::string cooperativeMatrixFuncs =
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatLoad(out coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
"void coopMatStore(coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n"
|
||||||
|
|
||||||
|
"coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C);\n"
|
||||||
|
"coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C, int matrixOperands);\n";
|
||||||
|
|
||||||
|
commonBuiltins.append(cooperativeMatrixFuncs.c_str());
|
||||||
|
|
||||||
|
commonBuiltins.append(
|
||||||
|
"const int gl_MatrixUseA = 0;\n"
|
||||||
|
"const int gl_MatrixUseB = 1;\n"
|
||||||
|
"const int gl_MatrixUseAccumulator = 2;\n"
|
||||||
|
"const int gl_MatrixOperandsSaturatingAccumulation = 0x10;\n"
|
||||||
|
"const int gl_CooperativeMatrixLayoutRowMajor = 0;\n"
|
||||||
|
"const int gl_CooperativeMatrixLayoutColumnMajor = 1;\n"
|
||||||
|
"\n"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
@ -8897,6 +8985,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||||||
symbolTable.setFunctionExtensions("coopMatMulAddNV", 2, coopExt);
|
symbolTable.setFunctionExtensions("coopMatMulAddNV", 2, coopExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
symbolTable.setFunctionExtensions("coopMatLoad", 1, &E_GL_KHR_cooperative_matrix);
|
||||||
|
symbolTable.setFunctionExtensions("coopMatStore", 1, &E_GL_KHR_cooperative_matrix);
|
||||||
|
symbolTable.setFunctionExtensions("coopMatMulAdd", 1, &E_GL_KHR_cooperative_matrix);
|
||||||
|
}
|
||||||
|
|
||||||
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
|
||||||
symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives);
|
symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives);
|
||||||
symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_NV_compute_shader_derivatives);
|
symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_NV_compute_shader_derivatives);
|
||||||
@ -10005,9 +10099,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||||||
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
|
symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse);
|
||||||
symbolTable.relateToOperator("fwidthCoarse",EOpFwidthCoarse);
|
symbolTable.relateToOperator("fwidthCoarse",EOpFwidthCoarse);
|
||||||
}
|
}
|
||||||
symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoad);
|
symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoadNV);
|
||||||
symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStore);
|
symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStoreNV);
|
||||||
symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAdd);
|
symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAddNV);
|
||||||
|
|
||||||
|
symbolTable.relateToOperator("coopMatLoad", EOpCooperativeMatrixLoad);
|
||||||
|
symbolTable.relateToOperator("coopMatStore", EOpCooperativeMatrixStore);
|
||||||
|
symbolTable.relateToOperator("coopMatMulAdd", EOpCooperativeMatrixMulAdd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EShLangRayGen:
|
case EShLangRayGen:
|
||||||
|
@ -1049,6 +1049,12 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
|
|||||||
if (type.isArray() || node->getType().isArray())
|
if (type.isArray() || node->getType().isArray())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
// Reject implicit conversions to cooperative matrix types
|
||||||
|
if (node->getType().isCoopMat() &&
|
||||||
|
op != EOpConstructCooperativeMatrixNV &&
|
||||||
|
op != EOpConstructCooperativeMatrixKHR)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
// Note: callers are responsible for other aspects of shape,
|
// Note: callers are responsible for other aspects of shape,
|
||||||
// like vector and matrix sizes.
|
// like vector and matrix sizes.
|
||||||
|
|
||||||
@ -1117,7 +1123,8 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
|
|||||||
|
|
||||||
case EOpSequence:
|
case EOpSequence:
|
||||||
case EOpConstructStruct:
|
case EOpConstructStruct:
|
||||||
case EOpConstructCooperativeMatrix:
|
case EOpConstructCooperativeMatrixNV:
|
||||||
|
case EOpConstructCooperativeMatrixKHR:
|
||||||
|
|
||||||
if (type.isReference() || node->getType().isReference()) {
|
if (type.isReference() || node->getType().isReference()) {
|
||||||
// types must match to assign a reference
|
// types must match to assign a reference
|
||||||
@ -2008,8 +2015,11 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
|
|||||||
if (type.getQualifier().isNonUniform())
|
if (type.getQualifier().isNonUniform())
|
||||||
return EOpConstructNonuniform;
|
return EOpConstructNonuniform;
|
||||||
|
|
||||||
if (type.isCoopMat())
|
if (type.isCoopMatNV())
|
||||||
return EOpConstructCooperativeMatrix;
|
return EOpConstructCooperativeMatrixNV;
|
||||||
|
|
||||||
|
if (type.isCoopMatKHR())
|
||||||
|
return EOpConstructCooperativeMatrixKHR;
|
||||||
|
|
||||||
switch (type.getBasicType()) {
|
switch (type.getBasicType()) {
|
||||||
case EbtStruct:
|
case EbtStruct:
|
||||||
@ -3526,20 +3536,28 @@ bool TIntermediate::promoteBinary(TIntermBinary& node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (left->getType().isCoopMat() || right->getType().isCoopMat()) {
|
if (left->getType().isCoopMat() || right->getType().isCoopMat()) {
|
||||||
|
// Operations on two cooperative matrices must have identical types
|
||||||
if (left->getType().isCoopMat() && right->getType().isCoopMat() &&
|
if (left->getType().isCoopMat() && right->getType().isCoopMat() &&
|
||||||
*left->getType().getTypeParameters() != *right->getType().getTypeParameters()) {
|
left->getType() != right->getType()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case EOpMul:
|
case EOpMul:
|
||||||
case EOpMulAssign:
|
case EOpMulAssign:
|
||||||
if (left->getType().isCoopMat() && right->getType().isCoopMat()) {
|
// Mul not supported in NV_cooperative_matrix
|
||||||
|
if (left->getType().isCoopMatNV() && right->getType().isCoopMatNV()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (op == EOpMulAssign && right->getType().isCoopMat()) {
|
// NV_cooperative_matrix supports MulAssign is for mat*=scalar only.
|
||||||
|
// KHR_cooperative_matrix supports it for mat*=mat as well.
|
||||||
|
if (op == EOpMulAssign && right->getType().isCoopMatNV()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Use MatrixTimesScalar if either operand is not a matrix. Otherwise use Mul.
|
||||||
|
if (!left->getType().isCoopMat() || !right->getType().isCoopMat()) {
|
||||||
node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar);
|
node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar);
|
||||||
|
}
|
||||||
|
// In case of scalar*matrix, take the result type from the matrix.
|
||||||
if (right->getType().isCoopMat()) {
|
if (right->getType().isCoopMat()) {
|
||||||
node.setType(right->getType());
|
node.setType(right->getType());
|
||||||
}
|
}
|
||||||
|
@ -1501,7 +1501,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
|||||||
|
|
||||||
if (result->getAsTyped()->getType().isCoopMat() &&
|
if (result->getAsTyped()->getType().isCoopMat() &&
|
||||||
!result->getAsTyped()->getType().isParameterized()) {
|
!result->getAsTyped()->getType().isParameterized()) {
|
||||||
assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd);
|
assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd ||
|
||||||
|
fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAddNV);
|
||||||
|
|
||||||
result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType());
|
result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType());
|
||||||
}
|
}
|
||||||
@ -3642,6 +3643,12 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
|
|||||||
}
|
}
|
||||||
|
|
||||||
TIntermTyped* typed = node->getAsTyped();
|
TIntermTyped* typed = node->getAsTyped();
|
||||||
|
if (type.isCoopMat() && typed->getType().isCoopMat() &&
|
||||||
|
!type.sameCoopMatShapeAndUse(typed->getType())) {
|
||||||
|
error(loc, "Cooperative matrix type parameters mismatch", constructorString.c_str(), "");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (typed == nullptr) {
|
if (typed == nullptr) {
|
||||||
error(loc, "constructor argument does not have a type", constructorString.c_str(), "");
|
error(loc, "constructor argument does not have a type", constructorString.c_str(), "");
|
||||||
return true;
|
return true;
|
||||||
@ -4302,7 +4309,7 @@ TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType)
|
|||||||
return defaultPrecision[publicType.basicType];
|
return defaultPrecision[publicType.basicType];
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier)
|
void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier, bool isCoopMat)
|
||||||
{
|
{
|
||||||
// Built-in symbols are allowed some ambiguous precisions, to be pinned down
|
// Built-in symbols are allowed some ambiguous precisions, to be pinned down
|
||||||
// later by context.
|
// later by context.
|
||||||
@ -4314,6 +4321,9 @@ void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType ba
|
|||||||
error(loc, "atomic counters can only be highp", "atomic_uint", "");
|
error(loc, "atomic counters can only be highp", "atomic_uint", "");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (isCoopMat)
|
||||||
|
return;
|
||||||
|
|
||||||
if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) {
|
if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) {
|
||||||
if (qualifier.precision == EpqNone) {
|
if (qualifier.precision == EpqNone) {
|
||||||
if (relaxedErrors())
|
if (relaxedErrors())
|
||||||
@ -4358,7 +4368,8 @@ bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType bas
|
|||||||
//
|
//
|
||||||
// Do size checking for an array type's size.
|
// Do size checking for an array type's size.
|
||||||
//
|
//
|
||||||
void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, const char *sizeType)
|
void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair,
|
||||||
|
const char* sizeType, const bool allowZero)
|
||||||
{
|
{
|
||||||
bool isConst = false;
|
bool isConst = false;
|
||||||
sizePair.node = nullptr;
|
sizePair.node = nullptr;
|
||||||
@ -4378,9 +4389,8 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA
|
|||||||
TIntermSymbol* symbol = expr->getAsSymbolNode();
|
TIntermSymbol* symbol = expr->getAsSymbolNode();
|
||||||
if (symbol && symbol->getConstArray().size() > 0)
|
if (symbol && symbol->getConstArray().size() > 0)
|
||||||
size = symbol->getConstArray()[0].getIConst();
|
size = symbol->getConstArray()[0].getIConst();
|
||||||
} else if (expr->getAsUnaryNode() &&
|
} else if (expr->getAsUnaryNode() && expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength &&
|
||||||
expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength &&
|
expr->getAsUnaryNode()->getOperand()->getType().isCoopMatNV()) {
|
||||||
expr->getAsUnaryNode()->getOperand()->getType().isCoopMat()) {
|
|
||||||
isConst = true;
|
isConst = true;
|
||||||
size = 1;
|
size = 1;
|
||||||
sizePair.node = expr->getAsUnaryNode();
|
sizePair.node = expr->getAsUnaryNode();
|
||||||
@ -4394,11 +4404,18 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (allowZero) {
|
||||||
|
if (size < 0) {
|
||||||
|
error(loc, sizeType, "", "must be a non-negative integer");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
error(loc, sizeType, "", "must be a positive integer");
|
error(loc, sizeType, "", "must be a positive integer");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// See if this qualifier can be an array.
|
// See if this qualifier can be an array.
|
||||||
@ -7371,6 +7388,43 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TParseContext::coopMatTypeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType)
|
||||||
|
{
|
||||||
|
#ifndef GLSLANG_WEB
|
||||||
|
if (parsingBuiltins)
|
||||||
|
return;
|
||||||
|
if (publicType.isCoopmatKHR()) {
|
||||||
|
if (publicType.typeParameters == nullptr) {
|
||||||
|
error(loc, "coopmat missing type parameters", "", "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (publicType.typeParameters->basicType) {
|
||||||
|
case EbtFloat:
|
||||||
|
case EbtFloat16:
|
||||||
|
case EbtInt:
|
||||||
|
case EbtInt8:
|
||||||
|
case EbtInt16:
|
||||||
|
case EbtUint:
|
||||||
|
case EbtUint8:
|
||||||
|
case EbtUint16:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
error(loc, "coopmat invalid basic type", TType::getBasicString(publicType.typeParameters->basicType), "");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (publicType.typeParameters->arraySizes->getNumDims() != 4) {
|
||||||
|
error(loc, "coopmat incorrect number of type parameters", "", "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int use = publicType.typeParameters->arraySizes->getDimSize(3);
|
||||||
|
if (use < 0 || use > 2) {
|
||||||
|
error(loc, "coopmat invalid matrix Use", "", "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&,
|
bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&,
|
||||||
TArraySizes*, TIntermTyped* initializer, TType& type)
|
TArraySizes*, TIntermTyped* initializer, TType& type)
|
||||||
{
|
{
|
||||||
@ -7486,29 +7540,43 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.isCoopMat()) {
|
if (type.isCoopMatKHR()) {
|
||||||
intermediate.setUseVulkanMemoryModel();
|
intermediate.setUseVulkanMemoryModel();
|
||||||
intermediate.setUseStorageBuffer();
|
intermediate.setUseStorageBuffer();
|
||||||
|
|
||||||
if (!publicType.typeParameters || publicType.typeParameters->getNumDims() != 4) {
|
if (!publicType.typeParameters || !publicType.typeParameters->arraySizes ||
|
||||||
|
publicType.typeParameters->arraySizes->getNumDims() != 3) {
|
||||||
|
error(loc, "unexpected number type parameters", identifier.c_str(), "");
|
||||||
|
}
|
||||||
|
if (publicType.typeParameters) {
|
||||||
|
if (!isTypeFloat(publicType.typeParameters->basicType) && !isTypeInt(publicType.typeParameters->basicType)) {
|
||||||
|
error(loc, "expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type", identifier.c_str(), "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (type.isCoopMatNV()) {
|
||||||
|
intermediate.setUseVulkanMemoryModel();
|
||||||
|
intermediate.setUseStorageBuffer();
|
||||||
|
|
||||||
|
if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() != 4) {
|
||||||
error(loc, "expected four type parameters", identifier.c_str(), "");
|
error(loc, "expected four type parameters", identifier.c_str(), "");
|
||||||
}
|
}
|
||||||
if (publicType.typeParameters) {
|
if (publicType.typeParameters) {
|
||||||
if (isTypeFloat(publicType.basicType) &&
|
if (isTypeFloat(publicType.basicType) &&
|
||||||
publicType.typeParameters->getDimSize(0) != 16 &&
|
publicType.typeParameters->arraySizes->getDimSize(0) != 16 &&
|
||||||
publicType.typeParameters->getDimSize(0) != 32 &&
|
publicType.typeParameters->arraySizes->getDimSize(0) != 32 &&
|
||||||
publicType.typeParameters->getDimSize(0) != 64) {
|
publicType.typeParameters->arraySizes->getDimSize(0) != 64) {
|
||||||
error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), "");
|
error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), "");
|
||||||
}
|
}
|
||||||
if (isTypeInt(publicType.basicType) &&
|
if (isTypeInt(publicType.basicType) &&
|
||||||
publicType.typeParameters->getDimSize(0) != 8 &&
|
publicType.typeParameters->arraySizes->getDimSize(0) != 8 &&
|
||||||
publicType.typeParameters->getDimSize(0) != 32) {
|
publicType.typeParameters->arraySizes->getDimSize(0) != 16 &&
|
||||||
error(loc, "expected 8 or 32 bits for first type parameter", identifier.c_str(), "");
|
publicType.typeParameters->arraySizes->getDimSize(0) != 32) {
|
||||||
|
error(loc, "expected 8, 16, or 32 bits for first type parameter", identifier.c_str(), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (publicType.typeParameters && publicType.typeParameters->getNumDims() != 0) {
|
if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() != 0) {
|
||||||
error(loc, "unexpected type parameters", identifier.c_str(), "");
|
error(loc, "unexpected type parameters", identifier.c_str(), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8336,14 +8404,18 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EOpConstructCooperativeMatrix:
|
case EOpConstructCooperativeMatrixNV:
|
||||||
|
case EOpConstructCooperativeMatrixKHR:
|
||||||
|
if (node->getType() == type) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
if (!node->getType().isCoopMat()) {
|
if (!node->getType().isCoopMat()) {
|
||||||
if (type.getBasicType() != node->getType().getBasicType()) {
|
if (type.getBasicType() != node->getType().getBasicType()) {
|
||||||
node = intermediate.addConversion(type.getBasicType(), node);
|
node = intermediate.addConversion(type.getBasicType(), node);
|
||||||
if (node == nullptr)
|
if (node == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc());
|
node = intermediate.setAggregateOperator(node, op, type, node->getLoc());
|
||||||
} else {
|
} else {
|
||||||
TOperator op = EOpNull;
|
TOperator op = EOpNull;
|
||||||
switch (type.getBasicType()) {
|
switch (type.getBasicType()) {
|
||||||
@ -8356,6 +8428,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
case EbtFloat16: op = EOpConvFloat16ToInt; break;
|
case EbtFloat16: op = EOpConvFloat16ToInt; break;
|
||||||
case EbtUint8: op = EOpConvUint8ToInt; break;
|
case EbtUint8: op = EOpConvUint8ToInt; break;
|
||||||
case EbtInt8: op = EOpConvInt8ToInt; break;
|
case EbtInt8: op = EOpConvInt8ToInt; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToInt; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToInt; break;
|
||||||
case EbtUint: op = EOpConvUintToInt; break;
|
case EbtUint: op = EOpConvUintToInt; break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
}
|
}
|
||||||
@ -8366,8 +8440,33 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
case EbtFloat16: op = EOpConvFloat16ToUint; break;
|
case EbtFloat16: op = EOpConvFloat16ToUint; break;
|
||||||
case EbtUint8: op = EOpConvUint8ToUint; break;
|
case EbtUint8: op = EOpConvUint8ToUint; break;
|
||||||
case EbtInt8: op = EOpConvInt8ToUint; break;
|
case EbtInt8: op = EOpConvInt8ToUint; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToUint; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToUint; break;
|
||||||
case EbtInt: op = EOpConvIntToUint; break;
|
case EbtInt: op = EOpConvIntToUint; break;
|
||||||
case EbtUint: op = EOpConvUintToInt8; break;
|
default: assert(0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EbtInt16:
|
||||||
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToInt16; break;
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToInt16; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToInt16; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToInt16; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToInt16; break;
|
||||||
|
case EbtInt: op = EOpConvIntToInt16; break;
|
||||||
|
case EbtUint: op = EOpConvUintToInt16; break;
|
||||||
|
default: assert(0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EbtUint16:
|
||||||
|
switch (node->getType().getBasicType()) {
|
||||||
|
case EbtFloat: op = EOpConvFloatToUint16; break;
|
||||||
|
case EbtFloat16: op = EOpConvFloat16ToUint16; break;
|
||||||
|
case EbtUint8: op = EOpConvUint8ToUint16; break;
|
||||||
|
case EbtInt8: op = EOpConvInt8ToUint16; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToUint16; break;
|
||||||
|
case EbtInt: op = EOpConvIntToUint16; break;
|
||||||
|
case EbtUint: op = EOpConvUintToUint16; break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -8376,6 +8475,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
case EbtFloat: op = EOpConvFloatToInt8; break;
|
case EbtFloat: op = EOpConvFloatToInt8; break;
|
||||||
case EbtFloat16: op = EOpConvFloat16ToInt8; break;
|
case EbtFloat16: op = EOpConvFloat16ToInt8; break;
|
||||||
case EbtUint8: op = EOpConvUint8ToInt8; break;
|
case EbtUint8: op = EOpConvUint8ToInt8; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToInt8; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToInt8; break;
|
||||||
case EbtInt: op = EOpConvIntToInt8; break;
|
case EbtInt: op = EOpConvIntToInt8; break;
|
||||||
case EbtUint: op = EOpConvUintToInt8; break;
|
case EbtUint: op = EOpConvUintToInt8; break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
@ -8386,6 +8487,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
case EbtFloat: op = EOpConvFloatToUint8; break;
|
case EbtFloat: op = EOpConvFloatToUint8; break;
|
||||||
case EbtFloat16: op = EOpConvFloat16ToUint8; break;
|
case EbtFloat16: op = EOpConvFloat16ToUint8; break;
|
||||||
case EbtInt8: op = EOpConvInt8ToUint8; break;
|
case EbtInt8: op = EOpConvInt8ToUint8; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToUint8; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToUint8; break;
|
||||||
case EbtInt: op = EOpConvIntToUint8; break;
|
case EbtInt: op = EOpConvIntToUint8; break;
|
||||||
case EbtUint: op = EOpConvUintToUint8; break;
|
case EbtUint: op = EOpConvUintToUint8; break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
@ -8396,6 +8499,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
case EbtFloat16: op = EOpConvFloat16ToFloat; break;
|
case EbtFloat16: op = EOpConvFloat16ToFloat; break;
|
||||||
case EbtInt8: op = EOpConvInt8ToFloat; break;
|
case EbtInt8: op = EOpConvInt8ToFloat; break;
|
||||||
case EbtUint8: op = EOpConvUint8ToFloat; break;
|
case EbtUint8: op = EOpConvUint8ToFloat; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToFloat; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToFloat; break;
|
||||||
case EbtInt: op = EOpConvIntToFloat; break;
|
case EbtInt: op = EOpConvIntToFloat; break;
|
||||||
case EbtUint: op = EOpConvUintToFloat; break;
|
case EbtUint: op = EOpConvUintToFloat; break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
@ -8406,6 +8511,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||||||
case EbtFloat: op = EOpConvFloatToFloat16; break;
|
case EbtFloat: op = EOpConvFloatToFloat16; break;
|
||||||
case EbtInt8: op = EOpConvInt8ToFloat16; break;
|
case EbtInt8: op = EOpConvInt8ToFloat16; break;
|
||||||
case EbtUint8: op = EOpConvUint8ToFloat16; break;
|
case EbtUint8: op = EOpConvUint8ToFloat16; break;
|
||||||
|
case EbtInt16: op = EOpConvInt16ToFloat16; break;
|
||||||
|
case EbtUint16: op = EOpConvUint16ToFloat16; break;
|
||||||
case EbtInt: op = EOpConvIntToFloat16; break;
|
case EbtInt: op = EOpConvIntToFloat16; break;
|
||||||
case EbtUint: op = EOpConvUintToFloat16; break;
|
case EbtUint: op = EOpConvUintToFloat16; break;
|
||||||
default: assert(0);
|
default: assert(0);
|
||||||
|
@ -382,7 +382,7 @@ public:
|
|||||||
void globalCheck(const TSourceLoc&, const char* token);
|
void globalCheck(const TSourceLoc&, const char* token);
|
||||||
bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&);
|
bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&);
|
||||||
bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&);
|
bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&);
|
||||||
void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType);
|
void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool allowZero = false);
|
||||||
bool arrayQualifierError(const TSourceLoc&, const TQualifier&);
|
bool arrayQualifierError(const TSourceLoc&, const TQualifier&);
|
||||||
bool arrayError(const TSourceLoc&, const TType&);
|
bool arrayError(const TSourceLoc&, const TType&);
|
||||||
void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
|
void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&);
|
||||||
@ -404,7 +404,7 @@ public:
|
|||||||
void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier);
|
void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier);
|
||||||
int computeSamplerTypeIndex(TSampler&);
|
int computeSamplerTypeIndex(TSampler&);
|
||||||
TPrecisionQualifier getDefaultPrecision(TPublicType&);
|
TPrecisionQualifier getDefaultPrecision(TPublicType&);
|
||||||
void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&);
|
void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMat);
|
||||||
void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type);
|
void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type);
|
||||||
bool containsFieldWithBasicType(const TType& type ,TBasicType basicType);
|
bool containsFieldWithBasicType(const TType& type ,TBasicType basicType);
|
||||||
TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&);
|
TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&);
|
||||||
@ -422,6 +422,7 @@ public:
|
|||||||
void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop);
|
void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop);
|
||||||
void arrayLimitCheck(const TSourceLoc&, const TString&, int size);
|
void arrayLimitCheck(const TSourceLoc&, const TString&, int size);
|
||||||
void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature);
|
void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature);
|
||||||
|
void coopMatTypeParametersCheck(const TSourceLoc&, const TPublicType&);
|
||||||
|
|
||||||
void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&);
|
void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&);
|
||||||
void constantIndexExpressionCheck(TIntermNode*);
|
void constantIndexExpressionCheck(TIntermNode*);
|
||||||
|
@ -770,6 +770,8 @@ void TScanContext::fillInKeywordMap()
|
|||||||
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
|
(*KeywordMap)["icoopmatNV"] = ICOOPMATNV;
|
||||||
(*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
|
(*KeywordMap)["ucoopmatNV"] = UCOOPMATNV;
|
||||||
|
|
||||||
|
(*KeywordMap)["coopmat"] = COOPMAT;
|
||||||
|
|
||||||
(*KeywordMap)["hitObjectNV"] = HITOBJECTNV;
|
(*KeywordMap)["hitObjectNV"] = HITOBJECTNV;
|
||||||
(*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV;
|
(*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV;
|
||||||
|
|
||||||
@ -1781,6 +1783,13 @@ int TScanContext::tokenizeIdentifier()
|
|||||||
return keyword;
|
return keyword;
|
||||||
return identifierOrType();
|
return identifierOrType();
|
||||||
|
|
||||||
|
case COOPMAT:
|
||||||
|
afterType = true;
|
||||||
|
if (parseContext.symbolTable.atBuiltInLevel() ||
|
||||||
|
parseContext.extensionTurnedOn(E_GL_KHR_cooperative_matrix))
|
||||||
|
return keyword;
|
||||||
|
return identifierOrType();
|
||||||
|
|
||||||
case DEMOTE:
|
case DEMOTE:
|
||||||
if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
|
if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation))
|
||||||
return keyword;
|
return keyword;
|
||||||
|
@ -263,6 +263,8 @@ void TParseVersions::initializeExtensionBehavior()
|
|||||||
|
|
||||||
extensionBehavior[E_GL_EXT_fragment_shader_barycentric] = EBhDisable;
|
extensionBehavior[E_GL_EXT_fragment_shader_barycentric] = EBhDisable;
|
||||||
|
|
||||||
|
extensionBehavior[E_GL_KHR_cooperative_matrix] = EBhDisable;
|
||||||
|
|
||||||
// #line and #include
|
// #line and #include
|
||||||
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
|
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
|
||||||
extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable;
|
extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable;
|
||||||
@ -517,6 +519,8 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||||||
"#define GL_KHR_shader_subgroup_clustered 1\n"
|
"#define GL_KHR_shader_subgroup_clustered 1\n"
|
||||||
"#define GL_KHR_shader_subgroup_quad 1\n"
|
"#define GL_KHR_shader_subgroup_quad 1\n"
|
||||||
|
|
||||||
|
"#define GL_KHR_cooperative_matrix 1\n"
|
||||||
|
|
||||||
"#define GL_EXT_shader_image_int64 1\n"
|
"#define GL_EXT_shader_image_int64 1\n"
|
||||||
"#define GL_EXT_shader_atomic_int64 1\n"
|
"#define GL_EXT_shader_atomic_int64 1\n"
|
||||||
"#define GL_EXT_shader_realtime_clock 1\n"
|
"#define GL_EXT_shader_realtime_clock 1\n"
|
||||||
@ -1335,7 +1339,7 @@ void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool buil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
|
void TParseVersions::fcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn)
|
||||||
{
|
{
|
||||||
if (!builtIn) {
|
if (!builtIn) {
|
||||||
const char* const extensions[] = {E_GL_NV_cooperative_matrix};
|
const char* const extensions[] = {E_GL_NV_cooperative_matrix};
|
||||||
@ -1343,13 +1347,21 @@ void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParseVersions::intcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
|
void TParseVersions::intcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn)
|
||||||
{
|
{
|
||||||
if (!builtIn) {
|
if (!builtIn) {
|
||||||
const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix};
|
const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix};
|
||||||
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn)
|
||||||
|
{
|
||||||
|
if (!builtIn) {
|
||||||
|
const char* const extensions[] = {E_GL_KHR_cooperative_matrix};
|
||||||
|
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif // GLSLANG_WEB
|
#endif // GLSLANG_WEB
|
||||||
// Call for any operation removed because SPIR-V is in use.
|
// Call for any operation removed because SPIR-V is in use.
|
||||||
void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
|
void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op)
|
||||||
|
@ -174,6 +174,7 @@ const char* const E_GL_KHR_shader_subgroup_shuffle_relative = "GL_KHR_shader_sub
|
|||||||
const char* const E_GL_KHR_shader_subgroup_clustered = "GL_KHR_shader_subgroup_clustered";
|
const char* const E_GL_KHR_shader_subgroup_clustered = "GL_KHR_shader_subgroup_clustered";
|
||||||
const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_subgroup_quad";
|
const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_subgroup_quad";
|
||||||
const char* const E_GL_KHR_memory_scope_semantics = "GL_KHR_memory_scope_semantics";
|
const char* const E_GL_KHR_memory_scope_semantics = "GL_KHR_memory_scope_semantics";
|
||||||
|
const char* const E_GL_KHR_cooperative_matrix = "GL_KHR_cooperative_matrix";
|
||||||
|
|
||||||
const char* const E_GL_EXT_shader_atomic_int64 = "GL_EXT_shader_atomic_int64";
|
const char* const E_GL_EXT_shader_atomic_int64 = "GL_EXT_shader_atomic_int64";
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ using namespace glslang;
|
|||||||
glslang::TArraySizes* arraySizes;
|
glslang::TArraySizes* arraySizes;
|
||||||
glslang::TIdentifierList* identifierList;
|
glslang::TIdentifierList* identifierList;
|
||||||
};
|
};
|
||||||
glslang::TArraySizes* typeParameters;
|
glslang::TTypeParameters* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +211,7 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
%token <lex> ACCSTRUCTEXT
|
%token <lex> ACCSTRUCTEXT
|
||||||
%token <lex> RAYQUERYEXT
|
%token <lex> RAYQUERYEXT
|
||||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||||
|
%token <lex> COOPMAT
|
||||||
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
||||||
|
|
||||||
// combined image/sampler
|
// combined image/sampler
|
||||||
@ -1108,7 +1109,7 @@ parameter_declaration
|
|||||||
$$ = $2;
|
$$ = $2;
|
||||||
if ($1.qualifier.precision != EpqNone)
|
if ($1.qualifier.precision != EpqNone)
|
||||||
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
|
|
||||||
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
||||||
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
||||||
@ -1120,7 +1121,7 @@ parameter_declaration
|
|||||||
|
|
||||||
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
||||||
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Without name
|
// Without name
|
||||||
@ -1129,7 +1130,7 @@ parameter_declaration
|
|||||||
$$ = $2;
|
$$ = $2;
|
||||||
if ($1.qualifier.precision != EpqNone)
|
if ($1.qualifier.precision != EpqNone)
|
||||||
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
||||||
parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
|
|
||||||
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
||||||
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
||||||
@ -1140,7 +1141,7 @@ parameter_declaration
|
|||||||
|
|
||||||
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
||||||
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1217,7 +1218,7 @@ fully_specified_type
|
|||||||
parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
|
parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
|
||||||
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
|
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
|
||||||
}
|
}
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier);
|
parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier, $$.isCoopmat());
|
||||||
}
|
}
|
||||||
| type_qualifier type_specifier {
|
| type_qualifier type_specifier {
|
||||||
parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2);
|
parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2);
|
||||||
@ -1234,7 +1235,7 @@ fully_specified_type
|
|||||||
parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers);
|
parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers);
|
||||||
$2.shaderQualifiers.merge($1.shaderQualifiers);
|
$2.shaderQualifiers.merge($1.shaderQualifiers);
|
||||||
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
||||||
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier);
|
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat());
|
||||||
|
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
|
|
||||||
@ -1716,6 +1717,8 @@ type_specifier
|
|||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
||||||
$$.typeParameters = $2;
|
$$.typeParameters = $2;
|
||||||
|
parseContext.coopMatTypeParametersCheck($1.loc, $$);
|
||||||
|
|
||||||
}
|
}
|
||||||
| type_specifier_nonarray type_parameter_specifier_opt array_specifier {
|
| type_specifier_nonarray type_parameter_specifier_opt array_specifier {
|
||||||
parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes);
|
parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes);
|
||||||
@ -1723,6 +1726,7 @@ type_specifier
|
|||||||
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
||||||
$$.typeParameters = $2;
|
$$.typeParameters = $2;
|
||||||
$$.arraySizes = $3.arraySizes;
|
$$.arraySizes = $3.arraySizes;
|
||||||
|
parseContext.coopMatTypeParametersCheck($1.loc, $$);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1769,19 +1773,25 @@ type_parameter_specifier
|
|||||||
;
|
;
|
||||||
|
|
||||||
type_parameter_specifier_list
|
type_parameter_specifier_list
|
||||||
: unary_expression {
|
: type_specifier {
|
||||||
$$ = new TArraySizes;
|
$$ = new TTypeParameters;
|
||||||
|
$$->arraySizes = new TArraySizes;
|
||||||
|
$$->basicType = $1.basicType;
|
||||||
|
}
|
||||||
|
| unary_expression {
|
||||||
|
$$ = new TTypeParameters;
|
||||||
|
$$->arraySizes = new TArraySizes;
|
||||||
|
|
||||||
TArraySize size;
|
TArraySize size;
|
||||||
parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter");
|
parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter", true);
|
||||||
$$->addInnerSize(size);
|
$$->arraySizes->addInnerSize(size);
|
||||||
}
|
}
|
||||||
| type_parameter_specifier_list COMMA unary_expression {
|
| type_parameter_specifier_list COMMA unary_expression {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
|
|
||||||
TArraySize size;
|
TArraySize size;
|
||||||
parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter");
|
parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter", true);
|
||||||
$$->addInnerSize(size);
|
$$->arraySizes->addInnerSize(size);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -3521,22 +3531,32 @@ GLSLANG_WEB_EXCLUDE_ON
|
|||||||
$$.sampler.setSubpass(EbtUint, true);
|
$$.sampler.setSubpass(EbtUint, true);
|
||||||
}
|
}
|
||||||
| FCOOPMATNV {
|
| FCOOPMATNV {
|
||||||
parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
parseContext.fcoopmatCheckNV($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtFloat;
|
$$.basicType = EbtFloat;
|
||||||
$$.coopmat = true;
|
$$.coopmatNV = true;
|
||||||
|
$$.coopmatKHR = false;
|
||||||
}
|
}
|
||||||
| ICOOPMATNV {
|
| ICOOPMATNV {
|
||||||
parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
parseContext.intcoopmatCheckNV($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtInt;
|
$$.basicType = EbtInt;
|
||||||
$$.coopmat = true;
|
$$.coopmatNV = true;
|
||||||
|
$$.coopmatKHR = false;
|
||||||
}
|
}
|
||||||
| UCOOPMATNV {
|
| UCOOPMATNV {
|
||||||
parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
parseContext.intcoopmatCheckNV($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtUint;
|
$$.basicType = EbtUint;
|
||||||
$$.coopmat = true;
|
$$.coopmatNV = true;
|
||||||
|
$$.coopmatKHR = false;
|
||||||
|
}
|
||||||
|
| COOPMAT {
|
||||||
|
parseContext.coopmatCheck($1.loc, "coopmat", parseContext.symbolTable.atBuiltInLevel());
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtCoopmat;
|
||||||
|
$$.coopmatNV = false;
|
||||||
|
$$.coopmatKHR = true;
|
||||||
}
|
}
|
||||||
| spirv_type_specifier {
|
| spirv_type_specifier {
|
||||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||||
@ -3634,7 +3654,7 @@ struct_declaration
|
|||||||
$$ = $2;
|
$$ = $2;
|
||||||
|
|
||||||
parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType);
|
parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType);
|
||||||
parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier);
|
parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier, $1.isCoopmat());
|
||||||
|
|
||||||
for (unsigned int i = 0; i < $$->size(); ++i) {
|
for (unsigned int i = 0; i < $$->size(); ++i) {
|
||||||
TType type($1);
|
TType type($1);
|
||||||
@ -3658,7 +3678,7 @@ struct_declaration
|
|||||||
parseContext.memberQualifierCheck($1);
|
parseContext.memberQualifierCheck($1);
|
||||||
parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType);
|
parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType);
|
||||||
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
||||||
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier);
|
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat());
|
||||||
|
|
||||||
for (unsigned int i = 0; i < $$->size(); ++i) {
|
for (unsigned int i = 0; i < $$->size(); ++i) {
|
||||||
TType type($2);
|
TType type($2);
|
||||||
|
@ -129,7 +129,7 @@ using namespace glslang;
|
|||||||
glslang::TArraySizes* arraySizes;
|
glslang::TArraySizes* arraySizes;
|
||||||
glslang::TIdentifierList* identifierList;
|
glslang::TIdentifierList* identifierList;
|
||||||
};
|
};
|
||||||
glslang::TArraySizes* typeParameters;
|
glslang::TTypeParameters* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,6 +211,7 @@ extern int yylex(YYSTYPE*, TParseContext&);
|
|||||||
%token <lex> ACCSTRUCTEXT
|
%token <lex> ACCSTRUCTEXT
|
||||||
%token <lex> RAYQUERYEXT
|
%token <lex> RAYQUERYEXT
|
||||||
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
%token <lex> FCOOPMATNV ICOOPMATNV UCOOPMATNV
|
||||||
|
%token <lex> COOPMAT
|
||||||
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
%token <lex> HITOBJECTNV HITOBJECTATTRNV
|
||||||
|
|
||||||
// combined image/sampler
|
// combined image/sampler
|
||||||
@ -1108,7 +1109,7 @@ parameter_declaration
|
|||||||
$$ = $2;
|
$$ = $2;
|
||||||
if ($1.qualifier.precision != EpqNone)
|
if ($1.qualifier.precision != EpqNone)
|
||||||
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
|
|
||||||
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
||||||
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
||||||
@ -1120,7 +1121,7 @@ parameter_declaration
|
|||||||
|
|
||||||
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
||||||
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Without name
|
// Without name
|
||||||
@ -1129,7 +1130,7 @@ parameter_declaration
|
|||||||
$$ = $2;
|
$$ = $2;
|
||||||
if ($1.qualifier.precision != EpqNone)
|
if ($1.qualifier.precision != EpqNone)
|
||||||
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
$$.param.type->getQualifier().precision = $1.qualifier.precision;
|
||||||
parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
|
|
||||||
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers);
|
||||||
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type);
|
||||||
@ -1140,7 +1141,7 @@ parameter_declaration
|
|||||||
|
|
||||||
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type);
|
||||||
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type);
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier());
|
parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat());
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1217,7 +1218,7 @@ fully_specified_type
|
|||||||
parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
|
parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type");
|
||||||
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
|
parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type");
|
||||||
}
|
}
|
||||||
parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier);
|
parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier, $$.isCoopmat());
|
||||||
}
|
}
|
||||||
| type_qualifier type_specifier {
|
| type_qualifier type_specifier {
|
||||||
parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2);
|
parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2);
|
||||||
@ -1234,7 +1235,7 @@ fully_specified_type
|
|||||||
parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers);
|
parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers);
|
||||||
$2.shaderQualifiers.merge($1.shaderQualifiers);
|
$2.shaderQualifiers.merge($1.shaderQualifiers);
|
||||||
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
||||||
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier);
|
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat());
|
||||||
|
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
|
|
||||||
@ -1716,6 +1717,8 @@ type_specifier
|
|||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
||||||
$$.typeParameters = $2;
|
$$.typeParameters = $2;
|
||||||
|
parseContext.coopMatTypeParametersCheck($1.loc, $$);
|
||||||
|
|
||||||
}
|
}
|
||||||
| type_specifier_nonarray type_parameter_specifier_opt array_specifier {
|
| type_specifier_nonarray type_parameter_specifier_opt array_specifier {
|
||||||
parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes);
|
parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes);
|
||||||
@ -1723,6 +1726,7 @@ type_specifier
|
|||||||
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
$$.qualifier.precision = parseContext.getDefaultPrecision($$);
|
||||||
$$.typeParameters = $2;
|
$$.typeParameters = $2;
|
||||||
$$.arraySizes = $3.arraySizes;
|
$$.arraySizes = $3.arraySizes;
|
||||||
|
parseContext.coopMatTypeParametersCheck($1.loc, $$);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1769,19 +1773,25 @@ type_parameter_specifier
|
|||||||
;
|
;
|
||||||
|
|
||||||
type_parameter_specifier_list
|
type_parameter_specifier_list
|
||||||
: unary_expression {
|
: type_specifier {
|
||||||
$$ = new TArraySizes;
|
$$ = new TTypeParameters;
|
||||||
|
$$->arraySizes = new TArraySizes;
|
||||||
|
$$->basicType = $1.basicType;
|
||||||
|
}
|
||||||
|
| unary_expression {
|
||||||
|
$$ = new TTypeParameters;
|
||||||
|
$$->arraySizes = new TArraySizes;
|
||||||
|
|
||||||
TArraySize size;
|
TArraySize size;
|
||||||
parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter");
|
parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter", true);
|
||||||
$$->addInnerSize(size);
|
$$->arraySizes->addInnerSize(size);
|
||||||
}
|
}
|
||||||
| type_parameter_specifier_list COMMA unary_expression {
|
| type_parameter_specifier_list COMMA unary_expression {
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
|
|
||||||
TArraySize size;
|
TArraySize size;
|
||||||
parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter");
|
parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter", true);
|
||||||
$$->addInnerSize(size);
|
$$->arraySizes->addInnerSize(size);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -3521,22 +3531,32 @@ type_specifier_nonarray
|
|||||||
$$.sampler.setSubpass(EbtUint, true);
|
$$.sampler.setSubpass(EbtUint, true);
|
||||||
}
|
}
|
||||||
| FCOOPMATNV {
|
| FCOOPMATNV {
|
||||||
parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
parseContext.fcoopmatCheckNV($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtFloat;
|
$$.basicType = EbtFloat;
|
||||||
$$.coopmat = true;
|
$$.coopmatNV = true;
|
||||||
|
$$.coopmatKHR = false;
|
||||||
}
|
}
|
||||||
| ICOOPMATNV {
|
| ICOOPMATNV {
|
||||||
parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
parseContext.intcoopmatCheckNV($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtInt;
|
$$.basicType = EbtInt;
|
||||||
$$.coopmat = true;
|
$$.coopmatNV = true;
|
||||||
|
$$.coopmatKHR = false;
|
||||||
}
|
}
|
||||||
| UCOOPMATNV {
|
| UCOOPMATNV {
|
||||||
parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
parseContext.intcoopmatCheckNV($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel());
|
||||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
$$.basicType = EbtUint;
|
$$.basicType = EbtUint;
|
||||||
$$.coopmat = true;
|
$$.coopmatNV = true;
|
||||||
|
$$.coopmatKHR = false;
|
||||||
|
}
|
||||||
|
| COOPMAT {
|
||||||
|
parseContext.coopmatCheck($1.loc, "coopmat", parseContext.symbolTable.atBuiltInLevel());
|
||||||
|
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||||
|
$$.basicType = EbtCoopmat;
|
||||||
|
$$.coopmatNV = false;
|
||||||
|
$$.coopmatKHR = true;
|
||||||
}
|
}
|
||||||
| spirv_type_specifier {
|
| spirv_type_specifier {
|
||||||
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier");
|
||||||
@ -3634,7 +3654,7 @@ struct_declaration
|
|||||||
$$ = $2;
|
$$ = $2;
|
||||||
|
|
||||||
parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType);
|
parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType);
|
||||||
parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier);
|
parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier, $1.isCoopmat());
|
||||||
|
|
||||||
for (unsigned int i = 0; i < $$->size(); ++i) {
|
for (unsigned int i = 0; i < $$->size(); ++i) {
|
||||||
TType type($1);
|
TType type($1);
|
||||||
@ -3658,7 +3678,7 @@ struct_declaration
|
|||||||
parseContext.memberQualifierCheck($1);
|
parseContext.memberQualifierCheck($1);
|
||||||
parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType);
|
parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType);
|
||||||
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true);
|
||||||
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier);
|
parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat());
|
||||||
|
|
||||||
for (unsigned int i = 0; i < $$->size(); ++i) {
|
for (unsigned int i = 0; i < $$->size(); ++i) {
|
||||||
TType type($2);
|
TType type($2);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
|||||||
/* A Bison parser, made by GNU Bison 3.7.4. */
|
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||||
|
|
||||||
/* Bison interface for Yacc-like parsers in C
|
/* Bison interface for Yacc-like parsers in C
|
||||||
|
|
||||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
|
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||||
Inc.
|
Inc.
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
@ -16,7 +16,7 @@
|
|||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* As a special exception, you may create a larger work that contains
|
/* As a special exception, you may create a larger work that contains
|
||||||
part or all of the Bison parser skeleton and distribute that work
|
part or all of the Bison parser skeleton and distribute that work
|
||||||
@ -217,304 +217,305 @@ extern int yydebug;
|
|||||||
FCOOPMATNV = 418, /* FCOOPMATNV */
|
FCOOPMATNV = 418, /* FCOOPMATNV */
|
||||||
ICOOPMATNV = 419, /* ICOOPMATNV */
|
ICOOPMATNV = 419, /* ICOOPMATNV */
|
||||||
UCOOPMATNV = 420, /* UCOOPMATNV */
|
UCOOPMATNV = 420, /* UCOOPMATNV */
|
||||||
HITOBJECTNV = 421, /* HITOBJECTNV */
|
COOPMAT = 421, /* COOPMAT */
|
||||||
HITOBJECTATTRNV = 422, /* HITOBJECTATTRNV */
|
HITOBJECTNV = 422, /* HITOBJECTNV */
|
||||||
SAMPLERCUBEARRAY = 423, /* SAMPLERCUBEARRAY */
|
HITOBJECTATTRNV = 423, /* HITOBJECTATTRNV */
|
||||||
SAMPLERCUBEARRAYSHADOW = 424, /* SAMPLERCUBEARRAYSHADOW */
|
SAMPLERCUBEARRAY = 424, /* SAMPLERCUBEARRAY */
|
||||||
ISAMPLERCUBEARRAY = 425, /* ISAMPLERCUBEARRAY */
|
SAMPLERCUBEARRAYSHADOW = 425, /* SAMPLERCUBEARRAYSHADOW */
|
||||||
USAMPLERCUBEARRAY = 426, /* USAMPLERCUBEARRAY */
|
ISAMPLERCUBEARRAY = 426, /* ISAMPLERCUBEARRAY */
|
||||||
SAMPLER1D = 427, /* SAMPLER1D */
|
USAMPLERCUBEARRAY = 427, /* USAMPLERCUBEARRAY */
|
||||||
SAMPLER1DARRAY = 428, /* SAMPLER1DARRAY */
|
SAMPLER1D = 428, /* SAMPLER1D */
|
||||||
SAMPLER1DARRAYSHADOW = 429, /* SAMPLER1DARRAYSHADOW */
|
SAMPLER1DARRAY = 429, /* SAMPLER1DARRAY */
|
||||||
ISAMPLER1D = 430, /* ISAMPLER1D */
|
SAMPLER1DARRAYSHADOW = 430, /* SAMPLER1DARRAYSHADOW */
|
||||||
SAMPLER1DSHADOW = 431, /* SAMPLER1DSHADOW */
|
ISAMPLER1D = 431, /* ISAMPLER1D */
|
||||||
SAMPLER2DRECT = 432, /* SAMPLER2DRECT */
|
SAMPLER1DSHADOW = 432, /* SAMPLER1DSHADOW */
|
||||||
SAMPLER2DRECTSHADOW = 433, /* SAMPLER2DRECTSHADOW */
|
SAMPLER2DRECT = 433, /* SAMPLER2DRECT */
|
||||||
ISAMPLER2DRECT = 434, /* ISAMPLER2DRECT */
|
SAMPLER2DRECTSHADOW = 434, /* SAMPLER2DRECTSHADOW */
|
||||||
USAMPLER2DRECT = 435, /* USAMPLER2DRECT */
|
ISAMPLER2DRECT = 435, /* ISAMPLER2DRECT */
|
||||||
SAMPLERBUFFER = 436, /* SAMPLERBUFFER */
|
USAMPLER2DRECT = 436, /* USAMPLER2DRECT */
|
||||||
ISAMPLERBUFFER = 437, /* ISAMPLERBUFFER */
|
SAMPLERBUFFER = 437, /* SAMPLERBUFFER */
|
||||||
USAMPLERBUFFER = 438, /* USAMPLERBUFFER */
|
ISAMPLERBUFFER = 438, /* ISAMPLERBUFFER */
|
||||||
SAMPLER2DMS = 439, /* SAMPLER2DMS */
|
USAMPLERBUFFER = 439, /* USAMPLERBUFFER */
|
||||||
ISAMPLER2DMS = 440, /* ISAMPLER2DMS */
|
SAMPLER2DMS = 440, /* SAMPLER2DMS */
|
||||||
USAMPLER2DMS = 441, /* USAMPLER2DMS */
|
ISAMPLER2DMS = 441, /* ISAMPLER2DMS */
|
||||||
SAMPLER2DMSARRAY = 442, /* SAMPLER2DMSARRAY */
|
USAMPLER2DMS = 442, /* USAMPLER2DMS */
|
||||||
ISAMPLER2DMSARRAY = 443, /* ISAMPLER2DMSARRAY */
|
SAMPLER2DMSARRAY = 443, /* SAMPLER2DMSARRAY */
|
||||||
USAMPLER2DMSARRAY = 444, /* USAMPLER2DMSARRAY */
|
ISAMPLER2DMSARRAY = 444, /* ISAMPLER2DMSARRAY */
|
||||||
SAMPLEREXTERNALOES = 445, /* SAMPLEREXTERNALOES */
|
USAMPLER2DMSARRAY = 445, /* USAMPLER2DMSARRAY */
|
||||||
SAMPLEREXTERNAL2DY2YEXT = 446, /* SAMPLEREXTERNAL2DY2YEXT */
|
SAMPLEREXTERNALOES = 446, /* SAMPLEREXTERNALOES */
|
||||||
ISAMPLER1DARRAY = 447, /* ISAMPLER1DARRAY */
|
SAMPLEREXTERNAL2DY2YEXT = 447, /* SAMPLEREXTERNAL2DY2YEXT */
|
||||||
USAMPLER1D = 448, /* USAMPLER1D */
|
ISAMPLER1DARRAY = 448, /* ISAMPLER1DARRAY */
|
||||||
USAMPLER1DARRAY = 449, /* USAMPLER1DARRAY */
|
USAMPLER1D = 449, /* USAMPLER1D */
|
||||||
F16SAMPLER1D = 450, /* F16SAMPLER1D */
|
USAMPLER1DARRAY = 450, /* USAMPLER1DARRAY */
|
||||||
F16SAMPLER2D = 451, /* F16SAMPLER2D */
|
F16SAMPLER1D = 451, /* F16SAMPLER1D */
|
||||||
F16SAMPLER3D = 452, /* F16SAMPLER3D */
|
F16SAMPLER2D = 452, /* F16SAMPLER2D */
|
||||||
F16SAMPLER2DRECT = 453, /* F16SAMPLER2DRECT */
|
F16SAMPLER3D = 453, /* F16SAMPLER3D */
|
||||||
F16SAMPLERCUBE = 454, /* F16SAMPLERCUBE */
|
F16SAMPLER2DRECT = 454, /* F16SAMPLER2DRECT */
|
||||||
F16SAMPLER1DARRAY = 455, /* F16SAMPLER1DARRAY */
|
F16SAMPLERCUBE = 455, /* F16SAMPLERCUBE */
|
||||||
F16SAMPLER2DARRAY = 456, /* F16SAMPLER2DARRAY */
|
F16SAMPLER1DARRAY = 456, /* F16SAMPLER1DARRAY */
|
||||||
F16SAMPLERCUBEARRAY = 457, /* F16SAMPLERCUBEARRAY */
|
F16SAMPLER2DARRAY = 457, /* F16SAMPLER2DARRAY */
|
||||||
F16SAMPLERBUFFER = 458, /* F16SAMPLERBUFFER */
|
F16SAMPLERCUBEARRAY = 458, /* F16SAMPLERCUBEARRAY */
|
||||||
F16SAMPLER2DMS = 459, /* F16SAMPLER2DMS */
|
F16SAMPLERBUFFER = 459, /* F16SAMPLERBUFFER */
|
||||||
F16SAMPLER2DMSARRAY = 460, /* F16SAMPLER2DMSARRAY */
|
F16SAMPLER2DMS = 460, /* F16SAMPLER2DMS */
|
||||||
F16SAMPLER1DSHADOW = 461, /* F16SAMPLER1DSHADOW */
|
F16SAMPLER2DMSARRAY = 461, /* F16SAMPLER2DMSARRAY */
|
||||||
F16SAMPLER2DSHADOW = 462, /* F16SAMPLER2DSHADOW */
|
F16SAMPLER1DSHADOW = 462, /* F16SAMPLER1DSHADOW */
|
||||||
F16SAMPLER1DARRAYSHADOW = 463, /* F16SAMPLER1DARRAYSHADOW */
|
F16SAMPLER2DSHADOW = 463, /* F16SAMPLER2DSHADOW */
|
||||||
F16SAMPLER2DARRAYSHADOW = 464, /* F16SAMPLER2DARRAYSHADOW */
|
F16SAMPLER1DARRAYSHADOW = 464, /* F16SAMPLER1DARRAYSHADOW */
|
||||||
F16SAMPLER2DRECTSHADOW = 465, /* F16SAMPLER2DRECTSHADOW */
|
F16SAMPLER2DARRAYSHADOW = 465, /* F16SAMPLER2DARRAYSHADOW */
|
||||||
F16SAMPLERCUBESHADOW = 466, /* F16SAMPLERCUBESHADOW */
|
F16SAMPLER2DRECTSHADOW = 466, /* F16SAMPLER2DRECTSHADOW */
|
||||||
F16SAMPLERCUBEARRAYSHADOW = 467, /* F16SAMPLERCUBEARRAYSHADOW */
|
F16SAMPLERCUBESHADOW = 467, /* F16SAMPLERCUBESHADOW */
|
||||||
IMAGE1D = 468, /* IMAGE1D */
|
F16SAMPLERCUBEARRAYSHADOW = 468, /* F16SAMPLERCUBEARRAYSHADOW */
|
||||||
IIMAGE1D = 469, /* IIMAGE1D */
|
IMAGE1D = 469, /* IMAGE1D */
|
||||||
UIMAGE1D = 470, /* UIMAGE1D */
|
IIMAGE1D = 470, /* IIMAGE1D */
|
||||||
IMAGE2D = 471, /* IMAGE2D */
|
UIMAGE1D = 471, /* UIMAGE1D */
|
||||||
IIMAGE2D = 472, /* IIMAGE2D */
|
IMAGE2D = 472, /* IMAGE2D */
|
||||||
UIMAGE2D = 473, /* UIMAGE2D */
|
IIMAGE2D = 473, /* IIMAGE2D */
|
||||||
IMAGE3D = 474, /* IMAGE3D */
|
UIMAGE2D = 474, /* UIMAGE2D */
|
||||||
IIMAGE3D = 475, /* IIMAGE3D */
|
IMAGE3D = 475, /* IMAGE3D */
|
||||||
UIMAGE3D = 476, /* UIMAGE3D */
|
IIMAGE3D = 476, /* IIMAGE3D */
|
||||||
IMAGE2DRECT = 477, /* IMAGE2DRECT */
|
UIMAGE3D = 477, /* UIMAGE3D */
|
||||||
IIMAGE2DRECT = 478, /* IIMAGE2DRECT */
|
IMAGE2DRECT = 478, /* IMAGE2DRECT */
|
||||||
UIMAGE2DRECT = 479, /* UIMAGE2DRECT */
|
IIMAGE2DRECT = 479, /* IIMAGE2DRECT */
|
||||||
IMAGECUBE = 480, /* IMAGECUBE */
|
UIMAGE2DRECT = 480, /* UIMAGE2DRECT */
|
||||||
IIMAGECUBE = 481, /* IIMAGECUBE */
|
IMAGECUBE = 481, /* IMAGECUBE */
|
||||||
UIMAGECUBE = 482, /* UIMAGECUBE */
|
IIMAGECUBE = 482, /* IIMAGECUBE */
|
||||||
IMAGEBUFFER = 483, /* IMAGEBUFFER */
|
UIMAGECUBE = 483, /* UIMAGECUBE */
|
||||||
IIMAGEBUFFER = 484, /* IIMAGEBUFFER */
|
IMAGEBUFFER = 484, /* IMAGEBUFFER */
|
||||||
UIMAGEBUFFER = 485, /* UIMAGEBUFFER */
|
IIMAGEBUFFER = 485, /* IIMAGEBUFFER */
|
||||||
IMAGE1DARRAY = 486, /* IMAGE1DARRAY */
|
UIMAGEBUFFER = 486, /* UIMAGEBUFFER */
|
||||||
IIMAGE1DARRAY = 487, /* IIMAGE1DARRAY */
|
IMAGE1DARRAY = 487, /* IMAGE1DARRAY */
|
||||||
UIMAGE1DARRAY = 488, /* UIMAGE1DARRAY */
|
IIMAGE1DARRAY = 488, /* IIMAGE1DARRAY */
|
||||||
IMAGE2DARRAY = 489, /* IMAGE2DARRAY */
|
UIMAGE1DARRAY = 489, /* UIMAGE1DARRAY */
|
||||||
IIMAGE2DARRAY = 490, /* IIMAGE2DARRAY */
|
IMAGE2DARRAY = 490, /* IMAGE2DARRAY */
|
||||||
UIMAGE2DARRAY = 491, /* UIMAGE2DARRAY */
|
IIMAGE2DARRAY = 491, /* IIMAGE2DARRAY */
|
||||||
IMAGECUBEARRAY = 492, /* IMAGECUBEARRAY */
|
UIMAGE2DARRAY = 492, /* UIMAGE2DARRAY */
|
||||||
IIMAGECUBEARRAY = 493, /* IIMAGECUBEARRAY */
|
IMAGECUBEARRAY = 493, /* IMAGECUBEARRAY */
|
||||||
UIMAGECUBEARRAY = 494, /* UIMAGECUBEARRAY */
|
IIMAGECUBEARRAY = 494, /* IIMAGECUBEARRAY */
|
||||||
IMAGE2DMS = 495, /* IMAGE2DMS */
|
UIMAGECUBEARRAY = 495, /* UIMAGECUBEARRAY */
|
||||||
IIMAGE2DMS = 496, /* IIMAGE2DMS */
|
IMAGE2DMS = 496, /* IMAGE2DMS */
|
||||||
UIMAGE2DMS = 497, /* UIMAGE2DMS */
|
IIMAGE2DMS = 497, /* IIMAGE2DMS */
|
||||||
IMAGE2DMSARRAY = 498, /* IMAGE2DMSARRAY */
|
UIMAGE2DMS = 498, /* UIMAGE2DMS */
|
||||||
IIMAGE2DMSARRAY = 499, /* IIMAGE2DMSARRAY */
|
IMAGE2DMSARRAY = 499, /* IMAGE2DMSARRAY */
|
||||||
UIMAGE2DMSARRAY = 500, /* UIMAGE2DMSARRAY */
|
IIMAGE2DMSARRAY = 500, /* IIMAGE2DMSARRAY */
|
||||||
F16IMAGE1D = 501, /* F16IMAGE1D */
|
UIMAGE2DMSARRAY = 501, /* UIMAGE2DMSARRAY */
|
||||||
F16IMAGE2D = 502, /* F16IMAGE2D */
|
F16IMAGE1D = 502, /* F16IMAGE1D */
|
||||||
F16IMAGE3D = 503, /* F16IMAGE3D */
|
F16IMAGE2D = 503, /* F16IMAGE2D */
|
||||||
F16IMAGE2DRECT = 504, /* F16IMAGE2DRECT */
|
F16IMAGE3D = 504, /* F16IMAGE3D */
|
||||||
F16IMAGECUBE = 505, /* F16IMAGECUBE */
|
F16IMAGE2DRECT = 505, /* F16IMAGE2DRECT */
|
||||||
F16IMAGE1DARRAY = 506, /* F16IMAGE1DARRAY */
|
F16IMAGECUBE = 506, /* F16IMAGECUBE */
|
||||||
F16IMAGE2DARRAY = 507, /* F16IMAGE2DARRAY */
|
F16IMAGE1DARRAY = 507, /* F16IMAGE1DARRAY */
|
||||||
F16IMAGECUBEARRAY = 508, /* F16IMAGECUBEARRAY */
|
F16IMAGE2DARRAY = 508, /* F16IMAGE2DARRAY */
|
||||||
F16IMAGEBUFFER = 509, /* F16IMAGEBUFFER */
|
F16IMAGECUBEARRAY = 509, /* F16IMAGECUBEARRAY */
|
||||||
F16IMAGE2DMS = 510, /* F16IMAGE2DMS */
|
F16IMAGEBUFFER = 510, /* F16IMAGEBUFFER */
|
||||||
F16IMAGE2DMSARRAY = 511, /* F16IMAGE2DMSARRAY */
|
F16IMAGE2DMS = 511, /* F16IMAGE2DMS */
|
||||||
I64IMAGE1D = 512, /* I64IMAGE1D */
|
F16IMAGE2DMSARRAY = 512, /* F16IMAGE2DMSARRAY */
|
||||||
U64IMAGE1D = 513, /* U64IMAGE1D */
|
I64IMAGE1D = 513, /* I64IMAGE1D */
|
||||||
I64IMAGE2D = 514, /* I64IMAGE2D */
|
U64IMAGE1D = 514, /* U64IMAGE1D */
|
||||||
U64IMAGE2D = 515, /* U64IMAGE2D */
|
I64IMAGE2D = 515, /* I64IMAGE2D */
|
||||||
I64IMAGE3D = 516, /* I64IMAGE3D */
|
U64IMAGE2D = 516, /* U64IMAGE2D */
|
||||||
U64IMAGE3D = 517, /* U64IMAGE3D */
|
I64IMAGE3D = 517, /* I64IMAGE3D */
|
||||||
I64IMAGE2DRECT = 518, /* I64IMAGE2DRECT */
|
U64IMAGE3D = 518, /* U64IMAGE3D */
|
||||||
U64IMAGE2DRECT = 519, /* U64IMAGE2DRECT */
|
I64IMAGE2DRECT = 519, /* I64IMAGE2DRECT */
|
||||||
I64IMAGECUBE = 520, /* I64IMAGECUBE */
|
U64IMAGE2DRECT = 520, /* U64IMAGE2DRECT */
|
||||||
U64IMAGECUBE = 521, /* U64IMAGECUBE */
|
I64IMAGECUBE = 521, /* I64IMAGECUBE */
|
||||||
I64IMAGEBUFFER = 522, /* I64IMAGEBUFFER */
|
U64IMAGECUBE = 522, /* U64IMAGECUBE */
|
||||||
U64IMAGEBUFFER = 523, /* U64IMAGEBUFFER */
|
I64IMAGEBUFFER = 523, /* I64IMAGEBUFFER */
|
||||||
I64IMAGE1DARRAY = 524, /* I64IMAGE1DARRAY */
|
U64IMAGEBUFFER = 524, /* U64IMAGEBUFFER */
|
||||||
U64IMAGE1DARRAY = 525, /* U64IMAGE1DARRAY */
|
I64IMAGE1DARRAY = 525, /* I64IMAGE1DARRAY */
|
||||||
I64IMAGE2DARRAY = 526, /* I64IMAGE2DARRAY */
|
U64IMAGE1DARRAY = 526, /* U64IMAGE1DARRAY */
|
||||||
U64IMAGE2DARRAY = 527, /* U64IMAGE2DARRAY */
|
I64IMAGE2DARRAY = 527, /* I64IMAGE2DARRAY */
|
||||||
I64IMAGECUBEARRAY = 528, /* I64IMAGECUBEARRAY */
|
U64IMAGE2DARRAY = 528, /* U64IMAGE2DARRAY */
|
||||||
U64IMAGECUBEARRAY = 529, /* U64IMAGECUBEARRAY */
|
I64IMAGECUBEARRAY = 529, /* I64IMAGECUBEARRAY */
|
||||||
I64IMAGE2DMS = 530, /* I64IMAGE2DMS */
|
U64IMAGECUBEARRAY = 530, /* U64IMAGECUBEARRAY */
|
||||||
U64IMAGE2DMS = 531, /* U64IMAGE2DMS */
|
I64IMAGE2DMS = 531, /* I64IMAGE2DMS */
|
||||||
I64IMAGE2DMSARRAY = 532, /* I64IMAGE2DMSARRAY */
|
U64IMAGE2DMS = 532, /* U64IMAGE2DMS */
|
||||||
U64IMAGE2DMSARRAY = 533, /* U64IMAGE2DMSARRAY */
|
I64IMAGE2DMSARRAY = 533, /* I64IMAGE2DMSARRAY */
|
||||||
TEXTURECUBEARRAY = 534, /* TEXTURECUBEARRAY */
|
U64IMAGE2DMSARRAY = 534, /* U64IMAGE2DMSARRAY */
|
||||||
ITEXTURECUBEARRAY = 535, /* ITEXTURECUBEARRAY */
|
TEXTURECUBEARRAY = 535, /* TEXTURECUBEARRAY */
|
||||||
UTEXTURECUBEARRAY = 536, /* UTEXTURECUBEARRAY */
|
ITEXTURECUBEARRAY = 536, /* ITEXTURECUBEARRAY */
|
||||||
TEXTURE1D = 537, /* TEXTURE1D */
|
UTEXTURECUBEARRAY = 537, /* UTEXTURECUBEARRAY */
|
||||||
ITEXTURE1D = 538, /* ITEXTURE1D */
|
TEXTURE1D = 538, /* TEXTURE1D */
|
||||||
UTEXTURE1D = 539, /* UTEXTURE1D */
|
ITEXTURE1D = 539, /* ITEXTURE1D */
|
||||||
TEXTURE1DARRAY = 540, /* TEXTURE1DARRAY */
|
UTEXTURE1D = 540, /* UTEXTURE1D */
|
||||||
ITEXTURE1DARRAY = 541, /* ITEXTURE1DARRAY */
|
TEXTURE1DARRAY = 541, /* TEXTURE1DARRAY */
|
||||||
UTEXTURE1DARRAY = 542, /* UTEXTURE1DARRAY */
|
ITEXTURE1DARRAY = 542, /* ITEXTURE1DARRAY */
|
||||||
TEXTURE2DRECT = 543, /* TEXTURE2DRECT */
|
UTEXTURE1DARRAY = 543, /* UTEXTURE1DARRAY */
|
||||||
ITEXTURE2DRECT = 544, /* ITEXTURE2DRECT */
|
TEXTURE2DRECT = 544, /* TEXTURE2DRECT */
|
||||||
UTEXTURE2DRECT = 545, /* UTEXTURE2DRECT */
|
ITEXTURE2DRECT = 545, /* ITEXTURE2DRECT */
|
||||||
TEXTUREBUFFER = 546, /* TEXTUREBUFFER */
|
UTEXTURE2DRECT = 546, /* UTEXTURE2DRECT */
|
||||||
ITEXTUREBUFFER = 547, /* ITEXTUREBUFFER */
|
TEXTUREBUFFER = 547, /* TEXTUREBUFFER */
|
||||||
UTEXTUREBUFFER = 548, /* UTEXTUREBUFFER */
|
ITEXTUREBUFFER = 548, /* ITEXTUREBUFFER */
|
||||||
TEXTURE2DMS = 549, /* TEXTURE2DMS */
|
UTEXTUREBUFFER = 549, /* UTEXTUREBUFFER */
|
||||||
ITEXTURE2DMS = 550, /* ITEXTURE2DMS */
|
TEXTURE2DMS = 550, /* TEXTURE2DMS */
|
||||||
UTEXTURE2DMS = 551, /* UTEXTURE2DMS */
|
ITEXTURE2DMS = 551, /* ITEXTURE2DMS */
|
||||||
TEXTURE2DMSARRAY = 552, /* TEXTURE2DMSARRAY */
|
UTEXTURE2DMS = 552, /* UTEXTURE2DMS */
|
||||||
ITEXTURE2DMSARRAY = 553, /* ITEXTURE2DMSARRAY */
|
TEXTURE2DMSARRAY = 553, /* TEXTURE2DMSARRAY */
|
||||||
UTEXTURE2DMSARRAY = 554, /* UTEXTURE2DMSARRAY */
|
ITEXTURE2DMSARRAY = 554, /* ITEXTURE2DMSARRAY */
|
||||||
F16TEXTURE1D = 555, /* F16TEXTURE1D */
|
UTEXTURE2DMSARRAY = 555, /* UTEXTURE2DMSARRAY */
|
||||||
F16TEXTURE2D = 556, /* F16TEXTURE2D */
|
F16TEXTURE1D = 556, /* F16TEXTURE1D */
|
||||||
F16TEXTURE3D = 557, /* F16TEXTURE3D */
|
F16TEXTURE2D = 557, /* F16TEXTURE2D */
|
||||||
F16TEXTURE2DRECT = 558, /* F16TEXTURE2DRECT */
|
F16TEXTURE3D = 558, /* F16TEXTURE3D */
|
||||||
F16TEXTURECUBE = 559, /* F16TEXTURECUBE */
|
F16TEXTURE2DRECT = 559, /* F16TEXTURE2DRECT */
|
||||||
F16TEXTURE1DARRAY = 560, /* F16TEXTURE1DARRAY */
|
F16TEXTURECUBE = 560, /* F16TEXTURECUBE */
|
||||||
F16TEXTURE2DARRAY = 561, /* F16TEXTURE2DARRAY */
|
F16TEXTURE1DARRAY = 561, /* F16TEXTURE1DARRAY */
|
||||||
F16TEXTURECUBEARRAY = 562, /* F16TEXTURECUBEARRAY */
|
F16TEXTURE2DARRAY = 562, /* F16TEXTURE2DARRAY */
|
||||||
F16TEXTUREBUFFER = 563, /* F16TEXTUREBUFFER */
|
F16TEXTURECUBEARRAY = 563, /* F16TEXTURECUBEARRAY */
|
||||||
F16TEXTURE2DMS = 564, /* F16TEXTURE2DMS */
|
F16TEXTUREBUFFER = 564, /* F16TEXTUREBUFFER */
|
||||||
F16TEXTURE2DMSARRAY = 565, /* F16TEXTURE2DMSARRAY */
|
F16TEXTURE2DMS = 565, /* F16TEXTURE2DMS */
|
||||||
SUBPASSINPUT = 566, /* SUBPASSINPUT */
|
F16TEXTURE2DMSARRAY = 566, /* F16TEXTURE2DMSARRAY */
|
||||||
SUBPASSINPUTMS = 567, /* SUBPASSINPUTMS */
|
SUBPASSINPUT = 567, /* SUBPASSINPUT */
|
||||||
ISUBPASSINPUT = 568, /* ISUBPASSINPUT */
|
SUBPASSINPUTMS = 568, /* SUBPASSINPUTMS */
|
||||||
ISUBPASSINPUTMS = 569, /* ISUBPASSINPUTMS */
|
ISUBPASSINPUT = 569, /* ISUBPASSINPUT */
|
||||||
USUBPASSINPUT = 570, /* USUBPASSINPUT */
|
ISUBPASSINPUTMS = 570, /* ISUBPASSINPUTMS */
|
||||||
USUBPASSINPUTMS = 571, /* USUBPASSINPUTMS */
|
USUBPASSINPUT = 571, /* USUBPASSINPUT */
|
||||||
F16SUBPASSINPUT = 572, /* F16SUBPASSINPUT */
|
USUBPASSINPUTMS = 572, /* USUBPASSINPUTMS */
|
||||||
F16SUBPASSINPUTMS = 573, /* F16SUBPASSINPUTMS */
|
F16SUBPASSINPUT = 573, /* F16SUBPASSINPUT */
|
||||||
SPIRV_INSTRUCTION = 574, /* SPIRV_INSTRUCTION */
|
F16SUBPASSINPUTMS = 574, /* F16SUBPASSINPUTMS */
|
||||||
SPIRV_EXECUTION_MODE = 575, /* SPIRV_EXECUTION_MODE */
|
SPIRV_INSTRUCTION = 575, /* SPIRV_INSTRUCTION */
|
||||||
SPIRV_EXECUTION_MODE_ID = 576, /* SPIRV_EXECUTION_MODE_ID */
|
SPIRV_EXECUTION_MODE = 576, /* SPIRV_EXECUTION_MODE */
|
||||||
SPIRV_DECORATE = 577, /* SPIRV_DECORATE */
|
SPIRV_EXECUTION_MODE_ID = 577, /* SPIRV_EXECUTION_MODE_ID */
|
||||||
SPIRV_DECORATE_ID = 578, /* SPIRV_DECORATE_ID */
|
SPIRV_DECORATE = 578, /* SPIRV_DECORATE */
|
||||||
SPIRV_DECORATE_STRING = 579, /* SPIRV_DECORATE_STRING */
|
SPIRV_DECORATE_ID = 579, /* SPIRV_DECORATE_ID */
|
||||||
SPIRV_TYPE = 580, /* SPIRV_TYPE */
|
SPIRV_DECORATE_STRING = 580, /* SPIRV_DECORATE_STRING */
|
||||||
SPIRV_STORAGE_CLASS = 581, /* SPIRV_STORAGE_CLASS */
|
SPIRV_TYPE = 581, /* SPIRV_TYPE */
|
||||||
SPIRV_BY_REFERENCE = 582, /* SPIRV_BY_REFERENCE */
|
SPIRV_STORAGE_CLASS = 582, /* SPIRV_STORAGE_CLASS */
|
||||||
SPIRV_LITERAL = 583, /* SPIRV_LITERAL */
|
SPIRV_BY_REFERENCE = 583, /* SPIRV_BY_REFERENCE */
|
||||||
ATTACHMENTEXT = 584, /* ATTACHMENTEXT */
|
SPIRV_LITERAL = 584, /* SPIRV_LITERAL */
|
||||||
IATTACHMENTEXT = 585, /* IATTACHMENTEXT */
|
ATTACHMENTEXT = 585, /* ATTACHMENTEXT */
|
||||||
UATTACHMENTEXT = 586, /* UATTACHMENTEXT */
|
IATTACHMENTEXT = 586, /* IATTACHMENTEXT */
|
||||||
LEFT_OP = 587, /* LEFT_OP */
|
UATTACHMENTEXT = 587, /* UATTACHMENTEXT */
|
||||||
RIGHT_OP = 588, /* RIGHT_OP */
|
LEFT_OP = 588, /* LEFT_OP */
|
||||||
INC_OP = 589, /* INC_OP */
|
RIGHT_OP = 589, /* RIGHT_OP */
|
||||||
DEC_OP = 590, /* DEC_OP */
|
INC_OP = 590, /* INC_OP */
|
||||||
LE_OP = 591, /* LE_OP */
|
DEC_OP = 591, /* DEC_OP */
|
||||||
GE_OP = 592, /* GE_OP */
|
LE_OP = 592, /* LE_OP */
|
||||||
EQ_OP = 593, /* EQ_OP */
|
GE_OP = 593, /* GE_OP */
|
||||||
NE_OP = 594, /* NE_OP */
|
EQ_OP = 594, /* EQ_OP */
|
||||||
AND_OP = 595, /* AND_OP */
|
NE_OP = 595, /* NE_OP */
|
||||||
OR_OP = 596, /* OR_OP */
|
AND_OP = 596, /* AND_OP */
|
||||||
XOR_OP = 597, /* XOR_OP */
|
OR_OP = 597, /* OR_OP */
|
||||||
MUL_ASSIGN = 598, /* MUL_ASSIGN */
|
XOR_OP = 598, /* XOR_OP */
|
||||||
DIV_ASSIGN = 599, /* DIV_ASSIGN */
|
MUL_ASSIGN = 599, /* MUL_ASSIGN */
|
||||||
ADD_ASSIGN = 600, /* ADD_ASSIGN */
|
DIV_ASSIGN = 600, /* DIV_ASSIGN */
|
||||||
MOD_ASSIGN = 601, /* MOD_ASSIGN */
|
ADD_ASSIGN = 601, /* ADD_ASSIGN */
|
||||||
LEFT_ASSIGN = 602, /* LEFT_ASSIGN */
|
MOD_ASSIGN = 602, /* MOD_ASSIGN */
|
||||||
RIGHT_ASSIGN = 603, /* RIGHT_ASSIGN */
|
LEFT_ASSIGN = 603, /* LEFT_ASSIGN */
|
||||||
AND_ASSIGN = 604, /* AND_ASSIGN */
|
RIGHT_ASSIGN = 604, /* RIGHT_ASSIGN */
|
||||||
XOR_ASSIGN = 605, /* XOR_ASSIGN */
|
AND_ASSIGN = 605, /* AND_ASSIGN */
|
||||||
OR_ASSIGN = 606, /* OR_ASSIGN */
|
XOR_ASSIGN = 606, /* XOR_ASSIGN */
|
||||||
SUB_ASSIGN = 607, /* SUB_ASSIGN */
|
OR_ASSIGN = 607, /* OR_ASSIGN */
|
||||||
STRING_LITERAL = 608, /* STRING_LITERAL */
|
SUB_ASSIGN = 608, /* SUB_ASSIGN */
|
||||||
LEFT_PAREN = 609, /* LEFT_PAREN */
|
STRING_LITERAL = 609, /* STRING_LITERAL */
|
||||||
RIGHT_PAREN = 610, /* RIGHT_PAREN */
|
LEFT_PAREN = 610, /* LEFT_PAREN */
|
||||||
LEFT_BRACKET = 611, /* LEFT_BRACKET */
|
RIGHT_PAREN = 611, /* RIGHT_PAREN */
|
||||||
RIGHT_BRACKET = 612, /* RIGHT_BRACKET */
|
LEFT_BRACKET = 612, /* LEFT_BRACKET */
|
||||||
LEFT_BRACE = 613, /* LEFT_BRACE */
|
RIGHT_BRACKET = 613, /* RIGHT_BRACKET */
|
||||||
RIGHT_BRACE = 614, /* RIGHT_BRACE */
|
LEFT_BRACE = 614, /* LEFT_BRACE */
|
||||||
DOT = 615, /* DOT */
|
RIGHT_BRACE = 615, /* RIGHT_BRACE */
|
||||||
COMMA = 616, /* COMMA */
|
DOT = 616, /* DOT */
|
||||||
COLON = 617, /* COLON */
|
COMMA = 617, /* COMMA */
|
||||||
EQUAL = 618, /* EQUAL */
|
COLON = 618, /* COLON */
|
||||||
SEMICOLON = 619, /* SEMICOLON */
|
EQUAL = 619, /* EQUAL */
|
||||||
BANG = 620, /* BANG */
|
SEMICOLON = 620, /* SEMICOLON */
|
||||||
DASH = 621, /* DASH */
|
BANG = 621, /* BANG */
|
||||||
TILDE = 622, /* TILDE */
|
DASH = 622, /* DASH */
|
||||||
PLUS = 623, /* PLUS */
|
TILDE = 623, /* TILDE */
|
||||||
STAR = 624, /* STAR */
|
PLUS = 624, /* PLUS */
|
||||||
SLASH = 625, /* SLASH */
|
STAR = 625, /* STAR */
|
||||||
PERCENT = 626, /* PERCENT */
|
SLASH = 626, /* SLASH */
|
||||||
LEFT_ANGLE = 627, /* LEFT_ANGLE */
|
PERCENT = 627, /* PERCENT */
|
||||||
RIGHT_ANGLE = 628, /* RIGHT_ANGLE */
|
LEFT_ANGLE = 628, /* LEFT_ANGLE */
|
||||||
VERTICAL_BAR = 629, /* VERTICAL_BAR */
|
RIGHT_ANGLE = 629, /* RIGHT_ANGLE */
|
||||||
CARET = 630, /* CARET */
|
VERTICAL_BAR = 630, /* VERTICAL_BAR */
|
||||||
AMPERSAND = 631, /* AMPERSAND */
|
CARET = 631, /* CARET */
|
||||||
QUESTION = 632, /* QUESTION */
|
AMPERSAND = 632, /* AMPERSAND */
|
||||||
INVARIANT = 633, /* INVARIANT */
|
QUESTION = 633, /* QUESTION */
|
||||||
HIGH_PRECISION = 634, /* HIGH_PRECISION */
|
INVARIANT = 634, /* INVARIANT */
|
||||||
MEDIUM_PRECISION = 635, /* MEDIUM_PRECISION */
|
HIGH_PRECISION = 635, /* HIGH_PRECISION */
|
||||||
LOW_PRECISION = 636, /* LOW_PRECISION */
|
MEDIUM_PRECISION = 636, /* MEDIUM_PRECISION */
|
||||||
PRECISION = 637, /* PRECISION */
|
LOW_PRECISION = 637, /* LOW_PRECISION */
|
||||||
PACKED = 638, /* PACKED */
|
PRECISION = 638, /* PRECISION */
|
||||||
RESOURCE = 639, /* RESOURCE */
|
PACKED = 639, /* PACKED */
|
||||||
SUPERP = 640, /* SUPERP */
|
RESOURCE = 640, /* RESOURCE */
|
||||||
FLOATCONSTANT = 641, /* FLOATCONSTANT */
|
SUPERP = 641, /* SUPERP */
|
||||||
INTCONSTANT = 642, /* INTCONSTANT */
|
FLOATCONSTANT = 642, /* FLOATCONSTANT */
|
||||||
UINTCONSTANT = 643, /* UINTCONSTANT */
|
INTCONSTANT = 643, /* INTCONSTANT */
|
||||||
BOOLCONSTANT = 644, /* BOOLCONSTANT */
|
UINTCONSTANT = 644, /* UINTCONSTANT */
|
||||||
IDENTIFIER = 645, /* IDENTIFIER */
|
BOOLCONSTANT = 645, /* BOOLCONSTANT */
|
||||||
TYPE_NAME = 646, /* TYPE_NAME */
|
IDENTIFIER = 646, /* IDENTIFIER */
|
||||||
CENTROID = 647, /* CENTROID */
|
TYPE_NAME = 647, /* TYPE_NAME */
|
||||||
IN = 648, /* IN */
|
CENTROID = 648, /* CENTROID */
|
||||||
OUT = 649, /* OUT */
|
IN = 649, /* IN */
|
||||||
INOUT = 650, /* INOUT */
|
OUT = 650, /* OUT */
|
||||||
STRUCT = 651, /* STRUCT */
|
INOUT = 651, /* INOUT */
|
||||||
VOID = 652, /* VOID */
|
STRUCT = 652, /* STRUCT */
|
||||||
WHILE = 653, /* WHILE */
|
VOID = 653, /* VOID */
|
||||||
BREAK = 654, /* BREAK */
|
WHILE = 654, /* WHILE */
|
||||||
CONTINUE = 655, /* CONTINUE */
|
BREAK = 655, /* BREAK */
|
||||||
DO = 656, /* DO */
|
CONTINUE = 656, /* CONTINUE */
|
||||||
ELSE = 657, /* ELSE */
|
DO = 657, /* DO */
|
||||||
FOR = 658, /* FOR */
|
ELSE = 658, /* ELSE */
|
||||||
IF = 659, /* IF */
|
FOR = 659, /* FOR */
|
||||||
DISCARD = 660, /* DISCARD */
|
IF = 660, /* IF */
|
||||||
RETURN = 661, /* RETURN */
|
DISCARD = 661, /* DISCARD */
|
||||||
SWITCH = 662, /* SWITCH */
|
RETURN = 662, /* RETURN */
|
||||||
CASE = 663, /* CASE */
|
SWITCH = 663, /* SWITCH */
|
||||||
DEFAULT = 664, /* DEFAULT */
|
CASE = 664, /* CASE */
|
||||||
TERMINATE_INVOCATION = 665, /* TERMINATE_INVOCATION */
|
DEFAULT = 665, /* DEFAULT */
|
||||||
TERMINATE_RAY = 666, /* TERMINATE_RAY */
|
TERMINATE_INVOCATION = 666, /* TERMINATE_INVOCATION */
|
||||||
IGNORE_INTERSECTION = 667, /* IGNORE_INTERSECTION */
|
TERMINATE_RAY = 667, /* TERMINATE_RAY */
|
||||||
UNIFORM = 668, /* UNIFORM */
|
IGNORE_INTERSECTION = 668, /* IGNORE_INTERSECTION */
|
||||||
SHARED = 669, /* SHARED */
|
UNIFORM = 669, /* UNIFORM */
|
||||||
BUFFER = 670, /* BUFFER */
|
SHARED = 670, /* SHARED */
|
||||||
TILEIMAGEEXT = 671, /* TILEIMAGEEXT */
|
BUFFER = 671, /* BUFFER */
|
||||||
FLAT = 672, /* FLAT */
|
TILEIMAGEEXT = 672, /* TILEIMAGEEXT */
|
||||||
SMOOTH = 673, /* SMOOTH */
|
FLAT = 673, /* FLAT */
|
||||||
LAYOUT = 674, /* LAYOUT */
|
SMOOTH = 674, /* SMOOTH */
|
||||||
DOUBLECONSTANT = 675, /* DOUBLECONSTANT */
|
LAYOUT = 675, /* LAYOUT */
|
||||||
INT16CONSTANT = 676, /* INT16CONSTANT */
|
DOUBLECONSTANT = 676, /* DOUBLECONSTANT */
|
||||||
UINT16CONSTANT = 677, /* UINT16CONSTANT */
|
INT16CONSTANT = 677, /* INT16CONSTANT */
|
||||||
FLOAT16CONSTANT = 678, /* FLOAT16CONSTANT */
|
UINT16CONSTANT = 678, /* UINT16CONSTANT */
|
||||||
INT32CONSTANT = 679, /* INT32CONSTANT */
|
FLOAT16CONSTANT = 679, /* FLOAT16CONSTANT */
|
||||||
UINT32CONSTANT = 680, /* UINT32CONSTANT */
|
INT32CONSTANT = 680, /* INT32CONSTANT */
|
||||||
INT64CONSTANT = 681, /* INT64CONSTANT */
|
UINT32CONSTANT = 681, /* UINT32CONSTANT */
|
||||||
UINT64CONSTANT = 682, /* UINT64CONSTANT */
|
INT64CONSTANT = 682, /* INT64CONSTANT */
|
||||||
SUBROUTINE = 683, /* SUBROUTINE */
|
UINT64CONSTANT = 683, /* UINT64CONSTANT */
|
||||||
DEMOTE = 684, /* DEMOTE */
|
SUBROUTINE = 684, /* SUBROUTINE */
|
||||||
PAYLOADNV = 685, /* PAYLOADNV */
|
DEMOTE = 685, /* DEMOTE */
|
||||||
PAYLOADINNV = 686, /* PAYLOADINNV */
|
PAYLOADNV = 686, /* PAYLOADNV */
|
||||||
HITATTRNV = 687, /* HITATTRNV */
|
PAYLOADINNV = 687, /* PAYLOADINNV */
|
||||||
CALLDATANV = 688, /* CALLDATANV */
|
HITATTRNV = 688, /* HITATTRNV */
|
||||||
CALLDATAINNV = 689, /* CALLDATAINNV */
|
CALLDATANV = 689, /* CALLDATANV */
|
||||||
PAYLOADEXT = 690, /* PAYLOADEXT */
|
CALLDATAINNV = 690, /* CALLDATAINNV */
|
||||||
PAYLOADINEXT = 691, /* PAYLOADINEXT */
|
PAYLOADEXT = 691, /* PAYLOADEXT */
|
||||||
HITATTREXT = 692, /* HITATTREXT */
|
PAYLOADINEXT = 692, /* PAYLOADINEXT */
|
||||||
CALLDATAEXT = 693, /* CALLDATAEXT */
|
HITATTREXT = 693, /* HITATTREXT */
|
||||||
CALLDATAINEXT = 694, /* CALLDATAINEXT */
|
CALLDATAEXT = 694, /* CALLDATAEXT */
|
||||||
PATCH = 695, /* PATCH */
|
CALLDATAINEXT = 695, /* CALLDATAINEXT */
|
||||||
SAMPLE = 696, /* SAMPLE */
|
PATCH = 696, /* PATCH */
|
||||||
NONUNIFORM = 697, /* NONUNIFORM */
|
SAMPLE = 697, /* SAMPLE */
|
||||||
COHERENT = 698, /* COHERENT */
|
NONUNIFORM = 698, /* NONUNIFORM */
|
||||||
VOLATILE = 699, /* VOLATILE */
|
COHERENT = 699, /* COHERENT */
|
||||||
RESTRICT = 700, /* RESTRICT */
|
VOLATILE = 700, /* VOLATILE */
|
||||||
READONLY = 701, /* READONLY */
|
RESTRICT = 701, /* RESTRICT */
|
||||||
WRITEONLY = 702, /* WRITEONLY */
|
READONLY = 702, /* READONLY */
|
||||||
DEVICECOHERENT = 703, /* DEVICECOHERENT */
|
WRITEONLY = 703, /* WRITEONLY */
|
||||||
QUEUEFAMILYCOHERENT = 704, /* QUEUEFAMILYCOHERENT */
|
DEVICECOHERENT = 704, /* DEVICECOHERENT */
|
||||||
WORKGROUPCOHERENT = 705, /* WORKGROUPCOHERENT */
|
QUEUEFAMILYCOHERENT = 705, /* QUEUEFAMILYCOHERENT */
|
||||||
SUBGROUPCOHERENT = 706, /* SUBGROUPCOHERENT */
|
WORKGROUPCOHERENT = 706, /* WORKGROUPCOHERENT */
|
||||||
NONPRIVATE = 707, /* NONPRIVATE */
|
SUBGROUPCOHERENT = 707, /* SUBGROUPCOHERENT */
|
||||||
SHADERCALLCOHERENT = 708, /* SHADERCALLCOHERENT */
|
NONPRIVATE = 708, /* NONPRIVATE */
|
||||||
NOPERSPECTIVE = 709, /* NOPERSPECTIVE */
|
SHADERCALLCOHERENT = 709, /* SHADERCALLCOHERENT */
|
||||||
EXPLICITINTERPAMD = 710, /* EXPLICITINTERPAMD */
|
NOPERSPECTIVE = 710, /* NOPERSPECTIVE */
|
||||||
PERVERTEXEXT = 711, /* PERVERTEXEXT */
|
EXPLICITINTERPAMD = 711, /* EXPLICITINTERPAMD */
|
||||||
PERVERTEXNV = 712, /* PERVERTEXNV */
|
PERVERTEXEXT = 712, /* PERVERTEXEXT */
|
||||||
PERPRIMITIVENV = 713, /* PERPRIMITIVENV */
|
PERVERTEXNV = 713, /* PERVERTEXNV */
|
||||||
PERVIEWNV = 714, /* PERVIEWNV */
|
PERPRIMITIVENV = 714, /* PERPRIMITIVENV */
|
||||||
PERTASKNV = 715, /* PERTASKNV */
|
PERVIEWNV = 715, /* PERVIEWNV */
|
||||||
PERPRIMITIVEEXT = 716, /* PERPRIMITIVEEXT */
|
PERTASKNV = 716, /* PERTASKNV */
|
||||||
TASKPAYLOADWORKGROUPEXT = 717, /* TASKPAYLOADWORKGROUPEXT */
|
PERPRIMITIVEEXT = 717, /* PERPRIMITIVEEXT */
|
||||||
PRECISE = 718 /* PRECISE */
|
TASKPAYLOADWORKGROUPEXT = 718, /* TASKPAYLOADWORKGROUPEXT */
|
||||||
|
PRECISE = 719 /* PRECISE */
|
||||||
};
|
};
|
||||||
typedef enum yytokentype yytoken_kind_t;
|
typedef enum yytokentype yytoken_kind_t;
|
||||||
#endif
|
#endif
|
||||||
@ -559,10 +560,10 @@ union YYSTYPE
|
|||||||
glslang::TArraySizes* arraySizes;
|
glslang::TArraySizes* arraySizes;
|
||||||
glslang::TIdentifierList* identifierList;
|
glslang::TIdentifierList* identifierList;
|
||||||
};
|
};
|
||||||
glslang::TArraySizes* typeParameters;
|
glslang::TTypeParameters* typeParameters;
|
||||||
} interm;
|
} interm;
|
||||||
|
|
||||||
#line 566 "MachineIndependent/glslang_tab.cpp.h"
|
#line 567 "MachineIndependent/glslang_tab.cpp.h"
|
||||||
|
|
||||||
};
|
};
|
||||||
typedef union YYSTYPE YYSTYPE;
|
typedef union YYSTYPE YYSTYPE;
|
||||||
@ -572,6 +573,8 @@ typedef union YYSTYPE YYSTYPE;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int yyparse (glslang::TParseContext* pParseContext);
|
int yyparse (glslang::TParseContext* pParseContext);
|
||||||
|
|
||||||
|
|
||||||
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
|
#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */
|
||||||
|
@ -809,7 +809,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||||||
case EOpConstructStruct: out.debug << "Construct structure"; break;
|
case EOpConstructStruct: out.debug << "Construct structure"; break;
|
||||||
case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break;
|
case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break;
|
||||||
case EOpConstructReference: out.debug << "Construct reference"; break;
|
case EOpConstructReference: out.debug << "Construct reference"; break;
|
||||||
case EOpConstructCooperativeMatrix: out.debug << "Construct cooperative matrix"; break;
|
case EOpConstructCooperativeMatrixNV: out.debug << "Construct cooperative matrix NV"; break;
|
||||||
|
case EOpConstructCooperativeMatrixKHR: out.debug << "Construct cooperative matrix KHR"; break;
|
||||||
case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break;
|
case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break;
|
||||||
|
|
||||||
case EOpLessThan: out.debug << "Compare Less Than"; break;
|
case EOpLessThan: out.debug << "Compare Less Than"; break;
|
||||||
@ -1103,9 +1104,12 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node
|
|||||||
case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
|
case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break;
|
||||||
case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break;
|
case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break;
|
||||||
|
|
||||||
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break;
|
case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix KHR"; break;
|
||||||
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break;
|
case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix KHR"; break;
|
||||||
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break;
|
case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices KHR"; break;
|
||||||
|
case EOpCooperativeMatrixLoadNV: out.debug << "Load cooperative matrix NV"; break;
|
||||||
|
case EOpCooperativeMatrixStoreNV: out.debug << "Store cooperative matrix NV"; break;
|
||||||
|
case EOpCooperativeMatrixMulAddNV: out.debug << "MulAdd cooperative matrices NV"; break;
|
||||||
|
|
||||||
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
|
case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break;
|
||||||
case EOpDebugPrintf: out.debug << "Debug printf"; break;
|
case EOpDebugPrintf: out.debug << "Debug printf"; break;
|
||||||
|
@ -162,8 +162,9 @@ public:
|
|||||||
virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
|
virtual void fcoopmatCheckNV(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
virtual void intcoopmatCheck(const TSourceLoc&, const char *op, bool builtIn = false);
|
virtual void intcoopmatCheckNV(const TSourceLoc&, const char *op, bool builtIn = false);
|
||||||
|
virtual void coopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false);
|
||||||
bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; }
|
bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; }
|
||||||
bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
|
bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; }
|
||||||
bool isForwardCompatible() const { return forwardCompatible; }
|
bool isForwardCompatible() const { return forwardCompatible; }
|
||||||
|
@ -345,6 +345,12 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"spv.conversion.frag",
|
"spv.conversion.frag",
|
||||||
"spv.coopmat.comp",
|
"spv.coopmat.comp",
|
||||||
"spv.coopmat_Error.comp",
|
"spv.coopmat_Error.comp",
|
||||||
|
"spv.coopmatKHR.comp",
|
||||||
|
"spv.coopmatKHR_arithmetic.comp",
|
||||||
|
"spv.coopmatKHR_arithmeticError.comp",
|
||||||
|
"spv.coopmatKHR_Error.comp",
|
||||||
|
"spv.coopmatKHR_constructor.comp",
|
||||||
|
"spv.coopmatKHR_constructorError.comp",
|
||||||
"spv.dataOut.frag",
|
"spv.dataOut.frag",
|
||||||
"spv.dataOutIndirect.frag",
|
"spv.dataOutIndirect.frag",
|
||||||
"spv.dataOutIndirect.vert",
|
"spv.dataOutIndirect.vert",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user