citra/src/tests
Wunk 52f06f757f
shader_jit: Fix/optimize conditional evaluation (#234)
* shader_jit: Add conditional unit-tests

Tests all permutations of X, Y, AND, OR with each possible input value.

* video_core: Fix shader-interpreter conditional-code initialization

Rather than reserving the incoming state of the conditional codes, the
shader-interpreter was setting them both to false. In pretty much all
cases, the initial state of a shaderunit can be zero-initialized
statically. Just running the interpreter shouldn't necessarily reset the
conditional codes though.  The JIT loads incoming conditional codes
while the shader-interpreter resets them to false. This makes the
interpreter match the behavior of the shader-jit.

* shader_jit_a64: Fix/optimize conditional evaluation

Fix some of the regressions introduced by the previous optimization.
EOR does not support a constant of `0` in its immediate. In these cases
the COND{0,1} registers can be utilized immediately.

* shader_jit_x64: Fix conditional evaluation extended-bit hazard

The unit test seems to have identified a bug in the x64 jit too. The x64
jit was doing 32-bit comparisons despite the condition flags being 8-bit
values and is sensitive to garbage being in the upper 24 bits of the
register. This is fixed by using the proper 8-bit register types rather
than the 32-bit ones(`eax,`ebx` -> `al`, `bl`).

* shader_jit_x64: Zero-extend conditional-code bytes

`mov` was doing a partial update of bits within the register, allowing
garbage to be introduced in the upper bits of the register.
2024-08-20 10:19:04 +02:00
..
audio_core AudioCore/HLE/source: Partially implement last_buffer_id (#7397) 2024-02-05 09:54:13 -08:00
common code: Use std::span where appropriate (#6658) 2023-07-07 01:52:40 +03:00
core kernel: Update to use atmosphere macros and correct Result (#7242) 2023-12-31 09:01:40 -08:00
video_core shader_jit: Fix/optimize conditional evaluation (#234) 2024-08-20 10:19:04 +02:00
CMakeLists.txt shader_jit/tests: Test both the shader interpreter and jit (#72) 2024-07-04 08:42:31 +02:00
precompiled_headers.h Port yuzu-emu/yuzu#9300: "CMake: Use precompiled headers to improve compile times" (#6213) 2022-12-17 16:06:38 +01:00