summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkaizhangNV <149626564+kaizhangNV@users.noreply.github.com>2024-11-05 13:40:08 -0600
committerGitHub <noreply@github.com>2024-11-05 11:40:08 -0800
commit0336a3a8db7f50dcbb21b11a94fb1e4f31d946eb (patch)
tree81f433a0d86ddfab9137e9052e7f299e5ce2235c /tests
parentfc7de92000aa378da32c830ad0999eb46729ad43 (diff)
Fix issue of infinity float literal (#5489)
* Fix issue of infinity float literal * add parameters for the test * Correct the way to construct inf and nan In WGSL, expression of "1.0/0.0" is not allowed, it will report compile error, so to construct infinity or nan, we have to assign the float literal to a variable and then use it to bypass the compile error. By doing so, we add getInfinity and getNan functions to the builtin prelude to wgsl. --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/inf-float-literal.slang4
-rw-r--r--tests/expected-failure-github.txt1
2 files changed, 2 insertions, 3 deletions
diff --git a/tests/bugs/inf-float-literal.slang b/tests/bugs/inf-float-literal.slang
index b523329df..3c919d0ab 100644
--- a/tests/bugs/inf-float-literal.slang
+++ b/tests/bugs/inf-float-literal.slang
@@ -1,7 +1,7 @@
//TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj
//TEST(compute,vulkan):COMPARE_COMPUTE_EX:-vk -slang -compute -shaderobj
//TEST(compute):COMPARE_COMPUTE_EX:-cpu -slang -compute -shaderobj
-//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-wgpu
+//TEST(compute):COMPARE_COMPUTE_EX:-wgpu -slang -compute -shaderobj
//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
@@ -24,4 +24,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
}
outputBuffer[idx] = a;
-} \ No newline at end of file
+}
diff --git a/tests/expected-failure-github.txt b/tests/expected-failure-github.txt
index 9fe6d72f7..150e36ad1 100644
--- a/tests/expected-failure-github.txt
+++ b/tests/expected-failure-github.txt
@@ -32,7 +32,6 @@ tests/bugs/gh-3980.slang.7 syn (wgpu)
tests/bugs/gh-471.slang.1 syn (wgpu)
tests/bugs/gh-518.slang.2 syn (wgpu)
tests/bugs/gh-566.slang.1 syn (wgpu)
-tests/bugs/inf-float-literal.slang.3 syn (wgpu)
tests/bugs/mutating/resource-specialization-inout.slang.1 syn (wgpu)
tests/bugs/nested-switch.slang.3 syn (wgpu)
tests/bugs/obfuscate-specialization-naming.slang.2 syn (wgpu)