-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sema][HLSL] Fix naming of anyhit/closesthit shaders
Also test all shader types and be a bit more careful to make shaders reasonably valid in these tests. Differential Revision: https://reviews.llvm.org/D158820
- Loading branch information
Showing
4 changed files
with
38 additions
and
12 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
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,24 @@ | ||
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -finclude-default-header -o - %s -verify | ||
|
||
// expected-no-diagnostics | ||
|
||
[shader("pixel")] void pixel() {} | ||
[shader("vertex")] void vertex() {} | ||
[shader("raygeneration")] void raygeneration() {} | ||
[shader("intersection")] void intersection() {} | ||
|
||
[numthreads(1,1,1)][shader("compute")] void compute() {} | ||
[numthreads(1,1,1)][shader("mesh")] void mesh() {} | ||
|
||
// Note: the rest of these have additional constraints that aren't implemented | ||
// yet, so here we just declare them to make sure the spelling works and | ||
// whatnot. | ||
[shader("geometry")] void geometry(); | ||
[shader("hull")] void hull(); | ||
[shader("domain")] void domain(); | ||
[shader("callable")] void callable(); | ||
[shader("closesthit")] void closesthit(); | ||
[shader("anyhit")] void anyhit(); | ||
[shader("miss")] void miss(); | ||
|
||
[numthreads(1,1,1)][shader("amplification")] void amplification(); |