diff options
Diffstat (limited to 'tests')
37 files changed, 86 insertions, 81 deletions
diff --git a/tests/cooperative-matrix/add.slang b/tests/cooperative-matrix/add.slang index c904da0f7..79abedfd5 100644 --- a/tests/cooperative-matrix/add.slang +++ b/tests/cooperative-matrix/add.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-NEXT: 1 diff --git a/tests/cooperative-matrix/array.slang b/tests/cooperative-matrix/array.slang index eb26bacbf..ee9366f5f 100644 --- a/tests/cooperative-matrix/array.slang +++ b/tests/cooperative-matrix/array.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK: 1.000000 diff --git a/tests/cooperative-matrix/comparison.slang b/tests/cooperative-matrix/comparison.slang index 8b29876df..da4ac7a2e 100644 --- a/tests/cooperative-matrix/comparison.slang +++ b/tests/cooperative-matrix/comparison.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: uint32_t // CHECK-NEXT: 0 diff --git a/tests/cooperative-matrix/conversion.slang b/tests/cooperative-matrix/conversion.slang index 24fba3cc6..6cfdd0d9e 100644 --- a/tests/cooperative-matrix/conversion.slang +++ b/tests/cooperative-matrix/conversion.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 2.000000 diff --git a/tests/cooperative-matrix/copyFrom.slang b/tests/cooperative-matrix/copyFrom.slang index 9ab8acd4a..3551a2597 100644 --- a/tests/cooperative-matrix/copyFrom.slang +++ b/tests/cooperative-matrix/copyFrom.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-COUNT-256: 4 diff --git a/tests/cooperative-matrix/div.slang b/tests/cooperative-matrix/div.slang index 17b237280..da2db6206 100644 --- a/tests/cooperative-matrix/div.slang +++ b/tests/cooperative-matrix/div.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/fill.slang b/tests/cooperative-matrix/fill.slang index f9068577b..ba3588315 100644 --- a/tests/cooperative-matrix/fill.slang +++ b/tests/cooperative-matrix/fill.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-COUNT-256: 10 diff --git a/tests/cooperative-matrix/inout.slang b/tests/cooperative-matrix/inout.slang index 3ff9a16d6..5502a52bd 100644 --- a/tests/cooperative-matrix/inout.slang +++ b/tests/cooperative-matrix/inout.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 2.000000 diff --git a/tests/cooperative-matrix/length.slang b/tests/cooperative-matrix/length.slang index 580b713f3..f6dadfb0d 100644 --- a/tests/cooperative-matrix/length.slang +++ b/tests/cooperative-matrix/length.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK):-vk -output-using-type -emit-spirv-directly // Note the length is NOT row * column. // When the memory scope is set to subgroup, each thread gets 16 * 16 / 32 = 8 where 32 is the value used in `numthreads`. diff --git a/tests/cooperative-matrix/load-store-arbitrary-array-vec.slang b/tests/cooperative-matrix/load-store-arbitrary-array-vec.slang index d34494fd8..ba74821f0 100644 --- a/tests/cooperative-matrix/load-store-arbitrary-array-vec.slang +++ b/tests/cooperative-matrix/load-store-arbitrary-array-vec.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly // CHECK: 1 // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/load-store-arbitrary-array.slang b/tests/cooperative-matrix/load-store-arbitrary-array.slang index 8de4e84cc..2e8a67868 100644 --- a/tests/cooperative-matrix/load-store-arbitrary-array.slang +++ b/tests/cooperative-matrix/load-store-arbitrary-array.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly // CHECK: 1 // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/load-store-groupshared.slang b/tests/cooperative-matrix/load-store-groupshared.slang index db32e85fd..bd546353c 100644 --- a/tests/cooperative-matrix/load-store-groupshared.slang +++ b/tests/cooperative-matrix/load-store-groupshared.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly // CHECK: 1 // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/load-store-rwbyteaddressbuffer.slang b/tests/cooperative-matrix/load-store-rwbyteaddressbuffer.slang index 6894bdfe5..6eb86eb68 100644 --- a/tests/cooperative-matrix/load-store-rwbyteaddressbuffer.slang +++ b/tests/cooperative-matrix/load-store-rwbyteaddressbuffer.slang @@ -1,5 +1,5 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -Xslang -DRWBAB +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -Xslang -DRWBAB // CHECK: 1 // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/load-store-rwstructuredbuffer.slang b/tests/cooperative-matrix/load-store-rwstructuredbuffer.slang index 6a94fd30e..65da7f8d5 100644 --- a/tests/cooperative-matrix/load-store-rwstructuredbuffer.slang +++ b/tests/cooperative-matrix/load-store-rwstructuredbuffer.slang @@ -1,5 +1,5 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -Xslang -DRWSB +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -Xslang -DRWSB // CHECK: type: int32_t // CHECK-NEXT: 1 diff --git a/tests/cooperative-matrix/load-store-tensorlayout.slang b/tests/cooperative-matrix/load-store-tensorlayout.slang index 849c85c0e..d20e08a82 100644 --- a/tests/cooperative-matrix/load-store-tensorlayout.slang +++ b/tests/cooperative-matrix/load-store-tensorlayout.slang @@ -1,11 +1,11 @@ -//TEST(compute):SIMPLE(filecheck=SPIRV):-target spirv-asm -entry computeMain -stage compute -skip-spirv-validation -//TEST(compute):SIMPLE(filecheck=SPIRV_BL):-target spirv-asm -entry computeMain -stage compute -skip-spirv-validation -DBLOCK_LOAD +//TEST(compute):SIMPLE(filecheck=SPIRV):-target spirv-asm -entry computeMain -stage compute +//TEST(compute):SIMPLE(filecheck=SPIRV_BL):-target spirv-asm -entry computeMain -stage compute -DBLOCK_LOAD -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-tensor-addressing -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-tensor-addressing -Xslang -DRW +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-tensor-addressing +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-tensor-addressing -Xslang -DRW -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-block-loads -Xslang -DBLOCK_LOAD -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-block-loads -Xslang -DBLOCK_LOAD -Xslang -DRW +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-block-loads -Xslang -DBLOCK_LOAD +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-block-loads -Xslang -DBLOCK_LOAD -Xslang -DRW //CHECK: 0 //CHECK-NEXT: 0 diff --git a/tests/cooperative-matrix/load-store-tensorview.slang b/tests/cooperative-matrix/load-store-tensorview.slang index 6757338be..44c1f2944 100644 --- a/tests/cooperative-matrix/load-store-tensorview.slang +++ b/tests/cooperative-matrix/load-store-tensorview.slang @@ -1,11 +1,11 @@ -//TEST(compute):SIMPLE(filecheck=SPIRV):-target spirv-asm -entry computeMain -stage compute -skip-spirv-validation -//TEST(compute):SIMPLE(filecheck=SPIRV_BL):-target spirv-asm -entry computeMain -stage compute -skip-spirv-validation -DBLOCK_LOAD +//TEST(compute):SIMPLE(filecheck=SPIRV):-target spirv-asm -entry computeMain -stage compute +//TEST(compute):SIMPLE(filecheck=SPIRV_BL):-target spirv-asm -entry computeMain -stage compute -DBLOCK_LOAD -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-tensor-addressing -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-tensor-addressing -Xslang -DRW +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-tensor-addressing +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-tensor-addressing -Xslang -DRW -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -Xslang -DBLOCK_LOAD -render-feature cooperative-matrix-block-loads -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -Xslang -DBLOCK_LOAD -render-feature cooperative-matrix-block-loads -skip-spirv-validation -Xslang -DRW +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -Xslang -DBLOCK_LOAD -render-feature cooperative-matrix-block-loads +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK_BL):-vk -output-using-type -emit-spirv-directly -Xslang -DBLOCK_LOAD -render-feature cooperative-matrix-block-loads -Xslang -DRW //CHECK: 2 //CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/map-element-single.slang b/tests/cooperative-matrix/map-element-single.slang index 583630d14..1661ee105 100644 --- a/tests/cooperative-matrix/map-element-single.slang +++ b/tests/cooperative-matrix/map-element-single.slang @@ -1,6 +1,6 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-per-element-operations -skip-spirv-validation -Xslang -DTEST_MODE=0 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-per-element-operations -skip-spirv-validation -Xslang -DTEST_MODE=1 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-per-element-operations -skip-spirv-validation -Xslang -DTEST_MODE=2 +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-per-element-operations -Xslang -DTEST_MODE=0 +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-per-element-operations -Xslang -DTEST_MODE=1 +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-per-element-operations -Xslang -DTEST_MODE=2 //CHECK: type: int32_t //CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/mat-mul-add-spirv-matrix-operands.slang b/tests/cooperative-matrix/mat-mul-add-spirv-matrix-operands.slang index a93efb4b9..92f11e2e2 100644 --- a/tests/cooperative-matrix/mat-mul-add-spirv-matrix-operands.slang +++ b/tests/cooperative-matrix/mat-mul-add-spirv-matrix-operands.slang @@ -1,4 +1,4 @@ -//TEST(compute):SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv -skip-spirv-validation +//TEST(compute):SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target spirv // This test checks that the correct SPIRV Cooperative Matrix Operands are emitted for OpCooperativeMatrixMulAddKHR operaions RWStructuredBuffer<uint32_t> outputBuffer1; diff --git a/tests/cooperative-matrix/mat-mul-add.slang b/tests/cooperative-matrix/mat-mul-add.slang index 3dc472de7..6209b9612 100644 --- a/tests/cooperative-matrix/mat-mul-add.slang +++ b/tests/cooperative-matrix/mat-mul-add.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-COUNT-256: 241.0 diff --git a/tests/cooperative-matrix/mod.slang b/tests/cooperative-matrix/mod.slang index 015dd227a..fe87714b0 100644 --- a/tests/cooperative-matrix/mod.slang +++ b/tests/cooperative-matrix/mod.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -emit-spirv-directly // CHECK: 0 // CHECK-NEXT: 0 diff --git a/tests/cooperative-matrix/mul.slang b/tests/cooperative-matrix/mul.slang index 4f5751c6e..64f339c8f 100644 --- a/tests/cooperative-matrix/mul.slang +++ b/tests/cooperative-matrix/mul.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/out.slang b/tests/cooperative-matrix/out.slang index 7d4a83fc2..c65b71551 100644 --- a/tests/cooperative-matrix/out.slang +++ b/tests/cooperative-matrix/out.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 2.000000 diff --git a/tests/cooperative-matrix/parameter.slang b/tests/cooperative-matrix/parameter.slang index eb6823aa1..2e4a8fe57 100644 --- a/tests/cooperative-matrix/parameter.slang +++ b/tests/cooperative-matrix/parameter.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 3.000000 diff --git a/tests/cooperative-matrix/reduce.slang b/tests/cooperative-matrix/reduce.slang index bbba587ce..c01100940 100644 --- a/tests/cooperative-matrix/reduce.slang +++ b/tests/cooperative-matrix/reduce.slang @@ -1,7 +1,7 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_ROW):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -skip-spirv-validation -Xslang -DTEST_MODE=0 -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_COLUMN):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -skip-spirv-validation -Xslang -DTEST_MODE=1 -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_ROW_AND_COLUMN):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -skip-spirv-validation -Xslang -DTEST_MODE=2 -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_2X2):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -skip-spirv-validation -Xslang -DTEST_MODE=3 +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_ROW):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -Xslang -DTEST_MODE=0 +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_COLUMN):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -Xslang -DTEST_MODE=1 +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_ROW_AND_COLUMN):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -Xslang -DTEST_MODE=2 +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHK_2X2):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-reductions -Xslang -DTEST_MODE=3 //CHK_ROW-COUNT-8: 36 diff --git a/tests/cooperative-matrix/return.slang b/tests/cooperative-matrix/return.slang index 2da0c81ad..456b8f292 100644 --- a/tests/cooperative-matrix/return.slang +++ b/tests/cooperative-matrix/return.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -skip-spirv-validation -emit-spirv-directly +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 3.000000 diff --git a/tests/cooperative-matrix/scalar-mul.slang b/tests/cooperative-matrix/scalar-mul.slang index 29d8f03f0..f1a370ce0 100644 --- a/tests/cooperative-matrix/scalar-mul.slang +++ b/tests/cooperative-matrix/scalar-mul.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 4.500000 diff --git a/tests/cooperative-matrix/struct.slang b/tests/cooperative-matrix/struct.slang index 592e553ae..586f958ca 100644 --- a/tests/cooperative-matrix/struct.slang +++ b/tests/cooperative-matrix/struct.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 1.000000 diff --git a/tests/cooperative-matrix/sub.slang b/tests/cooperative-matrix/sub.slang index a42fee9e8..b1b89a1e4 100644 --- a/tests/cooperative-matrix/sub.slang +++ b/tests/cooperative-matrix/sub.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-NEXT: 1 diff --git a/tests/cooperative-matrix/subscript-in-func.slang b/tests/cooperative-matrix/subscript-in-func.slang index 1bb8df433..445ae9f65 100644 --- a/tests/cooperative-matrix/subscript-in-func.slang +++ b/tests/cooperative-matrix/subscript-in-func.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: float // CHECK-NEXT: 1.000000 diff --git a/tests/cooperative-matrix/subscript.slang b/tests/cooperative-matrix/subscript.slang index 0d765b6b3..efa65de87 100644 --- a/tests/cooperative-matrix/subscript.slang +++ b/tests/cooperative-matrix/subscript.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-NEXT: 2 diff --git a/tests/cooperative-matrix/transpose.slang b/tests/cooperative-matrix/transpose.slang index cd317cac2..135a5ce23 100644 --- a/tests/cooperative-matrix/transpose.slang +++ b/tests/cooperative-matrix/transpose.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation -render-feature cooperative-matrix-conversions +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -render-feature cooperative-matrix-conversions //CHECK: type: int32_t //CHECK: 1 diff --git a/tests/cooperative-matrix/unary_neg.slang b/tests/cooperative-matrix/unary_neg.slang index be803d8c6..9e3ec5816 100644 --- a/tests/cooperative-matrix/unary_neg.slang +++ b/tests/cooperative-matrix/unary_neg.slang @@ -1,4 +1,4 @@ -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly -skip-spirv-validation +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly // CHECK: type: int32_t // CHECK-NEXT: -1 diff --git a/tests/diagnostics/extension-full-name.slang.actual b/tests/diagnostics/extension-full-name.slang.actual deleted file mode 100644 index 0d53a90ce..000000000 --- a/tests/diagnostics/extension-full-name.slang.actual +++ /dev/null @@ -1,32 +0,0 @@ -result code = -1 -standard error = { -tests/diagnostics/extension-full-name.slang(179): error 30019: expected an expression of type 'GenericType<half>.State', got 'int' - state1 = 0; // Error: expected expr of type 'GenericType<half>.State', got 'int' - ^ -tests/diagnostics/extension-full-name.slang(180): error 30019: expected an expression of type 'GenericType<float>.InnerType.Options', got 'int' - options1 = 0; // Error: expected expr of type 'GenericType<float>.InnerType.Options', got 'int' - ^ -tests/diagnostics/extension-full-name.slang(181): error 30019: expected an expression of type 'NonGenericType.Config', got 'int' - config1 = 0; // Error: expected expr of type 'NonGenericType.Config', got 'int' - ^ -tests/diagnostics/extension-full-name.slang(182): error 30019: expected an expression of type 'Container.Nested.Settings', got 'int' - settings1 = 0; // Error: expected expr of type 'Container.Nested.Settings', got 'int' - ^ -tests/diagnostics/extension-full-name.slang(183): error 30019: expected an expression of type 'Container.Nested.DeepNested.Record', got 'int' - record1 = 0; // Error: expected expr of type 'Container.Nested.DeepNested.Record', got 'int' - ^ -tests/diagnostics/extension-full-name.slang(191): error 30027: 'getOptions' is not a member of 'GenericType<int>.InnerType'. - intInner.getOptions(); // This won't compile as intInner doesn't have getOptions - ^~~~~~~~~~ -tests/diagnostics/extension-full-name.slang(221): error 30019: expected an expression of type 'GenericType<float>.InnerType.Options', got 'GenericType<half>.State' - .createState(); // Error: expected expr of type 'GenericType<float>.InnerType.Options', - ^ -tests/diagnostics/extension-full-name.slang(223): error 30019: expected an expression of type 'GenericType<half>.State', got 'NonGenericType.Config' - state1 = nonGenType.createConfig(); // Error: expected expr of type 'GenericType<half>.State', - ^ -tests/diagnostics/extension-full-name.slang(225): error 30019: expected an expression of type 'NonGenericType.Config', got 'Container.Nested.Settings' - config1 = nested.createSettings(); // Error: expected expr of type 'NonGenericType.Config', got - ^ -} -standard output = { -} diff --git a/tests/hlsl/simple/globallycoherent.hlsl b/tests/hlsl/simple/globallycoherent.hlsl index 70b5cdb2b..07f0dd57f 100644 --- a/tests/hlsl/simple/globallycoherent.hlsl +++ b/tests/hlsl/simple/globallycoherent.hlsl @@ -1,7 +1,15 @@ //TEST:COMPARE_HLSL:-profile cs_5_0 +//TEST:SIMPLE(filecheck=SPIRV): -target spirv-asm +//TEST:SIMPLE(filecheck=VK_MEM_MODEL): -target spirv-asm -emit-spirv-directly -capability vk_mem_model // Check output for `globallycoherent` +//SPIRV: OpDecorate {{.*}} Coherent + +//VK_MEM_MODEL-NOT: OpDecorate {{.*}} Coherent +//VK_MEM_MODEL: OpLoad {{.*}} MakePointerVisible|NonPrivatePointer +//VK_MEM_MODEL: OpStore {{.*}} MakePointerAvailable|NonPrivatePointer + #ifndef __SLANG__ #define gBuffer gBuffer_0 #define SV_DispatchThreadID SV_DISPATCHTHREADID diff --git a/tests/spirv/coherent-2.slang b/tests/spirv/coherent-2.slang index 425ca0fe1..d68b38ad0 100644 --- a/tests/spirv/coherent-2.slang +++ b/tests/spirv/coherent-2.slang @@ -1,6 +1,7 @@ // Test that globallycoherent works on arrays of uavs. //TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -emit-spirv-directly +//TEST:SIMPLE(filecheck=VK_MEM_MODEL): -target spirv -stage compute -entry main -emit-spirv-directly -capability vk_mem_model globallycoherent RWByteAddressBuffer buffer[]; @@ -14,4 +15,6 @@ void main(int tid : SV_DispatchThreadID) // CHECK-DAG: OpDecorate %buffer Coherent // CHECK-DAG: OpDecorate %[[VAR1:[a-zA-Z0-9_]+]] NonUniform // CHECK: %[[VAR1]] = OpAccessChain %{{.*}} %buffer + + //VK_MEM_MODEL: OpLoad {{.*}} MakePointerVisible|NonPrivatePointer } diff --git a/tests/spirv/coherent-texture.slang b/tests/spirv/coherent-texture.slang new file mode 100644 index 000000000..ab1ce260f --- /dev/null +++ b/tests/spirv/coherent-texture.slang @@ -0,0 +1,24 @@ +//TEST:SIMPLE(filecheck=SPIRV): -target spirv-asm -entry computeMain -stage compute +//TEST:SIMPLE(filecheck=VK_MEM_MODEL): -target spirv-asm -entry computeMain -stage compute -capability vk_mem_model + +//SPIRV: OpDecorate {{.*}} Coherent + +//VK_MEM_MODEL-NOT: OpDecorate {{.*}} Coherent +//VK_MEM_MODEL: OpImageRead %{{.*}} MakeTexelVisible|NonPrivateTexel % +//VK_MEM_MODEL: OpImageWrite %{{.*}} MakeTexelAvailable|NonPrivateTexel % +//VK_MEM_MODEL: OpImageRead %{{.*}} MakeTexelVisible|NonPrivateTexel % +//VK_MEM_MODEL: OpImageWrite %{{.*}} MakeTexelAvailable|NonPrivateTexel % + +globallycoherent +RWTexture2D<int4> outputTexture2D; + +[numthreads(1,1,1)] +void computeMain() +{ + // This line issues kIROp_ImageLoad/Store + outputTexture2D[0].xz = outputTexture2D[0].yw; + + // The current implementation uses spirv_asm for subscription, + // which goes through a different part of implementation in slang-emit-spirv.cpp. + outputTexture2D[uint2(0,0)] = outputTexture2D[uint2(1,1)]; +} diff --git a/tests/spirv/coherent.slang b/tests/spirv/coherent.slang index ba58b713b..33a559700 100644 --- a/tests/spirv/coherent.slang +++ b/tests/spirv/coherent.slang @@ -1,6 +1,7 @@ // Test that globallycoherent works. //TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry main -emit-spirv-directly +//TEST:SIMPLE(filecheck=VK_MEM_MODEL): -target spirv -stage compute -entry main -emit-spirv-directly -capability vk_mem_model struct S { @@ -17,4 +18,5 @@ void main(int tid : SV_DispatchThreadID) output[tid] = buffer[0].member; // CHECK-DAG: OpMemberDecorate {{.*}} 0 Coherent // CHECK-DAG: OpDecorate %buffer Coherent + // VK_MEM_MODEL: OpLoad {{.*}} MakePointerVisible|NonPrivatePointer } |
