From a7c1ea769c8044c55bc2821c5720898d50a9f5d9 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:34:39 +0200 Subject: [PATCH] Tests: Enable accurate multiplication in shader JIT tests --- tests/shader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/shader.cpp b/tests/shader.cpp index 6b0dece85..340db0e4e 100644 --- a/tests/shader.cpp +++ b/tests/shader.cpp @@ -85,7 +85,11 @@ class ShaderJITTest final : public ShaderInterpreterTest { private: ShaderJIT shaderJit = {}; - void runShader() override { shaderJit.run(*shader); } + void runShader() override { + // We prefer to run tests with accurate NaN emulation + shaderJit.setAccurateMul(true); + shaderJit.run(*shader); + } public: explicit ShaderJITTest(std::initializer_list code) : ShaderInterpreterTest(code) { shaderJit.prepare(*shader); } @@ -364,4 +368,4 @@ SHADER_TEST_CASE("Address Register Offset", "[video_core][shader][shader_jit]") REQUIRE(shader->runVector({-73.f}) == floatUniforms[95]); REQUIRE(shader->runVector({-127.f}) == floatUniforms[41]); REQUIRE(shader->runVector({-129.f}) == floatUniforms[40]); -} \ No newline at end of file +}