Repository navigation
Conversation
`copy_back_marks` skipped a whole 64 KiB marked page when any withheld range (a list whose shaders read memory with no copy) overlapped it, so another list's valid write on that page never reached title memory: the later per-range copy-back has no snapshot for marked pages (#1976). One page bit cannot say whose write a byte is, so the page now goes back as usual except the bytes inside withheld ranges, which stay as they are in title memory and in the copy (as `keep_writes` leaves them). The page is taken as before, so the next submission's marks on it go back normally. Undeclared (directly indexed) writes on the page still go back: only withheld bytes are held. Test: two lists' writes on one marked page, the second withheld: the first reaches title memory, the second stays in the copy only; then the same page's next marked write goes back, a withheld range on the other page leaves this one alone, and with nothing withheld both pages go back. Fixes #1976. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent run on Windows 10 19045 with an RX 7800 XT (RDNA3), your head at the time of writing:
So the same-page case behaves the same on AMD as in yualk's NVIDIA/WARP fixture: the valid write at 64 and 128 reaches title memory, the withheld 4 bytes stay in the copy and out of title memory, and the no-withhold case publishes both pages. On the code: clipping (The one failing test in |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Withheld range holds back only its own bytes of a marked page (fixes #1976) — third PR in the cluster (#1986, #1998, #2004); all three should be compared and one chosen.
|
RTX 5070 (Blackwell, driver 621.24), Ryzen 7 5700X, Windows 11, Rust 1.98.1 MSVC. No game files, unit tests only. Head One note: in one earlier combined run ( #1998 covers the same issue (#1976); it also passes here. Written with AI help (Claude/Kiro); the numbers are from runs on my machine. |
|
Triage verdict — Consolidate with #1998 ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
|
I tested the next-refresh concern raised above on Windows/RTX 3080 with the same synthetic fixture on
This PR failed 3/3: the refresh copied zero bytes and the second copy-back overwrote the title-side value with the previously withheld bytes. #1998 passed 3/3 and all seven shadow tests passed with the added probe. As a causal check, I locally prevented this PR from calling AI-assisted (OpenAI Codex). |
|
Correction to my verification above: I only checked the first submission and the full-page/no-withhold cases, which pass. @jeremygold02's next-refresh fixture (a title-side write into a withheld range, then a refresh and a second copy-back) fails 3/3 here — the unconditional @Halfect's #1998 keeps the same regression and only marks a page taken when no withheld range was left different; it passes that fixture on an RTX 3080 (jeremygold02) and its six shadow tests pass on my AMD host. That is the one I would land for #1976. |
|
Thanks @BaggyALPHA, @jeremygold02 and @Calvix2k. You're right: calling I checked #1998 at So #1998 covers everything this PR does and the case it gets wrong. I'm closing this in its favour for #1976. AI-assisted (Claude Code). |
Fixes #1976. Claimed on #1633 at 02:21:19 UTC.
Bug:
copy_back_marksskips a whole 64 KiB marked page when any withheld range (a list whose shaders read memory with no copy) overlaps it. So another list's valid write on that page never reaches title memory, because the later per-rangecopy_backhas no snapshot for marked pages. This is exactly @yualk's fixture: same-page marked + miss retires00 00 00 00for both ranges.Fix: one page bit can't say whose write a byte is, so
copy_back_markednow takes the page's withheld byte ranges as holes:keep_writesleaves them and as the whole skipped page used to be.Test:
shadow::tests::a_withheld_range_holds_only_its_own_bytes_of_a_marked_page(synthetic, no game data):Without the fix it fails at step 1 (
[0,0,0,0]instead of[5a,5a,5a,5a]), the issue's symptom.Compared with the two other open PRs for this issue. I ran the same test against each one's head on the same machine:
0vs5a)0vs3c)0vs3c)withheld_ranges_are_cut_out_without_losing_the_gaps:(131122, 131152)vs(131122, 131172))The "next marked write" row is the case I got wrong first myself: leaving the page not taken keeps it marked as changed, and its next marked copy-back is then kept back as a title-changed page. Happy to have this folded into whichever PR the maintainers prefer.
Checked on an RTX 3050 6 GB Laptop (Linux, Proton 11, vkd3d-proton, real device):
victory-gputests: 130 passed / 14 failed. The 14 are identical to plain940d32fon this host (the view heap is capped at 1,000,000, plus vkd3d root-signature refusals).-D warningsis clean, with and withoutdiagnostics.cargo xtask policypasses. rustfmt adds no new differences.main(VRAM), so the world's marked pages weren't exercised in-game.AI-assisted (Claude Code).
🤖 Generated with Claude Code