Fix issues of the interaction between cooperative_matrix and spirv_intrinsics
coopmat<> type definition allows type parameters. To make it accept types defined by spirv_type directive, we add spirvType info to the type parameters. This change is to support this case. And a test is added to show the missing usage.
This commit is contained in:
parent
10ee92feb0
commit
022aea431c
7 changed files with 1136 additions and 1022 deletions
|
|
@ -7413,6 +7413,7 @@ void TParseContext::coopMatTypeParametersCheck(const TSourceLoc& loc, const TPub
|
|||
case EbtUint:
|
||||
case EbtUint8:
|
||||
case EbtUint16:
|
||||
case EbtSpirvType:
|
||||
break;
|
||||
default:
|
||||
error(loc, "coopmat invalid basic type", TType::getBasicString(publicType.typeParameters->basicType), "");
|
||||
|
|
@ -7795,7 +7796,8 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
|||
error(loc, "unexpected number type parameters", identifier.c_str(), "");
|
||||
}
|
||||
if (publicType.typeParameters) {
|
||||
if (!isTypeFloat(publicType.typeParameters->basicType) && !isTypeInt(publicType.typeParameters->basicType)) {
|
||||
if (!isTypeFloat(publicType.typeParameters->basicType) &&
|
||||
!isTypeInt(publicType.typeParameters->basicType) && publicType.typeParameters->basicType != EbtSpirvType) {
|
||||
error(loc, "expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type", identifier.c_str(), "");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue