Repository navigation
fix(agc): retire an undrawn filled multisampled color target that a guest access overlaps - #9186
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
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/dri device 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:
- The PR discussion records agreement with #8223's author that #8223 lands first and this PR rebases onto it. The current checklist still says
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. - This head is 1,198 commits behind current upstream
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.
bec71a2 to
00bd480
Compare
00bd480 to
c61789c
Compare
|
Validation datapoint on a second title — negative for this case, but it narrows the map. Assassin's Creed Shadows (PPSA20397), RTX 3070 driver 617.42, Windows 11, The guard's So this title's failure is the other half of the space your flag splits: it needs actual guest access to host-resident samples (the #9892 direction), not undrawn-target retirement. DS2's undrawn-fill case and ACS's drawn-target case are now distinguished — the flag works exactly as designed, ACS just lands on the still-thrown side. |
c61789c to
820fd96
Compare
820fd96 to
1c73656
Compare
1c73656 to
b966180
Compare
adriadam10
left a comment
There was a problem hiding this comment.
@MarcZX10 both points of your review are addressed on the current head:
- The body now says
Depends on: #8223. - The branch is rebased onto current
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.
…uest access overlaps
…ill cleared guarded
b966180 to
b6bfc78
Compare
|
Rebased onto @MarcZX10 the requested changes are in, could you take another look? |
|
Context datapoint from a title run (PPSA20397 / Assassin's Creed Shadows, RTX 3070). We hit the same guard this PR relaxes — What unblocked it for us: treating a draw's color-target binding over a guarded MSAA range as a destructive alias and retiring the overlapped target at bind time — same semantics as the existing |
Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.
|
Re-checked on b6bfc78: the rebase over #9450 only changes |
boykopovar#9186 and the one-fragment FMASK guard changed the guard bookkeeping that this branch moved into TargetUse. TargetUse now holds boykopovar#9186's hostOnly next to the write stamp and the claim mark, and every guarded range points to it, the 8-sample FMASK range included. The one-fragment FMASK range keeps its fmask flag and gets a TargetUse of its own, but claims skip it, so it still refuses every guest access as on main. guard() returns void again; the color footprint is guardedColorBytes(), which the draw stamp also uses. A guarded access retires every overlapping range when each can retire: its samples are not host-only, another target was bound over it since its last use, or the CPU wrote the accessed bytes since then. Otherwise it refuses and retires nothing, as boykopovar#9186 does. holdHostOnly also stamps a use, since a dispatch's storage view or an absorbed fill uses the target like a draw. CheckOverwrittenTarget and CheckClaimedTargets run after main's sampling test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's #9186 adds a host-only flag to guard(), whose byte count this branch moved into guardedColorBytes; the merge keeps both.
Main's #9186 extends the multisampled color target debt entry right after the type-0 and type-1 descriptor entry this branch rewrites. The merge keeps both entries.
Takes boykopovar#9533's merge of main, which brings in boykopovar#9186's host-only flag for guard(). No conflict here.
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
mainb7a451d.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, fix(agc): retire a multisampled color target the title wrote over #8223 and fix(shader): gather a 3D image's image_gather4_lz from one slice as measured #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)