summaryrefslogtreecommitdiffstats
path: root/tests/cross-compile/fmod.slang
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-05-02 11:56:13 -0700
committerGitHub <noreply@github.com>2024-05-02 11:56:13 -0700
commitf7d54af67e026feb2546af1deaf2513a36f8516e (patch)
treec751573fbfceb114eeac6217bb3ccc4c13f19ef2 /tests/cross-compile/fmod.slang
parent679a457940027420817a85070b3fdb9bfc0cca2e (diff)
Fix fmod behavior targetting GLSL and SPIR-V (#4080)
* Fix fmod behavior targetting GLSL and SPIR-V The default implementation of fmod was doing "Modulo" operation when "fmod" in HLSL should do "remainder" operation. * Fix a mistake in `fmod` GLSL target When using __intrinsic_asm, the "if" logic wasn't emitted. "__intrinsic_asm" had to be called from a new function and `fmod` had to call it. Alternatively, I am using `operator?()` to workaround. A similar modification is made to `roundEven()` hoping for a better performance.
Diffstat (limited to 'tests/cross-compile/fmod.slang')
-rw-r--r--tests/cross-compile/fmod.slang3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cross-compile/fmod.slang b/tests/cross-compile/fmod.slang
index 6efff35b3..16ecf072a 100644
--- a/tests/cross-compile/fmod.slang
+++ b/tests/cross-compile/fmod.slang
@@ -4,7 +4,8 @@
// expected output on Vulkan/GLSL.
//TEST(compute):COMPARE_COMPUTE:-dx11 -compute -shaderobj
-//TEST(compute):COMPARE_COMPUTE:-vk -compute -shaderobj
+//TEST(compute):COMPARE_COMPUTE:-vk -compute -shaderobj -emit-spirv-via-glsl
+//TEST(compute):COMPARE_COMPUTE:-vk -compute -shaderobj -emit-spirv-directly
//TEST_INPUT:cbuffer(data=[4 0 0 0]):name=C
cbuffer C