Skip to content

fix(agc): key the remaining driver shader modules by GPL mode - #19378

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Jirka135:fix/4768-driver-modules
Nov 16, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Jirka135:fix/4768-driver-modules

Conversation

@Jirka135

Copy link
Copy Markdown
Contributor

What

#18916 keyed the shader modules of three recorder tests by GPL mode, because in those tests the AMD Windows driver cache (%LOCALAPPDATA%\AMD\VkCache) returned the compute binary built for the other mode. It left the other direct vkCreateShaderModule calls alone. Three of them are in the driver itself and skip the GPL-mode keying of Graphics::CreateShaderModule from #6436:

  • MultisampleUpload.cpp: the multisample upload module (TextureDetiler::DispatchMultisampleImage)
  • Recorder.cpp: the changed copy module (Recorder::RecordChangedCopy, staged write-backs)
  • SampleOrder.cpp: SampleOrders::module, used for the sample order compute and graphics shaders

All three now call CreateShaderModule(context, ...) with the same operation strings. On current main no other driver code creates shader modules directly. Direct calls in the remaining tests are not part of this PR.

Only the changed copy path has failing evidence here: on 5599befe08, agc_changed_copy fails on AMD Windows once the cache was filled in the other GPL mode (table below), and passes with this change. The sample order and multisample tests pass on 5599befe08 in both cache orders on this GPU, so those two changes only bring the modules in line with the rest of the driver. No new test: the failure needs the AMD Windows driver cache, so the existing tests run in both cache orders are the regression check.

Tested

AMD Radeon 8060S (Ryzen AI MAX+ 395, gfx1151, 1002:1586), Windows 11 Pro 10.0.26300, driver 32.0.22032.6002, Release build with WinLibs GCC 15.2.

Each step runs each of the four tests up to 2 times (--repeat until-fail:2), one ctest invocation at a time:

set ANYPS5_REQUIRE_VULKAN=1
set ANYPS5_NO_SHADER_CACHE=1
set ANYPS5_GPU=8060S
set APS5_NO_PIPELINE_JOURNAL=1
rem off steps additionally: set APS5_NO_GPL=1
ctest --test-dir build -R "^agc_changed_copy$" -j 1 -V --repeat until-fail:2 --timeout 60
ctest --test-dir build -R "^agc_driver_sample_order$" -j 1 -V --repeat until-fail:2 --timeout 60
ctest --test-dir build -R "^agc_driver_multisample_readback_upload$" -j 1 -V --repeat until-fail:2 --timeout 60
ctest --test-dir build -R "^agc_multisample_guest_access$" -j 1 -V --repeat until-fail:2 --timeout 60

VkCache was renamed aside before B and deleted between B and C. The original was put back afterwards. A run counts only when its log shows the Vulkan device line and a pass, not exit 77. The off steps log pipelineLibrary=0 and the default steps pipelineLibrary=1 (VulkanDevice.cpp).

build B1 off B2 default C1 default C2 off
5599befe08, agc_changed_copy 2/2 pass fails on run 1 2/2 pass fails on run 1
5599befe08, other three tests 6/6 pass 6/6 pass 6/6 pass 6/6 pass
this branch, 03048a8886 on 5599befe08, all four 8/8 pass 8/8 pass 8/8 pass 8/8 pass

The 5599befe08 result for agc_changed_copy was the same in 3 runs of the sequence. On this branch agc_changed_copy went through the four steps once more after a rebuild and passed in all of them.

Failures on 5599befe08:

  • B2 (default after off): AGC graphics: vkWaitForFences recorder: Vulkan result -4, then unhandled exception 'St13runtime_error'. The first run hit the 60 s timeout at 46.6 s of test time, the later ones fail directly.
  • C2 (off after default): AGC graphics: changed copy word 0: 195, expected 1515870915 (the shader's changed bytes over the target's own).

The branch was then rebased onto e418837675 without conflicts (the three hunks are unchanged) and was not rebuilt or rerun on that base.

