Skip to content

feat(shader): raise the sampler and sampled-pair limits past the 32-bit sampler masks - #10000

Merged
oneandonlydean merged 12 commits into
boykopovar:mainfrom
EagleBearerYS:feat/shader-sampler-limits
Nov 3, 2026
Merged

oneandonlydean merged 12 commits into
boykopovar:mainfrom
EagleBearerYS:feat/shader-sampler-limits

Conversation

@EagleBearerYS

@EagleBearerYS EagleBearerYS commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

With #9749, Ratchet & Clank: Rift Apart (PPSA01474) gets past LoadAddressU32@pc=0x13bc0. It then stops on ShaderRecompiler::Recompile: sampler resource limit exceeded, in compute 0x116bb61900 in game and in the captured requests 0x116bb67b00 and 0x116bb5e100. Tamalero counted the shaders' resources with the caps lifted (comment):

0x116bb67b00 0x116bb5e100 0x116bb5ad00
distinct sampler sources 63 62 63
images (limit 64) 51 50 51
sampled image/sampler pairs (limit 64) 112 101 112

Sixty of the samplers are indirect columns of one per-lane table, which differ in chase depth and in the S#'s offset in the record. The other three are direct S#s. No sharing gets them under 32, and the pairs are over 64 as well.

Why 32: MaxSamplers = 32 is the width of the image-to-sampler masks, which are std::uint32_t with 1u << element.

  • In the recompiler: DescriptorBindingBuilder's sampler masks, DescriptorBinding::imageSamplers and tableSamplerMasks.
  • In the driver: Sampler.cpp's filter-minmax, degamma, border-swizzle and non-seamless-cube checks, which loop element < 32u, and ShaderResources.cpp's sampler-source loops.

The change:

  • The masks: they're std::uint64_t in the recompiler, the serialized artifact and the driver. The driver's per-image loops walk set bits instead of 32 elements.
  • MaxSamplers: 32→64. That's RuntimeAbi::SamplerHeapCapacity, the ShaderData sampler metadata BindingAllocator already caps every shader at.
  • MaxSampledPairs: 64→256. Nothing sizes an array by it.
  • No silent truncation: a static_assert guards the resource-indexed shift, and the element-mask capacity check compares against 64 with its old text.
  • The refusal texts are unchanged past the new limits.
  • FormatVersion to 52, since serialized imageSamplers widens.

The next limit, stated in the shader debt file: ShaderData holds 64 sampler metadata elements, and each direct sampler takes two of them (the original and a point copy). So a shader can have at most 64 samplers in all, and at most 32 direct ones ("shader sampler pairs exceed runtime heap capacity"). Rift Apart fits by one. More would need a larger ShaderData, a runtime-ABI change with a per-draw cost, and wider masks.

Cost: each mask is 8 bytes instead of 4, and the content key holds one more word per image. In a synthetic micro-benchmark of the driver's per-image loops (g++ -O3, 64 images per draw, the old and new loop bodies), the common two-bit masks went from about 4.7 µs to about 0.2 µs per draw, because the new loops visit only set bits. Fully set 32-bit masks were unchanged within noise. This is not a driver run.

Overlap:

