From e1c3c4ae39b27cf378e7217d111b9a92e298b7ce Mon Sep 17 00:00:00 2001 From: Anders Leino Date: Fri, 1 Nov 2024 15:18:54 +0200 Subject: [PATCH] Update Slang-RHI again to get more WGPU fixes (#5475) This fixes a teardown crash, and a buffer usage mismatch issue during bind group creation. These Slang-RHI fixes allow several WGPU tests to be enabled: - tests/compute/column-major.slang - tests/compute/constant-buffer-memory-packing.slang - tests/compute/matrix-layout.hlsl - tests/compute/non-square-column-major.slang - tests/compute/row-major.slang - tests/hlsl/packoffset.slang This helps to address issue #5222. --- external/slang-rhi | 2 +- tests/compute/column-major.slang | 1 - tests/compute/constant-buffer-memory-packing.slang | 2 -- tests/compute/matrix-layout.hlsl | 1 - tests/compute/non-square-column-major.slang | 1 - tests/compute/row-major.slang | 1 - tests/expected-failure-github.txt | 6 ------ tests/hlsl/packoffset.slang | 1 - 8 files changed, 1 insertion(+), 14 deletions(-) diff --git a/external/slang-rhi b/external/slang-rhi index 180464b57e..93c2ba8f68 160000 --- a/external/slang-rhi +++ b/external/slang-rhi @@ -1 +1 @@ -Subproject commit 180464b57e7806a741ff84cc83fd5f11b8a2ae9d +Subproject commit 93c2ba8f68edee6732372ce4505bfc2a8640a1ba diff --git a/tests/compute/column-major.slang b/tests/compute/column-major.slang index 6fc978ba6e..1cd08434b8 100644 --- a/tests/compute/column-major.slang +++ b/tests/compute/column-major.slang @@ -7,7 +7,6 @@ //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 93d4331fdf..fb7a78fc1d 100644 --- a/tests/compute/constant-buffer-memory-packing.slang +++ b/tests/compute/constant-buffer-memory-packing.slang @@ -9,8 +9,6 @@ //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/matrix-layout.hlsl b/tests/compute/matrix-layout.hlsl index 2e9b4389ff..4a2d3f0144 100644 --- a/tests/compute/matrix-layout.hlsl +++ b/tests/compute/matrix-layout.hlsl @@ -10,7 +10,6 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -xslang -matrix-layout-row-major -shaderobj //TEST(compute,compatibility-issue):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -xslang -matrix-layout-row-major -shaderobj //DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu // Not testing on Vulkan because of lack of support // for integer matrices in GLSL. Slang needs to diff --git a/tests/compute/non-square-column-major.slang b/tests/compute/non-square-column-major.slang index c5688da2e7..fd3ce64069 100644 --- a/tests/compute/non-square-column-major.slang +++ b/tests/compute/non-square-column-major.slang @@ -9,7 +9,6 @@ //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -output-using-type -xslang -matrix-layout-column-major -shaderobj //DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-cuda -compute -output-using-type -xslang -matrix-layout-column-major -shaderobj //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=METAL):-slang -output-using-type -shaderobj -mtl -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu // matrix //TEST_INPUT:cbuffer(data=[1.0 0.0 10.0 0.0 0.0 1.0 20.0 0.0]):name matrixBuffer diff --git a/tests/compute/row-major.slang b/tests/compute/row-major.slang index 6114e6dab3..d0e76475be 100644 --- a/tests/compute/row-major.slang +++ b/tests/compute/row-major.slang @@ -4,7 +4,6 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -output-using-type -xslang -matrix-layout-row-major -shaderobj //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -output-using-type -xslang -matrix-layout-row-major -shaderobj //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -output-using-type -xslang -matrix-layout-row-major -shaderobj -//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu //TEST_INPUT:cbuffer(data=[1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 10.0 20.0 30.0 1.0]):name matrixBuffer ConstantBuffer matrixBuffer; diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index d54d7d8d4c..b67db35fa2 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -46,9 +46,7 @@ tests/compute/atomics-groupshared (wgpu) tests/compute/buffer-type-splitting (wgpu) tests/compute/byte-address-buffer (wgpu) tests/compute/cbuffer-legalize.slang.2 syn (wgpu) -tests/compute/column-major (wgpu) tests/compute/compile-time-loop.slang.2 syn (wgpu) -tests/compute/constant-buffer-memory-packing (wgpu) tests/compute/constexpr.slang.2 syn (wgpu) tests/compute/discard-stmt.slang.2 syn (wgpu) tests/compute/func-cbuffer-param (wgpu) @@ -59,11 +57,8 @@ tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu) tests/compute/interface-shader-param.slang.5 syn (wgpu) tests/compute/kernel-context-threading.slang.6 syn (wgpu) tests/compute/loop-unroll.slang.7 syn (wgpu) -tests/compute/matrix-layout.hlsl.3 syn (wgpu) -tests/compute/non-square-column-major.slang.6 syn (wgpu) tests/compute/non-square-row-major.slang.6 syn (wgpu) tests/compute/parameter-block (wgpu) -tests/compute/row-major.slang.4 syn (wgpu) tests/compute/texture-get-dimensions (wgpu) tests/compute/texture-sampling (wgpu) tests/compute/texture-simple (wgpu) @@ -77,7 +72,6 @@ tests/hlsl-intrinsic/matrix-int.slang.6 syn (wgpu) tests/hlsl-intrinsic/scalar-double-simple.slang.7 syn (wgpu) tests/hlsl-intrinsic/scalar-float.slang.5 syn (wgpu) tests/hlsl-intrinsic/vector-float.slang.5 syn (wgpu) -tests/hlsl/packoffset.slang.5 syn (wgpu) tests/ir/string-literal-hash.slang.2 syn (wgpu) tests/language-feature/anonymous-struct.slang.1 syn (wgpu) tests/language-feature/constants/constexpr-loop.slang.2 syn (wgpu) diff --git a/tests/hlsl/packoffset.slang b/tests/hlsl/packoffset.slang index 5ca8d497e7..2acbb5ff85 100644 --- a/tests/hlsl/packoffset.slang +++ b/tests/hlsl/packoffset.slang @@ -2,7 +2,6 @@ //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj -output-using-type //TEST:SIMPLE(filecheck=HLSL): -target hlsl -profile cs_5_0 -entry computeMain -line-directive-mode none //TEST:SIMPLE(filecheck=GLSL): -target glsl -profile glsl_450 -stage compute -entry computeMain -line-directive-mode none -//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu // Metal does not support custom data layout. //DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl