fix(agc): retire an undrawn filled multisampled color target that a guest access overlaps #9186
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9186"
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 fma-rc on 2026-10-21T14:43:00Z.
What
A multisampled texture that a shader reads before any draw rendered to it becomes a multisampled target filled from its guest memory, and that memory is guarded like a drawn target's: the next guest access to it throws
overlaps multisampled color target ... whose samples are only on the host: guest access to it is not implemented. Death Stranding 2 (PPSA02015) stops there on both GPUs, at a compute shader's storage image access over such a texture:The samples of such a target are still the memory's bytes, so nothing is lost by dropping it. Each target now carries a flag for whether its samples exist only on the host. A drawn target, a recreated one, one a dispatch's storage view writes and one that absorbs a color fill set it; a target filled for sampling starts without it. A guest access over a target without the flag retires it the way an unmap does and goes on; it is rebuilt from guest memory at its next use. A target with the flag throws as before. The debt entry for multisampled color targets records the rule.
#8223 also retires multisampled targets on guest access, when the CPU wrote over a target's memory since the last draw. That does not cover this case: the shader access comes from the GPU with no CPU write in between, and DS2 stops at the same line with #8223 applied. The two change the same function and conflict; I merged them for the DS2 run below (each target keeps both #8223's write stamp and this flag), and with both, the test's #8223 cases and the new ones pass together on the RTX 5080. Whichever lands second takes the merged version; this PR depends on #8223 and I rebase it onto
mainonce #8223 is in.Tested
Arch Linux, rebased on
mainb7a451d62b.agc_driver_sample_multisample_targethas new cases: a 4x texture sampled before any draw is retired by a guest access, and a later load reads the memory's new value; a guest access over a drawn target is still refused; one over an undrawn texture a dispatch wrote, or one that absorbed a fill, is still refused, and the absorbed fill's value is kept. Withmain'sMultisampleTarget.cppthe test fails on the RTX 5080, the Radeon 610M and lavapipe at the first new case (a storage image access ... overlaps multisampled color target ...); with the change it passes on all three.mainwith PR 5426, PR 7978, PR 6565, PR 6182, #8223 and #9183 (needed to reach this shader): without this change the RTX 5080 stops at the line above at 132 s and the 680M at 184 s; with it both run on to the next stop,color targets with fewer fragments than samples (EQAA) are unsupported(RTX 5080 at 93 s, frame 117; 680M at 157 s, frame 86, picture visible).VK_LAYER_KHRONOS_validationenabled,agc_driver_sample_multisample_targetpasses on the RTX 5080 with no validation messages, on the merge base and with the change.tools/check_conventions.py --base origin/mainpasses.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T07:50:56Z.
Review: DISMISSED
The regression target and the change are scoped to the undrawn, guest-backed multisampled texture case, and the PR description contains useful A/B evidence. Its validation-layer report names the same 23 tests on main and the change, required environment variables, selected GPU, and states that neither run had a missing-layer warning or a VUID line. I could not independently reproduce GPU tests here: this environment has no
/dev/dridevice or Vulkan tools, and the hosted product jobs are skipped. Treat the detailed GPU results as author-reported evidence.I need the branch coordination and base updated before this is merge-ready:
Depends on: none, and the overlap report confirms both PRs changeMultisampleTarget.cppand its retirement path. Please setDepends on: #8223and rebase this combined change onto the agreed #8223 head after it lands (or coordinate a different order with that author and update both PRs). Keep the CPU-write/claim behavior and this PR's host-only behavior together, as in the combined test report.main(3 commits ahead); the merge-tree is clean, but CONTRIBUTING requires branches to stay current. Please update it to currentmain, then refresh the overlap report and rerun conventions plus the focused validation-layer A/B suite on the rebased head.The current hosted checks show conventions, eligibility, intake, labels and report passing; Linux, Windows and product-test jobs are skipped. My local current-main diff check and convention check pass, and the merge-tree is clean. I am requesting changes for the agreed dependency/base update, not for a failure in the reported GPU test results.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-24T07:21:18Z.
Review: CHANGES_REQUESTED
@MarcZX10 both points of your review are addressed on the current head:
Depends on: #8223.main(Linux build and ctest passed on the rebase, 971/971;MultisampleTargetStorageViewfrommainis combined with this PR's host-only check).Remaining: this PR rebases onto #8223 once that lands (it is still open and conflicting with
main), keeping its CPU-write stamp together with the host-only flag. @MarcZX10, could you re-review so the merge queue stops refusing it on the old request? Nothing else is pending on the author's side.