-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to make sure WaveMatrix is not allowed in shader model 6.7 a…
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
tools/clang/test/HLSLFileCheck/hlsl/objects/WaveMatrix/WaveMatrix67.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,25 @@ | ||
// RUN: %dxc -E main -T cs_6_7 %s | FileCheck %s | ||
// RUN: %dxc -E main -T cs_6_8 %s | FileCheck %s | ||
|
||
// CHECK-NOT: define void @main() | ||
|
||
// CHECK: error: validation errors | ||
// CHECK: Function: main: error: Opcode WaveMatrix_Annotate not valid in shader model cs_6_{{[7-8]}} | ||
// CHECK: Function: main: error: Opcode WaveMatrix_Annotate not valid in shader model cs_6_{{[7-8]}}. | ||
|
||
RWByteAddressBuffer rwbuf; | ||
|
||
[NumThreads(64,1,1)] | ||
void main(uint3 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex) | ||
{ | ||
WaveMatrixLeft<float, 16, 16> left; | ||
WaveMatrixRight<float, 16, 16> right; | ||
|
||
// CHECK: WaveMatrix67.hlsl:21:18: error: Opcode WaveMatrix_Depth not valid in shader model cs_6_{{[7-8]}}. | ||
// CHECK: WaveMatrix67.hlsl:22:18: error: Opcode WaveMatrix_Depth not valid in shader model cs_6_{{[7-8]}}. | ||
|
||
rwbuf.Store(0, left.MatrixDepth()); | ||
rwbuf.Store(4, right.MatrixDepth()); | ||
} | ||
|
||
// CHECK: Validation failed. |