Repository navigation
fix(agc): collect fresh CPU writes before a retiring depth surface stores its stale units - #16368
Conversation
…t across a retire agc_driver_depth_plane_cpu_write_after_memo_retire: the guest writes one unit of a depth plane after the thread's earlier collect of the plane in the same collect epoch, then a view of another layout retires the surface. The stale units stored at the retire must not go over the write. The flush path has agc_driver_depth_plane_cpu_write_after_memo since boykopovar#11690; this is the same write at the retire path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ores its stale units A depth surface retired for an unmatched view decides which stale units to store from a memoized collect of the plane. A guest write that landed after the thread's earlier walk of the plane in the same collect epoch stays unstamped, the unit reads as unwritten, and the store goes over the write. The flush path collects uncached before the same decision since boykopovar#11690. The retire path now does too. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Windows check of head Correction: my first run (on Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release, Radeon RX 6700 XT, AMD driver 26.10.1. Run through the Windows test queue with
AI-assisted: yes. |
|
Runs of this PR on two NVIDIA machines,
On the VM I built only AI-assisted: yes (Claude Code) |
✅ 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)Validation IDs already present on main (9 IDs in 595 tests)Skipped (55)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. |
|
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.
|
# Conflicts: # core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_depth_plane_partial_store_tests.cmake # core/libs/prx/libSceAgcDriver/tests/execution/DepthPlanePartialStore.cpp
What
A depth surface retired for an unmatched view (
retireStoringStale) decides which stale units to store fromWrittenUnits, whose collect of the plane is memoized. A guest write that lands after the thread's earlier walk of the plane in the same collect epoch is not stamped, the unit reads as unwritten, and the store goes over the write. #11690 fixed this decision in the flush path, whereFlushDepthPlanescollects uncached first. This is the same write at the retire path.test(agc): a mode of theagc_driver_depth_plane_partial_store_testsexecutable, registered asagc_driver_depth_plane_cpu_write_after_memo_retire. A depth draw covers the plane and the guest fills one unit, so the plane reads as overwritten in memory; the collect epoch moves and the plane is collected; the guest then writes descriptors into another unit; a view with two levels, which the surface does not serve, retires it. On main it fails withAGC graphics: the retire of a depth surface overwrote CPU descriptors written after a memoized collect. Without a write watch it skips like the flush-path step (agc_driver_depth_plane_cpu_write_after_memo).fix(agc): one uncached collect of the plane beforeWrittenUnitsinretireStoringStale, the call fix(agc): collect fresh CPU writes before depth plane stores #11690 added to the flush path.Cost: one walk of the plane per retire of this kind.
Related: #14969 (open) covers the stale stencil plane of the same retire; it changes other lines. #15058 changes
WrittenUnitsitself, for shared memory; this PR adds a call in front of it. #15404 and #9895 add callers ofretireStoringStale. #15059 changes the line two above the inserted one. #16011 adds a mode and its registration at the same place in the same test file and fragment; #15015 changes the same test file and adds a line to the fragment. I am happy to rebase behind any of them.Tested
Head 4a5b07e is this PR's two commits on upstream/main 75a1ced.
ctest -V -R '^agc_driver_depth_plane_cpu_write_after_memo'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 pattern matches the new step and the flush-path step of fix(agc): collect fresh CPU writes before depth plane stores #11690.main+ the test commit: on both driversagc_driver_depth_plane_cpu_write_after_memo_retirefails with the line above, and it is a failure, not a skip;agc_driver_depth_plane_cpu_write_after_memopasses. NoVUID-.VUID-.VK_LAYER_KHRONOS_validationinserted; no log reportswas not found but was requested by env var VK_INSTANCE_LAYERS.ctest -R '^agc'on the RX 9070 XT, without the validation layer: 2 of 1342 fail with the test commit, 1 of 1342 with the fix. The new step is the only difference in the failed list.agc_driver_tessellationfails (segmentation fault) on both sides, and the same 23 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