Skip to content

Commit

Permalink
Update Slang-RHI again to get more WGPU fixes (shader-slang#5475)
Browse files Browse the repository at this point in the history
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 shader-slang#5222.
  • Loading branch information
aleino-nv authored Nov 1, 2024
1 parent c044ec2 commit e1c3c4a
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion external/slang-rhi
1 change: 0 additions & 1 deletion tests/compute/column-major.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/compute/constant-buffer-memory-packing.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
1 change: 0 additions & 1 deletion tests/compute/matrix-layout.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/compute/non-square-column-major.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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<R, C>
//TEST_INPUT:cbuffer(data=[1.0 0.0 10.0 0.0 0.0 1.0 20.0 0.0]):name matrixBuffer
Expand Down
1 change: 0 additions & 1 deletion tests/compute/row-major.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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<float4x4> matrixBuffer;
Expand Down
6 changes: 0 additions & 6 deletions tests/expected-failure-github.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion tests/hlsl/packoffset.slang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1c3c4a

Please sign in to comment.