feat(shader): read samplers through nested and pointer-keyed descriptor tables #7395

Merged
EagleBearerYS merged 41 commits from upstream-pr/7395 into main 2026-11-21 10:58:56 +00:00
EagleBearerYS commented 2026-10-18 04:33:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T04:33:56Z.


What

#7223 has merged. With #7223, Marvel's Wolverine (PPSA03671) and Ratchet & Clank: Rift Apart (PPSA01474) stopped on the sampler half of the descriptor chain that #7223 resolves for images (#6191):

  • Marvel's Wolverine (Capmare, comment, main 66702f1cf + #7223 + local patches, Linux):
    GetSamplerResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x0000bb28(GetBufferResource(LoadAddressU32@pc=0x0000bb18(GetAddressResource(ReadConstBuffer@pc=0x00002454(GetBufferResource(ReadConst(GetSrtResource, Immediate) x4), ShiftLeftLogical32(ReadFirstLane(SelectU32(...), Phi), Immediate)), ...
    
  • Ratchet & Clank: Rift Apart (ps54all, comment, main 82f0c9aec + picks + #7223, Windows):
    ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00006b74(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediat...
    

Ratchet & Clank: Rift Apart (PPSA01474), 11-13: this PR got the title past its pc=0x6b74 sampler stop on main 66702f1cf (Tamalero's run, see Tested). 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 fb542a2b6f, which has #14636, all five of this PR's tests fail 3 of 3 without its code and pass 3 of 3 with it (llvmpipe, a cloud Linux machine).

#7223 resolves record → pointer → V# → T# and leaves samplers refused. Its nested table representation, pointer dictionary and limits are what this PR builds on. The PR extends them to samplers and to a one-hop pointer whose low word is merged through a Phi.

This PR's first fix, fix(shader): refuse nested table entries whose words have other consumers (0df7d3256e), is now in #7223 (d132754dbe, with its authorship). On #7223's earlier head, a nested child whose descriptor words another instruction also reads crashed lavapipe inside the shader. Four commits remain here:

  1. feat(shader): resolve S# reads through nested descriptor tables. This is the record → pointer → V# → S# chain of Marvel's Wolverine (PPSA03671)'s stop above (pc=0xbb28) and of the one at pc=0xb600. This PR plans the S# when it sits at a keyed offset of the V#. At pc=0xb600 it sits at a fixed offset, which this PR doesn't plan and #9457 does (mrfelek's offline replay of #9969's head, comment). The pc=0xbb28 line doesn't show its S#'s offset.
    • The tracker's nested branch now accepts sampler columns. The materializer and the emitter already handled 4-dword sampler words.
    • #7223's limits apply unchanged: the nested and parent key budgets, and the 256-entry S# budget.
    • The plan encoding is unchanged.
    • Marvel's Wolverine's later stops, from mrfelek's replay and game run with #9969 merged on (comment). Past pc=0xb600, the shader stops at pc=0xb9f8, then at pc=0xd0f0 (records linked through words that are also a V#'s base) and at pc=0xef7c (pointers from a second record table). mrfelek's #16472, on top of #9749, takes pc=0xb9f8. In their replay with #9969 merged on, it plans past it and stops at pc=0xd0f0; their game run with the same step and their local stencil and image-table changes stops there 168 s in. No open PR of ours takes pc=0xd0f0 or pc=0xef7c.
  2. feat(shader): look up a Phi-merged record pointer to an S# or T#. This is Ratchet & Clank's shape: record → pointer → S# through an address, with the pointer's low word merged through a Phi.
    • A direct indirect column becomes pointer-keyed and reuses #7223's sorted pointer dictionary.
    • A pointer the snapshot didn't capture faults as outside the snapshot, and a null pointer faults as unmapped. The same path serves T#s.
    • The disk-cache format goes from 42 to 43, and the image-table ABI from 3 to 4.
  3. fix(shader): accept a lane-mask word in a pointer-keyed record pointer. Ratchet & Clank: Rift Apart's next stop (ps54all, #6191): GetImageResource dword 0 is not a valid runtime value. A T# is read through a record pointer whose low word passes six levels of Phi, and one arm is a word of the waterfall loop's Ballot lane mask.
    • A pointer-keyed column now accepts such an arm as one that can't be a record pointer, as it does for constants. It also accepts copies of the record word read under other keys (same table, offset, stride and addend), since the lookup is by the pointer's value.
    • At run time, a pointer built from a lane mask faults as outside the snapshot.
    • This commit leaves the disk-cache format as it is: shaders that planned before plan the same way, and only ones refused before now plan.
  4. fix(shader): check the descriptor epoch for a lone nested sampler table (967f0dbebb). A shader whose only table is a nested S# table now gets the same descriptor-epoch retry as images.
    • The cause: the tracker builds nested S# columns, whose heap source is itself a table column, but TableSnapshotter::Run() still widened hasIndirect for samplers only on column.indirect. Such a shader skipped the snapshot's own epoch check and retry, and relied on the whole-snapshot revalidation alone.
    • The fix: the sampler loop now uses the same test as the image loop.
    • What the old code missed: the per-attempt retry, the budget reset and the forced sync, so the severity is low-medium. It didn't produce a torn snapshot, and no title has shown it.

Ordering. This PR was stacked on #7223, which has merged. Its first three commits sit on #7223's 74700a08d1, and the branch then merges main a5939f10a8 (480c25a6b1) and #7223's head, now 7f36e41c45 (94a16af777). The fourth commit sits on top. With 4d820bdb47, a merge of main c2eafe4461, which has #7223, this PR's diff over main shows only its own changes.

  • The restack: the three commits were moved onto that head, as asked in this comment. Each conflict takes #7223's code and re-applies this PR's change on it. In particular, TableColumn keeps #6232's selected and selection and adds pointerKeyed after them, and the plan encoder, the plan hash and sameColumns take the new field.
  • Earlier merges: this branch's earlier merges of main are gone with the restack, and #7223's own merge with main replaces them. The first of them took its conflict resolutions from blawesom's rebase of this branch onto main (comment) and credited blawesom as co-author.
  • Version bumps:
    • The disk-cache format is 93 here (3c58f422ee). 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.
    • The image-table ABI is 4 here (3 on #7223 and #6488, 2 on main).
    • #6488 moves the disk-cache format too, so whichever of this PR and #6488 lands second takes the next free numbers.

Tested

  • The restack (41220941d8, 9200c3a2d5, f6fb8b64a9, on #7223's 74700a08d1), Linux, lavapipe (LLVM 20.1.2), CI's configuration, a cloud worker:
    • each commit builds and passes its own tests;
    • at the head, the nested and pointer-Phi table tests, agc_shader_disk_cache, agc_shader_bindless and the rest of the image-table family (21 tests) pass 10 runs in a row;
    • the ^(agc|shader) tests pass, 838 of 838.
  • The restack merged with current main, as CI builds it (0863efbfa4, main a07e985c8f), on GitHub's runners (run): the nested and pointer-Phi table tests, agc_driver_image_table, agc_shader_disk_cache and agc_shader_bindless pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass, and the libc and libkernel suites pass on both.
  • The runs below are from the heads before the restack. The three commits' own changes are the same, apart from the conflict resolutions.
  • Merged with main 9caecfd2d5 (aed137caee, the head), on GitHub's runners, at 3730bb899e, the same merge with the same tree before the co-author line was added (run): on Linux the ^agc tests pass 3 runs in a row, 715 tests: 667 pass, 48 skip, 0 fail. The libc and libkernel suites pass on both runners. On Windows, of 714 ^agc tests 173 pass 3 runs in a row and 539 skip, since the runner has no Vulkan device; the only failures are agc_driver_pm4_replay_tool and agc_shader_replay_tool, which fail the same way on that runner for an unrelated branch (run).
  • GitHub's Linux (lavapipe, Mesa 25.2.8) and Windows runners (verify run):
    • agc_driver_nested_image_table, agc_driver_nested_sampler_table, agc_driver_pointer_phi_sampler_table, agc_shader_disk_cache and agc_shader_disk_cache_large_file pass 10 of 10 runs on both runners. Three of them skip on the Windows runner.
    • The libc and libkernel suites pass.
    • With #7223's code the new tests don't build, so the red below is from the Linux run.
  • Linux, a run that mirrors CI's Linux job (Ubuntu 24.04, GCC 13.3, lavapipe Mesa 25.2.8 / LLVM 20.1.2): 1376 tests on this branch, with the same 5 IPv6 failures as on #7223's head on that machine. No new failures or skips.
  • New tests, red on #7223's head and green here:
    • agc_driver_nested_sampler_table: S# through record → pointer → V#. It covers independent keys, wave32 against wave64, an edited S#, unmapped and non-buffer parents, shared children, the refusal of an S# with another consumer, captured and uncaptured Phi pointers, the S# budget and the nested key budget. Red: GetSamplerResource dword 0 is not a valid runtime value.
    • agc_driver_pointer_phi_sampler_table: S# through a Phi-merged record pointer. It covers the direct control, captured and uncaptured Phi constants, a constant equal to another record's pointer, a null pointer, a non-buffer record table, an S# with another consumer, and a T# through the same path.
    • agc_driver_nested_image_table gains "a T# with another consumer" (refused). Red is a SIGSEGV on #7223's head.
    • agc_shader_disk_cache round-trips both new plan shapes and rejects a malformed pointer-keyed column.
  • The fourth commit's tests (b91f0508d5), agc_driver_pointer_phi_ballot_table and agc_driver_pointer_phi_copies_table: synthetic wave64 waterfall loops shaped like Ratchet & Clank: Rift Apart's chain, where the lane-mask pointer faults as outside the snapshot. On GitHub's runners (run) both fail in all 3 runs on Linux with the third commit's code (4a4db4bf94) and pass 10 of 10 with the fourth, with the other nested and pointer tests and agc_shader_disk_cache; the libc and libkernel suites pass. On Windows they skip without a Vulkan device and agc_shader_disk_cache passes. A run that mirrors CI's Linux job gives 1378 tests against 1376 on 4a4db4bf94, with only the two new tests changing.
  • Repeats: 10 of 10 for each.
  • Ratchet & Clank: Rift Apart (PPSA01474, 01.005.003), run by ps54all on Windows 11 with an NVIDIA GeForce RTX 3080 10 GB (driver 610.74), an i9-10850K, WinLibs GCC 15.2 and a Release build (comment). Their test branch (main 82f0c9aec with #6946, #6958, #7238, #7223, #6277, #6417, #6160 and #7300) plus this PR's three commits, cold shader cache, one run:
    • the GetSamplerResource stop no longer occurs (0 hits);
    • the title then stops 236 s in, on another compute shader, at an image read whose record pointer goes through six levels of Phi before LoadAddressU32 (GetImageResource dword 0 is not a valid runtime value). That is the title's next stop. The fourth commit (b91f0508d5) addresses that chain; Tamalero has since run the title with it (below).
  • Ratchet & Clank: Rift Apart (PPSA01474, 01.005.003), run by Tamalero on CachyOS (Linux 7.2) with an NVIDIA GeForce RTX 4090 (driver 615.78.08), GCC and a Release build (comment). This PR's head b91f0508d5 against #7223's head f4549448f as the control, both on main 66702f1cf (#7223's base) with no local patches, fresh shader cache, one run each:
    • the control stops about 480 s in, at GetSamplerResource dword 0 (pc=0x6b74, 3 refusals);
    • with this PR there are no sampler refusals, and neither stop from Tamalero's earlier runs of #7223 recurs: the S# at pc=0x6b74 and the T# at pc=0x7cbc;
    • the title then stops about 470 s in, on another compute shader, at GetImageResource dword 0 (pc=0x99ec, 3 refusals). Its record pointer goes through a deeper Phi nest, with a word of the Ballot lane mask ANDed into it (BitwiseAnd32), a shape the fourth commit doesn't cover. That is the title's next stop.
  • Ratchet & Clank: Rift Apart (PPSA01474), run by ps54all on Windows 11 with an NVIDIA GeForce RTX 3080 (driver 610.74), MinGW GCC 15.2.0 and a Release build (comment). Their test branch (main 82f0c9aec with open PRs, already carrying this PR's earlier commits) plus the fourth commit (b91f0508d5), one run each before and after:
    • the stop on compute shader 0x116bb5f500 (LoadAddressU32@pc=0x8fd4, six levels of Phi) no longer occurs;
    • the title then stops about 214 s in, on a black window, on compute shader 0x116bb67000 (GetImageResource dword 0 is not a valid runtime value, LoadAddressU32@pc=0x9a30): a seven-level Phi nest with a Ballot lane-mask word ANDed in and ReadFirstLane(SelectU32 …) arms. That is Tamalero's next stop (above) in a sibling shader: both chains read the record table at pc=0x1aa8, and the stop and the second buffer's reads sit 0x44 later than in Tamalero's (0x9a30, 0x908c and 0x900c against 0x99ec, 0x9048 and 0x8fc8).
  • Hardware test runs by Capmare at aed137caee, the head before the merge of main 61d3d3080c: Rocky Linux 10.2, Release, BUILD_TESTING=ON, 735 graphics tests per GPU, no title (comment):
    • NVIDIA GeForce RTX 4070 SUPER (driver 615.71.09): all 735 pass, agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table among them;
    • AMD Radeon RX 7600 (RADV, Mesa 25.2.7) and llvmpipe (Mesa 25.2.7): both new sampler tests pass 3 of 3 runs. On the RX 7600, agc_pipeline_cache_file fails, which Capmare reports as unrelated;
    • Intel UHD 770 (ANV, Mesa 25.2.7): both new sampler tests fail 3 of 3 runs, each reading the other test's expected sampler result ("lane 0 is 0x3e800000, expected 0x427d0000" and the reverse). On ANV, workgroup 1 gets workgroup 0's sampler through the non-uniform sampler-array pick. Capmare reproduced it in a standalone Vulkan program with no AnyPS5 code (a compute stage with requiredSubgroupSize = 32, local_size_x = 32 and a sampler array of more than 2 elements indexed per workgroup), so it's an ANV issue, filed as Mesa issue 16622 and fixed by Mesa !37394, in Mesa 25.3.0 and later (comment) (comment, comment). The tests stay as they are. The existing nested image-table tests pass on all three GPUs.
  • Intel Arc on Windows, by @BKlaasWerkman (comment), in a run of #9969's stack, which carries this PR's commits: Intel Arc Graphics (Meteor Lake, driver 101.9150), Windows 11, with the Khronos validation layer. agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table fail with the same lines as on ANV. @BKlaasWerkman's rerun on the same Intel Arc, of this PR alone merged into main 938812df14 (comment), and #9969's head d01f290417 merged into the same main (comment): both tests fail 3 of 3 by default and pass 3 of 3 with APS5_SPANNED_WAVE=1, which spans the program over two full 32-lane subgroups. That switch made both pass on ANV too (comment), so this points to the same cause as there. Xe-LPG is Gfx12 as well. Mesa 25.3's fix doesn't reach Intel's Windows driver (101.9150). On an NVIDIA GeForce RTX 3060 Ti (617.42) in the same run both pass, and neither GPU reports a new VUID- message.
  • Marvel's Wolverine (PPSA03671), by Capmare (comment): this PR at 59b319a779 (an earlier head) with no local patches, Rocky Linux 10.2, NVIDIA GeForce RTX 4070 SUPER (615.71.09), a cold shader cache, one run of about 9 minutes.
    • The sampler stop is gone: the log has no GetSamplerResource or GetImageResource refusal.
    • No frame was presented. The title created storage textures 284,392 times over 371 addresses, the same surfaces thousands of times each, and at about 4 minutes the GPU's memory was at 11.9 of 12 GB.
    • main does the same with this title (comment, #6099), so that's the title's next stop, not this PR's.
  • Merged with main 61d3d3080c (ed4f148a3c), on GitHub's runners (run): the ^agc tests pass on Linux (734, 0 failed, 49 skipped), and the suites' only failure is libc's precise_wait timing test. On Windows, where 551 of the 734 skip without Vulkan, the only failures are agc_driver_pm4_replay_tool and agc_shader_replay_tool (exit code 0xc0000139), which fail the same way on that runner for an unrelated branch (run).
  • Merged with main ff2fc57153 (59b319a779, the head), on GitHub's runners (run): the ^agc and ^shader tests pass on Linux (739, 0 failed, 49 skipped), and the suites' only failure is again libc's precise_wait timing test. On Windows, where 551 of the 738 skip without Vulkan, the only failures are again agc_driver_pm4_replay_tool and agc_shader_replay_tool (exit code 0xc0000139).
  • 4661f4bab5, a merge of 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 (16 tests) pass 10 runs in a row on Linux. On Windows the set has 18, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 13, 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.
  • Not tested: a title run past Marvel's Wolverine (PPSA03671)'s texture rebuilds above.
  • 319fa1f360, a merge of main 379b1dca32. main's #7880 changed the indirect-column builder this PR also changes: it reads a record pointer's words through UnwrapTableRead and checks that the offset is available where the handle is (AvailableAt). The conflicts in ResourceTracker.cpp keep both: this PR's record-origin walk, and #7880's unwrap of the high word and its dominance check. FormatVersion goes to 47, above main's 46.
    • The planner behaviour changes with the merge: a record pointer now counts as merged only when its Phi isn't a single record read. A Phi that #7880 reduces to one table read (its Phi-behind-hops case) takes the unmerged path and plans, where this PR's hop guard refused it. Without that change 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).
    • 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: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 skip (Vulkan device tests; the runner has none), 0 fail.
    • The full ^agc set once (run): Linux 973 run, 908 pass, 64 skip, 1 fail; Windows 992 run, 272 pass, 718 skip, 2 fail. The failures are agc_driver_sgpr_pattern_fill_keys on Linux ("the dispatch completed 17 times without a pending write over the keys") and agc_driver_pipelined_metadata_pass and its _draw_pipeline variant on Windows (vkCreateInstance returns -9 on the device-less runner). main 379b1dca32 shows the same three with the same messages (run); agc_driver_sgpr_pattern_fill_keys failed 1 of 4 runs there.
    • 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. It merges cleanly with current main.
  • 2525821ac9, a merge of main c9b2660d56. main's #7550 took FormatVersion 47, the number this branch had, and git merged the two edits silently, so the merge moves this PR to 50. This PR's own diff is otherwise 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: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 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.
  • 71741a70b6, a merge of #7223's f1cc524085 (yabanana's merge of main c8d34aa8f4, which moves #7223 to FormatVersion 48). Two conflicts, each resolved to this PR's side, which already holds the other side's content: FormatVersion stays 50, and in ResourceTracker.cpp the old one-argument PointerRecordOrigin line gives way to this PR's two-argument version and its helpers, at its one call site. The merge brings in exactly main's c9b2660d56 to c8d34aa8f4 changes (249 files, each the same as main's own), so 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: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 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.
    • An ^agc sweep, once (run): Linux 1,009 run, 945 pass, 64 skip, 0 fail. Windows 1,037 run, 292 pass, 740 skip, 5 fail. agc_submit_progress, agc_submit_progress_no_timeline, agc_driver_pipelined_metadata_pass and agc_driver_pipelined_metadata_pass_draw_pipeline stop at vkCreateInstance (-9) on GitHub's runner, which has no Vulkan device, as on main c9b2660d56 alone (run). agc_driver_frame_replay fails with the replay did not reproduce the second copy, the intermittent Windows failure tracked in #10711, which #10715 (open) quarantines on Windows. Run alone on Windows 20 times in a row, it passes on this head (run) and on main c8d34aa8f4 (run).
  • 9343a179b3: 7808540443, a merge of #7223's 153400ba2b, then a test-only commit (run).
    • The merge: yabanana's 153400ba2b merges main 0d62324ce2 into #7223 and moves it to FormatVersion 49, above main's 48. That line was the one conflict, and it stays 50 here. This PR's own diff is unchanged.
    • 9343a179b3 drops agc_driver_nested_sampler_table's check that a V# with another buffer consumer is refused, one 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. The sampled results, sharing and budget checks stay.
    • The pointer, nested, image-table and disk-cache tests, with agc_pipeline_cache_file and agc_driver_sgpr_pattern_fill_keys, ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (agc_pipeline_cache_file), 0 fail. Windows: 14 run, 6 pass, 8 skip (the seven Vulkan device tests, as the runner has no device, and agc_pipeline_cache_file), 0 fail.
    • Suites: libc and libkernel pass on Linux (158 and 217). On Windows libc passes (187), and libkernel has 4 failures of 239. guest_raise_exception failed after "address waking round 20: 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.
  • ca14648806, a test-only commit (run). It drops agc_driver_nested_sampler_table's check that an S# with another consumer is refused, with the refused helper it was the last user of, under the rule that tests don't assert that a shape the code doesn't support yet throws. #9790 plans that S# and checks its sampled result. The sampled results, sharing and budget checks stay. The pointer, nested, image-table and disk-cache tests with agc_pipeline_cache_file and agc_driver_sgpr_pattern_fill_keys ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (agc_pipeline_cache_file), 0 fail. Windows: 14 run, 6 pass, 8 skip (the seven Vulkan device tests and agc_pipeline_cache_file), 0 fail. Suites: libc and libkernel pass on Linux (158 and 217). On Windows libc passes (187), and libkernel passes 236 of 239: 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.
  • ca5ba6296f, a merge of main 38ccd50f83 (run). main now has #11507 (hugodearaujo's short-cube sampling), which takes FormatVersion 49 (b9f4f65904); that line was the one conflict, and this PR keeps its 50 (see Version bumps above). #11507 also adds an ImageResource field, sampledOnly, which ShaderDiskCache.cpp encodes next to this PR's fields without a conflict. This PR's diff over main is the same apart from the FormatVersion line's old value. The pointer, nested, image-table and disk-cache tests with agc_pipeline_cache_file, agc_driver_sgpr_pattern_fill_keys and #11507's agc_driver_image_sample_short_cube ran 10 times with no failure. Linux: 13 run, 12 pass, 1 skip (agc_pipeline_cache_file), 0 fail. Windows: 15 run, 6 pass, 9 skip (the eight Vulkan device tests and agc_pipeline_cache_file), 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.
  • e04a705765: d908758281, a test-only commit, 86d97d969a, a merge of #7223's 0dbf5478b2, and e04a705765, the format commit (run).
    • d908758281 drops agc_driver_nested_image_table's two checks that a valid shader is refused, one whose parent V# also feeds another buffer consumer and one whose T# has another consumer, with the refused helper they were the last users of, under the rule that tests don't assert that a shape the code doesn't support yet throws (raised on #9457, #9790 and #10846). Neither shape is implemented. The sampled-result, wrap, bounds, non-buffer and empty-dictionary checks stay. The PRs stacked on this one take the commit through their merges, so none of the stack's tests asserts the not a valid runtime value refusal any more.
    • 86d97d969a takes yabanana's 0dbf5478b2, which merges main f7e84c4cf1 into #7223 and moves #7223 to FormatVersion 50. Clean: both sides had moved the line to 50.
    • e04a705765 gives this PR its own disk-cache format, 51, one above #7223's 50, so a cache written by #7223's recompiler isn't read as this one's (see Version bumps above). Apart from that line and d908758281, this PR's diff over #7223 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: 19 run, 19 pass, 0 skip, 0 fail. Windows: 21 run, 8 pass, 13 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.
  • 4769d5a745, a test-wording commit (run), for the last part of oneandonlydean's item 1 and XairRrR's first non-blocking point. The nested image table and nested sampler table tests no longer check refusals, so their success lines no longer say "and refusals". The nested image table line (ImageTable.cpp:1635) is #7223's own, from Daniele Giovane's ad44bc41bb; it's in this branch through the merges of #7223, and this commit changes it here. The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 19 run, 19 pass, 0 skip, 0 fail. Windows: 21 run, 8 pass, 13 skip, 0 fail; the 13 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.
  • f4781de1f7: 480c25a6b1, a merge of main a5939f10a8, 94a16af777, a merge of #7223's 7f36e41c45, and f4781de1f7, the format commit (run).
    • 480c25a6b1: one conflict, FormatVersion. This PR's own diff is unchanged except that its removed line now reads main's 50.
    • 94a16af777: clean.
    • f4781de1f7: moves this PR to 63 (Version bumps above).
    • ×10: the image-table, nested, pointer, disk-cache and nested-snapshot tests.
      • Linux: 31 run, 31 pass, 0 skip, 0 fail.
      • Windows: 33 run, 24 pass, 8 skip (Vulkan device tests; the runner has none), 1 fail. The failure is #7223's agc_shader_nested_snapshot_retry, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. 5fdf20fc3d, below, fixes it.
  • 967f0dbebb, the lone nested sampler table's epoch check.
    • The test: agc_shader_nested_sampler_snapshot_retry runs the nested retry check with an S# child column and a sampler as the only table. Its registration gives it libc's directory on PATH on Windows, in the same commit.
    • Red, on f4781de1f7, 3 of 3 runs on both runners: "nested retry: expected inner retry and outer revalidation". Green: 10 of 10 (run).
    • ×10 at this head (run):
      • Linux: 32 run, 32 pass, 0 skip, 0 fail.
      • Windows: 34 run, 25 pass, 8 skip, 1 fail. The new test passes; the one failure is #7223's test above.
      • The libc and libkernel suites run 198 and 306 tests on Linux and 225 and 326 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.
  • 1f158eb5e0, a merge of main 0836dfdf4f (run, on fc6a89d796, which has the same tree). #12862 moved libSceAgcDriver's test registrations into tests/cmake/; the conflict in CMakeLists.txt is resolved with tools/agc_test_split.py resolve, which moves this PR's registrations into tests/cmake/agc_driver_image_table_tests.cmake (+11) and tests/cmake/agc_shader_memory_tests.cmake (+7). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With -DBUILD_TESTING=ON, ctest -N gives 3084 tests: main's 3075 plus its 9 tests, each listed once. The 11 tests of this PR's verify set ran 10 times in a row. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 11 run, 2 pass, 8 skip (no Vulkan device), 1 fail: agc_shader_nested_snapshot_retry, #7223's test, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. It failed the same way before this merge (run at 967f0dbebb, run at f4781de1f7), and resolve moved its lines byte for byte. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • 5fdf20fc3d: libc on PATH for both nested snapshot retry tests on Windows, at oneandonlydean's request on #10846 (comment). tests/cmake/agc_shader_memory_tests.cmake's Windows set_tests_properties now names #7223's agc_shader_nested_snapshot_retry beside this PR's agc_shader_nested_sampler_snapshot_retry, so the 0xc0000135 failure noted above is gone. It's one line, and nothing else changes.
    • Red (run) at 1f158eb5e0: on Windows, agc_shader_nested_snapshot_retry exits with 0xc0000135 and the sampler retry passes. Linux passes both.
    • Green: both retry tests ×10 (run). Linux: 2 run, 2 pass, 0 skip, 0 fail. Windows: 2 run, 2 pass, 0 skip, 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 5fdf20fc3d, from TechLevelZero's NVIDIA bot (report): merged onto main e6f5730, driver 595.99.02, Ubuntu 26.04.1, 2,543 of 3,148 tests selected.
    • 2,492 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 941 tests on the GPU. 9 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.
  • 3283b23aac, a merge of main 88e804b0a7 (run). main now has Ondra97's #7694 (scalar-address descriptor Phis), which adds DescriptorSource::requiredBlocks to the shader plan encoding, and JJenkx's #6959, which moves FormatVersion to 51. Three conflicts, each keeping both sides. In ShaderDiskCache.cpp the encoder writes this PR's pointerKeyed and then #7694's requiredBlocks, in the order the decoder reads them, and the static checks take both changes: DescriptorSource 224 bytes with 4 fields, TableColumn 120 bytes with 20, and at least 82 bytes per encoded descriptor source. FormatVersion stays 63, and agc_shader_memory_tests.cmake registers this PR's two snapshot-retry tests and #7694's agc_shader_descriptor_phis. This PR's changed lines are the same apart from those numbers, and its #include <unordered_set> in ResourceTracker.cpp leaves the diff because #7694 adds the same line. 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: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 11 pass, 13 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.
  • 6cb37cc9ed, a merge of main 4f64f81ef7, which brings B-Howell's #12246 (1D array layer rows). #12246 adds resourceViews, a table's registered image views, to the image-table column snapshot.
    • Both sides kept in ResourceMaterializer.cpp: the table equality check compares this PR's nested, pointerKeyed and pointers and #12246's resourceViews, and the footprint keeps #12246's loop over resourceViews with this PR's table.pointers.size() * 2u added to its first line.
    • A code change inside the merge commit: #12246 adds a loop to Snapshot(source, table) that records each table's registered image views and checks image.table != table. #7223, which this PR is built on, copies a column's records in a helper, CopyRecords, that nested child columns use too, and git placed the loop there, where table isn't in scope, so the merge didn't build. The merge commit moves the loop back into Snapshot, right after out = CopyRecords(records). image.table only ever indexes a top-level table (ResourceTracker::AssignTables), and nested children are reached only through a parent record's code, so nested children having no registered views is exact. It's folded into the merge so that no commit fails its tests.
    • FormatVersion stays 63, and this PR's diff over main is otherwise unchanged.
    • ×10 (run): 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: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 11 pass, 13 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.
    • The runs of every agc test on the stack's two tips, #9749 and #9969, cover this merge's code (see those PRs).
  • 63b5c09df9, a merge of main 4f41f4c375 (×10, the PR's own tests ×10).
    • The conflicts: ShaderDiskCache.hpp's FormatVersion, where main is now at 52 (#10000) and this PR keeps its 63; and docs/dev/debt/shader.md, where this PR's entries and main's new entries 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, ^agc_shader_sampler_limits, ^agc_shader_nested or ^agc_shader_table. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 11 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.
    • ×10 of every ^agc_driver_pointer_ and ^agc_driver_nested_ test, the image-table tests in this PR's diff over main, which the first run's names left out. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 0 pass, 7 skip (no Vulkan device), 0 fail.
  • 014d1e30c3: 4d820bdb47, a merge of main c2eafe4461, which brings yabanana's #7223, and 014d1e30c3, a debt-entry sentence (×10).
    • The conflicts: this branch's additions on top of #7223's final code, each resolved to this PR's side, which already holds #7223's content: its tests in the image-table test list (tests/cmake/agc_driver_image_table_tests.cmake), pointerKeyed in the image-table column and its equality check (ResourceMaterializer.cpp), the plan encoder's field count and list version (ShaderDiskCache.cpp), and ShaderDiskCache.hpp's FormatVersion, which stays 63 (main is at 56 since #7223).
    • A registration git doubled without a conflict: in tests/cmake/agc_shader_memory_tests.cmake, git kept both #7223's agc_shader_nested_snapshot_retry block and this PR's, which registers it beside agc_shader_nested_sampler_snapshot_retry, so CMake refused the second add_test. The merge keeps one block, this PR's, at #7223's place.
    • This PR's diff over main is now its own changes only: 15 files, 530 insertions and 45 deletions.
    • 014d1e30c3 adds a sentence to the "Nested image tables" debt entry: a T# reached through a nested child is materialized from its raw words, without registered resourceViews, so a 1D array past maxImageArrayLayers keeps its raw descriptor there.
    • ×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: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 10 pass, 14 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,894 of 3,883 tests selected. 2,840 passed, 5 failed and 49 skipped. None of the failures is new: 3 also fail on main, and 2 are unstable on main. With VK_LAYER_KHRONOS_validation, there are no new validation IDs against main, over 980 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.
  • 0ce8d173a3, a merge of main 8eaf82f315 (×10).
    • The conflict: docs/dev/debt/shader.md, where JJenkx's #15305 adds a "runtime resource snapshot" entry right above "Nested image tables", whose wording this PR changes. Both stay, #15305's entry first. 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: 23 run, 23 pass, 0 skip, 0 fail. Windows: 25 run, 10 pass, 15 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.
  • 86527d2f76, a merge of main 006d11fca5 (×10).
    • The conflict: ShaderDiskCache.hpp's FormatVersion, where frankea's #9020 moves main from 56 to 57. This PR keeps its 63. Its 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: 23 run, 23 pass, 0 skip, 0 fail. Windows: 25 run, 10 pass, 15 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.
  • 85e79949ae, a merge of main dd7c8de5de (×10).
    • The conflicts: ShaderDiskCache.hpp's FormatVersion, where #10489 moves main from 57 to 60; this PR keeps its 63. And docs/dev/debt/shader.md, where #10489 rewords the entry after this PR's pointer-keyed image-table entry (the image limit is now 128). The merge keeps this PR's entry and #10489's wording. 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: 37 run, 37 pass, 0 skip, 0 fail. Windows: 39 run, 10 pass, 29 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.
  • 3309a349f6: 0157b8d469, a merge of main 017bd95f5f, and the format commit 3309a349f6 (×10).
    • The conflict: ShaderDiskCache.hpp's FormatVersion, where zaryabzip's #14636 moves main from 60 to 68, above this PR's 63. The merge takes 68, and the format commit moves this PR to 79: every number from 69 to 78 is held by an open PR, from a check of every open PR's head on 11-10. 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: 37 run, 37 pass, 0 skip, 0 fail. Windows: 39 run, 10 pass, 29 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.
  • 40d718d87b, a merge of main e22c5fb941, without conflicts (×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: 38 run, 38 pass, 0 skip, 0 fail. Windows: 40 run, 11 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 379 and 372 tests on Linux and 406 and 400 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.
  • e9ddd12bd2, a merge of main bd278f3654 (×10).
    • The conflict: only ShaderDiskCache.hpp's FormatVersion line, where imellag's #19530 moves main from 68 to 69. The merge keeps this PR's number: main's 69, this PR's 79. This PR's other changed lines are unchanged.
    • ×10: the same tests as on 40d718d87b. Linux: 38 run, 38 pass, 0 skip, 0 fail. Windows: 40 run, 11 pass, 29 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.
  • 3c58f422ee, a merge of main 328cbf673e (×10, with #21255's test change).
    • The conflict: only ShaderDiskCache.hpp's FormatVersion line, where Pipodi's #18455 moves main from 69 to 88, above this PR's 79. The merge moves this PR to 93, and the PRs stacked on it take 94 to 99 in turn (see the ladder above). This PR's other changed lines are unchanged.
    • ×10: the same tests as on e9ddd12bd2. Linux: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 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 3c58f422ee (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, ANYPS5_REQUIRE_DISPLAY=1 and ANYPS5_NO_SHADER_CACHE=1. This head 3c58f422ee merged onto main 1ccc399b17 (clean), against main 1ccc399b17 alone, ctest -R '^(agc_driver_image_table.*|agc_driver_nested_.*|agc_driver_pointer_phi_.*|agc_shader_memory|agc_shader_disk_cache|agc_shader_nested_.*)$'. main: 35 of 35 pass. This PR: 40 of 40 pass, including the five tests in that set that main doesn't have: agc_driver_nested_sampler_table, agc_driver_pointer_phi_sampler_table, agc_driver_pointer_phi_ballot_table, agc_driver_pointer_phi_copies_table and agc_shader_nested_sampler_snapshot_retry. No VUID- line on either side, and every device test selected the RTX 4090.
  • ef102a3a52, a merge of main d89f26516c (×10, with #21255's test change).
    • The conflict: only ShaderDiskCache.hpp's FormatVersion line, where Celegans12's #6416 moves main from 88 to 90. The merge keeps this PR's 93, and the PRs stacked on it keep 94 to 99. This PR's other changed 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: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 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 ef102a3a52 (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 ef102a3a52. 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, in #8939's and #9633's runs (#8939, #9633): 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. #8939's 606212c86e and #9633's 2f104ac486 both carry this PR's head ef102a3a52. In both, the new tests pass, agc_driver_nested_sampler_table among them, and of the 1296 and 1302 tests the changes reach, the only failures are ones main also fails on that GPU (#23232, #23711, #23942).
  • 5b21241399, a merge of main d50640e264 (×10, with #21255's test change).
    • The conflict: only ShaderDiskCache.hpp's FormatVersion line, where edubox's #21758 moves main from 90 to 91. The merge keeps this PR's 93, and the PRs stacked on it keep 94 to 99. This PR's other changed 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: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 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 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 dc97c68c75, which holds this PR's 5b21241399 (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.
    • 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 Intel Xeon Platinum 8573C and 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.

Overlap

  • #20519 and #22424 (slopezjur, the opt-in bindless image heap and, on it, layout-only pointer tables): conflicts in six files, each resolved by keeping both sides (git merge-tree on main 5adb7d22ab):
    • ControlFlowInfo.hpp: each adds a TableColumn field, pointerKeyed here and dynamic in #20519, with its operator== term. The recompiler's ShaderDiskCache.cpp encodes and decodes both, in the same order.
    • The plan encoder's static checks merge without a conflict but need an edit: both raise fieldCount<TableColumn>() from 19 to 20, so with both fields it's 21, and the sizes need rechecking. The build catches it.
    • ResourceMaterializer.cpp: the capture and the plan output keep both sides' lines.
    • ResourceTracker.cpp: in the heap-handle check, this PR drops sampler || and #20519 returns runtimeAddress() in place of false, so the merged line takes both.
    • ImageTable.cpp's test options keep both. FormatVersion is a one-line conflict that keeps this PR's 93, 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.

Checklist

  • Based on #7223's 74700a08d1, merged with #7223's head 7f36e41c45 and main dd7c8de5de, which has #7223; 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: none; #7223 has merged
  • Fixes: none (related: #6191)
  • Unblocks: none on current main (see What)
  • GPUs tested: Mesa lavapipe 25.2.8 (llvmpipe, LLVM 20.1.2), Linux (GitHub's runner and a cloud machine); NVIDIA GeForce RTX 4070 SUPER, AMD Radeon RX 7600 (RADV) and Intel UHD 770 (ANV, Mesa 25.2.7: the two new sampler tests fail there, Mesa issue 16622, fixed in Mesa 25.3.0), Linux (Capmare); NVIDIA GeForce RTX 3060 Ti (617.42) and Intel Arc Graphics (Meteor Lake, 101.9150: the two new sampler tests fail there too, and pass with APS5_SPANNED_WAVE=1), Windows 11, with the validation layer (BKlaasWerkman, in #9969's stack); NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); NVIDIA GeForce RTX 4090 (driver 620.70.06, Arch Linux, with the validation layer), by @domx4q; 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:4906383569 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T04:33:56Z. --- ### What #7223 has merged. With #7223, Marvel's Wolverine (PPSA03671) and Ratchet & Clank: Rift Apart (PPSA01474) stopped on the sampler half of the descriptor chain that #7223 resolves for images (#6191): - **Marvel's Wolverine** (Capmare, [comment](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6242805290), main 66702f1cf + #7223 + local patches, Linux): ``` GetSamplerResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x0000bb28(GetBufferResource(LoadAddressU32@pc=0x0000bb18(GetAddressResource(ReadConstBuffer@pc=0x00002454(GetBufferResource(ReadConst(GetSrtResource, Immediate) x4), ShiftLeftLogical32(ReadFirstLane(SelectU32(...), Phi), Immediate)), ... ``` - **Ratchet & Clank: Rift Apart** (ps54all, [comment](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6241848739), main 82f0c9aec + picks + #7223, Windows): ``` ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00006b74(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediat... ``` **Ratchet & Clank: Rift Apart (PPSA01474), 11-13:** this PR got the title past its `pc=0x6b74` sampler stop on `main` 66702f1cf (Tamalero's run, see Tested). 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` fb542a2b6f, which has #14636, all five of this PR's tests fail 3 of 3 without its code and pass 3 of 3 with it (llvmpipe, a cloud Linux machine). #7223 resolves record → pointer → V# → T# and leaves samplers refused. Its nested table representation, pointer dictionary and limits are what this PR builds on. The PR extends them to samplers and to a one-hop pointer whose low word is merged through a Phi. This PR's first fix, `fix(shader): refuse nested table entries whose words have other consumers` (0df7d3256e), is now in #7223 (d132754dbe, with its authorship). On #7223's earlier head, a nested child whose descriptor words another instruction also reads crashed lavapipe inside the shader. Four commits remain here: 1. **`feat(shader): resolve S# reads through nested descriptor tables`.** This is the record → pointer → V# → S# chain of Marvel's Wolverine (PPSA03671)'s stop above (`pc=0xbb28`) and of the one at `pc=0xb600`. This PR plans the S# when it sits at a keyed offset of the V#. At `pc=0xb600` it sits at a fixed offset, which this PR doesn't plan and #9457 does (mrfelek's offline replay of #9969's head, [comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6688310709)). The `pc=0xbb28` line doesn't show its S#'s offset. - The tracker's nested branch now accepts sampler columns. The materializer and the emitter already handled 4-dword sampler words. - #7223's limits apply unchanged: the nested and parent key budgets, and the 256-entry S# budget. - The plan encoding is unchanged. - **Marvel's Wolverine's later stops,** from mrfelek's replay and game run with #9969 merged on ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6692451188)). Past `pc=0xb600`, the shader stops at `pc=0xb9f8`, then at `pc=0xd0f0` (records linked through words that are also a V#'s base) and at `pc=0xef7c` (pointers from a second record table). mrfelek's #16472, on top of #9749, takes `pc=0xb9f8`. In their replay with #9969 merged on, it plans past it and stops at `pc=0xd0f0`; their game run with the same step and their local stencil and image-table changes stops there 168 s in. No open PR of ours takes `pc=0xd0f0` or `pc=0xef7c`. 2. **`feat(shader): look up a Phi-merged record pointer to an S# or T#`.** This is Ratchet & Clank's shape: record → pointer → S# through an address, with the pointer's low word merged through a Phi. - A direct indirect column becomes pointer-keyed and reuses #7223's sorted pointer dictionary. - A pointer the snapshot didn't capture faults as outside the snapshot, and a null pointer faults as unmapped. The same path serves T#s. - The disk-cache format goes from 42 to 43, and the image-table ABI from 3 to 4. 3. **`fix(shader): accept a lane-mask word in a pointer-keyed record pointer`.** Ratchet & Clank: Rift Apart's next stop (ps54all, [#6191](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6246149739)): `GetImageResource dword 0 is not a valid runtime value`. A T# is read through a record pointer whose low word passes six levels of Phi, and one arm is a word of the waterfall loop's `Ballot` lane mask. - A pointer-keyed column now accepts such an arm as one that can't be a record pointer, as it does for constants. It also accepts copies of the record word read under other keys (same table, offset, stride and addend), since the lookup is by the pointer's value. - At run time, a pointer built from a lane mask faults as outside the snapshot. - This commit leaves the disk-cache format as it is: shaders that planned before plan the same way, and only ones refused before now plan. 4. **`fix(shader): check the descriptor epoch for a lone nested sampler table`** (967f0dbebb). A shader whose only table is a nested S# table now gets the same descriptor-epoch retry as images. - **The cause:** the tracker builds nested S# columns, whose heap source is itself a table column, but `TableSnapshotter::Run()` still widened `hasIndirect` for samplers only on `column.indirect`. Such a shader skipped the snapshot's own epoch check and retry, and relied on the whole-snapshot revalidation alone. - **The fix:** the sampler loop now uses the same test as the image loop. - **What the old code missed:** the per-attempt retry, the budget reset and the forced sync, so the severity is low-medium. It didn't produce a torn snapshot, and no title has shown it. **Ordering.** This PR was stacked on #7223, which has merged. Its first three commits sit on #7223's 74700a08d1, and the branch then merges `main` a5939f10a8 (480c25a6b1) and #7223's head, now 7f36e41c45 (94a16af777). The fourth commit sits on top. With 4d820bdb47, a merge of `main` c2eafe4461, which has #7223, this PR's diff over `main` shows only its own changes. - **The restack:** the three commits were moved onto that head, as asked in [this comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6293185624). Each conflict takes #7223's code and re-applies this PR's change on it. In particular, `TableColumn` keeps #6232's `selected` and `selection` and adds `pointerKeyed` after them, and the plan encoder, the plan hash and `sameColumns` take the new field. - **Earlier merges:** this branch's earlier merges of `main` are gone with the restack, and #7223's own merge with `main` replaces them. The first of them took its conflict resolutions from blawesom's rebase of this branch onto `main` ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6248752249)) and credited blawesom as co-author. - **Version bumps:** - The disk-cache format is 93 here (3c58f422ee). `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. - The image-table ABI is 4 here (3 on #7223 and #6488, 2 on `main`). - #6488 moves the disk-cache format too, so whichever of this PR and #6488 lands second takes the next free numbers. ### Tested - **The restack** (41220941d8, 9200c3a2d5, f6fb8b64a9, on #7223's 74700a08d1), Linux, lavapipe (LLVM 20.1.2), CI's configuration, a cloud worker: - each commit builds and passes its own tests; - at the head, the nested and pointer-Phi table tests, `agc_shader_disk_cache`, `agc_shader_bindless` and the rest of the image-table family (21 tests) pass 10 runs in a row; - the `^(agc|shader)` tests pass, 838 of 838. - **The restack merged with current `main`**, as CI builds it (0863efbfa4, `main` a07e985c8f), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39549558783)): the nested and pointer-Phi table tests, `agc_driver_image_table`, `agc_shader_disk_cache` and `agc_shader_bindless` pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass, and the libc and libkernel suites pass on both. - The runs below are from the heads before the restack. The three commits' own changes are the same, apart from the conflict resolutions. - **Merged with `main` 9caecfd2d5** (aed137caee, the head), on GitHub's runners, at 3730bb899e, the same merge with the same tree before the co-author line was added ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39119686129)): on Linux the `^agc` tests pass 3 runs in a row, 715 tests: 667 pass, 48 skip, 0 fail. The libc and libkernel suites pass on both runners. On Windows, of 714 `^agc` tests 173 pass 3 runs in a row and 539 skip, since the runner has no Vulkan device; the only failures are `agc_driver_pm4_replay_tool` and `agc_shader_replay_tool`, which fail the same way on that runner for an unrelated branch ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39061670036)). - **GitHub's Linux (lavapipe, Mesa 25.2.8) and Windows runners** ([verify run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39087966966)): - `agc_driver_nested_image_table`, `agc_driver_nested_sampler_table`, `agc_driver_pointer_phi_sampler_table`, `agc_shader_disk_cache` and `agc_shader_disk_cache_large_file` pass 10 of 10 runs on both runners. Three of them skip on the Windows runner. - The libc and libkernel suites pass. - With #7223's code the new tests don't build, so the red below is from the Linux run. - **Linux, a run that mirrors CI's Linux job** (Ubuntu 24.04, GCC 13.3, lavapipe Mesa 25.2.8 / LLVM 20.1.2): 1376 tests on this branch, with the same 5 IPv6 failures as on #7223's head on that machine. No new failures or skips. - **New tests, red on #7223's head and green here:** - `agc_driver_nested_sampler_table`: S# through record → pointer → V#. It covers independent keys, wave32 against wave64, an edited S#, unmapped and non-buffer parents, shared children, the refusal of an S# with another consumer, captured and uncaptured Phi pointers, the S# budget and the nested key budget. Red: `GetSamplerResource dword 0 is not a valid runtime value`. - `agc_driver_pointer_phi_sampler_table`: S# through a Phi-merged record pointer. It covers the direct control, captured and uncaptured Phi constants, a constant equal to another record's pointer, a null pointer, a non-buffer record table, an S# with another consumer, and a T# through the same path. - `agc_driver_nested_image_table` gains "a T# with another consumer" (refused). Red is a SIGSEGV on #7223's head. - `agc_shader_disk_cache` round-trips both new plan shapes and rejects a malformed pointer-keyed column. - **The fourth commit's tests** (b91f0508d5), `agc_driver_pointer_phi_ballot_table` and `agc_driver_pointer_phi_copies_table`: synthetic wave64 waterfall loops shaped like Ratchet & Clank: Rift Apart's chain, where the lane-mask pointer faults as outside the snapshot. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39102900806)) both fail in all 3 runs on Linux with the third commit's code (4a4db4bf94) and pass 10 of 10 with the fourth, with the other nested and pointer tests and `agc_shader_disk_cache`; the libc and libkernel suites pass. On Windows they skip without a Vulkan device and `agc_shader_disk_cache` passes. A run that mirrors CI's Linux job gives 1378 tests against 1376 on 4a4db4bf94, with only the two new tests changing. - **Repeats:** 10 of 10 for each. - **Ratchet & Clank: Rift Apart (PPSA01474, 01.005.003)**, run by ps54all on Windows 11 with an NVIDIA GeForce RTX 3080 10 GB (driver 610.74), an i9-10850K, WinLibs GCC 15.2 and a Release build ([comment](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6246149739)). Their test branch (`main` 82f0c9aec with #6946, #6958, #7238, #7223, #6277, #6417, #6160 and #7300) plus this PR's three commits, cold shader cache, one run: - the `GetSamplerResource` stop no longer occurs (0 hits); - the title then stops 236 s in, on another compute shader, at an image read whose record pointer goes through six levels of `Phi` before `LoadAddressU32` (`GetImageResource dword 0 is not a valid runtime value`). That is the title's next stop. The fourth commit (b91f0508d5) addresses that chain; Tamalero has since run the title with it (below). - **Ratchet & Clank: Rift Apart (PPSA01474, 01.005.003)**, run by Tamalero on CachyOS (Linux 7.2) with an NVIDIA GeForce RTX 4090 (driver 615.78.08), GCC and a Release build ([comment](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6247236255)). This PR's head b91f0508d5 against #7223's head f4549448f as the control, both on `main` 66702f1cf (#7223's base) with no local patches, fresh shader cache, one run each: - the control stops about 480 s in, at `GetSamplerResource dword 0` (pc=0x6b74, 3 refusals); - with this PR there are no sampler refusals, and neither stop from Tamalero's earlier runs of #7223 recurs: the S# at pc=0x6b74 and the T# at pc=0x7cbc; - the title then stops about 470 s in, on another compute shader, at `GetImageResource dword 0` (pc=0x99ec, 3 refusals). Its record pointer goes through a deeper `Phi` nest, with a word of the `Ballot` lane mask ANDed into it (`BitwiseAnd32`), a shape the fourth commit doesn't cover. That is the title's next stop. - **Ratchet & Clank: Rift Apart (PPSA01474)**, run by ps54all on Windows 11 with an NVIDIA GeForce RTX 3080 (driver 610.74), MinGW GCC 15.2.0 and a Release build ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6250828427)). Their test branch (`main` 82f0c9aec with open PRs, already carrying this PR's earlier commits) plus the fourth commit (b91f0508d5), one run each before and after: - the stop on compute shader 0x116bb5f500 (`LoadAddressU32@pc=0x8fd4`, six levels of `Phi`) no longer occurs; - the title then stops about 214 s in, on a black window, on compute shader 0x116bb67000 (`GetImageResource dword 0 is not a valid runtime value`, `LoadAddressU32@pc=0x9a30`): a seven-level `Phi` nest with a `Ballot` lane-mask word ANDed in and `ReadFirstLane(SelectU32 …)` arms. That is Tamalero's next stop (above) in a sibling shader: both chains read the record table at pc=0x1aa8, and the stop and the second buffer's reads sit 0x44 later than in Tamalero's (0x9a30, 0x908c and 0x900c against 0x99ec, 0x9048 and 0x8fc8). - **Hardware test runs by Capmare** at aed137caee, the head before the merge of `main` 61d3d3080c: Rocky Linux 10.2, Release, `BUILD_TESTING=ON`, 735 graphics tests per GPU, no title ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6253642463)): - NVIDIA GeForce RTX 4070 SUPER (driver 615.71.09): all 735 pass, `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` among them; - AMD Radeon RX 7600 (RADV, Mesa 25.2.7) and llvmpipe (Mesa 25.2.7): both new sampler tests pass 3 of 3 runs. On the RX 7600, `agc_pipeline_cache_file` fails, which Capmare reports as unrelated; - **Intel UHD 770 (ANV, Mesa 25.2.7): both new sampler tests fail 3 of 3 runs**, each reading the other test's expected sampler result ("lane 0 is 0x3e800000, expected 0x427d0000" and the reverse). On ANV, workgroup 1 gets workgroup 0's sampler through the non-uniform sampler-array pick. Capmare reproduced it in a standalone Vulkan program with no AnyPS5 code (a compute stage with `requiredSubgroupSize = 32`, `local_size_x = 32` and a sampler array of more than 2 elements indexed per workgroup), so it's an ANV issue, filed as [Mesa issue 16622](https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16622) and fixed by Mesa [!37394](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37394), in Mesa 25.3.0 and later ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6263589980)) ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6254952671), [comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6255067111)). The tests stay as they are. The existing nested image-table tests pass on all three GPUs. - **Intel Arc on Windows, by @BKlaasWerkman** ([comment](https://github.com/boykopovar/AnyPS5/pull/9969#issuecomment-6366702168)), in a run of #9969's stack, which carries this PR's commits: Intel Arc Graphics (Meteor Lake, driver 101.9150), Windows 11, with the Khronos validation layer. `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` fail with the same lines as on ANV. @BKlaasWerkman's rerun on the same Intel Arc, of this PR alone merged into `main` 938812df14 ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6369252849)), and #9969's head d01f290417 merged into the same `main` ([comment](https://github.com/boykopovar/AnyPS5/pull/9969#issuecomment-6369308193)): both tests fail 3 of 3 by default and pass 3 of 3 with `APS5_SPANNED_WAVE=1`, which spans the program over two full 32-lane subgroups. That switch made both pass on ANV too ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6254952671)), so this points to the same cause as there. Xe-LPG is Gfx12 as well. Mesa 25.3's fix doesn't reach Intel's Windows driver (101.9150). On an NVIDIA GeForce RTX 3060 Ti (617.42) in the same run both pass, and neither GPU reports a new `VUID-` message. - **Marvel's Wolverine (PPSA03671), by Capmare** ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6263302443)): this PR at 59b319a779 (an earlier head) with no local patches, Rocky Linux 10.2, NVIDIA GeForce RTX 4070 SUPER (615.71.09), a cold shader cache, one run of about 9 minutes. - The sampler stop is gone: the log has no `GetSamplerResource` or `GetImageResource` refusal. - No frame was presented. The title created storage textures 284,392 times over 371 addresses, the same surfaces thousands of times each, and at about 4 minutes the GPU's memory was at 11.9 of 12 GB. - `main` does the same with this title ([comment](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6267616619), #6099), so that's the title's next stop, not this PR's. - **Merged with `main` 61d3d3080c** (ed4f148a3c), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39155104362)): the `^agc` tests pass on Linux (734, 0 failed, 49 skipped), and the suites' only failure is libc's `precise_wait` timing test. On Windows, where 551 of the 734 skip without Vulkan, the only failures are `agc_driver_pm4_replay_tool` and `agc_shader_replay_tool` (exit code 0xc0000139), which fail the same way on that runner for an unrelated branch ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39061670036)). - **Merged with `main` ff2fc57153** (59b319a779, the head), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39166381505)): the `^agc` and `^shader` tests pass on Linux (739, 0 failed, 49 skipped), and the suites' only failure is again libc's `precise_wait` timing test. On Windows, where 551 of the 738 skip without Vulkan, the only failures are again `agc_driver_pm4_replay_tool` and `agc_shader_replay_tool` (exit code 0xc0000139). - **4661f4bab5, a merge of `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/39929545057)), the pointer, nested, image-table and disk-cache sets (16 tests) pass 10 runs in a row on Linux. On Windows the set has 18, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 13, 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. - **Not tested:** a title run past Marvel's Wolverine (PPSA03671)'s texture rebuilds above. - **319fa1f360, a merge of `main` 379b1dca32.** `main`'s #7880 changed the indirect-column builder this PR also changes: it reads a record pointer's words through `UnwrapTableRead` and checks that the offset is available where the handle is (`AvailableAt`). The conflicts in `ResourceTracker.cpp` keep both: this PR's record-origin walk, and #7880's unwrap of the high word and its dominance check. `FormatVersion` goes to 47, above `main`'s 46. - **The planner behaviour changes with the merge:** a record pointer now counts as merged only when its Phi isn't a single record read. A Phi that #7880 reduces to one table read (its Phi-behind-hops case) takes the unmerged path and plans, where this PR's hop guard refused it. Without that change 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/40065405938)). - Focused, ×10 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40077032904)): `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: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 skip (Vulkan device tests; the runner has none), 0 fail. - The full `^agc` set once ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40077477823)): Linux 973 run, 908 pass, 64 skip, 1 fail; Windows 992 run, 272 pass, 718 skip, 2 fail. The failures are `agc_driver_sgpr_pattern_fill_keys` on Linux ("the dispatch completed 17 times without a pending write over the keys") and `agc_driver_pipelined_metadata_pass` and its `_draw_pipeline` variant on Windows (`vkCreateInstance` returns -9 on the device-less runner). `main` 379b1dca32 shows the same three with the same messages ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40067086619)); `agc_driver_sgpr_pattern_fill_keys` failed 1 of 4 runs there. - 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. It merges cleanly with current `main`. - **2525821ac9, a merge of `main` c9b2660d56.** `main`'s #7550 took `FormatVersion` 47, the number this branch had, and git merged the two edits silently, so the merge moves this PR to 50. This PR's own diff is otherwise unchanged. On GitHub's runners, 10 runs ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40100067202)) 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: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 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. - **71741a70b6, a merge of #7223's f1cc524085** (yabanana's merge of `main` c8d34aa8f4, which moves #7223 to `FormatVersion` 48). Two conflicts, each resolved to this PR's side, which already holds the other side's content: `FormatVersion` stays 50, and in `ResourceTracker.cpp` the old one-argument `PointerRecordOrigin` line gives way to this PR's two-argument version and its helpers, at its one call site. The merge brings in exactly `main`'s c9b2660d56 to c8d34aa8f4 changes (249 files, each the same as `main`'s own), so this PR's own diff is unchanged. On GitHub's runners, 10 runs ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40133642277)) 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: 18 run, 18 pass, 0 skip, 0 fail. Windows: 20 run, 7 pass, 13 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. - **An `^agc` sweep**, once ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40133705498)): Linux 1,009 run, 945 pass, 64 skip, 0 fail. Windows 1,037 run, 292 pass, 740 skip, 5 fail. `agc_submit_progress`, `agc_submit_progress_no_timeline`, `agc_driver_pipelined_metadata_pass` and `agc_driver_pipelined_metadata_pass_draw_pipeline` stop at `vkCreateInstance` (-9) on GitHub's runner, which has no Vulkan device, as on `main` c9b2660d56 alone ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40109333265)). `agc_driver_frame_replay` fails with `the replay did not reproduce the second copy`, the intermittent Windows failure tracked in #10711, which #10715 (open) quarantines on Windows. Run alone on Windows 20 times in a row, it passes on this head ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40139278808)) and on `main` c8d34aa8f4 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40139387884)). - **9343a179b3: 7808540443, a merge of #7223's 153400ba2b, then a test-only commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40635841696)). - **The merge:** yabanana's 153400ba2b merges `main` 0d62324ce2 into #7223 and moves it to `FormatVersion` 49, above `main`'s 48. That line was the one conflict, and it stays 50 here. This PR's own diff is unchanged. - **9343a179b3** drops `agc_driver_nested_sampler_table`'s check that a V# with another buffer consumer is refused, one 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. The sampled results, sharing and budget checks stay. - The pointer, nested, image-table and disk-cache tests, with `agc_pipeline_cache_file` and `agc_driver_sgpr_pattern_fill_keys`, ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (`agc_pipeline_cache_file`), 0 fail. Windows: 14 run, 6 pass, 8 skip (the seven Vulkan device tests, as the runner has no device, and `agc_pipeline_cache_file`), 0 fail. - Suites: libc and libkernel pass on Linux (158 and 217). On Windows libc passes (187), and libkernel has 4 failures of 239. `guest_raise_exception` failed after "address waking round 20: 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. - **ca14648806, a test-only commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40656299613)). It drops `agc_driver_nested_sampler_table`'s check that an S# with another consumer is refused, with the `refused` helper it was the last user of, under the rule that tests don't assert that a shape the code doesn't support yet throws. #9790 plans that S# and checks its sampled result. The sampled results, sharing and budget checks stay. The pointer, nested, image-table and disk-cache tests with `agc_pipeline_cache_file` and `agc_driver_sgpr_pattern_fill_keys` ran 10 times with no failure. Linux: 12 run, 11 pass, 1 skip (`agc_pipeline_cache_file`), 0 fail. Windows: 14 run, 6 pass, 8 skip (the seven Vulkan device tests and `agc_pipeline_cache_file`), 0 fail. Suites: libc and libkernel pass on Linux (158 and 217). On Windows libc passes (187), and libkernel passes 236 of 239: `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. - **ca5ba6296f, a merge of `main` 38ccd50f83** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40665476301)). `main` now has #11507 (hugodearaujo's short-cube sampling), which takes `FormatVersion` 49 (b9f4f65904); that line was the one conflict, and this PR keeps its 50 (see Version bumps above). #11507 also adds an `ImageResource` field, `sampledOnly`, which `ShaderDiskCache.cpp` encodes next to this PR's fields without a conflict. This PR's diff over `main` is the same apart from the `FormatVersion` line's old value. The pointer, nested, image-table and disk-cache tests with `agc_pipeline_cache_file`, `agc_driver_sgpr_pattern_fill_keys` and #11507's `agc_driver_image_sample_short_cube` ran 10 times with no failure. Linux: 13 run, 12 pass, 1 skip (`agc_pipeline_cache_file`), 0 fail. Windows: 15 run, 6 pass, 9 skip (the eight Vulkan device tests and `agc_pipeline_cache_file`), 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. - **e04a705765: d908758281, a test-only commit, 86d97d969a, a merge of #7223's 0dbf5478b2, and e04a705765, the format commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40861088827)). - **d908758281** drops `agc_driver_nested_image_table`'s two checks that a valid shader is refused, one whose parent V# also feeds another buffer consumer and one whose T# has another consumer, with the `refused` helper they were the last users of, under the rule that tests don't assert that a shape the code doesn't support yet throws (raised on #9457, #9790 and #10846). Neither shape is implemented. The sampled-result, wrap, bounds, non-buffer and empty-dictionary checks stay. The PRs stacked on this one take the commit through their merges, so none of the stack's tests asserts the `not a valid runtime value` refusal any more. - **86d97d969a** takes yabanana's 0dbf5478b2, which merges `main` f7e84c4cf1 into #7223 and moves #7223 to `FormatVersion` 50. Clean: both sides had moved the line to 50. - **e04a705765** gives this PR its own disk-cache format, 51, one above #7223's 50, so a cache written by #7223's recompiler isn't read as this one's (see Version bumps above). Apart from that line and d908758281, this PR's diff over #7223 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: 19 run, 19 pass, 0 skip, 0 fail. Windows: 21 run, 8 pass, 13 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. - **4769d5a745, a test-wording commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/40946517635)), for the last part of oneandonlydean's [item 1](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6493454288) and XairRrR's first non-blocking point. The nested image table and nested sampler table tests no longer check refusals, so their success lines no longer say "and refusals". The nested image table line (`ImageTable.cpp:1635`) is #7223's own, from Daniele Giovane's ad44bc41bb; it's in this branch through the merges of #7223, and this commit changes it here. The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 19 run, 19 pass, 0 skip, 0 fail. Windows: 21 run, 8 pass, 13 skip, 0 fail; the 13 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. - **f4781de1f7: 480c25a6b1, a merge of `main` a5939f10a8, 94a16af777, a merge of #7223's 7f36e41c45, and f4781de1f7, the format commit** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41102456333)). - **480c25a6b1:** one conflict, `FormatVersion`. This PR's own diff is unchanged except that its removed line now reads `main`'s 50. - **94a16af777:** clean. - **f4781de1f7:** moves this PR to 63 (Version bumps above). - **×10:** the image-table, nested, pointer, disk-cache and nested-snapshot tests. - Linux: 31 run, 31 pass, 0 skip, 0 fail. - Windows: 33 run, 24 pass, 8 skip (Vulkan device tests; the runner has none), 1 fail. The failure is #7223's `agc_shader_nested_snapshot_retry`, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. 5fdf20fc3d, below, fixes it. - **967f0dbebb, the lone nested sampler table's epoch check.** - **The test:** `agc_shader_nested_sampler_snapshot_retry` runs the nested retry check with an S# child column and a sampler as the only table. Its registration gives it libc's directory on PATH on Windows, in the same commit. - **Red,** on f4781de1f7, 3 of 3 runs on both runners: "nested retry: expected inner retry and outer revalidation". **Green:** 10 of 10 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41112917552)). - **×10 at this head** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41121847208)): - Linux: 32 run, 32 pass, 0 skip, 0 fail. - Windows: 34 run, 25 pass, 8 skip, 1 fail. The new test passes; the one failure is #7223's test above. - The libc and libkernel suites run 198 and 306 tests on Linux and 225 and 326 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. - **1f158eb5e0, a merge of `main` 0836dfdf4f** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41243588174), on fc6a89d796, which has the same tree). #12862 moved `libSceAgcDriver`'s test registrations into `tests/cmake/`; the conflict in `CMakeLists.txt` is resolved with `tools/agc_test_split.py resolve`, which moves this PR's registrations into `tests/cmake/agc_driver_image_table_tests.cmake` (+11) and `tests/cmake/agc_shader_memory_tests.cmake` (+7). Nothing else conflicted. Apart from the move, this PR's diff is unchanged. With `-DBUILD_TESTING=ON`, `ctest -N` gives 3084 tests: `main`'s 3075 plus its 9 tests, each listed once. The 11 tests of this PR's verify set ran 10 times in a row. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 11 run, 2 pass, 8 skip (no Vulkan device), 1 fail: `agc_shader_nested_snapshot_retry`, #7223's test, which exits with 0xc0000135 before it starts, because its registration doesn't put libc's directory on PATH on Windows. It failed the same way before this merge ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41121847208) at 967f0dbebb, [run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41102456333) at f4781de1f7), and `resolve` moved its lines byte for byte. Suites: libc and libkernel pass on Linux (199 and 308) and on Windows (226 and 330). The suites ran with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **5fdf20fc3d: libc on PATH for both nested snapshot retry tests on Windows,** at oneandonlydean's request on #10846 ([comment](https://github.com/boykopovar/AnyPS5/pull/10846#issuecomment-6556303603)). `tests/cmake/agc_shader_memory_tests.cmake`'s Windows `set_tests_properties` now names #7223's `agc_shader_nested_snapshot_retry` beside this PR's `agc_shader_nested_sampler_snapshot_retry`, so the 0xc0000135 failure noted above is gone. It's one line, and nothing else changes. - **Red** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41295215343)) at 1f158eb5e0: on Windows, `agc_shader_nested_snapshot_retry` exits with 0xc0000135 and the sampler retry passes. Linux passes both. - **Green:** both retry tests ×10 ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41295208666)). Linux: 2 run, 2 pass, 0 skip, 0 fail. Windows: 2 run, 2 pass, 0 skip, 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/41301517969/job/124834685067)), merged onto `main` d262000: 39 tests, 39 passed, 0 skipped, 0 failed, both retry tests included. - **NVIDIA RTX 2000 Ada Generation** at 5fdf20fc3d, from TechLevelZero's NVIDIA bot ([report](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6558279401)): merged onto `main` e6f5730, driver 595.99.02, Ubuntu 26.04.1, 2,543 of 3,148 tests selected. - 2,492 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 941 tests on the GPU. 9 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. - **3283b23aac, a merge of `main` 88e804b0a7** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41414029111)). `main` now has Ondra97's #7694 (scalar-address descriptor Phis), which adds `DescriptorSource::requiredBlocks` to the shader plan encoding, and JJenkx's #6959, which moves `FormatVersion` to 51. Three conflicts, each keeping both sides. In `ShaderDiskCache.cpp` the encoder writes this PR's `pointerKeyed` and then #7694's `requiredBlocks`, in the order the decoder reads them, and the static checks take both changes: `DescriptorSource` 224 bytes with 4 fields, `TableColumn` 120 bytes with 20, and at least 82 bytes per encoded descriptor source. `FormatVersion` stays 63, and `agc_shader_memory_tests.cmake` registers this PR's two snapshot-retry tests and #7694's `agc_shader_descriptor_phis`. This PR's changed lines are the same apart from those numbers, and its `#include <unordered_set>` in `ResourceTracker.cpp` leaves the diff because #7694 adds the same line. 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: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 11 pass, 13 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. - **6cb37cc9ed, a merge of `main` 4f64f81ef7**, which brings B-Howell's #12246 (1D array layer rows). #12246 adds `resourceViews`, a table's registered image views, to the image-table column snapshot. - **Both sides kept** in `ResourceMaterializer.cpp`: the table equality check compares this PR's `nested`, `pointerKeyed` and `pointers` and #12246's `resourceViews`, and the footprint keeps #12246's loop over `resourceViews` with this PR's `table.pointers.size() * 2u` added to its first line. - **A code change inside the merge commit:** #12246 adds a loop to `Snapshot(source, table)` that records each table's registered image views and checks `image.table != table`. #7223, which this PR is built on, copies a column's records in a helper, `CopyRecords`, that nested child columns use too, and git placed the loop there, where `table` isn't in scope, so the merge didn't build. The merge commit moves the loop back into `Snapshot`, right after `out = CopyRecords(records)`. `image.table` only ever indexes a top-level table (`ResourceTracker::AssignTables`), and nested children are reached only through a parent record's code, so nested children having no registered views is exact. It's folded into the merge so that no commit fails its tests. - `FormatVersion` stays 63, and this PR's diff over `main` is otherwise unchanged. - **×10** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41461111363)): 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: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 11 pass, 13 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. - The runs of every `agc` test on the stack's two tips, #9749 and #9969, cover this merge's code (see those PRs). - **63b5c09df9, a merge of `main` 4f41f4c375** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41610576376), [the PR's own tests ×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41619805436)). - **The conflicts:** `ShaderDiskCache.hpp`'s `FormatVersion`, where `main` is now at 52 (#10000) and this PR keeps its 63; and `docs/dev/debt/shader.md`, where this PR's entries and `main`'s new entries 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`, `^agc_shader_sampler_limits`, `^agc_shader_nested` or `^agc_shader_table`. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 11 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. - **×10 of every `^agc_driver_pointer_` and `^agc_driver_nested_` test**, the image-table tests in this PR's diff over `main`, which the first run's names left out. Linux: 7 run, 7 pass, 0 skip, 0 fail. Windows: 7 run, 0 pass, 7 skip (no Vulkan device), 0 fail. - **014d1e30c3: 4d820bdb47, a merge of `main` c2eafe4461, which brings yabanana's #7223, and 014d1e30c3, a debt-entry sentence** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/41775732324)). - **The conflicts:** this branch's additions on top of #7223's final code, each resolved to this PR's side, which already holds #7223's content: its tests in the image-table test list (`tests/cmake/agc_driver_image_table_tests.cmake`), `pointerKeyed` in the image-table column and its equality check (`ResourceMaterializer.cpp`), the plan encoder's field count and list version (`ShaderDiskCache.cpp`), and `ShaderDiskCache.hpp`'s `FormatVersion`, which stays 63 (`main` is at 56 since #7223). - **A registration git doubled without a conflict:** in `tests/cmake/agc_shader_memory_tests.cmake`, git kept both #7223's `agc_shader_nested_snapshot_retry` block and this PR's, which registers it beside `agc_shader_nested_sampler_snapshot_retry`, so CMake refused the second `add_test`. The merge keeps one block, this PR's, at #7223's place. - **This PR's diff over `main` is now its own changes only:** 15 files, 530 insertions and 45 deletions. - **014d1e30c3** adds a sentence to the "Nested image tables" debt entry: a T# reached through a nested child is materialized from its raw words, without registered `resourceViews`, so a 1D array past `maxImageArrayLayers` keeps its raw descriptor there. - **×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: 22 run, 22 pass, 0 skip, 0 fail. Windows: 24 run, 10 pass, 14 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/7395#issuecomment-6627636272)): merged onto `main` 5b1d381, driver 595.99.02, Ubuntu 26.04.1, 2,894 of 3,883 tests selected. 2,840 passed, 5 failed and 49 skipped. None of the failures is new: 3 also fail on `main`, and 2 are unstable on `main`. With `VK_LAYER_KHRONOS_validation`, there are no new validation IDs against `main`, over 980 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. - **0ce8d173a3, a merge of `main` 8eaf82f315** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42336851403)). - **The conflict:** `docs/dev/debt/shader.md`, where JJenkx's #15305 adds a "runtime resource snapshot" entry right above "Nested image tables", whose wording this PR changes. Both stay, #15305's entry first. 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: 23 run, 23 pass, 0 skip, 0 fail. Windows: 25 run, 10 pass, 15 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. - **86527d2f76, a merge of `main` 006d11fca5** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42370656466)). - **The conflict:** `ShaderDiskCache.hpp`'s `FormatVersion`, where frankea's #9020 moves `main` from 56 to 57. This PR keeps its 63. Its 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: 23 run, 23 pass, 0 skip, 0 fail. Windows: 25 run, 10 pass, 15 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. - **85e79949ae, a merge of `main` dd7c8de5de** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42510053755)). - **The conflicts:** `ShaderDiskCache.hpp`'s `FormatVersion`, where #10489 moves `main` from 57 to 60; this PR keeps its 63. And `docs/dev/debt/shader.md`, where #10489 rewords the entry after this PR's pointer-keyed image-table entry (the image limit is now 128). The merge keeps this PR's entry and #10489's wording. 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: 37 run, 37 pass, 0 skip, 0 fail. Windows: 39 run, 10 pass, 29 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. - **3309a349f6: 0157b8d469, a merge of `main` 017bd95f5f, and the format commit 3309a349f6** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/42748867926)). - **The conflict:** `ShaderDiskCache.hpp`'s `FormatVersion`, where zaryabzip's #14636 moves `main` from 60 to 68, above this PR's 63. The merge takes 68, and the format commit moves this PR to 79: every number from 69 to 78 is held by an open PR, from a check of every open PR's head on 11-10. 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: 37 run, 37 pass, 0 skip, 0 fail. Windows: 39 run, 10 pass, 29 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. - **40d718d87b, a merge of `main` e22c5fb941, without conflicts** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43458551528)). - **×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: 38 run, 38 pass, 0 skip, 0 fail. Windows: 40 run, 11 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 379 and 372 tests on Linux and 406 and 400 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. - **e9ddd12bd2, a merge of `main` bd278f3654** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43576482599)). - **The conflict:** only `ShaderDiskCache.hpp`'s `FormatVersion` line, where imellag's #19530 moves `main` from 68 to 69. The merge keeps this PR's number: `main`'s 69, this PR's 79. This PR's other changed lines are unchanged. - **×10:** the same tests as on 40d718d87b. Linux: 38 run, 38 pass, 0 skip, 0 fail. Windows: 40 run, 11 pass, 29 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. - **3c58f422ee, a merge of `main` 328cbf673e** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43816248082), [with #21255's test change](https://github.com/EagleBearerYS/AnyPS5/actions/runs/43831952163)). - **The conflict:** only `ShaderDiskCache.hpp`'s `FormatVersion` line, where Pipodi's #18455 moves `main` from 69 to 88, above this PR's 79. The merge moves this PR to 93, and the PRs stacked on it take 94 to 99 in turn (see the ladder above). This PR's other changed lines are unchanged. - **×10:** the same tests as on e9ddd12bd2. Linux: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 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 3c58f422ee ([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/7395#issuecomment-6974884147)): 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`, `ANYPS5_REQUIRE_DISPLAY=1` and `ANYPS5_NO_SHADER_CACHE=1`. This head 3c58f422ee merged onto `main` 1ccc399b17 (clean), against `main` 1ccc399b17 alone, `ctest -R '^(agc_driver_image_table.*|agc_driver_nested_.*|agc_driver_pointer_phi_.*|agc_shader_memory|agc_shader_disk_cache|agc_shader_nested_.*)$'`. `main`: 35 of 35 pass. This PR: 40 of 40 pass, including the five tests in that set that `main` doesn't have: `agc_driver_nested_sampler_table`, `agc_driver_pointer_phi_sampler_table`, `agc_driver_pointer_phi_ballot_table`, `agc_driver_pointer_phi_copies_table` and `agc_shader_nested_sampler_snapshot_retry`. No `VUID-` line on either side, and every device test selected the RTX 4090. - **ef102a3a52, a merge of `main` d89f26516c** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44432927756), [with #21255's test change](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44451654918)). - **The conflict:** only `ShaderDiskCache.hpp`'s `FormatVersion` line, where Celegans12's #6416 moves `main` from 88 to 90. The merge keeps this PR's 93, and the PRs stacked on it keep 94 to 99. This PR's other changed 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: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 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 ef102a3a52 ([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 ef102a3a52. `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, in #8939's and #9633's runs** ([#8939](https://github.com/boykopovar/AnyPS5/pull/8939#issuecomment-7024112572), [#9633](https://github.com/boykopovar/AnyPS5/pull/9633#issuecomment-7024113752)): 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. #8939's 606212c86e and #9633's 2f104ac486 both carry this PR's head ef102a3a52. In both, the new tests pass, `agc_driver_nested_sampler_table` among them, and of the 1296 and 1302 tests the changes reach, the only failures are ones `main` also fails on that GPU (#23232, #23711, #23942). - **5b21241399, a merge of `main` d50640e264** ([×10](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44658605506), [with #21255's test change](https://github.com/EagleBearerYS/AnyPS5/actions/runs/44660369966)). - **The conflict:** only `ShaderDiskCache.hpp`'s `FormatVersion` line, where edubox's #21758 moves `main` from 90 to 91. The merge keeps this PR's 93, and the PRs stacked on it keep 94 to 99. This PR's other changed 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: 45 run, 44 pass, 0 skip, 1 fail. Windows: 47 run, 11 pass, 36 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 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 dc97c68c75, which holds this PR's 5b21241399 ([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. - **`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 Intel Xeon Platinum 8573C and 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. ### Overlap - **#20519 and #22424 (slopezjur, the opt-in bindless image heap and, on it, layout-only pointer tables):** conflicts in six files, each resolved by keeping both sides (`git merge-tree` on `main` `5adb7d22ab`): - `ControlFlowInfo.hpp`: each adds a `TableColumn` field, `pointerKeyed` here and `dynamic` in #20519, with its `operator==` term. The recompiler's `ShaderDiskCache.cpp` encodes and decodes both, in the same order. - The plan encoder's static checks merge without a conflict but need an edit: both raise `fieldCount<TableColumn>()` from 19 to 20, so with both fields it's 21, and the sizes need rechecking. The build catches it. - `ResourceMaterializer.cpp`: the capture and the plan output keep both sides' lines. - `ResourceTracker.cpp`: in the heap-handle check, this PR drops `sampler ||` and #20519 returns `runtimeAddress()` in place of `false`, so the merged line takes both. - `ImageTable.cpp`'s test options keep both. `FormatVersion` is a one-line conflict that keeps this PR's 93, 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. ### Checklist - [x] Based on #7223's 74700a08d1, merged with #7223's head 7f36e41c45 and `main` dd7c8de5de, which has #7223; 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: none; #7223 has merged - [x] Fixes: none (related: #6191) - [x] Unblocks: none on current `main` (see What) - [x] GPUs tested: Mesa lavapipe 25.2.8 (llvmpipe, LLVM 20.1.2), Linux (GitHub's runner and a cloud machine); NVIDIA GeForce RTX 4070 SUPER, AMD Radeon RX 7600 (RADV) and Intel UHD 770 (ANV, Mesa 25.2.7: the two new sampler tests fail there, [Mesa issue 16622](https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16622), fixed in Mesa 25.3.0), Linux (Capmare); NVIDIA GeForce RTX 3060 Ti (617.42) and Intel Arc Graphics (Meteor Lake, 101.9150: the two new sampler tests fail there too, and pass with `APS5_SPANNED_WAVE=1`), Windows 11, with the validation layer (BKlaasWerkman, in #9969's stack); NVIDIA RTX 2000 Ada Generation (driver 595.99.02, Ubuntu 26.04.1; TechLevelZero's NVIDIA bot); NVIDIA GeForce RTX 4090 (driver 620.70.06, Arch Linux, with the validation layer), by @domx4q; 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
blawesom commented 2026-10-18 10:27:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-18T10:27:50Z.


Rebase handoff — rebased onto current main (all six commits, authorship unchanged). The conflicts reconcile main's evolved table-record architecture (DenseScratchMap/tagged scratch records, the selected/selection columns) with this PR's nested/pointer-chained image-table support:

  • ResourceMaterializer.cpp: main's DenseScratchMap records kept, plus a second tagged map for the nested-table codes (the auto-merge had produced a non-compiling try_emplace — the nested/leaf namespaces now index separate maps, with the PR's per-invocation clearing semantics preserved across recursion); your recursive fill(self, …) shape and the growMap budget guards layered on top
  • ControlFlowInfo.hpp/ShaderDiskCache.cpp: additive fields throughout — selected/selection (main) + buffer (yours) + pointerKeyed (commit 5) — the TableColumn field count is now 19, encoder/decoder and the static assert agree
  • ResourceTracker.cpp: main's constant/addend offset logic with your parent-pointer word patch unioned (args 1–2 of a parent-pointer patch take the pointer's words)
  • test coverage: ImageTable's binding-role counts, the --nested*/--pointer-phi* flags, and the disk-cache reject cases all carried

One combination to review when you pick it up: when a selected column and a parent-pointer patch apply together, the args take the pointer's words while remaining args keep main's constant offsets — no test covers that intersection.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; the image-table and disk-cache tests pass; full suite green apart from the known main regression (agc_driver_tessellation segfault — Mesa, #5444), not this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7395
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is fdcf0d57.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248752249 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6248752249). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-18T10:27:50Z. --- **Rebase handoff** — rebased onto current `main` (all six commits, authorship unchanged). The conflicts reconcile `main`'s evolved table-record architecture (`DenseScratchMap`/tagged scratch records, the `selected`/`selection` columns) with this PR's nested/pointer-chained image-table support: - `ResourceMaterializer.cpp`: `main`'s `DenseScratchMap` records kept, plus a second tagged map for the nested-table codes (the auto-merge had produced a non-compiling `try_emplace` — the nested/leaf namespaces now index separate maps, with the PR's per-invocation clearing semantics preserved across recursion); your recursive `fill(self, …)` shape and the `growMap` budget guards layered on top - `ControlFlowInfo.hpp`/`ShaderDiskCache.cpp`: additive fields throughout — `selected`/`selection` (main) + `buffer` (yours) + `pointerKeyed` (commit 5) — the `TableColumn` field count is now 19, encoder/decoder and the static assert agree - `ResourceTracker.cpp`: main's constant/addend offset logic with your parent-pointer word patch unioned (args 1–2 of a parent-pointer patch take the pointer's words) - test coverage: `ImageTable`'s binding-role counts, the `--nested*`/`--pointer-phi*` flags, and the disk-cache reject cases all carried One combination to review when you pick it up: when a `selected` column and a parent-pointer patch apply together, the args take the pointer's words while remaining args keep main's constant offsets — no test covers that intersection. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; conventions pass; the image-table and disk-cache tests pass; **full suite green apart from the known `main` regression** (`agc_driver_tessellation` segfault — Mesa, #5444), not this PR. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7395 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `fdcf0d57`.
EagleBearerYS commented 2026-10-18 11:28:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T11:28:21Z.


@blawesom thank you for the rebase and for reconciling all eight files, including the auto-merge's non-compiling try_emplace. We took your resolution as a merge rather than a rebase, to keep the branch's history without a force-push: aed137caee merges main 9caecfd2d5 into this branch, its tree is exactly your fdcf0d5704's, and you're credited as co-author on it. On GitHub's runners (run) the ^agc tests pass 3 runs in a row on Linux (715, 0 failed); on Windows the only failures are the two replay tools that fail the same way on that runner for unrelated branches. Thanks also for flagging the case where a selected column and a parent-pointer patch apply together; we'll add a test for it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249370468 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6249370468). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T11:28:21Z. --- @blawesom thank you for the rebase and for reconciling all eight files, including the auto-merge's non-compiling `try_emplace`. We took your resolution as a merge rather than a rebase, to keep the branch's history without a force-push: aed137caee merges `main` 9caecfd2d5 into this branch, its tree is exactly your fdcf0d5704's, and you're credited as co-author on it. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39119686129)) the `^agc` tests pass 3 runs in a row on Linux (715, 0 failed); on Windows the only failures are the two replay tools that fail the same way on that runner for unrelated branches. Thanks also for flagging the case where a `selected` column and a parent-pointer patch apply together; we'll add a test for it.
EagleBearerYS commented 2026-10-18 13:29:35 +00:00 (Migrated from github.com)

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


@blawesom a follow-up on the case you flagged, where a selected column and a parent-pointer patch apply together. We said we'd add a test for it, but no shader can reach that case on this branch, so there's nothing for a test to cover:

  • A leaf column gets a parent pointer only when its heap V# doesn't validate as a runtime source (ResourceTracker.cpp:650-670 at aed137caee). The other place that sets one, TryMakeIndirectColumn (825), returns before selected is worked out.
  • A column is selected only when its T#'s dwords validate (692). Those dwords are ReadConstBuffer reads through the heap V#, and validating such a read validates its V# handle and the handle's four dwords (SrtRuntimeValidator.cpp:111-142), the same check line 650 makes.
  • So a selected leaf never takes the nested branch, and a nested leaf is never selected. The materialization loop never takes its selected arguments and its parent-pointer arguments for the same plan.

A Linux run of the ^agc tests (716) with a temporary print logged 211 table-column plans, none with both. A nested-table shader whose keys the CPU evaluates gave a single selected column and no nested table at all. We've left the code as it is.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250493095 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6250493095). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T13:29:35Z. --- @blawesom a follow-up on the case you flagged, where a `selected` column and a parent-pointer patch apply together. We said we'd add a test for it, but no shader can reach that case on this branch, so there's nothing for a test to cover: - A leaf column gets a parent pointer only when its heap V# doesn't validate as a runtime source (`ResourceTracker.cpp:650-670` at aed137caee). The other place that sets one, `TryMakeIndirectColumn` (825), returns before `selected` is worked out. - A column is `selected` only when its T#'s dwords validate (692). Those dwords are `ReadConstBuffer` reads through the heap V#, and validating such a read validates its V# handle and the handle's four dwords (`SrtRuntimeValidator.cpp:111-142`), the same check line 650 makes. - So a `selected` leaf never takes the nested branch, and a nested leaf is never `selected`. The materialization loop never takes its `selected` arguments and its parent-pointer arguments for the same plan. A Linux run of the `^agc` tests (716) with a temporary print logged 211 table-column plans, none with both. A nested-table shader whose keys the CPU evaluates gave a single `selected` column and no nested table at all. We've left the code as it is.
ps54all commented 2026-10-18 14:03:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-18T14:03:30Z.


@EagleBearerYS thanks for b91f0508d. Ratchet & Clank: Rift Apart (PPSA01474) data with it:

  • Base: a local test branch (main 82f0c9aec plus open PRs, not clean main) that already carried this PR's earlier commits; b91f0508d cherry-picked on top. Windows 11, RTX 3080 (NVIDIA 610.74), MinGW GCC 15.2.0, Release.
  • The stop on compute shader 0x116bb5f500 (LoadAddressU32@pc=0x00008fd4, 6-deep Phi) is gone.
  • The run now stops about 214 s in, still on a black window, on the next compute shader with the same error and a 7-deep Phi chain:
compute shader 0x116bb67000: shader 0x116bb67000 stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00009a30(GetAddressResource(Phi(Phi(Phi(Phi(Phi(Phi(Phi, Phi), Phi(Phi, ReadConstBuffer@pc=0x00001aa8)), Phi(Phi(Phi, Phi), CompositeExtractU32x4(Ballot, Immediate))), Phi(Phi(Phi(Phi, ReadConstBuffer@pc=0x00001aa8), Phi(Phi, Phi)), Phi(Phi(ReadConstBuffer@pc=0x00001aa8, Phi), ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32)))), BitwiseAnd32(Phi(Phi(Phi(Phi, Phi), BitwiseAnd32(Phi, CompositeExtractU32x4)), Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi))), CompositeExtractU32x4(Ballot(Immediate), Immediate))), Phi(Phi(Phi(Phi(Phi(Phi, ReadConstBuffer@pc=0x00001aa8), Phi(Phi, Phi)), Phi(Phi(ReadConstBuffer@pc=0x00001aa8, Phi), ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32))), Phi(Phi(Phi(Phi, Phi), Phi(Phi, ReadConstBuffer@pc=0x00001aa8)), CompositeExtractU32x4(Ballot(LogicalAnd), Immediate))), Phi(Phi(Phi(Phi(ReadConstBuffer@pc=0x00001aa8, Phi), ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32)), Phi(Phi(Phi, ReadConstBuffer@pc=0x00001aa8), Phi(Phi, Immediate))), Phi(Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32), Phi(ReadConstBuffer@pc=0x00001aa8, Immediate)), ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst, ReadConst, ReadConst, ReadConst), ShiftLeftLogical32(ReadFirstLane, Immediate)))))), Phi(Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32(LogicalAnd, IAdd32, Phi), Phi(LogicalAnd, LogicalAnd)), Immediate)), Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32, Phi), Immediate)), ReadConstBuffer@pc=0x0000908c(GetBufferResource(LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate)), Immediate))), ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32(LogicalAnd(INotEqual32, INotEqual32), IAdd32(Phi, Phi), Phi(Phi, Phi)), Phi(LogicalAnd(INotEqual32, INotEqual32), LogicalAnd(Phi, INotEqual32))), Immediate)))), Immediate, Immediate, Immediate)
  • The chain has Ballot / CompositeExtractU32x4(Ballot, Immediate) and ReadFirstLane(SelectU32 ...) arms feeding the Phis, plus a ReadConstBuffer@pc=0x908c whose buffer comes from LoadAddressU32@pc=0x900c(GetAddressResource).
  • One run each, before and after.

