diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-11-05 07:32:49 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-05 21:32:49 +0800 |
| commit | 53dd5928c35d5a5cb1f7d2a563348fd1fa87d672 (patch) | |
| tree | 861ecbb07d61ed85c4e9d9e0e5387eb386560b3e /tests | |
| parent | 7c2ff54758d26b73074fd14143ecd843ba685e0d (diff) | |
Fixing the wrong implementation of some math intrinsic (#5491)
* Fixing the wrong implementation of some math intrinsic
Close the issue #5282
The root cause of the issue is that log10 is not supported in wgsl.
So add the implementation.
Also ldexp in wgsl doesn't support float type exponent, so fix the
implementation of the intrinsic.
* re-enable the tests
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/expected-failure-github.txt | 2 | ||||
| -rw-r--r-- | tests/hlsl-intrinsic/scalar-float.slang | 2 | ||||
| -rw-r--r-- | tests/hlsl-intrinsic/vector-float.slang | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt index b064af9ad..3c318993a 100644 --- a/tests/expected-failure-github.txt +++ b/tests/expected-failure-github.txt @@ -69,8 +69,6 @@ tests/hlsl-intrinsic/classify-float.slang.5 syn (wgpu) tests/hlsl-intrinsic/matrix-float.slang.6 syn (wgpu) 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/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-intrinsic/scalar-float.slang b/tests/hlsl-intrinsic/scalar-float.slang index 148e1b696..a32fe8f6c 100644 --- a/tests/hlsl-intrinsic/scalar-float.slang +++ b/tests/hlsl-intrinsic/scalar-float.slang @@ -4,7 +4,7 @@ //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj //DISABLED_TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -shaderobj //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cuda -compute -shaderobj -//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu +//TEST(compute):COMPARE_COMPUTE_EX:-wgpu -compute -shaderobj //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer RWStructuredBuffer<int> outputBuffer; diff --git a/tests/hlsl-intrinsic/vector-float.slang b/tests/hlsl-intrinsic/vector-float.slang index de5decfec..380131a89 100644 --- a/tests/hlsl-intrinsic/vector-float.slang +++ b/tests/hlsl-intrinsic/vector-float.slang @@ -3,7 +3,7 @@ //TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -dx12 -use-dxil -output-using-type -shaderobj //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-vk -compute -output-using-type -shaderobj //TEST(compute, vulkan):COMPARE_COMPUTE_EX:-cuda -compute -output-using-type -shaderobj -//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu +//TEST(compute):COMPARE_COMPUTE_EX:-wgpu -compute -output-using-type -shaderobj //TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name outputBuffer RWStructuredBuffer<float4> outputBuffer; |
