perf(agc): continue render passes across draws without hazards #2670
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2670"
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 oneandonlydean on 2026-10-10T10:32:43Z.
What
A recorded draw continued the open render pass only when the previous draw wrote no memory. So every draw with a storage write ended the pass and paid two barriers.
PassHazards(first commit,agc_pass_hazardsunit tests). It keeps the guest ranges, images and attachments that the draws since the last barrier read and wrote, and answers whether a new draw has a RAW, WAW or WAR hazard against them.APS5_FULL_BARRIERS(existing) keeps every barrier.Tested
Linux (CachyOS, GCC, RTX 4090), Release, on current
main:ctestpasses, including the newagc_pass_hazards, exceptagc_driver_dcc_keys_first_write, which fails onmaintoo.agc_driver_recorder_testspasses when run by hand, with the groups that fail onmaintoo skipped. Its sample-dump test now goes through the new pass start.tools/check_conventions.pypasses.Astro Bot (PPSA21564), measured on our fork with the same tracker:
On the fork, draws through buffer device addresses were split further, using the shaders' store information. Here they keep the old rule, so draws that use them gain less.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-10T11:12:55Z.
Independent Linux verification on Intel Gen12 graphics (Mesa ANV) and lavapipe:
0xa780), Mesa 26.3.0-devel (ANV), Vulkan 1.4.363-DBUILD_TESTING=ON)ecc14b0fResults:
tools/check_conventions.py: passed.tools/check_test_registration.py: 557 test executables registered, 0 unregistered.agc_pass_hazards: passed (both on Intel ANV and lavapipe).ctest: 689/696 passed (the 7 non-passing tests fail identically on currentmainhere due to the device lackingshaderFloat64capability).agc_pipeline_library(GPL on & off): 2/2 passed.agc_driver_sampled_cache_budget: passed.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by ArjenS-LA on 2026-10-10T11:14:09Z.
Adding a Windows CPU-side check alongside the Linux results above, at head
ecc14b0f66e7b4f8d2ad92ca86f7075a977d28bc.Compiled the unmodified
tests/PassHazards.cppandGraphics/src/PassHazards.cpptogether as a standalone executable, using the PR'sPassHazards.hppand the local checkout's bundled Vulkan headers:-std=c++20 -O2 -DNDEBUG -Wall -Wextra -pedantic-errors.pass hazard tests passedand exited with code 0.The supplied checks cover range boundaries/coalescing, RAW/WAW/WAR classification, unknown accesses, image conflicts, and attachment tracking across passes. This test uses synthetic image handles and makes no Vulkan calls, so this result covers the standalone CPU tracker only. I have not run the full PR build, recorder integration tests, GPU execution, or the Astro Bot benchmark.
AI-assisted: Codex inspected the code and performed this compilation/test run on my Windows machine.