Merge pull request #643 from wheremyfoodat/wheremyfoodat-patch-2

Tests: Enable accurate multiplication in shader JIT tests
This commit is contained in:
wheremyfoodat 2024-11-23 20:36:24 +02:00 committed by GitHub
commit 0089d73588
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<nihstro::InlineAsm> 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]);
}
}