feat(agc): fast-link interlock pipelines and keep their dynamic write mask on RADV from Mesa 26.3.1 #24305
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24305"
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 janzezno on 2026-11-20T13:38:58Z.
What
Mesa 26.3.1 carries fa7e1ec7 "aco: consider p_jump_to_epilog as a POPS end export" (mesa!45546), the fix for mesa#16653. On RADV reporting 26.3.1 or newer, a pipeline whose fragment shader declares an interlock capability is fast-linked from graphics pipeline libraries again (#9185 excluded it) and keeps the dynamic color write mask (#21260 took it away). Every other driver, and RADV before 26.3.1, keeps both workarounds.
OrderedInterlockEpilogs(driver, driverVersion)(Execution/include/InterlockEpilog.hpp) is true forVK_DRIVER_ID_MESA_RADVatVK_MAKE_API_VERSION(0, 26, 3, 1)or newer, and is stored asContext::orderedInterlockEpilogs.AvoidsInterlockEpilog(context, shaders)inGraphics/src/Pipeline.cppreplacesFragmentInterlock(shaders)inlibraryKeysand in the dynamic color write mask choice.agc_driver_pixel_interlockused to require that neither path ran. Now, where the gate is true, it requires at least one fast-linked pipeline and one dynamic mask set (if the device has them); where it is false, it still requires neither. It prints both counts. The new unit testagc_interlock_epilogcovers the version check.docs/dev/debt/changes/fix-agc-interlock-static-color-write-mask.md, edited in place becausetools/debt_fold.pyrefuses two fragments for one entry. The entry now names the gate and its limit: it readsdriverVersion, so it misses a 26.2 backport and trusts a development build that reports 26.3.1 without the fix.Overlap: #20519 (with #22424 on top of it) and #23982 edit the same
libraryKeyscondition, and #23982 also edits thedynamicColorWriteMaskinitialiser in thePipelineconstructor. Each conflict resolves by keeping both conditions. Merge order: #23982 goes first and I rebase onto it (agreed in https://github.com/boykopovar/AnyPS5/pull/23982#issuecomment-7050910122); this PR goes before #20519, which keeps both conditions on thelibraryKeysline (agreed in https://github.com/boykopovar/AnyPS5/pull/20519#issuecomment-7067027528).Tested
Arch Linux, Linux 7.3, AMD Radeon RX 7900 GRE (RADV NAVI31). Mesa 26.3.1 (Arch 26.3.1-2, system ICD) and Mesa 26.2.7 (the Arch package extracted, with its own ICD JSON) ran the same binaries. Both sides are on
main0a025bd3c6.Stress test of
agc_driver_pixel_interlock: 240 runs, 12 in parallel, per build and Mesa:mainOn
main40206fe50d, before #21260 merged, 26.2.7 failed 228 of 240 by default and 233 of 240 withAPS5_NO_PIPELINE_LTO=1. With #9185's exclusion also removed, it failed 233 to 234 of 240 with and withoutAPS5_NO_DYNAMIC_COLOR_WRITE_MASK=1. 26.3.1 passed 240 of 240 in every one of those configurations, so fa7e1ec7 fixes both the fast-link path and the dynamic-mask path.Focused GPU tests:
ctest --test-dir build -R 'interlock|pipeline_librar|color_write|raster_order' -VwithANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer, validation layer 1.4.363, three times on each Mesa.mainpassed 13/13 every time; this PR passed 14/14 every time (the extra test isagc_interlock_epilog). Every log showsInsert instance layer "VK_LAYER_KHRONOS_validation"(10 times), none containswas not found but was requested by env var VK_INSTANCE_LAYERS, and none containsVUID-on either side.tools/check_conventions.py --base upstream/mainpasses.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T14:04:42Z.
Review: APPROVED
Reviewed — looks good
The reviewed code makes the RADV version gate control both interlock fast linking and dynamic color write masks; no blocking defect was verified.
What I ran
Read the prepared diff and changed files at head
548661e3b0aac84bc7420b7b26e45b102c224415usingrepo_read.py. No tests or build commands were run; runtime and test results in the description are author-reported.Files read:
core/libs/prx/libSceAgcDriver/Graphics/include/Context.hpp,core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp,core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, andcore/libs/prx/libSceAgcDriver/Execution/include/InterlockEpilog.hpp. Files excluded by review-bundle rule:core/libs/prx/libSceAgcDriver/tests/InterlockEpilog.cpp,core/libs/prx/libSceAgcDriver/tests/cmake/agc_interlock_epilog_tests.cmake,core/libs/prx/libSceAgcDriver/tests/execution/PixelInterlock.cpp, anddocs/dev/debt/changes/fix-agc-interlock-static-color-write-mask.md.Results
Findings
Blocking
None verified in the code read.
Non-blocking
None.
Not verified
The three changed test files and the debt fragment were excluded from the bundle and were not inspected. No build, test, or hardware run was performed by this review. The supplied stress and focused-test results are author-reported.
To get this to a good state
Nothing is required.