summaryrefslogtreecommitdiffstats
path: root/tests/compute
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2024-10-07 20:16:19 +0300
committerGitHub <noreply@github.com>2024-10-07 10:16:19 -0700
commit509409ef11e3b1abd1d7e1bfb540bc172aa1a817 (patch)
treea72725310c63b5224e76a79a4cb9b8ab9984cbc5 /tests/compute
parentff51c21ba217fe18bf22fec7bf822cde779b265d (diff)
Add WGSL support for slang-test (#5174)
* Use the assembly description as target when disassembling I believe this is a bugfix. It seems to have worked before because up until the WGSL case, the disassembler has been the same executable as the one producing the binary to be disassembled. * Add Tint as a downstream compiler This closes issue #5104. * Add downstream compiler for Tint. * Tint is wrapped in a shared library, 'slang-tint' available from [1]. * The header file for slang-tint.dll is added in external/slang-tint-headers. * Add some boilerplate for WGSL targets. * Add an entry point test for WGSL. [1] https://github.com/shader-slang/dawn/releases/tag/slang-tint-0 * Add WGSL_SPIRV as supported target for Glslang * Add WebGPU support to slang-test This helps to address issue #5051. * Disable lots of crashing compute tests for 'wgpu' This closes issue #5051. --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/compute')
-rw-r--r--tests/compute/atomics-buffer.slang1
-rw-r--r--tests/compute/atomics-groupshared.slang1
-rw-r--r--tests/compute/atomics.slang1
-rw-r--r--tests/compute/buffer-type-splitting.slang1
-rw-r--r--tests/compute/byte-address-buffer.slang1
-rw-r--r--tests/compute/column-major.slang1
-rw-r--r--tests/compute/constant-buffer-memory-packing.slang2
-rw-r--r--tests/compute/func-cbuffer-param.slang1
-rw-r--r--tests/compute/parameter-block.slang1
-rw-r--r--tests/compute/texture-get-dimensions.slang1
-rw-r--r--tests/compute/texture-sampling.slang1
-rw-r--r--tests/compute/texture-simple.slang2
-rw-r--r--tests/compute/texture-simpler.slang1
-rw-r--r--tests/compute/transcendental-double.slang1
14 files changed, 16 insertions, 0 deletions
diff --git a/tests/compute/atomics-buffer.slang b/tests/compute/atomics-buffer.slang
index 6745d6b58..ca609635e 100644
--- a/tests/compute/atomics-buffer.slang
+++ b/tests/compute/atomics-buffer.slang
@@ -12,6 +12,7 @@
// RWBuffer does not work with the GFX backend as expected with Metal
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
//TEST:SIMPLE(filecheck=METALLIB): -target metallib -stage compute -entry computeMain
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//METALLIB: @computeMain
diff --git a/tests/compute/atomics-groupshared.slang b/tests/compute/atomics-groupshared.slang
index a01f7bf6a..9d153d9e3 100644
--- a/tests/compute/atomics-groupshared.slang
+++ b/tests/compute/atomics-groupshared.slang
@@ -5,6 +5,7 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -vk -shaderobj
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cuda -shaderobj
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
diff --git a/tests/compute/atomics.slang b/tests/compute/atomics.slang
index ee02c623f..da08b0cb7 100644
--- a/tests/compute/atomics.slang
+++ b/tests/compute/atomics.slang
@@ -5,6 +5,7 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -vk -shaderobj
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -cuda -shaderobj
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out, name outputBuffer
diff --git a/tests/compute/buffer-type-splitting.slang b/tests/compute/buffer-type-splitting.slang
index ea9af3146..dbbe9789f 100644
--- a/tests/compute/buffer-type-splitting.slang
+++ b/tests/compute/buffer-type-splitting.slang
@@ -1,6 +1,7 @@
//TEST(compute):COMPARE_COMPUTE:-cpu
//TEST(compute):COMPARE_COMPUTE: -shaderobj
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
//TEST_INPUT:ubuffer(data=[0 2 3 3]):name=s[0].a
diff --git a/tests/compute/byte-address-buffer.slang b/tests/compute/byte-address-buffer.slang
index 65356ec22..77748eb60 100644
--- a/tests/compute/byte-address-buffer.slang
+++ b/tests/compute/byte-address-buffer.slang
@@ -4,6 +4,7 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
//TEST(compute):COMPARE_COMPUTE_EX:-d3d12 -compute -shaderobj
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
// Confirm cross-compilation of `(RW)ByteAddressBuffer`
//
diff --git a/tests/compute/column-major.slang b/tests/compute/column-major.slang
index 1cd08434b..6fc978ba6 100644
--- a/tests/compute/column-major.slang
+++ b/tests/compute/column-major.slang
@@ -7,6 +7,7 @@
//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute -emit-spirv-via-glsl -Xslang -matrix-layout-column-major
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-cuda -compute -shaderobj -Xslang -matrix-layout-column-major
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-mtl -compute -shaderobj -Xslang -matrix-layout-column-major
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
// This data is in column major layout order....
//TEST_INPUT:cbuffer(data=[1.0 0.0 0.0 10.0 0.0 1.0 0.0 20.0 0.0 0.0 1.0 30.0 0.0 0.0 0.0 1.0]):name matrixBuffer
diff --git a/tests/compute/constant-buffer-memory-packing.slang b/tests/compute/constant-buffer-memory-packing.slang
index fb7a78fc1..93d4331fd 100644
--- a/tests/compute/constant-buffer-memory-packing.slang
+++ b/tests/compute/constant-buffer-memory-packing.slang
@@ -9,6 +9,8 @@
//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-mtl -compute
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
+
// CPP/CUDA due to natural layout rules will recieve the following ROW matrix:
// {1,2,3}
// {0,4,5}
diff --git a/tests/compute/func-cbuffer-param.slang b/tests/compute/func-cbuffer-param.slang
index ec9543334..8b3c02e58 100644
--- a/tests/compute/func-cbuffer-param.slang
+++ b/tests/compute/func-cbuffer-param.slang
@@ -9,6 +9,7 @@
//TEST(compute, vulkan, compatibility-issue):COMPARE_COMPUTE_EX:-dx12 -compute -use-dxil -shaderobj
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cpu -compute -shaderobj
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
struct Data
{
diff --git a/tests/compute/parameter-block.slang b/tests/compute/parameter-block.slang
index 2922f0813..baa420665 100644
--- a/tests/compute/parameter-block.slang
+++ b/tests/compute/parameter-block.slang
@@ -3,6 +3,7 @@
//TEST(compute):COMPARE_COMPUTE:-vk -shaderobj
//TEST(compute):COMPARE_COMPUTE:-shaderobj
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -render-features argument-buffer-tier-2
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
// Ensure that Slang `ParameterBlock` type is lowered
// to HLSL in the fashion that we expect.
diff --git a/tests/compute/texture-get-dimensions.slang b/tests/compute/texture-get-dimensions.slang
index 526e9feb1..55eeb68f5 100644
--- a/tests/compute/texture-get-dimensions.slang
+++ b/tests/compute/texture-get-dimensions.slang
@@ -6,6 +6,7 @@
//DISABLE_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
// TODO(JS): Doesn't work on CUDA as there aren't any CUDA functions to get dimensions.
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -shaderobj
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//TEST_INPUT: Texture1D(size=4, content = one):name t1D
Texture1D<float> t1D;
diff --git a/tests/compute/texture-sampling.slang b/tests/compute/texture-sampling.slang
index 0e319680a..3e56be5a7 100644
--- a/tests/compute/texture-sampling.slang
+++ b/tests/compute/texture-sampling.slang
@@ -12,6 +12,7 @@
//TEST_INPUT: TextureCube(size=4, content = one, arrayLength=2):name=tCubeArray
//TEST_INPUT: Sampler:name=samplerState
//TEST_INPUT: ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
Texture1D t1D;
Texture2D t2D;
diff --git a/tests/compute/texture-simple.slang b/tests/compute/texture-simple.slang
index efa83edfb..c319d9d29 100644
--- a/tests/compute/texture-simple.slang
+++ b/tests/compute/texture-simple.slang
@@ -9,6 +9,8 @@
//DISABLE_TEST_INPUT: Texture1D(format=R_Float32, size=4, content = one, mipMaps=1):name tLoad1D
//Texture1D<float> tLoad1D;
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
+
//TEST_INPUT: Texture1D(size=4, content = one):name t1D
Texture1D<float> t1D;
//TEST_INPUT: Texture2D(size=4, content = one):name t2D
diff --git a/tests/compute/texture-simpler.slang b/tests/compute/texture-simpler.slang
index 0f9dfcbad..777f13ef6 100644
--- a/tests/compute/texture-simpler.slang
+++ b/tests/compute/texture-simpler.slang
@@ -5,6 +5,7 @@
//TEST(smoke,compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type -render-feature hardware-device
//TEST(smoke,compute):COMPARE_COMPUTE_EX:-cuda -compute -shaderobj -output-using-type
//TEST(smoke,compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//TEST_INPUT: Texture2D(size=4, content = one):name t2D
Texture2D<float> t2D;
diff --git a/tests/compute/transcendental-double.slang b/tests/compute/transcendental-double.slang
index 886bdfd4c..4b71e0bab 100644
--- a/tests/compute/transcendental-double.slang
+++ b/tests/compute/transcendental-double.slang
@@ -7,6 +7,7 @@
// When using double on vulkan the values are incorrect(!)
//DISABLE_TEST(compute,vulkan):COMPARE_COMPUTE:-vk -output-using-type -shaderobj
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
+//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;