agc_driver_recorder_tests: partial publish drops a shadowed unit without copying it #1429
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by NahuelGenchi on 2026-10-08T05:06:12Z.
agc_driver_recorder_testsis built but not registered in ctest, and on main (0c952fe5) it fails on lavapipe at the partial publish check incore/libs/prx/libSceAgcDriver/tests/Recorder.cpp(around line 1387). The test is not affected by GPU hardware, so this doesn't depend on any particular card.The test sets up three units,
unit3,unit4andunit5, and checks that these are shadowed before the publish:Adding a print right before the check shows the publish returns 0 and afterwards
unit3is no longer reported as shadowed, whileunit4still is. So the shadow flag forunit3gets cleared without anything being copied.publishUnitsinUnitShadow.cppskips a selected unit that is no longer live, and its comments say a unit whose pages the CPU stored to is dropped without a copy. The test's last section covers that exact case. Whether anything in the test's own setup stores tounit3's guest pages between the retile and the publish is the question I couldn't settle: if it does, the test expectation is stale; if nothing does, the publish is dropping a unit it shouldn't.Could someone who knows the shadow stamping rules say which of those applies? Once that's clear the fix is either a test change or a code change, and I can send a PR for whichever it is.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-08T06:23:27Z.
#1046 answers this one: nothing in the test stores to
unit3's pages. lavapipe runs command buffers on CPU threads, so the whole publish's copy into the host import goes through the page tables, and the write watch collects it as a CPU store overunit3. The partial publish then finds the unit written since its retile and drops it without a copy. Per #1046's description, the import probe only checks a GPU read, which reports 0 of 4 pages on lavapipe, so imports stay watched there. #1046 makes the probe also fill the scratch import on the GPU, compares imported ranges when either step reports pages, and registersagc_driver_recorderin ctest.For comparison, on Windows 10 with an RTX 3060 (driver 616.92) the test passes 10 of 10 runs on current
main.Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T11:24:21Z.
Reproduced on
main(084aeeb6), under lavapipe with the CI environment (VK_ICD_FILENAMES→ lavapipe,ANYPS5_REQUIRE_VULKAN=1,GALLIUM_OVERRIDE_CPU_CAPS=avx):That is the failure and the assertion the report names, and the startup line is the mechanism @popcoder565 describes: the probe reports 0 of 4 pages after a GPU read, so imports stay watched, and on this device the publish's copy into the import is collected as a CPU store over the unit, which the partial publish then drops as written since the retile. So nothing in the test's setup stores to
unit3's pages — the expectation is right and the probe is what needs the fix, not the test's fixture.The fix is #1046, which is still open and
CONFLICTING. I resolved its four conflicts onto084aeeb6(main has since added its own CPU-store probe to the same two functions, which is why all four are real) and ran the result:--repeat until-fail:3): 3/3 pass, exit 0, with the predicted line —main's only in the added diagnostic.Details of the four resolutions and the evidence are on #1046. It also fixes the other half of this report —
agc_driver_recorder_testsbeing built but not registered — by adding it to theforeachthat turnsEXCLUDE_FROM_ALLoff and registers it;tools/check_test_registration.pyrecords it by name today, so the gap is at least measured until then.One thing that should not be attached to #1046: on this GPU the same binary already fails on
mainat a different assertion (Recorder.cpp:2130,(w) a cache over the pages the import reported sees no change), identically with and without that PR — filed as #1532. Registering the test makes CI green on lavapipe and leaves that one red on NVIDIA, which is worth knowing before the merge.So: this issue is answered and its fix is #1046. Would you like it closed in favour of that PR, or left open as the marker for the unregistered test?
Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-08T11:50:32Z.
Based on my review of recent PRs, I can provide some context on this issue. The test
agc_driver_recorder_testsis currently built but not registered in ctest (it usesEXCLUDE_FROM_ALL). This means it's one of the tests thattools/check_test_registration.pyrecords by name as built-but-not-run.The question raised in the issue - whether the test expectation is stale or the publish is dropping a unit incorrectly - would require someone familiar with the shadow stamping rules to answer definitively. However, based on similar issues I've seen reviewed:
unit3's guest pages between retile and publish, then the test expectation should be updatedGiven that this test has been failing on lavapipe for some time without being registered in ctest, it's possible the test expectations have become stale as the shadow stamping implementation evolved. I'd recommend investigating whether any of the recent changes to
UnitShadow.cppor related files might have changed the behavior that this test expects.