Skip to content

Commit

Permalink
Add test to make sure WaveMatrix is not allowed in shader model 6.7 a…
Browse files Browse the repository at this point in the history
…nd 6.8 (#6178)

Related to #6133 and #6163.
  • Loading branch information
hekota authored Jan 22, 2024
1 parent 5ed628d commit 013f55c
Showing 1 changed file with 25 additions and 0 deletions.
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.

0 comments on commit 013f55c

Please sign in to comment.