Skip to content

Commit 43df1da

Browse files
authored
Enable a bunch of WGPU tests (shader-slang#5513)
This closes issue shader-slang#5505.
1 parent d53a3ab commit 43df1da

22 files changed

+11
-42
lines changed

tests/autodiff/diff-ptr-type-call.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
65
RWStructuredBuffer<float> outputBuffer;

tests/autodiff/diff-ptr-type-loop.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
22
//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
65
RWStructuredBuffer<float> outputBuffer;

tests/autodiff/diff-ptr-type-smoke.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
65
RWStructuredBuffer<float> outputBuffer;

tests/bugs/frexp.slang

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -emit-spirv-directly -output-using-type
66
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-cuda -output-using-type
77
//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-slang -shaderobj -mtl -output-using-type
8-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
98

109
// BUF: type: int32_t
1110
// BUF-NEXT: 1

tests/bugs/gh-2959.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF): -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-slang -shaderobj -mtl
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
65
RWStructuredBuffer<uint> outputBuffer;

tests/bugs/gh-471.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE: -shaderobj
22
//TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4):out,name outputBuffer
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
// Test that "operator comma" works as expected
65

tests/bugs/gh-566.slang

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//TEST(compute):COMPARE_COMPUTE: -shaderobj
44
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
55
//TEST_INPUT:ubuffer(data=[4 3 2 1], stride=4):name inputBuffer
6-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
76

87

98
RWStructuredBuffer<uint> outputBuffer;

tests/bugs/obfuscate-specialization-naming.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -compile-arg -obfuscate -shaderobj
22
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -compile-arg -obfuscate -shaderobj
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
//TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4):name a
65
RWStructuredBuffer<int> a;

tests/bugs/specialize-function-array-args.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
22
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
// When a function is passed a parameter that contains an array, it specialized it as a performance
65
// improvement for VK. If the struct contained a structured buffer, though it meant that the

tests/compute/constant-buffer-memory-packing.slang

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
//TEST(compute, vulkan):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-vk -compute
1010
//TEST(compute):COMPARE_COMPUTE_EX(filecheck-buffer=BUF):-mtl -compute
1111

12+
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
13+
1214
// CPP/CUDA due to natural layout rules will recieve the following ROW matrix:
1315
// {1,2,3}
1416
// {0,4,5}

tests/compute/func-cbuffer-param.slang

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj
1111
//TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cpu -compute -shaderobj
1212

