Repository navigation
fix(agc): land pending write-backs over a remembered image table's entries before proving it - #16095
Conversation
…g over one of its entries A dispatch that writes guest memory it could not import leaves its results in a copy until the batch is reaped; the store into guest memory, and its stamp, come with the write-back. The image-table steps so far wait for the device after every dispatch, so a table was never looked up with such a write-back still pending over one of its kept entries. The new step runs in a block that cannot be imported: two dispatches of a table (one walk, one reuse), then a dispatch that samples the table and writes its output over entry 13's texels, recorded without a wait, then a dispatch that samples entry 13. That dispatch has to see the written texels, and its table has to be resolved again. Where the write-back is not left pending (the entry is host-imported, or the device landed the write already), the step says so and tests nothing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tries before proving it A remembered image table was proved current first (no pending image store over its ranges, no stamp on its entries' memory since their lookups) and only then, entry by entry while binding, were the copied write-backs still pending over each entry's range completed. A write-back that landed there stored into guest memory after the proof had passed, and the table bound the texture remembered from before the store for that use. The walk completes the pending writes of an entry before its lookup, and the full revalidation completes them before its proof. The completion moves from the bind loop to before the proof, so a store it makes is seen by the proof and the table is walked. If a completion moved the table state, the table is not used. With nothing pending anywhere the new loop is not entered. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT, AMD driver 26.10.1. Run with
AI-assisted: yes. |
✅ 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)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validation IDs already present on main (9 IDs in 588 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. |
|
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.
|
What
A remembered image table is proved current (
TableCurrent) before the copied write-backs still pending over its kept entries are completed:resolveImageTablescompletes them per entry while binding. A write-back that lands there stores into guest memory after the proof has passed, and the table binds the texture remembered from before the store, for that one use. The walk completes an entry's pending writes before its lookup, andrevalidateFullcompletes them before its proof.test(agc): a step inagc_driver_image_table_reuse. In a block that cannot be imported: two dispatches of a table (one walk, one reuse), then a dispatch that samples the table and writes its output over one entry's texels, recorded without a wait, then a dispatch that samples that entry. On main it fails withAGC graphics: image table reuse: a table used while a dispatch's write-back was pending over an entry sampled the entry's old texels (3 reused and 1 resolved tables in the step). Where the write-back is not left pending (the entry is host-imported, or the device landed the write already) the step prints a line and tests nothing; without a write watch it returns like the rest of the file.fix(agc): the completion moves from the bind loop to before the proof, so a store it makes is seen by the proof and the table is walked. If a completion moved the table state, the table is not used. With nothing pending anywhere the new loop is not entered.Not covered: the same order for stale depth planes over a kept entry (the walk's lookup flushes them, the reuse path does not). That needs a draw with a depth target in a table test and is not in this PR.
Related: #6937 (closed unmerged by its author) went after the same class from the other side, refusing the reuse when a recorded copied write overlaps a kept entry's range. This PR lands the writes first, as the walk does. #6340 replaces this block and keeps the completion after
TableCurrent(*previous); whichever lands second keeps it ahead of the proof. Open #15563 (the test file) and #9508 (theFindReusedTableline) change lines this PR changes; I am happy to rebase behind either.Tested
Head 50e4bed is this PR's two commits on upstream/main 080dbd0.
ctest -V -R '^agc_driver_image_table_reuse'(both registrations) withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1, on an AMD Radeon RX 9070 XT (RADV GFX1201, Mesa 26.2.4) and on lavapipe (llvmpipe, LLVM 23.1.1, Mesa 26.2.4). The loader's debug log showsVK_LAYER_KHRONOS_validationinserted; no log reportswas not found but was requested by env var VK_INSTANCE_LAYERS.main+ the test commit: both registrations fail on both drivers with the line above; the step's "was not left pending" line does not print. NoVUID-.VUID-.ctest -R '^agc'on the RX 9070 XT, without the validation layer: 3 of 1326 fail with the test commit, 1 of 1326 with the fix. The two registrations above are the only difference.agc_driver_tessellationfails (segmentation fault) on both sides, and the same tests skip on both.python3 tools/check_conventions.py --base upstream/main: passes.No title effect 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)🤖 Generated with Claude Code