summaryrefslogtreecommitdiffstats
path: root/tests/compute
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-04-23 12:14:21 -0700
committerGitHub <noreply@github.com>2024-04-23 12:14:21 -0700
commitf1de1817ca10e34ec6a844100f10f0de3340c9f2 (patch)
tree63e631a3c546107f450ab5153e630c5b4a0dc33a /tests/compute
parent0d9206855888d694e0b8f91be4524b57293773d6 (diff)
Switch to direct-to-spirv backend as default. (#4002)
* Switch to direct-to-spirv backend as default. * Fix slang-test. * Fix. * Fix.
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/half-texture.slang15
-rw-r--r--tests/compute/nonuniformres-array-of-textures.slang2
-rw-r--r--tests/compute/nonuniformres-atomic.slang2
-rw-r--r--tests/compute/nonuniformres-nested-rwstructuredbuf.slang2
-rw-r--r--tests/compute/unbounded-array-of-array-syntax.slang2
5 files changed, 12 insertions, 11 deletions
diff --git a/tests/compute/half-texture.slang b/tests/compute/half-texture.slang
index bdf98cb77..ca51df3cc 100644
--- a/tests/compute/half-texture.slang
+++ b/tests/compute/half-texture.slang
@@ -1,4 +1,5 @@
-//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry computeMain -profile cs_6_2
+//TEST:SIMPLE(filecheck=CHECK_SPIRV): -target spirv -entry computeMain -profile cs_6_2 -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=CHECK_SPIRV): -target spirv -entry computeMain -profile cs_6_2 -emit-spirv-directly
//TEST:CROSS_COMPILE: -target dxil-assembly -entry computeMain -profile cs_6_2
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=16):out
@@ -26,14 +27,14 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
half2 h2 = halfTexture2.Sample(s, uv);
half4 h4 = halfTexture4.Sample(s, uv);
#else
- // CHECK: {{.*}} = OpImageRead
- // CHECK: {{.*}} = OpFConvert %half
+ // CHECK_SPIRV: {{.*}} = OpImageRead
+ // CHECK_SPIRV: {{.*}} = OpFConvert
half h = halfTexture[pos2];
- // CHECK: {{.*}} = OpImageRead
- // CHECK: {{.*}} = OpFConvert %v2half
+ // CHECK_SPIRV: {{.*}} = OpImageRead
+ // CHECK_SPIRV: {{.*}} = OpFConvert
half2 h2 = halfTexture2[pos2];
- // CHECK: {{.*}} = OpImageRead
- // CHECK: {{.*}} = OpFConvert %v4half
+ // CHECK_SPIRV: {{.*}} = OpImageRead
+ // CHECK_SPIRV: {{.*}} = OpFConvert
half4 h4 = halfTexture4[pos2];
#endif
// Store a results
diff --git a/tests/compute/nonuniformres-array-of-textures.slang b/tests/compute/nonuniformres-array-of-textures.slang
index 32eccdbdc..a7f3e05bd 100644
--- a/tests/compute/nonuniformres-array-of-textures.slang
+++ b/tests/compute/nonuniformres-array-of-textures.slang
@@ -1,6 +1,6 @@
//TEST:SIMPLE(filecheck=CHECK0):-target glsl -entry main -stage compute
//TEST:SIMPLE(filecheck=CHECK1):-target hlsl -entry main -stage compute
-//TEST:SIMPLE(filecheck=CHECK2):-target spirv -entry main -stage compute
+//TEST:SIMPLE(filecheck=CHECK2):-target spirv -entry main -stage compute -emit-spirv-via-glsl
//TEST:SIMPLE(filecheck=CHECK3):-target spirv -entry main -stage compute -emit-spirv-directly
Texture2D<float> textures[2];
diff --git a/tests/compute/nonuniformres-atomic.slang b/tests/compute/nonuniformres-atomic.slang
index 113517006..95ae502dc 100644
--- a/tests/compute/nonuniformres-atomic.slang
+++ b/tests/compute/nonuniformres-atomic.slang
@@ -1,6 +1,6 @@
//TEST:SIMPLE(filecheck=CHECK0):-target glsl -entry main -stage compute
//TEST:SIMPLE(filecheck=CHECK1):-target hlsl -entry main -stage compute
-//TEST:SIMPLE(filecheck=CHECK2):-target spirv -entry main -stage compute
+//TEST:SIMPLE(filecheck=CHECK2):-target spirv -entry main -stage compute -emit-spirv-via-glsl
//TEST:SIMPLE(filecheck=CHECK3):-target spirv -entry main -stage compute -emit-spirv-directly
RWTexture2D<uint> texArray[2];
diff --git a/tests/compute/nonuniformres-nested-rwstructuredbuf.slang b/tests/compute/nonuniformres-nested-rwstructuredbuf.slang
index 3c99ea205..b188a2c52 100644
--- a/tests/compute/nonuniformres-nested-rwstructuredbuf.slang
+++ b/tests/compute/nonuniformres-nested-rwstructuredbuf.slang
@@ -1,6 +1,6 @@
//TEST:SIMPLE(filecheck=CHECK0):-target glsl -entry main -stage compute
//TEST:SIMPLE(filecheck=CHECK1):-target hlsl -entry main -stage compute
-//TEST:SIMPLE(filecheck=CHECK2):-target spirv -entry main -stage compute
+//TEST:SIMPLE(filecheck=CHECK2):-target spirv -entry main -stage compute -emit-spirv-via-glsl
//TEST:SIMPLE(filecheck=CHECK3):-target spirv -entry main -stage compute -emit-spirv-directly
RWStructuredBuffer<int> buffer[];
diff --git a/tests/compute/unbounded-array-of-array-syntax.slang b/tests/compute/unbounded-array-of-array-syntax.slang
index 35316d114..10c4d277f 100644
--- a/tests/compute/unbounded-array-of-array-syntax.slang
+++ b/tests/compute/unbounded-array-of-array-syntax.slang
@@ -1,7 +1,7 @@
//IGNORE_TEST:CPU_REFLECTION: -profile cs_5_0 -entry computeMain -target cpp
//DISABLED_TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute
//TEST:CROSS_COMPILE:-target dxbc-assembly -entry computeMain -profile cs_5_1
-//TEST:SIMPLE(filecheck=CHECK):-target spirv-assembly -entry computeMain -profile cs_5_1
+//TEST:SIMPLE(filecheck=CHECK):-target spirv-assembly -entry computeMain -profile cs_5_1 -emit-spirv-via-glsl
//DISABLED_TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer