fix(agc): keep robustBufferAccess2 off on AMD's proprietary driver #7351
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7351"
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 thuanquang on 2026-10-18T01:42:16Z.
What
#4048, merged today, enables
robustBufferAccess2on every device that has it, and then selects guest loads instead of branching around them. On an RX 6700 XT with AMD's Windows driver 32.0.21045.5002, three execution tests that passed onmainf1af6c591fail from its merge63da333b7on:agc_driver_layered_volume_draw;agc_driver_layered_volume_vertex;agc_driver_subvector_loop.Lavapipe on CI passes the first two and skips the third (its subgroup is too small).
To narrow it down I built
mainwith each half of #4048 switched off:main5229b5b82withrobustBufferAccess2not enabled (and so no selected loads)target.robustBufferAccess2 = false(loads keep their selections)So the two layered-volume tests fail as soon as the feature is enabled on this driver, whatever the recompiler emits.
subvector_loopfails only with the selected loads.The failures:
vertex draw: slice 1 texel (0, 0) channel 0 is 64, expected 255 (the band of layer 0): the volume keeps its sentinel, so nothing reached it.subvector_loop.exec kept by the body, initial exec high half: lane 0 exec hi after the loop is 0, expected 4294967295. With every column printed, the high half of the wave64 never runs its loop body. A wave64 compute probe that only loadsInput[lane]and stores it back returns the right values in every lane for the same masks, so the load itself is correct. A compute probe of the vertex shader's two loads (buffer_load_dwordx4andbuffer_load_dword offset:28, idxen, stride 32) also reads every record correctly.I haven't found the cause. This change doesn't enable
robustBufferAccess2onVK_DRIVER_ID_AMD_PROPRIETARY, so on that driver the loads keep their selections as they do on devices without the feature, and the three tests pass again. Other drivers are unchanged. The check followsPipelineLinkTimeOptimizationUsable: a predicate inExecution/include, unit-tested over the driver IDs. The load-guard debt entry from #4048 says what was seen on this driver.@Mouad-Scriptz-0, in case the numbers above point you to the cause, the gate can go again once it is fixed.
Tested
Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,ANYPS5_REQUIRE_VULKAN=1:main5229b5b82and pass with this change. Bisected: they pass onf1af6c591, the merge before #4048, and fail on63da333b7.agc_robust_buffer_access(new) checks the predicate for the AMD proprietary, AMD open-source, RADV, NVIDIA, Intel, lavapipe and MoltenVK driver IDs.agc_guarded_memory_loadsandagc_lds_lock_budgetfrom #4048 pass.agc_driver_lds_lock_budgetfails with and without this change:lane 0 read 0x00000ffffffff800, expected 0x00001ffffffff000 after 4096 ds_add_u64 and 4096 ds_add_u32. That is the AMD LDS lock problem reported in #7344, the same one asagc_driver_lds_mixed_width_atomics(#6666, #6976).ctest --parallel 4 --timeout 120onmain5229b5b82with this change: 1442 tests. Onlyagc_driver_lds_mixed_width_atomics(#6976),agc_driver_lds_lock_budget(#7344) andagc_driver_layered_volume_vertex_no_gpl(#4768) fail. Without this change,agc_driver_layered_volume_draw,agc_driver_layered_volume_vertexandagc_driver_subvector_loopfail as well.python tools/check_conventions.py --base origin/mainwith this title and body passes.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
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T01:59:46Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/shader.mdL158docs/dev/debt/shader.mdL158core/libs/prx/libSceAgcDriver/CMakeLists.txtL612core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL17docs/dev/debt/shader.mdL158Some 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.
core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/shader.md