forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Diag] Diagnose missing numthreads in compute shaders
Currently we error out in validation if a compute shader doesn't have a numthreads attribute: ``` <source>:2: error: Declared Thread Group X size 2833376888 outside valid range [1..1024]. <source>:2: error: Declared Thread Group Y size 21956 outside valid range [1..1024]. <source>:2: error: Declared Thread Group Z size 2833381336 outside valid range [1..64]. <source>:2: error: Declared Thread Group Count 3863291136 (X*Y*Z) is beyond the valid maximum of 1024. ``` Instead, diagnose this in Sema like we do for mesh and amplitude shaders Reviewers: damyanp, bob80905, pow2clk, llvm-beanz Reviewed By: llvm-beanz, bob80905, damyanp, pow2clk Pull Request: microsoft#6021
- Loading branch information
Showing
5 changed files
with
14 additions
and
15 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
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
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV_Lit/attribute.numthreads.missing.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// RUN: not %dxc -T cs_6_0 -E main -fcgl %s -spirv 2>&1 | FileCheck %s | ||
|
||
// CHECK: 4:6: error: thread group size [numthreads(x,y,z)] is missing from the entry-point function | ||
// CHECK: 4:6: error: compute entry point must have the numthreads attribute | ||
void main() {} |
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