Skip to content

Commit

Permalink
Correct assert for number of template params allowed for a texture
Browse files Browse the repository at this point in the history
I forgot about 2DMS
  • Loading branch information
pow2clk committed Feb 10, 2025
1 parent 04f476a commit 9da777b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/clang/lib/Sema/SemaHLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14185,9 +14185,9 @@ bool Sema::DiagnoseHLSLDecl(Declarator &D, DeclContext *DC, Expr *BitWidth,
basicKind == AR_OBJECT_RWBUFFER)
if (const TemplateSpecializationType *pTemplate =
qt->getAs<TemplateSpecializationType>()) {
DXASSERT(pTemplate->getNumArgs() < 2,
"Typed Buffer template should have 0 or 1 parameter");
if (pTemplate->getNumArgs() == 1) {
DXASSERT(pTemplate->getNumArgs() < 3,
"Typed Buffer template should from 0 - 2 parameters");
if (pTemplate->getNumArgs() > 0) {
const QualType TempQT = pTemplate->getArg(0).getAsType();
const Type *EltQT = TempQT.getTypePtr();
// Check vectors for being too large.
Expand Down

0 comments on commit 9da777b

Please sign in to comment.