mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
c2cf5ffd03
The worker only ran inside the emulation thread's pacing idle window, so heavy scenes (short windows) lost their in-between frames. It now runs as soon as a job is queued, on its own core, bounded by the job's own presentation period. Shared state that made concurrent runs crash or race, now per thread: - render_pass_mmio_read_allowed could longjmp to the emulation thread's synchronous-pass jump buffer from the worker (instant crash). The abort state (s_abort_jmp, s_abort_armed, s_pass_cpu, s_device_read_fault, s_attempt) is thread-local, and a private execution aborts its own job through g_psx_execution_abort. - The VRAM dirty mask: marks from the worker's private snapshot are dropped (gpu_vram_dirty_set_private_thread). Plan changes already quiesce (join) the worker before the hook table is rebuilt. R4 release, RTX 4080 8K, driven lap, DXGI on-screen count: 4/4 runs stable (was 1 crash in 2); 50-60 distinct/s on straights. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>