fix(agc): verify refreshed draw stage data #8372
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8372"
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 JJenkx on 2026-10-20T11:30:47Z.
What
With
APS5_VERIFY_DRAW_ENTRIES=1, a draw-cache hit whose constant data changes can report a stage mismatch even when the refreshed data is correct.lookupDrawputs the refreshed words and compiled result inStageDataHit, but the verifier compares the original cached variant against a fresh capture.Pass the effective stage data to the verifier and compare the refreshed words and compilation when present. Keep both content and forwarded-word comparisons. The ordinary rendering path is unchanged.
Add a Vulkan regression that caches a constant-color draw, changes the constant from 0.25 to 1.0, requires a verified stage-data hit with no new mismatch, and checks the rendered bytes change from 64 to 255.
Overlap review: this is independent of #5609 and #6539, whose relocation work also edits the verification condition; those branches will need to retain this effective-data selection when rebasing. #6188 changes cache admission and verification too. None implements this refreshed-stage-data regression/fix. The test's Windows PATH setup is separate from the list edited by #5656.
Tested
Linux, AMD Radeon RX 6650 XT, RADV Mesa 26.2.4-arch1.1, Arch Linux. Built
agc_driver_draw_cache_reuse_testsin Release withBUILD_TESTING=ONandANYPS5_AGC_EXECUTION_TESTS=DrawCacheReuse.Matched main
b9a097353cc387d643a810594ed8dd60601109bbwith this PR's test/CMake changes only, against main plus the implementation change, on the same machine/GPU:Both runs explicitly selected the RADV ICD and the installed validation-layer paths. Main: four existing tests pass; the new
agc_driver_draw_cache_reuse_entry_verifyfails withdraw-entry verification: refreshed stage data differed from a fresh capture. Candidate: all five pass (2.90 seconds total), including refreshed-color GPU readback. Neither log hasVUID-, a missing-layer warning, or a skipped test.python3 tools/check_conventions.py --base origin/mainpasses.No performance or title-bring-up claim. Windows was not tested locally; the new test has the same DLL PATH setup as the existing Vulkan tests.
Independent Windows validation by @xXPBSXx (report), at this exact head
bd017bc3ab, on Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, NVIDIA RTX 4080 SUPER, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release: all fiveagc_driver_draw_cache_reusetests pass three times each. With only the three production driver files restored from merge baseb9a097353c, retaining this PR's test/CMake changes, the new_entry_verifytest fails three times with the refreshed-stage-data mismatch; the other four pass. The contributor restored the PR sources afterward. This is attributed contributor evidence: no title, full-suite or other-GPU coverage was reported, and the report does not establish Khronos validation-layer coverage on Windows.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)bd017bc3ab; see attributed limitations above.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T06:43:18Z.
Independent Windows run of this PR with a baseline (data only).
Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, NVIDIA GeForce RTX 4080 SUPER (the log shows
Selected GPU name=NVIDIA GeForce RTX 4080 SUPER vendor=0x10de device=0x2702 subgroup=32, picked withANYPS5_GPU=4080), WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release. PR headbd017bc3ab; merge-tree againstmainis clean. I builtagc_driver_draw_cache_reuse_tests;ctest -R '^agc_driver_draw_cache_reuse'lists five tests (agc_driver_draw_cache_reuse,_off,_verify,_entry_verify,_inline).Results (3 runs each):
tests/execution/DrawCacheReuse.cppandCMakeLists.txtand replaced onlyExecution/include/Driver/Driver.hpp,Execution/src/Driver/Draw/Draw.cppandExecution/src/Driver/Draw/DrawCapture.cppwith their versions from the merge baseb9a097353c, then rebuilt.agc_driver_draw_cache_reuse_entry_verifyfails 3/3 with[draw-cache] verify: stage 1 (...) of a hit captured differently: 1 runs / 1 words matched, 1 / 1 freshandAGC graphics: draw-entry verification: refreshed stage data differed from a fresh capture; the other four pass. I restored the PR's sources afterwards.Not run: other GPUs (I did not run an AMD card for this PR), other platforms, the other tests, the full repository CTest, and any title or console run.
AI-assisted (Claude Code).