Erik Abair f7ec4e668b nv2a: Invalidate cache when mixing swizzled tex and linear surface
Tron 2.0 uses a pattern of setting a particular region of memory as a swizzled
texture, temporarily setting it as a linear render target in order to invoke
NV097_CLEAR_SURFACE in order to clear it, then switching back to use as a
swizzled texture.

xemu incorrectly uses the previously cached texture after the surface clear,
causing stale data to be used for rendering rather than the cleared data that
would be used on HW.

Bonus fix: The surface writeback loop was updating `surface` in a way that I
believe was unintentional. Switched to using a separate iterator so that cases
with multiple overlapping surfaces won't modify the previously detected surface
when it's used later in the function.

Test: https://github.com/abaire/nxdk_pgraph_tests/blob/c6755886df253dfe23995d87e371ba80099813a6/src/tests/texture_render_target_tests.cpp#L469
HW results: https://abaire.github.io/nxdk_pgraph_tests_golden_results/results/Texture_render_target/index.html

Fixes #2036
2026-10-18 13:57:57 -07:00
2026-01-21 18:40:07 -07:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
…
2026-01-21 18:40:07 -07:00
2025-12-05 15:37:18 +00:00
…
2025-09-18 21:21:29 +02:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
…
2026-01-18 16:36:55 -07:00
2025-11-11 22:06:09 +01:00
2025-10-01 11:22:07 -04:00
2025-07-03 13:42:28 +02:00
…
…
2025-06-11 12:17:17 +02:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
2025-09-17 19:00:56 +02:00
2026-01-18 16:36:55 -07:00
…
…
…
…
2026-01-18 16:36:55 -07:00
2026-01-21 18:40:07 -07:00
2026-06-07 16:07:43 -07:00
2026-01-18 16:36:55 -07:00
2026-01-18 16:36:55 -07:00
…
…
…
…
2026-01-04 23:38:25 -07:00
2026-01-04 23:38:25 -07:00
2026-01-18 16:36:55 -07:00
S
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme GPL-2.0
726 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.3%
C++ 6.9%
Python 3.5%
Dylan 2.7%
Shell 1.5%
Other 2.9%