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

Merged
EagleBearerYS merged 12 commits from upstream-pr/10000 into main 2026-11-03 08:09:43 +00:00
EagleBearerYS commented 2026-10-23 03:35:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-23T03:35:18Z.


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:

  • FormatVersion: main is at 51 since #6959 (JJenkx). Ours take one number each: #10000 52, #10489 54, #7642 62, #7395 63, #8939 66, #9457 67, #9633 70, #9790 71, #9749 72 and #9969 73. The other open PRs seen changing it hold 50 (#9508, #12944), 51 (#7223, #14944), 58 (#14853), 65 (#14032), 68 (#14636) and 69 (#14871). So the conflict is the one line, plus the shader debt entries those PRs add next to the image-table entry this one edits. Keep both, and whichever lands second takes the next free number.
  • #9508: besides FormatVersion, it conflicts in DescriptorBindingBuilder::Populate, where it adds AtomicImageKind and imageAtomic64 on the lines next to this PR's std::uint64_t mask, and in one line of the AGC driver's debt file. Keep both.
  • #9989 (milescoviello's result-memo budget, merged): both PRs add test names to the same set_tests_properties line in the AGC driver's CMakeLists.txt. #9989 went first, and this PR's merge of main 85f8e11372 keeps both PRs' names.
  • Against main, none of these files conflicts.

