fix(agc): a replaced device's unit shadows leave the registry #373
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/373"
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 MichonGoddijn231849 on 2026-10-02T16:15:34Z.
What
At the first present, the windowless device is replaced by one with a window.
PrepareForReplacementpublished the replaced device's unit shadows, but they stayed registered.UnitShadow's lookups take the shadow whose import starts nearest below an address. A stale entry of the old device there hid the live import's shadow.AnyShadowedOverlapsthen reported nothing, and an upload detiled the import's stale bytes instead of the shadowed write-back results.DestroyShadows) once it is idle and they have been published.In GTA V this made a cube map read stale bytes, although its six faces had just been rendered and written back.
Related: #284 frees the replaced device's host imports. This PR drops its unit shadows. The two touch different code and work independently.
Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
main.ctest: all tests pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository🤖 Generated with Claude Code