Tested

  • Ratchet & Clank: Rift Apart (PPSA01474), run by Tamalero on test/9749-sampler-masks (b340d22, this change on fix(shader): read a chased pointer's high word at its own offset #9749's head b2d4afc) (comment):
    • Replays: the three captured requests that stop on sampler resource limit exceeded at fix(shader): read a chased pointer's high word at its own offset #9749's head (0x116bb67b00, 0x116bb5e100, and 0x116bb5ad00, the in-game stop) plan with this change. They then stop evaluating runtime sources whose guest memory the prepare requests don't carry, which is the replay's limit, not a refusal.
    • Game: two runs on an NVIDIA GeForce RTX 4090 from a cold shader cache, with no input. Neither hits a sampler or pair limit. They stop at 289 s on compute 0x116bb67500 (AGC driver: invalid shader memory read address) and at 1,170 s on compute 0x116bb75900 (runtime image descriptor is invalid). Those are shaders that now get further, stopping on the values they resolve, not on a limit this PR sets. They're being traced on fix(shader): read a chased pointer's high word at its own offset #9749.
  • agc_shader_sampler_limits (tests/ShaderMemory.cpp, beside fix(shader): keep a shader's selected image-table records within the image and pair limits #7527's selected-records tests):
    • Rift Apart's shape: 60 table sampler columns at distinct offsets plus 3 direct S#s, 51 images and 112 pairs. It plans, with the direct samplers at resource indices 60 to 62, and each image-table element pairs with exactly its direct samplers' elements.
    • Masks past bit 31: direct images paired only with sampler elements 32 to 39, and image-table elements paired with elements up to 35.
  • agc_driver_many_direct_samplers (new, tests/execution/ManyDirectSamplers.cpp, on lavapipe): 17 direct samplers bound as 33 sampler elements, with the last one at element 32.
    • Border colour: its opaque-white border is read outside the image, and a clamping S# there reads the edge texel.
    • Degamma: its FORCE_DEGAMMA decodes the paired UNORM image as sRGB, bit-identically.
    • Border swizzle: an alpha-moving BC swizzle with a point-clamp S# is planned.
    • The integer image pairs with the 16 point copies.
  • Red: with main's product files, both fail 20/20: sampler resource limit exceeded and prepared sampler mask capacity exceeded. Green: 20/20 each.
  • fix(shader): keep a shader's selected image-table records within the image and pair limits #7527's selected-records pair tests derive their limit from MaxSampledPairs. They now sample each read through 8 samplers, so they reach 256 pairs within the 64-image limit. All four pass.
  • GitHub's runners (run):
    • Green: with the change, the new tests and the shader, image-sample and disk-cache sets pass 10 times on Linux and Windows. On Windows the Vulkan ones skip.
    • Red: the runners' red arm couldn't build. The test files use the widened mask type, so they don't compile against main's product code. The reds above come from reverting the product files alone on a cloud Linux machine.
    • Suites: libc and libkernel pass on both. They ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Validation layer (run):
    • Setup: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1 on llvmpipe (LLVM 20.1.2), GitHub's Linux runner. The run includes agc_driver_many_direct_samplers, agc_driver_image_table and agc_driver_bindless_images.
    • The layer: it loaded 4 times on main's tree and 5 with the change, which adds a test.
    • The messages: both logs report only VUID-VkDeviceCreateInfo-pNext-pNext, so the change adds no VUID- message.
  • CI's Linux job mirrored on a cloud Linux machine: 1849/1853. The failures are the machine's three IPv6 tests and the agc_driver_sgpr_pattern_fill_keys timing flake under --parallel 4.
  • On fix(shader): read a chased pointer's high word at its own offset #9749's head, the image-table, pointer, nested and sampler sets pass 54/54.
  • The title: Rift Apart gets past sampler resource limit exceeded in Tamalero's runs above; its next stops are listed there.
  • 51a0116, a merge of main 0db47b2. The only conflict was ShaderDiskCache.hpp's FormatVersion line: main moved to 45 (fix(shader): normalize offset perspective barycentrics after interpolation #7831), and this branch keeps its 49. On GitHub's runners (run), the new tests and the shader, image-sample and disk-cache sets (19 tests) pass 10 runs in a row on Linux. On Windows the set has 21, with two Windows-only disk-cache tests: they build, 19 pass 10 runs in a row, and the other 2, which need a Vulkan device, skip. The libc and libkernel suites pass on both, run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Windows: MinGW syntax checks of every touched file show 0 errors.
  • check_conventions.py: passes. The one warning is the image-table debt entry's length: it's already over the limit on main (1,067 characters) and is 1,068 here. No comment lines are added.
  • AMD Radeon 860M on Linux (RADV, Mesa 26.2.5, Fedora 44), by @Lander0606 (comment): 51a0116 against its base 0db47b2, the sampler, selected_records, image_sample and disk_cache tests, three runs each with and without the Khronos layer. The base passes 18 of 18 and this PR 20 of 20 in every run. agc_driver_many_direct_samplers runs there, with no skip. Under the layer neither side logs a VUID- line.
  • Ghostrunner (PPSA03685), a replay by @frankea (comment): compute shader 0x200c520000, agc_shader_replay --prepare with ANYPS5_NO_SHADER_CACHE=1 on the request the driver dumped, RTX 4090, Windows 11; replay only, no title run. Every build is main 513ca7e with fix(shader): link table callees that together exceed s_call_b64 range #9068, fix(shader): link a table call whose V# is a slice of an s_load_dwordx8 or s_load_dwordx16 #8070 and fix(shader): find strongly connected components without recursion #9701 to refactor(shader): walk each construct when checking the structured constructs #9703.
  • Ghostrunner (PPSA03685), a second replay by @TheSovietWaffle (comment): the same compute shader 0x200c520000, Windows 10 22H2, WinLibs GCC, Release, ANYPS5_NO_SHADER_CACHE=1; replay only, no title or GPU run. On main 0db47b2 with fix(shader): link table callees that together exceed s_call_b64 range #9068, fix(shader): link a table call whose V# is a slice of an s_load_dwordx8 or s_load_dwordx16 #8070 and refactor(shader): walk each construct when checking the structured constructs #9703, with fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 (9162d9d) and this PR (51a0116), it gets past sampler resource limit exceeded and stops on another image load, LoadAddressU32@pc=0x0002ef78, whose pointer Phi has an arm read at a fixed offset of a buffer whose V# is loaded from memory. With fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939 alone it stops on the sampler limit.
  • Persona 3 Reload (PPSA10872), a replay by @zaidhawk (comment): compute shader 0x2014960000, agc_shader_replay --prepare of the request the driver dumped for it, RTX 5090, Windows 11, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1, one run per build; replay only, no title run. The base is main 0db47b2 with fix(shader): link table callees that together exceed s_call_b64 range #9068 and refactor(shader): walk each construct when checking the structured constructs #9703.
  • Ratchet & Clank: Rift Apart (PPSA01474), by @oneandonlydean (comment), on the same test/9749-sampler-masks (b340d22): one 600 s run from a cold shader cache with APS5_DUMP_IR=all. No sampler resource limit exceeded line, no what() or terminate and no stop line: it ran the whole 600 s. 7840 IR blocks were dumped. The highest shader pc is 0x1f2c8, and 980 block lines are at or past 0x13bc0. This covers that branch, not this PR's current head.
  • AMD Radeon RX 6600 XT on Windows, by @brummilab (comment): Navi 23, AMD driver 32.0.21045.16010, Windows 11 Pro, WinLibs GCC 15.2.0, Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, main b84322d against this PR's head 12b8923 merged onto it, ctest -R "agc_shader_memory|agc_shader_selected_records|agc_shader_bindless|agc_shader_disk_cache|image_sample|sampler|agc_driver_image_table|agc_driver_bindless_images": main 30 of 30 pass; this PR 32 of 32, the new agc_driver_many_direct_samplers and agc_shader_sampler_limits included. The run didn't request the validation layer (correction). The -9 from vkCreateInstance with the layer requested (Windows (AMD RX 6600 XT): with VK_LAYER_KHRONOS_validation requested, test processes fail at vkCreateInstance with -9, so the required validation runs are impossible #10663) came from a leftover VK_DRIVER_FILES in the shell, and the layer works on that machine; its run is the next bullet.
  • Validation layer on the same RX 6600 XT, by @brummilab (comment): the same machine and test set, Vulkan SDK 1.4.363, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, main 2fade7e against this PR's head d6061d4 merged onto it. Each test ran on its own with VK_KHRONOS_VALIDATION_LOG_FILENAME set, and the layer's log file shows it loaded in every test that creates a Vulkan instance: 18 on main and 19 with this PR. main 30 of 30 pass and this PR 32 of 32, the new agc_driver_many_direct_samplers and agc_shader_sampler_limits included. Neither arm has a VUID- message.
  • d6061d4, a merge of main c9b2660. The only conflict was FormatVersion: main moved to 47 (fix(shader): answer image_get_resinfo on any T# dimension #7550), and this PR goes from 49 to 52. Its own diff is otherwise unchanged. On GitHub's runners, 10 runs (run) of the sampler, selected-record, image-sample, disk-cache and shader-memory tests (^.*sampler, ^.*selected_records, ^.*image_sample, ^.*disk_cache, agc_shader_memory), 21 tests on Linux, and the 10 other shader tests built from the changed files: Linux: 31 run, 31 pass, 0 skip, 0 fail. Windows: 33 run, 21 pass, 12 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both, run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • d82e3f9, a merge of main 16ff208 (run). main's feat(shader): support 64-bit image atomics through keyed image tables #10440 records each element's 64-bit image atomics on the line before the sampler mask this PR widens to 64 bits; the merge keeps both, and this PR's changed lines are the same. FormatVersion on main is still 47. The sampler, selected-record, disk-cache and image-table tests pass 10 runs in a row. Linux: 26 run, 26 pass, 0 skip, 0 fail. Windows: 28 run, 22 pass, 6 skip (the agc_driver_image_table tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (144 and 207) and on Windows (171 and 223). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Ratchet & Clank: Rift Apart (PPSA01474), by @Tamalero (comment): RTX 4090, cold shader cache, with this PR's 12b8923 merged into test/9749-null-storage (fix(shader): read a chased pointer's high word at its own offset #9749 and fix(agc): bind a written TYPE 0 or 1 static image slot as a null storage image #10906). Without this PR that branch stops at 214 s on sampler resource limit exceeded; with it, the run gets past fix(agc): bind a written TYPE 0 or 1 static image slot as a null storage image #10906's 1,300 s stop and runs to 2,632 s, where a different compute shader, 0x116bb6ef00, stops on GetImageResource dword 0 is not a valid runtime value. That stop is outside this PR.
  • fe85d6c, a merge of main 85f8e11 (run). main's fix(shader): bound the bytes the recompiler's result memos hold #9989 adds its three result-memo budget tests to the Windows set_tests_properties line in core/libs/prx/libSceAgcDriver/CMakeLists.txt where this PR adds agc_shader_sampler_limits; the merge keeps all four. FormatVersion on main is still 47, and this PR's other changed lines are the same. The agc_shader_ tests with the tests built from the files the merge changes pass 10 runs in a row. Linux: 320 run, 310 pass, 10 skip (seven AGC tests on lavapipe and three video-out tests with no display or Vulkan device), 0 fail. Windows: 346 run, 259 pass, 87 skip (84 AGC tests and the same three video-out tests, no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (145 and 211) and on Windows (174 and 232). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • aa94587: 23194a4, a merge of main 0c5401d, and two test-only commits (run).
    • The merge: main moved FormatVersion to 48, the one conflict; this PR stays 52, which no other open PR uses (see Overlap). Its other changed lines are the same.
    • 8a7c326 drops the two refusal checks @oneandonlydean listed: agc_shader_sampler_limits' "65 samplers, 306 pairs and 33 direct samplers are refused" block and agc_driver_many_direct_samplers' opaque-black-border refusal. The widened-mask and 64-sampler cases and the point-clamp control stay.
    • aa94587 makes agc_driver_many_direct_samplers skip on a device that binds fewer than 33 samplers per stage or per set. @jotitadev's run on an Apple M2 Max with MoltenVK (review) showed MoltenVK reports 16 samplers per stage, so main's per-stage check refuses the test's 33 sampler elements with or without this PR.
    • The sampler-limit, image-table, sample-order, shader and disk-cache tests ran 10 times with no failure. Linux: 25 run, 25 pass, 0 skip, 0 fail. Windows: 27 run, 24 pass, 3 skip (agc_driver_image_table, agc_driver_many_direct_samplers and agc_driver_sample_order; no Vulkan device), 0 fail.
    • Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel passes 283 of 286: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), and pass in main's own Windows job at 1829def (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 7f4e97c, a merge of main 94fe1b5 (run). main now has fix(agc): sample cube descriptors with fewer than six slices as six faces #11507 (hugodearaujo's short-cube sampling), which takes FormatVersion 49 (b9f4f65); that line was the one conflict, and this PR keeps its 52 (see What). fix(agc): sample cube descriptors with fewer than six slices as six faces #11507 also adds an ImageResource field, sampledOnly, which ShaderDiskCache.cpp encodes without a conflict. This PR's diff over main is the same apart from the FormatVersion line's old value. The sampler-limit, image-table and sample-order tests with the disk-cache, bindless and shader-memory tests and fix(agc): sample cube descriptors with fewer than six slices as six faces #11507's agc_driver_image_sample_short_cube ran 10 times with no failure. Linux: 26 run, 26 pass, 0 skip, 0 fail. Windows: 28 run, 24 pass, 4 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (166 and 265). On Windows libc passes (194), and libkernel passes 284 of 287: exec_arguments, guest_timed_join_import_libkernel_sys and guest_timed_join_import_libkernel_web fail at their setup in the verify's Windows build (FileNotFoundError starting the title, or copying the libraries they load), with main's code too, and pass in main's own Windows job at 1829def (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • My First Gran Turismo (PPSA24156), a replay by @Rengundom (comment): compute program 0x1258c12300, 47,801 code words, 18,245 recorded memory regions, wave64, with agc_shader_replay --materialize; Windows 11, RTX 3080 (driver 616.92). It covers CPU preparation of the capture only: no Vulkan pipeline was created or dispatched.
    • On main 08a10d2 it fails with sampler resource limit exceeded.
    • With this PR's head 7f4e97c merged onto that main (a clean merge), it prepares and materializes 5,573,305 SPIR-V words.
    • With VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1, agc_shader_bindless, the four agc_shader_selected_records_* limit tests, agc_driver_bindless_images, agc_driver_image_sample_reduction and agc_driver_image_table pass on both sides, and this PR's agc_shader_sampler_limits and agc_driver_many_direct_samplers pass. No VUID errors on either side.
  • a803318, a merge of main 0836dfd (run, on 75d57e9, which has the same tree). build(agc): register each AGC test executable in its own CMake fragment #12862 moved libSceAgcDriver's test registrations into tests/cmake/; the conflict in CMakeLists.txt is resolved with tools/agc_test_split.py resolve, which moves this PR's registration of agc_shader_sampler_limits into tests/cmake/agc_shader_memory_tests.cmake (+3 −2). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With -DBUILD_TESTING=ON, ctest -N gives 3077 tests: main's 3075 plus its 2 tests (agc_driver_many_direct_samplers comes from the execution-test glob), each listed once. The 9 tests of this PR's verify set pass 10 runs in a row. Linux: 9 run, 9 pass, 0 skip, 0 fail. Windows: 9 run, 7 pass, 2 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 760a550, a merge of main 88e804b (run). main now has Ondra97's fix(shader): split scalar-address descriptor phis #7694 (scalar-address descriptor Phis), which adds DescriptorSource::requiredBlocks to the shader plan encoding, and JJenkx's fix(agc): render layered mesh targets within device limits #6959, which moves FormatVersion to 51. The one conflict was FormatVersion in ShaderDiskCache.hpp: main moved to 51, and this PR keeps 52 (see Overlap). Git merged the rest without conflicts, including this PR's agc_shader_sampler_limits registration beside fix(shader): split scalar-address descriptor phis #7694's agc_shader_descriptor_phis in agc_shader_memory_tests.cmake. This PR's diff over main is the same apart from the FormatVersion line's old value. The sampler-limit, selected-record, disk-cache and shader-memory tests, with agc_driver_image_sample_reduction and agc_driver_many_direct_samplers, pass 10 runs in a row. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 11 pass, 2 skip (agc_driver_image_sample_reduction and agc_driver_many_direct_samplers; no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • ba833f4: the pair-limit tests check the merge without compiling it, for @XairRrR's review (review), which timed them at about 38 s each when run alone, over the 30 s per-test limit. They read only the plans and the merged table's snapshot, but compiled the merged request too, which holds 264 image samples past the 256-pair limit. With SPIRV-Tools on, that compile was the time: at 760a550 each took 11.9 to 13.6 s on GitHub's Linux runner, and 0.29 to 0.43 s there with SPIRV-Tools off (run). They now take the capture alone; the image-limit tests still compile theirs. On GitHub's runners (run), the two pair-limit tests take 0.05 to 0.14 s on Linux and 0.12 to 0.18 s on Windows, and this PR's tests pass 10 runs in a row. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 11 pass, 2 skip (agc_driver_image_sample_reduction and agc_driver_many_direct_samplers; no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.

