Skip to content

Commit

Permalink
Merge pull request #643 from wheremyfoodat/wheremyfoodat-patch-2
Browse files Browse the repository at this point in the history
Tests: Enable accurate multiplication in shader JIT tests
  • Loading branch information
wheremyfoodat authored Nov 23, 2024
2 parents 842634e + a7c1ea7 commit 0089d73
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down Expand Up @@ -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]);
}
}

0 comments on commit 0089d73

Please sign in to comment.