forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make invalid launch type return empty str instead of invalid, check i…
…f shaderkind is node before setting launchtype
- Loading branch information
Showing
2 changed files
with
46 additions
and
3 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
39 changes: 39 additions & 0 deletions
39
tools/clang/test/HLSLFileCheck/dxil/intrinsics/launch_types.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,39 @@ | ||
// RUN: %dxc -T lib_6_3 -D e1 %s | FileCheck -check-prefix=CHECK_ENTRY1 %s | ||
// RUN: %dxc -T lib_6_3 -D e2 %s | ||
// RUN: %dxc -T lib_6_3 -D e3 %s | FileCheck -check-prefix=CHECK_ENTRY3 %s | ||
|
||
|
||
#ifdef e1 | ||
// CHECK_ENTRY1: error: Invalid system value semantic 'SV_DispatchThreadID' for launchtype 'Thread' | ||
// CHECK_ENTRY1: error: Invalid system value semantic 'SV_GroupID' for launchtype 'Thread' | ||
// CHECK_ENTRY1: error: Invalid system value semantic 'SV_GroupThreadID' for launchtype 'Thread' | ||
// CHECK_ENTRY1: error: Invalid system value semantic 'SV_GroupIndex' for launchtype 'Thread' | ||
[shader("node")] | ||
[NodeLaunch("thread")] | ||
[numthreads(1,1,1)] | ||
void entry( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex ) | ||
{ | ||
} | ||
#endif | ||
|
||
#ifdef e2 | ||
// no expected errors | ||
[shader("node")] | ||
[NodeDispatchGrid(1,1,1)] | ||
[NodeLaunch("broadcasting")] | ||
[numthreads(1,1,1)] | ||
void entry2( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex ) | ||
{ | ||
} | ||
#endif | ||
|
||
#ifdef e3 | ||
// CHECK_ENTRY3: error: Invalid system value semantic 'SV_DispatchThreadID' for launchtype 'Coalescing' | ||
// CHECK_ENTRY3: error: Invalid system value semantic 'SV_GroupID' for launchtype 'Coalescing' | ||
[shader("node")] | ||
[NodeLaunch("coalescing")] | ||
[numthreads(1,1,1)] | ||
void entry3( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex ) | ||
{ | ||
} | ||
#endif |