-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow a enum case to reference a previously defined value. (#4768)
- Loading branch information
Showing
3 changed files
with
20 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj | ||
|
||
// Test that a enum case can reference a previously defined case. | ||
|
||
enum Check { V = 1, X = V+2 }; | ||
|
||
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer | ||
RWStructuredBuffer<int> outputBuffer; | ||
|
||
[numthreads(1, 1, 1)] | ||
void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) | ||
{ | ||
// CHECK: 3 | ||
outputBuffer[0] = Check.X; | ||
} |