fix(agc): snapshot host shader prologues before frame replay #12871
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12871"
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 JJenkx on 2026-10-29T13:22:06Z.
What
Shader registration and ABI calls made before a frame-capture trigger are saved in the replay prologue. Their host-resident headers and code can lie outside registered guest allocations, so the initial snapshot omits them and strict replay cannot read the shaders.
Collect the host pages referenced by those calls while waiting and snapshot the still-readable pages at the capture boundary, before writing the prologue. Reuse the existing shader-page traversal, preserve read-only permissions, skip already-covered pages, and retain in-frame shader deltas.
Three regressions cover separate host code, host-resident header/code, and read-only header/code registered before the trigger. Existing shader controls retain their entry point. Read-only merge previews compose cleanly with the fetched heads of #11435, #11436, #12567 and #12568; their additional controls are retained. This is independent of the unwatched-memory fallback offered on #12568 and does not supply that fallback. Existing stale/freed historical shader-registration limitations remain documented under Frame replay debt.
Tested
Linux Release, GCC 16.2.1, AMD Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.4, kernel 7.2.9-arch1-1. Exact head
ca858917b0cb25d494e692d2835b8d21f71f9009, based directly on main5454cd2e455994d992aca39335ce60507eeda1eb.863bda70fe062decbefbd8a1b89efc6dc5ce9321, unchanged recorder implementationThe main and change focused gates used the same machine/GPU,
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and Mesa shader cache disabled. Both confirm the actual RX 6650 XT and validation-layer insertion; zero skips, missing-layer messages or VUIDs. The library stayed byte-identical through each gate. These gates include CPU serialization checks as well as hardware tests; this is not a claim that every group creates a GPU device.Conventions and whitespace pass. A read-only merge preview against upstream
157b02c4f1803e9d2cd757677b9a805961203fc4is clean. No new Windows execution, title replay fidelity, lighting or FPS improvement is claimed. The private title capture is separate and does not establish replay fidelity.Source proof, negative/positive controls, builds, device-access traces and paired focused logs/JUnit, SHA-256
4a207cef8510163045dd48338a6742fc49184141d5aa803e762622fed638ce17(download verified). No game memory, assets or binaries.GitHub Windows CI passed for head
ca858917b0cmerged into main. Its configure and host-only linking workflow steps succeeded; the full library build, CTest execution and test-skip checks were skipped. This is limited CI coverage, not Windows runtime or physical-GPU qualification.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)