mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
64292bb23d
HD texture packs matched draws on the render thread but tracked uploads and invalidations on the emulation thread, hashing gpu.c's array: a data race (crash seen in hd_texture_pack_match) and wrong identities whenever the emulation thread had already recorded a later upload. The facade now sends residency changes through an optional backend hook (hd_texture_note). The render-thread backend records them as RTH_HD_NOTE after the upload/draw they follow; the replay hashes the render thread's own VRAM copy, which the HD module now follows with the SW rasterizer (gpu_hd_textures_bind_vram). Pack (re)configuration and HD mode changes are sync points. Other backends apply the change immediately as before. The HD GL fixture gains a render-thread case (fails without this change) and links again: the scale fixture's facade stubs no longer collide with the real gpu_render.c it includes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>