fix(shader): follow a conditional pointer chase through a V# behind a pointer-keyed record pointer #9633
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9633"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T05:25:27Z.
What
On Ratchet & Clank: Rift Apart (PPSA01474), with #8939, a compute shader stopped with
GetImageResource dword 0 is not a valid runtime valueatLoadAddressU32@pc=0x10b84. #8939 itself got it past its earlier stop at 0x9a30. The sources are a retail run on #8939 (comment), and two IR readings of the shader (1, 2).Ratchet & Clank: Rift Apart (PPSA01474), 11-13: this PR got the title past 0x10b84 in Tamalero's run; the next stop, a third chased read at 0x13bc0, was #9749's. On current
mainthe title doesn't stop there. #14636 removed the title'spc=0x62d4GetSamplerResourcerefusal: with #14636's merge reverted,mainf57c971559aborts on it again (dantdmdarealguy's run). Tamalero's run ofmain4e2acc2120with #18522, on RADV withAPS5_MAX_COMPUTE_SPIRV_WORDS=2000000andAPS5_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).mainstill refuses this PR's shapes: onmain7201da4f0e, which has #14636, this PR's three tests fail 3 of 3 with #9457 merged and this PR's code left out, and pass 3 of 3 with this PR merged (llvmpipe, a cloud Linux machine).The descriptor pointer is a Phi of the record's pointer R and up to two chased pointers. The shader conditionally replaces P by the 64-bit pointer read at offset 0 of a buffer whose V# sits at P+0x60, up to twice. It then loads the T# at the final P+0. So the pointer is R, H(R) or H(H(R)).
PointerRecordReadthen refuses the chased arms as reads of another buffer at offset 0.The change:
GetAddressResource(P)at an immediate offset, where P resolves to R or to another chase arm.PointerChase {offset, immediate, readOffset, readImmediate}). Since2c1a65045c, two links read through one V# at different words each get their own site, and so their own snapshot entry. No serialized field changes there.6c139245aa): a chased V# word may also be the word as read, shifted left, ANDed or ORed by one constant. The chase keeps that edit per word, the snapshot applies it to the words it reads before it decodes the V#, and the shader disk cache stores it; other edits of a V# word stay refused. The format then stayed 55, since the source version already kept this recompiler's caches apart; this PR's format is now 96 (see Tested). This is Ghostrunner (PPSA03685)'s compute shader 0x200c520000 (see Tested).Overlap: checked with
git merge-treeagainst every open PR touching these files, onmainda54c652e3, and rechecked at792854306f(withmain3ca07d086d) against the PRs below: the conflicts are the same. #9508's other conflict there, inGuestMemory.cpp, is withmainitself.main'sTryMakeIndirectColumn. The stack's walk takes Phis whose arms differ, so the two compose. Whichever lands second carries the other's case through the same loop.ResourceTracker.cpp,ShaderDiskCache.cpp,FormatVersionand the image-table test lists. #9969 sends every merged read throughPointerRecordPairsand removesPointerRecordReads; this PR adds thechasesandchaseDeptharguments toPointerRecordPairs. Whichever of the two merges first, the other takes the resolution on test/d10195-9633-15555-18107 (fecb7dd9b0, this PR'sae857ccc9bwith #18107, which carries #9969):PointerRecordPairswith this PR's chase arguments, then #9969's same-read check, and a buffer record reached through a chase is refused, which neither PR covers;DescriptorSourceandTableColumnand #9969'sKeyDomain;FormatVersionand the test lists keep both.On that branch every #9633 and #9969 test passes 3 of 3 on Linux; on Windows the GPU tests skip (no Vulkan device on the runner) and nothing fails (run). The run's one red is #18107's
agc_driver_pointer_vsharp_sampler_pair_spill_table, which fails the same way on #18107 without this PR (run). hugodearaujo's #15555 and #18107, stacked on #9969, add no conflict of their own.mainis 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 belowmain's, from a check of every open PR's head on 11-16. Whichever lands later takes the next number, and the format this PR ends at is settled when its base merges.readEntrylambda, so #20519'srecords.addresses[record] = first;moves into it. With #20519'sdynamic, the encoder's checks need 23TableColumnfields. Its own test options keep both, and itsFormatVersionconflict keeps this PR's number, above #20519's 89. Merge order: this stack first, as proposed in #20519's thread (comment). If #20519 lands first, a merge ofmainresolves it here.Tested
agc_driver_pointer_chase_tablefails ×2 with #9457's code, and passes ×5 with this change.agc_driver_pointer_hop_tableandagc_shader_disk_cachepass. GitHub's Windows runner builds it, and its Vulkan tests skip there.2c1a65045con GitHub's runners (run, against6a72841083):agc_driver_pointer_chase_words_tablefails 3 of 3 without the change ("pointer table with two chase links in one V#: the T# behind one of the two links faulted") and passes 10 of 10 with it. Withagc_driver_pointer_chase_table,_hop_table,_phi_high_table,_vsharp_fixed_tableandagc_driver_nested_image_table, it passes 10 of 10 on Linux, all six passing and none skipped; on Windows they build, and all six skip, as the runner has no Vulkan device. libc'sprecise_waitfailed on both arms of that run.6a72841083against2c1a65045con one GitHub Linux runner (run), every test named: the layer loads in both runs, both log onlyVUID-VkDeviceCreateInfo-pNext-pNext, and the commit adds noVUID-message.792854306f, #9457's head2a5db7ae45and thenmain3ca07d086dmerged in (both clean; this PR's own diff is unchanged), on GitHub's runners (run): the 18nested_/pointer_table tests,agc_driver_image_table_vouched_lookups,agc_driver_image_table_vouch_queued_drawsand the disk-cache tests pass 10 of 10 on Linux, none skipped. On Windows they build and pass, with the Vulkan tests skipping.precise_wait, failed withmain's implementation too. On Windows libkernel's one failure isguest_raise_in_system_call, a 30 s timeout in a libkernel test this PR doesn't touch.mainagainst this head, in the same run: one GitHub Linux runner, Ubuntu 24.04.5, llvmpipe (Mesa 25.2.8, LLVM 20.1.2), withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_LAYER_KHRONOS_validationandctest -V.main's arm runs the 2 image-table tests and the disk-cache tests it has, and this head's arm runs all of them. The layer loads in both runs, with no "was not found" line. Both log onlyVUID-VkDeviceCreateInfo-pNext-pNext, and this head adds noVUID-message.llvm-mc -arch=amdgcn -mcpu=gfx1030. A record pointer is keyed by a first-lane read, then two conditional chase steps each load a V# at P+0x60 and a pointer at offset 0, then a T# at the final P+0.ee8767ff0dremoved those two checks under the test rule (see Tested), so the loop and depth-cap refusals inPointerRecordPairsno longer have a test.GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Phi(ReadConstBuffer….^agcand^shadershow the same failure set on #9457's head and on this change.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V, withVK_LOADER_DEBUG=layerto show the layer loading. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5, Khronos validation layers 1.3.275.agc_driver_pointer_chase_table, and #9457'sagc_driver_pointer_hop_tableon the same pointer-keyed path. #9457's tree has only the second.was not found.VUID-VkDeviceCreateInfo-pNext-pNext. This PR adds noVUID-message.6a7284108with its stack merged intomainda54c652e.agc_driver_pointer_chase_tablepasses 3 of 3 on both devices, including the moved link, the link outside the snapshot, and the refused loop and five-step chase (at that head;ee8767ff0dlater removed those two checks).ResourceTracker.cppchange reverse-applied, it fails on both the way the title does:GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Phi(ReadConstBuffer….^agc, without the flip, display DCC andlds_atomics64tests: 875 of 878 on the 3070 and 877 of 878 on lavapipe. The failures are the same as onmainon that machine: the threesample_ordertests on the 3070, andmultisample_retirementon lavapipe.check_conventions.pypasses, with no comment lines added.c00cb0f87(the same stack without the chase), it stops after 321 s atLoadAddressU32@pc=0x10b84, the stop from #8939.6a7284108) there's no refusal at 0x10b84. It stops later, after 351 s, in another compute shader atLoadAddressU32@pc=0x13bc0: a T# load whose pointer goes through a third chased read.agc_shader_replay, the parent refuses at the same site (pc=0xf898). This PR passes it and refuses at a later T# load (pc=0x128d4), so the chase is followed on the title's own shader.s_buffer_load_dwordx16.ChaseHighReadtakes a high word only atreadImmediate + 4, so the walk refuses there. That step needs a follow-up. In Tamalero's scratch build with only that check relaxed, both shaders then stop onsampler resource limit exceeded(MaxSamplers = 32).6b64604048, a merge of #9457's7f3a25e0cb, which mergesmain0db47b263d. The only conflict wasShaderDiskCache.hpp'sFormatVersionline:mainmoved to 45 (#7831), and this branch keeps its 47. On GitHub's runners (run), the pointer, nested, image-table and disk-cache sets (27 tests) pass 10 runs in a row on Linux. On Windows the set has 29, with two Windows-only disk-cache tests: they build, 5 pass 10 runs in a row, and the other 24, which need a Vulkan device, skip. The libc and libkernel suites pass on both, run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. An earlier run linked here didn't run this set, so it's replaced.5b6c96f938, a merge of #9457'sdc18bf7bf7(which carries #7395's and #8939's merges ofmain379b1dca32). The one conflict was inResourceTracker.cpp: #8939's new check on a pointer-keyed Phi edge sits in the paired loop this PR moves into itswalklambda, so the check moves there with it. That's the only change to this PR's own diff.FormatVersionstays at 48, one above #9457's 47.agc_shader_bindless,agc_shader_memoryand the^agc_driver_pointer_,^agc_driver_nested_,^agc_driver_image_tableand^agc_shader_disk_cachetests. Linux: 29 run, 29 pass, 0 skip, 0 fail. Windows: 31 run, 7 pass, 24 skip (Vulkan device tests; the runner has none), 0 fail.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.72f48b702f, a merge of #7395's2525821ac9(which mergesmainc9b2660d56). The only conflict wasFormatVersion, which goes to 51, one above #7395's 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: 29 run, 29 pass, 0 skip, 0 fail. Windows: 31 run, 7 pass, 24 skip (no Vulkan device), 0 fail. The libc and libkernel suites pass on both, run withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.839cad8ea1, a merge of #7395's71741a70b6, which merges #7223'sf1cc524085(yabanana's merge ofmainc8d34aa8f4). Clean:FormatVersionstays at 51, one above #7395's 50, and this PR's own diff is unchanged: the merge brings in exactly what #7395's merge did (249 files). On GitHub's runners, 10 runs (run) of the pointer, nested, image-table and disk-cache sets (agc_shader_bindless,agc_shader_memory,^agc_driver_pointer_,^agc_driver_nested_,^agc_driver_image_table,^agc_shader_disk_cache): Linux: 29 run, 29 pass, 0 skip, 0 fail. Windows: 31 run, 7 pass, 24 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.839cad8ea1, which carries #9457, merged cleanly ontomainaeff26bd9,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, no validation layer.pointer_andnested_table tests,image_table,vouch,disk_cacheand theagc_shader_tests, 68 entries, pass on both GPUs. On the subgroup-64 AMD device all 18 pointer and nested modes run, with no per-wave case skipped.main+ #9457 and this PR's tests kept,agc_driver_pointer_chase_tableandagc_driver_pointer_chase_words_tablefail on both GPUs withGetImageResource dword 0 is not a valid runtime value(chainLoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Phi(...), and the rest pass.agc_entries, the same ones fail with and without the stack on both GPUs, none of them table tests.a0308d1c19:37311118a8, a merge of #9457's62992d7437, the format commit68d04647f3, anda0308d1c19, a merge of #9457's merge ofmain0cd07dc4ab(run).37311118a8takes #9457's merge of #8939 (with #7223's153400ba2band the test-only commits of #7395 and #8939) and #9457's format commit. Clean, and this PR's own diff is unchanged.68d04647f3gives this PR its own disk-cache format, 55 (54 is #10489's). The open bumps take one number each: #7223 49 (as do #9508, #9748 and other open PRs), #7395 50, #8939 51, #10000 52, #9457 53, #10489 54, #9633 55, #9749 56, #9790 57, #9969 58, #10846 59.a0308d1c19merges #9457's merge ofmain0cd07dc4ab, with #9457's resolution of mrfelek's #10228. Clean here, and this PR's changed lines are the same.exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.b5a199bac2, a merge of #9457's88620551d5, which carries #7395's test-only commitca14648806(the nested-sampler test no longer asserts that an S# with another consumer is refused) (run). Clean, and this PR's changed lines are the same. The chase, hop, vouch, nested-image and nested-sampler tests with the disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 11 run, 11 pass, 0 skip, 0 fail. Windows: 13 run, 6 pass, 7 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (166 and 264). On Windows libc passes (194), and libkernel has 4 failures of 286.guest_raise_exceptionfailed after "address waking round 38: the handler did not run within 5 s", asmain9fc181dde5does in the same verify setup (run); that is #11813, and this PR doesn't touch libkernel.exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.6c139245aa:037f579a20, a merge of #9457's9a44f18aeb, which carriesmain38ccd50f83and with it #11507'sFormatVersion49, and the edited-V# chase on top (run). The merge is clean,FormatVersionstays 55 (see What), and this PR's diff over #9457 is the same apart from the new commit.6c139245aa: ba85d6743f, written onb5a199bac2, moved onto the merge with the same changed lines): Ghostrunner (PPSA03685)'s compute shader 0x200c520000 reads its T# pointer as Phi(R, H(R)), with H(R) read at 0x30 of a buffer whose V# comes from R+0x30, word 1 ANDed with 0xffff, word 2 shifted left by 4 and word 3 ORed with 0x30000000 before use (TheSovietWaffle's IR on #8939). Without this commit the request stopped atLoadAddressU32@pc=0x0002ef78withGetImageResource dword 0 is not a valid runtime value.agc_driver_pointer_chase_edited_tablemodels that arm, for taken and skipped chase steps and a moved link. On GitHub's Linux runner it fails without the change, with that message, and passes 10 runs in a row with it, on #9633's earlier heada0308d1c19(run); onb5a199bac2the same, 3 runs (run). The validation comparison on llvmpipe adds noVUID-message: both sides report onlyVUID-VkDeviceCreateInfo-pNext-pNext(run). TheSovietWaffle's replay of the title's request, the last bullet, gets past 0x2ef78 with it.6c139245aa: the chase, hop, vouch, nested-image, nested-sampler and edited-chase tests with the disk-cache, bindless and shader-memory tests and #11507'sagc_driver_image_sample_short_cuberan 10 times with no failure. Linux: 13 run, 13 pass, 0 skip, 0 fail. Windows: 15 run, 6 pass, 9 skip (the Vulkan device tests), 0 fail. Suites: libc and libkernel pass on Linux (166 and 265). On Windows libc passes (194), and libkernel passes 284 of 287:exec_arguments,guest_timed_join_import_libkernel_sysandguest_timed_join_import_libkernel_webfail at their setup in the verify's Windows build (FileNotFoundErrorstarting the title, or copying the libraries they load), withmain's code too, and pass inmain's own Windows job at1829def9bf(job). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.037f579a20alone (run), Windows' libkernel suite failedguest_filesystemonce, which aborted right after creating its test junctions, andguest_raise_exceptionat round 46 (#11813). A rerun of that job passed both, and both pass on6c139245aa.ee8767ff0d:185c62a117, a merge of #9457's19bed84013, the format commitb6c114935d, and the test-only commitee8767ff0d(run).185c62a117takes #7395's test-only commitd908758281, which dropsagc_driver_nested_image_table's two checks that a valid shader is refused (a V# with another buffer consumer and a T# with another consumer), #7395's merge of #7223's0dbf5478b2(yabanana's merge ofmainf7e84c4cf1) and the format commits below this PR. Clean.b6c114935dgives this PR its own disk-cache format, 56, one above #9457's 55.ee8767ff0ddrops the conditional pointer chase test's two checks that a valid shader is refused, one that repeats the chase in a loop and one with five conditional chase steps, with their helper and their shader words, under the same test rule. Neither shape is implemented. The taken and skipped steps, the moved link and the link outside the snapshot are still checked. Apart from these and the format line, this PR's diff over #9457 is unchanged.agc_shader_bindlessandagc_shader_memoryran 10 times with no failure. Linux: 30 run, 30 pass, 0 skip, 0 fail. Windows: 32 run, 8 pass, 24 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.a727b7653f, a merge of #9457's31bd0dea17, which carries #7395's4769d5a745, which drops "and refusals" from two nested-table test summary lines (run). It's clean and brings only that change. The image-table, nested, pointer, disk-cache, bindless and shader-memory tests ran 10 times with no failure. Linux: 30 run, 30 pass, 0 skip, 0 fail. Windows: 32 run, 8 pass, 24 skip, 0 fail; the 24 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.217e3d7b1f, which carries6c139245aa, merged with #10000'se7b14b0e8e. The only conflicts wereFormatVersion, kept at 56, and the debt docs, kept from both sides.agc_shader_replay --preparewithANYPS5_NO_SHADER_CACHE=1ran on theshader_200c520000.prepare.reqdumped onmain74acfad65. Windows 10 22H2, WinLibs GCC 15.2.0, Release; CPU replay only, no title run.LoadAddressU32@pc=0x0002ef78onGetImageResource.image resource limit exceeded, the 64-image cap that frankea's replay reached on #10000.43036c344c, from TechLevelZero's NVIDIA bot (report): driver 595.99.02, Ubuntu 26.04.1, this head merged ontomain3741ca9, 2,541 of 3,121 tests selected.main, and 2 are unstable onmain.VK_LAYER_KHRONOS_validation, over 948 tests on the GPU, the one new validation ID isVUID-vkCmdCopyBuffer-commonparentinagc_driver_depth_clear_hle. That is #10791's idle store with two live devices (fix: #10940), in a test the same run lists as unstable onmain, and it isn't in this PR's code. 18 of the stack's nested and pointer table tests ran with the layer but aren't inmain's baseline, so they weren't compared.280d6d6c44:bc6733b0e2, a merge of #9457's04d09eef56, and the format commit280d6d6c44(run). The merge also brings the #9457 commits this branch didn't have yet: oneandonlydean's merge ofmain4eaf19b304, #9457's merge of #8939 and its move to 67. Three conflicts. InShaderDiskCache.cpp's static checks, this PR'sTableColumn(144 bytes, 22 fields) and #7694'srequiredBlockseach growDescriptorSourceby 24 bytes; both sides had written the same224there, which git kept, so the merge sets 248, with 4 fields.FormatVersionmoves from 56 to 70 in the format commit, above #9457's 67, a number no other open PR seen uses. Inagc_driver_image_table_tests.cmake, this PR's three pointer-chase registrations are kept. This PR's own diff is otherwise unchanged. The image-table, disk-cache, BDA anchor-read, shader-memory, nested and pointer tests, with #7694'sagc_shader_descriptor_phis, pass 10 runs in a row. Linux: 33 run, 33 pass, 0 skip, 0 fail. Windows: 35 run, 10 pass, 25 skip, 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners. TechLevelZero's NVIDIA bot ran this head merged ontomain88e804bon an RTX 2000 Ada (report): 2,571 passed, 5 failed, none new (3 also fail onmain, 2 unstable onmain), 45 skipped, with no new validation IDs (991 tests on the GPU).b9fab3f82e, a merge of #9457's0a4f7cdbed, which carries #7395's merge ofmain4f64f81ef7(run). Clean:FormatVersionstays 70, and this PR's own diff is unchanged. TheResourceMaterializer.cppresolution, with #12246's view loop moved back intoSnapshot, comes from #7395's merge (see #7395). The image-table, disk-cache, BDA anchor-read, shader-memory, nested and pointer tests, with #7694'sagc_shader_descriptor_phis, pass 10 runs in a row. Linux: 33 run, 33 pass, 0 skip, 0 fail. Windows: 35 run, 10 pass, 25 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.ce7a09f3f1, a merge ofmain4f41f4c375(×10, the PR's own tests ×10).ShaderDiskCache.hpp'sFormatVersion, wheremainis now at 52 (#10000) and this PR keeps its 70; anddocs/dev/debt/shader.md, where this PR's entries andmain's new entries are adjacent and both stay. This PR's own lines are unchanged apart from theFormatVersionline's old value.agc_driver_image_table,agc_driver_many_direct_samplersand every test matching^agc_shader_memory,^agc_shader_disk_cache,^agc_shader_sampler_limits,^agc_shader_nestedor^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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.^agc_driver_pointer_and^agc_driver_nested_test, the image-table tests in this PR's diff overmain, which the first run's names left out. Linux: 18 run, 18 pass, 0 skip, 0 fail. Windows: 18 run, 0 pass, 18 skip (no Vulkan device), 0 fail.6089e589a8, a merge of #9457's20cc916ce9, which carriesmainc2eafe4461with yabanana's #7223 through #8939 and #7395 (×10).ShaderDiskCache.hpp'sFormatVersion, which stays 70 (mainis at 56 since #7223), anddocs/dev/debt/shader.md, where this PR's pointer-keyed chase entry stays. This PR's own lines are unchanged apart from theFormatVersionline's old value.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 33 run, 33 pass, 0 skip, 0 fail. Windows: 35 run, 10 pass, 25 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.mainb8efa62, driver 595.99.02, Ubuntu 26.04.1, 2,909 of 3,878 tests selected. 2,852 passed, 7 failed and 50 skipped. None of the failures is new: 3 also fail onmain, and 4 are unstable onmain. WithVK_LAYER_KHRONOS_validation, there are no new validation IDs againstmain, over 988 tests on the GPU.agc_shader_nested_sampler_snapshot_retryran with the layer but isn't inmain's baseline, so it wasn't compared.527a907ad8, a merge of #9457'se75a7104b9, which carriesmain8eaf82f315through #8939 and #7395 (×10).main, JJenkx's #15305's debt entry, and this PR's own lines are unchanged.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 10 pass, 26 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.0fd3c90456, a merge of #9457's2bbcdd60fc, which carriesmain006d11fca5through #8939 and #7395 (×10).main, frankea's #9020'sFormatVersion57, andFormatVersionstays 70 here. This PR's own lines are unchanged apart from theFormatVersionline's old value.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 34 run, 34 pass, 0 skip, 0 fail. Windows: 36 run, 10 pass, 26 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.f086739418, a merge of #9457'se2c68c094a, which carriesmaindd7c8de5dethrough #8939 and #7395 (×10).docs/dev/debt/shader.md, where this PR's pointer-keyed chase entry sits next to #10489's rewording of the image-table entry (the image limit is now 128). Both are kept.FormatVersionstays 70, and this PR's own lines are unchanged apart from theFormatVersionline's old value.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 48 run, 48 pass, 0 skip, 0 fail. Windows: 50 run, 10 pass, 40 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.b55705b34f:0a581f4a15, a merge of #9457's5be1abeb41, and the format commitb55705b34f, which carriesmain017bd95f5fthrough #9457, #8939 and #7395 (×10).FormatVersion, where #9457 now takes 81, above this PR's 70. The merge takes 81, and the format commit moves this PR to 82. This PR's own lines are unchanged apart from theFormatVersionline.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 48 run, 48 pass, 0 skip, 0 fail. Windows: 50 run, 10 pass, 40 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'sguest_kernel_resident_fmem_exportandguest_kernel_resident_fmem_export_patchedfail: the same harness fails them onmain7259cce111alone (run), andmain's own Windows job passes them, so they come from the verify harness, not this PR. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agctest: Everyagctest 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.56416624f1, a merge of #9457'sd007acef13, without conflicts, which carriesmaine22c5fb941through #9457, #8939 and #7395 (×10).agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmainandmain's newagc_shader_memory_coherent_atomic_loads. Linux: 49 run, 49 pass, 0 skip, 0 fail. Windows: 51 run, 11 pass, 40 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.39b162b371, which holds this PR's56416624f1(the run testedad2a93618b, which has the same tree):maine22c5fb941against that head on GitHub's Linux runner (lavapipe, layer 1.3.275), withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1underctest -V, over the stack's focused tests (run). The loader inserted the layer 27 times onmainand 43 on the head. The only VUID in either log isVUID-VkDeviceCreateInfo-pNext-pNext, which that layer logs atvkCreateDeviceonmaintoo, for a structure newer than its 1.3.275 header (VkStructureType1000574000), so the head adds none. That message fails the same 14 tests in both arms,agc_driver_image_tableand its 13_packedvariants, because the run's failure regex matches anyVUID-; the other tests pass, 19 onmainand 36 on the head, the head's including this PR's threeagc_driver_pointer_chase_*tests, whichmaindoesn't have. The run counts 14 "was not found but was requested" matches per arm, and each is ctest printing that failure regex for one of the 14; no loader line in either log says the layer was missing.39b162b371, which holds this PR's56416624f1, Linux, driver 615.71.09, layer 1.4.357. The head passes its 49 tests in 3 of 3 runs with noVUID-line. Themaine22c5fb941arm is his earlier run on the same machine (comment), 32 of 32 in 3 of 3 runs with none. No run printed "was not found but was requested", and the only tests withoutInsert instance layer "VK_LAYER_KHRONOS_validation"are nine CPU-only ones that print no Vulkan output.ae857ccc9b, a merge of #9457'sb0b62f859b, without conflicts, which carriesmainbd278f3654through #9457, #8939 and #7395 (×10).FormatVersion:main's 69, this PR's 82. #7395's merge takes #19530's move ofmainfrom 68 to 69, and this PR's own diff over #9457 is unchanged.56416624f1. Linux: 49 run, 49 pass, 0 skip, 0 fail. Windows: 51 run, 11 pass, 40 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.99e3511c6a, a merge of #9457'sd896ff422b, which carriesmain328cbf673ethrough #9457, #8939 and #7395 (×10, with #21255's test change).FormatVersion, where #9457 now takes 95, above this PR's 82. The merge moves this PR to 96. This PR's own lines are unchanged apart from theFormatVersionline.ae857ccc9b. Linux: 56 run, 55 pass, 0 skip, 1 fail. Windows: 58 run, 11 pass, 47 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 withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_table_packed_guards, fails as onmain: three identical "stage 4 pc 0x68" records, then "unrecoverable packed table format was not poisoned", the same lines as inmain's own Linux job ate249fc47b5(job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9749's510fd2384d, which holds this PR's99e3511c6a(run),agc_driver_image_table_packed_guardspasses 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_sensorsin that run: libkernel'sguest_thermal_sensorsreached its 20 s timeout in the Linux suite. It times out in every run I have on GitHub's Intel Xeon 6975P-C runners,main0694c4cbd6alone included (run), and passes in this PR's own ×10 above and inmain's own job. This PR changes no libkernel file._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. This head99e3511c6amerged ontomaine4caa07950(their merge ee7d6e9091, clean), againstmaine4caa07950alone,ctest -R 'pointer|image_table|nested|agc_shader_disk_cache|agc_shader_memory|bda_anchor'.main: 78 of 78 pass. This PR: 94 of 94 pass, including the 16 testsmaindoesn't have: this PR's three (agc_driver_pointer_chase_table,_words_tableand_edited_table) and the 13 of #9457, #8939 and #7395. No test skips on either side. The layer was inserted 43 times onmainand 58 times with this PR; the tests without an insert are CPU-only. NoVUID-line on either side, and every test that creates a device selected the RTX 4090.3fb58d68c5of #9457's new head (test only,tests/execution/ImageTable.cpp), for #8939'sagc_driver_pointer_phi_lane_and_tableandagc_driver_pointer_phi_lane_not_table. @frankea's Windows 11 RTX 4090 run (comment) failed them on #8939, #9457, #9790 and #9969, withselected the descriptor at 0x0: unmapped; this PR carries the same tests. The cause, the fix and a verify-only Linux run with the records mapped at 1 GiB, red before the fix and green after, are in #8939's Tested: the records sat below 4 GiB, so an arm whose low word is 0 selected a null pointer. old..new touches onlyImageTable.cpp.^agc_driver_pointer_and^agc_driver_nested_tests pass, none skipped._putenv_sfix (#19899) merged for the run only: the first attempt failed in the libkernel suite, whereguest_timed_wait_cpuexited with0xc0000409. The re-run of the Windows job (attempt 2) passed: the build, the libc and libkernel suites with 421 and 417 tests and 0 failed, and the 18 tests skipping (no Vulkan device). old..new touches onlyImageTable.cpp. The Windows GPU case itself can only be re-run by a tester.2f104ac486, a merge of #9457'sdbe3b94942, which carriesmaind89f26516cthrough #9457, without conflicts (×10, with #21255's test change).FormatVersionstays 96, and its own lines are unchanged.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 56 run, 55 pass, 0 skip, 1 fail. Windows: 58 run, 11 pass, 47 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 fromguest_thermal_sensors(below). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_table_packed_guards, also fails onmaind89f26516calone in the same harness on GitHub's runners (run: the^agc_driver_image_tabletests ×10, 29 run, only this one fails).main's own Linux job, on the project's self-hosted runner, passes it at244b338dd0(job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9749'sbee5a91996, which holds this PR's2f104ac486(run),agc_driver_image_table_packed_guardspasses 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'sguest_thermal_sensorsreached 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,main0694c4cbd6alone included (run), and passed in this refresh's runs on AMD EPYC runners. This PR changes no libkernel file._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.BUILD_TESTING=ON, validation layer 1.4.363, withANYPS5_REQUIRE_VULKAN=1andANYPS5_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. #9749'sbee5a91996(with #7395, #8939, #9457 and #9633; their merge b726f51423), merged ontomaine1ab104e0a(clean), againstmaine1ab104e0aalone; it carries this PR's head2f104ac486.main: 39 tests, 38 pass, 1 skip in each run. The arm: 56 tests, 55 pass, 1 skip in each run; the counts include the tests of the 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 onmainand 48 times in each arm, and never reported missing. NoVUID-line in any arm, and every Vulkan test selected the RX 9070 XT.mained1def4dd4withgit merge --no-ff. No validation layer was installed, so these runs say nothing aboutVUID-errors. This head2f104ac486: the new tests pass, and of the 1302 tests the change reaches, the only failures are onesmainalso fails on that GPU (#23232, #23711, #23942).f96acd992d, a merge of #9457'sef586f90ca, which carriesmaind50640e264through #9457, without conflicts (×10, with #21255's test change).FormatVersionstays 96, and its own lines are unchanged.agc_driver_many_direct_samplersand every test matching^agc_driver_pointer_,^agc_driver_nested_,^agc_shader_nested_,^agc_driver_image_table,^agc_shader_memory,^agc_shader_disk_cacheor^agc_shader_sampler_limits, which takes in every test in this PR's diff overmain. Linux: 56 run, 55 pass, 0 skip, 1 fail. Windows: 58 run, 11 pass, 47 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 fromguest_thermal_sensors(below). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agc_driver_image_table_packed_guards, also fails onmaind89f26516calone in the same harness on GitHub's runners (run: the^agc_driver_image_tabletests ×10, 29 run, only this one fails).main's own Linux job, on the project's self-hosted runner, passes it at244b338dd0(job). fernandomcrsilva's open #21255 changes that test. With #21255's test change on top of #9749'sdd2c6b1aee, which holds this PR'sf96acd992d(run),agc_driver_image_table_packed_guardspasses 10 of 10, and so do the same tests on that tree: Linux 57 run, 57 pass, 0 skip, 0 fail. That run's Windows job reached the job time limit while building on an AMD EPYC 7763 runner, before any test ran.guest_thermal_sensors: libkernel'sguest_thermal_sensorsreached 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,main0694c4cbd6alone included (run), and passed in this refresh's runs on Intel Xeon Platinum 8573C and AMD EPYC runners. This PR changes no libkernel file._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from #18037); it isn't on this branch.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)LoadAddressU32@pc=0x0002ef78with #10000, in TheSovietWaffle's replay (the next stop is the 64-image cap)Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T05:38:06Z.
@Tamalero @oneandonlydean this draft follows a conditional pointer chase through a V# behind a pointer-keyed record pointer, the shape we read behind the 0x10b84 refusal on #8939. Its branch,
fix/shader-pointer-chase-closureat6a72841083, includes #9457, #8939, #7395 and #7223, so one build of it is enough. Would you run Ratchet & Clank: Rift Apart (PPSA01474) on it and post where it stops after 0x10b84, or that it doesn't? If it still stops at 0x10b84, please post the stderr lines around the refusal: they show whether the chase's two words come from Phis in different blocks, a join this PR still refuses.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-22T06:13:56Z.
@EagleBearerYS thanks, I'll build your branch at
6a72841083as is and run PPSA01474 on it. If it stops at or near 0x10b84 again, I'll post the stop and the stderr lines around the refusal here. It's queued behind today's PR runs, so it'll be a few hours.Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T07:03:18Z.
Review: COMMENTED
Run on NVIDIA, since the tests so far are llvmpipe only.
Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, full build with
BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3070 (driver 595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8). Head6a7284108(with its stack) merged intomainda54c652e.agc_driver_pointer_chase_table(agc_driver_image_table_tests --pointer-chase) passes 3 of 3 on both devices, including the moved link, the link outside the snapshot, and the refused loop and five-step chase.ResourceTracker.cppchange reverse-applied (the diff from #9457's head to this head) fails on both devices the way the title does:GetImageResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x000000c0(GetAddressResource(Phi(Phi(ReadConstBuffer@pc=0x00000074(....^agcsuite, excluding the flip, display DCC andlds_atomics64tests: 875/878 on the 3070 and 877/878 on lavapipe. The failures are the same as onmainon this machine: the threesample_ordertests on the 3070 (no 2x2 sample-location grid at 2 samples) andmultisample_retirementon lavapipe.So the chase also works on a real GPU with subgroup 32, not only on llvmpipe's subgroup 8.
GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux), lavapipe
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T08:42:03Z.
@jotitadev thanks for the RTX 3070 run with the reverse-applied control. A real GPU at subgroup 32 was the gap in this draft's testing. It's in Tested and on the GPUs tested line now.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T09:21:43Z.
The current evidence is strong for the modeled pointer-chase path: the focused test has a reverse-applied negative control, Linux validation-layer A/B shows no new VUIDs, and an independent RTX 3070 run confirms subgroup-32 behavior. The remaining title-specific gate is the promised PPSA01474 run on this exact stack; the body correctly says
Unblocks: none yetuntil that confirms the 0x10b84 stop is passed. Please keep the draft until that result is available, then update the Game bring-up discussion andUnblockschecklist with its link. Also keep the declared stack order and disk-cache version coordinated with the listed overlapping PRs before merge.Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-22T09:59:01Z.
@EagleBearerYS ran it: PPSA01474 (content 01.005.003) gets past the 0x10b84 stop with this PR, and stops on the next T# load, whose pointer goes through a third chased read.
Setup: Linux (CachyOS, kernel 7.2.9), GCC 16.2.1, Release, RTX 4090 (NVIDIA 615.78.08). The same relinked executable for both builds, a cold shader cache, no input (the stop is in the black load after the logos).
c00cb0f87(this PR's parent, so the same stack without the chase)LoadAddressU32@pc=0x10b84, chain throughReadConstBuffer@pc=0xfd94and@pc=0x10350(the stop from #8939)6a7284108LoadAddressU32@pc=0x13bc0Same shader on both builds: a second control run with
APS5_DUMP_SHADERS=1stopped on a sibling, compute 0x116bb5e100, at the same site atpc=0xf898(its chase reads are at 0xeaa8 and 0xf064). Replaying itspreparerequest offline withagc_shader_replayfrom each build:LoadAddressU32@pc=0xf898;LoadAddressU32@pc=0x128d4, a later T# load.So the chase is followed on the title's own shader, not only on the test one.
The next stop: in both refusals (0x13bc0 in game, 0x128d4 in the replay), the pointer Phi has the two chase reads you modelled plus a third read:
ReadConstBuffer@pc=0x12e9c(GetBufferResource(LoadAddressU32@pc=0x12de8(GetAddressResource, …)));ReadConstBuffer@pc=0x11bb0through a V# loaded atpc=0x11afcfrom the current pointer.In the replayed shader that third read is an
s_buffer_load_dwordx16, where the two reads you modelled arex4(0xeaa8) andx8(0xf064). The pointer also still passes through the lane-maskBitwiseAnd32(…, CompositeExtractU32x4(Ballot, Immediate))arms. This log can't show whether the refusal comes from the third read's offset or word position, a V# at an offset other than 0x60, or the Phi join you mentioned. The tracker logs nothing before the throw, so the chain below is all the stderr has. If it helps, I can runAPS5_DUMP_IRon 0x116bb67100 and post the blocks around the third read.Full refusal, in game (compute 0x116bb67100)
Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T10:01:51Z.
@Tamalero thanks for running it on Ratchet & Clank: Rift Apart (PPSA01474), with the parent as a control and the offline replay of the sibling shader. Getting past 0x10b84 on the title's own shader is the run this draft was waiting for, and it's in Tested and on the Unblocks line now. The third chased read at 0x13bc0 is the next step. The IR blocks around it (
APS5_DUMP_IRon 0x116bb67100), as you offered, would show whether it's the read's offset or word position, a V# away from 0x60, or the Phi join.Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-22T10:12:29Z.
@EagleBearerYS here is the third read. It's none of the three you listed: the pointer's two words are not adjacent. The V# offset differs too, but the per-site
PointerChasealready covers that.Same shader, both builds: a dump run of this PR stopped in compute 0x116bb67b00 at
LoadAddressU32@pc=0x13bc0(the same sites as the 0x116bb67100 refusal above). The control stopped in that same shader at 0x10b84. I replayed itspreparerequest and its sibling's (0x116bb5e100, stop at 0x128d4) through a copy of this PR'sResourceTracker.cppwith tracing added.The sibling has the same shape: H1 0xea9c/0xeaa8, H2 0xf04c/0xf064, H3 0x11afc/0x11bb0 (V# at P+0x110, words 0x54/0x6c).
ChaseHighReadrequireshighImmediate == readImmediate + 4. For H3 the high read's immediate is 0x6c against a low of 0x54, sowalk()returns false at theChaseHighReadcall, andPointerRecordPairsand thenTryMakeIndirectColumnrefuse.s_buffer_load_dwordx16from offset 0x40, and the next pointer is rebuilt from dword 5 (low) and dword 11 (high) of that load before the nexts_loadthrough it.BitwiseAnd32(…, Ballot)arms walk without failing.So the step is structurally the one you modelled, with two different parameters: a V# immediate of 0x110, which per-site chases already cover, and a high word at its own immediate.
A possible change: keep the high read's own immediate in
PointerChase, for examplereadHighImmediate.ChaseHighReadwould still require the same handle andreadOffset, and could require the high word to be 4-aligned.ResourceMaterializerwould then read the high word there instead ofreadImmediate + 4u, and the field would go into the disk-cache serialization.After that: in the relaxed scratch build, both shaders get past the T# and stop on
sampler resource limit exceeded(MaxSamplers = 32). That build is only the relaxed check, not a real fix, so I can't yet say the same stop follows your change. I'll run Ratchet on it when it's pushed.The IR stays local (it's the title's code), but I can trace any value you need.
Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T11:12:08Z.
@Tamalero thanks for tracing the third read in both shaders, down to the
s_buffer_load_dwordx16that splits the pointer. Your reading checks out against the code:ChaseHighReadlooks for the high word atreadImmediate + 4, so a high word at its own immediate (0x6c against a low word at 0x54) refuses there. A follow-up on top of this PR is being built with yourreadHighImmediatesuggestion. I'll link it here when it's up, and a Ratchet & Clank: Rift Apart run on it then would show what comes next. Your trace and theMaxSamplersstop from the relaxed build are in Tested.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:54:05Z.
Review: CHANGES_REQUESTED
The latest report is unusually thorough: it includes the exact nested-pointer regression, positive and negative controls, cache and test coverage, validation-layer comparison, and a real NVIDIA run. I verified that the linked Game bring-up discussion #2172 is the Ratchet & Clank thread and that it now records this PR's later 0x13bc0 stop. I found no additional code issue in this review pass.
Before merge, this stack needs a current base. The PR targets
da54c65, whilemainis 95 commits ahead at8b3a6baand those commits touch shader recompiler files changed here. Since this PR depends on open #9457, coordinate landing order, then rebase onto currentmainwith that prerequisite and refresh overlap/dependency metadata. After rebasing, rerun the focused chase-word/table cases and the CONTRIBUTING.md validation-layer comparison on the same GPU for the current base and the updated head; the detailed existing comparison predates the latest head. Product jobs are skipped by path filters.I independently ran exact-head
git diff --check,tools/check_conventions.pyagainst currentmain, andtools/check_test_registration.py --scripts; all passed (171 scripts registered). I could not configure the full project locally because the host lacks SDL2 development files and the SDL2 submodule is uninitialized, so I did not runguest_ajc/AGC tests here. The author and reviewers report the focused Linux and NVIDIA/lavapipe runs described in the PR.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T12:54:10Z.
Correction to my review text: “guest_ajc” was a typo; I meant the AGC test suite.
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T14:14:41Z.
@MarcZX10 thanks. The stack is refreshed: this PR has #9457's head
2a5db7ae45merged in (#9457 itself carriesmaincc0078595d), and thenmain3ca07d086d(792854306f). Both merges are clean, and this PR's own diff is unchanged. The order stays #8939 → #9457 → this PR.main's two image-table tests and the disk-cache tests, pass 10 of 10 on GitHub's Linux runner, and build and pass on Windows with the Vulkan tests skipping (run).mainagainst this head, in the same run: one GitHub Linux runner, Ubuntu 24.04.5, llvmpipe (Mesa 25.2.8, LLVM 20.1.2), withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandctest -V. The layer loads in both runs. Both log onlyVUID-VkDeviceCreateInfo-pNext-pNext, and this head adds none.ResourceTracker.cpp.All of it is in the body.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T08:45:22Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
This pull request does not merge cleanly into
main(4f41f4c375): headb9fab3f82econflicts incore/shader/recompiler/ShaderDiskCache.hppdocs/dev/debt/shader.mdPlease rebase it onto current
main. I will review the change once it merges cleanly.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T14:05:08Z.
Review: APPROVED
Re-checked — approved
The head moved to
ce7a09f3f1, a merge ofmainontob9fab3f82e. The merged tree builds, the focused chase, pointer, nested and disk-cache tests pass, and reverting this PR's own production diff over #9457 turns the three chase tests red with the title's refusal.What changed since my last review
The text of my previous review isn't available to this run, so this review covers the whole change again. It does not compare against earlier findings.
ce7a09f3f1, is a merge ofmain. Betweenb9fab3f82eandce7a09f3f1it changes no chase code inOptimization/orControlFlowInfo.hpp.git diff 0a4f7cdbed b9fab3f82e, whereb9fab3f82eis this branch's merge of #9457's0a4f7cdbed.ControlFlowInfo.hpp,ResourceTracker.cpp,ResourceMaterializer.cpp,ShaderDiskCache.{cpp,hpp}and one debt entry.ImageTable.cpp.FormatVersionis 70 here and 52 onmain.What I ran
Head
ce7a09f3f13259ed5129371c1ac22f33ba4be5df,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged treef3d829311ada5c98ebc5032edd2f862735f62fb5. Debian 13 VM, GCC 14.2.0, Release, lavapipe (Mesa 26.1.6, LLVM 19).git diff --checkcheck_conventions.pylibs(script)main(agc_driver_division, denormal-mode tests and others), none of them table testsVUID-agc_driver_pointer_chase_table,_chase_words_tableand_chase_edited_tablefail; hop and vsharp tests passagc_driver_pointer_chase_words_tablefails ("the T# behind one of the two links faulted"); the other two passControl 1 output (truncated)
Control 2 output
Previous findings
The previous review's text isn't available, so its findings can't be checked one by one. Every blocking-class check below passes on the current head.
New findings
Blocking
None.
Non-blocking
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1150-1156). Oncerecords.keys >= limit,ChaseClosurestill callsChasefor every remaining frontier pointer and chase. Each call adds up to six 4-byte entries totables.ranges(lines 1127 and 1134-1135). With 65536 records, several chase sites and depth 4, that can be a few million range entries per snapshot.outsideis set adds no entries.6c139245aa, while the head is at 70.ee8767ff0d, so the loop and depth-cap refusals inPointerRecordPairs(ResourceTracker.cpp:1170-1192) no longer have a test. Removing them follows the test policy, but the description should say so.Code reading notes (no action needed)
looseHandles) are also accepted. Both are safe because the GPU looks entries up by the full 64-bit pointer, and each entry's T# is read at that pointer's own offset. An extra entry is never wrong, and a missing one faults as outside the snapshot.decodePlanchecks the chase list (at most 64 entries), the depth (pointerChases.empty() == (depth == 0), at mostMaxPointerChaseDepth, pointer-keyed only) and the edit shift (at most 31).Not verified
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T10:27:17Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the focused checks reported for this head support merging, though I did not run them here.
What I ran
Reviewed head
56416624f18e622b79e8046db0a4ae19d02bc7b8. No commands or tests were run in this review session. Read the prepared description, commits, manifest, diff, and targeted source ranges viarepo_read.py.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded from the review folder; only the changed range was read through the pinned reader. The remaining source files listed in the manifest were not individually read in full. Hardware behavior beyond the author-reported runs was not verified. No independent build or test run was performed.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T10:53:16Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change based on the implementation and callers reviewed; the focused tests were not run in this session.
What I ran
Reviewed head
ae857ccc9b6f508c3eced2f618cd5e63374705de. No commands or tests were run. Read the prepared description, commits, manifest and diff, then read the changed tracker, materializer, emitter, ABI and cache code throughrepo_read.py. The largeShaderMemory.cpptest file was read only around its changed sampler retry code;ImageTable.cppwas not read at the pinned head.Results
ImageTable.cppnot read;ShaderMemory.cpppartialFindings
Blocking
None found in the implementation reviewed.
Non-blocking
ResourceTracker.cpp:1226-1246.Not verified
core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cppwas not read at the pinned head.core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas read only at lines 3911–3967; the remainder of that changed file was not read. Other included changed files were reviewed through the diff and targeted head ranges, not read in full.files.jsonwas not available through the reader; the reader’s changed-file listing showsShaderMemory.cppis excluded from the prepared bundle because of its size.To get this to a good state
Nothing is required. Optional: restore regression coverage for cycle and over-depth chase refusal.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T13:03:04Z.
Review: APPROVED
Reviewed — looks good
The prepared change adds pointer-keyed descriptor tracking, bounded pointer-chase snapshots, and cache serialization; I found no verified blocking defect in the code I read.
What I ran
99e3511c6ab24b9b28335011fafdc51e48330a7cusing the prepared review bundle andrepo_read.py.description.md,commits.md,manifest.json, anddiff.patch, plus the included changed filesShaderDiskCache.cpp,agc_driver_image_table_tests.cmake,agc_shader_memory_tests.cmake,ImageTable.cpp,ControlFlowInfo.hpp,ResourcePlan.hpp,ResourceMaterializer.cpp,ResourceTracker.cpp,Recompiler.cpp,ShaderDiskCache.hpp,SpirvImageEmitter.cpp, anddocs/dev/debt/shader.md. Also read the excluded changed fileShaderMemory.cppthrough the pinned reader.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T04:05:42Z.
Review: COMMENTED
Reviewed — comments
The main pointer-chase paths look coherent, but I could not complete an approval-level review because one changed file was excluded from the review bundle and checks could not be run here.
What I ran
Inspected the prepared diff and targeted source at head
3fb58d68c52db3630f6950e5474832b0bf75ce10usingrepo_read.py-provided reads. No commands or tests were run; the description's test results are author-reported.Results
Findings
Blocking
None.
Non-blocking
Not verified
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded because it was too large for the review folder; its changed lines are visible in the diff, but its full head text was not read.description.mdare author-reported, including results for earlier tree states; exact-head checks were not independently verified.description.md,commits.md,manifest.json,diff.patch; changed source inspected:ResourceTracker.cpp,ResourceMaterializer.cpp,ShaderDiskCache.cpp. Other included changed files were not read in full. Excluded by bundle rule:ShaderMemory.cpp.To get this to a good state
Nothing is required.
Optional: restore regression coverage for loop and depth-cap refusal behavior.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T07:12:14Z.
Review: COMMENTED
Reviewed — comments
The review is incomplete because I could not run the checks or read every changed file at the pinned head.
What I ran
Head:
2f104ac486a7a6926900299630861c535d310912. I inspected the prepared description, manifest, diff,ResourceTracker.cpp, andResourceMaterializer.cpp; no build or tests were run.Results
Findings
Blocking
None verified.
Non-blocking
None.
Sources
Reviewed behavior in
ResourceTracker.cppandResourceMaterializer.cppat the pinned head; the prepared patch shows the relevant changes atcore/shader/recompiler/Optimization/src/ResourceTracker.cpp:1878andcore/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1166.Not verified
I did not read all changed files or the complete diff. In particular,
ShaderMemory.cppwas excluded from the prepared bundle; other changed files were listed in the manifest but not inspected in full. No build, tests, or runtime checks were performed, so correctness of the full change is not established.To get this to a good state
Nothing is required. Optional: complete review of the unread changed files and run the focused pointer-chase and sampler table tests before relying on this review for a merge decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:56:29Z.
Review: APPROVED
Reviewed — looks good
Nothing I inspected shows a blocking defect; the prepared report records focused test runs, but I could not run checks in this environment.
What I ran
Reviewed head
f96acd992d360fac348ad5e8f41165aff0b14b11. No commands or tests were run by me; the reader was used to inspect the prepared artifacts and selected repository ranges.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read all 15 changed files listed in
review/manifest.json, includingShaderMemory.cppvia the pinned reader. No changed files were excluded by the manifest;review/files.jsonwas unavailable. I did not independently run the reported tests, validation-layer checks, or console title runs.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T05:53:35Z.
Review: COMMENTED
Reviewed — comments
The review covers head
e6ab758537ded3a0946e6dd20f5009c4531f1ab7; no checks were run in this session, and the description reports that loop and depth-cap refusal cases no longer have tests.What I ran
No commands or tests were run. I read the prepared description, commits, manifest, diff, and all eight changed files at the pinned head.
Results
Findings
Blocking
None.
Non-blocking
core/shader/recompiler/Optimization/src/ResourceTracker.cpp:1246refuses pointer-chase cycles and depths above four, but the description says the corresponding loop and depth-cap refusal cases were removed from the tests. Please retain regression coverage for these conservative refusal cases, since accepting either shape could make materialization incomplete.Not verified
No tests or build were run. The PR description and commits were read;
review/files.jsonwas not available as a review-folder artifact. The eight changed files listed in the manifest were all read:agc_driver_image_table_tests.cmake,ImageTable.cpp,ControlFlowInfo.hpp,ResourceMaterializer.cpp,ResourceTracker.cpp,ShaderDiskCache.cpp,ShaderDiskCache.hpp, anddocs/dev/debt/shader.md. No files were excluded by the manifest.To get this to a good state
Nothing is required. Optional: restore tests for loop and over-depth chase refusal.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T02:27:39Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing in the inspected tracker, materializer, cache, or test registration changes showed a verified defect; this review is incomplete because the full text of the large changed test file was not read.
What I ran
Reviewed head
4076db17806573fe864389a3a5a847fa18a55158. I used the prepared diff and the pinnedrepo_read.pyreader; I did not run build or test commands. The author-reported test runs in the description were not run by me.Files read:
review/description.md,review/commits.md,review/manifest.json,review/diff.patch;core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake;core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp(diff);core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp;core/shader/recompiler/Optimization/src/ResourceTracker.cpp;core/shader/recompiler/ShaderDiskCache.cpp;core/shader/recompiler/ShaderDiskCache.hpp(diff);docs/dev/debt/shader.md(diff).Results
ImageTable.cppnot fully readFindings
Blocking
None identified in the files and hunks reviewed.
Non-blocking
None.
Not verified
core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cppwas only sampled in the diff; its full changed content was not read. Build/test claims and console behavior were not independently verified. The manifest lists eight changed files; all have full text included, and no files were excluded by rule.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T11:42:53Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the author may consider restoring focused checks for loop and over-depth chase refusal.
What I ran
Reviewed head
7268f639fe7e7281edf1adeac405127738c84f47against the prepared diff. I readdescription.md,commits.md,manifest.json,diff.patch, and all eight changed files listed inreview/README.md; no changed files were excluded. I inspected targeted source ranges throughrepo_read.py. I ran no build or tests; the description reports earlier runs on preceding revisions, not this exact head.Results
Findings
Blocking
None.
Non-blocking
core/shader/recompiler/Optimization/src/ResourceTracker.cpp:1246caps chase depth and rejects cycles, but the description says the loop and five-step refusal assertions were removed (description.md:96). Consider adding focused negative tests so these safeguards remain covered.Not verified
I did not run a build or tests on this exact head, and did not verify behavior on a physical console. The earlier CI and device runs in the description are author-reported and were not rerun. Files read:
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmake,core/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cpp,core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ControlFlowInfo.hpp,core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp,core/shader/recompiler/Optimization/src/ResourceTracker.cpp,core/shader/recompiler/ShaderDiskCache.cpp,core/shader/recompiler/ShaderDiskCache.hpp, anddocs/dev/debt/shader.md. No changed file was excluded.To get this to a good state
Nothing is required. Optional: restore tests that verify loops and chases deeper than the supported limit are refused.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.