-
Notifications
You must be signed in to change notification settings - Fork 722
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow node input record to be a class (#6123)
Node input records may be a struct or a class, but CodeGen failed to correctly handle the case when a class was used. This change fixes the error, and adds a test case. Fixes #6119 --------- Co-authored-by: Tim Corringham <[email protected]>
- Loading branch information
1 parent
f94fe82
commit 28fb8fb
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tools/clang/test/SemaHLSL/hlsl/workgraph/class_input_record.hlsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// RUN: %dxc -T lib_6_8 -verify %s | ||
// ================================================================== | ||
// Broadcasting launch node with class input record | ||
// ================================================================== | ||
|
||
// expected-no-diagnostics | ||
|
||
class ClassInputRecord | ||
{ | ||
uint a; | ||
}; | ||
|
||
[Shader("node")] | ||
[NodeLaunch("broadcasting")] | ||
[NodeDispatchGrid(2,3,2)] | ||
[NumThreads(1024,1,1)] | ||
void node01(DispatchNodeInputRecord<ClassInputRecord> input) | ||
{ } |