Skip to content

Commit

Permalink
change data type to ull, add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
bob80905 committed Dec 2, 2023
1 parent 8a37a92 commit 6e251b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/clang/lib/Sema/SemaHLSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13134,7 +13134,7 @@ void Sema::DiagnoseGloballyCoherentMismatch(const Expr *SrcExpr,

void ValidateDispatchGridValues(DiagnosticsEngine &Diags,
const AttributeList &A, Attr *declAttr) {
unsigned x = 1, y = 1, z = 1;
unsigned long long int x = 1, y = 1, z = 1;
if (HLSLNodeDispatchGridAttr *pA =
dyn_cast<HLSLNodeDispatchGridAttr>(declAttr)) {
x = pA->getX();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// RUN: %dxc -T lib_6_8 -verify %s

[Shader("node")]
[NodeLaunch("broadcasting")]
[NodeDispatchGrid(65535, 65535, 65535)] // expected-error {{'NodeDispatchGrid' X * Y * Z product may not exceed 16,777,215 (2^24-1)}}
[NumThreads(1, 1, 1)]
void myNode() { }

0 comments on commit 6e251b0

Please sign in to comment.