mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 13:05:47 +00:00
In async mode the layer blocked the game's command recording until the NPU had finished the previous frame, and the NPU could only start once the GPU had finished that frame. CPU and GPU took turns, which is the ~18 ms per-frame stall seen in Cyberpunk with FSR 4.1 on the NPU. Now the next frame's command buffer waits on a host-set event (ev_done) before the post pass, and the event is reset on the GPU right before the retire value that starts the NPU job, so the recording thread never waits. The NPU worker sets the event after every job, also after a timeout; with no job queued it releases both events every 250 ms so a GPU wait without a job cannot hang. The job ring grows from 4 to 8 entries, and a full ring drops that frame's NPU job instead of overwriting one. Same change in the Full (fsr411_full_gpu.c) and Lite (fsr412_lite.c) NPU paths. DROIDDECK_UPSCALE_NPU_CPU_WAIT=1 brings back the old wait for A/B tests.