I can capture the shader (.req) if that helps.

AI assistance: the run and this summary were made with Claude Code.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250828427 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6250828427). Originally posted by [ps54all](https://github.com/ps54all) on 2026-10-18T14:03:30Z. --- @EagleBearerYS thanks for b91f0508d. Ratchet & Clank: Rift Apart (PPSA01474) data with it: - Base: a local test branch (main 82f0c9aec plus open PRs, not clean main) that already carried this PR's earlier commits; b91f0508d cherry-picked on top. Windows 11, RTX 3080 (NVIDIA 610.74), MinGW GCC 15.2.0, Release. - The stop on compute shader 0x116bb5f500 (`LoadAddressU32@pc=0x00008fd4`, 6-deep Phi) is gone. - The run now stops about 214 s in, still on a black window, on the next compute shader with the same error and a 7-deep Phi chain: ``` compute shader 0x116bb67000: shader 0x116bb67000 stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00009a30(GetAddressResource(Phi(Phi(Phi(Phi(Phi(Phi(Phi, Phi), Phi(Phi, ReadConstBuffer@pc=0x00001aa8)), Phi(Phi(Phi, Phi), CompositeExtractU32x4(Ballot, Immediate))), Phi(Phi(Phi(Phi, ReadConstBuffer@pc=0x00001aa8), Phi(Phi, Phi)), Phi(Phi(ReadConstBuffer@pc=0x00001aa8, Phi), ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32)))), BitwiseAnd32(Phi(Phi(Phi(Phi, Phi), BitwiseAnd32(Phi, CompositeExtractU32x4)), Phi(Phi(Phi, BitwiseAnd32), Phi(Phi, Phi))), CompositeExtractU32x4(Ballot(Immediate), Immediate))), Phi(Phi(Phi(Phi(Phi(Phi, ReadConstBuffer@pc=0x00001aa8), Phi(Phi, Phi)), Phi(Phi(ReadConstBuffer@pc=0x00001aa8, Phi), ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32))), Phi(Phi(Phi(Phi, Phi), Phi(Phi, ReadConstBuffer@pc=0x00001aa8)), CompositeExtractU32x4(Ballot(LogicalAnd), Immediate))), Phi(Phi(Phi(Phi(ReadConstBuffer@pc=0x00001aa8, Phi), ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32)), Phi(Phi(Phi, ReadConstBuffer@pc=0x00001aa8), Phi(Phi, Immediate))), Phi(Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource, ShiftLeftLogical32), Phi(ReadConstBuffer@pc=0x00001aa8, Immediate)), ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst, ReadConst, ReadConst, ReadConst), ShiftLeftLogical32(ReadFirstLane, Immediate)))))), Phi(Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32(LogicalAnd, IAdd32, Phi), Phi(LogicalAnd, LogicalAnd)), Immediate)), Phi(ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32, Phi), Immediate)), ReadConstBuffer@pc=0x0000908c(GetBufferResource(LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate), LoadAddressU32@pc=0x0000900c(GetAddressResource, Immediate, Immediate, Immediate)), Immediate))), ReadConstBuffer@pc=0x00001aa8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32(LogicalAnd(INotEqual32, INotEqual32), IAdd32(Phi, Phi), Phi(Phi, Phi)), Phi(LogicalAnd(INotEqual32, INotEqual32), LogicalAnd(Phi, INotEqual32))), Immediate)))), Immediate, Immediate, Immediate) ``` - The chain has `Ballot` / `CompositeExtractU32x4(Ballot, Immediate)` and `ReadFirstLane(SelectU32 ...)` arms feeding the Phis, plus a `ReadConstBuffer@pc=0x908c` whose buffer comes from `LoadAddressU32@pc=0x900c(GetAddressResource)`. - One run each, before and after. I can capture the shader (`.req`) if that helps. AI assistance: the run and this summary were made with Claude Code.
EagleBearerYS commented 2026-10-18 14:14:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T14:14:09Z.


@ps54all thanks for running it. On your branch, b91f0508d clears the stop on compute shader 0x116bb5f500 (LoadAddressU32@pc=0x8fd4). Your next stop is the one Tamalero reached on Linux (#6191), in a sibling shader: both chains read the same record table at pc=0x1aa8, and every pc after it is 0x44 past theirs (the stop at 0x9a30 against 0x99ec, the second buffer's read at 0x908c against 0x9048, and its V# load at 0x900c against 0x8fc8). So one fix covers both.

No need for the .req, thanks. What's still open is which values those reads return at run time, and the shader's code can't show that. If you, or Tamalero on #6191, can run one diagnostic on that dispatch, it's the one we asked Tamalero for (comment): the dword the read at pc=0x908c returns, next to the high dwords of the records the pc=0x1aa8 reads return, with addresses masked. Whether those are always equal decides how #7395 takes the pointer's high word. The chain's other two parts, the AND with a Ballot word and the high word's Phi of record reads, don't need that data.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250936886 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6250936886). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T14:14:09Z. --- @ps54all thanks for running it. On your branch, b91f0508d clears the stop on compute shader 0x116bb5f500 (`LoadAddressU32@pc=0x8fd4`). Your next stop is the one Tamalero reached on Linux ([#6191](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6247236255)), in a sibling shader: both chains read the same record table at pc=0x1aa8, and every pc after it is 0x44 past theirs (the stop at 0x9a30 against 0x99ec, the second buffer's read at 0x908c against 0x9048, and its V# load at 0x900c against 0x8fc8). So one fix covers both. No need for the `.req`, thanks. What's still open is which values those reads return at run time, and the shader's code can't show that. If you, or Tamalero on #6191, can run one diagnostic on that dispatch, it's the one we asked Tamalero for ([comment](https://github.com/boykopovar/AnyPS5/issues/6191#issuecomment-6247357875)): the dword the read at pc=0x908c returns, next to the high dwords of the records the pc=0x1aa8 reads return, with addresses masked. Whether those are always equal decides how #7395 takes the pointer's high word. The chain's other two parts, the AND with a `Ballot` word and the high word's Phi of record reads, don't need that data.
Capmare commented 2026-10-18 18:39:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T18:39:05Z.


Tested on real hardware, with no title run. Head aed137cae, full build with BUILD_TESTING=ON, Release, Rocky Linux 10.2, ANYPS5_GPU=<name> ANYPS5_REQUIRE_VULKAN=1, 735 graphics tests per GPU.

GPU (driver) Result
RTX 4070 SUPER (NVIDIA 615.71.09) all 735 pass, including agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table
RX 7600 (RADV, Mesa 25.2.7) both new sampler tests pass, 3 of 3 runs each; 1 unrelated failure, agc_pipeline_cache_file
UHD 770 (ANV, Mesa 25.2.7) both new sampler tests fail, 3 of 3 runs each
llvmpipe (Mesa 25.2.7) both new sampler tests pass, 3 of 3 runs each

The Intel failures, run as agc_driver_image_table_tests --nested-sampler and --pointer-phi-sampler:

nested sampler table: the sampler selected through record, pointer and V#: lane 0 is 0x3e800000, expected 0x427d0000
pointer sampler table: the S# read through the record's pointer: lane 0 is 0x427d0000, expected 0x3e800000

The two values are swapped between the two tests. The tests choose between a wrap and a clamp point sampler, so ANV may return the result of the other sampler. I have not found the cause. The existing agc_driver_nested_image_table* tests pass on all three GPUs.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253642463 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6253642463). Originally posted by [Capmare](https://github.com/Capmare) on 2026-10-18T18:39:05Z. --- Tested on real hardware, with no title run. Head `aed137cae`, full build with `BUILD_TESTING=ON`, Release, Rocky Linux 10.2, `ANYPS5_GPU=<name> ANYPS5_REQUIRE_VULKAN=1`, 735 graphics tests per GPU. | GPU (driver) | Result | |---|---| | RTX 4070 SUPER (NVIDIA 615.71.09) | all 735 pass, including `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` | | RX 7600 (RADV, Mesa 25.2.7) | both new sampler tests pass, 3 of 3 runs each; 1 unrelated failure, `agc_pipeline_cache_file` | | UHD 770 (ANV, Mesa 25.2.7) | both new sampler tests **fail**, 3 of 3 runs each | | llvmpipe (Mesa 25.2.7) | both new sampler tests pass, 3 of 3 runs each | The Intel failures, run as `agc_driver_image_table_tests --nested-sampler` and `--pointer-phi-sampler`: ``` nested sampler table: the sampler selected through record, pointer and V#: lane 0 is 0x3e800000, expected 0x427d0000 pointer sampler table: the S# read through the record's pointer: lane 0 is 0x427d0000, expected 0x3e800000 ``` The two values are swapped between the two tests. The tests choose between a wrap and a clamp point sampler, so ANV may return the result of the other sampler. I have not found the cause. The existing `agc_driver_nested_image_table*` tests pass on all three GPUs. *Tested and written by Claude (AI assistant) on a contributor's machine.*
EagleBearerYS commented 2026-10-18 19:48:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T19:48:10Z.


@Capmare thank you for running all four devices, and for repeating the ANV failures three times.

The tests can't confuse the two samplers. Every lane samples past the right edge, so a wrap sampler reads texel x (0x3e800000, 0.25, at lane 0) and a clamp sampler reads texel 63 (0x427d0000, 63.25).

Both failures come from the first check of the first dispatch. That check walks the workgroups in order and stops at the first one that differs, so your two lines say this:

  • --nested-sampler: workgroup 0 selects the wrap S# and matches. Workgroup 1 selects the clamp S# and reads the wrap result.
  • --pointer-phi-sampler: workgroup 0 selects the clamp S# and matches. Workgroup 1 selects the wrap S# and reads the clamp result.

So on ANV the second workgroup gets the first workgroup's sampler. Workgroups 2 and 3 never ran through the check.

The agc_driver_nested_image_table* tests go through the same records and keys, and they pass there. So the difference is in how the sampler is picked. Each workgroup indexes a VK_DESCRIPTOR_TYPE_SAMPLER array with its own index, decorated NonUniform, with shaderSampledImageArrayNonUniformIndexing enabled. We haven't found yet whether the fault is in our SPIR-V or in ANV, so the tests stay as they are and we're keeping this open.

If you have time for one more run: the same two tests with the Khronos validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, if it's installed) would show whether it reports anything for those dispatches.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254356761 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6254356761). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T19:48:10Z. --- @Capmare thank you for running all four devices, and for repeating the ANV failures three times. The tests can't confuse the two samplers. Every lane samples past the right edge, so a wrap sampler reads texel x (0x3e800000, 0.25, at lane 0) and a clamp sampler reads texel 63 (0x427d0000, 63.25). Both failures come from the first check of the first dispatch. That check walks the workgroups in order and stops at the first one that differs, so your two lines say this: - **`--nested-sampler`:** workgroup 0 selects the wrap S# and matches. Workgroup 1 selects the clamp S# and reads the wrap result. - **`--pointer-phi-sampler`:** workgroup 0 selects the clamp S# and matches. Workgroup 1 selects the wrap S# and reads the clamp result. So on ANV the second workgroup gets the first workgroup's sampler. Workgroups 2 and 3 never ran through the check. The `agc_driver_nested_image_table*` tests go through the same records and keys, and they pass there. So the difference is in how the sampler is picked. Each workgroup indexes a `VK_DESCRIPTOR_TYPE_SAMPLER` array with its own index, decorated `NonUniform`, with `shaderSampledImageArrayNonUniformIndexing` enabled. We haven't found yet whether the fault is in our SPIR-V or in ANV, so the tests stay as they are and we're keeping this open. If you have time for one more run: the same two tests with the Khronos validation layer (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, if it's installed) would show whether it reports anything for those dispatches.
Capmare commented 2026-10-18 20:46:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T20:46:52Z.


@EagleBearerYS I ran the two tests with the Khronos validation layer, and I found a trigger on ANV that does not involve our SPIR-V. Details below, including what I could not prove.

Summary

  • The validation layer is silent, and spirv-val accepts the module.
  • The failing shader is valid and selects the sampler correctly. ANV returns the sampler of workgroup 0 for workgroup 1.
  • I reproduced the same behaviour in a standalone Vulkan program with no AnyPS5 code. The trigger is a compute stage with requiredSubgroupSize = 32, local_size_x = 32 and a sampler array with more than 2 elements, indexed per workgroup.
  • APS5_SPANNED_WAVE=1 makes both tests pass on ANV. It changes no other registered test result on the Intel GPU.
  • I do not know why ANV does this. I did not look at the Mesa source.

Setup

  • Intel RPL-S (the iGPU of an i7-14700K), Mesa 25.2.7 (ANV), Vulkan 1.4.318. The same PC also has an RTX 4070 SUPER (driver 615.71.09), an RX 7600 (RADV) and llvmpipe (LLVM 21.1.8).
  • Local build of this PR head (aed137cae) merged with origin/main at c4c2b3aa7, plus some local patches (see "Caveats").
  • Command: ANYPS5_GPU=Intel ANYPS5_NO_SHADER_CACHE=1 ./agc_driver_image_table_tests --nested-sampler (and --pointer-phi-sampler), from the source directory. I ran the binary directly and did not use ctest.

Results of the two tests

Device --nested-sampler --pointer-phi-sampler
Intel RPL-S (ANV) fail fail
AMD RX 7600 (RADV) pass pass
NVIDIA RTX 4070 SUPER pass pass
llvmpipe pass pass

The two Intel failures are the lines from your comment:

  • --nested-sampler: group 1 lane 0 is 0x3e800000, expected 0x427d0000 (the wrap result instead of clamp).
  • --pointer-phi-sampler: lane 0 is 0x427d0000, expected 0x3e800000 (the clamp result instead of wrap).

I added the group number to the failure message locally. It confirms your reading: the first mismatch is workgroup 1, and workgroup 1 gets the sampler of workgroup 0. The failure does not depend on the validation layer, on APS5_NO_GPL, on APS5_NO_PROC_TABLE, on APS5_NO_TIMELINE, on APS5_NO_HOST_IMPORT, or on APS5_NO_SAMPLER_CACHE. I ran each of these on Intel, and the result did not change. All my runs used ANYPS5_NO_SHADER_CACHE=1; I did not test with the shader cache on.

Validation layer

VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation loads (VK_LOADER_DEBUG=layer shows Insert instance layer "VK_LAYER_KHRONOS_validation"). It prints no message for either test on any device. spirv-val --target-env vulkan1.3 accepts the captured compute module (5,656 words). I built spirv-val and spirv-dis from the repo's SPIRV-Tools source for this.

The SPIR-V of the failing dispatch

I captured the pipeline with APS5_DUMP_COMPUTE_PIPELINES. Facts about the module:

  • LocalSize 32 1 1. The guest wave is 64, and the module has two OpImageSampleExplicitLod. I read this as two guest lanes per host invocation, but I did not verify that in the emitter.
  • The sampler is loaded with OpLoad from table_samplers[element] (a runtime array of OpTypeSampler), then OpSampledImage combines it with the image. The element comes from table_map. There is no NonUniform decoration, because the emitter treats the index as uniform per workgroup when the workgroup is one subgroup.

What I tried on the real test, with the real buffers

I added a local diagnostic hook that replaces the compute module with an edited file, so the driver, the buffers and the descriptors stay real. Results on the Intel GPU:

Change Result
unmodified module same failure
sampler element forced to 0 group 1 gets wrap (as in the failure)
sampler element forced to 4 group 0 gets clamp (so the index is honoured)
sampler element computed from gl_WorkGroupID only, with the expected pattern wrap/clamp/clamp/wrap group 1 still gets wrap
NonUniform forced on the index (emitter switch) no change
OpGroupNonUniformBroadcastFirst on the index (emitter switch) no change

The row with the workgroup id is the important one. It means the key, the record and the pointer chain are not the cause.

Standalone reproduction (no AnyPS5 code)

A C program (about 300 lines) and one GLSL compute shader. It makes two samplers (REPEAT and CLAMP_TO_EDGE) and a 64x1 R32_SFLOAT texture with texel i = i. It dispatches 4 workgroups of 32 threads. Workgroup g samples at u = 1.2578125 through sampler g & 1. Wrap gives texel 16, clamp gives texel 63. Expected output per workgroup: 16 63 16 63.

On the Intel GPU:

Pipeline stage setup Sampler array Result
default subgroup size [2], [8], [1024], runtime, with and without nonuniformEXT, with a branch, with 2 samples per invocation, with a two-level index all pass
requiredSubgroupSize = 32 [2] fixed pass
requiredSubgroupSize = 32 [8], [1024] or runtime (8 to 1024 descriptors, partially bound), index from a buffer, from a subgroup broadcast, with a branch, with 2 samples all fail: wg0=16 wg1=16 wg2=16 wg3=16
requiredSubgroupSize = 32 + REQUIRE_FULL_SUBGROUPS same same result as above
requiredSubgroupSize = 8 or 16 runtime, index from a buffer pass

NVIDIA, RADV and llvmpipe pass every variant. The validation layer reports nothing for the program.

The trigger is therefore: required subgroup size 32, a workgroup of exactly 32 threads (one SIMD32 thread), and a sampler array with more than 2 elements indexed per workgroup. The driver creates our compute stages with requiredSubgroupSize = 32 for wave32 programs, which is why the tests hit it.

The compute shader of the reproduction
#version 450
#extension GL_EXT_nonuniform_qualifier : require
#extension GL_KHR_shader_subgroup_ballot : require
layout(local_size_x = 32) in;
layout(set = 0, binding = 0) uniform texture2D tex;
layout(set = 0, binding = 1) uniform sampler samplers[];   // compiled with -DRUNTIME_ARRAY
layout(set = 0, binding = 2) readonly buffer Indices { uint indices[]; };
layout(set = 0, binding = 3) writeonly buffer Results { float results[]; };
void main() {
    uint index = indices[gl_WorkGroupID.x];
    float value = textureLod(sampler2D(tex, samplers[index]), vec2(1.2578125, 0.5), 0.0).x;
    results[2u * gl_GlobalInvocationID.x] = value;
}

Workarounds I tested on the Intel GPU

  1. APS5_SPANNED_WAVE=1: works. Both tests pass, 3 runs each. The program then runs as LocalSize 64 with two 32-lane subgroups, so a workgroup is no longer one SIMD32 thread.
  2. Not requiring the subgroup size (diagnostic switch in computeSubgroupSize): not enough. The sampler check then passes, but both tests fail at a later check: a captured pointer selected through Phi faulted (--nested-sampler) and a captured pointer selected through Phi changed the result (--pointer-phi-sampler). The wave32 logic needs a subgroup of 32 lanes.
  3. A fixed-size array instead of a runtime array: not a fix. Arrays of 8 and 1024 elements fail the same way.

Effect of APS5_SPANNED_WAVE=1 on the other registered tests

I ran all 235 registered libSceAgcDriver tests directly (121 test executables, with the environment, timeout and working directory from CMakeLists.txt), on each GPU:

Run pass skip fail
Intel, default 217 3 15
Intel, APS5_SPANNED_WAVE=1 219 3 13
RTX 4070 SUPER, default 220 2 13
RX 7600, default 218 3 14

Between the two Intel runs only agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table change, from fail to pass. No test goes from pass to fail.

Tests that fail on every device

These 13 tests fail on Intel, NVIDIA and RADV alike, with and without the spanned-wave switch: agc_buffer_pool, agc_driver_stencil_replay_no_gpl, agc_host_import_second_mapping, agc_import_settle_deferred, agc_import_settle_deferred_other_family, agc_import_settle_earlier_import, agc_import_settle_first_use, agc_import_settle_retire, agc_import_settle_storage_image, agc_shader_bindless, agc_shader_frontend_pair, agc_storage_cpu_snapshot, agc_vertex_barrier. RADV also fails agc_pipeline_cache_file. I did not investigate them. They may come from my merge of origin/main, from my local patches, or they may exist upstream. I did not run them on a clean checkout of the PR head.

Caveats

  • This is not a clean PR head. My tree has local patches for a different goal (running a game). They do not touch the sampler-table code, but the local build has a diagnostic fallback in the resource tracker that replaces a sampler reached through a runtime pointer chain. With it, --nested-sampler fails on every device with a V# with another buffer consumer was not refused by resource planning. I turned it off with APS5_NO_DESCRIPTOR_SUBSTITUTE=1 for all runs above. A clean PR head does not have this fallback.
  • I tested only the Intel iGPU of this PC. I did not test other Intel GPUs or other Mesa versions.
  • I did not read the Mesa source. I cannot say which ANV code path causes the behaviour.
  • The test comparison covers the registered unit tests. I did not test game workloads with the spanned-wave mode.

Suggestion

I did not change the tests or the driver. If you want a driver change, enabling the spanned-wave mode on ANV is the smallest one I found. It changes how every single-wave wave64 compute shader runs on that driver, so I leave the decision to you. Separately, the standalone program is a clean bug report for Mesa. I can attach the source and a short write-up, or file the Mesa report myself if you prefer.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254952671 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6254952671). Originally posted by [Capmare](https://github.com/Capmare) on 2026-10-18T20:46:52Z. --- @EagleBearerYS I ran the two tests with the Khronos validation layer, and I found a trigger on ANV that does not involve our SPIR-V. Details below, including what I could not prove. ## Summary - The validation layer is silent, and `spirv-val` accepts the module. - The failing shader is valid and selects the sampler correctly. ANV returns the sampler of workgroup 0 for workgroup 1. - I reproduced the same behaviour in a standalone Vulkan program with no AnyPS5 code. The trigger is a compute stage with `requiredSubgroupSize = 32`, `local_size_x = 32` and a sampler array with more than 2 elements, indexed per workgroup. - `APS5_SPANNED_WAVE=1` makes both tests pass on ANV. It changes no other registered test result on the Intel GPU. - I do not know why ANV does this. I did not look at the Mesa source. ## Setup - Intel RPL-S (the iGPU of an i7-14700K), Mesa 25.2.7 (ANV), Vulkan 1.4.318. The same PC also has an RTX 4070 SUPER (driver 615.71.09), an RX 7600 (RADV) and llvmpipe (LLVM 21.1.8). - Local build of this PR head (`aed137cae`) merged with `origin/main` at `c4c2b3aa7`, plus some local patches (see "Caveats"). - Command: `ANYPS5_GPU=Intel ANYPS5_NO_SHADER_CACHE=1 ./agc_driver_image_table_tests --nested-sampler` (and `--pointer-phi-sampler`), from the source directory. I ran the binary directly and did not use ctest. ## Results of the two tests | Device | `--nested-sampler` | `--pointer-phi-sampler` | |---|---|---| | Intel RPL-S (ANV) | fail | fail | | AMD RX 7600 (RADV) | pass | pass | | NVIDIA RTX 4070 SUPER | pass | pass | | llvmpipe | pass | pass | The two Intel failures are the lines from your comment: - `--nested-sampler`: group 1 lane 0 is `0x3e800000`, expected `0x427d0000` (the wrap result instead of clamp). - `--pointer-phi-sampler`: lane 0 is `0x427d0000`, expected `0x3e800000` (the clamp result instead of wrap). I added the group number to the failure message locally. It confirms your reading: the first mismatch is workgroup 1, and workgroup 1 gets the sampler of workgroup 0. The failure does not depend on the validation layer, on `APS5_NO_GPL`, on `APS5_NO_PROC_TABLE`, on `APS5_NO_TIMELINE`, on `APS5_NO_HOST_IMPORT`, or on `APS5_NO_SAMPLER_CACHE`. I ran each of these on Intel, and the result did not change. All my runs used `ANYPS5_NO_SHADER_CACHE=1`; I did not test with the shader cache on. ## Validation layer `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` loads (`VK_LOADER_DEBUG=layer` shows `Insert instance layer "VK_LAYER_KHRONOS_validation"`). It prints no message for either test on any device. `spirv-val --target-env vulkan1.3` accepts the captured compute module (5,656 words). I built `spirv-val` and `spirv-dis` from the repo's SPIRV-Tools source for this. ## The SPIR-V of the failing dispatch I captured the pipeline with `APS5_DUMP_COMPUTE_PIPELINES`. Facts about the module: - `LocalSize 32 1 1`. The guest wave is 64, and the module has two `OpImageSampleExplicitLod`. I read this as two guest lanes per host invocation, but I did not verify that in the emitter. - The sampler is loaded with `OpLoad` from `table_samplers[element]` (a runtime array of `OpTypeSampler`), then `OpSampledImage` combines it with the image. The element comes from `table_map`. There is no `NonUniform` decoration, because the emitter treats the index as uniform per workgroup when the workgroup is one subgroup. ## What I tried on the real test, with the real buffers I added a local diagnostic hook that replaces the compute module with an edited file, so the driver, the buffers and the descriptors stay real. Results on the Intel GPU: | Change | Result | |---|---| | unmodified module | same failure | | sampler element forced to 0 | group 1 gets wrap (as in the failure) | | sampler element forced to 4 | group 0 gets clamp (so the index is honoured) | | sampler element computed from `gl_WorkGroupID` only, with the expected pattern wrap/clamp/clamp/wrap | group 1 still gets wrap | | `NonUniform` forced on the index (emitter switch) | no change | | `OpGroupNonUniformBroadcastFirst` on the index (emitter switch) | no change | The row with the workgroup id is the important one. It means the key, the record and the pointer chain are not the cause. ## Standalone reproduction (no AnyPS5 code) A C program (about 300 lines) and one GLSL compute shader. It makes two samplers (REPEAT and CLAMP_TO_EDGE) and a 64x1 R32_SFLOAT texture with texel `i = i`. It dispatches 4 workgroups of 32 threads. Workgroup `g` samples at `u = 1.2578125` through sampler `g & 1`. Wrap gives texel 16, clamp gives texel 63. Expected output per workgroup: `16 63 16 63`. On the Intel GPU: | Pipeline stage setup | Sampler array | Result | |---|---|---| | default subgroup size | `[2]`, `[8]`, `[1024]`, runtime, with and without `nonuniformEXT`, with a branch, with 2 samples per invocation, with a two-level index | all pass | | `requiredSubgroupSize = 32` | `[2]` fixed | pass | | `requiredSubgroupSize = 32` | `[8]`, `[1024]` or runtime (8 to 1024 descriptors, partially bound), index from a buffer, from a subgroup broadcast, with a branch, with 2 samples | all fail: `wg0=16 wg1=16 wg2=16 wg3=16` | | `requiredSubgroupSize = 32` + `REQUIRE_FULL_SUBGROUPS` | same | same result as above | | `requiredSubgroupSize = 8` or `16` | runtime, index from a buffer | pass | NVIDIA, RADV and llvmpipe pass every variant. The validation layer reports nothing for the program. The trigger is therefore: required subgroup size 32, a workgroup of exactly 32 threads (one SIMD32 thread), and a sampler array with more than 2 elements indexed per workgroup. The driver creates our compute stages with `requiredSubgroupSize = 32` for wave32 programs, which is why the tests hit it. <details><summary>The compute shader of the reproduction</summary> ```glsl #version 450 #extension GL_EXT_nonuniform_qualifier : require #extension GL_KHR_shader_subgroup_ballot : require layout(local_size_x = 32) in; layout(set = 0, binding = 0) uniform texture2D tex; layout(set = 0, binding = 1) uniform sampler samplers[]; // compiled with -DRUNTIME_ARRAY layout(set = 0, binding = 2) readonly buffer Indices { uint indices[]; }; layout(set = 0, binding = 3) writeonly buffer Results { float results[]; }; void main() { uint index = indices[gl_WorkGroupID.x]; float value = textureLod(sampler2D(tex, samplers[index]), vec2(1.2578125, 0.5), 0.0).x; results[2u * gl_GlobalInvocationID.x] = value; } ``` </details> ## Workarounds I tested on the Intel GPU 1. **`APS5_SPANNED_WAVE=1`: works.** Both tests pass, 3 runs each. The program then runs as `LocalSize 64` with two 32-lane subgroups, so a workgroup is no longer one SIMD32 thread. 2. **Not requiring the subgroup size (diagnostic switch in `computeSubgroupSize`): not enough.** The sampler check then passes, but both tests fail at a later check: `a captured pointer selected through Phi faulted` (`--nested-sampler`) and `a captured pointer selected through Phi changed the result` (`--pointer-phi-sampler`). The wave32 logic needs a subgroup of 32 lanes. 3. **A fixed-size array instead of a runtime array: not a fix.** Arrays of 8 and 1024 elements fail the same way. ## Effect of `APS5_SPANNED_WAVE=1` on the other registered tests I ran all 235 registered libSceAgcDriver tests directly (121 test executables, with the environment, timeout and working directory from `CMakeLists.txt`), on each GPU: | Run | pass | skip | fail | |---|---|---|---| | Intel, default | 217 | 3 | 15 | | Intel, `APS5_SPANNED_WAVE=1` | 219 | 3 | 13 | | RTX 4070 SUPER, default | 220 | 2 | 13 | | RX 7600, default | 218 | 3 | 14 | Between the two Intel runs only `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` change, from fail to pass. No test goes from pass to fail. ## Tests that fail on every device These 13 tests fail on Intel, NVIDIA and RADV alike, with and without the spanned-wave switch: `agc_buffer_pool`, `agc_driver_stencil_replay_no_gpl`, `agc_host_import_second_mapping`, `agc_import_settle_deferred`, `agc_import_settle_deferred_other_family`, `agc_import_settle_earlier_import`, `agc_import_settle_first_use`, `agc_import_settle_retire`, `agc_import_settle_storage_image`, `agc_shader_bindless`, `agc_shader_frontend_pair`, `agc_storage_cpu_snapshot`, `agc_vertex_barrier`. RADV also fails `agc_pipeline_cache_file`. I did not investigate them. They may come from my merge of `origin/main`, from my local patches, or they may exist upstream. I did not run them on a clean checkout of the PR head. ## Caveats - This is not a clean PR head. My tree has local patches for a different goal (running a game). They do not touch the sampler-table code, but the local build has a diagnostic fallback in the resource tracker that replaces a sampler reached through a runtime pointer chain. With it, `--nested-sampler` fails on every device with `a V# with another buffer consumer was not refused by resource planning`. I turned it off with `APS5_NO_DESCRIPTOR_SUBSTITUTE=1` for all runs above. A clean PR head does not have this fallback. - I tested only the Intel iGPU of this PC. I did not test other Intel GPUs or other Mesa versions. - I did not read the Mesa source. I cannot say which ANV code path causes the behaviour. - The test comparison covers the registered unit tests. I did not test game workloads with the spanned-wave mode. ## Suggestion I did not change the tests or the driver. If you want a driver change, enabling the spanned-wave mode on ANV is the smallest one I found. It changes how every single-wave wave64 compute shader runs on that driver, so I leave the decision to you. Separately, the standalone program is a clean bug report for Mesa. I can attach the source and a short write-up, or file the Mesa report myself if you prefer.
EagleBearerYS commented 2026-10-18 20:50:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T20:50:56Z.


@Capmare thank you, this settles it, and the standalone program is the strongest part. With no AnyPS5 code, ANV gives workgroup 1 workgroup 0's sampler whenever the stage has requiredSubgroupSize = 32 and the sampler array has more than 2 elements. A fixed [2] array passes, and so does the default subgroup size. The validation layer and spirv-val report nothing. So it's an ANV issue, not our SPIR-V.

A correction to my last comment: the module carries no NonUniform on that index, as you found. The emitter treats the index as uniform when the workgroup is one subgroup, and your forced-NonUniform run shows the decoration makes no difference.

The two tests stay as they are, since they're what caught it. APS5_SPANNED_WAVE=1 passing on ANV is a useful lead for a workaround on our side. We aren't changing anything for it yet.

If you want to report it, your program looks ready to post as a Mesa issue as it stands (https://gitlab.freedesktop.org/mesa/mesa/-/issues). That's entirely up to you.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254993419 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6254993419). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T20:50:56Z. --- @Capmare thank you, this settles it, and the standalone program is the strongest part. With no AnyPS5 code, ANV gives workgroup 1 workgroup 0's sampler whenever the stage has `requiredSubgroupSize = 32` and the sampler array has more than 2 elements. A fixed `[2]` array passes, and so does the default subgroup size. The validation layer and `spirv-val` report nothing. So it's an ANV issue, not our SPIR-V. A correction to my last comment: the module carries no `NonUniform` on that index, as you found. The emitter treats the index as uniform when the workgroup is one subgroup, and your forced-`NonUniform` run shows the decoration makes no difference. The two tests stay as they are, since they're what caught it. `APS5_SPANNED_WAVE=1` passing on ANV is a useful lead for a workaround on our side. We aren't changing anything for it yet. If you want to report it, your program looks ready to post as a Mesa issue as it stands (https://gitlab.freedesktop.org/mesa/mesa/-/issues). That's entirely up to you.
Capmare commented 2026-10-18 20:58:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-18T20:58:29Z.


@EagleBearerYS thank you for the careful review and for the clear questions. They pointed me to the validation layer and to the exact failing dispatch, which is how I found the cause.

I posted the standalone program as a Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16622

I agree with leaving the two tests as they are and with not changing the driver yet. If Mesa answers, I will post the result here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6255067111 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6255067111). Originally posted by [Capmare](https://github.com/Capmare) on 2026-10-18T20:58:29Z. --- @EagleBearerYS thank you for the careful review and for the clear questions. They pointed me to the validation layer and to the exact failing dispatch, which is how I found the cause. I posted the standalone program as a Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16622 I agree with leaving the two tests as they are and with not changing the driver yet. If Mesa answers, I will post the result here.
fdfawef324 commented 2026-10-18 22:51:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T22:51:32Z.


#7684 adds conservative table-key ranges and sentinel handling, with 3 CPU suites and a 7-case regression batch (5 real Vulkan, 2 CPU/mock) passing on its exact head. The overlap check found a textual conflict with this PR's capture refactor.

I propose #7684 first, then this PR can retain TableColumn::allOnesKey, its plan-cache encoder/decoder field, and the heap/address sentinel fault predicate when moving capture into ReadColumn. The deliberately unbounded merged-pointer branch must also stay unbounded. The topics have no runtime dependency on one another.

I left #7684 as a draft pending agreement on ordering. If the #7223 → #7395 sequence should go first, I can rebase the bounded change afterward and rerun the combined fixtures.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256161377 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6256161377). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-18T22:51:32Z. --- #7684 adds conservative table-key ranges and sentinel handling, with 3 CPU suites and a 7-case regression batch (5 real Vulkan, 2 CPU/mock) passing on its exact head. The overlap check found a textual conflict with this PR's capture refactor. I propose #7684 first, then this PR can retain `TableColumn::allOnesKey`, its plan-cache encoder/decoder field, and the heap/address sentinel fault predicate when moving capture into `ReadColumn`. The deliberately unbounded merged-pointer branch must also stay unbounded. The topics have no runtime dependency on one another. I left #7684 as a draft pending agreement on ordering. If the #7223 → #7395 sequence should go first, I can rebase the bounded change afterward and rerun the combined fixtures. AI-assisted: yes
EagleBearerYS commented 2026-10-18 22:54:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-18T22:54:19Z.


@fdfawef324 thank you for checking the overlap and listing what to keep. #7684 first works for us. On a trial merge of this PR's head (59b319a779) over #7684's df6aa653d1, the conflicts are small: six hunks in ResourceMaterializer.cpp, ResourceTracker.cpp, ShaderDiskCache.cpp and the shader debt file. They compose as follows:

  • TableColumn keeps both new fields, allOnesKey and this PR's pointerKeyed, and the plan encoder and decoder write and read both.
  • In the tracker, a column whose record pointer is merged through a Phi stays unbounded (maxKey = 0xffffffff), and every other column goes through boundTableKey.
  • In ReadColumn, the key count keeps this PR's limit (the nested tables' parent budget), and outside takes your heap/address sentinel fault predicate.

If #7684 lands first, we'll merge main here with those resolutions and rerun this PR's table tests on both runners.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256187092 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6256187092). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T22:54:19Z. --- @fdfawef324 thank you for checking the overlap and listing what to keep. #7684 first works for us. On a trial merge of this PR's head (59b319a779) over #7684's df6aa653d1, the conflicts are small: six hunks in `ResourceMaterializer.cpp`, `ResourceTracker.cpp`, `ShaderDiskCache.cpp` and the shader debt file. They compose as follows: - `TableColumn` keeps both new fields, `allOnesKey` and this PR's `pointerKeyed`, and the plan encoder and decoder write and read both. - In the tracker, a column whose record pointer is merged through a `Phi` stays unbounded (`maxKey = 0xffffffff`), and every other column goes through `boundTableKey`. - In `ReadColumn`, the key count keeps this PR's limit (the nested tables' parent budget), and `outside` takes your heap/address sentinel fault predicate. If #7684 lands first, we'll merge `main` here with those resolutions and rerun this PR's table tests on both runners.
fdfawef324 commented 2026-10-18 22:58:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-18T22:58:31Z.


Agreed: #7684 first. I have marked it ready for review and linked your composition plan in its body. The published tests cover #7684 alone; the combined nested-table tests you describe remain the follow-up after merging main here.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256225419 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6256225419). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-18T22:58:31Z. --- Agreed: #7684 first. I have marked it ready for review and linked your composition plan in its body. The published tests cover #7684 alone; the combined nested-table tests you describe remain the follow-up after merging main here. AI-assisted: yes
j2m304 commented 2026-10-18 23:28:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by j2m304 on 2026-10-18T23:28:47Z.


Tested #7395 head 59b319a779 (including #7223) offline against a captured Wolverine compute request, with SPIRV-Tools enabled. Needed a local iterative Tarjan walk to avoid the previously observed stack overflow; used APS5_FORCE_STRUCTURIZER_FALLBACK=1 and disabled shader caching. This is a combined experiment, not a stock-PR title test.

The request loads, but still stops in resource analysis at GetSamplerResource dword 0 is not a valid runtime value, with nested Phi / ReadConst inputs. Adding #6417's production invariant-word resolution and a local repeated-Phi folding loop following #6332's description did not resolve it. Seven CPU and seven nested-image/sampler/pointer GPU checks passed before that follow-up, and four CPU plus seven GPU checks passed afterward.

A diagnostic traversal of the failing word's Phi edges finds 129 Phi nodes and 43 ReadConst nodes referring to 30 distinct runtime-read slots, plus arithmetic and lane-operation leaves. This is only the Phi surface, not a full dependency graph; it does not prove that the live sampler path combines different values.

Attached synthetic DescriptorMerge.cpp isolates the validator boundary: equivalent-slot Phi inputs are accepted, while distinct-slot Phi inputs are individually valid and rejected after merging, at depths 1/2/9. All six controls pass. This is a unit-level capability reproducer, not a minimized full resource-tracker/title reproduction and not evidence that the conservative rejection should be removed. No title code, capture or dump is included.

Is a synthetic full-tracker fixture retaining the incoming control-flow correlation the most useful next step for this shape? I have kept the title capture and memory dump local.

AI-assisted: yes. No compatibility or performance claim.
sampler-merge-reproducer.zip

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256505604 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6256505604). Originally posted by [j2m304](https://github.com/j2m304) on 2026-10-18T23:28:47Z. --- Tested #7395 head 59b319a779 (including #7223) offline against a captured Wolverine compute request, with SPIRV-Tools enabled. Needed a local iterative Tarjan walk to avoid the previously observed stack overflow; used APS5_FORCE_STRUCTURIZER_FALLBACK=1 and disabled shader caching. This is a combined experiment, not a stock-PR title test. The request loads, but still stops in resource analysis at `GetSamplerResource dword 0 is not a valid runtime value`, with nested Phi / ReadConst inputs. Adding #6417's production invariant-word resolution and a local repeated-Phi folding loop following #6332's description did not resolve it. Seven CPU and seven nested-image/sampler/pointer GPU checks passed before that follow-up, and four CPU plus seven GPU checks passed afterward. A diagnostic traversal of the failing word's Phi edges finds 129 Phi nodes and 43 ReadConst nodes referring to 30 distinct runtime-read slots, plus arithmetic and lane-operation leaves. This is only the Phi surface, not a full dependency graph; it does not prove that the live sampler path combines different values. Attached synthetic DescriptorMerge.cpp isolates the validator boundary: equivalent-slot Phi inputs are accepted, while distinct-slot Phi inputs are individually valid and rejected after merging, at depths 1/2/9. All six controls pass. This is a unit-level capability reproducer, not a minimized full resource-tracker/title reproduction and not evidence that the conservative rejection should be removed. No title code, capture or dump is included. Is a synthetic full-tracker fixture retaining the incoming control-flow correlation the most useful next step for this shape? I have kept the title capture and memory dump local. AI-assisted: yes. No compatibility or performance claim. [sampler-merge-reproducer.zip](https://github.com/user-attachments/files/33643021/sampler-merge-reproducer.zip)
klosixgaming-arch commented 2026-10-19 04:43:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-19T04:43:20Z.


Little Nightmares Enhanced Edition (PPSA10737, version 01.004.000, on Windows 11 / RTX 5090 with #7413 cc6901685 to get past an earlier hoisted table call) stops 2 min 46 s in on compute shader 0x2010fa0000 with the same BitwiseAnd32 Ballot lane-mask shape noted in this PR's description:

[dispatch] failed: compute shader 0x2010fa0000, stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value (value=LoadAddressU32[id=13325, type=U32, flags=0x4, arg0=LoadAddressU32@pc=0x3384(arg0=GetAddressResource@pc=0x3384(arg0=Phi(arg0=Phi(arg0=Phi(arg0=BitwiseAnd32@pc=0x1600(arg0=CompositeExtractU32x4@pc=0x15d4(arg0=Ballot@pc=0x15d4(arg0=IntegerNotEqual32@pc=0x15cc(...)), arg1=imm=0x0), arg1=BitwiseNot32@pc=0x15fc(...)), arg1=Phi(arg0=imm=0x0, arg1=ReadConstBuffer@pc=0x15ec(arg0=GetBufferResource@pc=0x15ec(arg0=UserData7), arg1=ShiftLeftLogical32@pc=0x15ec(arg0=ReadFirstLane@pc=0x15dc(...), arg1=imm=0x4)), arg2=Phi(...)), arg2=Phi(...)), arg1=...), arg1=...), arg1=ReadConstBuffer@pc=0x15ec(arg0=GetBufferResource@pc=0x15ec(arg0=UserData7), arg1=ShiftLeftLogical32@pc=0x15ec(arg0=ReadFirstLane@pc=0x15dc(...), arg1=imm=0x4))), arg1=imm=0x0), arg1=imm=0x0] (13 total refusals in this shader))

In 0x2010fa0000, GetAddressResource@pc=0x3384 has an unmerged high dword (arg1 = ReadConstBuffer@pc=0x15ec at +4) while the low dword (arg0) goes through nested Phi nodes that merge the matching ReadConstBuffer@pc=0x15ec at +0 with imm=0x0 and BitwiseAnd32@pc=0x1600(CompositeExtractU32x4@pc=0x15d4(Ballot@pc=0x15d4(...), imm=0x0), BitwiseNot32@pc=0x15fc(...)) because the low-dword SGPR is reused for the loop's lane mask.

With a local change in TryMakeIndirectColumn that unwraps Phi arms to the single equivalent ReadConstBuffer origin while ignoring imm=0x0 and Ballot-derived lane-mask expressions, 0x2010fa0000 compiles and creates its pipeline (414421 SPIR-V words in 26173 ms), and the title advances to its next stop on compute shader 0x200c340000 (computed/data-dependent s_swappc_b64 call target at program counter 0x000008b4 is not statically resolvable).

AI-assisted: yes. Written with AI assistance and reviewed by me.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6259836654 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6259836654). Originally posted by [klosixgaming-arch](https://github.com/klosixgaming-arch) on 2026-10-19T04:43:20Z. --- Little Nightmares Enhanced Edition (PPSA10737, version 01.004.000, on Windows 11 / RTX 5090 with #7413 `cc6901685` to get past an earlier hoisted table call) stops 2 min 46 s in on compute shader `0x2010fa0000` with the same `BitwiseAnd32` `Ballot` lane-mask shape noted in this PR's description: ``` [dispatch] failed: compute shader 0x2010fa0000, stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value (value=LoadAddressU32[id=13325, type=U32, flags=0x4, arg0=LoadAddressU32@pc=0x3384(arg0=GetAddressResource@pc=0x3384(arg0=Phi(arg0=Phi(arg0=Phi(arg0=BitwiseAnd32@pc=0x1600(arg0=CompositeExtractU32x4@pc=0x15d4(arg0=Ballot@pc=0x15d4(arg0=IntegerNotEqual32@pc=0x15cc(...)), arg1=imm=0x0), arg1=BitwiseNot32@pc=0x15fc(...)), arg1=Phi(arg0=imm=0x0, arg1=ReadConstBuffer@pc=0x15ec(arg0=GetBufferResource@pc=0x15ec(arg0=UserData7), arg1=ShiftLeftLogical32@pc=0x15ec(arg0=ReadFirstLane@pc=0x15dc(...), arg1=imm=0x4)), arg2=Phi(...)), arg2=Phi(...)), arg1=...), arg1=...), arg1=ReadConstBuffer@pc=0x15ec(arg0=GetBufferResource@pc=0x15ec(arg0=UserData7), arg1=ShiftLeftLogical32@pc=0x15ec(arg0=ReadFirstLane@pc=0x15dc(...), arg1=imm=0x4))), arg1=imm=0x0), arg1=imm=0x0] (13 total refusals in this shader)) ``` In `0x2010fa0000`, `GetAddressResource@pc=0x3384` has an unmerged high dword (`arg1 = ReadConstBuffer@pc=0x15ec` at `+4`) while the low dword (`arg0`) goes through nested `Phi` nodes that merge the matching `ReadConstBuffer@pc=0x15ec` at `+0` with `imm=0x0` and `BitwiseAnd32@pc=0x1600(CompositeExtractU32x4@pc=0x15d4(Ballot@pc=0x15d4(...), imm=0x0), BitwiseNot32@pc=0x15fc(...))` because the low-dword SGPR is reused for the loop's lane mask. With a local change in `TryMakeIndirectColumn` that unwraps `Phi` arms to the single equivalent `ReadConstBuffer` origin while ignoring `imm=0x0` and `Ballot`-derived lane-mask expressions, `0x2010fa0000` compiles and creates its pipeline (`414421 SPIR-V words in 26173 ms`), and the title advances to its next stop on compute shader `0x200c340000` (`computed/data-dependent s_swappc_b64 call target at program counter 0x000008b4 is not statically resolvable`). AI-assisted: yes. Written with AI assistance and reviewed by me.
fdfawef324 commented 2026-10-19 05:25:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-19T05:25:12Z.


Following the agreed #7684-first order, #6488 is now rebased and verified at a48c5a7c7321 on main 676d423968a1. Its lane-loaded image handle keeps the numeric key in argument 0 and an independent U32 load predicate in argument 1; an inactive descriptor load selects NullCode before a table fault, while active real UINT_MAX keys keep the unsupported-OOB fault.

At your reviewed 59b319a77919 head, pointer/nested columns use handle arguments 1/2 for parent-pointer words and move ordinary access into LookupTableWord/LookupTablePointer. Composition must retain the laneKey branch before interpreting those pointer operands, plus current SharedValues/Seal storage, sharedMode memo/hash identity and both complete metadata layouts. The features are separate; the operand convention is a concrete shared implementation point.

I propose #7684, then #6488, then your #7395 rebase with both conventions and the masked-invalid-table controls retained. Only the #7684-first part is already agreed; this extension is a proposal. I am keeping #6488 in draft while that order is coordinated. Current #6488 CPU3 and Vulkan3 pass, including the new controls, but no combined #7395 runtime result is claimed. Let me know if the opposite order for these two is preferable.

AI-assisted: yes (Codex)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6260327385 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6260327385). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-19T05:25:12Z. --- Following the agreed #7684-first order, #6488 is now rebased and verified at `a48c5a7c7321` on main `676d423968a1`. Its lane-loaded image handle keeps the numeric key in argument 0 and an independent U32 load predicate in argument 1; an inactive descriptor load selects NullCode before a table fault, while active real UINT_MAX keys keep the unsupported-OOB fault. At your reviewed `59b319a77919` head, pointer/nested columns use handle arguments 1/2 for parent-pointer words and move ordinary access into LookupTableWord/LookupTablePointer. Composition must retain the laneKey branch before interpreting those pointer operands, plus current SharedValues/Seal storage, sharedMode memo/hash identity and both complete metadata layouts. The features are separate; the operand convention is a concrete shared implementation point. I propose #7684, then #6488, then your #7395 rebase with both conventions and the masked-invalid-table controls retained. Only the #7684-first part is already agreed; this extension is a proposal. I am keeping #6488 in draft while that order is coordinated. Current #6488 CPU3 and Vulkan3 pass, including the new controls, but no combined #7395 runtime result is claimed. Let me know if the opposite order for these two is preferable. AI-assisted: yes (Codex)
Capmare commented 2026-10-19 08:45:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-19T08:45:34Z.


Marvel's Wolverine (PPSA03671) on this PR's head 59b319a779, as asked on #6191. Rocky Linux 10.2, Release build of the head as it is (no local patches), NVIDIA GeForce RTX 4070 SUPER (driver 615.71.09), cold shader cache, one run of about 9 minutes, then I stopped it.

  • The sampler stop is gone. The log has no refusal of any kind (GetSamplerResource or GetImageResource), no [dispatch] failed and no presentation failed.
  • The title then makes no progress to a frame. No frame was presented in the 9 minutes: the harness dumps the first presented frame, and none was dumped. On my patched tree the first frame is dumped within about 20 seconds.
  • What it does instead: 284,392 StorageTexture creations in that time, on 371 distinct addresses. The same surfaces are created thousands of times (0x115df30000 7,681 times, 0x1163060000 5,790, 0x112c7b0000 5,787). At about 4 minutes the device memory was at 11.9 of 12 GB, two threads were at 100% CPU, and the process used 18 GB of RAM.

So the next stop of the title on this head is not a refusal but this build storm. I think the cause is the one-image-per-table-element build of surfaces that appear at several extents (dynamic-resolution variants of one surface). On my local tree, substituting one representative per family of variants and building table entries lazily avoids it, and the same title then reaches the 3D scene and the Initial Setup menu. That is a separate topic from this PR. I can open it as its own PR if you want it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263302443 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6263302443). Originally posted by [Capmare](https://github.com/Capmare) on 2026-10-19T08:45:34Z. --- Marvel's Wolverine (PPSA03671) on this PR's head 59b319a779, as asked on #6191. Rocky Linux 10.2, Release build of the head as it is (no local patches), NVIDIA GeForce RTX 4070 SUPER (driver 615.71.09), cold shader cache, one run of about 9 minutes, then I stopped it. - **The sampler stop is gone.** The log has no refusal of any kind (`GetSamplerResource` or `GetImageResource`), no `[dispatch] failed` and no `presentation failed`. - **The title then makes no progress to a frame.** No frame was presented in the 9 minutes: the harness dumps the first presented frame, and none was dumped. On my patched tree the first frame is dumped within about 20 seconds. - **What it does instead:** 284,392 `StorageTexture` creations in that time, on 371 distinct addresses. The same surfaces are created thousands of times (`0x115df30000` 7,681 times, `0x1163060000` 5,790, `0x112c7b0000` 5,787). At about 4 minutes the device memory was at 11.9 of 12 GB, two threads were at 100% CPU, and the process used 18 GB of RAM. So the next stop of the title on this head is not a refusal but this build storm. I think the cause is the one-image-per-table-element build of surfaces that appear at several extents (dynamic-resolution variants of one surface). On my local tree, substituting one representative per family of variants and building table entries lazily avoids it, and the same title then reaches the 3D scene and the Initial Setup menu. That is a separate topic from this PR. I can open it as its own PR if you want it.
Capmare commented 2026-10-19 09:02:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-19T09:02:38Z.


Update on the ANV failure of the two sampler tests: the Mesa developers answered on Mesa issue 16622. It is fixed by Mesa merge request !37394 ("nir/brw: Fix texture/sampler accesses with EU fusion on Gfx12.X HW"). On Gfx12 two fused threads run in lock step and cannot have different sampler handles, which matches workgroup 1 getting workgroup 0's sampler. The fix is in Mesa 25.3.0 and later, and not in the 25.2 branch.

I checked it on the same Intel RPL-S with the freedesktop Flatpak runtimes' Mesa, using the standalone program from the issue. Mesa 25.2.7 (the distribution package) gives 18 failing runs. Mesa 26.2.2 and 26.2.4 give 0.

I did not run agc_driver_nested_sampler_table and agc_driver_pointer_phi_sampler_table themselves on the newer Mesa. So the description can say that the two tests fail on ANV with Mesa 25.2.x and that Mesa 25.3 and later has the fix. The tests stay as they are.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263589980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6263589980). Originally posted by [Capmare](https://github.com/Capmare) on 2026-10-19T09:02:38Z. --- Update on the ANV failure of the two sampler tests: the Mesa developers answered on [Mesa issue 16622](https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16622). It is fixed by Mesa merge request [!37394](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37394) ("nir/brw: Fix texture/sampler accesses with EU fusion on Gfx12.X HW"). On Gfx12 two fused threads run in lock step and cannot have different sampler handles, which matches workgroup 1 getting workgroup 0's sampler. The fix is in Mesa 25.3.0 and later, and not in the 25.2 branch. I checked it on the same Intel RPL-S with the freedesktop Flatpak runtimes' Mesa, using the standalone program from the issue. Mesa 25.2.7 (the distribution package) gives 18 failing runs. Mesa 26.2.2 and 26.2.4 give 0. I did not run `agc_driver_nested_sampler_table` and `agc_driver_pointer_phi_sampler_table` themselves on the newer Mesa. So the description can say that the two tests fail on ANV with Mesa 25.2.x and that Mesa 25.3 and later has the fix. The tests stay as they are.
Capmare commented 2026-10-19 12:50:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Capmare on 2026-10-19T12:50:21Z.


A note on the Wolverine result above: the build storm is not specific to this branch. On current main (b106f6f8c) the same title also presents no frame in 5 minutes: GPU memory is full and the same sampled textures are rebuilt about 418 times each (20,392 creations). The numbers for both builds are in #6099. So the next stop for this title, after this PR, is the churn, which is the dynamic-resolution part of #6099. I have a change for it on my local tree and will send it as a PR once my open PR is merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6267616619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6267616619). Originally posted by [Capmare](https://github.com/Capmare) on 2026-10-19T12:50:21Z. --- A note on the Wolverine result above: the build storm is not specific to this branch. On current `main` (b106f6f8c) the same title also presents no frame in 5 minutes: GPU memory is full and the same sampled textures are rebuilt about 418 times each (20,392 creations). The numbers for both builds are in [#6099](https://github.com/boykopovar/AnyPS5/issues/6099#issuecomment-6267614925). So the next stop for this title, after this PR, is the churn, which is the dynamic-resolution part of #6099. I have a change for it on my local tree and will send it as a PR once my open PR is merged.
oneandonlydean commented 2026-10-20 14:26:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T14:26:24Z.


Thanks for the sampler and pointer-Phi extensions. #7223 has moved to 74700a08d1: it now carries your shared-consumer fix (same patch as 0df7d3256e, with your authorship) and is merged with current main. This branch still sits on #7223's older head and conflicts with main in ResourcePlan.hpp, ResourceMaterializer.cpp and Recompiler.cpp.

Could you restack your three commits (65a15b9919, 4a4db4bf94, b91f0508d5) on #7223's current head? The review would then cover only those three. Note that #7223 moves the disk-plan format to 42, so any further plan field here needs 43.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293185624 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6293185624). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T14:26:24Z. --- Thanks for the sampler and pointer-Phi extensions. #7223 has moved to `74700a08d1`: it now carries your shared-consumer fix (same patch as `0df7d3256e`, with your authorship) and is merged with current `main`. This branch still sits on #7223's older head and conflicts with `main` in `ResourcePlan.hpp`, `ResourceMaterializer.cpp` and `Recompiler.cpp`. Could you restack your three commits (`65a15b9919`, `4a4db4bf94`, `b91f0508d5`) on #7223's current head? The review would then cover only those three. Note that #7223 moves the disk-plan format to 42, so any further plan field here needs 43.
EagleBearerYS commented 2026-10-21 05:58:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T05:58:19Z.


@oneandonlydean, done: the three commits are restacked on #7223's 74700a08d1, so the review covers only them. The new hashes are 41220941d8, 9200c3a2d5 and f6fb8b64a9. 0df7d3256e is dropped, since #7223 carries it.

  • Formats: 9200c3a2d5 adds the plan's pointer-keyed field, so it moves ShaderDiskCache::FormatVersion to 43 and ImageTableAbi::Version to 4. The other two commits change no format.
  • The conflicts: each resolution takes #7223's code and re-applies ours on it. TableColumn keeps #6232's selected and selection first, then pointerKeyed. The plan encoder, the hash and sameColumns take the new field too.
  • Tested: Linux, lavapipe, CI's configuration:
    • each commit builds and passes its own tests;
    • at the head, the nested and pointer-Phi table tests, agc_shader_disk_cache and the rest of the image-table family pass 10 runs in a row (21 tests);
    • the ^(agc|shader) tests pass, 838 of 838.
    • on GitHub's runners, merged with current main the way CI builds it (run), the nested and pointer-Phi table tests, agc_shader_disk_cache and agc_shader_bindless pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass.
  • One thing on main since #7223's merge: #7966 (merged 2026-10-21 01:21 UTC) also moved FormatVersion from 41 to 42. #7223 and main now both say 42 for different layouts, and git merges that line without a conflict. This branch's 43 is past both. It's also the one line where this branch conflicts with current main, until #7223 takes main again. If #7223 moves to 43, this branch moves to 44.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309189933 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6309189933). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T05:58:19Z. --- @oneandonlydean, done: the three commits are restacked on #7223's 74700a08d1, so the review covers only them. The new hashes are 41220941d8, 9200c3a2d5 and f6fb8b64a9. `0df7d3256e` is dropped, since #7223 carries it. - **Formats:** 9200c3a2d5 adds the plan's pointer-keyed field, so it moves `ShaderDiskCache::FormatVersion` to 43 and `ImageTableAbi::Version` to 4. The other two commits change no format. - **The conflicts:** each resolution takes #7223's code and re-applies ours on it. `TableColumn` keeps #6232's `selected` and `selection` first, then `pointerKeyed`. The plan encoder, the hash and `sameColumns` take the new field too. - **Tested:** Linux, lavapipe, CI's configuration: - each commit builds and passes its own tests; - at the head, the nested and pointer-Phi table tests, `agc_shader_disk_cache` and the rest of the image-table family pass 10 runs in a row (21 tests); - the `^(agc|shader)` tests pass, 838 of 838. - on GitHub's runners, merged with current `main` the way CI builds it ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39549558783)), the nested and pointer-Phi table tests, `agc_shader_disk_cache` and `agc_shader_bindless` pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass. - **One thing on `main` since #7223's merge:** #7966 (merged 2026-10-21 01:21 UTC) also moved `FormatVersion` from 41 to 42. #7223 and `main` now both say 42 for different layouts, and git merges that line without a conflict. This branch's 43 is past both. It's also the one line where this branch conflicts with current `main`, until #7223 takes `main` again. If #7223 moves to 43, this branch moves to 44.
oneandonlydean commented 2026-10-21 06:08:34 +00:00 (Migrated from github.com)

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


@EagleBearerYS thanks for the restack and the format notes. A review of the three restacked commits is next. On the version line: whichever of this, #7223 and the other open FormatVersion bumps lands first takes main+1, and the rest move up at their own merge, so we will check it again just before merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309331158 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6309331158). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T06:08:34Z. --- @EagleBearerYS thanks for the restack and the format notes. A review of the three restacked commits is next. On the version line: whichever of this, #7223 and the other open `FormatVersion` bumps lands first takes `main`+1, and the rest move up at their own merge, so we will check it again just before merging.
oneandonlydean commented 2026-10-21 06:45:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:45:25Z.


@EagleBearerYS a heads-up on the version line: #8295 has merged and moved main's ShaderDiskCache::FormatVersion to 43, the same value this branch writes, so git now merges it without a conflict. This branch needs a value above 43. #7223 (which still writes 42) lands first, so the exact number depends on what it takes; we will check it again just before each merge. ImageTableAbi::Version is unaffected.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309862058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6309862058). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T06:45:25Z. --- @EagleBearerYS a heads-up on the version line: #8295 has merged and moved `main`'s `ShaderDiskCache::FormatVersion` to 43, the same value this branch writes, so git now merges it without a conflict. This branch needs a value above 43. #7223 (which still writes 42) lands first, so the exact number depends on what it takes; we will check it again just before each merge. `ImageTableAbi::Version` is unaffected.
EagleBearerYS commented 2026-10-21 11:48:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T11:48:48Z.


@oneandonlydean, on the version line: #6683 merged with ShaderDiskCache::FormatVersion 44, and you asked #7223 to take 45, so this branch now writes 46. ImageTableAbi::Version stays 4.

  • 92200f93e3 merges #7223's current head 87168157a2. The only conflict was that line.
  • 6c1371b261 merges main b6fe513b9a, so the branch merges cleanly with main again. Its only conflict was the same line.
  • The review delta is unchanged: the three commits are still 41220941d8, 9200c3a2d5 and f6fb8b64a9.
  • Tested on GitHub's runners (run): the nested and pointer-Phi table tests, agc_driver_image_table, agc_shader_disk_cache and agc_shader_bindless pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass. The libc and libkernel suites pass, apart from libc's precise_wait timing test on Linux, which this branch doesn't touch.

If #7223 takes a different number, this one moves to the next one above it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6315163767 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#issuecomment-6315163767). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T11:48:48Z. --- @oneandonlydean, on the version line: #6683 merged with `ShaderDiskCache::FormatVersion` 44, and you asked #7223 to take 45, so this branch now writes 46. `ImageTableAbi::Version` stays 4. - 92200f93e3 merges #7223's current head 87168157a2. The only conflict was that line. - 6c1371b261 merges `main` b6fe513b9a, so the branch merges cleanly with `main` again. Its only conflict was the same line. - The review delta is unchanged: the three commits are still 41220941d8, 9200c3a2d5 and f6fb8b64a9. - Tested on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39589869978)): the nested and pointer-Phi table tests, `agc_driver_image_table`, `agc_shader_disk_cache` and `agc_shader_bindless` pass 5 runs in a row on Linux. On Windows the GPU ones skip and the rest pass. The libc and libkernel suites pass, apart from libc's `precise_wait` timing test on Linux, which this branch doesn't touch. If #7223 takes a different number, this one moves to the next one above it.
XairRrR commented 2026-10-29 13:07:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T13:07:44Z.

Review: APPROVED


Reviewed — approved

The head merges cleanly into main and builds. The four new nested and pointer-keyed table tests pass on an NVIDIA GPU under the Khronos validation layer with no VUID- messages, and they fail with #7223's production code. I found nothing blocking; two non-blocking points are about stale wording.

Scope: the PR's diff against main also carries all of #7223 (open). I reviewed this PR's own change, which is the diff from #7223's head 0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461 to this head (13 files, +489 −43). #7223's code is not covered by this review.

What I ran

  • PR head: e04a7057655626a8815d8c9293ae58651f9e180b
  • main: 157b02c4f1803e9d2cd757677b9a805961203fc4
  • #7223 head (the base for the negative control): 0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08). All builds and runs used a clean worktree.
git fetch origin main pull/7395/head:refs/review/7395 pull/7223/head:refs/review/7223dep
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/7395            # clean
git diff --check origin/main...refs/review/7395
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target agc_driver_image_table_tests agc_shader_disk_cache_tests agc_shader_memory_tests
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 -j4 -V --output-on-failure \
  -R '^(agc_shader_bindless|agc_shader_memory|agc_shader_disk_cache|agc_driver_image_table|agc_driver_nested_.*|agc_driver_pointer_phi_.*)$'
# same build and ctest on origin/main
# negative control: on the merged tree, git checkout refs/review/7223dep -- core/shader, rebuild agc_driver_image_table_tests,
# ctest -R '^(agc_driver_nested_.*|agc_driver_pointer_phi_.*)$'

Results

Check Result
Merge into main Clean
git diff --check No output
tools/check_conventions.py --base origin/main All conventions checks passed.
Build (3 test targets and their dependencies) OK
Focused tests, merged tree, validation layer 11 of 11 pass; the slowest takes 2.4 s
Focused tests, main, validation layer 4 of 4 pass (the nested and pointer tests come from #7223 and don't exist on main)
VUID- lines 0 on the merged tree, 0 on main
was not found but was requested by env var VK_INSTANCE_LAYERS Absent from both logs; both logs show the loader inserting VK_LAYER_KHRONOS_validation
Device used NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08 (from the test log)
Merged tree
 1/11 Test  #909: agc_shader_bindless ....................   Passed    0.06 sec
 2/11 Test  #935: agc_shader_memory ......................   Passed    0.17 sec
 3/11 Test #1580: agc_driver_nested_image_table_large ....   Passed    0.47 sec
 4/11 Test #1579: agc_driver_nested_image_table ..........   Passed    0.73 sec
 5/11 Test #1581: agc_driver_nested_image_table_budget ...   Passed    0.48 sec
 6/11 Test #1582: agc_driver_nested_sampler_table ........   Passed    0.48 sec
 7/11 Test  #950: agc_shader_disk_cache ..................   Passed    1.36 sec
 8/11 Test #1584: agc_driver_pointer_phi_ballot_table ....   Passed    0.38 sec
 9/11 Test #1583: agc_driver_pointer_phi_sampler_table ...   Passed    0.58 sec
10/11 Test #1585: agc_driver_pointer_phi_copies_table ....   Passed    0.39 sec
11/11 Test #1209: agc_driver_image_table .................   Passed    2.40 sec
100% tests passed out of 11
main
1/4 Test  #909: agc_shader_bindless ..............   Passed    0.06 sec
2/4 Test  #935: agc_shader_memory ................   Passed    0.17 sec
3/4 Test  #950: agc_shader_disk_cache ............   Passed    1.13 sec
4/4 Test #1209: agc_driver_image_table ...........   Passed    2.31 sec
100% tests passed out of 4

Negative control

On the merged tree I replaced core/shader with #7223's head version, kept the PR's tests, and rebuilt agc_driver_image_table_tests. agc_shader_disk_cache was left out because its new round-trip test uses the pointerKeyed field, which doesn't exist without the change. #7223's head is behind current main, so this also reverted a few unrelated core/shader files to their older versions; the build still succeeded.

All four new tests fail with the refusals the PR describes. #7223's own nested tests still pass:

Output
1/7 Test #1585: agc_driver_pointer_phi_copies_table ....***Failed    0.60 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000cc(GetAddressResource(Phi(Immediate, Phi(ReadConstBuffer@pc=0x000000a8(...
2/7 Test #1582: agc_driver_nested_sampler_table ........***Failed    0.63 sec
ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x0000004c(GetBufferResource(LoadAddressU32@pc=0x00000044(...
3/7 Test #1584: agc_driver_pointer_phi_ballot_table ....***Failed    0.63 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Immediate, Phi(CompositeExtractU32x4(Ballot(...
4/7 Test #1583: agc_driver_pointer_phi_sampler_table ...***Failed    0.66 sec
ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000048(GetAddressResource(Phi(ReadConstBuffer@pc=0x00000030(...
5/7 Test #1580: agc_driver_nested_image_table_large ....   Passed    0.57 sec
6/7 Test #1581: agc_driver_nested_image_table_budget ...   Passed    0.59 sec
7/7 Test #1579: agc_driver_nested_image_table ..........   Passed    0.71 sec
43% tests passed, 4 tests failed out of 7

Findings

Blocking

None.

Non-blocking

  1. Test summary lines still claim refusal checks that were removed. The last three test commits dropped the refusal assertions, as the maintainer asked in the 2026-10-29 comment, and the refused helper is gone. The success lines still say otherwise:

    The maintainer's comment also asked for this wording to be dropped. Suggested fix: remove "and refusals" from both lines.

  2. The description's version and ordering notes are out of date.

    • The head writes ShaderDiskCache::FormatVersion = 51 (ShaderDiskCache.hpp:16), because #7223 now takes 50.
    • The description still says "The disk-cache format is 50 here", assigns 51 to #8939, and says #7223 uses 49.
    • The Ordering paragraph and the first checklist line name #7223's 153400ba2b, but the branch now merges #7223's 0dbf5478b2.

    The number is fine as committed. Only the text needs updating so whoever merges sees the current numbers.

Notes from reading the code, no change requested:

  • A pointer-keyed column looks up the descriptor by the pointer's actual 64-bit runtime value. The value comes from handle arguments 1 and 2, which are patched from parentPointer. The lookup does not depend on which Phi arm produced the value. That is why accepting Ballot lane-mask words and same-column copies under other keys is sound: a value that matches no captured record faults as outside the snapshot, and a value that matches a captured record reads the descriptor the hardware would read at that address.
  • The change to merged in TryMakeIndirectColumn (IsPhi() && UnwrapTableRead(...) == nullptr) only widens what plans for non-buffer handles. For buffer handles, a Phi that UnwrapTableRead reduces to one record read now takes the key-bounded path. The description explains this as #7880's interplay, and agc_shader_bindless and agc_shader_memory pass here.
  • The changes are consistent across files: the decoder rejects a pointerKeyed column that is not indirect, is a buffer, or has a parent, and the static_assert sizes, the field count and the minimum record size all follow the new field.
  • The debt entry in docs/dev/debt/shader.md covers the new limit: 65536 captured record pointers, with uncaptured pointers faulting.

Not verified

  • #7223's code itself, which is part of this PR's diff against main until #7223 merges.
  • Other GPUs. I ran only the NVIDIA RTX 4070 Ti SUPER. The ANV and Intel Windows failures described in the PR (Mesa issue 16622) were not reproduced here.
  • Windows builds.
  • Any title. Following the review rules, I launched no game.
  • The CPU cost of snapshotting up to 65536 record pointers per pointer-keyed column on every dispatch. No trace was taken.
  • Tests outside the focused set, and repeated runs. Each test ran once.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5698170039 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#pullrequestreview-5698170039). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T13:07:44Z. **Review:** APPROVED --- # Reviewed — approved The head merges cleanly into `main` and builds. The four new nested and pointer-keyed table tests pass on an NVIDIA GPU under the Khronos validation layer with no `VUID-` messages, and they fail with #7223's production code. I found nothing blocking; two non-blocking points are about stale wording. Scope: the PR's diff against `main` also carries all of #7223 (open). I reviewed this PR's own change, which is the diff from #7223's head `0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461` to this head (13 files, +489 −43). #7223's code is not covered by this review. ## What I ran - PR head: `e04a7057655626a8815d8c9293ae58651f9e180b` - `main`: `157b02c4f1803e9d2cd757677b9a805961203fc4` - #7223 head (the base for the negative control): `0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461` - Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08). All builds and runs used a clean worktree. ```sh git fetch origin main pull/7395/head:refs/review/7395 pull/7223/head:refs/review/7223dep git checkout --detach origin/main git merge --no-ff --no-edit refs/review/7395 # clean git diff --check origin/main...refs/review/7395 python3 tools/check_conventions.py --base origin/main cmake --build build -j10 --target agc_driver_image_table_tests agc_shader_disk_cache_tests agc_shader_memory_tests 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 -j4 -V --output-on-failure \ -R '^(agc_shader_bindless|agc_shader_memory|agc_shader_disk_cache|agc_driver_image_table|agc_driver_nested_.*|agc_driver_pointer_phi_.*)$' # same build and ctest on origin/main # negative control: on the merged tree, git checkout refs/review/7223dep -- core/shader, rebuild agc_driver_image_table_tests, # ctest -R '^(agc_driver_nested_.*|agc_driver_pointer_phi_.*)$' ``` ## Results | Check | Result | |---|---| | Merge into `main` | Clean | | `git diff --check` | No output | | `tools/check_conventions.py --base origin/main` | `All conventions checks passed.` | | Build (3 test targets and their dependencies) | OK | | Focused tests, merged tree, validation layer | 11 of 11 pass; the slowest takes 2.4 s | | Focused tests, `main`, validation layer | 4 of 4 pass (the nested and pointer tests come from #7223 and don't exist on `main`) | | `VUID-` lines | 0 on the merged tree, 0 on `main` | | `was not found but was requested by env var VK_INSTANCE_LAYERS` | Absent from both logs; both logs show the loader inserting `VK_LAYER_KHRONOS_validation` | | Device used | NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08 (from the test log) | <details><summary>Merged tree</summary> ``` 1/11 Test #909: agc_shader_bindless .................... Passed 0.06 sec 2/11 Test #935: agc_shader_memory ...................... Passed 0.17 sec 3/11 Test #1580: agc_driver_nested_image_table_large .... Passed 0.47 sec 4/11 Test #1579: agc_driver_nested_image_table .......... Passed 0.73 sec 5/11 Test #1581: agc_driver_nested_image_table_budget ... Passed 0.48 sec 6/11 Test #1582: agc_driver_nested_sampler_table ........ Passed 0.48 sec 7/11 Test #950: agc_shader_disk_cache .................. Passed 1.36 sec 8/11 Test #1584: agc_driver_pointer_phi_ballot_table .... Passed 0.38 sec 9/11 Test #1583: agc_driver_pointer_phi_sampler_table ... Passed 0.58 sec 10/11 Test #1585: agc_driver_pointer_phi_copies_table .... Passed 0.39 sec 11/11 Test #1209: agc_driver_image_table ................. Passed 2.40 sec 100% tests passed out of 11 ``` </details> <details><summary>main</summary> ``` 1/4 Test #909: agc_shader_bindless .............. Passed 0.06 sec 2/4 Test #935: agc_shader_memory ................ Passed 0.17 sec 3/4 Test #950: agc_shader_disk_cache ............ Passed 1.13 sec 4/4 Test #1209: agc_driver_image_table ........... Passed 2.31 sec 100% tests passed out of 4 ``` </details> ## Negative control On the merged tree I replaced `core/shader` with #7223's head version, kept the PR's tests, and rebuilt `agc_driver_image_table_tests`. `agc_shader_disk_cache` was left out because its new round-trip test uses the `pointerKeyed` field, which doesn't exist without the change. #7223's head is behind current `main`, so this also reverted a few unrelated `core/shader` files to their older versions; the build still succeeded. All four new tests fail with the refusals the PR describes. #7223's own nested tests still pass: <details><summary>Output</summary> ``` 1/7 Test #1585: agc_driver_pointer_phi_copies_table ....***Failed 0.60 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000cc(GetAddressResource(Phi(Immediate, Phi(ReadConstBuffer@pc=0x000000a8(... 2/7 Test #1582: agc_driver_nested_sampler_table ........***Failed 0.63 sec ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x0000004c(GetBufferResource(LoadAddressU32@pc=0x00000044(... 3/7 Test #1584: agc_driver_pointer_phi_ballot_table ....***Failed 0.63 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Immediate, Phi(CompositeExtractU32x4(Ballot(... 4/7 Test #1583: agc_driver_pointer_phi_sampler_table ...***Failed 0.66 sec ShaderRecompiler::Recompile: GetSamplerResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000048(GetAddressResource(Phi(ReadConstBuffer@pc=0x00000030(... 5/7 Test #1580: agc_driver_nested_image_table_large .... Passed 0.57 sec 6/7 Test #1581: agc_driver_nested_image_table_budget ... Passed 0.59 sec 7/7 Test #1579: agc_driver_nested_image_table .......... Passed 0.71 sec 43% tests passed, 4 tests failed out of 7 ``` </details> ## Findings ### Blocking None. ### Non-blocking 1. **Test summary lines still claim refusal checks that were removed.** The last three test commits dropped the refusal assertions, as the maintainer asked in the 2026-10-29 comment, and the `refused` helper is gone. The success lines still say otherwise: - [`ImageTable.cpp:1635`](https://github.com/boykopovar/AnyPS5/blob/e04a7057655626a8815d8c9293ae58651f9e180b/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L1635-L1635) prints "... faults, budget and refusals checked". - [`ImageTable.cpp:1799`](https://github.com/boykopovar/AnyPS5/blob/e04a7057655626a8815d8c9293ae58651f9e180b/core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp#L1799-L1799) prints "... with sharing, budgets and refusals". The maintainer's comment also asked for this wording to be dropped. Suggested fix: remove "and refusals" from both lines. 2. **The description's version and ordering notes are out of date.** - The head writes `ShaderDiskCache::FormatVersion = 51` ([`ShaderDiskCache.hpp:16`](https://github.com/boykopovar/AnyPS5/blob/e04a7057655626a8815d8c9293ae58651f9e180b/core/shader/recompiler/ShaderDiskCache.hpp#L16-L16)), because #7223 now takes 50. - The description still says "The disk-cache format is 50 here", assigns 51 to #8939, and says #7223 uses 49. - The Ordering paragraph and the first checklist line name #7223's 153400ba2b, but the branch now merges #7223's `0dbf5478b2`. The number is fine as committed. Only the text needs updating so whoever merges sees the current numbers. Notes from reading the code, no change requested: - A pointer-keyed column looks up the descriptor by the pointer's actual 64-bit runtime value. The value comes from handle arguments 1 and 2, which are patched from `parentPointer`. The lookup does not depend on which Phi arm produced the value. That is why accepting `Ballot` lane-mask words and same-column copies under other keys is sound: a value that matches no captured record faults as outside the snapshot, and a value that matches a captured record reads the descriptor the hardware would read at that address. - The change to `merged` in `TryMakeIndirectColumn` (`IsPhi() && UnwrapTableRead(...) == nullptr`) only widens what plans for non-buffer handles. For buffer handles, a Phi that `UnwrapTableRead` reduces to one record read now takes the key-bounded path. The description explains this as #7880's interplay, and `agc_shader_bindless` and `agc_shader_memory` pass here. - The changes are consistent across files: the decoder rejects a `pointerKeyed` column that is not indirect, is a buffer, or has a parent, and the `static_assert` sizes, the field count and the minimum record size all follow the new field. - The debt entry in `docs/dev/debt/shader.md` covers the new limit: 65536 captured record pointers, with uncaptured pointers faulting. ## Not verified - #7223's code itself, which is part of this PR's diff against `main` until #7223 merges. - Other GPUs. I ran only the NVIDIA RTX 4070 Ti SUPER. The ANV and Intel Windows failures described in the PR (Mesa issue 16622) were not reproduced here. - Windows builds. - Any title. Following the review rules, I launched no game. - The CPU cost of snapshotting up to 65536 record pointers per pointer-keyed column on every dispatch. No trace was taken. - Tests outside the focused set, and repeated runs. Each test ran once.
XairRrR commented 2026-11-03 08:26:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T08:26:45Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

This pull request does not merge cleanly into main (4f41f4c375): head 6cb37cc9ed conflicts in

  • core/shader/recompiler/ShaderDiskCache.hpp
  • docs/dev/debt/shader.md

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5749065474 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#pullrequestreview-5749065474). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T08:26:45Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (4f41f4c375f5abb487dbd184fbc150f31994d762): head 6cb37cc9eda523074d5fd844537c28ce2bbe6907 conflicts in - `core/shader/recompiler/ShaderDiskCache.hpp` - `docs/dev/debt/shader.md` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=3206 head=6cb37cc9eda523074d5fd844537c28ce2bbe6907 -->
XairRrR commented 2026-11-03 14:18:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T14:18:14Z.

Review: APPROVED


Re-checked — approved

Since e04a705765 the PR has fixed the test wording, extended the per-snapshot descriptor-epoch check to a nested S# table that is the shader's only table (with a new test), put libc on PATH for both nested retry tests on Windows, moved to FormatVersion 63, and resolved #12246's resourceViews loop in a merge. The checks pass, the focused tests pass, and the new test fails without the fix. I found nothing blocking.

What changed since my last review

  • 4769d5a745: removes "and refusals" from the nested image and nested sampler success lines.
  • 967f0dbebb: TableSnapshotter::Run() now sets hasIndirect for a sampler when its column is indirect or its heap source is itself a table column. This is the same test the image loop already used. The commit adds agc_shader_nested_sampler_snapshot_retry.
  • 5fdf20fc3d: on Windows, puts libc's directory on PATH for both agc_shader_nested_snapshot_retry and agc_shader_nested_sampler_snapshot_retry.
  • f4781de1f7: sets ShaderDiskCache::FormatVersion to 63. main is at 52, so this stays above it.
  • Merges of main and of #7223's 7f36e41c45: 6cb37cc9ed moves #12246's resourceViews loop out of CopyRecords and back into Snapshot(). #7223's own budget-reset commit is out of this review's scope, as before.
  • Description: the version and ordering notes are updated.

What I ran

  • Head: 63b5c09df9776ccd7d0ce018dfd676931e2d7639
  • main: 4f41f4c375f5abb487dbd184fbc150f31994d762
  • Merged tree: fbf279248cc3902f161e51a442c76155374f0f4b
  • Machine: Debian 13 VM (32 vCPU, Xeon Gold 6136), GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19)
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...63b5c09df9776ccd7d0ce018dfd676931e2d7639
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ctest --test-dir build -j8 --test-load 32 --output-on-failure \
  -R "^(agc_shader_nested_.*snapshot_retry|agc_shader_disk_cache|agc_shader_bindless|agc_shader_memory|agc_driver_image_table|agc_driver_nested_.*|agc_driver_pointer_phi_.*)$"
# negative control: in ResourceMaterializer.cpp, the sampler loop's hasIndirect line reverted to `hasIndirect |= column.indirect;`
ninja -C build -j32 -l32 agc_shader_memory_tests
ctest --test-dir build --output-on-failure -R "^agc_shader_nested_(sampler_)?snapshot_retry$"
git show fbf279248cc3902f161e51a442c76155374f0f4b:core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp > core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
ninja -C build -j32 -l32 agc_shader_memory_tests
ctest --test-dir build -R "^agc_shader_nested_(sampler_)?snapshot_retry$"
git status --porcelain   # empty
Check Result
git diff --check No output
check_conventions.py All conventions checks passed.
Build and selected tests (script, merged tree) Build OK; 2223 run, no new failures and no timeouts. The 7 known failures also fail on main.
Validation layer (script) Loaded in 776 of 777 tests; 0 tests with new VUID- lines; layer_missing_in empty
Focused set (13 tests) 13 of 13 pass. The slowest is agc_shader_disk_cache at 6.4 s.
Negative control agc_shader_nested_sampler_snapshot_retry fails with nested retry: expected inner retry and outer revalidation. #7223's agc_shader_nested_snapshot_retry still passes. After the restore, both pass and the worktree is clean.

Previous findings

  1. Summary lines claimed refusal checks — Resolved. 4769d5a745 removes "and refusals" from both lines. grep refusals finds nothing in ImageTable.cpp at the head.
  2. Stale version and ordering notes in the description — Resolved. The description now says 63 (the code has 63, and main has 52) and names #7223's 7f36e41c45 in the Ordering paragraph. Two small leftovers: the first checklist line still says "merged with #7223's head 0dbf5478b2 (main f7e84c4cf1)", and the Version bumps paragraph still says main is at 51 (it is at 52). Neither needs to block.

New findings

Blocking

None.

Non-blocking

  1. Nested child T#s skip #12246's registered 1D-array view normalization. CopyRecords builds nested children (core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1490), and only Snapshot() fills resourceViews (:1502-1510). For an image reached through a nested child, the materializer therefore always uses the child's raw words (:2132-2133). The merge commit argues this is exact because image.table only indexes top-level tables. However, layerRowsCompatible is set without regard to how the T# is reached (core/shader/recompiler/Optimization/src/ResourceTracker.cpp:2402). So a sampled Dim1DArray T# read through record → pointer → V# would be planned as layer-rows compatible while its descriptor is neither normalized nor registered. No test covers that combination, and I did not check what the emitter does in that case.
    • Suggested fix: either compute resourceViews for nested children of a candidate image, or clear layerRowsCompatible for images whose column has a table-column heap source. Alternatively, list the gap in docs/dev/debt/shader.md.

Notes on the new code, with no change requested:

  • 967f0dbebb mirrors the image loop exactly (ResourceMaterializer.cpp:755-763 against :746-754). plan.descriptorSources.at(column.heapSource) throws on an out-of-range source instead of reading past the end.
  • The PATH change for Windows is test registration only.

Not verified

  • Windows. I did not check the PATH fix, and the description's runs are author-reported.
  • GPUs other than lavapipe. The ANV and Intel Windows sampler-array issue (Mesa issue 16622) is unchanged since my last review.
  • #7223's own code, including its 7f36e41c45 budget reset, which is part of this PR's diff against main until #7223 merges.
  • Any title. Following the review rules, I launched no game.
  • Repeated runs: each test ran once.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5753725835 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#pullrequestreview-5753725835). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T14:18:14Z. **Review:** APPROVED --- # Re-checked — approved Since e04a705765 the PR has fixed the test wording, extended the per-snapshot descriptor-epoch check to a nested S# table that is the shader's only table (with a new test), put libc on PATH for both nested retry tests on Windows, moved to `FormatVersion` 63, and resolved #12246's `resourceViews` loop in a merge. The checks pass, the focused tests pass, and the new test fails without the fix. I found nothing blocking. ## What changed since my last review - **4769d5a745:** removes "and refusals" from the nested image and nested sampler success lines. - **967f0dbebb:** `TableSnapshotter::Run()` now sets `hasIndirect` for a sampler when its column is `indirect` or its heap source is itself a table column. This is the same test the image loop already used. The commit adds `agc_shader_nested_sampler_snapshot_retry`. - **5fdf20fc3d:** on Windows, puts libc's directory on PATH for both `agc_shader_nested_snapshot_retry` and `agc_shader_nested_sampler_snapshot_retry`. - **f4781de1f7:** sets `ShaderDiskCache::FormatVersion` to 63. `main` is at 52, so this stays above it. - **Merges of `main` and of #7223's 7f36e41c45:** 6cb37cc9ed moves #12246's `resourceViews` loop out of `CopyRecords` and back into `Snapshot()`. #7223's own budget-reset commit is out of this review's scope, as before. - **Description:** the version and ordering notes are updated. ## What I ran - Head: `63b5c09df9776ccd7d0ce018dfd676931e2d7639` - `main`: `4f41f4c375f5abb487dbd184fbc150f31994d762` - Merged tree: `fbf279248cc3902f161e51a442c76155374f0f4b` - Machine: Debian 13 VM (32 vCPU, Xeon Gold 6136), GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19) ```sh git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...63b5c09df9776ccd7d0ce018dfd676931e2d7639 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 ctest --test-dir build -j8 --test-load 32 --output-on-failure \ -R "^(agc_shader_nested_.*snapshot_retry|agc_shader_disk_cache|agc_shader_bindless|agc_shader_memory|agc_driver_image_table|agc_driver_nested_.*|agc_driver_pointer_phi_.*)$" # negative control: in ResourceMaterializer.cpp, the sampler loop's hasIndirect line reverted to `hasIndirect |= column.indirect;` ninja -C build -j32 -l32 agc_shader_memory_tests ctest --test-dir build --output-on-failure -R "^agc_shader_nested_(sampler_)?snapshot_retry$" git show fbf279248cc3902f161e51a442c76155374f0f4b:core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp > core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp ninja -C build -j32 -l32 agc_shader_memory_tests ctest --test-dir build -R "^agc_shader_nested_(sampler_)?snapshot_retry$" git status --porcelain # empty ``` | Check | Result | |---|---| | `git diff --check` | No output | | `check_conventions.py` | `All conventions checks passed.` | | Build and selected tests (script, merged tree) | Build OK; 2223 run, no new failures and no timeouts. The 7 known failures also fail on `main`. | | Validation layer (script) | Loaded in 776 of 777 tests; 0 tests with new `VUID-` lines; `layer_missing_in` empty | | Focused set (13 tests) | 13 of 13 pass. The slowest is `agc_shader_disk_cache` at 6.4 s. | | Negative control | `agc_shader_nested_sampler_snapshot_retry` fails with `nested retry: expected inner retry and outer revalidation`. #7223's `agc_shader_nested_snapshot_retry` still passes. After the restore, both pass and the worktree is clean. | ## Previous findings 1. **Summary lines claimed refusal checks — Resolved.** 4769d5a745 removes "and refusals" from both lines. `grep refusals` finds nothing in `ImageTable.cpp` at the head. 2. **Stale version and ordering notes in the description — Resolved.** The description now says 63 (the code has 63, and `main` has 52) and names #7223's 7f36e41c45 in the Ordering paragraph. Two small leftovers: the first checklist line still says "merged with #7223's head 0dbf5478b2 (`main` f7e84c4cf1)", and the Version bumps paragraph still says `main` is at 51 (it is at 52). Neither needs to block. ## New findings ### Blocking None. ### Non-blocking 1. **Nested child T#s skip #12246's registered 1D-array view normalization.** `CopyRecords` builds nested children (`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1490`), and only `Snapshot()` fills `resourceViews` (`:1502-1510`). For an image reached through a nested child, the materializer therefore always uses the child's raw words (`:2132-2133`). The merge commit argues this is exact because `image.table` only indexes top-level tables. However, `layerRowsCompatible` is set without regard to how the T# is reached (`core/shader/recompiler/Optimization/src/ResourceTracker.cpp:2402`). So a sampled `Dim1DArray` T# read through record → pointer → V# would be planned as layer-rows compatible while its descriptor is neither normalized nor registered. No test covers that combination, and I did not check what the emitter does in that case. - Suggested fix: either compute `resourceViews` for nested children of a candidate image, or clear `layerRowsCompatible` for images whose column has a table-column heap source. Alternatively, list the gap in `docs/dev/debt/shader.md`. Notes on the new code, with no change requested: - 967f0dbebb mirrors the image loop exactly (`ResourceMaterializer.cpp:755-763` against `:746-754`). `plan.descriptorSources.at(column.heapSource)` throws on an out-of-range source instead of reading past the end. - The PATH change for Windows is test registration only. ## Not verified - Windows. I did not check the PATH fix, and the description's runs are author-reported. - GPUs other than lavapipe. The ANV and Intel Windows sampler-array issue (Mesa issue 16622) is unchanged since my last review. - #7223's own code, including its 7f36e41c45 budget reset, which is part of this PR's diff against `main` until #7223 merges. - Any title. Following the review rules, I launched no game. - Repeated runs: each test ran once. <!-- anyps5-bots job=3361 head=63b5c09df9776ccd7d0ce018dfd676931e2d7639 -->
MarcZX10 commented 2026-11-16 20:20:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T20:20:09Z.

Review: COMMENTED


Reviewed — comments

The review covers the pointer-keyed sampler and image-table changes at head 3c58f422eef1fa2bb8950f704a05acb3c4a88989; I found no verified blocking defect, but did not read every changed line or run checks, so a formal decision is not justified.

What I ran

Read the prepared description, commit list, manifest, diff, review-folder README, and targeted ranges from the pinned repository reader. No tests or builds were run.

Results

Check Result Note
Targeted code review passed No concrete defect verified
Tests and build not run Author-reported results only
Full changed-line coverage not run Several changed ranges were not read

Findings

Blocking

None verified in the code read.

Non-blocking

None.

Not verified

The full changed-line sets were not read, so the remaining changes have not been reviewed. In particular, core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded from the review folder and was not read through the repository reader; several added ranges in other files were also not inspected. The author reports extensive Linux and Windows test runs and hardware runs in description.md; these were not performed by me. No merged-preview check or negative control was run.

Files read: review/description.md, review/commits.md, review/manifest.json, review/diff.patch, review/README.md; targeted ranges in core/shader/recompiler/Optimization/src/ResourceTracker.cpp, core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp, core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp, and core/shader/recompiler/ShaderDiskCache.cpp.

Files excluded or not fully read: core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded as too large; added-line ranges in the other changed files were not all read. review/files.json was not available in the review folder; the changed-file inventory came from the review-folder listing and README.

To get this to a good state

Nothing is required. Optional: complete the changed-line review and run the relevant checks on this head before making a formal merge decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5926927358 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#pullrequestreview-5926927358). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T20:20:09Z. **Review:** COMMENTED --- # Reviewed — comments The review covers the pointer-keyed sampler and image-table changes at head `3c58f422eef1fa2bb8950f704a05acb3c4a88989`; I found no verified blocking defect, but did not read every changed line or run checks, so a formal decision is not justified. ## What I ran Read the prepared description, commit list, manifest, diff, review-folder README, and targeted ranges from the pinned repository reader. No tests or builds were run. ## Results | Check | Result | Note | |---|---|---| | Targeted code review | passed | No concrete defect verified | | Tests and build | not run | Author-reported results only | | Full changed-line coverage | not run | Several changed ranges were not read | ## Findings ### Blocking None verified in the code read. ### Non-blocking None. ## Not verified The full changed-line sets were not read, so the remaining changes have not been reviewed. In particular, `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded from the review folder and was not read through the repository reader; several added ranges in other files were also not inspected. The author reports extensive Linux and Windows test runs and hardware runs in `description.md`; these were not performed by me. No merged-preview check or negative control was run. Files read: `review/description.md`, `review/commits.md`, `review/manifest.json`, `review/diff.patch`, `review/README.md`; targeted ranges in `core/shader/recompiler/Optimization/src/ResourceTracker.cpp`, `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`, `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`, and `core/shader/recompiler/ShaderDiskCache.cpp`. Files excluded or not fully read: `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded as too large; added-line ranges in the other changed files were not all read. `review/files.json` was not available in the review folder; the changed-file inventory came from the review-folder listing and README. ## To get this to a good state Nothing is required. Optional: complete the changed-line review and run the relevant checks on this head before making a formal merge decision.
MarcZX10 commented 2026-11-20 05:03:57 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

I reviewed head 5b21241399dda4bfacfd086c0f8bd2acde309a51 using the prepared diff and the pinned repo_read.py reader. I did not run commands or tests. The description reports repeated focused and CI runs; I treated those as author supplied results.

Results

Check Result Note
Prepared diff and targeted source review passed Core planner, snapshot, lookup, cache, and test changes read
Tests in this session not run No build or test execution
Reported GPU coverage not applicable Author reports Intel failures and other GPU passes

Findings

Blocking

None verified.

Non-blocking

  • The description reports both sampler regression tests failing on Intel ANV and Intel Arc by selecting another workgroup’s expected sampler. The reported standalone reproduction points to a driver issue, but the behavior remains an interoperability concern for affected Intel users. Consider documenting the affected driver behavior alongside the test expectations.

Not verified

  • No tests were run in this review. Reported test results are author supplied.
  • Full text of core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp was excluded from the bundle; only the changed ranges were read through the reader.
  • The complete behavior on console hardware and the reported Intel driver issue were not independently verified.
  • Read: review/description.md, review/commits.md, review/manifest.json, review/diff.patch; changed source ranges in core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp; and targeted ranges in core/shader/recompiler/Optimization/src/ResourceTracker.cpp, core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp, core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp, core/shader/recompiler/ShaderDiskCache.cpp, core/shader/recompiler/ShaderDiskCache.hpp, and core/shader/recompiler/ImageTableAbi.hpp.
  • Excluded by the prepared bundle: full ShaderMemory.cpp text. No other changed file listed in the manifest was identified as excluded.

To get this to a good state

Nothing is required. Optional: retain clear documentation of the known Intel driver behavior and its reported workaround.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5987768058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#pullrequestreview-5987768058). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T05:03:57Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran I reviewed head `5b21241399dda4bfacfd086c0f8bd2acde309a51` using the prepared diff and the pinned `repo_read.py` reader. I did not run commands or tests. The description reports repeated focused and CI runs; I treated those as author supplied results. ## Results | Check | Result | Note | |---|---|---| | Prepared diff and targeted source review | passed | Core planner, snapshot, lookup, cache, and test changes read | | Tests in this session | not run | No build or test execution | | Reported GPU coverage | not applicable | Author reports Intel failures and other GPU passes | ## Findings ### Blocking None verified. ### Non-blocking - The description reports both sampler regression tests failing on Intel ANV and Intel Arc by selecting another workgroup’s expected sampler. The reported standalone reproduction points to a driver issue, but the behavior remains an interoperability concern for affected Intel users. Consider documenting the affected driver behavior alongside the test expectations. ## Not verified - No tests were run in this review. Reported test results are author supplied. - Full text of `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` was excluded from the bundle; only the changed ranges were read through the reader. - The complete behavior on console hardware and the reported Intel driver issue were not independently verified. - Read: `review/description.md`, `review/commits.md`, `review/manifest.json`, `review/diff.patch`; changed source ranges in `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`; and targeted ranges in `core/shader/recompiler/Optimization/src/ResourceTracker.cpp`, `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`, `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`, `core/shader/recompiler/ShaderDiskCache.cpp`, `core/shader/recompiler/ShaderDiskCache.hpp`, and `core/shader/recompiler/ImageTableAbi.hpp`. - Excluded by the prepared bundle: full `ShaderMemory.cpp` text. No other changed file listed in the manifest was identified as excluded. ## To get this to a good state Nothing is required. Optional: retain clear documentation of the known Intel driver behavior and its reported workaround.
MarcZX10 commented 2026-11-21 05:49:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T05:49:05Z.

Review: COMMENTED


Reviewed — no blocking findings

The change targets nested and pointer-keyed descriptor table reads; this review is incomplete because several changed files were not read, so a formal decision is not justified.

What I ran

Reviewed the supplied diff and description for head 6f09da1100e25722400f7aa6bb1253e36c64bb5c. No test or build commands were run.

Results

Check Result Note
Diff and description review passed Supplied review materials read
Tests and build not run No commands run
Full changed-file review not run Several files remain unread

Findings

Blocking

None verified in the portions reviewed.

Non-blocking

None.

Not verified

Read review/description.md, review/manifest.json, and review/diff.patch (lines 1–90). The description includes author-reported test results; they were not independently verified. Did not read review/commits.md or the changed repository files at the pinned head. The manifest shows 14 changed files, including ShaderMemory.cpp, excluded from the review folder because it was too large. The remaining changed-file contents and behavior are not verified.

To get this to a good state

Nothing is required. Optional: complete review of the changed files and run the relevant tests before making a formal approval decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6003289754 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7395#pullrequestreview-6003289754). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T05:49:05Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The change targets nested and pointer-keyed descriptor table reads; this review is incomplete because several changed files were not read, so a formal decision is not justified. ## What I ran Reviewed the supplied diff and description for head `6f09da1100e25722400f7aa6bb1253e36c64bb5c`. No test or build commands were run. ## Results | Check | Result | Note | |---|---|---| | Diff and description review | passed | Supplied review materials read | | Tests and build | not run | No commands run | | Full changed-file review | not run | Several files remain unread | ## Findings ### Blocking None verified in the portions reviewed. ### Non-blocking None. ## Not verified Read `review/description.md`, `review/manifest.json`, and `review/diff.patch` (lines 1–90). The description includes author-reported test results; they were not independently verified. Did not read `review/commits.md` or the changed repository files at the pinned head. The manifest shows 14 changed files, including `ShaderMemory.cpp`, excluded from the review folder because it was too large. The remaining changed-file contents and behavior are not verified. ## To get this to a good state Nothing is required. Optional: complete review of the changed files and run the relevant tests before making a formal approval decision.
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!7395
No description provided.