From 91f19bedb902fb8b97c9b9da9fcb9c82e6f1c785 Mon Sep 17 00:00:00 2001 From: Anders Leino Date: Wed, 13 Nov 2024 18:08:14 +0200 Subject: Various fixes to enable some WGSL graphics tests (#5548) * Update Slang-RHI to get WGPU backend fixes * render-test: Use device local memory type for vertex buffers This helps to avoid https://github.com/shader-slang/slang-rhi/issues/104 * Fix bug in WGSL emitter layout code. There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not being used. This patch enables a bunch of tests for WGPU. This helps to address issue #4943. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/compute/compile-time-loop.slang | 1 - tests/compute/discard-stmt.slang | 1 - tests/compute/texture-sampling.slang | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/compute') diff --git a/tests/compute/compile-time-loop.slang b/tests/compute/compile-time-loop.slang index 840ffd145..9035bde2a 100644 --- a/tests/compute/compile-time-loop.slang +++ b/tests/compute/compile-time-loop.slang @@ -1,6 +1,5 @@ //TEST(compute):COMPARE_RENDER_COMPUTE: -shaderobj //TEST(compute):COMPARE_RENDER_COMPUTE: -mtl -shaderobj -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu //TEST_INPUT: Texture2D(size=4, content = one):name t //TEST_INPUT: Sampler:name s diff --git a/tests/compute/discard-stmt.slang b/tests/compute/discard-stmt.slang index b665a56a8..fa00c9ec3 100644 --- a/tests/compute/discard-stmt.slang +++ b/tests/compute/discard-stmt.slang @@ -3,7 +3,6 @@ //TEST_INPUT: Texture2D(size=4, content = one):name tex //TEST_INPUT: Sampler:name samp //TEST_INPUT: ubuffer(data=[0 0], stride=4):out,name outputBuffer -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu Texture2D tex; diff --git a/tests/compute/texture-sampling.slang b/tests/compute/texture-sampling.slang index 3e56be5a7..d8c5f4c4b 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 +// There is no texture_1d_array type in WGSL https://github.com/shader-slang/slang/issues/5223 //DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -wgpu Texture1D t1D; -- cgit v1.2.3