fix(agc): keep the pipeline library extensions enabled under APS5_NO_GPL #7828
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7828"
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 savvaniss on 2026-10-19T09:13:20Z.
What
Fixes the AMD GPU faults in
APS5_NO_GPLtests (#7809). The cause is not in the f32 flush probe from #6503. It is the device thatAPS5_NO_GPLopens.APS5_NO_GPL=1opened a device withoutVK_EXT_graphics_pipeline_libraryand the five extensions that go with it. The AMD Windows driver keeps one on-disk pipeline cache (%LOCALAPPDATA%\AMD\VkCache) for both kinds of device. A compute pipeline compiled on one kind and loaded from the cache on the other runs with the wrong descriptor layout:0xdeadbeeffill.0xbeefdeadbeef.Since #6503, every device runs the same probe pipelines when it opens. In a parallel suite, the libraries-on tests fill the cache first, so the three AMD tests that set
APS5_NO_GPLand open a device fault every run. Each fault is a TDR. On my machine the driver twice failed to recover from one, and the PC needed a hard reset.Now the device enables the extensions and their features whenever the GPU supports them.
APS5_NO_GPLonly turns off their use (graphicsPipelineLibrary), so every device on a GPU builds the same pipelines. The draws of aAPS5_NO_GPLdevice still use render passes and whole pipelines.Other switches also change the extension set, for example
APS5_NO_TIMELINEandAPS5_NO_HOST_IMPORT. Their tests pass on the RX 9070 XT, so this PR leaves them alone.Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release. RX 9070 XT (driver 32.0.31041.1004) and UHD 770 (driver 32.0.101.7088).
agc_driver_draw_cache_reuse_testson the RX 9070 XT, starting each sequence from an empty AMD driver cache:6b8228b2bread invalid at 0xbeefdeadb000)Run alone with a warm cache, the
APS5_NO_GPLtest passes on main 4 times out of 4. Only a pipeline cached by the other kind of device makes it fault.Full
ctest --parallel 4,ANYPS5_GPUset, AMD driver cache emptied first:6b8228b2bcda8e66cc)APS5_NO_GPLtest skipped afterdevice-fault ... 0xbeefdeadb000; 2 to 4 groups of tests stalled 10–24 s waiting for GPU resets; the same run on7f596df48, and on6b8228b2bwith #7682, hung the machineagc_trimmed_import(below); nodevice-fault, nono usable Vulkan device, no stalled testsagc_trimmed_importfails under parallel load on main too, with the same message (after an unmap of 1440 KiB ... served from the import that pinned the old ones). Run alone on this PR it passes 10 times out of 10. The first run of this fix on52f8222afpassed all 1623 tests on the RX 9070 XT.The two Windows freezes, with the event log and the full ctest output, are in #7809.
Validation: Khronos validation layer 1.4.363 (Vulkan SDK),
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,ctest -R <tests> -V, onmaincded26c68and on this PR merged into it, on both GPUs (AMD driver cache emptied first). Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS. Tests: the 12 pipeline-library, draw-cache-reuse, stencil-replay and layered-volume tests. NoVUID-error on either side. The only messages are warnings, the same on both sides (Undefined-Value-ShaderOutputNotConsumed,...-DynamicRendering,WARNING-VkImageSubresourceRange-layerCount-compatibility). On the RX 9070 XT,mainleaves out the threeAPS5_NO_GPLtests (#7809). With this PR they run there and log the same warnings as on the UHD 770'smain.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-19T09:30:17Z.
Some 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/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/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/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/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/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/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.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mddocs/dev/ENVIRONMENT.mdcore/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/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mddocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppImported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-19T18:29:12Z.
An RDNA 2 run, since the PR has RDNA 4 and Intel runs only. RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, Release,
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,APS5_NO_PIPELINE_JOURNAL=1.main38de0a470againstmain38de0a470with this PR merged (cda8e66cc, clean merge).Each sequence runs one renamed copy of the test executable, so AMD's per-executable pipeline cache starts empty and is shared only by the steps of that sequence. "on" is the default device, "off" is
APS5_NO_GPL=1. Every sequence ran twice, with the same result both times:mainagc_driver_draw_cache_reuse_tests: on, on, offagc_driver_stencil_replay_tests: on, on, offagc_driver_layered_volume_draw_tests: off (--vertex-only), on, on (--vertex-only), off (--vertex-only)--vertex-only), off (--vertex-only), onagc_driver_cmask_fast_clear_tests: on, off, onagc_driver_recorder_tests --pipeline-library-only: on, off and off, onOn
main, every lost device isvkQueueSubmit recorder: Vulkan result -4after[device-fault] read invalid at 0xbeefdeadb000(16 of the 18 faults) or0xbeefdeadc000(2, both in the layered-volume sequence). Only a step whose library mode differs from the one that filled the cache fails, in either order. With the PR, no step reports a device fault, and a step after the first is served from the cache (about 0.25-0.45 s against 0.7-0.8 s for the first) in either mode. The driver recovered from every fault here; this card did not hang.agc_driver_cmask_fast_clear_testsis the test #7875 records for the RX 6400. On this RDNA 2 card it loses the device in whichever library mode runs after its cache was filled in the other (withAPS5_NO_GPL=1after a libraries-on run, as in a ctest suite). From an empty cache it passes in either mode, and with this PR it passes in every order.Full
ctest --parallel 4 --timeout 120(the ctest executables keep their names, so their driver caches persist between runs as they would for a user): onmain, 1684 tests, 6 failed:log_macrosandlog_macros_timestamps(ccache rewrites__FILE__in local builds here),agc_trimmed_import(fails here on every build, #6499), andagc_driver_layered_volume_vertex_no_gpl,agc_driver_draw_cache_reuse_offandagc_driver_stencil_replay_no_gpl, each with[device-fault] read invalid at 0xbeefdead...andVulkan result -4. With this PR, 1684 tests, 3 failed: the first three. The threeAPS5_NO_GPLtests pass, and the log has nodevice-faultline.