13+
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
14+
1315
struct Data
1416
{
1517
int4 val[4];

tests/compute/func-param-legalize.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//TEST(compute):COMPARE_COMPUTE: -shaderobj
2-
//DISABLE_TEST(compute):COMPARE_COMPUTE:-wgpu
32

43
struct Param
54
{

tests/compute/matrix-layout.hlsl

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -xslang -matrix-layout-row-major -shaderobj
1111
//TEST(compute,compatibility-issue):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -xslang -matrix-layout-row-major -shaderobj
1212
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
13+
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
1314

1415
// Not testing on Vulkan because of lack of support
1516
// for integer matrices in GLSL. Slang needs to

tests/expected-failure-github.txt

+4-25
Original file line numberDiff line numberDiff line change
@@ -6,69 +6,48 @@ tests/language-feature/saturated-cooperation/fuse.slang (vk)
66
tests/bugs/byte-address-buffer-interlocked-add-f32.slang (vk)
77
tests/serialization/obfuscated-serialized-module-test.slang.2 syn (mtl)
88
tests/autodiff/custom-intrinsic.slang.2 syn (wgpu)
9-
tests/autodiff/diff-ptr-type-call.slang.2 syn (wgpu)
10-
tests/autodiff/diff-ptr-type-loop.slang.2 syn (wgpu)
11-
tests/autodiff/diff-ptr-type-smoke.slang.2 syn (wgpu)
129
tests/autodiff/existential-1.slang.2 syn (wgpu)
1310
tests/autodiff/existential-2.slang.2 syn (wgpu)
1411
tests/autodiff/material/diff-bwd-falcor-material-system.slang.2 syn (wgpu)
1512
tests/autodiff/material2/diff-bwd-falcor-material-system.slang.2 syn (wgpu)
16-
tests/autodiff/matrix-arithmetic-fwd.slang.2 syn (wgpu)
1713
tests/bugs/atomic-coerce.slang.3 syn (wgpu)
1814
tests/bugs/buffer-swizzle-store.slang.3 syn (wgpu)
1915
tests/bugs/dxbc-double-problem.slang.6 syn (wgpu)
2016
tests/bugs/frexp-double.slang.7 syn (wgpu)
21-
tests/bugs/frexp.slang.7 syn (wgpu)
22-
tests/bugs/gh-2959.slang.2 syn (wgpu)
2317
tests/bugs/gh-3980.slang.7 syn (wgpu)
24-
tests/bugs/gh-471.slang.1 syn (wgpu)
2518
tests/bugs/gh-518.slang.2 syn (wgpu)
26-
tests/bugs/gh-566.slang.1 syn (wgpu)
27-
tests/bugs/obfuscate-specialization-naming.slang.2 syn (wgpu)
2819
tests/bugs/op-assignment-unify-mat.slang.4 syn (wgpu)
2920
tests/bugs/shadowed-lookup.slang.1 syn (wgpu)
30-
tests/bugs/specialize-function-array-args.slang.2 syn (wgpu)
31-
tests/bugs/texture2d-gather.hlsl.2 syn (wgpu)
3221
tests/bugs/user-attribute-lookup.slang.2 syn (wgpu)
3322
tests/compute/atomics (wgpu)
3423
tests/compute/atomics-buffer (wgpu)
3524
tests/compute/atomics-groupshared (wgpu)
3625
tests/compute/buffer-type-splitting (wgpu)
37-
tests/compute/byte-address-buffer (wgpu)
3826
tests/compute/compile-time-loop.slang.2 syn (wgpu)
27+
tests/compute/constant-buffer-memory-packing.slang.6 syn (wgpu)
3928
tests/compute/constexpr.slang.2 syn (wgpu)
4029
tests/compute/discard-stmt.slang.2 syn (wgpu)
41-
tests/compute/func-param-legalize.slang.1 syn (wgpu)
30+
tests/compute/func-cbuffer-param.slang.4 syn (wgpu)
4231
tests/compute/interface-shader-param-in-struct.slang.4 syn (wgpu)
4332
tests/compute/interface-shader-param.slang.5 syn (wgpu)
4433
tests/compute/loop-unroll.slang.7 syn (wgpu)
34+
tests/compute/matrix-layout.hlsl.3 syn (wgpu)
4535
tests/compute/texture-get-dimensions (wgpu)
4636
tests/compute/texture-sampling (wgpu)
4737
tests/compute/texture-simple (wgpu)
48-
tests/compute/texture-simpler (wgpu)
4938
tests/compute/transcendental-double (wgpu)
50-
tests/compute/constant-buffer-memory-packing.slang.6 syn (wgpu)
51-
tests/compute/func-cbuffer-param.slang.4 syn (wgpu)
52-
tests/compute/matrix-layout.hlsl.3 syn (wgpu)
53-
tests/hlsl/packoffset.slang.5 syn (wgpu)
5439
tests/hlsl-intrinsic/byte-address-buffer/byte-address-struct.slang.5 syn (wgpu)
5540
tests/hlsl-intrinsic/classify-double.slang.6 syn (wgpu)
5641
tests/hlsl-intrinsic/classify-float.slang.5 syn (wgpu)
5742
tests/hlsl-intrinsic/matrix-float.slang.6 syn (wgpu)
5843
tests/hlsl-intrinsic/matrix-int.slang.6 syn (wgpu)
5944
tests/hlsl-intrinsic/scalar-double-simple.slang.7 syn (wgpu)
45+
tests/hlsl/packoffset.slang.5 syn (wgpu)
6046
tests/language-feature/constants/static-const-in-generic-interface.slang.1 syn (wgpu)
61-
tests/language-feature/enums/nested-enum.slang.1 syn (wgpu)
6247
tests/language-feature/enums/strongly-typed-id.slang.1 syn (wgpu)
63-
tests/language-feature/generics/irwarray.slang.2 syn (wgpu)
6448
tests/language-feature/generics/tuple.slang.1 syn (wgpu)
6549
tests/language-feature/generics/variadic-0.slang.4 syn (wgpu)
66-
tests/language-feature/generics/variadic-void.slang.3 syn (wgpu)
67-
tests/language-feature/higher-order-functions/simple.slang.4 syn (wgpu)
6850
tests/language-feature/shader-params/interface-shader-param-ordinary.slang.4 syn (wgpu)
6951
tests/language-feature/swizzles/matrix-swizzle-write-array.slang.3 syn (wgpu)
70-
tests/language-feature/swizzles/matrix-swizzle-write-single.slang.3 syn (wgpu)
7152
tests/language-feature/swizzles/matrix-swizzle-write-swizzle.slang.3 syn (wgpu)
72-
tests/language-feature/swizzles/matrix-swizzle-write.slang.3 syn (wgpu)
7353
tests/optimization/func-resource-result/func-resource-result-complex.slang.2 syn (wgpu)
74-
tests/pipeline/compute/compute-system-values.slang.3 syn (wgpu)

tests/hlsl/packoffset.slang

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
// Metal does not support custom data layout.
77
//DISABLE_TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
88

9+
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
10+
911
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
1012
RWStructuredBuffer<float> outputBuffer;
1113

tests/language-feature/enums/nested-enum.slang

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Test enums defined nested in a struct work as expected.
44

55
//TEST(compute):COMPARE_COMPUTE: -shaderobj
6-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
76

87
struct Outer
98
{

tests/language-feature/generics/irwarray.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type
3-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
43

54
void writeToArray<U, T : IRWArray<U>>(inout T array, int index, U value) { array[index] = value; }
65
void writeToBuffer<U, T : IRWArray<U>>(T array, int index, U value) { array[index] = value; }

tests/language-feature/generics/variadic-void.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -shaderobj -output-using-type
22
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -shaderobj -output-using-type
33
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -cpu -shaderobj -output-using-type
4-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
54

65
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
76
RWStructuredBuffer<float> outputBuffer;

tests/language-feature/higher-order-functions/simple.slang

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//TEST(compute):COMPARE_COMPUTE_EX():-slang -compute -shaderobj -output-using-type
33
//TEST(compute):COMPARE_COMPUTE:-cpu -shaderobj -output-using-type
44
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type
5-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
65

76
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
87
RWStructuredBuffer<uint> outputBuffer;

tests/language-feature/swizzles/matrix-swizzle-write-single.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE: -compute -shaderobj -output-using-type
22
//TEST(compute, vulkan):COMPARE_COMPUTE: -vk -compute -shaderobj -output-using-type
33
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type
4-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
54

65
// Test that writes to single matrix elements with swizzles work
76

tests/language-feature/swizzles/matrix-swizzle-write.slang

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//TEST(compute):COMPARE_COMPUTE: -compute -shaderobj -output-using-type
22
//TEST(compute, vulkan):COMPARE_COMPUTE: -vk -compute -shaderobj -output-using-type
33
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl -output-using-type
4-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
54

65
// Test that matrix swizzle writes work correctly
76
// Matrix swizzles can either be one or zero indexed

tests/pipeline/compute/compute-system-values.slang

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//TEST(compute):COMPARE_COMPUTE: -shaderobj
44
//TEST(compute):COMPARE_COMPUTE: -cpu -shaderobj
55
//TEST(compute):COMPARE_COMPUTE:-slang -shaderobj -mtl
6-
//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
76

87
//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer
98
RWStructuredBuffer<int> outputBuffer;

0 commit comments

Comments
 (0)