Checklist

@github-actions github-actions Bot added unblocks title Names a title ID on the Unblocks line build shader core/shader docs agc libSceAgc* labels Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6340 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L1988-1990
PR 6858 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 6970 core/shader/recompiler/Recompiler.hpp L557-564
PR 7085 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 9897 core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake L72
PR 12904 core/libs/prx/libSceAgcDriver/Graphics/src/Sampler.cpp L3
PR 14636 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 14853 core/shader/recompiler/ShaderDiskCache.hpp L16
docs/dev/debt/shader.md L60-61
PR 14871 core/shader/recompiler/ShaderDiskCache.hpp L16

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 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 5021 docs/dev/debt/shader.md
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 5609 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 5925 core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6188 core/shader/recompiler/Recompiler.hpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 6280 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/include/Sampler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Sampler.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6924 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7223 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7392 docs/dev/debt/shader.md
PR 7410 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 8004 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9020 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9183 core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 9318 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9335 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9356 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 9387 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/Sampler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Sampler.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake
core/shader/recompiler/Optimization/include/Optimization/DescriptorBindingBuilder.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9748 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 9884 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10049 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/Sampler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Sampler.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp
core/shader/recompiler/Optimization/include/Optimization/DescriptorBindingBuilder.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 10233 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10359 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10757 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
PR 10867 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11351 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
PR 11483 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 11557 docs/dev/debt/shader.md
PR 12324 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 12548 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12790 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
docs/dev/debt/shader.md
PR 12828 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
PR 13486 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/Sampler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Sampler.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp
core/shader/recompiler/Optimization/include/Optimization/DescriptorBindingBuilder.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/Sampler.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Sampler.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ShaderInfo.hpp
core/shader/recompiler/Optimization/include/Optimization/DescriptorBindingBuilder.hpp
core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 14212 docs/dev/debt/shader.md
PR 14217 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 14218 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Recompiler.hpp
docs/dev/debt/shader.md
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 14561 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Recompiler.hpp
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Recompiler.hpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 14964 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
PR 15059 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the exact head and traced the widened sampler masks through descriptor planning, materialization, disk-cache encoding/content keys, driver iteration and image-table replay. The capacity check limits shifts to 64 bits, the loops enumerate only set bits, and the cache format change covers the serialized element width. The added CPU and llvmpipe tests exercise >32-bit masks, border/de-gamma handling, refusal paths, 64 samplers/256 pairs and the 17-direct-sampler execution case. CI eligibility/intake/conventions/labels/report pass; hosted product jobs are skipped by path policy. I could not independently run the Vulkan/GPU suite here, and the PR explicitly lists the Ratchet & Clank replay as pending, so I am not treating a title unblock as verified. check_conventions.py and git diff --check pass locally. No blocking issue found in the reviewed implementation.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating my earlier review: that approval covered the prior main tip, but the exact PR head is now 394 commits behind current main. tools/check_main_sync.py --base upstream/main --head refs/reviews/pr-10000 reports six touched files changed on both sides since merge base, including ShaderResources.cpp, ShaderMemory.cpp, ResourceMaterializer.cpp, Recompiler.hpp, ShaderDiskCache.cpp and the AGC CMake target; the merge is clean, but these areas need integration review against current behavior. Please refresh from current main, preserve the sampler-mask and cache-format changes alongside newer edits, then rerun the required focused shader/AGC tests on both current main and the refreshed change with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1 using ctest -V on the same machine/GPU. Compare the logs for newly introduced VUIDs and report GPU/driver/OS. I could not run those tests here: this checkout has no build directory and this host exposes no Vulkan tooling. The Ratchet & Clank replay remains explicitly pending in the PR body, so keep the title-unblock claim unverified until that run is reported. This request is for current-main integration and required validation, not PR volume.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 23, 2026
@EagleBearerYS
EagleBearerYS marked this pull request as ready for review October 23, 2026 10:39
@Lander0606