Tested

  • Ratchet & Clank: Rift Apart (PPSA01474), run by Tamalero on test/9749-sampler-masks (b340d224db, this change on #9749's head b2d4afc64d) (comment):
    • Replays: the three captured requests that stop on sampler resource limit exceeded at #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 #9749.
  • agc_shader_sampler_limits (tests/ShaderMemory.cpp, beside #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.
  • #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 #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.
  • 51a0116de0, a merge of main 0db47b263d. The only conflict was ShaderDiskCache.hpp's FormatVersion line: main moved to 45 (#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): 51a0116de0 against its base 0db47b263d, 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 513ca7e55 with #9068, #8070 and #9701 to #9703.
    • With #8939 (and through it #7395 and #7223), the shader gets past #7459's GetImageResource refusal and stops on sampler resource limit exceeded; #9969's stack alone stops there too.
    • With #9969 and this PR (51a0116de), it gets past the sampler limit and stops on image resource limit exceeded, the 64-image cap (MaxImages).
  • 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 0db47b263 with #9068, #8070 and #9703, with #8939 (9162d9df8) and this PR (51a0116de), 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 #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 0db47b263 with #9068 and #9703.
    • The base stops on #7459's GetImageResource dword 0 is not a valid runtime value at LoadAddressU32@pc=0x000036f8. With #9969's branch (the stack from #7223 through #9969) it gets past that and stops on sampled image/sampler pair limit exceeded.
    • With this PR on top (51a0116de, FormatVersion renumbered to 51 for the stack; the replays run without the shader cache), it gets past the pair limit and stops on a deeper GetImageResource chain at LoadAddressU32@pc=0x00014724, through a buffer whose V# is itself read through a pointer at 0x00013a4c. That's the shader's next stop, not this PR's.
  • Ratchet & Clank: Rift Apart (PPSA01474), by @oneandonlydean (comment), on the same test/9749-sampler-masks (b340d224db): 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 b84322da6 against this PR's head 12b89239c7 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 (#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 2fade7ef4e against this PR's head d6061d4ce2 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.
  • d6061d4ce2, a merge of main c9b2660d56. The only conflict was FormatVersion: main moved to 47 (#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.
  • d82e3f9552, a merge of main 16ff208dc3 (run). main's #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 12b89239c7 merged into test/9749-null-storage (#9749 and #10906). Without this PR that branch stops at 214 s on sampler resource limit exceeded; with it, the run gets past #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.
  • fe85d6c4e3, a merge of main 85f8e11372 (run). main's #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.
  • aa94587021: 23194a4002, a merge of main 0c5401dcbd, 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.
    • 8a7c326523 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.
    • aa94587021 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 1829def9bf (job). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 7f4e97c45f, a merge of main 94fe1b5c5a (run). main now has #11507 (hugodearaujo's short-cube sampling), which takes FormatVersion 49 (b9f4f65904); that line was the one conflict, and this PR keeps its 52 (see What). #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 #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 1829def9bf (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 08a10d2253 it fails with sampler resource limit exceeded.
    • With this PR's head 7f4e97c45f 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.
  • a803318e65, a merge of main 0836dfdf4f (run, on 75d57e91db, which has the same tree). #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.
  • 760a550294, a merge of main 88e804b0a7 (run). main now has Ondra97's #7694 (scalar-address descriptor Phis), which adds DescriptorSource::requiredBlocks to the shader plan encoding, and JJenkx's #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 #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.
  • ba833f42c0: 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 760a550294 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

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (#9989, merge order only, has merged, see Overlap); none for FormatVersion: no other open PR uses 52 (see Overlap)
  • Fixes: none (related: #9749)
  • Unblocks: Ratchet & Clank: Rift Apart (PPSA01474) #2172 past sampler resource limit exceeded after #9749 (Tamalero's runs and oneandonlydean's 600 s run under Tested); its next stops are listed there; Ghostrunner (PPSA03685) #7320: compute shader 0x200c520000 past sampler resource limit exceeded with #8939 and #9969, in frankea's replay (its next stop is the 64-image limit); My First Gran Turismo (PPSA24156): compute program 0x1258c12300 past sampler resource limit exceeded in Rengundom's replay (CPU preparation only)
  • GPUs tested: Mesa llvmpipe (LLVM 20.1.2), Ubuntu 24.04, on GitHub's Linux runner and a cloud Linux machine; NVIDIA GeForce RTX 4090, for Rift Apart (Tamalero); AMD Radeon 860M (RADV, Mesa 26.2.5), Linux (Lander0606); AMD Radeon RX 6600 XT (32.0.21045.16010), Windows 11 (brummilab)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4977417904 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-23T03:35:18Z. --- ### 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](https://github.com/boykopovar/AnyPS5/pull/9749#issuecomment-6350154374)): | | 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:** - **`FormatVersion`:** `main` is at 51 since #6959 (JJenkx). Ours take one number each: #10000 52, #10489 54, #7642 62, #7395 63, #8939 66, #9457 67, #9633 70, #9790 71, #9749 72 and #9969 73. The other open PRs seen changing it hold 50 (#9508, #12944), 51 (#7223, #14944), 58 (#14853), 65 (#14032), 68 (#14636) and 69 (#14871). So the conflict is the one line, plus the shader debt entries those PRs add next to the image-table entry this one edits. Keep both, and whichever lands second takes the next free number. - **#9508:** besides `FormatVersion`, it conflicts in `DescriptorBindingBuilder::Populate`, where it adds `AtomicImageKind` and `imageAtomic64` on the lines next to this PR's `std::uint64_t` mask, and in one line of the AGC driver's debt file. Keep both. - **#9989** (milescoviello's result-memo budget, merged): both PRs add test names to the same `set_tests_properties` line in the AGC driver's `CMakeLists.txt`. #9989 went first, and this PR's merge of `main` 85f8e11372 keeps both PRs' names. - Against `main`, none of these files conflicts. ### Tested - **Ratchet & Clank: Rift Apart (PPSA01474)**, run by Tamalero on [`test/9749-sampler-masks`](https://github.com/EagleBearerYS/AnyPS5/tree/test/9749-sampler-masks) (b340d224db, this change on #9749's head b2d4afc64d) ([comment](https://github.com/boykopovar/AnyPS5/pull/9749#issuecomment-6361876513)): - **Replays:** the three captured requests that stop on `sampler resource limit exceeded` at #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 #9749. - **`agc_shader_sampler_limits`** (`tests/ShaderMemory.cpp`, beside #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. - **#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](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39855629299)): - **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](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39855689975)): - **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 #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. - **51a0116de0, a merge of `main` 0db47b263d.** The only conflict was `ShaderDiskCache.hpp`'s `FormatVersion` line: `main` moved to 45 (#7831), and this branch keeps its 49. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39931310200)), 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](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6363993199)): 51a0116de0 against its base 0db47b263d, 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](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6368191279)): 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` 513ca7e55 with #9068, #8070 and #9701 to #9703. - With #8939 (and through it #7395 and #7223), the shader gets past #7459's `GetImageResource` refusal and stops on `sampler resource limit exceeded`; #9969's stack alone stops there too. - With #9969 and this PR (51a0116de), it gets past the sampler limit and stops on `image resource limit exceeded`, the 64-image cap (`MaxImages`). - **Ghostrunner (PPSA03685), a second replay by @TheSovietWaffle** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6369860575)): 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` 0db47b263 with #9068, #8070 and #9703, with #8939 (9162d9df8) and this PR (51a0116de), 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 #8939 alone it stops on the sampler limit. - **Persona 3 Reload (PPSA10872), a replay by @zaidhawk** ([comment](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6375887221)): 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` 0db47b263 with #9068 and #9703. - The base stops on #7459's `GetImageResource dword 0 is not a valid runtime value` at `LoadAddressU32@pc=0x000036f8`. With #9969's branch (the stack from #7223 through #9969) it gets past that and stops on `sampled image/sampler pair limit exceeded`. - With this PR on top (51a0116de, `FormatVersion` renumbered to 51 for the stack; the replays run without the shader cache), it gets past the pair limit and stops on a deeper `GetImageResource` chain at `LoadAddressU32@pc=0x00014724`, through a buffer whose V# is itself read through a pointer at `0x00013a4c`. That's the shader's next stop, not this PR's. - **Ratchet & Clank: Rift Apart (PPSA01474), by @oneandonlydean** ([comment](https://github.com/boykopovar/AnyPS5/pull/9749#issuecomment-6383415584)), on the same `test/9749-sampler-masks` (b340d224db): 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](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6384598197)): 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` b84322da6 against this PR's head 12b89239c7 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](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6386352813)). The `-9` from `vkCreateInstance` with the layer requested (#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](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6388391816)): the same machine and test set, Vulkan SDK 1.4.363, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `main` 2fade7ef4e against this PR's head d6061d4ce2 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. - **d6061d4ce2, a merge of `main` c9b2660d56.** The only conflict was `FormatVersion`: `main` moved to 47 (#7550), and this PR goes from 49 to 52. Its own diff is otherwise unchanged. On GitHub's runners, 10 runs ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40100940273)) 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. - **d82e3f9552, a merge of `main` 16ff208dc3** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40187837974)). `main`'s #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](https://github.com/boykopovar/AnyPS5/pull/9749#issuecomment-6403242574)): RTX 4090, cold shader cache, with this PR's 12b89239c7 merged into `test/9749-null-storage` (#9749 and #10906). Without this PR that branch stops at 214 s on `sampler resource limit exceeded`; with it, the run gets past #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. - **fe85d6c4e3, a merge of `main` 85f8e11372** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40340973603)). `main`'s #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. - **aa94587021: 23194a4002, a merge of `main` 0c5401dcbd, and two test-only commits** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40640566330)). - **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. - **8a7c326523** 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. - **aa94587021** 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](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5664913889)) 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 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **7f4e97c45f, a merge of `main` 94fe1b5c5a** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40665852281)). `main` now has #11507 (hugodearaujo's short-cube sampling), which takes `FormatVersion` 49 (b9f4f65904); that line was the one conflict, and this PR keeps its 52 (see What). #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 #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 1829def9bf ([job](https://github.com/boykopovar/AnyPS5/actions/runs/40627345977/job/122615375186)). 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](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6514026857)): 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` 08a10d2253 it fails with `sampler resource limit exceeded`. - With this PR's head 7f4e97c45f 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. - **a803318e65, a merge of `main` 0836dfdf4f** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41238648178), on 75d57e91db, which has the same tree). #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. - **760a550294, a merge of `main` 88e804b0a7** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41415774145)). `main` now has Ondra97's #7694 (scalar-address descriptor Phis), which adds `DescriptorSource::requiredBlocks` to the shader plan encoding, and JJenkx's #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 #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. - **ba833f42c0: the pair-limit tests check the merge without compiling it,** for @XairRrR's review ([review](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5743625047)), 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 760a550294 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](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41530325948)). They now take the capture alone; the image-limit tests still compile theirs. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41530312368)), 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 <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none (#9989, merge order only, has merged, see Overlap); none for `FormatVersion`: no other open PR uses 52 (see Overlap) - [x] Fixes: none (related: #9749) - [x] Unblocks: Ratchet & Clank: Rift Apart (PPSA01474) #2172 past `sampler resource limit exceeded` after #9749 (Tamalero's runs and oneandonlydean's 600 s run under Tested); its next stops are listed there; Ghostrunner (PPSA03685) #7320: compute shader 0x200c520000 past `sampler resource limit exceeded` with #8939 and #9969, in frankea's replay (its next stop is the 64-image limit); My First Gran Turismo (PPSA24156): compute program 0x1258c12300 past `sampler resource limit exceeded` in Rengundom's replay (CPU preparation only) - [x] GPUs tested: Mesa llvmpipe (LLVM 20.1.2), Ubuntu 24.04, on GitHub's Linux runner and a cloud Linux machine; NVIDIA GeForce RTX 4090, for Rift Apart (Tamalero); AMD Radeon 860M (RADV, Mesa 26.2.5), Linux (Lander0606); AMD Radeon RX 6600 XT (32.0.21045.16010), Windows 11 (brummilab) - [x] AI-assisted: yes
MarcZX10 commented 2026-10-23 04:36:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T04:36:43Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5623942876 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5623942876). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T04:36:43Z. **Review:** APPROVED --- 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 commented 2026-10-23 05:30:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:30:32Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5624300740 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5624300740). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-23T05:30:32Z. **Review:** CHANGES_REQUESTED --- 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.
jotitadev commented 2026-10-27 09:32:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T09:32:29Z.

Review: COMMENTED


Apple GPU run, through #10489's head 0fd6998a10, which contains this PR's fe85d6c4e. agc_driver_many_direct_samplers fails on MoltenVK: the driver refuses the layout at the device's per-stage sampler limit, and it does that with or without this change.

shader sampler descriptors exceed per-stage limits: required 33, device limit 16

Setup: Apple M2 Max, macOS 27.2, x86-64 Release under Rosetta 2. main doesn't build and run on macOS, so this is main b87d3d87e2 + the macOS port PRs (#7631 #11249 #11358 #10669 #10552 #7804 #11447 #11437 #11554) + one local patch (#11705's), with #10489 merged on top. The only conflict was FormatVersion, which I resolved to 54. Two drivers: MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0, and MoltenVK main with SPIRV-Cross#2704. ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, ctest -j1 --timeout 30.

  • Why it fails: MoltenVK reports maxPerStageDescriptorSamplers = 16, which is Metal's per-stage sampler limit; its update-after-bind sampler limit is 1024. The test's 17 direct samplers need 33 sampler elements. ShaderResources.cpp checks the direct sampler binding against maxPerStageDescriptorSamplers, so the draw is refused before it records. That check is already in main, not added by this PR.
  • Same on both sides: with MaxSamplers set back to 32 (and MaxImages to 64), the test fails with the same text, 3 of 3 on both drivers. On a 16-sampler device, the test can't tell the change from main.
  • Everything else passes. agc_shader_sampler_limits, the selected-records limits, the sampler, image-sample, image-table and disk-cache sets: 25 of 28 pass 3 of 3 on both drivers, with 1 skip. The other two failures are agc_driver_image_table_reuse and _reuse_draw_pipeline, known failures on macOS that also fail on the base. With the validation layer, the only VUID is VUID-vkCreateDescriptorSetLayout-support-09582, from the image-table layouts (KhronosGroup/MoltenVK#2573). It also shows up on the base.
  • Suite: ^agc has the same failures as the base on both drivers, plus agc_driver_many_direct_samplers, which doesn't exist on the base. The MoltenVK main suite run also had one agc_driver_lds_subword_store_branch failure (thread 96 (wave 3) read 673754884, expected 262176). That test passes 5 of 5 alone and is the LDS-barrier test that #10858 targets, so it isn't from this change.

Suggestion: gate the device test on maxPerStageDescriptorSamplers >= 33 and skip with a message otherwise, like the tests that skip without a feature. Another option: on a device below 33, assert that the refusal names the limit. As it stands, the test fails on every macOS run. It also means that on Apple GPUs a shader whose direct sampler binding needs more than 16 elements (originals plus point copies) can't bind, whatever MaxSamplers is. Rift Apart's 3 direct samplers fit.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2 / MoltenVK main + SPIRV-Cross#2704), macOS 27.2

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5664913889 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5664913889). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T09:32:29Z. **Review:** COMMENTED --- Apple GPU run, through #10489's head `0fd6998a10`, which contains this PR's `fe85d6c4e`. `agc_driver_many_direct_samplers` fails on MoltenVK: the driver refuses the layout at the device's per-stage sampler limit, and it does that with or without this change. ``` shader sampler descriptors exceed per-stage limits: required 33, device limit 16 ``` **Setup:** Apple M2 Max, macOS 27.2, x86-64 Release under Rosetta 2. `main` doesn't build and run on macOS, so this is `main` `b87d3d87e2` + the macOS port PRs (#7631 #11249 #11358 #10669 #10552 #7804 #11447 #11437 #11554) + one local patch (#11705's), with #10489 merged on top. The only conflict was `FormatVersion`, which I resolved to 54. Two drivers: MoltenVK 1.4.2 from Vulkan SDK 1.4.363.0, and MoltenVK `main` with SPIRV-Cross#2704. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, `ctest -j1 --timeout 30`. - **Why it fails:** MoltenVK reports `maxPerStageDescriptorSamplers = 16`, which is Metal's per-stage sampler limit; its update-after-bind sampler limit is 1024. The test's 17 direct samplers need 33 sampler elements. `ShaderResources.cpp` checks the direct sampler binding against `maxPerStageDescriptorSamplers`, so the draw is refused before it records. That check is already in `main`, not added by this PR. - **Same on both sides:** with `MaxSamplers` set back to 32 (and `MaxImages` to 64), the test fails with the same text, 3 of 3 on both drivers. On a 16-sampler device, the test can't tell the change from `main`. - **Everything else passes.** `agc_shader_sampler_limits`, the selected-records limits, the sampler, image-sample, image-table and disk-cache sets: 25 of 28 pass 3 of 3 on both drivers, with 1 skip. The other two failures are `agc_driver_image_table_reuse` and `_reuse_draw_pipeline`, known failures on macOS that also fail on the base. With the validation layer, the only VUID is `VUID-vkCreateDescriptorSetLayout-support-09582`, from the image-table layouts (KhronosGroup/MoltenVK#2573). It also shows up on the base. - **Suite:** `^agc` has the same failures as the base on both drivers, plus `agc_driver_many_direct_samplers`, which doesn't exist on the base. The MoltenVK `main` suite run also had one `agc_driver_lds_subword_store_branch` failure (`thread 96 (wave 3) read 673754884, expected 262176`). That test passes 5 of 5 alone and is the LDS-barrier test that #10858 targets, so it isn't from this change. **Suggestion:** gate the device test on `maxPerStageDescriptorSamplers >= 33` and skip with a message otherwise, like the tests that skip without a feature. Another option: on a device below 33, assert that the refusal names the limit. As it stands, the test fails on every macOS run. It also means that on Apple GPUs a shader whose direct sampler binding needs more than 16 elements (originals plus point copies) can't bind, whatever `MaxSamplers` is. Rift Apart's 3 direct samplers fit. GPUs tested: Apple M2 Max (MoltenVK 1.4.2 / MoltenVK main + SPIRV-Cross#2704), macOS 27.2 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-30 04:01:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T04:01:01Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The new My First Gran Turismo replay is useful, but its comparison uses main at 08a10d2; the current-main merge contains later changes in two PR-touched files that the report does not validate.

What I ran

  • Exact PR head: 7f4e97c45f75a01a765fecd34ab036c797e54102; PR base: 94fe1b5c5a32ae97b43b65c6563a5b07fc91b721.
  • Compared against current main 5ecef095b61e7a406b279c97896f3a8a6fbd6353; merge preview was clean, tree 229c7c18beca2861ac7af95071d9e844822244a9.
  • Environment: Linux x86_64; no compiler or local build/test run.
git merge-tree --write-tree upstream/main refs/review/pr-10000-current
git diff --check upstream/main...refs/review/pr-10000-current
python tools/check_conventions.py --base upstream/main --head refs/review/pr-10000-current
python tools/check_main_sync.py --base upstream/main --head refs/review/pr-10000-current
git diff --name-status 08a10d225306ad102b57408e2ef7566bcfb829b2..upstream/main -- core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp core/shader/recompiler/Recompiler.hpp

Results

Check Result
Current-main merge preview Clean; tree 229c7c18beca2861ac7af95071d9e844822244a9
git diff --check Passed; no output
Repository conventions No errors; one warning that docs/dev/debt/shader.md has a 1,068-character entry
Main synchronization Eight PR-touched files changed on both sides since the merge base
Main changes since the reported test baseline ShaderMemory.cpp and Recompiler.hpp changed; the latter changes imageSamplers from uint32_t to uint64_t
Hosted checks Windows, conventions, labels, eligibility and report passed on the exact head; Linux product CI is skipped
New replay and validation report Contributor reports CPU preparation of PPSA24156 program 0x1258c12300 succeeds with the PR where main 08a10d2 stopped at the sampler limit. Matched focused Windows RTX 3080 validation tests report no VUIDs on either arm. The report explicitly does not dispatch the new Vulkan pipeline.
Unedited local command output
$ git merge-tree --write-tree upstream/main refs/review/pr-10000-current
229c7c18beca2861ac7af95071d9e844822244a9
$ python tools/check_conventions.py --base upstream/main --head refs/review/pr-10000-current
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all
$ python tools/check_main_sync.py --base upstream/main --head refs/review/pr-10000-current
refs/review/pr-10000-current is 8 ahead and 1820 behind upstream/main (merge base 94fe1b5c5)
merge: clean
8 file(s) changed on both sides since the merge base:
  core/libs/prx/libSceAgcDriver/CMakeLists.txt
  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
  docs/dev/debt/shader.md

git diff --check and the two-file comparison exited 0 with no output.

Findings

Blocking

Please rerun the focused sampler-limit/AGC tests on the current-main merge, with main and the merged PR tested on the same GPU under VK_LAYER_KHRONOS_validation, ANYPS5_REQUIRE_VULKAN=1, and ANYPS5_NO_SHADER_CACHE=1. The 08a-based replay does not cover the later Recompiler.hpp sampler-pair type change or the ShaderMemory.cpp test refactor, so it cannot establish the result on today's integration.

Non-blocking

The My First Gran Turismo capture demonstrates CPU-side preparation only; it does not verify Vulkan pipeline creation or GPU execution for that shader.

Sources

Not verified

I did not run a local build, GPU tests, or the replay. The hosted Linux product job is skipped, and the contributor report does not execute the captured shader on the GPU.

To get this to a good state

Run the same focused tests on current main and on its clean merge with this PR, on the same GPU and driver with the stated validation environment, then report both exact revisions, test counts, VUID comparison, GPU, driver, and OS. I will rerun the non-build checks and reassess the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5707926799 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5707926799). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T04:01:01Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The new My First Gran Turismo replay is useful, but its comparison uses `main` at `08a10d2`; the current-main merge contains later changes in two PR-touched files that the report does not validate. ## What I ran - Exact PR head: `7f4e97c45f75a01a765fecd34ab036c797e54102`; PR base: `94fe1b5c5a32ae97b43b65c6563a5b07fc91b721`. - Compared against current `main` `5ecef095b61e7a406b279c97896f3a8a6fbd6353`; merge preview was clean, tree `229c7c18beca2861ac7af95071d9e844822244a9`. - Environment: Linux x86_64; no compiler or local build/test run. ```sh git merge-tree --write-tree upstream/main refs/review/pr-10000-current git diff --check upstream/main...refs/review/pr-10000-current python tools/check_conventions.py --base upstream/main --head refs/review/pr-10000-current python tools/check_main_sync.py --base upstream/main --head refs/review/pr-10000-current git diff --name-status 08a10d225306ad102b57408e2ef7566bcfb829b2..upstream/main -- core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp core/shader/recompiler/Recompiler.hpp ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Clean; tree `229c7c18beca2861ac7af95071d9e844822244a9` | | `git diff --check` | Passed; no output | | Repository conventions | No errors; one warning that `docs/dev/debt/shader.md` has a 1,068-character entry | | Main synchronization | Eight PR-touched files changed on both sides since the merge base | | Main changes since the reported test baseline | `ShaderMemory.cpp` and `Recompiler.hpp` changed; the latter changes `imageSamplers` from `uint32_t` to `uint64_t` | | Hosted checks | Windows, conventions, labels, eligibility and report passed on the exact head; Linux product CI is skipped | | New replay and validation report | Contributor reports CPU preparation of PPSA24156 program `0x1258c12300` succeeds with the PR where `main` `08a10d2` stopped at the sampler limit. Matched focused Windows RTX 3080 validation tests report no VUIDs on either arm. The report explicitly does not dispatch the new Vulkan pipeline. | <details> <summary>Unedited local command output</summary> ```text $ git merge-tree --write-tree upstream/main refs/review/pr-10000-current 229c7c18beca2861ac7af95071d9e844822244a9 $ python tools/check_conventions.py --base upstream/main --head refs/review/pr-10000-current 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all $ python tools/check_main_sync.py --base upstream/main --head refs/review/pr-10000-current refs/review/pr-10000-current is 8 ahead and 1820 behind upstream/main (merge base 94fe1b5c5) merge: clean 8 file(s) changed on both sides since the merge base: core/libs/prx/libSceAgcDriver/CMakeLists.txt 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 docs/dev/debt/shader.md ``` `git diff --check` and the two-file comparison exited 0 with no output. </details> ## Findings ### Blocking Please rerun the focused sampler-limit/AGC tests on the current-main merge, with `main` and the merged PR tested on the same GPU under `VK_LAYER_KHRONOS_validation`, `ANYPS5_REQUIRE_VULKAN=1`, and `ANYPS5_NO_SHADER_CACHE=1`. The 08a-based replay does not cover the later `Recompiler.hpp` sampler-pair type change or the `ShaderMemory.cpp` test refactor, so it cannot establish the result on today's integration. ### Non-blocking The My First Gran Turismo capture demonstrates CPU-side preparation only; it does not verify Vulkan pipeline creation or GPU execution for that shader. ## Sources - [Current `Recompiler.hpp` at main `5ecef095`](https://github.com/boykopovar/AnyPS5/blob/5ecef095b61e7a406b279c97896f3a8a6fbd6353/core/shader/recompiler/Recompiler.hpp) - [Current `ShaderMemory.cpp` at main `5ecef095`](https://github.com/boykopovar/AnyPS5/blob/5ecef095b61e7a406b279c97896f3a8a6fbd6353/core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp) - [New replay and matched GPU report](https://github.com/boykopovar/AnyPS5/pull/10000#issuecomment-6514026857) ## Not verified I did not run a local build, GPU tests, or the replay. The hosted Linux product job is skipped, and the contributor report does not execute the captured shader on the GPU. ## To get this to a good state Run the same focused tests on current `main` and on its clean merge with this PR, on the same GPU and driver with the stated validation environment, then report both exact revisions, test counts, VUID comparison, GPU, driver, and OS. I will rerun the non-build checks and reassess the new head.
MarcZX10 commented 2026-10-30 05:54:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T05:54:57Z.

Review: APPROVED


Re-checked — current-main validation, looks good

The matched validation run found no new failing tests or validation IDs, and the current-main merge is clean.

What I ran

Reviewed PR head 7f4e97c45f75a01a765fecd34ab036c797e54102 against current main 7440a6c9ca3dc90ee81413f6c948ed5c0304fa56; the merge preview is clean (5773930b86e3b3f98c7b9a91706794fd50c701c9). Environment: local Linux x86-64; no local compiler, build, or tests were run. I inspected the contributor's matched run separately; it used Linux/Ubuntu 24.04.5, llvmpipe (Mesa 25.2.8), and the Vulkan validation layer.

git merge-tree --write-tree upstream/main refs/remotes/upstream/pr-10000
git diff --check upstream/main...refs/remotes/upstream/pr-10000
python3 tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr-10000
python3 tools/check_main_sync.py --base upstream/main --head refs/remotes/upstream/pr-10000
git diff --quiet 422f96b3a9..7440a6c9ca -- core/libs/prx/libSceAgcDriver/CMakeLists.txt 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 docs/dev/debt/shader.md
gh pr checks 10000 --repo boykopovar/AnyPS5
gh run view 41003332631 --repo EagleBearerYS/AnyPS5 --log-failed

Results

Check Result
Current-main merge preview Clean
Diff check Passed; no output
Conventions 0 errors; one warning that the shader debt entry is 1,068 characters
Main synchronization Clean merge; eight touched paths changed since the branch's merge base
Test-baseline relevance The contributor's comparison used main 422f96b3a9; none of the eight PR-touched paths changed between that commit and current main 7440a6c9ca
Contributor's matched Linux run On main: 24/25 pass; on the merge: 26/27 pass. The same agc_driver_image_table test failed in both due to the existing VUID-VkDeviceCreateInfo-pNext-pNext; the two PR-specific tests passed and the run reports no new failures or VUID IDs
Contributor's Windows merge run 26 pass, 3 skipped because no Vulkan device, 0 failed; no validation layer available
Hosted checks on PR head Windows, relinker Ubuntu/Windows/macOS, relinker ASan, conventions, labels, eligibility and report passed; Linux product, register-context and write-watch skipped
Unedited check output
git merge-tree --write-tree upstream/main refs/remotes/upstream/pr-10000
5773930b86e3b3f98c7b9a91706794fd50c701c9

python3 tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr-10000
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all

python3 tools/check_main_sync.py --base upstream/main --head refs/remotes/upstream/pr-10000
refs/remotes/upstream/pr-10000 is 8 ahead and 1965 behind upstream/main (merge base 94fe1b5c5)
merge: clean
8 file(s) changed on both sides since the merge base:
  core/libs/prx/libSceAgcDriver/CMakeLists.txt
  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
  docs/dev/debt/shader.md

git diff --quiet 422f96b3a9..7440a6c9ca -- [the eight paths listed above]
touched-path delta exit=0

gh pr checks 10000 --repo boykopovar/AnyPS5
conventions	pass	17s	https://github.com/boykopovar/AnyPS5/actions/runs/40997158228/job/123872839209
eligibility	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122767425338
labels	pass	6s	https://github.com/boykopovar/AnyPS5/actions/runs/40997158227/job/123872839302
relinker (macos-latest, clang++)	pass	5m13s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545932
relinker (macos-latest, clang++, x86_64)	pass	6m0s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545593
relinker (ubuntu-latest, g++)	pass	4m15s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545581
relinker (windows-latest, g++)	pass	7m59s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545701
relinker-asan	pass	2m1s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545502
report	pass	41s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938439/job/123872839?\nwindows	pass	18m39s	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545587
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768547954
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768548491
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768547476

== Linux: 2d0eaa577 Merge main into #10000's head (validation check only, not pushed to the PR) on main 422f96b3a
96% tests passed, 1 tests failed out of 27
validation layer: inserted 2 times on main and 3 with the fix; loader layer lines 122 and 183; 'was not found' 1 and 1 times
VUIDs with main's implementation: VUID-VkDeviceCreateInfo-pNext-pNext
VUIDs with the fix: VUID-VkDeviceCreateInfo-pNext-pNext
VUIDs the fix adds (none of them anywhere in main's log): none
GPU: Selected GPU name=llvmpipe (LLVM 20.1.2, 256 bits) vendor=0x10005 device=0x0 subgroup=8
driver: deviceName=llvmpipe (LLVM 20.1.2, 256 bits);driverName=llvmpipe;driverInfo=Mesa 25.2.8-0ubuntu0.24.04.4 (LLVM 20.1.2);conformanceVersion=1.3.1.1
OS: Ubuntu 24.04.5 LTS, kernel 7.0.0-1017-azure
RESULT os=Linux before=fail after=fail count=27 skipped=0 suite=pass new-failures=none tests=agc_driver_image_table|agc_driver_many_direct_samplers|agc_driver_sample_order|agc_shader_bindless|agc_shader_disk_cache|agc_shader_disk_cache_large_file|agc_shader_disk_cache_pack_ownership|agc_shader_entry_lane_proof_budget|agc_shader_frontend_pair|agc_shader_frontend_pair_off|agc_shader_layout_pair|agc_shader_layout_pair_off|agc_shader_memory|agc_shader_quad_mask_no_demote|agc_shader_region_merge|agc_shader_result_memo_budget|agc_shader_result_memo_budget_masked|agc_shader_result_memo_budget_threads|agc_shader_sampler_limits|agc_shader_selected_records_direct_image_limit|agc_shader_selected_records_direct_pair_limit|agc_shader_selected_records_image_limit|agc_shader_selected_records_pair_limit|agc_shader_srt_read_patching|agc_shader_table_snapshot_reuse|agc_shader_table_snapshot_reuse_unmasked|agc_shader_type_zero_image_materialization validation=layer-missing

Findings

Blocking

None. The earlier validation concern is addressed by the matched baseline/merge run, and the one failure is the same on both arms.

Non-blocking

The conventions check reports a debt-length warning. The Linux comparison's single baseline failure is due to the validation layer not recognizing VkPhysicalDeviceMaintenance8FeaturesKHR; it remains a failed test in both arms, rather than an all-pass run.

Sources

Not verified

I did not run local tests, a build, a GPU run, or console behavior. The matched Linux and Windows results are contributor-provided and linked above. The hosted Linux product and specialized jobs are skipped by workflow policy. The run's author-reported mutation controls were not independently reproduced.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5708588953 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5708588953). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T05:54:57Z. **Review:** APPROVED --- # Re-checked — current-main validation, looks good The matched validation run found no new failing tests or validation IDs, and the current-main merge is clean. ## What I ran Reviewed PR head `7f4e97c45f75a01a765fecd34ab036c797e54102` against current `main` `7440a6c9ca3dc90ee81413f6c948ed5c0304fa56`; the merge preview is clean (`5773930b86e3b3f98c7b9a91706794fd50c701c9`). Environment: local Linux x86-64; no local compiler, build, or tests were run. I inspected the contributor's matched run separately; it used Linux/Ubuntu 24.04.5, llvmpipe (Mesa 25.2.8), and the Vulkan validation layer. ```sh git merge-tree --write-tree upstream/main refs/remotes/upstream/pr-10000 git diff --check upstream/main...refs/remotes/upstream/pr-10000 python3 tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr-10000 python3 tools/check_main_sync.py --base upstream/main --head refs/remotes/upstream/pr-10000 git diff --quiet 422f96b3a9..7440a6c9ca -- core/libs/prx/libSceAgcDriver/CMakeLists.txt 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 docs/dev/debt/shader.md gh pr checks 10000 --repo boykopovar/AnyPS5 gh run view 41003332631 --repo EagleBearerYS/AnyPS5 --log-failed ``` ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | Diff check | Passed; no output | | Conventions | 0 errors; one warning that the shader debt entry is 1,068 characters | | Main synchronization | Clean merge; eight touched paths changed since the branch's merge base | | Test-baseline relevance | The contributor's comparison used main `422f96b3a9`; none of the eight PR-touched paths changed between that commit and current main `7440a6c9ca` | | Contributor's matched Linux run | On main: 24/25 pass; on the merge: 26/27 pass. The same `agc_driver_image_table` test failed in both due to the existing `VUID-VkDeviceCreateInfo-pNext-pNext`; the two PR-specific tests passed and the run reports no new failures or VUID IDs | | Contributor's Windows merge run | 26 pass, 3 skipped because no Vulkan device, 0 failed; no validation layer available | | Hosted checks on PR head | Windows, relinker Ubuntu/Windows/macOS, relinker ASan, conventions, labels, eligibility and report passed; Linux product, register-context and write-watch skipped | <details> <summary>Unedited check output</summary> ```text git merge-tree --write-tree upstream/main refs/remotes/upstream/pr-10000 5773930b86e3b3f98c7b9a91706794fd50c701c9 python3 tools/check_conventions.py --base upstream/main --head refs/remotes/upstream/pr-10000 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all python3 tools/check_main_sync.py --base upstream/main --head refs/remotes/upstream/pr-10000 refs/remotes/upstream/pr-10000 is 8 ahead and 1965 behind upstream/main (merge base 94fe1b5c5) merge: clean 8 file(s) changed on both sides since the merge base: core/libs/prx/libSceAgcDriver/CMakeLists.txt 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 docs/dev/debt/shader.md git diff --quiet 422f96b3a9..7440a6c9ca -- [the eight paths listed above] touched-path delta exit=0 gh pr checks 10000 --repo boykopovar/AnyPS5 conventions pass 17s https://github.com/boykopovar/AnyPS5/actions/runs/40997158228/job/123872839209 eligibility pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122767425338 labels pass 6s https://github.com/boykopovar/AnyPS5/actions/runs/40997158227/job/123872839302 relinker (macos-latest, clang++) pass 5m13s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545932 relinker (macos-latest, clang++, x86_64) pass 6m0s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545593 relinker (ubuntu-latest, g++) pass 4m15s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545581 relinker (windows-latest, g++) pass 7m59s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545701 relinker-asan pass 2m1s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545502 report pass 41s https://github.com/boykopovar/AnyPS5/actions/runs/40673938439/job/123872839?\nwindows pass 18m39s https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768545587 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768547954 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768548491 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40673938568/job/122768547476 == Linux: 2d0eaa577 Merge main into #10000's head (validation check only, not pushed to the PR) on main 422f96b3a 96% tests passed, 1 tests failed out of 27 validation layer: inserted 2 times on main and 3 with the fix; loader layer lines 122 and 183; 'was not found' 1 and 1 times VUIDs with main's implementation: VUID-VkDeviceCreateInfo-pNext-pNext VUIDs with the fix: VUID-VkDeviceCreateInfo-pNext-pNext VUIDs the fix adds (none of them anywhere in main's log): none GPU: Selected GPU name=llvmpipe (LLVM 20.1.2, 256 bits) vendor=0x10005 device=0x0 subgroup=8 driver: deviceName=llvmpipe (LLVM 20.1.2, 256 bits);driverName=llvmpipe;driverInfo=Mesa 25.2.8-0ubuntu0.24.04.4 (LLVM 20.1.2);conformanceVersion=1.3.1.1 OS: Ubuntu 24.04.5 LTS, kernel 7.0.0-1017-azure RESULT os=Linux before=fail after=fail count=27 skipped=0 suite=pass new-failures=none tests=agc_driver_image_table|agc_driver_many_direct_samplers|agc_driver_sample_order|agc_shader_bindless|agc_shader_disk_cache|agc_shader_disk_cache_large_file|agc_shader_disk_cache_pack_ownership|agc_shader_entry_lane_proof_budget|agc_shader_frontend_pair|agc_shader_frontend_pair_off|agc_shader_layout_pair|agc_shader_layout_pair_off|agc_shader_memory|agc_shader_quad_mask_no_demote|agc_shader_region_merge|agc_shader_result_memo_budget|agc_shader_result_memo_budget_masked|agc_shader_result_memo_budget_threads|agc_shader_sampler_limits|agc_shader_selected_records_direct_image_limit|agc_shader_selected_records_direct_pair_limit|agc_shader_selected_records_image_limit|agc_shader_selected_records_pair_limit|agc_shader_srt_read_patching|agc_shader_table_snapshot_reuse|agc_shader_table_snapshot_reuse_unmasked|agc_shader_type_zero_image_materialization validation=layer-missing ``` </details> ## Findings ### Blocking None. The earlier validation concern is addressed by the matched baseline/merge run, and the one failure is the same on both arms. ### Non-blocking The conventions check reports a debt-length warning. The Linux comparison's single baseline failure is due to the validation layer not recognizing `VkPhysicalDeviceMaintenance8FeaturesKHR`; it remains a failed test in both arms, rather than an all-pass run. ## Sources - [PR changes at the reviewed head](https://github.com/boykopovar/AnyPS5/tree/7f4e97c45f75a01a765fecd34ab036c797e54102) - [Matched main/merge validation run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41003332631) - [Current main used for the merge preview](https://github.com/boykopovar/AnyPS5/commit/7440a6c9ca3dc90ee81413f6c948ed5c0304fa56) ## Not verified I did not run local tests, a build, a GPU run, or console behavior. The matched Linux and Windows results are contributor-provided and linked above. The hosted Linux product and specialized jobs are skipped by workflow policy. The run's author-reported mutation controls were not independently reproduced.
XairRrR commented 2026-11-02 21:29:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T21:29:52Z.

Review: CHANGES_REQUESTED


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).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5743625047 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5743625047). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T21:29:52Z. **Review:** CHANGES_REQUESTED --- # 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. ```sh 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) | <details><summary>Timing of the pair-limit test on the merged tree (run alone, twice)</summary> ``` real 0m39.167s user 0m38.742s sys 0m0.372s real 0m38.660s user 0m38.343s sys 0m0.312s ``` </details> ## 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](https://github.com/boykopovar/AnyPS5/blob/760a55029427f45d4bf438e855369b1b596f0b27/core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp#L4409-L4410)). - **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). <!-- anyps5-bots job=2249 head=760a55029427f45d4bf438e855369b1b596f0b27 -->
XairRrR commented 2026-11-02 23:38:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:38:24Z.

Review: APPROVED


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).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744979104 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10000#pullrequestreview-5744979104). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T23:38:24Z. **Review:** APPROVED --- # 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. ```sh 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`](https://github.com/boykopovar/AnyPS5/blob/ba833f42c0f43142fbec50d0ee0ef8214c5faa29/core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp#L2882-L2885) and [its use](https://github.com/boykopovar/AnyPS5/blob/ba833f42c0f43142fbec50d0ee0ef8214c5faa29/core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp#L4456-L4457). 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). <!-- anyps5-bots job=2812 head=ba833f42c0f43142fbec50d0ee0ef8214c5faa29 -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!10000
No description provided.