fix(shader): take lane-mask arms and a merged high word in a pointer-keyed record pointer #8939

Merged
EagleBearerYS merged 41 commits from upstream-pr/8939 into main 2026-11-26 16:30:15 +00:00
EagleBearerYS commented 2026-10-21 06:56:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T06:56:08Z.


What

Depends on: #7395. #7223, which #7395 was stacked on, has merged. Until #7395 merges, this PR's diff shows its commits too.

#7395 lets a T# or S# be read through a pointer that a scalar-buffer record holds, with the pointer's low word merged by Phis with constants, lone Ballot words and copies of the record word. Two titles' chains refused on the pointer's words:

  • Little Nightmares Enhanced Edition (PPSA10737), run by klosixgaming-arch (comment). Windows 11, RTX 5090, version 01.004.000, on #7395's head of 2026-10-19 plus #7413; it stops 2 min 46 s in:
    [dispatch] failed: compute shader 0x2010fa0000, stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value (value=LoadAddressU32[…] … GetAddressResource@pc=0x3384(arg0=Phi(arg0=Phi(arg0=Phi(arg0=BitwiseAnd32@pc=0x1600(arg0=CompositeExtractU32x4@pc=0x15d4(arg0=Ballot@pc=0x15d4(…)), arg1=imm=0x0), arg1=BitwiseNot32@pc=0x15fc(…)) …
    
    One arm of the low word is the waterfall loop's Ballot mask ANDed with the NOT of the loop's lane bit, the s_andn2 that clears the current lane.
  • Ratchet & Clank: Rift Apart (PPSA01474), run by ps54all (comment), on main 82f0c9aec plus open PRs and #7395's earlier commits:
    compute shader 0x116bb67000: … GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00009a30(GetAddressResource(Phi(… BitwiseAnd32(…, CompositeExtractU32x4(Ballot(Immediate), Immediate))) …
    
    A Ballot word is ANDed into the low word, and the high word is merged through a Phi. One arm of that Phi reads a second buffer, and on that edge the low word is a lane mask: the waterfall loop reusing the SGPR pair, as oneandonlydean read it from the IR (comment).

Ratchet & Clank: Rift Apart (PPSA01474), 11-13: this PR got the title past its 0x9a30 stop on retail in Tamalero's run (see Tested); the next stop, 0x10b84, was #9633's. On current main the title doesn't stop there. #14636 removed the title's pc=0x62d4 GetSamplerResource refusal: with #14636's merge reverted, main f57c971559 aborts on it again (dantdmdarealguy's run). Tamalero's run of main 4e2acc2120 with #18522, on RADV with APS5_MAX_COMPUTE_SPIRV_WORDS=2000000 and APS5_SKIP_REFUSED_DISPATCHES=1 (which skips and logs any compute shader whose recompile fails, code), reaches the first gameplay; the only shaders it skipped were two dropped for size (comment). main still refuses this PR's shapes: on main 7201da4f0e, which has #14636, four of this PR's five tests fail 3 of 3 with #7395 merged and this PR's code left out, and pass 3 of 3 with this PR merged (llvmpipe, a cloud Linux machine). The fifth, agc_driver_pointer_vsharp_select_table, passes either way, as before (see Tested).

The change, in ResourceTracker.cpp, for pointer-keyed columns only:

  1. fix(shader): take lane-mask ANDs and a high-word Phi in a pointer-keyed record pointer.
    • Lane-mask ANDs. An AND with a lane-mask operand is taken. A lane-mask operand is a Ballot word, or an AND or Phi made only of those and immediates. The other operand is walked on, so a record read in it must still match the column. An AND with no lane-mask operand still refuses.
    • A merged high word. The high word now goes through the same walk as the low word. Its record reads must be reads of the same column at the low word's offset + 4. When it has no single dominating read, the table comes from the first record read whose V# words dominate the descriptor load. If none does, the column is refused.
    • A high-word arm read from a second buffer (a V# loaded through a pointer, then read at offset 0) stays refused, since it isn't a read of the record. Ratchet & Clank's chain has such an arm too (Tamalero's data on #6191). The fourth commit takes it where its edge's low word is a lane mask.
  2. fix(shader): skip lane-mask arms built from a waterfall's lane bit in a pointer-keyed record pointer.
    • A lane-mask operand also takes the loop's lane bit, ShiftLeftLogical32(1, index), and ORs and NOTs of lane-mask operands.
      • The index can come from FindILsb32, FindUMsb32 or ReadFirstLane, through BitwiseAnd32, IAdd32, ISub32, immediates and the arms of SelectU32.
      • That covers s_ff1_i32_b32, s_ff1_i32_b64, s_bitset0_b32 and the shift's own AND 31.
    • An arm made only of lane-mask operands is skipped. Little Nightmares' arm is one.
  3. docs(shader): the image-table debt entry lists the new arms and the merged high word, and says that a high word read from a second buffer stays refused.
  4. fix(shader): pair a pointer-keyed record pointer's two words by Phi edge, from oneandonlydean's reading of Ratchet & Clank: Rift Apart's IR (comment).
    • The low and high words are walked together. Where both are Phis of one block, each low-word edge takes the high word that arrives from the same predecessor.
    • An edge whose low word is an immediate or a lane mask is skipped with its high word. Rift Apart's second-buffer high word reaches the load only on such an edge, as oneandonlydean read it, so the walk no longer refuses that edge.
    • A record low word still needs every high word it can meet to be an immediate, a lane mask or the same column at offset + 4. A second-buffer high word paired with the record's low word still refuses.
    • One shape that planned before now refuses: both Phis in one block, with the record's low word on one edge (its high word an immediate) and the record's high word on another (its low word a lane mask). No edge carries a whole record pointer, so its old plan could only fault at run time.
  5. docs(shader): the debt entry says the two words are walked edge by edge, and that a second-buffer high word stays refused on an edge whose low word is the record word.
  6. fix(shader): refuse a pointer-keyed record arm whose two words are both immediates (9e50a74929). Where the pointer's two words are Phis of one block, an edge on which both are immediates is a constant pointer that no record holds, such as a null pointer, so the walk refuses the column there instead of planning it.

At run time, a pointer built from a lane mask faults as outside the snapshot, as #7395's lane-mask arms do.

Disk cache: no plan field changes. This PR still takes its own number on the stack's format ladder, 94 (see Tested). main is at 88 since Pipodi's #18455. Ours take one number each: #7642 62 (a draft, held; it takes a free number at its refresh), #7395 93, #8939 94, #9457 95, #9633 96, #9749 97, #9790 98 and #9969 99. The other open PRs changing it hold 89 (#14871, #19852, #21199 and #21240), 90 (#6416, and #16812 and #16814, both stacked on #9969), 91 (#10351) and 92 (#14853), and the rest hold numbers at or below main's, from a check of every open PR's head on 11-16. Whichever lands second on a number takes the next free one.

  • A shader that planned before plans the same column, apart from the fourth commit's one newly refused shape and the sixth commit's constant-pointer edge.
  • Shapes that refused before now plan. A refusal is never cached.

Overlap:

  • #20519 and #22424 (slopezjur, the opt-in bindless image heap and, on it, layout-only pointer tables): this PR adds no conflict beyond #7395's (see #7395's Overlap). Its own test options keep both, and its FormatVersion conflict keeps this PR's number, above #20519's 89. Merge order: this stack first, as proposed in #20519's thread (comment). If #20519 lands first, a merge of main resolves it here.

Marvel's Spider-Man 2 (PPSA08338), run by spiff637 (comment), stops on a record → pointer → V# → T# chain keyed by ReadFirstLane(SelectU32(LogicalAnd, IAdd32, Phi)). The second commit's agc_driver_pointer_vsharp_select_table builds a record → pointer → V# → T# chain with the T# read under a second key, and it passes without this PR's tracker changes. The title doesn't take it yet: hugodearaujo's run of the US release, Marvel's Spider-Man 2 (PPSA03016), still stops on the #6191 chain with this PR and #7679 (comment). There the T# is read at a fixed offset of the pointer-loaded V#, with no second key, and the same shader then reads its next block through a linked pointer. The test stays as coverage of the keyed form. ycbuzi's Windows run (RTX 4070 SUPER) stops on the same chain, at pc=0x84bc, with this PR's earlier head 95c2a47c76 and without it (comment).

Tested

  • New tests in tests/execution/ImageTable.cpp, on lavapipe. They are synthetic wave64 waterfall loops, assembled with llvm-mc -mcpu=gfx1030 -mattr=+wavefrontsize64. The fourth commit's is the second-buffer shader with one instruction added (s_mov_b32 s44, exec_lo, 0xbeac037e) and its three crossing branch offsets adjusted, checked by disassembly.
    • The first commit's: agc_driver_pointer_phi_lane_and_table (lane-mask ANDs), agc_driver_pointer_phi_high_table (a merged high word) and agc_driver_pointer_phi_high_second_table (the second-buffer arm, which refused; 4750c85fcd later removed this test, see below).
    • The second commit's: agc_driver_pointer_phi_lane_not_table (Little Nightmares' BitwiseNot32 and s_andn2 arms) and agc_driver_pointer_vsharp_select_table (Spider-Man 2's chain).
    • The fourth commit's: agc_driver_pointer_phi_high_second_lane_table (Rift Apart's edge: the second-buffer high word with a lane-mask low word, which must plan).
    • What they check: each lane samples the T# its key's record selects. Each arm whose pointer wasn't captured faults as outside the snapshot, publishes no output and keeps the artifact id.
  • Red, with only ResourceTracker.cpp reverted and the tests kept, on Linux with CI's configuration:
    • On the first commit's base, lane_and and high fail with the dword-0 refusal, and high_second passes (refused). Each half of the commit fixes only its own test.
    • On the second commit's base, lane_not fails: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Immediate, Phi(ReadConstBuffer@pc=0x00000074(…), Phi(BitwiseAnd32(CompositeExtractU32x4(Ballot(LogicalAnd), Immediate), BitwiseNot32(ShiftLeftLogical32(Immediate, BitwiseAnd32))), …. vsharp_select passes (coverage).
    • On the fourth commit's base (e9d4626904), high_second_lane fails: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000108(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x0000007c(…. The other 10 image-table cases pass, high_second among them (refused).
  • Green at the head, Linux, lavapipe (Mesa 25.2.8, llvmpipe LLVM 20.1.2), CI's configuration, on a cloud worker:
    • 17 tests pass 10 runs each: the five new tests, #7395's pointer-Phi ballot and copies tests, the image-table family and agc_shader_disk_cache.
    • A mirror of CI's Linux job: 1,718 of 1,721 pass, against 1,716 of 1,719 on the base. The 3 failures on both are that machine's IPv6 socket tests.
    • The Khronos validation layer reports no new VUIDs on the focused tests.
  • GitHub's runners (run, at 2788b8f986, the head before the docs commit): the five new tests, #7395's pointer-Phi and nested sampler tests and agc_shader_disk_cache pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass. The libc and libkernel suites pass on both.
  • At the head, a7d1e62b53 (the fourth and fifth commits):
    • A cloud worker, Linux with CI's configuration: the 11 image-table cases pass 20 runs each. A mirror of CI's Linux job: 1,807 of 1,813 pass. The six failures are network tests that depend on that machine (no IPv6, and its socket buffers); the five beyond its known IPv6 failure fail the same way on e9d4626904.
    • GitHub's runners (run): on Linux the 12 image-table cases and agc_shader_disk_cache_large_file pass 5 runs each. Windows: builds; the Vulkan cases skip on the runner.
    • Linux ^agc (run): 813 of 874 pass, 60 skip and 1 fails. The one failure is agc_driver_sgpr_pattern_fill_keys, a timing test, which passed in the worker's full run of the same head.
  • Ratchet & Clank: Rift Apart (PPSA01474), retail, by @Tamalero (comment): version 01.005.003, Linux, RTX 4090 (NVIDIA 615.78.08), cold shader cache, one unattended run per build.
    • #7395's head 6c1371b26 stops at 275 s on compute 0x116bb67500: GetImageResource dword 0, LoadAddressU32@pc=0x9a30.
    • This PR at a7d1e62b5 gets past it, with no regression up to the next stop, as they report. At 270 s it stops on a different shader, compute 0x116bb5ad00: GetImageResource dword 0, LoadAddressU32@pc=0x10b84.
    • As they read the new chain, it has the same shape one level deeper. The low word is a Phi of the record read at pc=0xfd94 and a Ballot lane-mask word. The high word's other arm is ReadConstBuffer@pc=0x10350, through a V# whose four dwords are loaded at pc=0x10338 from another pointer.
  • 9162d9df8f, a merge of #7395's 4661f4bab5, which merges main 0db47b263d. The only conflict was ShaderDiskCache.hpp's FormatVersion line: main moved to 45 (#7831), and this branch keeps its 46. On GitHub's runners (run), the pointer, nested, image-table and disk-cache sets (22 tests) pass 10 runs in a row on Linux. On Windows the set has 24, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 19, 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. An earlier run linked here didn't run this set, so it's replaced.
  • Little Nightmares Enhanced Edition (PPSA10737) has since run on this branch, in @zaryabzip's run below.
  • 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. On main 513ca7e55 with #9068, #8070 and #9701 to #9703, it stops on #7459's GetImageResource dword 0 is not a valid runtime value: a T# behind a readfirstlane-keyed record in a waterfall loop whose pointer Phis carry Ballot AND-NOT words. With this PR (9162d9df8) it gets past that and stops on sampler resource limit exceeded, which #10000 raises.
  • Ghostrunner (PPSA03685), a second replay by @TheSovietWaffle (comment): the same compute shader 0x200c520000, agc_shader_replay --prepare on the title's dumped request with ANYPS5_NO_SHADER_CACHE=1, Windows 10 22H2, WinLibs GCC, Release; replay only, no title or GPU run. The base is main 0db47b263 with #9068, #8070 and #9703.
    • The base stops on GetImageResource dword 0 is not a valid runtime value at LoadAddressU32@pc=0x000517dc, and so does the base with #10228.
    • With this PR (9162d9df8), the 0x517dc load is accepted, and analysis stops on sampler resource limit exceeded.
    • With this PR and #10000, it gets past the sampler limit and stops on another image load, LoadAddressU32@pc=0x0002ef78. Its pointer Phi has, besides the record reads with lane-mask arms, an arm read at a fixed offset of a buffer whose V# is loaded from memory. #9457 with #10000 stops at the same 0x2ef78.
  • 08586677a1, a merge of #7395's 319fa1f360 (which merges main 379b1dca32), on top of the new commit 9e50a74929 (6. above). The conflict in ResourceTracker.cpp is between this PR's paired walk and #7880's unwrap of the pointer's words: pointer-keyed columns keep the paired walk, the others take #7880's UnwrapTableRead. FormatVersion stays at #7395's 47.
    • The planner behaviour changes in two places. In the merge, an unmerged record pointer's low word is unwrapped as #7880 does, and the column is refused when it isn't a table read; before, the word was taken as it resolved. Without that, the merge fails #7880's agc_shader_memory and agc_shader_bindless on both runners with GetImageResource dword 0 is not a valid runtime value (run). And 9e50a74929 refuses a pointer-keyed Phi edge whose two words are both immediates (a constant pointer no record holds, such as a null pointer), where the walk planned it before.
    • 9e50a74929's red and green (run): with 9162d9df8f's code, agc_driver_pointer_phi_high_table fails 3 of 3 on Linux with "a record pointer arm whose two words are both immediates was planned". With the commit, ×10: Linux 24 run, 24 pass, 0 skip, 0 fail; Windows 26 run, 7 pass, 19 skip, 0 fail.
    • Focused, ×10 (run): agc_shader_bindless, agc_shader_memory and the ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_driver_image_table and ^agc_shader_disk_cache tests. Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 7 pass, 19 skip (Vulkan device tests; the runner has none), 0 fail.
    • The libc and libkernel suites pass on both runners, run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners. The full ^agc set at #9749's and #9790's heads, which carry this merge, shows only main's three known failures (see those PRs).
  • Ghostrunner (PPSA03685) title runs, by @xXPBSXx (comment): Windows 10 Pro, WinLibs GCC 15.2.0, Release, NVIDIA GeForce RTX 4080 SUPER, runs of up to 600 s with no input, all libraries rebuilt for each tree (pass/stop only). Both states are main 5d3ab7791d with #9702 merged in, so compute shader 0x200c520000 gets past structurization.
    • Without this PR, both runs stop in 0x200c520000 on GetImageResource dword 0 is not a valid runtime value (LoadAddressU32@pc=0x00051884 and pc=0x0005192c).
    • With this PR's 08586677a1 merged in as well (it carries #7395's changes and an earlier version of #7223's beneath it, so these runs don't separate the three), neither run has that refusal. Both stop later on storing storage image results pending over memory outside the write watch without the guest bytes saved before them is not implemented, the check #7048 addresses. sampler resource limit exceeded, the replays' next stop, doesn't appear in these runs.
  • 232a8e4c54, a merge of #7395's 2525821ac9 (which merges main c9b2660d56). Clean: FormatVersion follows #7395's 50, and this PR's own diff is unchanged. On GitHub's runners, 10 runs (run) of the pointer, nested, image-table and disk-cache sets (agc_shader_bindless, agc_shader_memory, ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_driver_image_table, ^agc_shader_disk_cache): Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 7 pass, 19 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.
  • e2af03bf19, a merge of #7395's 71741a70b6, which merges #7223's f1cc524085 (yabanana's merge of main c8d34aa8f4). Clean: FormatVersion follows #7395's 50, and this PR's own diff is unchanged: the merge brings in exactly what #7395's merge did (249 files). On GitHub's runners, 10 runs (run) of the pointer, nested, image-table and disk-cache sets (agc_shader_bindless, agc_shader_memory, ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_driver_image_table, ^agc_shader_disk_cache): Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 7 pass, 19 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both (143 and 206 tests on Linux, 170 and 222 on Windows), run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Ghostrunner (PPSA03685) replays, by @TheSovietWaffle (comment, IR): Windows 10 22H2, WinLibs GCC 15.2.0, Release, agc_shader_replay --prepare with ANYPS5_NO_SHADER_CACHE=1 on a fresh shader_200c520000.prepare.req from a run on main 74acfad65.
    • main 74acfad65 with this PR (e2af03bf19): a title run on an RTX 3080 (617.42) stops after about 152 s on sampler resource limit exceeded in compute shader 0x200c520000, and the replay stops the same way. #10000 raises that limit.
    • With #10000 and #9969, #9790 or #9633 on top: the request stops at LoadAddressU32@pc=0x0002ef78 (GetImageResource dword 0 is not a valid runtime value). The IR shows the T# pointer is a Phi of the record pointer and a pointer read at offset 0 through a V# loaded from the record at +0x30, with that V#'s words edited before use (& 0xffff on the base's high word, << 4 on the record count, | 0x30000000 on word 3). No PR in this stack plans that arm; it's the title's next stop.
  • 752620ec73: 29365ffe14, a merge of #7395's 9343a179b3, the format commit cfb72cb70e, the test-only commit 4750c85fcd, and 752620ec73, a merge of main 0cd07dc4ab (run).
    • 29365ffe14 takes #7395's merge of #7223's 153400ba2b (yabanana's merge of main 0d62324ce2, which moves #7223 to FormatVersion 49) and #7395's test-only commit. Clean, and this PR's own diff is unchanged.
    • cfb72cb70e gives this PR its own disk-cache format, 51, one above #7395's 50. The open bumps take one number each: #7223 49 (as do #9508, #9748 and other open PRs), #7395 50, #8939 51, #10000 52, #9457 53, #10489 54, #9633 55, #9749 56, #9790 57, #9969 58, #10846 59. Whichever lands second on a number takes the next free one.
    • 4750c85fcd drops two checks that expected planning to refuse a shape with not a valid runtime value, two of the assertions @oneandonlydean listed on #9969, under the rule that tests don't assert that a shape the code doesn't support yet throws: a high-word arm read from a buffer whose V# is loaded through a pointer, and a record-pointer arm whose two words are both immediates. The first was the whole of agc_driver_pointer_phi_high_second_table's mode, so that test and its registration go; the lane-mask, high-word and second-lane cases stay.
    • 752620ec73 merges main 0cd07dc4ab. The one conflict was ResourceTracker.cpp's include list, where mrfelek's #10228 adds <numeric> beside this PR's <set>; both stay. This PR's changed lines are the same.
    • The pointer-Phi, V#-select and SGPR-fill tests with the disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 12 run, 6 pass, 6 skip (the Vulkan device tests; the runner has none), 0 fail.
    • Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel has 4 failures of 286. guest_raise_exception failed after "address waking round 47: the handler did not run within 5 s", as main 9fc181dde5 does in the same verify setup (run); that is #11813, and this PR doesn't touch libkernel. 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.
  • 24d5cbbcec, a merge of #7395's ca14648806 (run): #7395's test-only commit, which drops the nested-sampler test's check that an S# with another consumer is refused. Clean, and this PR's changed lines are the same. The pointer-Phi, V#-select, SGPR-fill and nested-sampler tests with the disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 6 pass, 7 skip (the Vulkan device tests), 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.
  • 408401b351, a merge of #7395's ca5ba6296f, which carries main 38ccd50f83 and with it #11507's FormatVersion 49 (run). Clean: FormatVersion stays 51 (see What), and this PR's diff over #7395 is the same. The pointer-Phi, V#-select, SGPR-fill and nested-sampler 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: 12 run, 12 pass, 0 skip, 0 fail. Windows: 14 run, 6 pass, 8 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.
  • 3e2ebbbf35: 238806dc87, a merge of #7395's e04a705765, and 3e2ebbbf35, the format commit (run).
    • 238806dc87 takes #7395's test-only commit d908758281, which drops agc_driver_nested_image_table's two checks that a valid shader is refused (a V# with another buffer consumer and a T# with another consumer), and #7395's merge of #7223's 0dbf5478b2 (yabanana's merge of main f7e84c4cf1, which moves #7223 to FormatVersion 50). Clean.
    • 3e2ebbbf35 gives this PR its own disk-cache format, 53 (52 is #10000's). Apart from that line, this PR's diff over #7395 is unchanged.
    • The pointer, nested, image-table and disk-cache tests with agc_shader_bindless and agc_shader_memory ran 10 times with no failure. Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 8 pass, 18 skip (the Vulkan device tests; the Windows runner has no Vulkan device), 0 fail. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. They ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • ffa34ecc26, a merge of #7395's 4769d5a745, which drops "and refusals" from two nested-table test summary lines (run). It's clean and brings only that change. The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 8 pass, 18 skip, 0 fail; the 18 skip because the runner has no Vulkan device. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Little Nightmares Enhanced Edition (PPSA10737), 01.004.000, @zaryabzip's run (comment, retest on #6275): Windows 11, RTX 3060 Laptop GPU (driver 617.42), this PR's 13c1955909 and #7395's 967f0dbebb merged into main 0836dfdf4f. Compute shader 0x2010fa0000 gets past its stop, and agc_shader_replay --prepare on its dumped request prepares it (481,271 SPIR-V words). On main, and on main with #7395 alone, it fails at pc 0x3300 with GetImageResource dword 0 is not a valid runtime value. The title then stops at compute shader 0x200c340000 with the same message, a pointer chase that #9633 and #9749, stacked on this PR, plan when the chase isn't a loop (from reading the code, not run).
  • 3d14230a7c, a merge of #7395's merge of main 0836dfdf4f (1f158eb5e0) (run).
    • CMakeLists.txt conflicted from #12862's split. tools/agc_test_split.py resolve moves this PR's registrations into tests/cmake/agc_driver_image_table_tests.cmake: +7 −2 against #7395's merge, the 5 new add_test lines and #7395's two set_tests_properties lines extended with this PR's names.
    • ShaderDiskCache::FormatVersion conflicted too, since #7395's merge brings 63. This PR's own format moves from 53 to 66, the lowest number above 63 that no open PR uses, so its recompiler change keeps a disk cache format of its own.
      • That leaves it above #9457's 55, which sits on top of this PR. #9457's head is oneandonlydean's merge of main, left as he made it, so the stack's numbers are uneven until one of them merges again.
    • Nothing else conflicted, and apart from the move and the number this PR's diff is unchanged.
    • The count: with -DBUILD_TESTING=ON, ctest -N gives 3089 tests: main's 3075, #7395's 9 and this PR's 5, each listed once.
    • ×10 of this PR's verify set. Linux: 14 run, 14 pass, 0 skip, 0 fail. Windows: 14 run, 1 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Validation, VK_LAYER_KHRONOS_validation on GitHub's Linux runner (run), main 0836dfdf4f against this merge, for the same tests. The loader inserted the layer 1 time on main and 13 with this merge. The only VUID in either arm is VUID-VkDeviceCreateInfo-pNext-pNext, so this merge adds none. agc_driver_image_table fails in that mode in both arms, because the mode treats that main message as a failure.
    • Upstream CI's Windows job at this head (job) fails one test of 39: #7223's agc_shader_nested_snapshot_retry, which this PR now carries through #7395's merge. As on #7395 and #10846, it exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. df80d9b636, below, fixes it.
  • NVIDIA RTX 2000 Ada Generation at 3d14230a7c, from TechLevelZero's NVIDIA bot (report): driver 595.99.02, Ubuntu 26.04.1, 2,509 of 3,087 tests selected.
    • 2,459 passed, 6 failed and 44 skipped. None of the failures is new: 4 also fail on main, and 2 are unstable on main.
    • With VK_LAYER_KHRONOS_validation, there are no new validation IDs against main, over 939 tests on the GPU.
  • df80d9b636, a merge of #7395's 5fdf20fc3d, which gives #7223's agc_shader_nested_snapshot_retry libc's directory on PATH on Windows, beside #7395's sampler retry, as oneandonlydean asked on #10846 (comment). It brings in only that line, so the upstream Windows failure noted above is gone.
    • ×10 (run): this PR's set with both retry tests. Linux: 16 run, 16 pass, 0 skip, 0 fail. Windows: 16 run, 3 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Upstream CI's Windows job at this head (job), merged onto main d262000: 39 tests, 39 passed, 0 skipped, 0 failed, both retry tests included.
  • NVIDIA RTX 2000 Ada Generation at df80d9b636, from TechLevelZero's NVIDIA bot (report): merged onto main e6f5730, driver 595.99.02, Ubuntu 26.04.1, 2,548 of 3,148 tests selected.
    • 2,497 passed, 6 failed and 45 skipped. None of the failures is new: 3 also fail on main, and 3 are unstable on main.
    • With VK_LAYER_KHRONOS_validation, there are no new validation IDs against main, over 946 tests on the GPU. 14 tests ran with the layer but aren't in main's baseline, so they weren't compared. Both nested snapshot retry tests passed on the GPU.
  • 87984fe728, a merge of #7395's 3283b23aac, which merges main 88e804b0a7 (run). Clean: FormatVersion stays 66, and this PR's own diff is unchanged; the plan-encoder numbers come from #7395's merge (see #7395). The shader-memory, nested, pointer, image-table, disk-cache and bindless tests, with #7694's agc_shader_descriptor_phis, pass 10 runs in a row. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 11 pass, 18 skip, 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. TechLevelZero's NVIDIA bot ran this head merged onto main 88e804b on an RTX 2000 Ada (report): 2,563 passed, 7 failed, none new (3 also fail on main, 4 unstable on main), 45 skipped, with no new validation IDs (985 tests on the GPU).
  • afb123a49e, a merge of #7395's 6cb37cc9ed, which merges main 4f64f81ef7 (run). Clean: FormatVersion stays 66, and this PR's own diff is unchanged. The ResourceMaterializer.cpp resolution, with #12246's view loop moved back into Snapshot, comes from #7395's merge (see #7395). The shader-memory, nested, pointer, image-table, disk-cache and bindless tests, with #7694's agc_shader_descriptor_phis, pass 10 runs in a row. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 11 pass, 18 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (217 and 318) and on Windows (244 and 339). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • AMD Radeon RX 6300 (RADV NAVI24) at this head, from TechLevelZero's AMD bot (report): merged onto main a4eca2a, Mesa 25.2.8, Ubuntu 26.04.1, 2,754 of 3,591 tests selected. 2,687 passed, 13 failed and 54 skipped. None of the failures is new: 12 also fail on main, and 1 is unstable on main. One more, a trace_digest tool test, timed out in the parallel run and passed on its retry. With VK_LAYER_KHRONOS_validation, there are no new validation IDs against main, over 992 tests on the GPU. 15 tests, among them the stack's nested and pointer tests, ran with the layer but aren't in main's baseline, so they weren't compared.
    • @BunnyFl approved this head (review) after reviewing this PR's own change on top of #7395's head. Windows 11, WinLibs GCC 15.2.0, this head merged onto main: 21 tests (agc_driver_pointer_*, agc_driver_image_table*, agc_shader_memory*, agc_shader_disk_cache*) pass, none skipped. Their negative control, with #7395's ResourceTracker.cpp in the same tree: the four new cases (agc_driver_pointer_phi_lane_and_table, _high_table, _high_second_lane_table and _lane_not_table) fail, and #7395's three pass.
  • Ghostrunner (PPSA03685), replays of the stack by @xXPBSXx (comment): a request captured in a game run on main 92d2fdc343 (NVIDIA GeForce RTX 4080 SUPER, driver 610.74, Windows, Release), replayed with agc_shader_replay --prepare, no GPU. Each PR's diff over main, without its tests, was applied alone on 92d2fdc343, this PR's at afb123a49e.
    • Without the stack, 2 of 2 title runs ended after 121 s and 97 s on one compute shader with GetImageResource dword 0 is not a valid runtime value, a descriptor reached through a ReadFirstLane/Ballot waterfall over constant-buffer values. The replay fails the same way, and so does #7395's diff.
    • With this PR's diff, as with #9457's, #9633's and #9790's, that step passes and the request stops on sampler resource limit exceeded (MaxSamplers was 32; #10000 has since raised it to 64).
    • Their diagnostic, not checked in: with #9790 and MaxSamplers at 128, the request stops on GetImageResource dword 0 again, so the shader has at least one more chain the stack doesn't resolve.
  • 58ebe4b440, a merge of main 4f41f4c375 (×10, complete ×10).
    • The conflicts: ShaderDiskCache.hpp's FormatVersion, where main is now at 52 (#10000) and this PR keeps its 66; and docs/dev/debt/shader.md, where this PR's pointer lane-mask entry and main's new sampler-limit entry are adjacent and both stay. This PR's own lines are unchanged apart from the FormatVersion line's old value.
    • ×10: agc_driver_image_table, agc_driver_many_direct_samplers and every test matching ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 9 run, 7 pass, 2 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Complete ×10, adding every ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested and ^agc_shader_table test, so every test in this PR's diff over main runs. Linux: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 10 pass, 14 skip (no Vulkan device), 0 fail.
    • GitHub's windows check is red at this head on one test, avplayer_http_patched_modules, at AvPlayerHttpModules.cmake:155, where the owner executable avplayer_http_patched_modules_tests.exe wasn't built for the selected test (job). #15375, the fix, has since merged (bfd14d1260). This PR changes no avplayer or HTTP file, and the check passed at afb123a49e.
  • 9eab037489, a merge of #7395's 014d1e30c3, which carries main c2eafe4461 with yabanana's #7223 (×10).
    • The conflicts: ShaderDiskCache.hpp's FormatVersion, which stays 66 (main is at 56 since #7223), and docs/dev/debt/shader.md, where this PR's wording of the pointer-keyed image-table entry stays. This PR's own lines are unchanged apart from the FormatVersion line's old value.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 10 pass, 19 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 301 and 325 tests on Linux and 331 and 343 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • NVIDIA RTX 2000 Ada Generation at this head, from TechLevelZero's NVIDIA bot (report): merged onto main 5b1d381, driver 595.99.02, Ubuntu 26.04.1, 2,904 of 3,883 tests selected. 2,849 passed, 6 failed and 49 skipped. None of the failures is new: 3 also fail on main, and 3 are unstable on main. With VK_LAYER_KHRONOS_validation, there are no new validation IDs against main, over 985 tests on the GPU. agc_shader_nested_sampler_snapshot_retry ran with the layer but isn't in main's baseline, so it wasn't compared.
  • c9de9a962c, a merge of #7395's 0ce8d173a3, which merges main 8eaf82f315 (×10).
    • Clean: #7395's merge takes the one conflict with main, JJenkx's #15305's debt entry, and this PR's own lines are unchanged.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 28 run, 28 pass, 0 skip, 0 fail. Windows: 30 run, 10 pass, 20 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 3cc9dd79e9, a merge of #7395's 86527d2f76, which merges main 006d11fca5 (×10).
    • Clean: #7395's merge takes the one conflict with main, frankea's #9020's FormatVersion 57, and FormatVersion stays 66 here. This PR's own lines are unchanged apart from the FormatVersion line's old value.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 28 run, 28 pass, 0 skip, 0 fail. Windows: 30 run, 10 pass, 20 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • e22ac325f8, a merge of #7395's 85e79949ae, which merges main dd7c8de5de (×10).
    • The conflict: docs/dev/debt/shader.md, where this PR's wording of the pointer-keyed image-table entry sits next to #10489's rewording of the image-table entry (the image limit is now 128). Both are kept. FormatVersion stays 66, and this PR's own lines are unchanged apart from the FormatVersion line's old value.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 42 run, 42 pass, 0 skip, 0 fail. Windows: 44 run, 10 pass, 34 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 344 and 346 tests on Linux and 375 and 373 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • bddad7dfa0: bc08ac89c7, a merge of #7395's 3309a349f6, and the format commit bddad7dfa0, which carries main 017bd95f5f through #7395 (×10).
    • The conflict: FormatVersion, where #7395 now takes 79, above main's 68 from #14636 and above this PR's 66. The merge takes 79, and the format commit moves this PR to 80. This PR's own lines are unchanged apart from the FormatVersion line.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 42 run, 42 pass, 0 skip, 0 fail. Windows: 44 run, 10 pass, 34 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 350 and 348 tests on Linux with 0 failed, and 380 and 375 on Windows. On Windows, libkernel's guest_kernel_resident_fmem_export and guest_kernel_resident_fmem_export_patched fail: the same harness fails them on main 7259cce111 alone (run), and main's own Windows job passes them, so they come from the verify harness, not this PR. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Every agc test: Every agc test also ran once on #9749's tree, which holds this PR (run): Linux 1,530 run, 1,437 pass, 93 skip, 0 fail; Windows 1,573 run, 467 pass, 1,106 skip (no Vulkan device), 0 fail.
  • 95c2a47c76, a merge of #7395's 40d718d87b, without conflicts, which carries main e22c5fb941 through #7395 (×10).
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main and main's new agc_shader_memory_coherent_atomic_loads. Linux: 43 run, 43 pass, 0 skip, 0 fail. Windows: 45 run, 11 pass, 34 skip (no Vulkan device), 0 fail, in both attempts of the Windows job. The libc and libkernel suites run 379 and 372 tests on Linux and 406 and 400 on Windows. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
    • Windows libkernel suite: in the first attempt of the Windows job (attempt 1), guest_timed_wait_cpu failed, 1 of the 400 libkernel tests. It logged these three lines and then aborted:
      sceKernelUsleep(500 us): P99 overshoot 10719 us (limit < 2500 us), max overshoot 16005 us EXCEEDED
      sceKernelUsleep(500 us): P99 overshoot 41045 us (limit < 2500 us), max overshoot 62771 us EXCEEDED
      sceKernelUsleep(500 us): P99 overshoot 32273 us (limit < 2500 us), max overshoot 73863 us EXCEEDED
      
      The re-run of the Windows job on the same commit (attempt 2) ran guest_timed_wait_cpu and passed it, with the libkernel suite at 400 run, 0 failed. This PR changes no libc or libkernel file, and neither does the rest of the stack. #9457's run of d007acef13, which carries 95c2a47c76, passed the same Windows suite with 400 run, 0 failed (run).
  • 1376724c9f, a merge of #7395's e9ddd12bd2, without conflicts, which carries main bd278f3654 through #7395 (×10).
    • FormatVersion: main's 69, this PR's 80. #7395's merge takes #19530's move of main from 68 to 69, and this PR's own diff over #7395 is unchanged.
    • ×10: the same tests as on 95c2a47c76. Linux: 43 run, 43 pass, 0 skip, 0 fail. Windows: 45 run, 11 pass, 34 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 380 and 376 tests on Linux and 410 and 404 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes only precise_wait's median bounds on GitHub's hosted runners.
    • The Windows tree: the run's tree had Sankalp7317's 4-line _putenv_s test fix (#19899) on top, because main's Windows test build breaks without it ("'setenv' was not declared" in UploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.
  • b4a5b1a618, a merge of #7395's 3c58f422ee, which carries main 328cbf673e through #7395 (×10, with #21255's test change).
    • The conflict: only FormatVersion, where #7395 now takes 93, above this PR's 80. The merge moves this PR to 94. This PR's own lines are unchanged apart from the FormatVersion line.
    • ×10: the same tests as on 1376724c9f. Linux: 50 run, 49 pass, 0 skip, 1 fail. Windows: 52 run, 11 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 391 and 390 tests on Linux and 421 and 417 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes only precise_wait's median bounds on GitHub's hosted runners.
    • The Linux failure, agc_driver_image_table_packed_guards, fails as on main: three identical "stage 4 pc 0x68" records, then "unrecoverable packed table format was not poisoned", the same lines as in main's own Linux job at e249fc47b5 (job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's 20b045a8de, which holds this PR's b4a5b1a618 (run), agc_driver_image_table_packed_guards passes 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail.
    • guest_thermal_sensors in that run: libkernel's guest_thermal_sensors reached its 20 s timeout in the Linux suite. It times out in every run I have on GitHub's Intel Xeon 6975P-C runners, main 0694c4cbd6 alone included (run), and passes in this PR's own ×10 above and in main's own job. This PR changes no libkernel file.
    • The Windows tree: the runs' trees had Sankalp7317's 4-line _putenv_s test fix (#19899) on top, because main's Windows test build breaks without it ("'setenv' was not declared" in UploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.
  • NVIDIA GeForce RTX 4090, by @domx4q, with the Khronos validation layer (comment): Arch Linux (kernel 7.3.4), GCC 16.2.1 Release, driver 620.70.06, Vulkan 1.4.357, validation layer 1.4.363.1, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. This head b4a5b1a618 merged onto main e4caa07950 (their merge ee1e118c33, clean), against main e4caa07950 alone, ctest -R '^agc_.*(image_table|pointer)|^agc_shader_(disk_cache|memory)'. main: 40 of 41 pass. This PR: 48 of 49 pass, including the eight tests main doesn't have (this PR's five and #7395's three). The one failure on both sides is agc_driver_image_table_packed_guards, with the same message as on main, "unrecoverable packed table format was not poisoned" after the "stage 4 pc 0x68" record. fernandomcrsilva's open #21255 changes that test. No VUID- line on either side, and every device test selected the RTX 4090.
  • 5eb49d1893, a null record pointer on Windows (test only, tests/execution/ImageTable.cpp). @frankea's run on Windows 11 with an RTX 4090 (NVIDIA 621.14, MinGW, comment) failed agc_driver_pointer_phi_lane_and_table and agc_driver_pointer_phi_lane_not_table 3 of 3 at b4a5b1a618, and on #9457, #9790 and #9969, both with selected the descriptor at 0x0: unmapped where they expected outside the snapshot.
    • The cause: both tests keep their records on the stack and pair arms whose low word can be 0 with the record pointer's high word: lane_not_table's zero arm, and lane_and_table's lane-mask arm in the waterfall pass over lanes 32-63. #18253 links Windows test executables without high-entropy addresses, which keeps their stacks near the bottom of the address space. On frankea's machine the selected pointer was 0x0, so the records sat below 4 GiB and their high word was 0, and 0x0 faults as unmapped, as a null pointer does in agc_driver_pointer_phi_sampler_table. GitHub's Windows runner has no Vulkan device, so these tests skip there.
    • The fix: when the records' high word is 0, these checks also accept selected the descriptor at 0x0: unmapped; otherwise they still have to fault outside the snapshot.
    • Linux at the normal layout, ×10 (job, on an earlier commit with the same tree): the 12 ^agc_driver_pointer_ and ^agc_driver_nested_ tests pass, none skipped.
    • Linux with the records mapped at 1 GiB, verify only: a test-only commit, not on this branch, maps each records array at 0x40000000, below 4 GiB. With the old checks, agc_driver_pointer_phi_lane_and_table and _lane_not_table fail 3 of 3, each on selected the descriptor at 0x0: unmapped, and the other 10 pass 3 of 3 (job). With the fix, all 12 pass ×10 (job).
    • Windows (run), with Sankalp7317's 4-line _putenv_s fix (#19899) merged for the run only: the build passes, the libc and libkernel suites run 421 and 417 tests with 0 failed, and the 12 tests skip (no Vulkan device). The Windows GPU case itself can only be re-run by a tester.
  • Ghostrunner (PPSA03685) title runs at this head, by @xXPBSXx (comment): Windows 10 Pro, WinLibs GCC, Release, NVIDIA GeForce RTX 4080 SUPER, four runs of up to 300 s with no input, the relinker and all libraries built from each tree, in the order B, B, A, A. A is main dcf3d15978; B is the same main with this head, 5eb49d1893, merged in locally.
    • main alone: both runs stop in compute shader 0x200c520000 on GetImageResource dword 0 is not a valid runtime value (LoadAddressU32@pc=0x000518c4).
    • With this PR: neither run has that refusal. Both stop in the same shader on its next refusal, sampler resource limit exceeded, which ResourceTracker.cpp gives when a shader needs more than MaxSamplers samplers (64 since #10000).
    • The two arms were built on different days (B on 11-18, A on 11-16), each from its own tree. Not run: AMD, Linux, other titles, this PR's tests.
  • Ghostrunner (PPSA03685), an offline replay at 5eb49d1893, by @frankea (comment): one request for compute shader 0x200c520000 dumped on main 3858655d2a, replayed with agc_shader_replay --prepare and ANYPS5_NO_SHADER_CACHE=1, macOS x86_64, Release; replay only, no title or GPU run.
    • main alone, and main with #21745: refused at GetImageResource dword 0.
    • main with this PR's 5eb49d1893 (a clean merge): past that refusal, and stops on sampler resource limit exceeded.
    • With frankea's #23409 (128 samplers per shader) as well: the shader prepares, 12,420,660 SPIR-V words.
  • 606212c86e, a merge of #7395's ef102a3a52, which carries main d89f26516c through #7395, without conflicts (×10, with #21255's test change).
    • No conflicts: this PR's FormatVersion stays 94, and its own lines are unchanged.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 50 run, 49 pass, 0 skip, 1 fail. Windows: 52 run, 11 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 410 and 411 tests on Linux and 439 and 432 on Windows, with 0 failed apart from guest_thermal_sensors (below). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes only precise_wait's median bounds on GitHub's hosted runners.
    • The Linux failure, agc_driver_image_table_packed_guards, also fails on main d89f26516c alone in the same harness on GitHub's runners (run: the ^agc_driver_image_table tests ×10, 29 run, only this one fails). main's own Linux job, on the project's self-hosted runner, passes it at 244b338dd0 (job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's 630bbb0a2e, which holds this PR's 606212c86e (run), agc_driver_image_table_packed_guards passes 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail.
    • guest_thermal_sensors: libkernel's guest_thermal_sensors reached its 20 s timeout in the Linux suite, on one of GitHub's Intel Xeon 6975P-C runners. It times out in every run I have on those runners, main 0694c4cbd6 alone included (run), and passed in this refresh's runs on AMD EPYC runners. This PR changes no libkernel file.
    • The Windows tree: the runs' trees had Sankalp7317's 4-line _putenv_s test fix (#19899) on top, because main's Windows test build breaks without it ("'setenv' was not declared" in UploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.
  • AMD Radeon RX 9070 XT (RADV GFX1201), by @hugodearaujo, with the Khronos validation layer, in #9969's and #9749's arms (comment): Arch Linux (kernel 7.3.4), RADV (Mesa 26.2.7), GCC 16.2.1 Release, BUILD_TESTING=ON, validation layer 1.4.363, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1, ctest -V -R '^agc_driver_pointer_|^agc_driver_nested_|^agc_shader_nested_|^agc_driver_image_table|^agc_shader_memory|^agc_shader_disk_cache|^agc_shader_sampler_limits', 3 runs per arm. #9969's 630bbb0a2e (with #7395, #8939, #9457 and #9790; their merge 2c9689c0c3) and #9749's bee5a91996 (with #7395, #8939, #9457 and #9633; their merge b726f51423), each merged onto main e1ab104e0a (clean), against main e1ab104e0a alone; both carry this PR's head 606212c86e. main: 39 tests, 38 pass, 1 skip in each run. Each arm: 56 tests, 55 pass, 1 skip in each run; the counts include the tests of each arm's other PRs. The one skip is the same in every arm, main's included: agc_driver_image_table_vouched_lookups (the device reports host-imported pages written after a GPU read). The layer was inserted 32 times on main and 48 times in each arm, and never reported missing. No VUID- line in any arm, and every Vulkan test selected the RX 9070 XT.
  • NVIDIA RTX 4060 (driver 616.56), Windows 11, by @ShootanoJumper (comment): Windows 11 23H2 (22631), Ryzen 7 5700X, WinLibs GCC 15.2.0 r7, Release, merged into main ed1def4dd4 with git merge --no-ff. No validation layer was installed, so these runs say nothing about VUID- errors. This head 606212c86e: the new tests pass, and of the 1296 tests the change reaches, the only failures are ones main also fails on that GPU (#23232, #23711, #23942). Their run of #9633's 2f104ac486, which carries this head, has the same result (comment).
  • 2eecdd6fc8, a merge of #7395's 5b21241399, which carries main d50640e264 through #7395, without conflicts (×10, with #21255's test change).
    • No conflicts: this PR's FormatVersion stays 94, and its own lines are unchanged.
    • ×10: agc_driver_many_direct_samplers and every test matching ^agc_driver_pointer_, ^agc_driver_nested_, ^agc_shader_nested_, ^agc_driver_image_table, ^agc_shader_memory, ^agc_shader_disk_cache or ^agc_shader_sampler_limits, which takes in every test in this PR's diff over main. Linux: 50 run, 49 pass, 0 skip, 1 fail. Windows: 52 run, 11 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 410 and 417 tests on Linux and 439 and 438 on Windows, with 0 failed. The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes only precise_wait's median bounds on GitHub's hosted runners.
    • The Linux failure, agc_driver_image_table_packed_guards, also fails on main d89f26516c alone in the same harness on GitHub's runners (run: the ^agc_driver_image_table tests ×10, 29 run, only this one fails). main's own Linux job, on the project's self-hosted runner, passes it at 244b338dd0 (job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's dc97c68c75, which holds this PR's 2eecdd6fc8 (run), agc_driver_image_table_packed_guards passes 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail.
    • guest_thread_cpu_clock in the run with #21255's test change: libkernel's guest_thread_cpu_clock aborted once in that run's Windows suite, on an Intel Xeon 6973P-C runner. ShootanoJumper's #23756 reports this test failing intermittently on Windows on main ed1def4dd4 under load and changes it. It merged after main d50640e264, so these runs don't have it. This PR changes no libkernel file.
    • The Windows tree: the runs' trees had Sankalp7317's 4-line _putenv_s test fix (#19899) on top, because main's Windows test build breaks without it ("'setenv' was not declared" in UploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.

Checklist

  • Based on #7395's f6fb8b64a9, merged with #7395's 6cb37cc9ed (which merges main 4f64f81ef7) and then with main 4f41f4c375; 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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: #7395
  • Fixes: none (related: #6191, #7459)
  • Unblocks: Little Nightmares Enhanced Edition (PPSA10737): compute shader 0x2010fa0000 past its stop in zaryabzip's run above, whose next stop, 0x200c340000, is a pointer chase #9633 and #9749 plan (from reading the code, not run); Ghostrunner (PPSA03685) #7320: compute shader 0x200c520000 past #7459's refusal, in frankea's and TheSovietWaffle's replays and in xXPBSXx's title runs with #9702, which next stop on the storage-image check #7048 addresses
  • GPUs tested: NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); Mesa lavapipe 25.2.8 (llvmpipe, LLVM 20.1.2), Linux (a cloud worker and GitHub's runner); Tamalero's RTX 4090 (NVIDIA 615.78.08, Linux) in the retail title run; zaryabzip's RTX 3060 Laptop GPU (driver 617.42, Windows 11) in the Little Nightmares Enhanced Edition (PPSA10737) run; NVIDIA GeForce RTX 4090 (driver 620.70.06, Arch Linux, with the validation layer), by @domx4q; NVIDIA GeForce RTX 4090 (621.14, Windows 11), by @frankea (two of #8939's tests failed there before 5eb49d1893, see Tested; not re-run since); NVIDIA GeForce RTX 4080 SUPER (Windows 10 Pro), by @xXPBSXx in the Ghostrunner (PPSA03685) title runs; AMD Radeon RX 9070 XT (RADV, Mesa 26.2.7, Arch Linux, with the validation layer), by @hugodearaujo; NVIDIA RTX 4060 (driver 616.56, Windows 11, no validation layer), by @ShootanoJumper
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4947654577 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T06:56:08Z. --- ### What **Depends on: #7395.** #7223, which #7395 was stacked on, has merged. Until #7395 merges, this PR's diff shows its commits too. #7395 lets a T# or S# be read through a pointer that a scalar-buffer record holds, with the pointer's low word merged by Phis with constants, lone `Ballot` words and copies of the record word. Two titles' chains refused on the pointer's words: - **Little Nightmares Enhanced Edition (PPSA10737)**, run by klosixgaming-arch ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6259836654)). Windows 11, RTX 5090, version 01.004.000, on #7395's head of 2026-10-19 plus #7413; it stops 2 min 46 s in: ``` [dispatch] failed: compute shader 0x2010fa0000, stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value (value=LoadAddressU32[…] … GetAddressResource@pc=0x3384(arg0=Phi(arg0=Phi(arg0=Phi(arg0=BitwiseAnd32@pc=0x1600(arg0=CompositeExtractU32x4@pc=0x15d4(arg0=Ballot@pc=0x15d4(…)), arg1=imm=0x0), arg1=BitwiseNot32@pc=0x15fc(…)) … ``` One arm of the low word is the waterfall loop's `Ballot` mask ANDed with the `NOT` of the loop's lane bit, the `s_andn2` that clears the current lane. - **Ratchet & Clank: Rift Apart (PPSA01474)**, run by ps54all ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6250828427)), on `main` 82f0c9aec plus open PRs and #7395's earlier commits: ``` compute shader 0x116bb67000: … GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00009a30(GetAddressResource(Phi(… BitwiseAnd32(…, CompositeExtractU32x4(Ballot(Immediate), Immediate))) … ``` A `Ballot` word is ANDed into the low word, and the high word is merged through a Phi. One arm of that Phi reads a second buffer, and on that edge the low word is a lane mask: the waterfall loop reusing the SGPR pair, as oneandonlydean read it from the IR ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6317534570)). **Ratchet & Clank: Rift Apart (PPSA01474), 11-13:** this PR got the title past its 0x9a30 stop on retail in Tamalero's run (see Tested); the next stop, 0x10b84, was #9633's. On current `main` the title doesn't stop there. #14636 removed the title's `pc=0x62d4` `GetSamplerResource` refusal: with #14636's merge reverted, `main` f57c971559 aborts on it again ([dantdmdarealguy's run](https://github.com/boykopovar/AnyPS5/issues/13538#issuecomment-6805706990)). Tamalero's run of `main` 4e2acc2120 with #18522, on RADV with `APS5_MAX_COMPUTE_SPIRV_WORDS=2000000` and `APS5_SKIP_REFUSED_DISPATCHES=1` (which skips and logs any compute shader whose recompile fails, [code](https://github.com/boykopovar/AnyPS5/blob/4e2acc2120998222c6d1ad02278f43da149c43e2/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/Dispatch.cpp#L430-L443)), reaches the first gameplay; the only shaders it skipped were two dropped for size ([comment](https://github.com/boykopovar/AnyPS5/issues/13538#issuecomment-6848831524)). `main` still refuses this PR's shapes: on `main` 7201da4f0e, which has #14636, four of this PR's five tests fail 3 of 3 with #7395 merged and this PR's code left out, and pass 3 of 3 with this PR merged (llvmpipe, a cloud Linux machine). The fifth, `agc_driver_pointer_vsharp_select_table`, passes either way, as before (see Tested). **The change**, in `ResourceTracker.cpp`, for pointer-keyed columns only: 1. `fix(shader): take lane-mask ANDs and a high-word Phi in a pointer-keyed record pointer`. - **Lane-mask ANDs.** An AND with a lane-mask operand is taken. A lane-mask operand is a `Ballot` word, or an AND or Phi made only of those and immediates. The other operand is walked on, so a record read in it must still match the column. An AND with no lane-mask operand still refuses. - **A merged high word.** The high word now goes through the same walk as the low word. Its record reads must be reads of the same column at the low word's offset + 4. When it has no single dominating read, the table comes from the first record read whose V# words dominate the descriptor load. If none does, the column is refused. - **A high-word arm read from a second buffer** (a V# loaded through a pointer, then read at offset 0) stays refused, since it isn't a read of the record. Ratchet & Clank's chain has such an arm too ([Tamalero's data on #6191](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6255548496)). The fourth commit takes it where its edge's low word is a lane mask. 2. `fix(shader): skip lane-mask arms built from a waterfall's lane bit in a pointer-keyed record pointer`. - A lane-mask operand also takes the loop's lane bit, `ShiftLeftLogical32(1, index)`, and ORs and NOTs of lane-mask operands. - The index can come from `FindILsb32`, `FindUMsb32` or `ReadFirstLane`, through `BitwiseAnd32`, `IAdd32`, `ISub32`, immediates and the arms of `SelectU32`. - That covers `s_ff1_i32_b32`, `s_ff1_i32_b64`, `s_bitset0_b32` and the shift's own `AND 31`. - An arm made only of lane-mask operands is skipped. Little Nightmares' arm is one. 3. `docs(shader)`: the image-table debt entry lists the new arms and the merged high word, and says that a high word read from a second buffer stays refused. 4. `fix(shader): pair a pointer-keyed record pointer's two words by Phi edge`, from oneandonlydean's reading of Ratchet & Clank: Rift Apart's IR ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6317534570)). - The low and high words are walked together. Where both are Phis of one block, each low-word edge takes the high word that arrives from the same predecessor. - An edge whose low word is an immediate or a lane mask is skipped with its high word. Rift Apart's second-buffer high word reaches the load only on such an edge, as oneandonlydean read it, so the walk no longer refuses that edge. - A record low word still needs every high word it can meet to be an immediate, a lane mask or the same column at offset + 4. A second-buffer high word paired with the record's low word still refuses. - One shape that planned before now refuses: both Phis in one block, with the record's low word on one edge (its high word an immediate) and the record's high word on another (its low word a lane mask). No edge carries a whole record pointer, so its old plan could only fault at run time. 5. `docs(shader)`: the debt entry says the two words are walked edge by edge, and that a second-buffer high word stays refused on an edge whose low word is the record word. 6. `fix(shader): refuse a pointer-keyed record arm whose two words are both immediates` (9e50a74929). Where the pointer's two words are Phis of one block, an edge on which both are immediates is a constant pointer that no record holds, such as a null pointer, so the walk refuses the column there instead of planning it. At run time, a pointer built from a lane mask faults as outside the snapshot, as #7395's lane-mask arms do. **Disk cache:** no plan field changes. This PR still takes its own number on the stack's format ladder, 94 (see Tested). `main` is at 88 since Pipodi's #18455. Ours take one number each: #7642 62 (a draft, held; it takes a free number at its refresh), #7395 93, #8939 94, #9457 95, #9633 96, #9749 97, #9790 98 and #9969 99. The other open PRs changing it hold 89 (#14871, #19852, #21199 and #21240), 90 (#6416, and #16812 and #16814, both stacked on #9969), 91 (#10351) and 92 (#14853), and the rest hold numbers at or below `main`'s, from a check of every open PR's head on 11-16. Whichever lands second on a number takes the next free one. - A shader that planned before plans the same column, apart from the fourth commit's one newly refused shape and the sixth commit's constant-pointer edge. - Shapes that refused before now plan. A refusal is never cached. **Overlap:** - **#20519 and #22424 (slopezjur, the opt-in bindless image heap and, on it, layout-only pointer tables):** this PR adds no conflict beyond #7395's (see #7395's Overlap). Its own test options keep both, and its `FormatVersion` conflict keeps this PR's number, above #20519's 89. Merge order: this stack first, as proposed in #20519's thread ([comment](https://github.com/boykopovar/AnyPS5/pull/20519#issuecomment-6953598764)). If #20519 lands first, a merge of `main` resolves it here. **Marvel's Spider-Man 2 (PPSA08338)**, run by spiff637 ([comment](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6255788378)), stops on a record → pointer → V# → T# chain keyed by `ReadFirstLane(SelectU32(LogicalAnd, IAdd32, Phi))`. The second commit's `agc_driver_pointer_vsharp_select_table` builds a record → pointer → V# → T# chain with the T# read under a second key, and it passes without this PR's tracker changes. The title doesn't take it yet: hugodearaujo's run of the US release, Marvel's Spider-Man 2 (PPSA03016), still stops on the #6191 chain with this PR and #7679 ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6326819824)). There the T# is read at a fixed offset of the pointer-loaded V#, with no second key, and the same shader then reads its next block through a linked pointer. The test stays as coverage of the keyed form. ycbuzi's Windows run (RTX 4070 SUPER) stops on the same chain, at `pc=0x84bc`, with this PR's earlier head 95c2a47c76 and without it ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6878117811)). ### Tested - **New tests** in `tests/execution/ImageTable.cpp`, on lavapipe. They are synthetic wave64 waterfall loops, assembled with `llvm-mc -mcpu=gfx1030 -mattr=+wavefrontsize64`. The fourth commit's is the second-buffer shader with one instruction added (`s_mov_b32 s44, exec_lo`, `0xbeac037e`) and its three crossing branch offsets adjusted, checked by disassembly. - The first commit's: `agc_driver_pointer_phi_lane_and_table` (lane-mask ANDs), `agc_driver_pointer_phi_high_table` (a merged high word) and `agc_driver_pointer_phi_high_second_table` (the second-buffer arm, which refused; 4750c85fcd later removed this test, see below). - The second commit's: `agc_driver_pointer_phi_lane_not_table` (Little Nightmares' `BitwiseNot32` and `s_andn2` arms) and `agc_driver_pointer_vsharp_select_table` (Spider-Man 2's chain). - The fourth commit's: `agc_driver_pointer_phi_high_second_lane_table` (Rift Apart's edge: the second-buffer high word with a lane-mask low word, which must plan). - What they check: each lane samples the T# its key's record selects. Each arm whose pointer wasn't captured faults as outside the snapshot, publishes no output and keeps the artifact id. - **Red**, with only `ResourceTracker.cpp` reverted and the tests kept, on Linux with CI's configuration: - On the first commit's base, `lane_and` and `high` fail with the dword-0 refusal, and `high_second` passes (refused). Each half of the commit fixes only its own test. - On the second commit's base, `lane_not` fails: `GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Immediate, Phi(ReadConstBuffer@pc=0x00000074(…), Phi(BitwiseAnd32(CompositeExtractU32x4(Ballot(LogicalAnd), Immediate), BitwiseNot32(ShiftLeftLogical32(Immediate, BitwiseAnd32))), …`. `vsharp_select` passes (coverage). - On the fourth commit's base (e9d4626904), `high_second_lane` fails: `GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000108(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x0000007c(…`. The other 10 image-table cases pass, `high_second` among them (refused). - **Green at the head**, Linux, lavapipe (Mesa 25.2.8, llvmpipe LLVM 20.1.2), CI's configuration, on a cloud worker: - 17 tests pass 10 runs each: the five new tests, #7395's pointer-Phi ballot and copies tests, the image-table family and `agc_shader_disk_cache`. - A mirror of CI's Linux job: 1,718 of 1,721 pass, against 1,716 of 1,719 on the base. The 3 failures on both are that machine's IPv6 socket tests. - The Khronos validation layer reports no new VUIDs on the focused tests. - **GitHub's runners** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39555193965), at 2788b8f986, the head before the docs commit): the five new tests, #7395's pointer-Phi and nested sampler tests and `agc_shader_disk_cache` pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass. The libc and libkernel suites pass on both. - **At the head, a7d1e62b53** (the fourth and fifth commits): - A cloud worker, Linux with CI's configuration: the 11 image-table cases pass 20 runs each. A mirror of CI's Linux job: 1,807 of 1,813 pass. The six failures are network tests that depend on that machine (no IPv6, and its socket buffers); the five beyond its known IPv6 failure fail the same way on e9d4626904. - GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39613056959)): on Linux the 12 image-table cases and `agc_shader_disk_cache_large_file` pass 5 runs each. Windows: builds; the Vulkan cases skip on the runner. - Linux `^agc` ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39613110357)): 813 of 874 pass, 60 skip and 1 fails. The one failure is `agc_driver_sgpr_pattern_fill_keys`, a timing test, which passed in the worker's full run of the same head. - **Ratchet & Clank: Rift Apart (PPSA01474), retail, by @Tamalero** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6324523895)): version 01.005.003, Linux, RTX 4090 (NVIDIA 615.78.08), cold shader cache, one unattended run per build. - #7395's head 6c1371b26 stops at 275 s on compute 0x116bb67500: `GetImageResource dword 0`, `LoadAddressU32@pc=0x9a30`. - This PR at a7d1e62b5 gets past it, with no regression up to the next stop, as they report. At 270 s it stops on a different shader, compute 0x116bb5ad00: `GetImageResource dword 0`, `LoadAddressU32@pc=0x10b84`. - As they read the new chain, it has the same shape one level deeper. The low word is a Phi of the record read at `pc=0xfd94` and a `Ballot` lane-mask word. The high word's other arm is `ReadConstBuffer@pc=0x10350`, through a V# whose four dwords are loaded at `pc=0x10338` from another pointer. - **9162d9df8f, a merge of #7395's 4661f4bab5, which merges `main` 0db47b263d.** The only conflict was `ShaderDiskCache.hpp`'s `FormatVersion` line: `main` moved to 45 (#7831), and this branch keeps its 46. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39929758785)), the pointer, nested, image-table and disk-cache sets (22 tests) pass 10 runs in a row on Linux. On Windows the set has 24, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 19, 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. An earlier run linked here didn't run this set, so it's replaced. - **Little Nightmares Enhanced Edition (PPSA10737)** has since run on this branch, in @zaryabzip's run below. - **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. On `main` 513ca7e55 with #9068, #8070 and #9701 to #9703, it stops on #7459's `GetImageResource dword 0 is not a valid runtime value`: a T# behind a `readfirstlane`-keyed record in a waterfall loop whose pointer Phis carry `Ballot` AND-NOT words. With this PR (9162d9df8) it gets past that and stops on `sampler resource limit exceeded`, which #10000 raises. - **Ghostrunner (PPSA03685), a second replay by @TheSovietWaffle** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6369860575)): the same compute shader 0x200c520000, `agc_shader_replay --prepare` on the title's dumped request with `ANYPS5_NO_SHADER_CACHE=1`, Windows 10 22H2, WinLibs GCC, Release; replay only, no title or GPU run. The base is `main` 0db47b263 with #9068, #8070 and #9703. - The base stops on `GetImageResource dword 0 is not a valid runtime value` at `LoadAddressU32@pc=0x000517dc`, and so does the base with #10228. - With this PR (9162d9df8), the 0x517dc load is accepted, and analysis stops on `sampler resource limit exceeded`. - With this PR and #10000, it gets past the sampler limit and stops on another image load, `LoadAddressU32@pc=0x0002ef78`. Its pointer Phi has, besides the record reads with lane-mask arms, an arm read at a fixed offset of a buffer whose V# is loaded from memory. #9457 with #10000 stops at the same 0x2ef78. - **08586677a1, a merge of #7395's 319fa1f360** (which merges `main` 379b1dca32), on top of the new commit 9e50a74929 (6. above). The conflict in `ResourceTracker.cpp` is between this PR's paired walk and #7880's unwrap of the pointer's words: pointer-keyed columns keep the paired walk, the others take #7880's `UnwrapTableRead`. `FormatVersion` stays at #7395's 47. - **The planner behaviour changes in two places.** In the merge, an unmerged record pointer's low word is unwrapped as #7880 does, and the column is refused when it isn't a table read; before, the word was taken as it resolved. Without that, the merge fails #7880's `agc_shader_memory` and `agc_shader_bindless` on both runners with `GetImageResource dword 0 is not a valid runtime value` ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40071113480)). And 9e50a74929 refuses a pointer-keyed Phi edge whose two words are both immediates (a constant pointer no record holds, such as a null pointer), where the walk planned it before. - **9e50a74929's red and green** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40071070388)): with 9162d9df8f's code, `agc_driver_pointer_phi_high_table` fails 3 of 3 on Linux with "a record pointer arm whose two words are both immediates was planned". With the commit, ×10: Linux 24 run, 24 pass, 0 skip, 0 fail; Windows 26 run, 7 pass, 19 skip, 0 fail. - Focused, ×10 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40077066583)): `agc_shader_bindless`, `agc_shader_memory` and the `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_driver_image_table` and `^agc_shader_disk_cache` tests. Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 7 pass, 19 skip (Vulkan device tests; the runner has none), 0 fail. - The libc and libkernel suites pass on both runners, run with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. The full `^agc` set at #9749's and #9790's heads, which carry this merge, shows only `main`'s three known failures (see those PRs). - **Ghostrunner (PPSA03685) title runs, by @xXPBSXx** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6383252382)): Windows 10 Pro, WinLibs GCC 15.2.0, Release, NVIDIA GeForce RTX 4080 SUPER, runs of up to 600 s with no input, all libraries rebuilt for each tree (pass/stop only). Both states are `main` 5d3ab7791d with #9702 merged in, so compute shader 0x200c520000 gets past structurization. - Without this PR, both runs stop in 0x200c520000 on `GetImageResource dword 0 is not a valid runtime value` (`LoadAddressU32@pc=0x00051884` and `pc=0x0005192c`). - With this PR's 08586677a1 merged in as well (it carries #7395's changes and an earlier version of #7223's beneath it, so these runs don't separate the three), neither run has that refusal. Both stop later on `storing storage image results pending over memory outside the write watch without the guest bytes saved before them is not implemented`, the check #7048 addresses. `sampler resource limit exceeded`, the replays' next stop, doesn't appear in these runs. - **232a8e4c54, a merge of #7395's 2525821ac9** (which merges `main` c9b2660d56). Clean: `FormatVersion` follows #7395's 50, and this PR's own diff is unchanged. On GitHub's runners, 10 runs ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40100305011)) of the pointer, nested, image-table and disk-cache sets (`agc_shader_bindless`, `agc_shader_memory`, `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_driver_image_table`, `^agc_shader_disk_cache`): Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 7 pass, 19 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. - **e2af03bf19, a merge of #7395's 71741a70b6, which merges #7223's f1cc524085 (yabanana's merge of `main` c8d34aa8f4).** Clean: `FormatVersion` follows #7395's 50, and this PR's own diff is unchanged: the merge brings in exactly what #7395's merge did (249 files). On GitHub's runners, 10 runs ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40135890916)) of the pointer, nested, image-table and disk-cache sets (`agc_shader_bindless`, `agc_shader_memory`, `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_driver_image_table`, `^agc_shader_disk_cache`): Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 7 pass, 19 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both (143 and 206 tests on Linux, 170 and 222 on Windows), run with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Ghostrunner (PPSA03685) replays, by @TheSovietWaffle** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6438284726), [IR](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6438561618)): Windows 10 22H2, WinLibs GCC 15.2.0, Release, `agc_shader_replay --prepare` with `ANYPS5_NO_SHADER_CACHE=1` on a fresh `shader_200c520000.prepare.req` from a run on `main` 74acfad65. - `main` 74acfad65 with this PR (e2af03bf19): a title run on an RTX 3080 (617.42) stops after about 152 s on `sampler resource limit exceeded` in compute shader 0x200c520000, and the replay stops the same way. #10000 raises that limit. - With #10000 and #9969, #9790 or #9633 on top: the request stops at `LoadAddressU32@pc=0x0002ef78` (`GetImageResource dword 0 is not a valid runtime value`). The IR shows the T# pointer is a Phi of the record pointer and a pointer read at offset 0 through a V# loaded from the record at +0x30, with that V#'s words edited before use (`& 0xffff` on the base's high word, `<< 4` on the record count, `| 0x30000000` on word 3). No PR in this stack plans that arm; it's the title's next stop. - **752620ec73: 29365ffe14, a merge of #7395's 9343a179b3, the format commit cfb72cb70e, the test-only commit 4750c85fcd, and 752620ec73, a merge of `main` 0cd07dc4ab** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40641907261)). - **29365ffe14** takes #7395's merge of #7223's 153400ba2b (yabanana's merge of `main` 0d62324ce2, which moves #7223 to `FormatVersion` 49) and #7395's test-only commit. Clean, and this PR's own diff is unchanged. - **cfb72cb70e** gives this PR its own disk-cache format, 51, one above #7395's 50. The open bumps take one number each: #7223 49 (as do #9508, #9748 and other open PRs), #7395 50, #8939 51, #10000 52, #9457 53, #10489 54, #9633 55, #9749 56, #9790 57, #9969 58, #10846 59. Whichever lands second on a number takes the next free one. - **4750c85fcd** drops two checks that expected planning to refuse a shape with `not a valid runtime value`, two of the assertions @oneandonlydean listed on #9969, under the rule that tests don't assert that a shape the code doesn't support yet throws: a high-word arm read from a buffer whose V# is loaded through a pointer, and a record-pointer arm whose two words are both immediates. The first was the whole of `agc_driver_pointer_phi_high_second_table`'s mode, so that test and its registration go; the lane-mask, high-word and second-lane cases stay. - **752620ec73** merges `main` 0cd07dc4ab. The one conflict was `ResourceTracker.cpp`'s include list, where mrfelek's #10228 adds `<numeric>` beside this PR's `<set>`; both stay. This PR's changed lines are the same. - The pointer-Phi, V#-select and SGPR-fill tests with the disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 10 run, 10 pass, 0 skip, 0 fail. Windows: 12 run, 6 pass, 6 skip (the Vulkan device tests; the runner has none), 0 fail. - Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel has 4 failures of 286. `guest_raise_exception` failed after "address waking round 47: the handler did not run within 5 s", as `main` 9fc181dde5 does in the same verify setup ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40631927722)); that is #11813, and this PR doesn't touch libkernel. `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. - **24d5cbbcec, a merge of #7395's ca14648806** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40656342982)): #7395's test-only commit, which drops the nested-sampler test's check that an S# with another consumer is refused. Clean, and this PR's changed lines are the same. The pointer-Phi, V#-select, SGPR-fill and nested-sampler tests with the disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 6 pass, 7 skip (the Vulkan device tests), 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. - **408401b351, a merge of #7395's ca5ba6296f, which carries `main` 38ccd50f83 and with it #11507's `FormatVersion` 49** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40665525400)). Clean: `FormatVersion` stays 51 (see What), and this PR's diff over #7395 is the same. The pointer-Phi, V#-select, SGPR-fill and nested-sampler 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: 12 run, 12 pass, 0 skip, 0 fail. Windows: 14 run, 6 pass, 8 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. - **3e2ebbbf35: 238806dc87, a merge of #7395's e04a705765, and 3e2ebbbf35, the format commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40861189645)). - **238806dc87** takes #7395's test-only commit d908758281, which drops `agc_driver_nested_image_table`'s two checks that a valid shader is refused (a V# with another buffer consumer and a T# with another consumer), and #7395's merge of #7223's 0dbf5478b2 (yabanana's merge of `main` f7e84c4cf1, which moves #7223 to `FormatVersion` 50). Clean. - **3e2ebbbf35** gives this PR its own disk-cache format, 53 (52 is #10000's). Apart from that line, this PR's diff over #7395 is unchanged. - The pointer, nested, image-table and disk-cache tests with `agc_shader_bindless` and `agc_shader_memory` ran 10 times with no failure. Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 8 pass, 18 skip (the Vulkan device tests; the Windows runner has no Vulkan device), 0 fail. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. They ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **ffa34ecc26, a merge of #7395's 4769d5a745, which drops "and refusals" from two nested-table test summary lines** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40946824038)). It's clean and brings only that change. The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 24 run, 24 pass, 0 skip, 0 fail. Windows: 26 run, 8 pass, 18 skip, 0 fail; the 18 skip because the runner has no Vulkan device. The libc and libkernel suites run 191 and 291 tests on Linux and 220 and 314 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Little Nightmares Enhanced Edition (PPSA10737), 01.004.000, @zaryabzip's run** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6549300221), [retest on #6275](https://github.com/boykopovar/AnyPS5/discussions/6275#discussioncomment-19322026)): Windows 11, RTX 3060 Laptop GPU (driver 617.42), this PR's 13c1955909 and #7395's 967f0dbebb merged into `main` 0836dfdf4f. Compute shader 0x2010fa0000 gets past its stop, and `agc_shader_replay --prepare` on its dumped request prepares it (481,271 SPIR-V words). On `main`, and on `main` with #7395 alone, it fails at pc 0x3300 with `GetImageResource dword 0 is not a valid runtime value`. The title then stops at compute shader 0x200c340000 with the same message, a pointer chase that #9633 and #9749, stacked on this PR, plan when the chase isn't a loop (from reading the code, not run). - **3d14230a7c, a merge of #7395's merge of `main` 0836dfdf4f** (1f158eb5e0) ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41264068777)). - **`CMakeLists.txt`** conflicted from #12862's split. `tools/agc_test_split.py resolve` moves this PR's registrations into `tests/cmake/agc_driver_image_table_tests.cmake`: +7 −2 against #7395's merge, the 5 new `add_test` lines and #7395's two `set_tests_properties` lines extended with this PR's names. - **`ShaderDiskCache::FormatVersion`** conflicted too, since #7395's merge brings 63. This PR's own format moves from 53 to 66, the lowest number above 63 that no open PR uses, so its recompiler change keeps a disk cache format of its own. - That leaves it above #9457's 55, which sits on top of this PR. #9457's head is oneandonlydean's merge of `main`, left as he made it, so the stack's numbers are uneven until one of them merges again. - **Nothing else conflicted,** and apart from the move and the number this PR's diff is unchanged. - **The count:** with `-DBUILD_TESTING=ON`, `ctest -N` gives 3089 tests: `main`'s 3075, #7395's 9 and this PR's 5, each listed once. - **×10** of this PR's verify set. Linux: 14 run, 14 pass, 0 skip, 0 fail. Windows: 14 run, 1 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Validation**, `VK_LAYER_KHRONOS_validation` on GitHub's Linux runner ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41264091658)), `main` 0836dfdf4f against this merge, for the same tests. The loader inserted the layer 1 time on `main` and 13 with this merge. The only VUID in either arm is `VUID-VkDeviceCreateInfo-pNext-pNext`, so this merge adds none. `agc_driver_image_table` fails in that mode in both arms, because the mode treats that `main` message as a failure. - **Upstream CI's Windows job** at this head ([job](https://github.com/boykopovar/AnyPS5/actions/runs/41269635936/job/124740106893)) fails one test of 39: #7223's `agc_shader_nested_snapshot_retry`, which this PR now carries through #7395's merge. As on #7395 and #10846, it exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. df80d9b636, below, fixes it. - **NVIDIA RTX 2000 Ada Generation** at 3d14230a7c, from TechLevelZero's NVIDIA bot ([report](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6553116648)): driver 595.99.02, Ubuntu 26.04.1, 2,509 of 3,087 tests selected. - 2,459 passed, 6 failed and 44 skipped. None of the failures is new: 4 also fail on `main`, and 2 are unstable on `main`. - With `VK_LAYER_KHRONOS_validation`, there are no new validation IDs against `main`, over 939 tests on the GPU. - **df80d9b636, a merge of #7395's 5fdf20fc3d,** which gives #7223's `agc_shader_nested_snapshot_retry` libc's directory on PATH on Windows, beside #7395's sampler retry, as oneandonlydean asked on #10846 ([comment](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6556303603)). It brings in only that line, so the upstream Windows failure noted above is gone. - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41295307858)): this PR's set with both retry tests. Linux: 16 run, 16 pass, 0 skip, 0 fail. Windows: 16 run, 3 pass, 13 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 199 and 308 tests on Linux and 226 and 330 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Upstream CI's Windows job at this head** ([job](https://github.com/boykopovar/AnyPS5/actions/runs/41301606359/job/124834991847)), merged onto `main` d262000: 39 tests, 39 passed, 0 skipped, 0 failed, both retry tests included. - **NVIDIA RTX 2000 Ada Generation** at df80d9b636, from TechLevelZero's NVIDIA bot ([report](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6558279277)): merged onto `main` e6f5730, driver 595.99.02, Ubuntu 26.04.1, 2,548 of 3,148 tests selected. - 2,497 passed, 6 failed and 45 skipped. None of the failures is new: 3 also fail on `main`, and 3 are unstable on `main`. - With `VK_LAYER_KHRONOS_validation`, there are no new validation IDs against `main`, over 946 tests on the GPU. 14 tests ran with the layer but aren't in `main`'s baseline, so they weren't compared. Both nested snapshot retry tests passed on the GPU. - **87984fe728, a merge of #7395's 3283b23aac, which merges `main` 88e804b0a7** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41414264004)). Clean: `FormatVersion` stays 66, and this PR's own diff is unchanged; the plan-encoder numbers come from #7395's merge (see #7395). The shader-memory, nested, pointer, image-table, disk-cache and bindless tests, with #7694's `agc_shader_descriptor_phis`, pass 10 runs in a row. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 11 pass, 18 skip, 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. TechLevelZero's NVIDIA bot ran this head merged onto `main` 88e804b on an RTX 2000 Ada ([report](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6576350103)): 2,563 passed, 7 failed, none new (3 also fail on `main`, 4 unstable on `main`), 45 skipped, with no new validation IDs (985 tests on the GPU). - **afb123a49e, a merge of #7395's 6cb37cc9ed, which merges `main` 4f64f81ef7** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41461159057)). Clean: `FormatVersion` stays 66, and this PR's own diff is unchanged. The `ResourceMaterializer.cpp` resolution, with #12246's view loop moved back into `Snapshot`, comes from #7395's merge (see #7395). The shader-memory, nested, pointer, image-table, disk-cache and bindless tests, with #7694's `agc_shader_descriptor_phis`, pass 10 runs in a row. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 11 pass, 18 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (217 and 318) and on Windows (244 and 339). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **AMD Radeon RX 6300 (RADV NAVI24)** at this head, from TechLevelZero's AMD bot ([report](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6590752916)): merged onto `main` a4eca2a, Mesa 25.2.8, Ubuntu 26.04.1, 2,754 of 3,591 tests selected. 2,687 passed, 13 failed and 54 skipped. None of the failures is new: 12 also fail on `main`, and 1 is unstable on `main`. One more, a `trace_digest` tool test, timed out in the parallel run and passed on its retry. With `VK_LAYER_KHRONOS_validation`, there are no new validation IDs against `main`, over 992 tests on the GPU. 15 tests, among them the stack's nested and pointer tests, ran with the layer but aren't in `main`'s baseline, so they weren't compared. - **@BunnyFl approved this head** ([review](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5744073838)) after reviewing this PR's own change on top of #7395's head. Windows 11, WinLibs GCC 15.2.0, this head merged onto `main`: 21 tests (`agc_driver_pointer_*`, `agc_driver_image_table*`, `agc_shader_memory*`, `agc_shader_disk_cache*`) pass, none skipped. Their negative control, with #7395's `ResourceTracker.cpp` in the same tree: the four new cases (`agc_driver_pointer_phi_lane_and_table`, `_high_table`, `_high_second_lane_table` and `_lane_not_table`) fail, and #7395's three pass. - **Ghostrunner (PPSA03685), replays of the stack by @xXPBSXx** ([comment](https://github.com/boykopovar/AnyPS5/pull/9790#issuecomment-6592580784)): a request captured in a game run on `main` 92d2fdc343 (NVIDIA GeForce RTX 4080 SUPER, driver 610.74, Windows, Release), replayed with `agc_shader_replay --prepare`, no GPU. Each PR's diff over `main`, without its tests, was applied alone on 92d2fdc343, this PR's at afb123a49e. - Without the stack, 2 of 2 title runs ended after 121 s and 97 s on one compute shader with `GetImageResource dword 0 is not a valid runtime value`, a descriptor reached through a `ReadFirstLane`/`Ballot` waterfall over constant-buffer values. The replay fails the same way, and so does #7395's diff. - With this PR's diff, as with #9457's, #9633's and #9790's, that step passes and the request stops on `sampler resource limit exceeded` (`MaxSamplers` was 32; #10000 has since raised it to 64). - Their diagnostic, not checked in: with #9790 and `MaxSamplers` at 128, the request stops on `GetImageResource dword 0` again, so the shader has at least one more chain the stack doesn't resolve. - **58ebe4b440, a merge of `main` 4f41f4c375** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41604175605), [complete ×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41620947199)). - **The conflicts:** `ShaderDiskCache.hpp`'s `FormatVersion`, where `main` is now at 52 (#10000) and this PR keeps its 66; and `docs/dev/debt/shader.md`, where this PR's pointer lane-mask entry and `main`'s new sampler-limit entry are adjacent and both stay. This PR's own lines are unchanged apart from the `FormatVersion` line's old value. - **×10:** `agc_driver_image_table`, `agc_driver_many_direct_samplers` and every test matching `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 9 run, 7 pass, 2 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Complete ×10**, adding every `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested` and `^agc_shader_table` test, so every test in this PR's diff over `main` runs. Linux: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 10 pass, 14 skip (no Vulkan device), 0 fail. - **GitHub's `windows` check is red at this head** on one test, `avplayer_http_patched_modules`, at `AvPlayerHttpModules.cmake:155`, where the owner executable `avplayer_http_patched_modules_tests.exe` wasn't built for the selected test ([job](https://github.com/boykopovar/AnyPS5/actions/runs/41619405043/job/125861976849)). #15375, the fix, has since merged (bfd14d1260). This PR changes no avplayer or HTTP file, and the check passed at afb123a49e. - **9eab037489, a merge of #7395's 014d1e30c3,** which carries `main` c2eafe4461 with yabanana's #7223 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41775826984)). - **The conflicts:** `ShaderDiskCache.hpp`'s `FormatVersion`, which stays 66 (`main` is at 56 since #7223), and `docs/dev/debt/shader.md`, where this PR's wording of the pointer-keyed image-table entry stays. This PR's own lines are unchanged apart from the `FormatVersion` line's old value. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 27 run, 27 pass, 0 skip, 0 fail. Windows: 29 run, 10 pass, 19 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 301 and 325 tests on Linux and 331 and 343 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **NVIDIA RTX 2000 Ada Generation** at this head, from TechLevelZero's NVIDIA bot ([report](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6627445092)): merged onto `main` 5b1d381, driver 595.99.02, Ubuntu 26.04.1, 2,904 of 3,883 tests selected. 2,849 passed, 6 failed and 49 skipped. None of the failures is new: 3 also fail on `main`, and 3 are unstable on `main`. With `VK_LAYER_KHRONOS_validation`, there are no new validation IDs against `main`, over 985 tests on the GPU. `agc_shader_nested_sampler_snapshot_retry` ran with the layer but isn't in `main`'s baseline, so it wasn't compared. - **c9de9a962c, a merge of #7395's 0ce8d173a3,** which merges `main` 8eaf82f315 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42336867126)). - **Clean:** #7395's merge takes the one conflict with `main`, JJenkx's #15305's debt entry, and this PR's own lines are unchanged. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 28 run, 28 pass, 0 skip, 0 fail. Windows: 30 run, 10 pass, 20 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **3cc9dd79e9, a merge of #7395's 86527d2f76,** which merges `main` 006d11fca5 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42370669717)). - **Clean:** #7395's merge takes the one conflict with `main`, frankea's #9020's `FormatVersion` 57, and `FormatVersion` stays 66 here. This PR's own lines are unchanged apart from the `FormatVersion` line's old value. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 28 run, 28 pass, 0 skip, 0 fail. Windows: 30 run, 10 pass, 20 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 327 and 344 tests on Linux and 358 and 371 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **e22ac325f8, a merge of #7395's 85e79949ae,** which merges `main` dd7c8de5de ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42510067918)). - **The conflict:** `docs/dev/debt/shader.md`, where this PR's wording of the pointer-keyed image-table entry sits next to #10489's rewording of the image-table entry (the image limit is now 128). Both are kept. `FormatVersion` stays 66, and this PR's own lines are unchanged apart from the `FormatVersion` line's old value. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 42 run, 42 pass, 0 skip, 0 fail. Windows: 44 run, 10 pass, 34 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 344 and 346 tests on Linux and 375 and 373 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **bddad7dfa0: bc08ac89c7, a merge of #7395's 3309a349f6, and the format commit bddad7dfa0,** which carries `main` 017bd95f5f through #7395 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42748925873)). - **The conflict:** `FormatVersion`, where #7395 now takes 79, above `main`'s 68 from #14636 and above this PR's 66. The merge takes 79, and the format commit moves this PR to 80. This PR's own lines are unchanged apart from the `FormatVersion` line. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 42 run, 42 pass, 0 skip, 0 fail. Windows: 44 run, 10 pass, 34 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 350 and 348 tests on Linux with 0 failed, and 380 and 375 on Windows. On Windows, libkernel's `guest_kernel_resident_fmem_export` and `guest_kernel_resident_fmem_export_patched` fail: the same harness fails them on `main` 7259cce111 alone ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42693594401)), and `main`'s own Windows job passes them, so they come from the verify harness, not this PR. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Every `agc` test:** Every `agc` test also ran once on #9749's tree, which holds this PR ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42749191754)): Linux 1,530 run, 1,437 pass, 93 skip, 0 fail; Windows 1,573 run, 467 pass, 1,106 skip (no Vulkan device), 0 fail. - **95c2a47c76, a merge of #7395's 40d718d87b, without conflicts,** which carries `main` e22c5fb941 through #7395 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43458669475)). - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main` and `main`'s new `agc_shader_memory_coherent_atomic_loads`. Linux: 43 run, 43 pass, 0 skip, 0 fail. Windows: 45 run, 11 pass, 34 skip (no Vulkan device), 0 fail, in both attempts of the Windows job. The libc and libkernel suites run 379 and 372 tests on Linux and 406 and 400 on Windows. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Windows libkernel suite:** in the first attempt of the Windows job ([attempt 1](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43458669475/attempts/1)), `guest_timed_wait_cpu` failed, 1 of the 400 libkernel tests. It logged these three lines and then aborted: ``` sceKernelUsleep(500 us): P99 overshoot 10719 us (limit < 2500 us), max overshoot 16005 us EXCEEDED sceKernelUsleep(500 us): P99 overshoot 41045 us (limit < 2500 us), max overshoot 62771 us EXCEEDED sceKernelUsleep(500 us): P99 overshoot 32273 us (limit < 2500 us), max overshoot 73863 us EXCEEDED ``` The re-run of the Windows job on the same commit ([attempt 2](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43458669475/attempts/2)) ran `guest_timed_wait_cpu` and passed it, with the libkernel suite at 400 run, 0 failed. This PR changes no libc or libkernel file, and neither does the rest of the stack. #9457's run of d007acef13, which carries 95c2a47c76, passed the same Windows suite with 400 run, 0 failed ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43458763696)). - **1376724c9f, a merge of #7395's e9ddd12bd2, without conflicts,** which carries `main` bd278f3654 through #7395 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43576529486)). - **`FormatVersion`:** `main`'s 69, this PR's 80. #7395's merge takes #19530's move of `main` from 68 to 69, and this PR's own diff over #7395 is unchanged. - **×10:** the same tests as on 95c2a47c76. Linux: 43 run, 43 pass, 0 skip, 0 fail. Windows: 45 run, 11 pass, 34 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 380 and 376 tests on Linux and 410 and 404 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes only `precise_wait`'s median bounds on GitHub's hosted runners. - **The Windows tree:** the run's tree had Sankalp7317's 4-line `_putenv_s` test fix ([#19899](https://github.com/boykopovar/AnyPS5/pull/19899)) on top, because `main`'s Windows test build breaks without it ("'setenv' was not declared" in `UploadCacheReadOnlyFlush.cpp`, from #18037); it isn't on this branch. - **b4a5b1a618, a merge of #7395's 3c58f422ee,** which carries `main` 328cbf673e through #7395 ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43816355465), [with #21255's test change](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43831952163)). - **The conflict:** only `FormatVersion`, where #7395 now takes 93, above this PR's 80. The merge moves this PR to 94. This PR's own lines are unchanged apart from the `FormatVersion` line. - **×10:** the same tests as on 1376724c9f. Linux: 50 run, 49 pass, 0 skip, 1 fail. Windows: 52 run, 11 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 391 and 390 tests on Linux and 421 and 417 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes only `precise_wait`'s median bounds on GitHub's hosted runners. - **The Linux failure, `agc_driver_image_table_packed_guards`, fails as on `main`:** three identical "stage 4 pc 0x68" records, then "unrecoverable packed table format was not poisoned", the same lines as in `main`'s own Linux job at e249fc47b5 ([job](https://github.com/boykopovar/AnyPS5/actions/runs/43816702928/job/133145283420)). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's 20b045a8de, which holds this PR's b4a5b1a618 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43831952163)), `agc_driver_image_table_packed_guards` passes 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail. - **`guest_thermal_sensors` in that run:** libkernel's `guest_thermal_sensors` reached its 20 s timeout in the Linux suite. It times out in every run I have on GitHub's Intel Xeon 6975P-C runners, `main` 0694c4cbd6 alone included ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43832502375)), and passes in this PR's own ×10 above and in `main`'s own job. This PR changes no libkernel file. - **The Windows tree:** the runs' trees had Sankalp7317's 4-line `_putenv_s` test fix ([#19899](https://github.com/boykopovar/AnyPS5/pull/19899)) on top, because `main`'s Windows test build breaks without it ("'setenv' was not declared" in `UploadCacheReadOnlyFlush.cpp`, from #18037); it isn't on this branch. - **NVIDIA GeForce RTX 4090, by @domx4q, with the Khronos validation layer** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6922537661)): Arch Linux (kernel 7.3.4), GCC 16.2.1 Release, driver 620.70.06, Vulkan 1.4.357, validation layer 1.4.363.1, with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. This head b4a5b1a618 merged onto `main` e4caa07950 (their merge ee1e118c33, clean), against `main` e4caa07950 alone, `ctest -R '^agc_.*(image_table|pointer)|^agc_shader_(disk_cache|memory)'`. `main`: 40 of 41 pass. This PR: 48 of 49 pass, including the eight tests `main` doesn't have (this PR's five and #7395's three). The one failure on both sides is `agc_driver_image_table_packed_guards`, with the same message as on `main`, "unrecoverable packed table format was not poisoned" after the "stage 4 pc 0x68" record. fernandomcrsilva's open #21255 changes that test. No `VUID-` line on either side, and every device test selected the RTX 4090. - **5eb49d1893, a null record pointer on Windows** (test only, `tests/execution/ImageTable.cpp`). @frankea's run on Windows 11 with an RTX 4090 (NVIDIA 621.14, MinGW, [comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6963380582)) failed `agc_driver_pointer_phi_lane_and_table` and `agc_driver_pointer_phi_lane_not_table` 3 of 3 at b4a5b1a618, and on #9457, #9790 and #9969, both with `selected the descriptor at 0x0: unmapped` where they expected `outside the snapshot`. - **The cause:** both tests keep their records on the stack and pair arms whose low word can be 0 with the record pointer's high word: `lane_not_table`'s zero arm, and `lane_and_table`'s lane-mask arm in the waterfall pass over lanes 32-63. #18253 links Windows test executables without high-entropy addresses, which keeps their stacks near the bottom of the address space. On frankea's machine the selected pointer was 0x0, so the records sat below 4 GiB and their high word was 0, and 0x0 faults as unmapped, as a null pointer does in `agc_driver_pointer_phi_sampler_table`. GitHub's Windows runner has no Vulkan device, so these tests skip there. - **The fix:** when the records' high word is 0, these checks also accept `selected the descriptor at 0x0: unmapped`; otherwise they still have to fault outside the snapshot. - **Linux at the normal layout, ×10** ([job](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44196542939/job/134439385190), on an earlier commit with the same tree): the 12 `^agc_driver_pointer_` and `^agc_driver_nested_` tests pass, none skipped. - **Linux with the records mapped at 1 GiB, verify only:** a test-only commit, not on this branch, maps each records array at `0x40000000`, below 4 GiB. With the old checks, `agc_driver_pointer_phi_lane_and_table` and `_lane_not_table` fail 3 of 3, each on `selected the descriptor at 0x0: unmapped`, and the other 10 pass 3 of 3 ([job](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44210596028/job/134487629584)). With the fix, all 12 pass ×10 ([job](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44210711681/job/134488017505)). - **Windows** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44210822967)), with Sankalp7317's 4-line `_putenv_s` fix ([#19899](https://github.com/boykopovar/AnyPS5/pull/19899)) merged for the run only: the build passes, the libc and libkernel suites run 421 and 417 tests with 0 failed, and the 12 tests skip (no Vulkan device). The Windows GPU case itself can only be re-run by a tester. - **Ghostrunner (PPSA03685) title runs at this head, by @xXPBSXx** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6985305109)): Windows 10 Pro, WinLibs GCC, Release, NVIDIA GeForce RTX 4080 SUPER, four runs of up to 300 s with no input, the relinker and all libraries built from each tree, in the order B, B, A, A. A is `main` dcf3d15978; B is the same `main` with this head, 5eb49d1893, merged in locally. - `main` alone: both runs stop in compute shader 0x200c520000 on `GetImageResource dword 0 is not a valid runtime value` (`LoadAddressU32@pc=0x000518c4`). - With this PR: neither run has that refusal. Both stop in the same shader on its next refusal, `sampler resource limit exceeded`, which `ResourceTracker.cpp` gives when a shader needs more than `MaxSamplers` samplers (64 since #10000). - The two arms were built on different days (B on 11-18, A on 11-16), each from its own tree. Not run: AMD, Linux, other titles, this PR's tests. - **Ghostrunner (PPSA03685), an offline replay at 5eb49d1893, by @frankea** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6996032903)): one request for compute shader 0x200c520000 dumped on `main` 3858655d2a, replayed with `agc_shader_replay --prepare` and `ANYPS5_NO_SHADER_CACHE=1`, macOS x86_64, Release; replay only, no title or GPU run. - `main` alone, and `main` with #21745: refused at `GetImageResource dword 0`. - `main` with this PR's 5eb49d1893 (a clean merge): past that refusal, and stops on `sampler resource limit exceeded`. - With frankea's #23409 (128 samplers per shader) as well: the shader prepares, 12,420,660 SPIR-V words. - **606212c86e, a merge of #7395's ef102a3a52,** which carries `main` d89f26516c through #7395, without conflicts ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44433119357), [with #21255's test change](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44451654918)). - **No conflicts:** this PR's `FormatVersion` stays 94, and its own lines are unchanged. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 50 run, 49 pass, 0 skip, 1 fail. Windows: 52 run, 11 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 410 and 411 tests on Linux and 439 and 432 on Windows, with 0 failed apart from `guest_thermal_sensors` (below). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes only `precise_wait`'s median bounds on GitHub's hosted runners. - **The Linux failure, `agc_driver_image_table_packed_guards`, also fails on `main` d89f26516c alone** in the same harness on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44469816375): the `^agc_driver_image_table` tests ×10, 29 run, only this one fails). `main`'s own Linux job, on the project's self-hosted runner, passes it at 244b338dd0 ([job](https://github.com/boykopovar/AnyPS5/actions/runs/44455102712/job/135332957346)). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's 630bbb0a2e, which holds this PR's 606212c86e ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44451654918)), `agc_driver_image_table_packed_guards` passes 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail. - **`guest_thermal_sensors`:** libkernel's `guest_thermal_sensors` reached its 20 s timeout in the Linux suite, on one of GitHub's Intel Xeon 6975P-C runners. It times out in every run I have on those runners, `main` 0694c4cbd6 alone included ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43832502375)), and passed in this refresh's runs on AMD EPYC runners. This PR changes no libkernel file. - **The Windows tree:** the runs' trees had Sankalp7317's 4-line `_putenv_s` test fix ([#19899](https://github.com/boykopovar/AnyPS5/pull/19899)) on top, because `main`'s Windows test build breaks without it ("'setenv' was not declared" in `UploadCacheReadOnlyFlush.cpp`, from #18037); it isn't on this branch. - **AMD Radeon RX 9070 XT (RADV GFX1201), by @hugodearaujo, with the Khronos validation layer, in #9969's and #9749's arms** ([comment](https://github.com/boykopovar/AnyPS5/pull/9969#issuecomment-7013222450)): Arch Linux (kernel 7.3.4), RADV (Mesa 26.2.7), GCC 16.2.1 Release, `BUILD_TESTING=ON`, validation layer 1.4.363, with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`, `ctest -V -R '^agc_driver_pointer_|^agc_driver_nested_|^agc_shader_nested_|^agc_driver_image_table|^agc_shader_memory|^agc_shader_disk_cache|^agc_shader_sampler_limits'`, 3 runs per arm. #9969's 630bbb0a2e (with #7395, #8939, #9457 and #9790; their merge 2c9689c0c3) and #9749's bee5a91996 (with #7395, #8939, #9457 and #9633; their merge b726f51423), each merged onto `main` e1ab104e0a (clean), against `main` e1ab104e0a alone; both carry this PR's head 606212c86e. `main`: 39 tests, 38 pass, 1 skip in each run. Each arm: 56 tests, 55 pass, 1 skip in each run; the counts include the tests of each arm's other PRs. The one skip is the same in every arm, `main`'s included: `agc_driver_image_table_vouched_lookups` (the device reports host-imported pages written after a GPU read). The layer was inserted 32 times on `main` and 48 times in each arm, and never reported missing. No `VUID-` line in any arm, and every Vulkan test selected the RX 9070 XT. - **NVIDIA RTX 4060 (driver 616.56), Windows 11, by @ShootanoJumper** ([comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-7024112572)): Windows 11 23H2 (22631), Ryzen 7 5700X, WinLibs GCC 15.2.0 r7, Release, merged into `main` ed1def4dd4 with `git merge --no-ff`. No validation layer was installed, so these runs say nothing about `VUID-` errors. This head 606212c86e: the new tests pass, and of the 1296 tests the change reaches, the only failures are ones `main` also fails on that GPU (#23232, #23711, #23942). Their run of #9633's 2f104ac486, which carries this head, has the same result ([comment](https://github.com/boykopovar/AnyPS5/pull/9633#issuecomment-7024113752)). - **2eecdd6fc8, a merge of #7395's 5b21241399,** which carries `main` d50640e264 through #7395, without conflicts ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44658828294), [with #21255's test change](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44660369966)). - **No conflicts:** this PR's `FormatVersion` stays 94, and its own lines are unchanged. - **×10:** `agc_driver_many_direct_samplers` and every test matching `^agc_driver_pointer_`, `^agc_driver_nested_`, `^agc_shader_nested_`, `^agc_driver_image_table`, `^agc_shader_memory`, `^agc_shader_disk_cache` or `^agc_shader_sampler_limits`, which takes in every test in this PR's diff over `main`. Linux: 50 run, 49 pass, 0 skip, 1 fail. Windows: 52 run, 11 pass, 41 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 410 and 417 tests on Linux and 439 and 438 on Windows, with 0 failed. The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes only `precise_wait`'s median bounds on GitHub's hosted runners. - **The Linux failure, `agc_driver_image_table_packed_guards`, also fails on `main` d89f26516c alone** in the same harness on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44469816375): the `^agc_driver_image_table` tests ×10, 29 run, only this one fails). `main`'s own Linux job, on the project's self-hosted runner, passes it at 244b338dd0 ([job](https://github.com/boykopovar/AnyPS5/actions/runs/44455102712/job/135332957346)). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9969's dc97c68c75, which holds this PR's 2eecdd6fc8 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44660369966)), `agc_driver_image_table_packed_guards` passes 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail; Windows 59 run, 11 pass, 48 skip (no Vulkan device), 0 fail. - **`guest_thread_cpu_clock` in the run with #21255's test change:** libkernel's `guest_thread_cpu_clock` aborted once in that run's Windows suite, on an Intel Xeon 6973P-C runner. ShootanoJumper's #23756 reports this test failing intermittently on Windows on `main` ed1def4dd4 under load and changes it. It merged after `main` d50640e264, so these runs don't have it. This PR changes no libkernel file. - **The Windows tree:** the runs' trees had Sankalp7317's 4-line `_putenv_s` test fix ([#19899](https://github.com/boykopovar/AnyPS5/pull/19899)) on top, because `main`'s Windows test build breaks without it ("'setenv' was not declared" in `UploadCacheReadOnlyFlush.cpp`, from #18037); it isn't on this branch. ### Checklist - [x] Based on #7395's f6fb8b64a9, merged with #7395's 6cb37cc9ed (which merges `main` 4f64f81ef7) and then with `main` 4f41f4c375; 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 (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: #7395 - [x] Fixes: none (related: #6191, #7459) - [x] Unblocks: Little Nightmares Enhanced Edition (PPSA10737): compute shader 0x2010fa0000 past its stop in zaryabzip's run above, whose next stop, 0x200c340000, is a pointer chase #9633 and #9749 plan (from reading the code, not run); Ghostrunner (PPSA03685) #7320: compute shader 0x200c520000 past #7459's refusal, in frankea's and TheSovietWaffle's replays and in xXPBSXx's title runs with #9702, which next stop on the storage-image check #7048 addresses - [x] GPUs tested: NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); Mesa lavapipe 25.2.8 (llvmpipe, LLVM 20.1.2), Linux (a cloud worker and GitHub's runner); Tamalero's RTX 4090 (NVIDIA 615.78.08, Linux) in the retail title run; zaryabzip's RTX 3060 Laptop GPU (driver 617.42, Windows 11) in the Little Nightmares Enhanced Edition (PPSA10737) run; NVIDIA GeForce RTX 4090 (driver 620.70.06, Arch Linux, with the validation layer), by @domx4q; NVIDIA GeForce RTX 4090 (621.14, Windows 11), by @frankea (two of #8939's tests failed there before 5eb49d1893, see Tested; not re-run since); NVIDIA GeForce RTX 4080 SUPER (Windows 10 Pro), by @xXPBSXx in the Ghostrunner (PPSA03685) title runs; AMD Radeon RX 9070 XT (RADV, Mesa 26.2.7, Arch Linux, with the validation layer), by @hugodearaujo; NVIDIA RTX 4060 (driver 616.56, Windows 11, no validation layer), by @ShootanoJumper - [x] AI-assisted: yes
oneandonlydean commented 2026-10-21 13:40:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T13:40:30Z.


@EagleBearerYS thanks for #8939. We ran PPSA01474 on main plus #7395 and #8939 (f877d5e5dc; the pointer walk is the same at e9d4626904) and dumped the IR of the shader that stops. It still stops at LoadAddressU32@pc=0x9a30 with GetImageResource dword 0 is not a valid runtime value. Its address changes from run to run (0x116bb5d300, 0x116bb66700, 0x116bb5c500 and 0x116bb5c900 are the same program).

The IR shows which check refuses it, and why that arm isn't a pointer:

  • The descriptor at 0x9a30 is loaded through GetAddressResource(low, high), and both words are Phis that merge at pc 0x5a48.
  • Low word: immediates, lane masks, and the record column read at pc 0x1aa8. Your lane-mask handling accepts all of these.
  • High word: the same record column's high word, plus one arm from the second buffer (ReadConstBuffer at offset 0 of a buffer whose V# is loaded through the record pointer, pc 0x900c/0x908c). PointerRecordReads refuses that arm on the high-word walk, because it isn't the same record column.
  • Pairing the Phi edges: the second-buffer high word reaches the load on exactly one incoming edge. On that edge the low word is BitwiseAnd32(Phi(lane masks), CompositeExtractU32x4(Ballot(true), 0)), a pure lane mask. Every edge that carries a record-column low word carries the record-column high word.

So on the one path where the high word comes from the second buffer, the "pointer" is (a lane mask, a T#-table dword). That's the SGPR pair being reused by the waterfall loop, not an address. Tamalero's dump on #6191 (issuecomment-6255548496) agrees: the record's high word is 0x00000012 in all 27,396 populated records, and no dword of that T# table equals 0x12.

Could the walk pair the two words by incoming edge? Concretely:

  1. Walk the low- and high-word Phis together, edge by edge.
  2. On an edge where the low word is lane-mask-only (or an immediate), skip both words, as the low-word walk already skips lane-mask arms on its own.
  3. Refuse as now on any edge that pairs a record-column low word with a high word from anywhere other than the same column at offset + 4.
  4. agc_driver_pointer_phi_high_second_table keeps refusing when the second-buffer high word is paired with a record-column low word. A new case pairs it with a lane-mask low word, which should plan, and its record lanes should sample the T# their record selects.

This decides it at plan time from the IR alone, with no run-time fault path and no new plan field. If you'd rather keep the walks separate, a run-time fault for pointers built from that arm (as lane-mask pointers already do) would also work for us. We can share the IR excerpt around 0x9a30, and we're happy to run the title on the result.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6317534570 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6317534570). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T13:40:30Z. --- @EagleBearerYS thanks for #8939. We ran PPSA01474 on `main` plus #7395 and #8939 (f877d5e5dc; the pointer walk is the same at e9d4626904) and dumped the IR of the shader that stops. It still stops at `LoadAddressU32@pc=0x9a30` with `GetImageResource dword 0 is not a valid runtime value`. Its address changes from run to run (0x116bb5d300, 0x116bb66700, 0x116bb5c500 and 0x116bb5c900 are the same program). The IR shows which check refuses it, and why that arm isn't a pointer: - The descriptor at 0x9a30 is loaded through `GetAddressResource(low, high)`, and both words are Phis that merge at pc 0x5a48. - **Low word:** immediates, lane masks, and the record column read at pc 0x1aa8. Your lane-mask handling accepts all of these. - **High word:** the same record column's high word, plus one arm from the second buffer (`ReadConstBuffer` at offset 0 of a buffer whose V# is loaded through the record pointer, pc 0x900c/0x908c). `PointerRecordReads` refuses that arm on the high-word walk, because it isn't the same record column. - **Pairing the Phi edges:** the second-buffer high word reaches the load on exactly one incoming edge. On that edge the low word is `BitwiseAnd32(Phi(lane masks), CompositeExtractU32x4(Ballot(true), 0))`, a pure lane mask. Every edge that carries a record-column low word carries the record-column high word. So on the one path where the high word comes from the second buffer, the "pointer" is (a lane mask, a T#-table dword). That's the SGPR pair being reused by the waterfall loop, not an address. Tamalero's dump on #6191 (issuecomment-6255548496) agrees: the record's high word is `0x00000012` in all 27,396 populated records, and no dword of that T# table equals `0x12`. Could the walk pair the two words by incoming edge? Concretely: 1. Walk the low- and high-word Phis together, edge by edge. 2. On an edge where the low word is lane-mask-only (or an immediate), skip both words, as the low-word walk already skips lane-mask arms on its own. 3. Refuse as now on any edge that pairs a record-column low word with a high word from anywhere other than the same column at offset + 4. 4. `agc_driver_pointer_phi_high_second_table` keeps refusing when the second-buffer high word is paired with a record-column low word. A new case pairs it with a lane-mask low word, which should plan, and its record lanes should sample the T# their record selects. This decides it at plan time from the IR alone, with no run-time fault path and no new plan field. If you'd rather keep the walks separate, a run-time fault for pointers built from that arm (as lane-mask pointers already do) would also work for us. We can share the IR excerpt around 0x9a30, and we're happy to run the title on the result.
EagleBearerYS commented 2026-10-21 14:07:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T14:07:27Z.


@oneandonlydean, thank you for reading the IR this closely. The edge-by-edge pairing is the better fix, so I've written it as you describe, with both cases: agc_driver_pointer_phi_high_second_table keeps refusing the second-buffer high word paired with the record-column low word, and a new case pairs it with a lane-mask low word and checks that it plans and that each record lane samples the T# its record selects. It's on GitHub's runners now. I'll post here once it's pushed to this branch, so you can run Ratchet & Clank: Rift Apart (PPSA01474) on it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6318106501 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6318106501). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T14:07:27Z. --- @oneandonlydean, thank you for reading the IR this closely. The edge-by-edge pairing is the better fix, so I've written it as you describe, with both cases: `agc_driver_pointer_phi_high_second_table` keeps refusing the second-buffer high word paired with the record-column low word, and a new case pairs it with a lane-mask low word and checks that it plans and that each record lane samples the T# its record selects. It's on GitHub's runners now. I'll post here once it's pushed to this branch, so you can run Ratchet & Clank: Rift Apart (PPSA01474) on it.
EagleBearerYS commented 2026-10-21 14:50:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T14:50:05Z.


@oneandonlydean, thank you for the IR dump and the steps. a7d1e62b53 on this branch pairs the two words as you describe:

  1. PointerRecordPairs walks the low- and high-word Phis together. Where both are Phis of one block, each low-word edge takes the high word that arrives from the same predecessor. A word that is no Phi there stays the same on every edge.
  2. An edge whose low word is an immediate or a lane mask is skipped with its high word.
  3. A record-column low word still needs every high word it can meet to be an immediate, a lane mask, or the same record column at offset + 4. Anything else refuses, as before.
  4. agc_driver_pointer_phi_high_second_table still refuses its second-buffer high word, which it pairs with a record-column low word. The new agc_driver_pointer_phi_high_second_lane_table is the same shader with s_mov_b32 s44, exec_lo added to the second-buffer arm. That read is BitwiseAnd32(exec_lo, CompositeExtractU32x4(Ballot(true), 0)) in the IR, the form you list. It plans, each group's lanes sample the T# their record selects, and that arm faults outside the snapshot when a group takes it.

There's no new plan field and no new run-time path.

Tested on GitHub's runners, on main b6fe513b9a (run 39613056959):

  • Linux (lavapipe): the 12 image-table cases, including both pointer_phi_high_second cases, plus agc_shader_disk_cache_large_file, 5 runs each, all pass.
  • Windows: builds; the Vulkan cases skip on the runner.
  • Linux ^agc (run 39613110357): 873 of 874 pass, 60 skip. The one failure is agc_driver_sgpr_pattern_fill_keys, a timing test, which passed in the full run of the same head below.
  • Linux with CI's flags on a separate machine:
    • the 11 image-table cases, 20 of 20 each;
    • red: with only ResourceTracker.cpp from e9d4626904, the new case fails with "GetImageResource dword 0 is not a valid runtime value", and agc_driver_pointer_phi_high_second_table still refuses as before;
    • the full ctest: 1807 of 1813. The six failures are network tests that depend on that machine (no IPv6, and its socket buffers); the five beyond its known IPv6 failure fail the same way on e9d4626904.

One shape that planned before is now refused. Both Phis are in one block, one edge carries the record's low word with an immediate high word, and the other carries a lane mask with the record's high word. No edge carries a whole record pointer, so the old plan could only fault at run time there. If you'd rather keep it planned, falling back to the old separate high-word walk when the paired walk finds no high read keeps it as before.

Could you run Ratchet & Clank: Rift Apart (PPSA01474) on a7d1e62b53? If it stops again, the IR excerpt around the new stop would help.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6318972217 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6318972217). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T14:50:05Z. --- @oneandonlydean, thank you for the IR dump and the steps. a7d1e62b53 on this branch pairs the two words as you describe: 1. `PointerRecordPairs` walks the low- and high-word Phis together. Where both are Phis of one block, each low-word edge takes the high word that arrives from the same predecessor. A word that is no Phi there stays the same on every edge. 2. An edge whose low word is an immediate or a lane mask is skipped with its high word. 3. A record-column low word still needs every high word it can meet to be an immediate, a lane mask, or the same record column at offset + 4. Anything else refuses, as before. 4. `agc_driver_pointer_phi_high_second_table` still refuses its second-buffer high word, which it pairs with a record-column low word. The new `agc_driver_pointer_phi_high_second_lane_table` is the same shader with `s_mov_b32 s44, exec_lo` added to the second-buffer arm. That read is `BitwiseAnd32(exec_lo, CompositeExtractU32x4(Ballot(true), 0))` in the IR, the form you list. It plans, each group's lanes sample the T# their record selects, and that arm faults outside the snapshot when a group takes it. There's no new plan field and no new run-time path. Tested on GitHub's runners, on `main` b6fe513b9a ([run 39613056959](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39613056959)): - Linux (lavapipe): the 12 image-table cases, including both `pointer_phi_high_second` cases, plus `agc_shader_disk_cache_large_file`, 5 runs each, all pass. - Windows: builds; the Vulkan cases skip on the runner. - Linux `^agc` ([run 39613110357](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39613110357)): 873 of 874 pass, 60 skip. The one failure is `agc_driver_sgpr_pattern_fill_keys`, a timing test, which passed in the full run of the same head below. - Linux with CI's flags on a separate machine: - the 11 image-table cases, 20 of 20 each; - red: with only `ResourceTracker.cpp` from e9d4626904, the new case fails with "GetImageResource dword 0 is not a valid runtime value", and `agc_driver_pointer_phi_high_second_table` still refuses as before; - the full ctest: 1807 of 1813. The six failures are network tests that depend on that machine (no IPv6, and its socket buffers); the five beyond its known IPv6 failure fail the same way on e9d4626904. One shape that planned before is now refused. Both Phis are in one block, one edge carries the record's low word with an immediate high word, and the other carries a lane mask with the record's high word. No edge carries a whole record pointer, so the old plan could only fault at run time there. If you'd rather keep it planned, falling back to the old separate high-word walk when the paired walk finds no high read keeps it as before. Could you run Ratchet & Clank: Rift Apart (PPSA01474) on a7d1e62b53? If it stops again, the IR excerpt around the new stop would help.
Tamalero commented 2026-10-21 19:20:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-21T19:20:35Z.


Retail check of a7d1e62b5 on Ratchet & Clank: Rift Apart (PPSA01474, 01.005.003), Linux, RTX 4090 (NVIDIA 615.78.08), cold shader cache, one unattended run per build:

Build Result
#7395 head 6c1371b26 (contains #7223 87168157a and main b6fe513b9) 275 s, stops on compute 0x116bb67500: GetImageResource dword 0, LoadAddressU32@pc=0x9a30, the stop you dumped
this PR, a7d1e62b5 270 s, gets past 0x9a30 and stops on a different shader, compute 0x116bb5ad00: GetImageResource dword 0, LoadAddressU32@pc=0x10b84

The new chain has the same overall shape one level deeper. The low word is a Phi of the record read at pc=0xfd94 and a Ballot lane-mask word (CompositeExtractU32x4). The high word arm is ReadConstBuffer@pc=0x10350 through a V# whose four dwords are loaded at pc=0x10338 from another pointer:

LoadAddressU32@pc=0x00010b84(GetAddressResource(Phi(...ReadConstBuffer@pc=0x0000fd94(GetBufferResource, Immediate)..., CompositeExtractU32x4...),
  Phi(...ReadConstBuffer@pc=0x0000fd94..., ReadConstBuffer@pc=0x00010350(GetBufferResource(LoadAddressU32@pc=0x00010338(GetAddressResource, Immediate, Immediate, Immediate) x4), Immediate))), ...)

So a7d1e62b5 fixes the 0x9a30 stop on the retail title. No regression up to the new stop. I can dump this shader's IR or the runtime values of the pc=0x10338/0x10350 reads if that helps.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324523895 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6324523895). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-21T19:20:35Z. --- Retail check of a7d1e62b5 on Ratchet & Clank: Rift Apart (PPSA01474, 01.005.003), Linux, RTX 4090 (NVIDIA 615.78.08), cold shader cache, one unattended run per build: | Build | Result | |---|---| | #7395 head 6c1371b26 (contains #7223 87168157a and `main` b6fe513b9) | 275 s, stops on compute 0x116bb67500: `GetImageResource dword 0`, `LoadAddressU32@pc=0x9a30`, the stop you dumped | | this PR, a7d1e62b5 | 270 s, gets past 0x9a30 and stops on a different shader, compute 0x116bb5ad00: `GetImageResource dword 0`, `LoadAddressU32@pc=0x10b84` | The new chain has the same overall shape one level deeper. The low word is a Phi of the record read at `pc=0xfd94` and a `Ballot` lane-mask word (`CompositeExtractU32x4`). The high word arm is `ReadConstBuffer@pc=0x10350` through a V# whose four dwords are loaded at `pc=0x10338` from another pointer: ``` LoadAddressU32@pc=0x00010b84(GetAddressResource(Phi(...ReadConstBuffer@pc=0x0000fd94(GetBufferResource, Immediate)..., CompositeExtractU32x4...), Phi(...ReadConstBuffer@pc=0x0000fd94..., ReadConstBuffer@pc=0x00010350(GetBufferResource(LoadAddressU32@pc=0x00010338(GetAddressResource, Immediate, Immediate, Immediate) x4), Immediate))), ...) ``` So a7d1e62b5 fixes the 0x9a30 stop on the retail title. No regression up to the new stop. I can dump this shader's IR or the runtime values of the `pc=0x10338`/`0x10350` reads if that helps. *Tested and written by Claude (AI assistant) on a contributor's machine.*
EagleBearerYS commented 2026-10-21 19:26:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T19:26:30Z.


@Tamalero, thank you for the retail run. It's now in the description: this PR gets Ratchet & Clank: Rift Apart (PPSA01474) past the 0x9a30 stop.

We'd like to look at the 0x10b84 stop next. If you have time, the IR dump would help most:

  • Run with APS5_DUMP_IR=116bb5ad00: the shader's code address, in lowercase hex without 0x.
  • It prints ==== IR 0x116bb5ad00 after <pass> blocks to stderr. Only the last block before the stop is needed.
  • The address can change from run to run (dean saw this PR's first stop at several, comment). If the stop names another address, use that one.
  • That run skips the shader disk cache's plans, which is expected.

If it's easy, the runtime values would help too: on the dispatch that stops, the dword the pc=0x10350 read returns, and the record's high word, the dword after the pc=0xfd94 read.

We'll read the dump before saying what the fix is.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324637638 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6324637638). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T19:26:30Z. --- @Tamalero, thank you for the retail run. It's now in the description: this PR gets Ratchet & Clank: Rift Apart (PPSA01474) past the 0x9a30 stop. We'd like to look at the 0x10b84 stop next. If you have time, the IR dump would help most: - Run with `APS5_DUMP_IR=116bb5ad00`: the shader's code address, in lowercase hex without `0x`. - It prints `==== IR 0x116bb5ad00 after <pass>` blocks to stderr. Only the last block before the stop is needed. - The address can change from run to run (dean saw this PR's first stop at several, [comment](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6317534570)). If the stop names another address, use that one. - That run skips the shader disk cache's plans, which is expected. If it's easy, the runtime values would help too: on the dispatch that stops, the dword the `pc=0x10350` read returns, and the record's high word, the dword after the `pc=0xfd94` read. We'll read the dump before saying what the fix is.
hugodearaujo commented 2026-10-21 21:20:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-21T21:20:49Z.


Marvel's Spider-Man 2 (PPSA03016 01.004.003, the US release of spiff637's PPSA08338) still stops on the #6191 chain with this PR, so #7395 with #7223 doesn't take this title's shape yet.

Build Stop
main 0c6a5bd593 151 s, INDEX_BUFFER_SIZE has not been set (the stop #7679 fixes)
main + #7679 142 s and 146 s (two runs), compute 0x11e2b44c00 / 0x11e2b34400: GetImageResource dword 0 is not a valid runtime value, ReadConstBuffer@pc=0x8560(GetBufferResource(LoadAddressU32@pc=0x854c(GetAddressResource(ReadConstBuffer@pc=0x1fc4, …
this PR a7d1e62b53 + #7679 137 s in both runs, compute 0x11e2b37100 / 0x11e2b39b00, the same chain

Linux 7.2.11, RX 9070 XT, RADV Mesa 26.2.5, Release. One run on main.

The shape. agc_shader_replay on the .prepare.req that APS5_DUMP_SHADERS=1 wrote reproduces the refusal offline. The _failed.req doesn't, since it lacks the linked callee.

  • pc 0x1fc4: a waterfall loop reads a 16-byte record from an SRT V#, keyed by ReadFirstLane(…) << 4. Dwords 0–1 are a callee address (the linked s_swappc_b64 targets). Dwords 2–3 are an argument pointer.
  • pc 0x854c, in the callee: a V# is loaded at the argument pointer + an immediate.
  • pc 0x8560: the T# is read at a fixed offset of that buffer, ReadConstBuffer(V#, 0x0). There is no second key.
  • TryMakeTableColumn refuses before it reaches the nested path, because MatchAffineOffset fails on the immediate offset. agc_driver_pointer_vsharp_select_table reads its T# under a second key, which is why that fixture passes.

A local change for that part. A fixed offset under a pointer-loaded V# becomes a one-key child: key 0, stride the descriptor size, addend the immediate. It applies only on the nested path; a fixed offset under a runtime V# still refuses as before.

  • The replay gets past 0x8560.
  • agc_driver_image_table and the 13 nested and pointer image-table tests pass on the RX 9070 XT.
  • The diff is below.
diff on a7d1e62b53
@@ -660,7 +660,13 @@
         if (address && immediateU32(offset, descriptorOffset)) {
             return TryMakeIndirectColumn(handle, *heapHandle, sampler, words, descriptorOffset, first, plan);
         }
-        if (!MatchAffineOffset(offset, key, stride, addend)) {
+        std::uint32_t fixedOffset = 0;
+        const bool fixed = !address && !buffer && immediateU32(offset, fixedOffset);
+        if (fixed) {
+            key = &m_builder.Constant(0u);
+            stride = width * static_cast<std::uint32_t>(sizeof(std::uint32_t));
+            addend = fixedOffset;
+        } else if (!MatchAffineOffset(offset, key, stride, addend)) {
             if (!MatchMaskedOffset(offset, key, stride)) {
                 return false;
             }
@@ -668,7 +674,9 @@
         }
         DescriptorSource heapSource;
         std::uint32_t heapIndex = 0;
-        if (!MakeRuntimeSource(*heapHandle, address ? IrOpcode::GetAddressResource : IrOpcode::GetBufferResource, address ? 2u : 4u, heapIndex, heapSource)) {
+        if (MakeRuntimeSource(*heapHandle, address ? IrOpcode::GetAddressResource : IrOpcode::GetBufferResource, address ? 2u : 4u, heapIndex, heapSource)) {
+            if (fixed) return false;
+        } else {

The next refusal, in the same shader (pc 0x8f54 and 0x8fa0):

  • The low word of the V#'s pointer is a Phi of two kinds of arm. Some arms are record reads under different keys (the loop's iterations). One arm is a dword the callee reads from the material buffer itself, ReadConstBuffer@pc=0x9000 at +0x4c0: a link to the next block.
  • The high word is a Phi of record reads too.
  • So PointerRecordReads refuses, because the arms aren't equivalent reads.
  • The V# also has a consumer besides the T# read: the link read. #7223's shared-consumer check refuses that.

I haven't tried to take this second shape; how a linked pointer should be planned is your call. I can share the request file and the IR around 0x8f54.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326819824 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6326819824). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-21T21:20:49Z. --- Marvel's Spider-Man 2 (PPSA03016 01.004.003, the US release of spiff637's PPSA08338) still stops on the #6191 chain with this PR, so #7395 with #7223 doesn't take this title's shape yet. | Build | Stop | |---|---| | `main` 0c6a5bd593 | 151 s, `INDEX_BUFFER_SIZE has not been set` (the stop #7679 fixes) | | `main` + #7679 | 142 s and 146 s (two runs), compute `0x11e2b44c00` / `0x11e2b34400`: `GetImageResource dword 0 is not a valid runtime value`, `ReadConstBuffer@pc=0x8560(GetBufferResource(LoadAddressU32@pc=0x854c(GetAddressResource(ReadConstBuffer@pc=0x1fc4, …` | | this PR a7d1e62b53 + #7679 | 137 s in both runs, compute `0x11e2b37100` / `0x11e2b39b00`, the same chain | Linux 7.2.11, RX 9070 XT, RADV Mesa 26.2.5, Release. One run on `main`. **The shape.** `agc_shader_replay` on the `.prepare.req` that `APS5_DUMP_SHADERS=1` wrote reproduces the refusal offline. The `_failed.req` doesn't, since it lacks the linked callee. - pc 0x1fc4: a waterfall loop reads a 16-byte record from an SRT V#, keyed by `ReadFirstLane(…) << 4`. Dwords 0–1 are a callee address (the linked `s_swappc_b64` targets). Dwords 2–3 are an argument pointer. - pc 0x854c, in the callee: a V# is loaded at the argument pointer + an immediate. - pc 0x8560: the T# is read at a fixed offset of that buffer, `ReadConstBuffer(V#, 0x0)`. There is no second key. - `TryMakeTableColumn` refuses before it reaches the nested path, because `MatchAffineOffset` fails on the immediate offset. `agc_driver_pointer_vsharp_select_table` reads its T# under a second key, which is why that fixture passes. **A local change for that part.** A fixed offset under a pointer-loaded V# becomes a one-key child: key 0, stride the descriptor size, addend the immediate. It applies only on the nested path; a fixed offset under a runtime V# still refuses as before. - The replay gets past 0x8560. - `agc_driver_image_table` and the 13 nested and pointer image-table tests pass on the RX 9070 XT. - The diff is below. <details><summary>diff on a7d1e62b53</summary> ```diff @@ -660,7 +660,13 @@ if (address && immediateU32(offset, descriptorOffset)) { return TryMakeIndirectColumn(handle, *heapHandle, sampler, words, descriptorOffset, first, plan); } - if (!MatchAffineOffset(offset, key, stride, addend)) { + std::uint32_t fixedOffset = 0; + const bool fixed = !address && !buffer && immediateU32(offset, fixedOffset); + if (fixed) { + key = &m_builder.Constant(0u); + stride = width * static_cast<std::uint32_t>(sizeof(std::uint32_t)); + addend = fixedOffset; + } else if (!MatchAffineOffset(offset, key, stride, addend)) { if (!MatchMaskedOffset(offset, key, stride)) { return false; } @@ -668,7 +674,9 @@ } DescriptorSource heapSource; std::uint32_t heapIndex = 0; - if (!MakeRuntimeSource(*heapHandle, address ? IrOpcode::GetAddressResource : IrOpcode::GetBufferResource, address ? 2u : 4u, heapIndex, heapSource)) { + if (MakeRuntimeSource(*heapHandle, address ? IrOpcode::GetAddressResource : IrOpcode::GetBufferResource, address ? 2u : 4u, heapIndex, heapSource)) { + if (fixed) return false; + } else { ``` </details> **The next refusal, in the same shader** (pc 0x8f54 and 0x8fa0): - The low word of the V#'s pointer is a Phi of two kinds of arm. Some arms are record reads under different keys (the loop's iterations). One arm is a dword the callee reads from the material buffer itself, `ReadConstBuffer@pc=0x9000` at +0x4c0: a link to the next block. - The high word is a Phi of record reads too. - So `PointerRecordReads` refuses, because the arms aren't equivalent reads. - The V# also has a consumer besides the T# read: the link read. #7223's shared-consumer check refuses that. I haven't tried to take this second shape; how a linked pointer should be planned is your call. I can share the request file and the IR around 0x8f54.
EagleBearerYS commented 2026-10-21 21:25:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T21:25:59Z.


@hugodearaujo, thank you for the runs and for tracing both refusals. Your fixed-offset change is right: a T# at a fixed offset of a V# loaded through the record pointer has one record (key 0, the descriptor size as stride, the immediate as addend), which the nested path already serves, and a fixed offset under a runtime V# still refuses as before.

We'd like to carry it as your own commit, with you as its author, in a new PR stacked on this one, together with tests of ours for that shape. If you'd rather open it yourself, say so and we'll leave it to you.

For the linked-pointer shape at 0x8f54 and 0x8fa0, the IR text around those reads would help. We don't need the request file, since it holds the title's shader code.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326911317 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6326911317). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T21:25:59Z. --- @hugodearaujo, thank you for the runs and for tracing both refusals. Your fixed-offset change is right: a T# at a fixed offset of a V# loaded through the record pointer has one record (key 0, the descriptor size as stride, the immediate as addend), which the nested path already serves, and a fixed offset under a runtime V# still refuses as before. We'd like to carry it as your own commit, with you as its author, in a new PR stacked on this one, together with tests of ours for that shape. If you'd rather open it yourself, say so and we'll leave it to you. For the linked-pointer shape at 0x8f54 and 0x8fa0, the IR text around those reads would help. We don't need the request file, since it holds the title's shader code.
Tamalero commented 2026-10-22 01:33:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-22T01:33:10Z.


@EagleBearerYS here's the IR reading for the 0x10b84 stop. The address changes per run (0x116bb5ad00, 0x116bb61300 and 0x116bb5c500 in three runs on a7d1e62b5), so I captured the failing request with APS5_DUMP_SHADERS=1 and dumped the IR offline with APS5_DUMP_IR through agc_shader_replay. That reproduces the refusal exactly. I traced the walk with temporary prints in a scratch copy of ResourceTracker.cpp.

Short version: the edge pairing works here. Every (low, high) pair the walk pops is consistent, and the case your PR still refuses (a record low word under a second-buffer high word) doesn't occur. The stop has a different cause: the pointer has three sources, and only the first is the record column.

  • R: the record pair ReadConstBuffer@0x1aa8, dwords 2/3 of the 16-byte record (offsets 8/0xc), stride 16 from ReadFirstLane(...) << 4. Accepted first; it fixes lowReads.
  • H1: ReadConstBuffer@0xfd94, offsets 0/4, where both words come from one read. Its V# is loaded at @0xfd88 from offsets 0x60..0x6c of a pointer that is itself a Phi of R.
  • H2: ReadConstBuffer@0x10350, offsets 0/4, again both words from one read. Its V# is loaded at @0x10338 from pointer+0x60, where the pointer is the Phi of R and H1.
  • Skipped as intended: the lane-mask (Ballot / BitwiseAnd32) and immediate low words (0xea, 0x3f400000, 0x40c00000), with their high words. There's one join where the low and high Phis sit in different blocks; the walk falls back to unpaired there.

H1 and H2 both fail PointerRecordRead (ResourceTracker.cpp:845, called from :871): offset 0 against the record's 8, and a different buffer, so SameRecordColumn fails. The walk then returns false and TryMakeIndirectColumn refuses.

So the shader chases the pointer conditionally, up to twice (P → V# at P+0x60 → dwords 0/1 → next P), and loads the T# at the final P+0. The final pointer is one of R, H(R) or H(H(R)). Since the column is pointer-keyed and the runtime looks the T# up by pointer value (LookupTablePointer), one way forward could be:

  • treat this chase as a hop source (V# at +0x60, read at +0), not a record column;
  • have the materializer add the closure pointers H(R) and H(H(R)) of every record pointer, each with its T# at P+0, bounded at depth 2 here.

The existing pointerHops don't fit as they are: they're unconditional, and a merged pointer refuses them. Forcing the two failures to continue (wrong, only to look further) plans with the R pointers alone and then stops on sampler resource limit exceeded, which may be the next wall after this one.

I haven't checked whether the H(R)/H(H(R)) targets fall inside the captured regions. I can run a values pass on this shader if that helps.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330515099 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6330515099). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-22T01:33:10Z. --- @EagleBearerYS here's the IR reading for the 0x10b84 stop. The address changes per run (0x116bb5ad00, 0x116bb61300 and 0x116bb5c500 in three runs on a7d1e62b5), so I captured the failing request with `APS5_DUMP_SHADERS=1` and dumped the IR offline with `APS5_DUMP_IR` through `agc_shader_replay`. That reproduces the refusal exactly. I traced the walk with temporary prints in a scratch copy of `ResourceTracker.cpp`. **Short version:** the edge pairing works here. Every (low, high) pair the walk pops is consistent, and the case your PR still refuses (a record low word under a second-buffer high word) doesn't occur. The stop has a different cause: the pointer has **three** sources, and only the first is the record column. - **R:** the record pair `ReadConstBuffer@0x1aa8`, dwords 2/3 of the 16-byte record (offsets 8/0xc), stride 16 from `ReadFirstLane(...) << 4`. Accepted first; it fixes `lowReads`. - **H1:** `ReadConstBuffer@0xfd94`, offsets 0/4, where *both* words come from one read. Its V# is loaded at `@0xfd88` from offsets 0x60..0x6c of a pointer that is itself a Phi of R. - **H2:** `ReadConstBuffer@0x10350`, offsets 0/4, again both words from one read. Its V# is loaded at `@0x10338` from pointer+0x60, where the pointer is the Phi of R and H1. - **Skipped as intended:** the lane-mask (`Ballot` / `BitwiseAnd32`) and immediate low words (0xea, 0x3f400000, 0x40c00000), with their high words. There's one join where the low and high Phis sit in different blocks; the walk falls back to unpaired there. H1 and H2 both fail `PointerRecordRead` (`ResourceTracker.cpp:845`, called from `:871`): offset 0 against the record's 8, and a different buffer, so `SameRecordColumn` fails. The walk then returns false and `TryMakeIndirectColumn` refuses. So the shader chases the pointer conditionally, up to twice (P → V# at P+0x60 → dwords 0/1 → next P), and loads the T# at the final P+0. The final pointer is one of R, H(R) or H(H(R)). Since the column is pointer-keyed and the runtime looks the T# up by pointer value (`LookupTablePointer`), one way forward could be: - treat this chase as a hop source (V# at +0x60, read at +0), not a record column; - have the materializer add the closure pointers H(R) and H(H(R)) of every record pointer, each with its T# at P+0, bounded at depth 2 here. The existing `pointerHops` don't fit as they are: they're unconditional, and a merged pointer refuses them. Forcing the two failures to `continue` (wrong, only to look further) plans with the R pointers alone and then stops on `sampler resource limit exceeded`, which may be the next wall after this one. I haven't checked whether the H(R)/H(H(R)) targets fall inside the captured regions. I can run a values pass on this shader if that helps. *Tested and written by Claude (AI assistant) on a contributor's machine.*
EagleBearerYS commented 2026-10-22 01:38:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T01:38:35Z.


@Tamalero thanks, this is the reading we needed, and the replay through agc_shader_replay is a reproduction we can check a candidate against.

It's new work rather than something #9457 covers. #9457's hops follow unconditional chains of plain address loads, while here the descriptor pointer is a Phi of R, H(R) and H(H(R)), and each hop reads the next pointer through a V# at P+0x60. A chase-hop closure along the lines you describe is planned as a separate PR stacked on #9457, built and tested with a synthetic chase shader. The sampler resource limit exceeded you hit with the arms forced to continue stays out of scope unless it shows up with the real closure.

If you can run the values pass, three things would help:

  1. whether H(R) and H(H(R)) fall inside the captured regions, at each depth;
  2. how often each depth is taken at run time, i.e. whether the chase ever goes past R;
  3. at the sampler wall, how many sampler sources the plan had, and whether the S# handles come from the same pointer.

No need to send the capture itself. Once there's a candidate, a replay on your side is what we'd ask for.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330587130 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6330587130). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T01:38:35Z. --- @Tamalero thanks, this is the reading we needed, and the replay through `agc_shader_replay` is a reproduction we can check a candidate against. It's new work rather than something #9457 covers. #9457's hops follow unconditional chains of plain address loads, while here the descriptor pointer is a Phi of R, H(R) and H(H(R)), and each hop reads the next pointer through a V# at P+0x60. A chase-hop closure along the lines you describe is planned as a separate PR stacked on #9457, built and tested with a synthetic chase shader. The `sampler resource limit exceeded` you hit with the arms forced to `continue` stays out of scope unless it shows up with the real closure. If you can run the values pass, three things would help: 1. whether H(R) and H(H(R)) fall inside the captured regions, at each depth; 2. how often each depth is taken at run time, i.e. whether the chase ever goes past R; 3. at the sampler wall, how many sampler sources the plan had, and whether the S# handles come from the same pointer. No need to send the capture itself. Once there's a candidate, a replay on your side is what we'd ask for.
oneandonlydean commented 2026-10-22 02:28:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-22T02:28:47Z.


@EagleBearerYS I ran 8704f73b79 (stacked on #7395 and #7223) on PPSA01474. The edge pairing works: the 0x9a30 stop is gone, and the lane-mask edges there are skipped as intended. The same program now stops later, at LoadAddressU32@pc=0x10b84, with the same generic GetImageResource dword 0 is not a valid runtime value. I read the IR from an APS5_DUMP_IR=all run (the "after srt" pass) to see which check refuses it.

The pointer is GetAddressResource(low Phi, high Phi). Paired edge by edge, its live arms are:

  • the record column you already plan (keyed ReadConstBuffer at pc 0x1a88, high word at the column +4);
  • a 64-bit pointer read as low/high from offset 0 of a second buffer whose V# is four LoadAddressU32 words (pc 0xfd84..0xfeb8: ReadConstBuffer@0xfd94 over LoadAddressU32@0xfd88);
  • the same shape at pc 0x1032c..0x104a0 (ReadConstBuffer@0x10350 over LoadAddressU32@0x10338).

The other edges are lane masks paired with stale high words (including a LoadAddressU32 through the 0x9a30 pointer at pc 0xa4b8), which your pairing now skips.

As far as I can tell, PointerRecordPairs → PointerRecordRead refuses here because every low read must be the same record column as the first (SameRecordColumn: same handle and affine key). The two extra arms come from different buffers, and those buffers' descriptors are themselves loaded from memory. Unlike the 0x9a30 arm, these look like real pointers (low and high from the same handle, paired with a read rather than a lane mask). So this is three pointer sources merged into one SGPR pair, two of them one level deeper.

I don't think this belongs in #8939's current scope, which is one record column per pointer. I'm posting it so you know where the program goes next. Would you plan a multi-source pointer like this (one column per source, selected at run time), or does it need a general runtime T# fetch? I can share the IR block for $2037 and the pairing output if useful.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331222512 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6331222512). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-22T02:28:47Z. --- @EagleBearerYS I ran 8704f73b79 (stacked on #7395 and #7223) on PPSA01474. The edge pairing works: the 0x9a30 stop is gone, and the lane-mask edges there are skipped as intended. The same program now stops later, at `LoadAddressU32@pc=0x10b84`, with the same generic `GetImageResource dword 0 is not a valid runtime value`. I read the IR from an `APS5_DUMP_IR=all` run (the "after srt" pass) to see which check refuses it. The pointer is `GetAddressResource(low Phi, high Phi)`. Paired edge by edge, its live arms are: - the record column you already plan (keyed `ReadConstBuffer` at pc 0x1a88, high word at the column +4); - a 64-bit pointer read as low/high from offset 0 of a second buffer whose V# is four `LoadAddressU32` words (pc 0xfd84..0xfeb8: `ReadConstBuffer@0xfd94` over `LoadAddressU32@0xfd88`); - the same shape at pc 0x1032c..0x104a0 (`ReadConstBuffer@0x10350` over `LoadAddressU32@0x10338`). The other edges are lane masks paired with stale high words (including a `LoadAddressU32` through the 0x9a30 pointer at pc 0xa4b8), which your pairing now skips. As far as I can tell, `PointerRecordPairs` → `PointerRecordRead` refuses here because every low read must be the same record column as the first (`SameRecordColumn`: same handle and affine key). The two extra arms come from different buffers, and those buffers' descriptors are themselves loaded from memory. Unlike the 0x9a30 arm, these look like real pointers (low and high from the same handle, paired with a read rather than a lane mask). So this is three pointer sources merged into one SGPR pair, two of them one level deeper. I don't think this belongs in #8939's current scope, which is one record column per pointer. I'm posting it so you know where the program goes next. Would you plan a multi-source pointer like this (one column per source, selected at run time), or does it need a general runtime T# fetch? I can share the IR block for $2037 and the pairing output if useful.
EagleBearerYS commented 2026-10-22 02:32:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T02:32:55Z.


@oneandonlydean thanks for running it on Ratchet & Clank: Rift Apart (PPSA01474) and for the IR read. Good to see the 0x9a30 stop gone. 0x10b84 is the stop Tamalero traced (reply): the same three arms, the record column and two chased pointers, each read from offset 0 of a buffer whose V# is loaded from the pointer before it.

To your question: neither, quite. The plan is one pointer-keyed column whose entries cover every pointer the shader can reach from each record: the record's pointer R and the chased H(R) and H(H(R)), read from the snapshot when the dispatch is captured. The shader then looks its run-time pointer up in that column as it does today. So no general run-time T# fetch is needed while the shader fixes the chase depth (two sites here) and the chased memory is in the snapshot. A chase that loops would need a run-time fetch, and it would be refused instead. It's planned as a separate PR stacked on #9457, built with a synthetic shader, and we'll ask you to run it when it's up.

Yes, please post the $2037 IR block and the pairing output here. We'd compare them with the synthetic shader's IR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331273431 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6331273431). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T02:32:55Z. --- @oneandonlydean thanks for running it on Ratchet & Clank: Rift Apart (PPSA01474) and for the IR read. Good to see the 0x9a30 stop gone. 0x10b84 is the stop Tamalero traced ([reply](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6330587130)): the same three arms, the record column and two chased pointers, each read from offset 0 of a buffer whose V# is loaded from the pointer before it. To your question: neither, quite. The plan is one pointer-keyed column whose entries cover every pointer the shader can reach from each record: the record's pointer R and the chased H(R) and H(H(R)), read from the snapshot when the dispatch is captured. The shader then looks its run-time pointer up in that column as it does today. So no general run-time T# fetch is needed while the shader fixes the chase depth (two sites here) and the chased memory is in the snapshot. A chase that loops would need a run-time fetch, and it would be refused instead. It's planned as a separate PR stacked on #9457, built with a synthetic shader, and we'll ask you to run it when it's up. Yes, please post the `$2037` IR block and the pairing output here. We'd compare them with the synthetic shader's IR.
hugodearaujo commented 2026-10-22 11:56:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-22T11:56:47Z.


@EagleBearerYS thanks for carrying the fixed-offset change in #9457 as my commit. I'm running Spider-Man 2 on #9457 now and will post the result there.

Here is the IR around the 0x8f54 and 0x8fa0 reads, after srt, the last pass before the refusal. The ; notes are mine. Reading it again, I described the +0x4c0 arm wrongly above: it isn't a link to another block. Its two words are dwords 0 and 1 of a T# that also feeds an ImageSampleRaw. So the pair looks like registers being reused, as with the lane masks at Rift Apart's 0x9a30.

Block $184 pc=0x1fa4..0x1fe4                          ; waterfall over the material id
  %7732 = ReadFirstLane %7664, %7730
  %7738 = ShiftLeftLogical32 %7732, 0x00000004
  %7754 = GetBufferResource %7742, %7745, %7748, %7751  ; record table V# from the SRT
  %7757 = ReadConstBuffer %7754, %7738                  ; record dword 2, argument pointer low
  %7758 = ReadConstBuffer %7754, %7738                  ; record dword 3, argument pointer high
...
  %8506 = Phi [%7757, $297], [0x000000ea, $302]        ; $303 pc=0x86c0
  %8524 = Phi [%7757, $295], [%8506, $305]             ; $306 pc=0x840c
  %8551 = Phi [%8524, $306], [%7757, $316]             ; $317 pc=0x840c
...
Block $353 pc=0x8f14..0x9078
  %10717 = GetAddressResource %8551, %7758
  %10718..%10721 = LoadAddressU32 %10717, 0x0, 0x0, true    ; pc 0x8f54, the V#
  %10906 = GetBufferResource %10718, %10719, %10720, %10721
  %10907..%10914 = ReadConstBuffer %10906, 0x0              ; T# -> %10975
  %10975 = GetImageResource %10907, ..., %10914             ; -> ImageSampleRaw %10978
  %10987 = GetBufferResource %10718, %10719, %10720, %10721
  %10988..%10995 = ReadConstBuffer %10987, 0x0              ; the pc 0x9000 read at +0x4c0
  %11013 = GetImageResource %10988, ..., %10995             ; -> ImageSampleRaw %11016
Block $354 pc=0x9078..0x90b0
  %11182 = Phi [%8551, $352], [%10988, $353]                ; pointer low
  %11181 = Phi [%7758, $352], [%10989, $353]                ; pointer high
Block $357 pc=0x9234..0x923c
  %11740 = Phi [%8551, $346], [%11182, $356]
  %11739 = Phi [%7758, $346], [%11181, $356]
Block $360 pc=0x8428
  %11785 = Phi [%8551, $322], [%11740, $359]
  %11784 = Phi [%7758, $322], [%11739, $359]
Block $372 pc=0x8428
  %11969 = Phi [%11785, $360], [%8551, $371]
  %11968 = Phi [%11784, $360], [%7758, $371]
  ; 15 GetAddressResource %11969, %11968 follow (pc 0x923c..0x9c2c), each with 4 LoadAddressU32
  • The pair that reaches the loads after pc 0x8428 comes from one of two places. On most edges it is the record's argument pointer, dwords 2 and 3 (%7757/%8551 and %7758). On the edge from $353 it is dwords 0 and 1 of the T# %11013, which that block reads at +0x4c0 and samples with.
  • So it isn't the chase that Tamalero and dean traced at Rift Apart's 0x10b84. There, the extra arms are 64-bit pointers read on their own. Here no arm is a pointer read: one is the record column, the other is a T#'s first two dwords.
  • I can't tell from the IR whether a load after 0x8428 ever runs with that pair.
  • The V# at 0x8f54 also feeds two GetBufferResource handles, one per T#.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340144242 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-6340144242). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-22T11:56:47Z. --- @EagleBearerYS thanks for carrying the fixed-offset change in #9457 as my commit. I'm running Spider-Man 2 on #9457 now and will post the result there. Here is the IR around the 0x8f54 and 0x8fa0 reads, after `srt`, the last pass before the refusal. The `;` notes are mine. Reading it again, I described the +0x4c0 arm wrongly above: it isn't a link to another block. Its two words are dwords 0 and 1 of a T# that also feeds an `ImageSampleRaw`. So the pair looks like registers being reused, as with the lane masks at Rift Apart's 0x9a30. ``` Block $184 pc=0x1fa4..0x1fe4 ; waterfall over the material id %7732 = ReadFirstLane %7664, %7730 %7738 = ShiftLeftLogical32 %7732, 0x00000004 %7754 = GetBufferResource %7742, %7745, %7748, %7751 ; record table V# from the SRT %7757 = ReadConstBuffer %7754, %7738 ; record dword 2, argument pointer low %7758 = ReadConstBuffer %7754, %7738 ; record dword 3, argument pointer high ... %8506 = Phi [%7757, $297], [0x000000ea, $302] ; $303 pc=0x86c0 %8524 = Phi [%7757, $295], [%8506, $305] ; $306 pc=0x840c %8551 = Phi [%8524, $306], [%7757, $316] ; $317 pc=0x840c ... Block $353 pc=0x8f14..0x9078 %10717 = GetAddressResource %8551, %7758 %10718..%10721 = LoadAddressU32 %10717, 0x0, 0x0, true ; pc 0x8f54, the V# %10906 = GetBufferResource %10718, %10719, %10720, %10721 %10907..%10914 = ReadConstBuffer %10906, 0x0 ; T# -> %10975 %10975 = GetImageResource %10907, ..., %10914 ; -> ImageSampleRaw %10978 %10987 = GetBufferResource %10718, %10719, %10720, %10721 %10988..%10995 = ReadConstBuffer %10987, 0x0 ; the pc 0x9000 read at +0x4c0 %11013 = GetImageResource %10988, ..., %10995 ; -> ImageSampleRaw %11016 Block $354 pc=0x9078..0x90b0 %11182 = Phi [%8551, $352], [%10988, $353] ; pointer low %11181 = Phi [%7758, $352], [%10989, $353] ; pointer high Block $357 pc=0x9234..0x923c %11740 = Phi [%8551, $346], [%11182, $356] %11739 = Phi [%7758, $346], [%11181, $356] Block $360 pc=0x8428 %11785 = Phi [%8551, $322], [%11740, $359] %11784 = Phi [%7758, $322], [%11739, $359] Block $372 pc=0x8428 %11969 = Phi [%11785, $360], [%8551, $371] %11968 = Phi [%11784, $360], [%7758, $371] ; 15 GetAddressResource %11969, %11968 follow (pc 0x923c..0x9c2c), each with 4 LoadAddressU32 ``` - The pair that reaches the loads after pc 0x8428 comes from one of two places. On most edges it is the record's argument pointer, dwords 2 and 3 (`%7757`/`%8551` and `%7758`). On the edge from `$353` it is dwords 0 and 1 of the T# `%11013`, which that block reads at +0x4c0 and samples with. - So it isn't the chase that Tamalero and dean traced at Rift Apart's 0x10b84. There, the extra arms are 64-bit pointers read on their own. Here no arm is a pointer read: one is the record column, the other is a T#'s first two dwords. - I can't tell from the IR whether a load after 0x8428 ever runs with that pair. - The V# at 0x8f54 also feeds two `GetBufferResource` handles, one per T#.
BunnyFl commented 2026-11-02 22:07:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T22:07:06Z.

Review: APPROVED


Reviewed this PR's own change on top of #7395's head (git diff of the two heads: ResourceTracker.cpp, the new agc_driver_pointer_phi_* cases, the cache format and the debt entry). #7395 itself I haven't re-reviewed here.

Reads right. PointerRecordPairs walks the low and high words together, pairing a Phi's arms by predecessor block (PhiIncoming) when both words are Phis in the same block. It skips an edge only when its low word is a constant or a lane mask, and, for paired Phis, refuses an edge where both words are immediates. A record word ANDed with a lane mask is unwrapped only when exactly one AND operand is a lane mask (MaskedRecordWord), and every accepted read must keep the same offset and record column (PointerRecordRead). The skipped edges can't bind a wrong resource silently: per the debt entry (docs/dev/debt/shader.md), the snapshot holds the captured records' pointers and the GPU looks up the actual 64-bit pointer, so a lane-mask value that reaches the lookup faults instead.

Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto current main: 21 tests (agc_driver_pointer_*, agc_driver_image_table*, agc_shader_memory*, agc_shader_disk_cache*) pass, nothing skipped. Negative control: with #7395's ResourceTracker.cpp in the same merged tree, the four new cases (..._lane_and_table, ..._high_table, ..._high_second_lane_table, ..._lane_not_table) fail and #7395's three pass. agc_driver_pointer_phi_lane_and_table fails with GetImageResource dword 0 is not a valid runtime value; chain: ... BitwiseAnd32(Phi(CompositeExtractU32x4(Ballot(... (the shape the titles stop on).

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744073838 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5744073838). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-02T22:07:06Z. **Review:** APPROVED --- Reviewed this PR's own change on top of #7395's head (`git diff` of the two heads: `ResourceTracker.cpp`, the new `agc_driver_pointer_phi_*` cases, the cache format and the debt entry). #7395 itself I haven't re-reviewed here. Reads right. `PointerRecordPairs` walks the low and high words together, pairing a Phi's arms by predecessor block (`PhiIncoming`) when both words are Phis in the same block. It skips an edge only when its low word is a constant or a lane mask, and, for paired Phis, refuses an edge where both words are immediates. A record word ANDed with a lane mask is unwrapped only when exactly one AND operand is a lane mask (`MaskedRecordWord`), and every accepted read must keep the same offset and record column (`PointerRecordRead`). The skipped edges can't bind a wrong resource silently: per the debt entry (`docs/dev/debt/shader.md`), the snapshot holds the captured records' pointers and the GPU looks up the actual 64-bit pointer, so a lane-mask value that reaches the lookup faults instead. Tested on Windows 11, WinLibs GCC 15.2.0, with this head merged onto current `main`: 21 tests (`agc_driver_pointer_*`, `agc_driver_image_table*`, `agc_shader_memory*`, `agc_shader_disk_cache*`) pass, nothing skipped. Negative control: with #7395's `ResourceTracker.cpp` in the same merged tree, the four new cases (`..._lane_and_table`, `..._high_table`, `..._high_second_lane_table`, `..._lane_not_table`) fail and #7395's three pass. `agc_driver_pointer_phi_lane_and_table` fails with `GetImageResource dword 0 is not a valid runtime value; chain: ... BitwiseAnd32(Phi(CompositeExtractU32x4(Ballot(...` (the shape the titles stop on).
XairRrR commented 2026-11-02 22:36:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T22:36:19Z.

Review: APPROVED


Reviewed — approved

The edge-paired walk of a pointer-keyed record pointer's two words is sound. It merges and builds on current main, the focused tests pass with no new VUIDs, and four of the five new tests fail without this PR's ResourceTracker.cpp.

What I ran

Head afb123a49ec3f7555c274c769abfa5bbd4f87b81, main 9090972b7e91fd266819cbd77a8b058e177b5682, merged tree 811a3c5c010226d737ab32ee801a80c9d77bb65d (Release, GCC 14.2.0, Ninja, lavapipe Mesa 26.1.6 / LLVM 19, Debian 13 VM).

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...afb123a49ec3f7555c274c769abfa5bbd4f87b81
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver_pointer_|agc_driver_nested_|agc_driver_image_table|agc_shader_disk_cache|agc_shader_nested|agc_shader_memory$|agc_shader_bindless$)"
# negative control
git show 6cb37cc9eda523074d5fd844537c28ce2bbe6907:core/shader/recompiler/Optimization/src/ResourceTracker.cpp > core/shader/recompiler/Optimization/src/ResourceTracker.cpp
ninja -C build -j32 -l32
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^agc_driver_pointer_"
git show 811a3c5c010226d737ab32ee801a80c9d77bb65d:core/shader/recompiler/Optimization/src/ResourceTracker.cpp > core/shader/recompiler/Optimization/src/ResourceTracker.cpp
ninja -C build -j32 -l32
ctest --test-dir build -j8 --test-load 32 -R "^agc_driver_pointer_"
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs (script) ok
Selected tests (script) 2113 ran, 0 new failures, 0 timeouts. 7 known failures also fail on main (agc_driver_division, the denormal-mode tests, unwrap_self, vector_constant_factor_tininess)
Validation layer (script) 769 tests, layer loaded in 768, none missing, 0 tests with new VUIDs against main
Focused set (26 tests: 8 agc_driver_pointer_*, nested, image-table, disk-cache, nested snapshot retry, agc_shader_memory, agc_shader_bindless) 26/26 pass. The slowest is agc_driver_image_table at 9.8 s
Negative control 4 of 5 new tests fail. vsharp_select passes, as the description says it would
Worktree after restore clean (git status --porcelain empty), 8/8 agc_driver_pointer_* pass again
Negative control output (truncated)
1/8 Test #1657: agc_driver_pointer_phi_lane_not_table ...........***Failed    0.12 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Immediate, Phi(ReadConstBuffer@pc=0x00000074(...
2/8 Test #1656: agc_driver_pointer_phi_high_second_lane_table ...***Failed    0.12 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000108(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x0000007c(...
3/8 Test #1655: agc_driver_pointer_phi_high_table ...............***Failed    0.12 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000e0(GetAddressResource(Phi(ReadConstBuffer@pc=0x0000007c(...
4/8 Test #1654: agc_driver_pointer_phi_lane_and_table ...........***Failed    0.12 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000ec(GetAddressResource(Phi(Immediate, Phi(BitwiseAnd32(Phi(CompositeExtractU32x4(Ballot(LogicalAnd), Immediate), ...
5/8 Test #1652: agc_driver_pointer_phi_ballot_table .............   Passed    0.36 sec
6/8 Test #1658: agc_driver_pointer_vsharp_select_table ..........   Passed    0.29 sec
7/8 Test #1653: agc_driver_pointer_phi_copies_table .............   Passed    0.41 sec
8/8 Test #1651: agc_driver_pointer_phi_sampler_table ............   Passed    0.94 sec
50% tests passed, 4 tests failed out of 8

Negative control

This PR's own production change over #7395 is ResourceTracker.cpp. It is identical at the head and in the merged tree, and main has not changed it since #7395's head 6cb37cc9ed. So I replaced only that file with #7395's version (6cb37cc9eda523074d5fd844537c28ce2bbe6907) in the merged tree, kept the tests, and rebuilt.

  • lane_and, high, high_second_lane and lane_not fail with the GetImageResource dword 0 refusal the titles stop on.
  • #7395's three pointer-Phi tests still pass.
  • agc_driver_pointer_vsharp_select_table passes without the change, as the description says (it is coverage of #7395's chain).

This matches BunnyFl's Windows negative control. I then restored the merged file, rebuilt, and confirmed the worktree is clean.

Findings

Blocking

None.

Non-blocking

  1. Dead test mode left behind by 4750c85fcd. The commit removed the agc_driver_pointer_phi_high_second_table registration and its --pointer-phi-high-second dispatch. The test code for it is still there:

    Nothing can reach them. Suggest deleting the array and the enum value, and making the last arm of each ternary explicit.

  2. The rule that refuses an edge where both words are immediates is inconsistent with how other non-record edges are handled. See ResourceTracker.cpp#L1035-L1043.

    • When both words are Phis of one block, an edge on which both are immediates refuses the whole column.
    • An edge with a lane-mask low word is skipped instead. So is an immediate low word whose high word is a record read. In both cases the run-time lookup faults on a pointer that was not captured.
    • A null pointer also faults at run time ("unmapped", per #7395's commit). Skipping that edge would therefore be just as safe.
    • Refusing it may block the common shape where a loop header merges an SGPR pair zeroed before the loop with the record pointer.

    This is not a correctness problem, because the refusal throws. If the refusal is intended, the debt entry could say so. Otherwise, consider skipping the edge like the other pointer-free edges. Since 4750c85fcd removed the assertion, no test covers this branch.

  3. Stale description items.

    • Under "What" (item 1) and "Tested", agc_driver_pointer_phi_high_second_table is still described as a test that "must refuse". 4750c85fcd removed that test.
    • The checklist's "Based on … merged with #7395's head e04a705765" is out of date (the head now merges #7395's 6cb37cc9ed).

    Reviewers who read the description to see what the tests cover will be misled.

  4. The merge brings the whole stack. Merging this PR before #7395 (and #7223) lands would bring them in with it: about 1,500 of the 1,695 added lines are theirs (ResourceMaterializer.cpp, SpirvImageEmitter.cpp, the ABI to 4, ShaderDiskCache 66). The Depends on: #7395 line covers this. I reviewed this PR's own change over #7395 in detail, and their parts only as far as this change uses them.

Not verified

  • The title claims (Ratchet & Clank: Rift Apart, Little Nightmares Enhanced Edition, Ghostrunner). I launched no titles.
  • Hardware other than lavapipe. The NVIDIA RTX 2000 Ada results come from TechLevelZero's bot, not from me.
  • Windows behaviour, including the libc PATH lines for the nested retry tests.
  • How the pair walk performs on very large shaders. seen holds (low, high) pairs, which grows quadratically when the two words' Phis are not paired. I have no shader large enough to measure it.
  • I did not re-review #7223's and #7395's materializer, SPIR-V emitter and disk-cache changes as a whole.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5744408980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5744408980). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T22:36:19Z. **Review:** APPROVED --- # Reviewed — approved The edge-paired walk of a pointer-keyed record pointer's two words is sound. It merges and builds on current `main`, the focused tests pass with no new VUIDs, and four of the five new tests fail without this PR's `ResourceTracker.cpp`. ## What I ran Head `afb123a49ec3f7555c274c769abfa5bbd4f87b81`, `main` `9090972b7e91fd266819cbd77a8b058e177b5682`, merged tree `811a3c5c010226d737ab32ee801a80c9d77bb65d` (Release, GCC 14.2.0, Ninja, lavapipe Mesa 26.1.6 / LLVM 19, Debian 13 VM). ``` git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...afb123a49ec3f7555c274c769abfa5bbd4f87b81 python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver_pointer_|agc_driver_nested_|agc_driver_image_table|agc_shader_disk_cache|agc_shader_nested|agc_shader_memory$|agc_shader_bindless$)" # negative control git show 6cb37cc9eda523074d5fd844537c28ce2bbe6907:core/shader/recompiler/Optimization/src/ResourceTracker.cpp > core/shader/recompiler/Optimization/src/ResourceTracker.cpp ninja -C build -j32 -l32 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^agc_driver_pointer_" git show 811a3c5c010226d737ab32ee801a80c9d77bb65d:core/shader/recompiler/Optimization/src/ResourceTracker.cpp > core/shader/recompiler/Optimization/src/ResourceTracker.cpp ninja -C build -j32 -l32 ctest --test-dir build -j8 --test-load 32 -R "^agc_driver_pointer_" git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure / build / libs (script) | ok | | Selected tests (script) | 2113 ran, 0 new failures, 0 timeouts. 7 known failures also fail on `main` (`agc_driver_division`, the denormal-mode tests, `unwrap_self`, `vector_constant_factor_tininess`) | | Validation layer (script) | 769 tests, layer loaded in 768, none missing, 0 tests with new VUIDs against `main` | | Focused set (26 tests: 8 `agc_driver_pointer_*`, nested, image-table, disk-cache, nested snapshot retry, `agc_shader_memory`, `agc_shader_bindless`) | 26/26 pass. The slowest is `agc_driver_image_table` at 9.8 s | | Negative control | 4 of 5 new tests fail. `vsharp_select` passes, as the description says it would | | Worktree after restore | clean (`git status --porcelain` empty), 8/8 `agc_driver_pointer_*` pass again | <details><summary>Negative control output (truncated)</summary> ``` 1/8 Test #1657: agc_driver_pointer_phi_lane_not_table ...........***Failed 0.12 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Immediate, Phi(ReadConstBuffer@pc=0x00000074(... 2/8 Test #1656: agc_driver_pointer_phi_high_second_lane_table ...***Failed 0.12 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000108(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x0000007c(... 3/8 Test #1655: agc_driver_pointer_phi_high_table ...............***Failed 0.12 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000e0(GetAddressResource(Phi(ReadConstBuffer@pc=0x0000007c(... 4/8 Test #1654: agc_driver_pointer_phi_lane_and_table ...........***Failed 0.12 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000ec(GetAddressResource(Phi(Immediate, Phi(BitwiseAnd32(Phi(CompositeExtractU32x4(Ballot(LogicalAnd), Immediate), ... 5/8 Test #1652: agc_driver_pointer_phi_ballot_table ............. Passed 0.36 sec 6/8 Test #1658: agc_driver_pointer_vsharp_select_table .......... Passed 0.29 sec 7/8 Test #1653: agc_driver_pointer_phi_copies_table ............. Passed 0.41 sec 8/8 Test #1651: agc_driver_pointer_phi_sampler_table ............ Passed 0.94 sec 50% tests passed, 4 tests failed out of 8 ``` </details> ## Negative control This PR's own production change over #7395 is `ResourceTracker.cpp`. It is identical at the head and in the merged tree, and `main` has not changed it since #7395's head `6cb37cc9ed`. So I replaced only that file with #7395's version (`6cb37cc9eda523074d5fd844537c28ce2bbe6907`) in the merged tree, kept the tests, and rebuilt. - `lane_and`, `high`, `high_second_lane` and `lane_not` fail with the `GetImageResource dword 0` refusal the titles stop on. - #7395's three pointer-Phi tests still pass. - `agc_driver_pointer_vsharp_select_table` passes without the change, as the description says (it is coverage of #7395's chain). This matches BunnyFl's Windows negative control. I then restored the merged file, rebuilt, and confirmed the worktree is clean. ## Findings ### Blocking None. ### Non-blocking 1. **Dead test mode left behind by 4750c85fcd.** The commit removed the `agc_driver_pointer_phi_high_second_table` registration and its `--pointer-phi-high-second` dispatch. The test code for it is still there: - `PointerHighSecondCode` (80 words, [ImageTable.cpp#L395](https://github.com/boykopovar/AnyPS5/blob/afb123a49ec3f7555c274c769abfa5bbd4f87b81/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L395)) - `PointerMask::HighSecond` ([L2072](https://github.com/boykopovar/AnyPS5/blob/afb123a49ec3f7555c274c769abfa5bbd4f87b81/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L2072)) - its fall-through arm in the `code`/`name` selection ([L2090-L2091](https://github.com/boykopovar/AnyPS5/blob/afb123a49ec3f7555c274c769abfa5bbd4f87b81/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L2090-L2091)) Nothing can reach them. Suggest deleting the array and the enum value, and making the last arm of each ternary explicit. 2. **The rule that refuses an edge where both words are immediates is inconsistent with how other non-record edges are handled.** See [ResourceTracker.cpp#L1035-L1043](https://github.com/boykopovar/AnyPS5/blob/afb123a49ec3f7555c274c769abfa5bbd4f87b81/core/shader/recompiler/Optimization/src/ResourceTracker.cpp#L1035-L1043). - When both words are Phis of one block, an edge on which both are immediates refuses the whole column. - An edge with a lane-mask low word is skipped instead. So is an immediate low word whose high word is a record read. In both cases the run-time lookup faults on a pointer that was not captured. - A null pointer also faults at run time ("unmapped", per #7395's commit). Skipping that edge would therefore be just as safe. - Refusing it may block the common shape where a loop header merges an SGPR pair zeroed before the loop with the record pointer. This is not a correctness problem, because the refusal throws. If the refusal is intended, the debt entry could say so. Otherwise, consider skipping the edge like the other pointer-free edges. Since 4750c85fcd removed the assertion, no test covers this branch. 3. **Stale description items.** - Under "What" (item 1) and "Tested", `agc_driver_pointer_phi_high_second_table` is still described as a test that "must refuse". 4750c85fcd removed that test. - The checklist's "Based on … merged with #7395's head e04a705765" is out of date (the head now merges #7395's `6cb37cc9ed`). Reviewers who read the description to see what the tests cover will be misled. 4. **The merge brings the whole stack.** Merging this PR before #7395 (and #7223) lands would bring them in with it: about 1,500 of the 1,695 added lines are theirs (`ResourceMaterializer.cpp`, `SpirvImageEmitter.cpp`, the ABI to 4, `ShaderDiskCache` 66). The `Depends on: #7395` line covers this. I reviewed this PR's own change over #7395 in detail, and their parts only as far as this change uses them. ## Not verified - The title claims (Ratchet & Clank: Rift Apart, Little Nightmares Enhanced Edition, Ghostrunner). I launched no titles. - Hardware other than lavapipe. The NVIDIA RTX 2000 Ada results come from TechLevelZero's bot, not from me. - Windows behaviour, including the libc PATH lines for the nested retry tests. - How the pair walk performs on very large shaders. `seen` holds (low, high) pairs, which grows quadratically when the two words' Phis are not paired. I have no shader large enough to measure it. - I did not re-review #7223's and #7395's materializer, SPIR-V emitter and disk-cache changes as a whole. <!-- anyps5-bots job=2635 head=afb123a49ec3f7555c274c769abfa5bbd4f87b81 -->
XairRrR commented 2026-11-03 10:54:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T10:54:24Z.

Review: APPROVED


Re-checked — approved

The only new commit is 58ebe4b440, a clean merge of main 4f41f4c375 (it brings #10000's sampler limits, among others). This PR's own change is the same apart from context lines. Checks and the focused tests pass. The one new VUID the script reports comes from a main test that this PR does not reach.

What changed since my last review

  • One new commit, 58ebe4b440 ("Merge main into fix/shader-pointer-key-lane-masks"). Its parents are afb123a49e, which I reviewed last time, and main 4f41f4c375. The commit message lists no conflicts. The range-diff in delta.patch only reorders the cherry-picked commits; the patches are the same.
  • The PR's own diff is the same as before, apart from context lines. I compared git diff 9090972b7e...afb123a49e with git diff 4f41f4c375...58ebe4b440, ignoring index and hunk lines. Three things differ, and all three are context that comes from main:
    • main's FormatVersion is now 52, and this PR still replaces it with 66, which is still above main's.
    • A set_tests_properties context line now includes agc_shader_sampler_limits.
    • The docs/dev/debt/shader.md context now has #10000's sampler-limit entry.
  • No new author comments or replies. The description is unchanged.

What I ran

Head 58ebe4b44099cd04f81411a07d2c4d25d95a7a87, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree bad6f1b67d11d12ed7ed1d1a76b7dbba23e6eee1. Release build with GCC 14.2.0 and Ninja, on lavapipe (Mesa 26.1.6, LLVM 19), in a Debian 13 VM.

git diff 9090972b7e91fd266819cbd77a8b058e177b5682...afb123a49ec3f7555c274c769abfa5bbd4f87b81   # compared with the next diff
git diff 4f41f4c375f5abb487dbd184fbc150f31994d762...58ebe4b44099cd04f81411a07d2c4d25d95a7a87
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...58ebe4b44099cd04f81411a07d2c4d25d95a7a87
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver_pointer_|agc_driver_nested_|agc_driver_image_table|agc_shader_disk_cache|agc_shader_nested|agc_shader_memory$|agc_shader_bindless$|agc_shader_sampler_limits$)"
env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R "^agc_driver_native_depth_uniform_planes$"
git log -S native_depth_uniform_planes 4f41f4c375 -- core/libs/prx/libSceAgcDriver
git merge-base --is-ancestor c9987271e3 d1ae628bc2f62459cce1e9872ba5632c938c71f2
Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure, build and libs (run by the script) ok
Selected tests (run by the script) 2244 ran: 0 new failures, 0 timeouts. 7 known failures also fail on main.
Focused set, 27 tests (the 7 agc_driver_pointer_* tests, the nested, image-table, disk-cache and nested snapshot retry tests, agc_shader_memory, agc_shader_bindless and main's new agc_shader_sampler_limits) 27/27 pass. The slowest is agc_shader_sampler_limits at 14.6 s.
Validation (run by the script) 782 tests, layer loaded in 781, missing in none. One test has new VUIDs: agc_driver_native_depth_uniform_planes (see below).

The new VUID comes from main, not from this PR.

  • The VUID is VUID-vkCmdDispatch-groupCountX-00386 in agc_driver_native_depth_uniform_planes. The script marks that test "(test not run on main)".
  • The test comes from main's c9987271e3 (2026-10-31). That commit is not in the validation baseline d1ae628bc2, so the baseline has no run of it to compare with.
  • The test exercises Graphics/src/DepthSurface.cpp's import of a native multisample D32S8 target. This PR changes no libSceAgcDriver production file.
  • I reran the test with the layer in the merged tree. It reports groupCountX (69144) exceeds device limit maxComputeWorkGroupCount[0] (65535), which belongs to that depth-import dispatch, not to an image-table path. I did not run the test on a main-only build.
Validation excerpt
Validation Error: [ VUID-vkCmdDispatch-groupCountX-00386 ] | MessageID = 0x8e927036
vkCmdDispatch(): groupCountX (69144) exceeds device limit maxComputeWorkGroupCount[0] (65535).

Negative control: not rerun. The tests and this PR's ResourceTracker.cpp lines are the same as at afb123a49e, where four of the five new tests failed without the change. Rerunning it here would also be harder: main has since changed ResourceTracker.cpp (#10000, #12132), so dropping in #7395's version of the file would also revert main's changes.

Previous findings

  1. Dead test mode (PointerHighSecondCode, PointerMask::HighSecond). Still open, and unchanged:
    • PointerHighSecondCode is still at ImageTable.cpp#L395.
    • PointerMask::HighSecond is still at L2072.
    • Nothing can reach either of them.
  2. An edge where both words are immediates refuses the whole column, while other pointer-free edges are skipped. Still open, and unchanged. It is now at ResourceTracker.cpp#L1039-L1047. It is not a correctness problem, because the refusal throws.
  3. Stale description items. Still open:
    • "What" item 1 and "Tested" still describe agc_driver_pointer_phi_high_second_table as a test that "must refuse", but 4750c85fcd removed that test.
    • The checklist still says the branch is "merged with #7395's head e04a705765".
  4. The merge brings in the whole stack (#7395, #7223). Still applies, and is covered by Depends on: #7395.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • The title claims (Ratchet & Clank: Rift Apart, Little Nightmares Enhanced Edition, Ghostrunner). I launched no titles.
  • Hardware other than lavapipe, and Windows.
  • agc_driver_native_depth_uniform_planes with the validation layer on a main-only build. I attribute its VUID to main from where the test comes from and from the code it exercises.
  • I did not reread how #10000's sampler limits, now on main, interact with the stack's nested S# budget beyond the passing tests. agc_shader_sampler_limits and the nested sampler tests pass together.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5750913689 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5750913689). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T10:54:24Z. **Review:** APPROVED --- # Re-checked — approved The only new commit is 58ebe4b440, a clean merge of `main` 4f41f4c375 (it brings #10000's sampler limits, among others). This PR's own change is the same apart from context lines. Checks and the focused tests pass. The one new VUID the script reports comes from a `main` test that this PR does not reach. ## What changed since my last review - **One new commit, 58ebe4b440** ("Merge main into fix/shader-pointer-key-lane-masks"). Its parents are afb123a49e, which I reviewed last time, and `main` 4f41f4c375. The commit message lists no conflicts. The range-diff in delta.patch only reorders the cherry-picked commits; the patches are the same. - **The PR's own diff is the same as before, apart from context lines.** I compared `git diff 9090972b7e...afb123a49e` with `git diff 4f41f4c375...58ebe4b440`, ignoring index and hunk lines. Three things differ, and all three are context that comes from `main`: - `main`'s `FormatVersion` is now 52, and this PR still replaces it with 66, which is still above `main`'s. - A `set_tests_properties` context line now includes `agc_shader_sampler_limits`. - The `docs/dev/debt/shader.md` context now has #10000's sampler-limit entry. - **No new author comments or replies.** The description is unchanged. ## What I ran Head `58ebe4b44099cd04f81411a07d2c4d25d95a7a87`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `bad6f1b67d11d12ed7ed1d1a76b7dbba23e6eee1`. Release build with GCC 14.2.0 and Ninja, on lavapipe (Mesa 26.1.6, LLVM 19), in a Debian 13 VM. ``` git diff 9090972b7e91fd266819cbd77a8b058e177b5682...afb123a49ec3f7555c274c769abfa5bbd4f87b81 # compared with the next diff git diff 4f41f4c375f5abb487dbd184fbc150f31994d762...58ebe4b44099cd04f81411a07d2c4d25d95a7a87 git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...58ebe4b44099cd04f81411a07d2c4d25d95a7a87 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver_pointer_|agc_driver_nested_|agc_driver_image_table|agc_shader_disk_cache|agc_shader_nested|agc_shader_memory$|agc_shader_bindless$|agc_shader_sampler_limits$)" env VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -V -R "^agc_driver_native_depth_uniform_planes$" git log -S native_depth_uniform_planes 4f41f4c375 -- core/libs/prx/libSceAgcDriver git merge-base --is-ancestor c9987271e3 d1ae628bc2f62459cce1e9872ba5632c938c71f2 ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure, build and libs (run by the script) | ok | | Selected tests (run by the script) | 2244 ran: 0 new failures, 0 timeouts. 7 known failures also fail on `main`. | | Focused set, 27 tests (the 7 `agc_driver_pointer_*` tests, the nested, image-table, disk-cache and nested snapshot retry tests, `agc_shader_memory`, `agc_shader_bindless` and `main`'s new `agc_shader_sampler_limits`) | 27/27 pass. The slowest is `agc_shader_sampler_limits` at 14.6 s. | | Validation (run by the script) | 782 tests, layer loaded in 781, missing in none. One test has new VUIDs: `agc_driver_native_depth_uniform_planes` (see below). | **The new VUID comes from `main`, not from this PR.** - The VUID is `VUID-vkCmdDispatch-groupCountX-00386` in `agc_driver_native_depth_uniform_planes`. The script marks that test "(test not run on main)". - The test comes from `main`'s c9987271e3 (2026-10-31). That commit is not in the validation baseline d1ae628bc2, so the baseline has no run of it to compare with. - The test exercises `Graphics/src/DepthSurface.cpp`'s import of a native multisample D32S8 target. This PR changes no `libSceAgcDriver` production file. - I reran the test with the layer in the merged tree. It reports `groupCountX (69144) exceeds device limit maxComputeWorkGroupCount[0] (65535)`, which belongs to that depth-import dispatch, not to an image-table path. I did not run the test on a `main`-only build. <details><summary>Validation excerpt</summary> ``` Validation Error: [ VUID-vkCmdDispatch-groupCountX-00386 ] | MessageID = 0x8e927036 vkCmdDispatch(): groupCountX (69144) exceeds device limit maxComputeWorkGroupCount[0] (65535). ``` </details> **Negative control: not rerun.** The tests and this PR's `ResourceTracker.cpp` lines are the same as at afb123a49e, where four of the five new tests failed without the change. Rerunning it here would also be harder: `main` has since changed `ResourceTracker.cpp` (#10000, #12132), so dropping in #7395's version of the file would also revert `main`'s changes. ## Previous findings 1. **Dead test mode (`PointerHighSecondCode`, `PointerMask::HighSecond`).** Still open, and unchanged: - `PointerHighSecondCode` is still at [ImageTable.cpp#L395](https://github.com/boykopovar/AnyPS5/blob/58ebe4b44099cd04f81411a07d2c4d25d95a7a87/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L395). - `PointerMask::HighSecond` is still at [L2072](https://github.com/boykopovar/AnyPS5/blob/58ebe4b44099cd04f81411a07d2c4d25d95a7a87/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L2072). - Nothing can reach either of them. 2. **An edge where both words are immediates refuses the whole column, while other pointer-free edges are skipped.** Still open, and unchanged. It is now at [ResourceTracker.cpp#L1039-L1047](https://github.com/boykopovar/AnyPS5/blob/58ebe4b44099cd04f81411a07d2c4d25d95a7a87/core/shader/recompiler/Optimization/src/ResourceTracker.cpp#L1039-L1047). It is not a correctness problem, because the refusal throws. 3. **Stale description items.** Still open: - "What" item 1 and "Tested" still describe `agc_driver_pointer_phi_high_second_table` as a test that "must refuse", but 4750c85fcd removed that test. - The checklist still says the branch is "merged with #7395's head e04a705765". 4. **The merge brings in the whole stack (#7395, #7223).** Still applies, and is covered by `Depends on: #7395`. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - The title claims (Ratchet & Clank: Rift Apart, Little Nightmares Enhanced Edition, Ghostrunner). I launched no titles. - Hardware other than lavapipe, and Windows. - `agc_driver_native_depth_uniform_planes` with the validation layer on a `main`-only build. I attribute its VUID to `main` from where the test comes from and from the code it exercises. - I did not reread how #10000's sampler limits, now on `main`, interact with the stack's nested S# budget beyond the passing tests. `agc_shader_sampler_limits` and the nested sampler tests pass together. <!-- anyps5-bots job=3295 head=58ebe4b44099cd04f81411a07d2c4d25d95a7a87 -->
MarcZX10 commented 2026-11-16 16:51:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T16:51:36Z.

Review: COMMENTED


Reviewed — comments

Changes are not ready for a formal approval because I did not run the checks reported by the author, and one changed test file was excluded from the review bundle.

What I ran

Reviewed head b4a5b1a618ed89404bd05fc910337720844641b1 against the prepared diff. No commands or tests were run.

Results

Check Result Note
Diff and targeted source review passed Shader tracking and materialization paths inspected
Tests not run Test results in the PR description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full contents of core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp were excluded from the review bundle; its changed hunk was inspected through the reader. The complete changed test files were not read in full. Tests, builds, and physical-console behavior were not independently verified. Other changed files were reviewed through the diff and targeted source ranges.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5923883213 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5923883213). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T16:51:36Z. **Review:** COMMENTED --- # Reviewed — comments Changes are not ready for a formal approval because I did not run the checks reported by the author, and one changed test file was excluded from the review bundle. ## What I ran Reviewed head `b4a5b1a618ed89404bd05fc910337720844641b1` against the prepared diff. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Shader tracking and materialization paths inspected | | Tests | not run | Test results in the PR description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full contents of `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` were excluded from the review bundle; its changed hunk was inspected through the reader. The complete changed test files were not read in full. Tests, builds, and physical-console behavior were not independently verified. Other changed files were reviewed through the diff and targeted source ranges. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-18 03:36:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T03:36:54Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 5eb49d189318c048e10d2848f769d58f2c215ccb. No commands or tests were run. Read the prepared description, commits, manifest, full diff, and targeted head context in ResourceTracker.cpp, ResourceMaterializer.cpp, and ShaderMemory.cpp through repo_read.py.

Results

Check Result Note
Changed logic review passed Pointer planning and snapshot paths inspected
Tests not run Reported test runs were not independently rerun
Changed file coverage not run One changed file was excluded from the review folder

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was available through the reader and the changed snapshot retry helper was inspected. Other changed lines in that large file were not examined; no issue is established from that limited review.

Not verified

  • The full text of ShaderMemory.cpp was excluded from the prepared review folder because it was too large. Only lines 3980–4050 were read through repo_read.py; other changed lines there were not reviewed.
  • No tests, builds, GPU runs, or console behavior were independently verified. The test and title-run results in the PR description are author-reported.
  • Full text was available and reviewed for the other changed files listed in the manifest; targeted ranges were read for the large ResourceTracker.cpp, ResourceMaterializer.cpp, and ShaderMemory.cpp files rather than their entire contents.

To get this to a good state

Nothing is required. Optional: run the focused tests on the current head and inspect the remaining changed lines in ShaderMemory.cpp.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5950442139 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5950442139). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T03:36:54Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `5eb49d189318c048e10d2848f769d58f2c215ccb`. No commands or tests were run. Read the prepared description, commits, manifest, full diff, and targeted head context in `ResourceTracker.cpp`, `ResourceMaterializer.cpp`, and `ShaderMemory.cpp` through `repo_read.py`. ## Results | Check | Result | Note | |---|---|---| | Changed logic review | passed | Pointer planning and snapshot paths inspected | | Tests | not run | Reported test runs were not independently rerun | | Changed file coverage | not run | One changed file was excluded from the review folder | ## Findings ### Blocking None. ### Non-blocking - `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was available through the reader and the changed snapshot retry helper was inspected. Other changed lines in that large file were not examined; no issue is established from that limited review. ## Not verified - The full text of `ShaderMemory.cpp` was excluded from the prepared review folder because it was too large. Only lines 3980–4050 were read through `repo_read.py`; other changed lines there were not reviewed. - No tests, builds, GPU runs, or console behavior were independently verified. The test and title-run results in the PR description are author-reported. - Full text was available and reviewed for the other changed files listed in the manifest; targeted ranges were read for the large `ResourceTracker.cpp`, `ResourceMaterializer.cpp`, and `ShaderMemory.cpp` files rather than their entire contents. ## To get this to a good state Nothing is required. Optional: run the focused tests on the current head and inspect the remaining changed lines in `ShaderMemory.cpp`.
MarcZX10 commented 2026-11-19 07:15:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T07:15:13Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing I inspected shows a verified defect; I did not run checks, and one changed file was excluded from review.

What I ran

  • Reviewed head 606212c86eb33d30a8de2abf6a86edfbc0a9b289 using the prepared diff and repo_read.py for targeted source ranges.
  • No commands or tests were run.

Results

Check Result Note
Diff and source review passed Core pointer walk and materialization reviewed
Tests not run Author-reported runs are not independent runs

Findings

Blocking

None verified in the inspected code.

Non-blocking

None.

Not verified

  • core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded from the review bundle because it was too large; its changed ranges were read through repo_read.py.
  • Other changed files whose full text was included but whose code was outside the relevant reviewed paths were not read in full. The author reports broad CI, GPU, and title testing in the PR description; these runs were not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5970809201 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5970809201). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T07:15:13Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing I inspected shows a verified defect; I did not run checks, and one changed file was excluded from review. ## What I ran - Reviewed head `606212c86eb33d30a8de2abf6a86edfbc0a9b289` using the prepared diff and `repo_read.py` for targeted source ranges. - No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and source review | passed | Core pointer walk and materialization reviewed | | Tests | not run | Author-reported runs are not independent runs | ## Findings ### Blocking None verified in the inspected code. ### Non-blocking None. ## Not verified - `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded from the review bundle because it was too large; its changed ranges were read through `repo_read.py`. - Other changed files whose full text was included but whose code was outside the relevant reviewed paths were not read in full. The author reports broad CI, GPU, and title testing in the PR description; these runs were not independently verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-20 05:04:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:04:51Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: ensure the pointer’s low and high words come from the same record key.

What I ran

  • Reviewed head 2eecdd6fc81103facf10c6939d67778700e36c0a using the prepared review diff and repo_read.py.
  • No tests or build commands were run.

Results

Check Result Note
Diff and targeted code review failed Found a pointer pairing defect
Tests not run No local test run

Findings

Blocking

  • core/shader/recompiler/Optimization/src/ResourceTracker.cpp:983 — SameRecordColumn compares the buffers, strides, and addends, but never compares the affine keys. The paired walk can therefore accept a low-word read indexed by one key and a high-word read indexed by another. Materialization then combines the two dwords from the same record index, which may not represent either source pointer. Require equivalent affine keys before treating the reads as the same record column.

Non-blocking

  • None.

Not verified

  • Read the full text of the changed files ShaderDiskCache.cpp, both changed CMake test files, ImageTable.cpp, ResourceMaterializer.cpp, and ResourceTracker.cpp, plus targeted portions of the diff and repository context.
  • ShaderMemory.cpp was excluded from the review folder as too large; its changed hunks were visible in the prepared diff, but its full text was not read. The remaining changed files listed in manifest.json were not read in full. Tests and builds were not run; author and CI results in the PR description were not independently verified.

To get this to a good state

  • Compare the affine keys in SameRecordColumn, and add coverage showing that low and high reads with different keys are rejected. Re-run the focused pointer-table tests on the updated head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5987775268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-5987775268). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T05:04:51Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: ensure the pointer’s low and high words come from the same record key. ## What I ran - Reviewed head `2eecdd6fc81103facf10c6939d67778700e36c0a` using the prepared review diff and `repo_read.py`. - No tests or build commands were run. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted code review | failed | Found a pointer pairing defect | | Tests | not run | No local test run | ## Findings ### Blocking - `core/shader/recompiler/Optimization/src/ResourceTracker.cpp:983` — `SameRecordColumn` compares the buffers, strides, and addends, but never compares the affine keys. The paired walk can therefore accept a low-word read indexed by one key and a high-word read indexed by another. Materialization then combines the two dwords from the same record index, which may not represent either source pointer. Require equivalent affine keys before treating the reads as the same record column. ### Non-blocking - None. ## Not verified - Read the full text of the changed files `ShaderDiskCache.cpp`, both changed CMake test files, `ImageTable.cpp`, `ResourceMaterializer.cpp`, and `ResourceTracker.cpp`, plus targeted portions of the diff and repository context. - `ShaderMemory.cpp` was excluded from the review folder as too large; its changed hunks were visible in the prepared diff, but its full text was not read. The remaining changed files listed in `manifest.json` were not read in full. Tests and builds were not run; author and CI results in the PR description were not independently verified. ## To get this to a good state - Compare the affine keys in `SameRecordColumn`, and add coverage showing that low and high reads with different keys are rejected. Re-run the focused pointer-table tests on the updated head.
MarcZX10 commented 2026-11-22 11:55:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T11:55:02Z.

Review: APPROVED


Reviewed — looks good

Nothing in the reviewed changes blocks merging; the focused code inspection supports the new pointer-word handling, though this review did not run checks.

What I ran

  • Read the prepared diff and changed-file contents at head 3a248901892f2454fe86b7dfc97640d739253823 using repo_read.py.
  • No commands or tests were run.

Results

Check Result Note
Changed-code inspection passed Tracker logic and test changes read
Build and tests not run No local execution

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • Runtime behavior, build, and tests were not independently verified; reported CI and title runs in the description were not run for this review.
  • Read: core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake, core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp, core/shader/recompiler/Optimization/src/ResourceTracker.cpp, core/shader/recompiler/ShaderDiskCache.hpp, and docs/dev/debt/shader.md (changed sections only). No changed files were excluded by the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6012077986 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-6012077986). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T11:55:02Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the reviewed changes blocks merging; the focused code inspection supports the new pointer-word handling, though this review did not run checks. ## What I ran - Read the prepared diff and changed-file contents at head `3a248901892f2454fe86b7dfc97640d739253823` using `repo_read.py`. - No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed-code inspection | passed | Tracker logic and test changes read | | Build and tests | not run | No local execution | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - Runtime behavior, build, and tests were not independently verified; reported CI and title runs in the description were not run for this review. - Read: `core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake`, `core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp`, `core/shader/recompiler/Optimization/src/ResourceTracker.cpp`, `core/shader/recompiler/ShaderDiskCache.hpp`, and `docs/dev/debt/shader.md` (changed sections only). No changed files were excluded by the manifest. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-26 09:03:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T09:03:26Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 9e5960f6b27f5f763911fb7ea7e35d4052b22abc using the prepared diff and the pinned repository reader. No tests were run.

Results

Check Result Note
Diff and planner review passed Read the modified pointer analysis and its downstream planning path
Tests not run Relied on the test results reported in the PR description

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests were run independently. Reviewed files: core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake, core/shader/recompiler/Optimization/src/ResourceTracker.cpp, core/shader/recompiler/ShaderDiskCache.hpp, and docs/dev/debt/shader.md. The modified test source core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp was reviewed in the diff only; its full file was not read. The review bundle's files.json was unavailable, so excluded-file inventory and coverage against its reviewed list are not verified. Full title and console behavior were not independently verified.

To get this to a good state

Nothing is required. Optional: run the focused image-table tests on this exact head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6071147871 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8939#pullrequestreview-6071147871). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-26T09:03:26Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `9e5960f6b27f5f763911fb7ea7e35d4052b22abc` using the prepared diff and the pinned repository reader. No tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff and planner review | passed | Read the modified pointer analysis and its downstream planning path | | Tests | not run | Relied on the test results reported in the PR description | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No tests were run independently. Reviewed files: `core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake`, `core/shader/recompiler/Optimization/src/ResourceTracker.cpp`, `core/shader/recompiler/ShaderDiskCache.hpp`, and `docs/dev/debt/shader.md`. The modified test source `core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp` was reviewed in the diff only; its full file was not read. The review bundle's `files.json` was unavailable, so excluded-file inventory and coverage against its `reviewed` list are not verified. Full title and console behavior were not independently verified. ## To get this to a good state Nothing is required. Optional: run the focused image-table tests on this exact head.
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!8939
No description provided.