summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2024-11-06 13:14:35 +0200
committerGitHub <noreply@github.com>2024-11-06 13:14:35 +0200
commitf8294202ce8d5658f6308eeaed634058db9bbb4b (patch)
tree400d8379f8bd49749d0985e21eaf9e3deb5a356d /tests
parent79056cd7e0ba261a007e21a98a6f49cb0b032e25 (diff)
Make various parameters and return types require specialization when targeting WGSL (#5483)
Structured buffer types translate to array types in the WGSL emitter. WGSL doesn't allow passing runtime-sized arrays to functions. Similarly for pointers to texture handles. Also, structured buffers (runtime-sized arrays) cannot be returned in WGSL. This closes issue #5228, issue #5278 and issue #5288 by enabling specialized functions to be generated in these cases, in order to work around these constraints.
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/mutating/resource-specialization-inout.slang1
-rw-r--r--tests/compute/func-resource-param.slang1
-rw-r--r--tests/expected-failure-github.txt3
-rw-r--r--tests/optimization/func-resource-result/func-resource-result-simple.slang1
4 files changed, 0 insertions, 6 deletions
diff --git a/tests/bugs/mutating/resource-specialization-inout.slang b/tests/bugs/mutating/resource-specialization-inout.slang
index 78e8f44fc..d2f9a3b9e 100644
--- a/tests/bugs/mutating/resource-specialization-inout.slang
+++ b/tests/bugs/mutating/resource-specialization-inout.slang
@@ -1,7 +1,6 @@
// Bug related to resource specialization on unused resource typed fields.
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
-//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
//TEST_INPUT: Texture2D(size=4, content = one):name t2D
Texture2D t2D;
diff --git a/tests/compute/func-resource-param.slang b/tests/compute/func-resource-param.slang
index 3689417e0..4b67c909e 100644
--- a/tests/compute/func-resource-param.slang
+++ b/tests/compute/func-resource-param.slang
@@ -8,7 +8,6 @@
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-dx12 -compute -shaderobj
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cpu -compute -shaderobj
-//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu
//NO_TEST:SIMPLE:-target glsl -entry computeMain -stage compute -validate-ir -dump-ir
diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt
index 150e36ad1..dfb99eb35 100644
--- a/tests/expected-failure-github.txt
+++ b/tests/expected-failure-github.txt
@@ -32,7 +32,6 @@ tests/bugs/gh-3980.slang.7 syn (wgpu)
tests/bugs/gh-471.slang.1 syn (wgpu)
tests/bugs/gh-518.slang.2 syn (wgpu)
tests/bugs/gh-566.slang.1 syn (wgpu)
-tests/bugs/mutating/resource-specialization-inout.slang.1 syn (wgpu)
tests/bugs/nested-switch.slang.3 syn (wgpu)
tests/bugs/obfuscate-specialization-naming.slang.2 syn (wgpu)
tests/bugs/op-assignment-unify-mat.slang.4 syn (wgpu)
@@ -51,7 +50,6 @@ tests/compute/compile-time-loop.slang.2 syn (wgpu)
tests/compute/constexpr.slang.2 syn (wgpu)
tests/compute/discard-stmt.slang.2 syn (wgpu)
tests/compute/func-param-legalize.slang.1 syn (wgpu)
-tests/compute/func-resource-param.slang.4 syn (wgpu)
tests/compute/global-init.slang.2 syn (wgpu)
tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu)
tests/compute/interface-shader-param.slang.5 syn (wgpu)
@@ -98,5 +96,4 @@ tests/language-feature/types/opaque/return-opaque-type-in-struct.slang.2 syn (wg
tests/language-feature/types/opaque/return-opaque-type.slang.1 syn (wgpu)
tests/metal/groupshared-threadlocal-same-parameter.slang.4 syn (wgpu)
tests/optimization/func-resource-result/func-resource-result-complex.slang.2 syn (wgpu)
-tests/optimization/func-resource-result/func-resource-result-simple.slang.4 syn (wgpu)
tests/pipeline/compute/compute-system-values.slang.3 syn (wgpu)
diff --git a/tests/optimization/func-resource-result/func-resource-result-simple.slang b/tests/optimization/func-resource-result/func-resource-result-simple.slang
index 7366bc179..80342e569 100644
--- a/tests/optimization/func-resource-result/func-resource-result-simple.slang
+++ b/tests/optimization/func-resource-result/func-resource-result-simple.slang
@@ -4,7 +4,6 @@
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
//TEST(compute):COMPARE_COMPUTE_EX:-cpu -compute -shaderobj
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
-//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
// Test that a function that returns a resource type can be
// compiled for targets that don't natively support resource