Validation layer: not run. VK_LAYER_KHRONOS_validation is not installed on this machine.

Not run: lavapipe, other vendors.

python3 tools/check_conventions.py: all checks passed.

python3 tools/pr_overlap.py --branch fix/4768-driver-modules lists 25 open PRs that touch these files and cannot be compared automatically because they conflict with main. I compared their diffs by hand. None of them changes the lines this PR changes. Four of them add new direct vkCreateShaderModule calls elsewhere, which would skip the GPL-mode keying the same way:

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Refs AMD Windows: GPL-mode cache failures (alpha/wave32 pass after local driver update) #4768
  • Unblocks: none
  • GPUs tested: AMD Radeon 8060S (gfx1151), driver 32.0.22032.6002, Windows 11 Pro 10.0.26300
  • AI-assisted: yes

🤖 Generated with Claude Code

The multisample upload, changed copy and sample order modules were
created with vkCreateShaderModule directly, so they skipped the GPL-mode
keying of Graphics::CreateShaderModule from boykopovar#6436. The same SPIR-V then
reaches the AMD Windows driver cache in both modes, the same exposure
boykopovar#18916 found for compute modules in the recorder tests.

Refs boykopovar#4768

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the agc libSceAgc* label Nov 13, 2026
@JJenkx

JJenkx commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 1129e1ef68, merged onto main d9fdc25f32. Setup: Windows 11 Enterprise 22621, AMD RX 6700 XT, AMD driver 26.10.1, MinGW-w64 GCC 15.2 UCRT, Release.

The 8 tests selected for the changed files:

  • agc_driver_fill_completion_labels cases _chain, _cpu_disjoint, _cpu_overlap, _inline, _late and _submitted;
  • agc_process_sampler_stack;
  • agc_run_report_shader_failure.

Results:

  • GPU, through the shared Windows GPU FIFO with ANYPS5_REQUIRE_VULKAN=1 (merge 05ccd6b741): all 8 passed in 3 of 3 runs, 24 of 24 outcomes. The binaries matched the hashes recorded at preparation, and the receipt shows exit 0 and app_count=0.
  • CPU, Vulkan hidden (merge 79740acf2e): 2 passed and 6 skipped (they need a device), 0 failed, in each of 3 runs.

AI-assisted: yes.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleUpload.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 9289 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleUpload.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleUpload.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleUpload.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 15136 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 15548 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 17611 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 18173 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 18515 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 19100 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 20315 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp

@Doorriiaann

Copy link
Copy Markdown
Contributor

An NVIDIA run, next to the AMD runs: RTX 3070 (8 GB), NVIDIA 610.57.04, Ryzen 5 5600X, Debian 13, kernel 6.12.115, GCC 13.3.0 Release, validation layer 1.4.335, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, 3 runs each, in both GPL modes. The 16 tests: the agc_driver_sample_order* and agc_driver_fill_completion_labels* sets, agc_run_report_shader_failure, and #18916's agc_sampled_storage_base_level_usage, agc_copied_direct_ordering, agc_recorder_cube, agc_driver_recorder.

merge-base e418837 this PR 1129e1e
GPL on (default) 15 passed 3/3, 1 skipped 15 passed 3/3, 1 skipped
APS5_NO_GPL=1 14 passed 3/3, 1 failed 3/3, 1 skipped 14 passed 3/3, 1 failed 3/3, 1 skipped
VUID- lines / layer not found 0 / 0 0 / 0

So no difference from the merge-base in either mode. The skip is agc_driver_sample_order_grid_reference (the device does not keep depth drawn at custom sample locations at those locations).

The failure without GPL is on the merge-base too, so it is not from this PR: agc_driver_sample_order_recipe_depth_locations stops at AGC graphics: pixel (0,0)'s locations in every pixel: the recipe's replay did not leave the depth the recorded draw left, as the device reads both back. It passes with GPL on.

AI-assisted: yes

@oneandonlydean
oneandonlydean merged commit 0fb251b into boykopovar:main Nov 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants