Repository navigation
feat(agc): reuse unchanged untracked draw input copies - #13793
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.
|
|
Windows GPU run of head Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release,
AI-assisted: yes (Claude Code). |
✅ NVIDIA GPU test: passedPR head
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (2, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 702 tests)Skipped (42)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
GPU test run on PR head Limitation: no Vulkan validation layer is available on this machine, so no VUID comparison is possible; runs are functional-only. Negative control: the two new ctest names (
Focused findings: none. All focused tests passed on every PR-head run, and |
a7ee78e to
4380bb4
Compare
CnRJay
left a comment
There was a problem hiding this comment.
Review of the consumer commit on top of #13784.
-
The stated purpose is to skip rereading guest bytes for untracked vertex/index copies, but the PR carries no number for it: "No title or performance claim", "Not tested: titles ... or performance", "Unblocks: none". The change is on by default (
APS5_NO_OWNED_DRAW_INPUTSis an opt-out,Draw.cppcallsArmOwnedDrawInputfor every untracked copy). A default-on change to the draw path needs the title/scene where untracked copies dominate andtools/trace_digest.pysummaries of main and the change from the same machine. As written the cost is certain (arm + proof capture on every untracked copy,GetWriteWatchper 64 KiB block under the mapping mutex) and the benefit is unmeasured. -
On Linux
GuestArenaArmOwnedreturns false, so every copy still goes through the old path and pays the extraArmOwnedDrawInputattempt (includingPendingWriteOverlapsandAssertGpuLockHeld). Linux gets overhead and no reuse. Please show that the refused path is free, or gate the attempt on a capability query once. -
The reuse hit rate is not observable. Please add a counter (armed / reused / refused / invalidated) so a trace can show whether the cache is doing anything on a real title; otherwise the entries sit in the existing input-cache budget and may evict copies that were being reused by the current path.
-
The negative control cited is the historical 6a691f build with a transplanted fixture, not main plus this commit, and the late-arm/stamp controls were "not rerun". For a correctness-by-proof feature (stale vertex data reaching the GPU if a proof is wrong) I would want the mutants re-run on this head.
Also, since this is stacked, please make sure #13784 is settled first; its mapping-mutex cost and unbounded token maps carry straight into this one.
4380bb4 to
db03314
Compare
|
@CnRJay I restacked this on #13784 and changed the draw path in Both owned-input tests passed three times each on Windows/NVIDIA and Linux/llvmpipe with validation enabled. On Linux, the previous compiled draw object references both owned-token operations and the updated object references neither. I reran the late-arm and late-stamp controls on Windows: each made both tests fail at the intended assertion, and both passed after I restored the candidate. Three neighboring draw-copy and pending-write tests passed on each platform. I haven't measured a title or added the requested reuse counters yet; the parent also still has the map-growth and per-block-cost questions described in its review. Would you take a look at the Linux gate and the refreshed controls when you have a chance? I'm continuing with the remaining items. |
db03314 to
38e401f
Compare
|
@CnRJay I added the requested draw-input observability: the trace summary now records arm attempts and outcomes, proof and arena checks, requested 64 KiB blocks, reuse, invalidations, and capacity evictions. An event on an unbound thread or a full totals table marks the trace incomplete. On the exact merge with main I still don't have a title-scene comparison, real-scene block counts or tracing-overhead measurements. #13784's long-lived map growth and per-block cost also remain open. Would you take a look at whether the counters and their limitations provide the observability you asked for? |
Keep exact vertex and index snapshots when libc write-watch tokens and driver write evidence still prove their bytes unchanged. Capture proofs before reading and retain the existing copied path for refused ranges. Count owned-input arm, refusal, reuse, invalidation and cache eviction in trace summaries, including incomplete accounting and interval output. Exercise write evidence, trace loss and bounded-pool eviction paths. AI-assisted: yes
38e401f to
f23fc63
Compare
|
@CnRJay I restacked this on #13784's bounded token and pending maps in |
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (5, not in the main baseline's validation pass)Validation IDs already present on main (5 IDs in 715 tests)Skipped (51)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
@CnRJay @TechLevelZero I merged current main through |
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (5, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 751 tests)Skipped (52)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
A concrete Windows workload to consider for the missing real-scene measurement is Astro Bot PPSA21567 in issue #14820. Its report measures roughly 3,000 draws per frame and about 88 ms of draw-committer work in a 102 ms frame. That does not establish that untracked vertex/index fallbacks are frequent there, so the new |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (5, not in the main baseline's validation pass)Validation IDs already present on main (13 IDs in 548 tests)Skipped (49)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
GPU validation-layer run of head Setup. CachyOS x86-64, kernel 7.3.1, AMD Radeon RX 9070 XT (RADV GFX1201), Mesa 26.2.5, Vulkan 1.4.363 loader, GCC 16.2.1, Ninja, Release, Results.
One scoping note, matching AI-assisted: yes |
|
GPU test results for this PR on real hardware (CI runs GPU tests on lavapipe only). Setup: NVIDIA GeForce RTX 4080 SUPER, driver 621.14, Vulkan 1.4, Windows 11 Pro, Ryzen 7 7800X3D, WinLibs GCC 15.2.0, Release. This PR's head Command, run on both:
This covers correctness and validation only, not performance. 🤖 Generated with Claude Code |
Resolve the conflicts with boykopovar#13793: its owned draw inputs keep their own proof; the plain snapshots keep the forget serial, and an owned input's entry records the forget serial read when its proof was armed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves the overlap with the owned draw inputs of boykopovar#13793: an owned entry keeps the vertex window it was copied from and the lowest index, and is only reused by a draw that starts inside that window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Stacked on #13784; please review the last commit only.
Untracked vertex/index copy fallbacks always reread guest bytes. Reuse an exact address/size/use snapshot when libc write-watch tokens and AGC write evidence still hold. Flush pending writes before lookup, capture the proof before reading, and validate that original proof when keeping the copy. Entries share the existing input-cache limits. Refused ranges copy normally. On non-Windows platforms the draw path bypasses owned-token lookup and arming, because the current libc token implementation is Windows-only.
The branch is restacked on #13784, including its pending-page merge fix. In-place inputs and zero-padded reads keep their existing paths. Trace summaries count arm outcomes, proof checks, arena calls, requested blocks, reuse, invalidation and input-pool evictions; an unbound event marks the trace incomplete. Requested blocks are not exact syscall counts. No title or performance claim.
#9875 also changes draw-copy range metadata; #9712 changes copy allocation policy; #12921 handles untracked shader-resource proofs. #13809 extends these owned proofs to storage. The current overlap scan could not complete 98 shared-file comparisons; 29 include implementation files and need composition review if those branches land.
Tested
After restacking on the bounded parent, the current-main storage-stack merge passed 10 selected Windows tests and seven Linux tests three times each. Linux cannot exercise Windows write-watch.
Based on
main66e1f7f plus #137844b26f5d61b. Exact merge with main93dbd0f82a: Windows 11 / MinGW-w64 GCC 15.2.0, NVIDIA RTX 3080 Laptop, validation 1.4.363: six focused tests passed three times; Ubuntu llvmpipe, validation 1.3.275: five passed three times. No reported VUIDs or skips. Linux lacked asynchronous UFFD write protection and uses the non-owned fallback.The two-block fixture checks requested-block counts; trace-window, unbound-thread and input-pool eviction fixtures check summary output and incomplete captures. On the earlier head
db033149f7, late-arm and late-stamp mutants failed both owned-input tests; restored candidate passed. Three neighboring cases passed once per platform on that earlier head.Not tested: macOS runtime, title scenes, console behavior, title performance or tracing overhead. No real-scene block count is claimed.
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)