Copy link
Copy Markdown
Contributor

A hardware data point next to lavapipe: AMD iGPU on Linux (RADV), head 51a0116de0 against its base 0db47b263d, without merging onto current main.

Setup

  • Radeon 860M (Ryzen AI 7 350, 1002:1114, RADV KRACKAN1), Mesa 26.2.5, Vulkan 1.4.354, Fedora 44, kernel 7.2.11.
  • Built in an Ubuntu 24.04 container with GCC 13.3, Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON. The tests ran on the Fedora host, with VK_DRIVER_FILES limited to RADV.
  • ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -j1 -V -R 'sampler|selected_records|image_sample|disk_cache', three runs without and three with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.341).
Without the layer With the layer
base 0db47b263d (18 tests) 18/18, 18/18, 18/18 18/18, 18/18, 18/18
this PR 51a0116de0 (20 tests) 20/20, 20/20, 20/20 20/20, 20/20, 20/20
  • agc_driver_many_direct_samplers runs on the 860M, with no skip: the border read at sampler element 32, the FORCE_DEGAMMA decode and the refused BC swizzle all pass.
  • agc_shader_sampler_limits plans Rift Apart's shape (60 table samplers plus 3 direct, 51 images, 112 pairs) and refuses 65 samplers, 306 pairs and 33 direct samplers.
  • The four selected-records tests pass. The two pair-limit tests take about 4.8 s here instead of 0.8 s on the base, which fits their eight samplers per read.
  • Validation: the loader inserted VK_LAYER_KHRONOS_validation 11 times per run on the base and 12 times on the head (VK_LOADER_DEBUG=layer). No log contains was not found but was requested by env var VK_INSTANCE_LAYERS, and neither side logs a VUID- line.

I didn't run a title.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@Lander0606 thank you, a hardware run next to lavapipe is exactly what this needed, and agc_driver_many_direct_samplers running on the 860M with no skip is the case lavapipe-only runs could not show. It is in the Tested section now.

@frankea

frankea commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@EagleBearerYS a second title for this PR: Ghostrunner (PPSA03685) compute shader 0x200c520000, replayed offline (agc_shader_replay --prepare, ANYPS5_NO_SHADER_CACHE=1) on the request the driver dumped at use. The shader links three table callees into 104,136 dwords, so every build is main 513ca7e with #9068 (daef563) and #8070 (73c9c2a), plus #9701 to #9703 (98c6aef) so that each preparation takes about 26 s instead of about 200:

Build Result
base #7459's GetImageResource dword 0 is not a valid runtime value, a T# behind a readfirstlane-keyed record in a waterfall loop whose pointer Phis carry Ballot AND-NOT words
+ #8939 (9162d9d, with #7395 and #7223) past it; sampler resource limit exceeded
+ #9969 (7588a53, the stack through #9790; its newer head d01f290 changes only a memo footprint count) the same
+ #9969 and this PR (51a0116) past it; image resource limit exceeded

So for this shader #8939 is what clears #7459, and with this PR the next cap is MaxImages (64). RTX 4090, Windows 11; replay only, no title run.

@zaidhawk your Persona 3 Reload stop after #9068, #8070 and #9701 to #9703 is a chain of the same family (ReadFirstLane record reads with Ballot words in the Phis), so #8939 and this PR may be worth a run there too.

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

Thanks, @frankea, a second title's shader through the whole chain is useful: #8939 clears #7459's refusal, and this PR the sampler limit, so the next cap for 0x200c520000 is the 64-image limit. The replay is in the Tested sections of this PR and #8939.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 23, 2026
@zaidhawk

Copy link
Copy Markdown
Contributor

@EagleBearerYS @frankea Persona 3 Reload (PPSA10872), as frankea suggested above. Its strip-mall compute shader 0x2014960000 goes through the same chain as Ghostrunner's, and with this PR it gets past the pair limit to a new GetImageResource refusal.

Setup: agc_shader_replay --prepare of the request the driver wrote just before this shader's preparation: 119,922 words, all three table calls linked. It was captured on main 9d6adeb with #7048, #9068 at e5a02bd, #8070 and a local 32,768-dword callee window (see #9068). RTX 5090, Windows 11, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1, one run per build. Every build is main 0db47b2 with #9068 (ef2b164) and #9703's branch (98c6aef) applied:

