fix(agc): preserve inputs for deferred buffer copies #94
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/94"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-09-28T15:21:09Z.
Summary
Fixed black frames caused by guest input buffers being overwritten before deferred GPU copies executed.
Cause
The previous fix preserved directly bound draw inputs but did not cover deferred GPU copies, which still read mutable guest memory.
Detection
Instrumentation found 12 changed bytes in the final draw's 32-byte input buffer on a black frame. Equivalent copies in adjacent correct frames had no mismatches.
Changes
Deferred GPU copies now read from preserved CPU input snapshots kept alive until GPU completion.
Buffers with pending GPU writes or shader writes remain on the existing path.
Closing the display window now requests a normal exit instead of calling std::terminate(). Shutdown cancels queued work, wakes blocked waits, joins GPU workers and background helpers, and releases GPU resources before destroying the window on its owning thread. Shutdown cancellation is handled separately from runtime errors.