Build Wall time Result
base 32.6 s #7459's GetImageResource dword 0 is not a valid runtime value, with the chain from LoadAddressU32@pc=0x000036f8 through ReadConstBuffer@pc=0x000003f4 and Ballot words in its Phis
+ #9969's branch (d01f290, the stack from #7223 through #9969) 32.7 s past it; sampled image/sampler pair limit exceeded
+ #9969's branch and this PR (51a0116) 32.7 s past it; GetImageResource dword 0 is not a valid runtime value at LoadAddressU32@pc=0x00014724

The new chain is deeper than the first. The address is a Phi of nested Phis (125 in the chain, with three Ballot words) over ReadConstBuffer@pc=0x00013fc0, and that buffer's V# is itself read through a pointer (LoadAddressU32@pc=0x00013a4c). The chain's other loads are at 0x0000f894 and 0x00012f44.

The full refusal with this PR
GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00014724(GetAddressResource(Phi(Phi(Phi(Phi(Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi)), BitwiseAnd32(Phi(Phi, Phi), CompositeExtractU32x4(Ballot, Immediate))), Phi(Phi(Phi(Phi, Phi), BitwiseAnd32(Phi, CompositeExtractU32x4)), Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi)))), Phi(Phi(Phi(Phi(Phi, Phi), BitwiseAnd32(Phi, CompositeExtractU32x4)), Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi))), ReadConstBuffer@pc=0x00013fc0(GetBufferResource(LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate)), Immediate))), Phi(Phi(Phi(Phi(Phi(Phi, Phi), BitwiseAnd32(Phi, CompositeExtractU32x4)), Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi))), BitwiseAnd32(Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi)), CompositeExtractU32x4(Ballot(Immediate), Immediate))), Phi(Phi(Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi)), BitwiseAnd32(Phi(Phi, Phi), CompositeExtractU32x4(Ballot, Immediate))), Phi(Phi(Phi(Phi, Phi), BitwiseAnd32(Phi, CompositeExtractU32x4)), Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi)))))), Phi(Phi(Phi(Phi(Phi(Phi(Phi, Phi), Phi(Phi, Phi)), Phi(Phi(Phi, Phi), LoadAddressU32@pc=0x00012f44(GetAddressResource, Immediate, Immediate, Immediate))), Phi(Phi(Phi(Phi, Phi), Phi(Phi, ReadConstBuffer@pc=0x0000f894)), Phi(Phi(Phi, Phi), Phi(Phi, Phi)))), Phi(Phi(Phi(Phi(Phi, Phi), Phi(Phi, LoadAddressU32@pc=0x00012f44)), Phi(Phi(Phi, Phi), Phi(Phi, Phi))), ReadConstBuffer@pc=0x00013fc0(GetBufferResource(LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x00013a4c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddre

To apply this PR on #9969's branch I renumbered the one conflicting line, ShaderDiskCache::FormatVersion (50 against 49), to 51; the replays run with the shader cache disabled. #9068 and #9703 conflict only in docs/dev/debt/libSceAgcDriver.md, which I left out.

Not covered: #8939 without the rest of the stack (so I can't say which PR of the stack clears the first refusal), a run in the title, other GPUs.

@adriadam10 adriadam10 self-assigned this Oct 23, 2026
…it sampler masks

Ratchet & Clank: Rift Apart (PPSA01474) stops with "sampler resource
limit exceeded": Tamalero's counts, with the caps lifted in a tracing
copy, are 63 distinct sampler sources (60 columns of one per-lane image
table, 3 direct S#s), 51 images and 112 sampled image/sampler pairs in
one shader
(boykopovar#9749 (comment)).
With only the sampler cap lifted they stop next on the pair limit. This
does not claim the title now runs.

MaxSamplers was 32 because the image-to-sampler masks were 32-bit: the
per-sampler masks of sampler heap elements and DescriptorBinding's
imageSamplers, the image table's tableSamplerMasks, the per-image masks
of direct sampler resources and ImageTableElement::samplers, and the
driver's checks over them (filter min/max, forced degamma, border
swizzle, non-seamless cube) and its sampler-source loops, which stopped
at element 32. Direct samplers take two heap elements each, so the
32-bit element masks held only 16 of them.

The masks are now 64-bit and the driver walks their set bits.
MaxSamplers is 64: BindingAllocator already holds every shader to the
runtime ABI's 64 sampler metadata entries (SamplerHeapCapacity), and the
64-element sampler heap holds 32 direct samplers, so a wider mask would
not be reachable without a larger ShaderData. MaxSampledPairs is 256.
The refusal texts are unchanged. FormatVersion is 49: serialized binding
descriptors now hold 64-bit masks (45 to 48 are taken by open pull
requests, so the number may move at merge).

The --sampler-limits mode plans the Rift Apart shape (60 table sampler
columns at distinct offsets of one per-lane record and 3 direct
samplers, 51 images, 112 pairs) and checks each image table element's
mask; it binds 20 direct samplers as 40 elements and checks an image
paired only with elements 32 to 39, and 18 direct samplers beside an
image table; and it checks the refusals past the limits: 65 samplers,
306 pairs and 33 direct samplers. The many direct samplers execution
test binds 17 direct samplers on a device, the last at sampler element
32, and reads its border colour, its forced degamma and its border
swizzle refusal. The selected-records pair limit tests sample each read
through eight samplers so the pair limit is still reached before the
image limit.
@adriadam10
adriadam10 force-pushed the feat/shader-sampler-limits branch from 51a0116 to 12b8923 Compare October 24, 2026 01:29
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

Thanks, @zaidhawk. A second title whose shader goes through the same chain, with each build compared, is useful: Persona 3 Reload (PPSA10872)'s 0x2014960000 gets past the pair limit with this PR on #9969's stack and stops on a deeper chain at 0x14724. It's in the Tested section now, as a replay, with that stop as the shader's next one.

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Lander0606 compared main 0db47b2 with the refreshed 51a0116 under the layer on an 860M (no VUID- message), and Tamalero's Rift Apart runs are in Tested. Could you re-review this head?

@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@frankea thanks for the Ghostrunner (PPSA03685) replay. The next cap it reached, image resource limit exceeded, is raised to 128 in #10489, stacked on this PR (branch feat/shader-max-images-128-next2, 8e0d4f5). Its refusals now name the counts, for example image resource limit exceeded (129 of 128).

If you have time, could you replay 0x200c520000 the same way on #10489's branch, which carries this PR? One limit stays at 64: direct sampled images, since each typed heap holds 64, so the shader gets past the tracker only if at most 64 of its images come in directly rather than through image tables. A refusal from that would read shader image heap capacity exceeded.

@brummilab

Copy link
Copy Markdown

Tested on AMD under Windows, which the runs so far don't cover: Radeon RX 6600 XT (Navi 23, 0x73ff), AMD driver 32.0.21045.16010, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release. main b84322da6 and this PR (head 12b89239c) merged onto it, same machine, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1:

ctest -R "agc_shader_memory|agc_shader_selected_records|agc_shader_bindless|agc_shader_disk_cache|image_sample|sampler|agc_driver_image_table|agc_driver_bindless_images"

Tests Result
main 30 30/30 passed
this PR 32 32/32 passed (new: agc_driver_many_direct_samplers, agc_shader_sampler_limits)

Not checked with the validation layer: on this machine the Khronos layer (SDK 1.4.363) does not load in the test processes although VK_INSTANCE_LAYERS is set (see my note in #9789).

AI-assisted: yes

@TechLevelZero

TechLevelZero commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 760a550 merged onto main 88e804b · tested 2026-11-02 15:46 UTC · 25 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,554 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,605 of 3,234 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (974 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.7 s, ⚠️ agc_driver_graphics 30.1 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 2 of the last 10 main runs
agc_submit_progress: failed in 8 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_many_direct_samplers
agc_shader_sampler_limits
Validation IDs already present on main (4 IDs in 497 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (497 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 489 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin 760a55029427f45d4bf438e855369b1b596f0b27 88e804b0a7df1f1ac373a9e2f72fb378d925fdd4
git checkout 88e804b0a7df1f1ac373a9e2f72fb378d925fdd4 && git merge --no-ff 760a55029427f45d4bf438e855369b1b596f0b27
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

The widening of the image-to-sampler masks to 64 bits is correct and does what the PR says, but the two reworked selected-records pair-limit tests now take about 38 s each when run alone here, against 5–6 s on main, which is over the project's 30 s limit per test.

What I ran

Head 760a55029427f45d4bf438e855369b1b596f0b27, main 9090972b7e91fd266819cbd77a8b058e177b5682, merged tree df2c89e223ca19988f76b7a8b752c002ef709a8d (Release, GCC 14.2.0, Ninja, BUILD_TESTING=ON). Debian 13 VM, 32 vCPU Xeon Gold 6136, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19), no GPU.

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...760a55029427f45d4bf438e855369b1b596f0b27
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "agc_shader_sampler_limits|agc_driver_many_direct_samplers|agc_shader_selected_records|agc_shader_disk_cache|agc_driver_image_sample_reduction|agc_driver_image_table$|agc_driver_bindless_images"
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j1 --output-on-failure -R "agc_shader_selected_records_(direct_)?pair_limit|agc_shader_sampler_limits"
time env ANYPS5_NO_SHADER_CACHE=1 build/tests/agc_shader_memory_tests --selected-records-pair-limit   # twice, merged tree
# negative control: the 11 production files restored from main, then
ninja -C build -j32 -l32 agc_shader_memory_tests agc_driver_many_direct_samplers_tests
ctest --test-dir build -j4 --output-on-failure -R "agc_shader_sampler_limits|agc_driver_many_direct_samplers$|agc_shader_selected_records_(direct_)?pair_limit"
# timing baseline: main's ShaderMemory.cpp and production files, then
time env ANYPS5_NO_SHADER_CACHE=1 build/tests/agc_shader_memory_tests --selected-records-pair-limit
time env ANYPS5_NO_SHADER_CACHE=1 build/tests/agc_shader_memory_tests --selected-records-direct-pair-limit
# every file restored from the merged tree, targets rebuilt, git status --porcelain empty

Results

Check Result
Merge into main Clean (done by the script)
git diff --check No output
check_conventions.py 0 errors. 1 warning: the image-table entry in docs/dev/debt/shader.md is 1,068 characters (it is already over the limit on main, as the PR says)
Build, libs OK (build.json)
Selected test run (build.json) 2102 run, 0 new failures, 0 timeouts. The 7 known failures also fail on main
Validation layer (build.json) Loaded in 757 of 758 tests. 0 tests with a new VUID-. layer_missing_in is empty
Focused set (12 tests) 12/12 pass
agc_shader_selected_records_pair_limit, alone 37.4 s (ctest -j1). 39.2 s and 38.7 s with time, almost all of it user CPU on one thread
agc_shader_selected_records_direct_pair_limit, alone 37.7 s
Same two tests, main's test file and production code 5.4 s and 6.5 s
agc_shader_sampler_limits 15.2 s alone
agc_driver_many_direct_samplers 8.3 s, runs (lavapipe binds ≥ 33 samplers per stage)
Timing of the pair-limit test on the merged tree (run alone, twice)
real	0m39.167s
user	0m38.742s
sys	0m0.372s

real	0m38.660s
user	0m38.343s
sys	0m0.312s

Negative control

I restored the 11 production files from main (Sampler.hpp/.cpp, ShaderResources.cpp, ShaderInfo.hpp, DescriptorBindingBuilder.hpp/.cpp, ResourceMaterializer.hpp/.cpp, Recompiler.hpp, ShaderDiskCache.hpp/.cpp) and kept the PR's tests. The test executables built.

  • agc_shader_sampler_limits fails with sampler resource limit exceeded.
  • agc_driver_many_direct_samplers fails with ShaderRecompiler::Recompile: prepared sampler mask capacity exceeded.
  • The two selected-records pair-limit tests still pass. They take their limit from MaxSampledPairs, so they follow whichever value the build has, which is expected.

After restoring the merged files and rebuilding, git status --porcelain was empty. This matches the description's "Red" claim.

Findings

Blocking

  • The selected-records pair-limit tests now take about 38 s, over the 30 s per-test rule. See core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp:4628-4629 in the merged tree (at head).
    • Why they are slower: with MaxSampledPairs = 256 and 8 samplers per read, each test now plans and compiles 32 selected reads × 8 samplers (256 pairs) plus the reads one past the limit. Before, it was 32 reads × 2 samplers.
    • Numbers: run alone here, agc_shader_selected_records_pair_limit takes 37.4 s and agc_shader_selected_records_direct_pair_limit 37.7 s. That is almost entirely single-threaded user time (38.7 s user for 39.2 s wall). main's versions take 5.4 s and 6.5 s on the same machine. That is about 7× slower, in line with Lander0606's 0.8 s → 4.8 s on the 860M.
    • The rule: CONTRIBUTING.md asks that each test finish in 30 s on the CI runners and that a test that gets close be split or shrunk, not given a longer timeout. Under parallel ctest on the runners these will be at or over that.
    • Suggested fix: shrink or split them. For example, check the "fits at the limit" plan and the "one past merges" plan in separate test cases. Or check the merge with fewer reads by lowering the pair count with direct samplers. Or compile only the merged request and not the at-limit one. Then report their times.

Non-blocking

  • Outdated first commit message: commit 12b89239c792 still says FormatVersion is 49 and that the test "checks the refusals past the limits: 65 samplers, 306 pairs and 33 direct samplers". 8a7c32652309 removed those refusal checks, and the tree has FormatVersion = 52. If the PR is squash-merged, the message should match the final change.
  • Possible planning cost to check (a question, not a defect I showed): the Rift Apart-shaped plan in agc_shader_sampler_limits (51 images, 63 samplers, 112 pairs) takes about 15 s on this machine. The pair-limit tests grow about 7× for 4× the pairs. It would be worth saying whether per-shader preparation cost grows faster than linearly in sampled pairs, since raising the cap lets real shaders reach those sizes.

Things I checked that are fine:

  • Every 32-bit sampler mask I found is now 64-bit, or proven to stay within 64 bits:
    • DescriptorBindingBuilder.cpp:575 and :672;
    • ResourceMaterializer.cpp:1888 and :1927;
    • ShaderResources.cpp:5125 and :5381;
    • the four Sampler.cpp helpers.
  • Shifts stay below 64:
    • the element-mask check at DescriptorBindingBuilder.cpp:574 compares against 64;
    • MaxSamplers ≤ 64 is enforced by the static_assert at ResourceMaterializer.cpp:37;
    • BindingAllocator.cpp:103 caps samplers at SamplerHeapCapacity.
  • The new set-bit loops visit elements in ascending order. So the early break on sampler >= size is equivalent to the old bound, and the throwing helpers keep their out-of-range Require.
  • The content key writes two words per mask in both VisitContentKey and AppendContentKey, and FormatVersion is bumped for the serialized width.
  • The per-sampler specialization ranges (FoldOffsetBase, UnnormalizedBaseLevelBase, MirrorUnnormalizedBase in PipelineSpecialization.hpp:48-51) are 64 wide, so 64 samplers still fit.
  • The new debt entry names refusal texts that exist: BindingAllocator.cpp:163, ResourceTracker.cpp:2339 and :2467.
  • The checklist lines (Depends on, Fixes, Unblocks, GPUs tested, AI-assisted) are present.

Earlier reviews:

  • I confirm MarcZX10's last approval on the substance: no new VUIDs here either, on a newer main.
  • oneandonlydean's request to drop the refusal assertions has been done.
  • The MoltenVK skip added after jotitadev's review is in ManyDirectSamplers.cpp (maxPerStageDescriptorSamplers/maxDescriptorSetSamplers < 33 skips).

Not verified

  • Test times on GitHub's runners. My timings come from a Xeon Gold 6136 VM. Hosts in the NVIDIA bot's runs did not flag these tests over 30 s.
  • Hardware GPUs (lavapipe only), the title claims (Rift Apart, Ghostrunner, Persona 3 Reload, My First Gran Turismo) and the description's micro-benchmark numbers.
  • Where inside planning or compilation the pair-limit tests spend their time: no profiler is available here.

To get this to a good state

  • Bring agc_shader_selected_records_pair_limit and agc_shader_selected_records_direct_pair_limit well under 30 s, for example by splitting the at-limit and past-limit cases or reducing what is compiled, and report their times on main and on the change.
  • Optionally reword or squash the first commit's message so it matches the final tree (FormatVersion 52, no refusal checks).

The selected-records pair-limit tests check the plan at the limit, the
plan one past it, and the merged table's snapshot. They compiled the
merged request too, whose result they never read: past the 256-pair
limit it holds 264 image samples, and that compile made each test take
about 12 s on GitHub's Linux runner. The pair tests now take the
capture alone. The image-limit tests still compile their merged
request.
@EagleBearerYS

Copy link
Copy Markdown
Contributor Author

@XairRrR thanks for the timings. The two pair-limit tests are fixed in ba833f4.

Where the time went: not the planning. These tests never read the compiled result, only the plans and the merged table's snapshot, but they compiled the merged request anyway. Past the 256-pair limit that request holds 264 image samples, and validating and optimizing that module with SPIRV-Tools, which Linux builds enable, was the time. On GitHub's runners at 760a550, each test took:

  • 11.9 to 13.6 s on Linux with SPIRV-Tools on (run);
  • 0.29 to 0.43 s on Linux with SPIRV-Tools off (run);
  • 0.34 to 0.38 s on Windows, which builds without it.

The fix: the pair tests now take the capture alone, and every check they make is unchanged. The image-limit tests still compile their merged request. On GitHub's runners, 10 runs (run):

  • agc_shader_selected_records_pair_limit took 0.06 to 0.13 s and agc_shader_selected_records_direct_pair_limit 0.05 to 0.14 s on Linux, and 0.12 to 0.18 s each on Windows;
  • Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 11 pass, 2 skip (agc_driver_image_sample_reduction and agc_driver_many_direct_samplers; no Vulkan device), 0 fail.

Your planning question: planning at these sizes is cheap. With SPIRV-Tools off, each pair test takes under 0.5 s with its two plans and the compile, and agc_shader_sampler_limits (51 images, 63 samplers, 112 pairs) takes 0.21 s. What grows is SPIRV-Tools' validation and optimization of the compiled module. In the fix's run, agc_shader_sampler_limits took 2.9 to 5.9 s on Linux with SPIRV-Tools on.

The first commit's message: you're right that 12b8923 still describes the first version. PRs here land with merge commits, so it would land as written. Rewording it would mean rewriting the pushed branch, so I've left it: 8a7c326's message says what it removed, and the description has the final state.

Could you take another look?

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The new test-only commit ba833f42c0 stops the two selected-records pair-limit tests from compiling the merged request. They now take about 0.1 s each here, down from about 38 s, so my one blocking finding is resolved.

What changed since my last review

  • One new commit, ba833f42c0 (test(shader): check the pair-limit merge without compiling it). It touches only core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp.
    • It adds CaptureTable, which runs the ShaderMemory::Capture step that CompileTable already runs, without the Recompile call after it.
    • The two pair-limit cases (pairs == true) now use it to get the merged table's snapshot. The image-limit cases still call CompileTable(...).capture.
    • The rest of the PR's commits are unchanged. delta.patch shows commits 1 to 3 as =.
  • The author's reply gives the cause (SPIRV-Tools validating and optimizing the 264-sample module), answers my planning-cost question, and explains why the first commit message was not reworded.
  • The description has a new Tested bullet for ba833f42c0.

What I ran

Head ba833f42c0f43142fbec50d0ee0ef8214c5faa29, main 5cb015caaaaf83f8ee431414ee6a457b5b307d49, merged tree fe395e2f0abc68a97fa7527ac862747d68937f07 (Release, GCC 14.2.0, Ninja, BUILD_TESTING=ON). Debian 13 VM, 32 vCPU Xeon Gold 6136, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19), no GPU.

git show ba833f42c0f43142fbec50d0ee0ef8214c5faa29
git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...ba833f42c0f43142fbec50d0ee0ef8214c5faa29
python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j1 --output-on-failure -R "agc_shader_selected_records|agc_shader_sampler_limits|agc_driver_many_direct_samplers$"
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j1 --output-on-failure -R "agc_driver_image_sample_lod_clamp_shader_lane$|unwrap_self_UnwrapTest_test_new_output_inherits"
# the 11 production files restored from main, then
ninja -C build -j32 -l32 agc_driver_image_sample_lod_clamp_tests agc_shader_memory_tests agc_driver_many_direct_samplers_tests
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j1 --output-on-failure -R "agc_driver_image_sample_lod_clamp_shader_lane$"
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j4 --output-on-failure -R "agc_shader_sampler_limits|agc_driver_many_direct_samplers$|agc_shader_selected_records_(direct_)?pair_limit"
# merged files restored, git status --porcelain empty, targets rebuilt
env ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j4 --output-on-failure -R "agc_shader_sampler_limits|agc_driver_many_direct_samplers$|agc_shader_selected_records"

Results

Check Result
git diff --check No output
check_conventions.py 0 errors. The same single warning as before: the image-table debt entry in docs/dev/debt/shader.md is 1,068 characters, already over the limit on main
Build, libs (build.json) OK
Selected tests (build.json) 2238 run. 0 timeouts. Two failures are listed as new; neither comes from this PR (see below)
Validation layer (build.json) Loaded in 759 of 760 tests. layer_missing_in is empty. 0 tests with a new VUID-
agc_shader_selected_records_pair_limit, alone 0.13 s (it was 37.4 s at 760a550294)
agc_shader_selected_records_direct_pair_limit, alone 0.10 s (it was 37.7 s)
agc_shader_selected_records_image_limit / _direct_image_limit 6.69 s / 5.39 s, pass
agc_shader_sampler_limits 16.3 s alone, pass
agc_driver_many_direct_samplers 7.6 s, pass

The two failures build.json lists as new are from main:

  • agc_driver_image_sample_lod_clamp_shader_lane fails with the same message (thread 0 component 1 is 0.000000, expected 0.062500) after the PR's 11 production files are restored from main and the test rebuilt. The test came into main through #12980, after the failure baseline 096c45570f.
  • unwrap_self_UnwrapTest_test_new_output_inherits_the_destination_directory_group fails on os.chown with EINVAL in the sandbox's /tmp. It is a tools/ test this PR does not touch, added to main after the baseline.

Negative control

I restored the 11 production files from main and kept the PR's tests:

  • agc_shader_sampler_limits fails with sampler resource limit exceeded.
  • agc_driver_many_direct_samplers fails with ShaderRecompiler::Recompile: prepared sampler mask capacity exceeded.
  • The two pair-limit tests pass, as before. They take their limit from MaxSampledPairs.

After restoring the merged files, git status --porcelain was empty. I rebuilt the targets, and the 6 tests pass.

The new commit removes only the compile from the pair cases. Every require they make is unchanged. The snapshot they check comes from the same ShaderMemory::Capture call that CompileTable makes before it compiles. See CaptureTable and its use. The image-limit cases still compile their merged request, so the compile path is still covered.

Previous findings

  • Pair-limit tests about 38 s, over the 30 s rule (blocking): Resolved. They take 0.13 s and 0.10 s alone here, in line with the author's 0.05 to 0.14 s on GitHub's Linux runner (author-reported).
  • Outdated message on the first commit (non-blocking): No longer applies. The author points out that PRs land with merge commits, so the history keeps 8a7c326523, which says what it removed. The tree and the description describe the final state. I accept that.
  • Planning cost per sampled pair (question): Resolved. The author attributes the time to SPIRV-Tools working on the compiled module, not to planning. That fits what I see: removing only the compile took the pair tests from about 38 s to about 0.1 s. agc_shader_sampler_limits still takes 16 s here because it compiles. That is under the limit, and the author reports 2.9 to 5.9 s on GitHub's runners.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Test times on GitHub's runners. The author reports them; mine come from a Xeon Gold 6136 VM.
  • Hardware GPUs: I ran on lavapipe only.
  • The title claims (Rift Apart, Ghostrunner, Persona 3 Reload, My First Gran Turismo).

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head ba833f4 merged onto main 9090972 · tested 2026-11-03 00:17 UTC · 40 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,704 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,755 of 3,607 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (980 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 33.3 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 10 main runs
agc_submit_progress: failed in 7 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 6 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_many_direct_samplers
agc_shader_sampler_limits
Validation IDs already present on main (4 IDs in 516 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (516 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 508 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin ba833f42c0f43142fbec50d0ee0ef8214c5faa29 9090972b7e91fd266819cbd77a8b058e177b5682
git checkout 9090972b7e91fd266819cbd77a8b058e177b5682 && git merge --no-ff ba833f42c0f43142fbec50d0ee0ef8214c5faa29
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head ba833f4 merged onto main a4eca2a · tested 2026-11-03 00:24 UTC · 39 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,675 passed · 13 failed (0 new, 12 also fail on main, 1 unstable on main) · 54 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,742 of 3,591 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (980 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ agc_driver_graphics 105.8 s, ⚠️ public_headers 61.6 s, ⚠️ agc_driver_lazy_resolved_abi_switch_set 47.6 s, ⚠️ agc_driver_image_sample_unnormalized 44.6 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 6 main runs
Failing on main too (12, not counted against this PR)
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_idle_publish_wait
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (2, not in the main baseline's validation pass)
agc_driver_many_direct_samplers
agc_shader_sampler_limits
Validation IDs already present on main (4 IDs in 510 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (510 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 502 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
Skipped (54)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferr
Reproduce
git fetch origin ba833f42c0f43142fbec50d0ee0ef8214c5faa29 a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8
git checkout a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 && git merge --no-ff ba833f42c0f43142fbec50d0ee0ef8214c5faa29
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 3, 2026
@oneandonlydean
oneandonlydean merged commit 66387a1 into boykopovar:main Nov 3, 2026
16 of 17 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 3, 2026
oneandonlydean added a commit to ZSWolt/AnyPS5 that referenced this pull request Nov 3, 2026
Bumps ShaderDiskCache FormatVersion to 53. Main landed boykopovar#10000 with format 52, which this branch also used for its own cache format change; both sides set the same line, so the merge kept 52 silently, and caches written by main would load under this format.
oneandonlydean pushed a commit that referenced this pull request Nov 8, 2026
… refusals

ShaderInfo::MaxImages goes from 64 to 128. Nothing that holds per-image
data is narrower: the ImageBase, MipCountBase, CompareBase and
StoreQuantizeBase specialization ranges reach 1663, 8447, 49919 and
12799 at 128 images, below the next range at 4096, 12288, 57344 and
16384; the runtime ShaderData image array holds 256; and no mask is
indexed by image. Direct sampled images stay bound to the 64-element
typed heaps, so images past 64 come through image tables.

The tracker's "image resource limit exceeded" and the binding builder's
"runtime image count exceeds the static capacity" now name the count
and the limit, as in "(129 of 128)".

FormatVersion goes to 51: #10000 is at 49 and #9969 at 50.

The selected-record limit test is sized for 128 images: 256 heap
records, the direct T#s and samplers past the 130 key words, and the
two-heap split scaled from the limit (40 and 30 at 64, 80 and 60 at 128).
oneandonlydean pushed a commit that referenced this pull request Nov 8, 2026
Takes #10000's merge of main (#10440's 64-bit image atomics next to the
widened sampler mask).
oneandonlydean pushed a commit that referenced this pull request Nov 8, 2026
The conflict in core/libs/prx/libSceAgcDriver/CMakeLists.txt from #12862's split is resolved with tools/agc_test_split.py resolve, which moves this PR's test registrations into tests/cmake/.
oneandonlydean pushed a commit that referenced this pull request Nov 8, 2026
oneandonlydean pushed a commit that referenced this pull request Nov 21, 2026
…at, 63

yabanana's #7223 now takes 51, the number this PR had, and 52-62 are held by the open PRs: #10000 52, #8939 53, #10489 54, #9457 55, #9633 56, #9749 57, #10193 58, #9790 59, #9969 60, #10846 61, #7642 62. So this PR takes 63 and a cache written by #7223's recompiler is not read as this one's.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.