feat(shader): resolve nested image tables through runtime pointers #7223

Merged
yabanana merged 19 commits from upstream-pr/7223 into main 2026-11-04 03:57:51 +00:00
yabanana commented 2026-10-17 17:56:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yabanana on 2026-10-17T17:56:26Z.


What

Related to #6191. Resolve image descriptors through a scalar-buffer record, a runtime pointer, a V#, then a second independent key. The fixtures model the first GetImageResource dword-0 shape reported for Ratchet & Clank; full-title behavior on this head is unverified. Sampler and direct pointer-Phi extensions remain separate in #7395.

The materializer captures exact 64-bit record pointers and shares equal child tables. SPIR-V searches a sorted pointer dictionary, then uses the existing inner-table lookup. The actual pointer selected by a low-word Phi, including loop back edges and constant arms, stays dynamic. Unknown pointers fault; parent scans, child snapshots and final map size remain bounded.

The 20 October update includes Yunus Shaikh's offered shared-child-consumer fix, preserving authorship. A child T# word used by another instruction could leave a runtime read through a V# that exists only in the snapshot, causing a driver crash. Such children are now refused, with a regression test.

Main is merged without rewriting the published commits, preserving #7395's ancestry. Integration retains main's selected columns, #6232 pointer hops, per-column SharedValues storage and scratch maps. Nested child-header and leaf-record indices use separate scratch maps. Snapshot hashes and resolution memo identity include child tables and pointers. New tests verify unchanged snapshot sharing and compare child-only and pointer-only mutations with uncached resolution. Disk-plan format is 51 over the tested main's 50; image-table ABI remains 3. This preserves the maintainer's integration and avoids reusing main's disk-cache version.

Parent scans allow at most 524288 records and inner snapshots at most 1048576 key slots per shader; the final map is capped at 32 MiB. The synthetic fixture covers 348156 outer records and 131072 inner positions from the public report without embedding title code or captures. Nested samplers, other pointer origins, shared descriptor-word consumers and deeper nesting remain refused.

Ordering: this PR supplies the base for #7395, which owns the S# and direct pointer-Phi extensions. Earlier overlaps already merged into main are integrated here. The #7395/#7684/#6488 ordering discussion remains relevant to later integration; no combined result with unmerged branches is claimed. No ARM64-port branch was changed.

The 24 October integration includes Yunus Shaikh's offered merge and cache fix with authorship. Both helper sets are retained. In TryMakeIndirectColumn, only the merged buffer low word uses PointerRecordOrigin; other reads use UnwrapTableRead with its null check. Main's AvailableAt dominance check remains. The 27 October merge retains main's runtime ABI 14 and advances this PR's disk format to 49, keeping image-table ABI 3.

Tested

30 October integration: head 7f36e41c458c2abbf06c5a638636869ed9a4cc59, tested base e471817c68d4e1b1e44b0ce369ed88bafe4ae8ed. Main now uses disk format 50, so this head uses 51; image-table ABI 3/runtime ABI 14 remain. Published ancestry is preserved. The two offered test-only commits from EagleBearerYS were cherry-picked with authorship: valid shared-V#/additional-T# consumer shapes are no longer pinned to rejection; production refusals were not weakened.

Both key budgets reset at the beginning of every TableSnapshotter attempt. A single nested image column now participates in the descriptor-epoch check. New agc_shader_nested_snapshot_retry uses 262145 parent keys and 524289 child keys, forces one invalidation, verifies per-attempt coverage through each last key and compares the final parent/child snapshots (keys, pointers, words and codes) against an undisturbed capture. It accounts for the enclosing materializer's revalidation, which could otherwise hide a truncated discarded attempt. Three separate negative controls fail: removing only the parent reset, only the child reset, or only nested epoch eligibility. Restoring all changes passes (final 2.33 s; timeout 20 s).

Fresh paired llvmpipe checks:11 common passes on each revision, same two 32-lane skips;3/3 nested GPU cases pass. Flip, teardown and exact RGBA checks pass. Max common15.50 s main/14.49 s candidate; nested12.72 s. Required validation-layer insertion confirmed, shader/Mesa caches disabled; normalized messages match, no new VUIDs, existing pNext-layer VUID retained. Original disk-cache full/codec executables pass both revisions: 4/4, actual formats50/51, SHA256-verified binaries and multiprocess checks. Final test-timeout registration leaves the tested executable hashes unchanged. Full public-header compilation passes: 374 libraries / 14,864 exports; conventions and whitespace pass.

Environment: GCC 13.3 cross compiler on ARM64, Ubuntu24.04; software GPU Mesa25.2.8 llvmpipe/LLVM20.1.2 under QEMU-user10.2.3. Full-kernel cache tests use Alpine 6.12.110/QEMU system 8.2.2 TCG cpu=max,smap=off,2 vCPUs, 1536 MiB. Earlier SMAP-on issue remains unqualified. No new native Windows/title/physical-GPU execution by the author.

Contributor physical-GPU evidence belongs to preceding head 0dbf5478b2, not this fix: XairRrR reports10/10 focused passes on RTX4070TiSUPER/615.78.08, matched main7/7, zeroVUIDs and three failing production-removal controls. TechLevelZero reports RTX2000Ada/595.99.02:2343 passes,5 existing/unstable-main failures,41skips and no new validation IDs; the three nested cases were validated but not compared to main's validation pass. These reports do not validate the new retry regression or claim a title unblock.

29 October current integration: head 0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461, main f7e84c4cf1609cc10bac95a44cd431805e5ebc8a. Disk format 50 versus main 49; image-table ABI 3 and runtime ABI 14 retained. Normal merge preserves contributor ancestry. #12051 is closed without merge, so no memo gate or speculative dependency was added.

Matched fresh llvmpipe runs: 11 common passes each, the same two 32-lane color-readback skips, plus 3/3 nested passes on the candidate. Flip/flip-compute, teardown and exact RGBA readback pass. Maximum common runtime: main 13.31 s, candidate 13.21 s; nested maximum 11.54 s. No performance claim. Vulkan is required, shader/Mesa caches disabled, Khronos layer insertion verified; normalized validation messages match, with no new VUIDs. The pre-existing pNext VUID from layer 1.3.275 remains.

Original freshly built disk-cache executables pass full and resource-plan-codec modes on both revisions (4/4) in a full Linux kernel, exercising actual format-49/50 serialization/rejection and multiprocess paths. SHA256-verified originals, no substitute cache executable. Kernel VM: Alpine 6.12.110, QEMU system 8.2.2 TCG, cpu=max,smap=off, two vCPUs, 1536 MiB; GPU runs: Mesa 25.2.8 llvmpipe LLVM20.1.2 under QEMU user10.2.3, Ubuntu24.04, GCC 13.3 cross compiler. Complete public-header audit/compilation (373 libraries / 13,451 exports), conventions and whitespace pass. No new physical-GPU/title/native-Windows claim. Earlier evidence below remains tied to its original revisions.

27 October head 153400ba2b1193870e4dc7046fa18638214c2ae9, integrated main 0d62324ce25ebe4087984b9da143779ce99e7a88. On that earlier base main used disk format 48 and the candidate used 49. Published ancestry/contributor authorship retained. Image-table ABI stays 3; runtime ABI follows main at 14.

Matched software-GPU runs pass 11 common CTests per revision, including bindless Phi, shader memory, serializer, table cache/reuse, bindless images, flip/flip-compute, address-space teardown, D32 and exact uint8x4 RGBA readback. Both skip the same two optimized color32/color64 cases: 32 subgroup lanes required, llvmpipe has 8. Candidate also passes 3/3 nested cases. Slowest common case: main 14.87 s, candidate 14.03 s; nested max 13.42 s. No test or rejection guard was weakened.

The original, newly built shader disk-cache executable and its resource-plan codec mode each pass on both revisions in the full Linux-kernel VM (four successful executions). These tests exercise the actual format-48/49 encoder/decoder, previous-format rejection and multiprocess paths, with unmodified test code. SHA256-verified binaries are used. An inherited user-mode adapter redirected the initial disk-cache run to an old executable; that result is excluded. The redirect is removed from the new lab builds, and the qualified GPU comparison was rerun separately. No stale replacement executable is counted as current-head evidence.

Ubuntu 24.04 x86-64 build, GCC 13.3 cross compiler hosted on ARM64. GPU path: QEMU user 10.2.3, Mesa 25.2.8 llvmpipe / LLVM 20.1.2 (256-bit), SPIRV-Tools at main's pinned revision. Vulkan is required; shader/Mesa caches disabled; ctest -V requests Khronos validation, and loader logs confirm insertion. Normalized messages match main, including its existing VUID-VkDeviceCreateInfo-pNext-pNext for type 1000574000 with layer 1.3.275. No new VUIDs; not zero validation errors. CPU cache tests use Alpine 6.12.110-0-virt / QEMU system 8.2.2 TCG cpu=max, two vCPUs, 1536 MiB. Write watching uses the existing byte-comparison fallback.

All-library public-header audit/compilation passes (368 libraries, 12,811 exports); current-main conventions/whitespace pass. Final-commit GPU binaries match the tested hashes. Full upstream Linux/Windows CI still needs a maintainer dispatch.

Historical Tamalero physical/title results at 74700a08d stay attributed to that earlier head and its reported sampler refusal, not a frame or title run of this head. No new physical-GPU/title or speed claim. Sampler/direct-pointer-Phi extensions remain separate in #7395.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none confirmed on the updated head; the earlier head passed the first image refusal in PPSA01474 as reported above
  • GPUs tested: current head: Mesa llvmpipe software renderer, Mesa 25.2.8 / LLVM 20.1.2, Ubuntu 24.04.5 x86-64 under QEMU 10.2.3. Preceding 74700a08d: contributor-reported NVIDIA RTX 4090 and AMD Radeon Pro V620/RADV on Linux (driver versions not supplied); earlier f4549448f: contributor-reported NVIDIA RTX 3070 / 617.42 and Intel UHD 630 / igvk64 on Windows 11; NVIDIA RTX 4090 on Linux (driver not specified).
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4902544045 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223). Originally posted by [yabanana](https://github.com/yabanana) on 2026-10-17T17:56:26Z. --- ### What Related to #6191. Resolve image descriptors through a scalar-buffer record, a runtime pointer, a V#, then a second independent key. The fixtures model the first GetImageResource dword-0 shape reported for Ratchet & Clank; full-title behavior on this head is unverified. Sampler and direct pointer-Phi extensions remain separate in #7395. The materializer captures exact 64-bit record pointers and shares equal child tables. SPIR-V searches a sorted pointer dictionary, then uses the existing inner-table lookup. The actual pointer selected by a low-word Phi, including loop back edges and constant arms, stays dynamic. Unknown pointers fault; parent scans, child snapshots and final map size remain bounded. The 20 October update includes Yunus Shaikh's offered [shared-child-consumer fix](https://github.com/EagleBearerYS/AnyPS5/commit/0df7d3256e62ac7add3e61f27b1e57f7aa6ae59b), preserving authorship. A child T# word used by another instruction could leave a runtime read through a V# that exists only in the snapshot, causing a driver crash. Such children are now refused, with a regression test. Main is merged without rewriting the published commits, preserving #7395's ancestry. Integration retains main's selected columns, #6232 pointer hops, per-column SharedValues storage and scratch maps. Nested child-header and leaf-record indices use separate scratch maps. Snapshot hashes and resolution memo identity include child tables and pointers. New tests verify unchanged snapshot sharing and compare child-only and pointer-only mutations with uncached resolution. Disk-plan format is 51 over the tested main's 50; image-table ABI remains 3. This preserves the maintainer's integration and avoids reusing main's disk-cache version. Parent scans allow at most 524288 records and inner snapshots at most 1048576 key slots per shader; the final map is capped at 32 MiB. The synthetic fixture covers 348156 outer records and 131072 inner positions from the public report without embedding title code or captures. Nested samplers, other pointer origins, shared descriptor-word consumers and deeper nesting remain refused. Ordering: this PR supplies the base for #7395, which owns the S# and direct pointer-Phi extensions. Earlier overlaps already merged into main are integrated here. The #7395/#7684/#6488 ordering discussion remains relevant to later integration; no combined result with unmerged branches is claimed. No ARM64-port branch was changed. The 24 October integration includes Yunus Shaikh's offered merge and cache fix with authorship. Both helper sets are retained. In TryMakeIndirectColumn, only the merged buffer low word uses PointerRecordOrigin; other reads use UnwrapTableRead with its null check. Main's AvailableAt dominance check remains. The 27 October merge retains main's runtime ABI 14 and advances this PR's disk format to 49, keeping image-table ABI 3. ### Tested 30 October integration: head `7f36e41c458c2abbf06c5a638636869ed9a4cc59`, tested base `e471817c68d4e1b1e44b0ce369ed88bafe4ae8ed`. Main now uses disk format 50, so this head uses **51**; image-table ABI 3/runtime ABI 14 remain. Published ancestry is preserved. The two offered test-only commits from EagleBearerYS were cherry-picked with authorship: valid shared-V#/additional-T# consumer shapes are no longer pinned to rejection; production refusals were not weakened. Both key budgets reset at the beginning of every TableSnapshotter attempt. A single nested image column now participates in the descriptor-epoch check. New `agc_shader_nested_snapshot_retry` uses 262145 parent keys and 524289 child keys, forces one invalidation, verifies per-attempt coverage through each last key and compares the final parent/child snapshots (keys, pointers, words and codes) against an undisturbed capture. It accounts for the enclosing materializer's revalidation, which could otherwise hide a truncated discarded attempt. **Three separate negative controls fail:** removing only the parent reset, only the child reset, or only nested epoch eligibility. Restoring all changes passes (final 2.33 s; timeout 20 s). Fresh paired llvmpipe checks:11 common passes on each revision, same two 32-lane skips;3/3 nested GPU cases pass. Flip, teardown and exact RGBA checks pass. Max common15.50 s main/14.49 s candidate; nested12.72 s. Required validation-layer insertion confirmed, shader/Mesa caches disabled; normalized messages match, no new VUIDs, existing pNext-layer VUID retained. Original disk-cache full/codec executables pass both revisions: 4/4, actual formats50/51, SHA256-verified binaries and multiprocess checks. Final test-timeout registration leaves the tested executable hashes unchanged. Full public-header compilation passes: 374 libraries / 14,864 exports; conventions and whitespace pass. Environment: GCC 13.3 cross compiler on ARM64, Ubuntu24.04; software GPU Mesa25.2.8 llvmpipe/LLVM20.1.2 under QEMU-user10.2.3. Full-kernel cache tests use Alpine 6.12.110/QEMU system 8.2.2 TCG cpu=max,smap=off,2 vCPUs, 1536 MiB. Earlier SMAP-on issue remains unqualified. No new native Windows/title/physical-GPU execution by the author. Contributor physical-GPU evidence belongs to preceding head `0dbf5478b2`, not this fix: [XairRrR](https://github.com/boykopovar/AnyPS5/pull/7223#pullrequestreview-5696539691) reports10/10 focused passes on RTX4070TiSUPER/615.78.08, matched main7/7, zeroVUIDs and three failing production-removal controls. [TechLevelZero](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6503897158) reports RTX2000Ada/595.99.02:2343 passes,5 existing/unstable-main failures,41skips and no new validation IDs; the three nested cases were validated but not compared to main's validation pass. These reports do not validate the new retry regression or claim a title unblock. 29 October current integration: head `0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461`, main `f7e84c4cf1609cc10bac95a44cd431805e5ebc8a`. Disk format **50 versus main 49**; image-table ABI 3 and runtime ABI 14 retained. Normal merge preserves contributor ancestry. #12051 is closed without merge, so no memo gate or speculative dependency was added. Matched fresh llvmpipe runs: **11 common passes each**, the same two 32-lane color-readback skips, plus **3/3 nested passes** on the candidate. Flip/flip-compute, teardown and exact RGBA readback pass. Maximum common runtime: main 13.31 s, candidate 13.21 s; nested maximum 11.54 s. No performance claim. Vulkan is required, shader/Mesa caches disabled, Khronos layer insertion verified; normalized validation messages match, with no new VUIDs. The pre-existing pNext VUID from layer 1.3.275 remains. Original freshly built disk-cache executables pass full and resource-plan-codec modes on **both revisions (4/4)** in a full Linux kernel, exercising actual format-49/50 serialization/rejection and multiprocess paths. SHA256-verified originals, no substitute cache executable. Kernel VM: Alpine 6.12.110, QEMU system 8.2.2 TCG, cpu=max,smap=off, two vCPUs, 1536 MiB; GPU runs: Mesa 25.2.8 llvmpipe LLVM20.1.2 under QEMU user10.2.3, Ubuntu24.04, GCC 13.3 cross compiler. Complete public-header audit/compilation (373 libraries / 13,451 exports), conventions and whitespace pass. No new physical-GPU/title/native-Windows claim. Earlier evidence below remains tied to its original revisions. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> 27 October head `153400ba2b1193870e4dc7046fa18638214c2ae9`, integrated main `0d62324ce25ebe4087984b9da143779ce99e7a88`. On that earlier base main used disk format 48 and the candidate used 49. Published ancestry/contributor authorship retained. Image-table ABI stays 3; runtime ABI follows main at 14. Matched software-GPU runs pass **11 common CTests per revision**, including bindless Phi, shader memory, serializer, table cache/reuse, bindless images, flip/flip-compute, address-space teardown, D32 and exact uint8x4 RGBA readback. Both skip the same two optimized color32/color64 cases: 32 subgroup lanes required, llvmpipe has 8. Candidate also passes **3/3 nested cases**. Slowest common case: main 14.87 s, candidate 14.03 s; nested max 13.42 s. No test or rejection guard was weakened. The original, newly built shader disk-cache executable and its resource-plan codec mode each pass on **both revisions in the full Linux-kernel VM** (four successful executions). These tests exercise the actual format-48/49 encoder/decoder, previous-format rejection and multiprocess paths, with unmodified test code. SHA256-verified binaries are used. An inherited user-mode adapter redirected the initial disk-cache run to an old executable; that result is excluded. The redirect is removed from the new lab builds, and the qualified GPU comparison was rerun separately. No stale replacement executable is counted as current-head evidence. Ubuntu 24.04 x86-64 build, GCC 13.3 cross compiler hosted on ARM64. GPU path: QEMU user 10.2.3, Mesa 25.2.8 llvmpipe / LLVM 20.1.2 (256-bit), SPIRV-Tools at main's pinned revision. Vulkan is required; shader/Mesa caches disabled; ctest -V requests Khronos validation, and loader logs confirm insertion. Normalized messages match main, including its existing VUID-VkDeviceCreateInfo-pNext-pNext for type 1000574000 with layer 1.3.275. **No new VUIDs; not zero validation errors.** CPU cache tests use Alpine 6.12.110-0-virt / QEMU system 8.2.2 TCG cpu=max, two vCPUs, 1536 MiB. Write watching uses the existing byte-comparison fallback. All-library public-header audit/compilation passes (368 libraries, 12,811 exports); current-main conventions/whitespace pass. Final-commit GPU binaries match the tested hashes. Full upstream Linux/Windows CI still needs a maintainer dispatch. Historical [Tamalero physical/title results at 74700a08d](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6300040244) stay attributed to that earlier head and its reported sampler refusal, not a frame or title run of this head. No new physical-GPU/title or speed claim. Sampler/direct-pointer-Phi extensions remain separate in #7395. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none confirmed on the updated head; the earlier head passed the first image refusal in PPSA01474 as reported above <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: current head: Mesa llvmpipe software renderer, Mesa 25.2.8 / LLVM 20.1.2, Ubuntu 24.04.5 x86-64 under QEMU 10.2.3. Preceding 74700a08d: contributor-reported NVIDIA RTX 4090 and AMD Radeon Pro V620/RADV on Linux (driver versions not supplied); earlier f4549448f: contributor-reported NVIDIA RTX 3070 / 617.42 and Intel UHD 630 / igvk64 on Windows 11; NVIDIA RTX 4090 on Linux (driver not specified). <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
akkadbakkad89 commented 2026-10-17 19:49:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-17T19:49:48Z.


First physical-GPU runs (existing coverage is QEMU/lavapipe-class only): head f4549448f, Windows 11, MinGW (WinLibs GCC 15.2.0), Release, serial fresh processes:

  • NVIDIA RTX 3070 (driver 617.42): agc_driver_nested_image_table, _large, _budget, agc_driver_image_table, _cache, _cache_bounds, _reuse, agc_driver_bindless_images, agc_shader_bindless, agc_shader_memory, agc_shader_disk_cache — 11/11 pass.
  • Intel UHD 630 (ANYPS5_GPU=UHD, igvk64): same 11/11 pass.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6239934205 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6239934205). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-17T19:49:48Z. --- First physical-GPU runs (existing coverage is QEMU/lavapipe-class only): head `f4549448f`, Windows 11, MinGW (WinLibs GCC 15.2.0), Release, serial fresh processes: - NVIDIA RTX 3070 (driver 617.42): `agc_driver_nested_image_table`, `_large`, `_budget`, `agc_driver_image_table`, `_cache`, `_cache_bounds`, `_reuse`, `agc_driver_bindless_images`, `agc_shader_bindless`, `agc_shader_memory`, `agc_shader_disk_cache` — 11/11 pass. - Intel UHD 630 (`ANYPS5_GPU=UHD`, igvk64): same 11/11 pass.
Tamalero commented 2026-10-18 00:12:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-18T00:12:53Z.


Linux confirmation on Ratchet & Clank: Rift Apart (PPSA01474), RTX 4090, main 5361e69de, the PR's two commits cherry-picked (one test-only conflict in tests/execution/ImageTable.cpp, resolved by keeping both role checks), one run each:

Build Stop
without this PR ~405 s, GetImageResource dword 0 is not a valid runtime value at pc=0x6b80 (the #6191 chain), compute 0x116bb66d00
with this PR ~465 s, GetSamplerResource dword 0 is not a valid runtime value at pc=0x6b74, compute 0x116bb63500, through the same Phi(Phi(ReadConstBuffer@pc=0x1aa8 …)) record

So the T# half of the chain resolves, as @ps54all saw on Windows, and the next stop is the sampler of the same record.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243591416 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6243591416). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-18T00:12:53Z. --- Linux confirmation on Ratchet & Clank: Rift Apart (PPSA01474), RTX 4090, `main` `5361e69de`, the PR's two commits cherry-picked (one test-only conflict in `tests/execution/ImageTable.cpp`, resolved by keeping both role checks), one run each: | Build | Stop | |---|---| | without this PR | ~405 s, `GetImageResource dword 0 is not a valid runtime value` at `pc=0x6b80` (the #6191 chain), compute `0x116bb66d00` | | with this PR | ~465 s, `GetSamplerResource dword 0 is not a valid runtime value` at `pc=0x6b74`, compute `0x116bb63500`, through the same `Phi(Phi(ReadConstBuffer@pc=0x1aa8 …))` record | So the T# half of the chain resolves, as @ps54all saw on Windows, and the next stop is the sampler of the same record. *Tested and written by Claude (AI assistant) on a contributor's machine.*
Tamalero commented 2026-10-18 00:19:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-18T00:19:47Z.


@yabanana the next stop after this PR is the sampler of the same record, in both titles that have this shape so far: Ratchet & Clank (GetSamplerResource dword 0 at pc=0x6b74, above and in #6191) and Marvel's Wolverine (images and samplers through the same chain, #6191). Is a nested sampler table in scope for this PR or a follow-up? I can run either on Ratchet the same day, and send the S# words and keys of a failing record if that helps with a fixture.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243651399 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6243651399). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-18T00:19:47Z. --- @yabanana the next stop after this PR is the sampler of the same record, in both titles that have this shape so far: Ratchet & Clank (`GetSamplerResource dword 0` at `pc=0x6b74`, above and in #6191) and Marvel's Wolverine (images and samplers through the same chain, #6191). Is a nested sampler table in scope for this PR or a follow-up? I can run either on Ratchet the same day, and send the S# words and keys of a failing record if that helps with a fixture. *Tested and written by Claude (AI assistant) on a contributor's machine.*
MarcZX10 commented 2026-10-18 00:25:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T00:25:04Z.


I checked head f4549448f: the PR explicitly leaves nested samplers unsupported, while the new table lookup path already has a sampler-table branch. That makes nested S# handling a plausible follow-up, but it shares the planner/materializer and cache snapshot machinery, so I am holding off on a parallel patch until the merge ordering is clear. For a focused regression fixture, could you share a sanitized S# descriptor and the two key sequences (or expected sampled result) from the failing shape? That would let us test a synthetic chain without title shader data.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243696672 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6243696672). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T00:25:04Z. --- I checked head `f4549448f`: the PR explicitly leaves nested samplers unsupported, while the new table lookup path already has a sampler-table branch. That makes nested S# handling a plausible follow-up, but it shares the planner/materializer and cache snapshot machinery, so I am holding off on a parallel patch until the merge ordering is clear. For a focused regression fixture, could you share a sanitized S# descriptor and the two key sequences (or expected sampled result) from the failing shape? That would let us test a synthetic chain without title shader data.
Tamalero commented 2026-10-18 01:52:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-18T01:52:44Z.


@MarcZX100 here is the shape, from a local diagnostic that evaluates the refused chain against guest memory at registration (Ratchet & Clank: Rift Apart, main 5361e69de + this PR). Addresses are masked (A, B, P0), offsets and alignment are real.

Common part (all three loads below use it):

  • V# read from the SRT at pc=0x1a9c, offsets 0x270..0x27c: A_lo 00100011 00054ffc 00005204 (stride 16, 0x54ffc records).
  • Record key1 at pc=0x1aa8: a 64-bit pointer at key1 * 16 + 0x8 / + 0xc. Record 0 holds P0, record 1 holds P0 + 0x120, so the pointers select consecutive 0x120-byte blocks.
  • key1 is not a plain value: it is ReadFirstLane(SelectU32(LogicalAnd(...), IAdd32(Phi, Phi), Phi(...))), a loop over the lanes' keys, so the real key sequence is per lane at run time. I can only show what records 0 and 1 hold, not which records a dispatch selects.

The three loads from the selected block:

pc Descriptor Read Second key This PR
0x6b80 T# through a V# in the block, indexed by key2 yes resolves it
0x6b74 S# 4 dwords directly at block +0xb0 no stops here (GetSamplerResource dword 0)
0x7cbc T# 8 dwords directly at block +0x0; the pointer goes through four nested Phis (loop iterations) no stops here, once the S# is worked around locally

Words at those offsets, records 0 and 1:

  • S# at +0xb0: record 1 00000003 00700080 00000000 00000000 (a plausible sampler: LOD 0x080–0x700); record 0 B_lo 00200011 00002000 00005204, which looks like a buffer descriptor rather than an S#, so not every record holds a sampler there.
  • T# at +0x0: record 0 C_lo cb300000 003fc03f b00503ac 0000017f 00700050 00000000 00000000 (plausible 2D T#); record 1 does not look like an image descriptor.

So a synthetic fixture would be: a record table (16-byte records, pointer at +0x8), blocks of 0x120 bytes, an S# at block +0xb0 selected by the lane-loop key alone, and, for the 0x7cbc case, a T# at block +0x0 with the block pointer merged through a few loop Phis. To see past the S# stop I replaced unresolvable S#s with an all-zero sampler locally (not for upstream); that is how the 0x7cbc stop showed up.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244445568 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6244445568). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-18T01:52:44Z. --- @MarcZX100 here is the shape, from a local diagnostic that evaluates the refused chain against guest memory at registration (Ratchet & Clank: Rift Apart, `main` `5361e69de` + this PR). Addresses are masked (`A`, `B`, `P0`), offsets and alignment are real. **Common part** (all three loads below use it): - V# read from the SRT at `pc=0x1a9c`, offsets `0x270..0x27c`: `A_lo 00100011 00054ffc 00005204` (stride 16, `0x54ffc` records). - Record `key1` at `pc=0x1aa8`: a 64-bit pointer at `key1 * 16 + 0x8` / `+ 0xc`. Record 0 holds `P0`, record 1 holds `P0 + 0x120`, so the pointers select consecutive 0x120-byte blocks. - `key1` is not a plain value: it is `ReadFirstLane(SelectU32(LogicalAnd(...), IAdd32(Phi, Phi), Phi(...)))`, a loop over the lanes' keys, so the real key sequence is per lane at run time. I can only show what records 0 and 1 hold, not which records a dispatch selects. **The three loads from the selected block:** | pc | Descriptor | Read | Second key | This PR | |---|---|---|---|---| | `0x6b80` | T# | through a V# in the block, indexed by `key2` | yes | resolves it | | `0x6b74` | S# | 4 dwords directly at block `+0xb0` | no | stops here (`GetSamplerResource dword 0`) | | `0x7cbc` | T# | 8 dwords directly at block `+0x0`; the pointer goes through four nested `Phi`s (loop iterations) | no | stops here, once the S# is worked around locally | **Words at those offsets**, records 0 and 1: - S# at `+0xb0`: record 1 `00000003 00700080 00000000 00000000` (a plausible sampler: LOD 0x080–0x700); record 0 `B_lo 00200011 00002000 00005204`, which looks like a buffer descriptor rather than an S#, so not every record holds a sampler there. - T# at `+0x0`: record 0 `C_lo cb300000 003fc03f b00503ac 0000017f 00700050 00000000 00000000` (plausible 2D T#); record 1 does not look like an image descriptor. So a synthetic fixture would be: a record table (16-byte records, pointer at `+0x8`), blocks of 0x120 bytes, an S# at block `+0xb0` selected by the lane-loop key alone, and, for the `0x7cbc` case, a T# at block `+0x0` with the block pointer merged through a few loop `Phi`s. To see past the S# stop I replaced unresolvable S#s with an all-zero sampler locally (not for upstream); that is how the `0x7cbc` stop showed up. *Tested and written by Claude (AI assistant) on a contributor's machine.*
MarcZX10 commented 2026-10-18 01:54:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T01:54:18Z.


Thanks, this is enough to define a useful synthetic regression without retaining title data. It should keep the per-lane key1 loop dynamic, select blocks through the 16-byte record pointer at +8, and cover the heterogeneous records: one selected block with the valid S# at +0xb0, another with a non-sampler value there, plus the T# at +0 whose pointer passes through the nested loop Phis. The local all-zero sampler substitution is a diagnostic only; the upstream test should exercise the real sampler descriptor and keep the unsupported path explicit if it is not implemented. This confirms the follow-up needs sampler resolution and a second pointer-chain case; I’ll avoid a parallel patch until the scope/order with #7223 is settled.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244458142 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6244458142). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T01:54:18Z. --- Thanks, this is enough to define a useful synthetic regression without retaining title data. It should keep the per-lane `key1` loop dynamic, select blocks through the 16-byte record pointer at `+8`, and cover the heterogeneous records: one selected block with the valid S# at `+0xb0`, another with a non-sampler value there, plus the T# at `+0` whose pointer passes through the nested loop `Phi`s. The local all-zero sampler substitution is a diagnostic only; the upstream test should exercise the real sampler descriptor and keep the unsupported path explicit if it is not implemented. This confirms the follow-up needs sampler resolution and a second pointer-chain case; I’ll avoid a parallel patch until the scope/order with #7223 is settled.
EagleBearerYS commented 2026-10-18 02:23:34 +00:00 (Migrated from github.com)

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


@yabanana, thanks for #7223. Two things came up while building on it.

A crash on this head. When another instruction also reads a nested child's T# words, lavapipe crashes inside the shader. The child's V# words are planning-only loads that are never emitted, so the other consumer keeps a runtime read through a V# that exists only in the snapshot. Commit 0df7d3256e refuses such a child, the same way #7223 already refuses a V# with another consumer, and adds the case to agc_driver_nested_image_table. That case is a SIGSEGV on f4549448f7 and passes with the commit. It's a single commit on top of your head, and you're welcome to take it as is. It's the first commit on branch feat/shader-nested-sampler-tables.

The S# half. The same branch has the sampler half that this PR leaves for later. It's stacked on your head and doesn't change your commits:

  • 65a15b9919 resolves an S# through record → pointer → V# → S#. That's the shape Marvel's Wolverine (PPSA03671) stops on in #6191. It reuses your nested tables and limits, and the plan encoding is unchanged.
  • 4a4db4bf94 reads an S# or T# directly through a record pointer whose low word is merged through a Phi, with no V# hop. That's the shape Ratchet & Clank: Rift Apart (PPSA01474) stops on with #7223 applied. It reuses your pointer dictionary for a direct indirect column, and moves the disk-cache format to 38 and the image-table ABI to 4.

The new tests are agc_driver_nested_sampler_table, agc_driver_pointer_phi_sampler_table and two disk-cache round trips. On your head they fail with GetSamplerResource dword 0 is not a valid runtime value, and the consumer case is a SIGSEGV. On the branch they pass on GitHub's Linux runner; on Windows the GPU tests skip and the disk-cache tests pass (run).

We plan to open the S# half shortly as a separate PR stacked on #7223 ("Depends on: #7223"), unless you'd rather fold it into this one. If you would, say so and the commits are yours to take.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244689034 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6244689034). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-18T02:23:34Z. --- @yabanana, thanks for #7223. Two things came up while building on it. **A crash on this head.** When another instruction also reads a nested child's T# words, lavapipe crashes inside the shader. The child's V# words are planning-only loads that are never emitted, so the other consumer keeps a runtime read through a V# that exists only in the snapshot. Commit [0df7d3256e](https://github.com/EagleBearerYS/AnyPS5/commit/0df7d3256e) refuses such a child, the same way #7223 already refuses a V# with another consumer, and adds the case to `agc_driver_nested_image_table`. That case is a SIGSEGV on f4549448f7 and passes with the commit. It's a single commit on top of your head, and you're welcome to take it as is. It's the first commit on branch [`feat/shader-nested-sampler-tables`](https://github.com/EagleBearerYS/AnyPS5/commits/feat/shader-nested-sampler-tables). **The S# half.** The same branch has the sampler half that this PR leaves for later. It's stacked on your head and doesn't change your commits: - **[65a15b9919](https://github.com/EagleBearerYS/AnyPS5/commit/65a15b9919)** resolves an S# through record → pointer → V# → S#. That's the shape Marvel's Wolverine (PPSA03671) stops on in #6191. It reuses your nested tables and limits, and the plan encoding is unchanged. - **[4a4db4bf94](https://github.com/EagleBearerYS/AnyPS5/commit/4a4db4bf94)** reads an S# or T# directly through a record pointer whose low word is merged through a Phi, with no V# hop. That's the shape Ratchet & Clank: Rift Apart (PPSA01474) stops on with #7223 applied. It reuses your pointer dictionary for a direct indirect column, and moves the disk-cache format to 38 and the image-table ABI to 4. The new tests are `agc_driver_nested_sampler_table`, `agc_driver_pointer_phi_sampler_table` and two disk-cache round trips. On your head they fail with `GetSamplerResource dword 0 is not a valid runtime value`, and the consumer case is a SIGSEGV. On the branch they pass on GitHub's Linux runner; on Windows the GPU tests skip and the disk-cache tests pass ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39087966966)). We plan to open the S# half shortly as a separate PR stacked on #7223 ("Depends on: #7223"), unless you'd rather fold it into this one. If you would, say so and the commits are yours to take.
blawesom commented 2026-10-18 10:38:00 +00:00 (Migrated from github.com)

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


Stack note: this PR is the base of #7395 — its head f4549448f is the merge-base, so #7395's series builds directly on these two commits. I rebased the full stack onto current main as blawesom:rebase/7395 (verified: builds, conventions pass, full suite green apart from the known main regression agc_driver_tessellation — Mesa, #5444), which covers this PR's rebase as well. If the two land separately, #7395 should rebase onto this one rather than onto main directly; if they land together, the single rebase/7395 branch serves both.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248839944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6248839944). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-18T10:38:00Z. --- **Stack note:** this PR is the base of #7395 — its head `f4549448f` is the merge-base, so #7395's series builds directly on these two commits. I rebased the full stack onto current `main` as `blawesom:rebase/7395` (verified: builds, conventions pass, full suite green apart from the known `main` regression `agc_driver_tessellation` — Mesa, #5444), which covers this PR's rebase as well. If the two land separately, #7395 should rebase onto this one rather than onto `main` directly; if they land together, the single `rebase/7395` branch serves both.
yabanana commented 2026-10-20 13:17:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yabanana on 2026-10-20T13:17:14Z.


The shared-child-word crash fix from @EagleBearerYS (0df7d3256e) is now included with its original authorship. @blawesom, this update keeps the two published #7223 commits and merges main, so #7395 can merge this branch without losing its existing ancestry. @Tamalero @MarcZX10: the sampler and direct pointer-Phi extensions remain in #7395; I have not folded them into this PR.

The main integration keeps selected columns, #6232 pointer hops, SharedValues snapshot storage, and separate scratch maps for child-header and leaf-record indices. The new resolution memo also keys on nested children and pointer values. A regression compares child-only and pointer-only changes against uncached resolution; an unchanged snapshot still shares its resolution. Plan format is now 42 over main's 41; image-table ABI stays 3.

Published head 74700a08d11f6846d0e6474223cd1ef0dcbf4e67 on main 44e3389c8: 13/13 focused CTests pass, plus 3/3 cold-cache nested tests. The new child-cache negative control fails as intended when that comparison is removed; the restored code passes. Two broader tests remain limited in this QEMU/lavapipe lab on both untouched main and this head: image-table graphics ends in vkWaitForFences graphics: Vulkan result 2, and image-table cache-bounds exceeds both 30 s CTest and 120 s direct diagnostic bounds. No repository timeout or acceptance check was relaxed. Previous NVIDIA/Intel and Ratchet reports remain valuable evidence for f4549448f, not a retest of this new head. Full upstream Linux/Windows builds still need maintainer dispatch.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6291760917 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6291760917). Originally posted by [yabanana](https://github.com/yabanana) on 2026-10-20T13:17:14Z. --- The shared-child-word crash fix from @EagleBearerYS (`0df7d3256e`) is now included with its original authorship. @blawesom, this update keeps the two published #7223 commits and merges main, so #7395 can merge this branch without losing its existing ancestry. @Tamalero @MarcZX10: the sampler and direct pointer-Phi extensions remain in #7395; I have not folded them into this PR. The main integration keeps selected columns, #6232 pointer hops, SharedValues snapshot storage, and separate scratch maps for child-header and leaf-record indices. The new resolution memo also keys on nested children and pointer values. A regression compares child-only and pointer-only changes against uncached resolution; an unchanged snapshot still shares its resolution. Plan format is now 42 over main's 41; image-table ABI stays 3. Published head `74700a08d11f6846d0e6474223cd1ef0dcbf4e67` on main `44e3389c8`: 13/13 focused CTests pass, plus 3/3 cold-cache nested tests. The new child-cache negative control fails as intended when that comparison is removed; the restored code passes. Two broader tests remain limited in this QEMU/lavapipe lab on both untouched main and this head: image-table graphics ends in `vkWaitForFences graphics: Vulkan result 2`, and image-table cache-bounds exceeds both 30 s CTest and 120 s direct diagnostic bounds. No repository timeout or acceptance check was relaxed. Previous NVIDIA/Intel and Ratchet reports remain valuable evidence for f4549448f, not a retest of this new head. Full upstream Linux/Windows builds still need maintainer dispatch. AI-assisted: yes
oneandonlydean commented 2026-10-20 14:58:22 +00:00 (Migrated from github.com)

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


Thanks. We've reviewed 74700a08d1 and it looks good to us, including the shared-consumer fix. Local runs on an RTX 4090 pass, and the tests fail as expected when the new refusal or the nested fallback is turned off. The PR is still marked as a draft. Is anything left that you want to add? If not, could you mark it ready for review? Then we'll run full CI, and because it changes the shader ABI and the disk-plan format, also a GPU test run against main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293885695 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6293885695). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T14:58:22Z. --- Thanks. We've reviewed `74700a08d1` and it looks good to us, including the shared-consumer fix. Local runs on an RTX 4090 pass, and the tests fail as expected when the new refusal or the nested fallback is turned off. The PR is still marked as a draft. Is anything left that you want to add? If not, could you mark it ready for review? Then we'll run full CI, and because it changes the shader ABI and the disk-plan format, also a GPU test run against main.
Tamalero commented 2026-10-20 19:51:41 +00:00 (Migrated from github.com)

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


Retail check of 74700a08d on Ratchet & Clank: Rift Apart (PPSA01474), ahead of the GPU run. No local patches, cold shader cache, one unattended run per build.

Machine Build Result
Linux, RTX 4090 main 44e3389c8 (this PR's base) 285 s, stops on compute 0x116bb62700: GetImageResource, T# read at pc=0x6b80 through the V# loaded at pc=0x6b6c (the #6191 chain); 3 image refusals
Linux, RTX 4090 this PR, 74700a08d 295 s, stops on compute 0x116bb5c500: GetSamplerResource at LoadAddressU32@pc=0x6b74; 0 image refusals, 3 sampler refusals
Linux, Radeon Pro V620 (RADV) this PR, 74700a08d 193 s, stops on compute 0x116bb58d00: GetSamplerResource at pc=0x6b74; 0 image refusals. On main 659230f7b the same shader stopped at the T# read at pc=0x6b80

So the merged head still resolves Ratchet's record → pointer → V# → T# chain on both vendors. The next stop is the sampler read in the same shaders, which is what #7395 adds on top. No crash or new error before that point.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6300040244 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6300040244). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-20T19:51:41Z. --- Retail check of `74700a08d` on Ratchet & Clank: Rift Apart (PPSA01474), ahead of the GPU run. No local patches, cold shader cache, one unattended run per build. | Machine | Build | Result | |---|---|---| | Linux, RTX 4090 | `main` 44e3389c8 (this PR's base) | 285 s, stops on compute 0x116bb62700: `GetImageResource`, T# read at `pc=0x6b80` through the V# loaded at `pc=0x6b6c` (the #6191 chain); 3 image refusals | | Linux, RTX 4090 | this PR, `74700a08d` | 295 s, stops on compute 0x116bb5c500: `GetSamplerResource` at `LoadAddressU32@pc=0x6b74`; 0 image refusals, 3 sampler refusals | | Linux, Radeon Pro V620 (RADV) | this PR, `74700a08d` | 193 s, stops on compute 0x116bb58d00: `GetSamplerResource` at `pc=0x6b74`; 0 image refusals. On `main` 659230f7b the same shader stopped at the T# read at `pc=0x6b80` | So the merged head still resolves Ratchet's record → pointer → V# → T# chain on both vendors. The next stop is the sampler read in the same shaders, which is what #7395 adds on top. No crash or new error before that point. *Tested and written by Claude (AI assistant) on a contributor's machine.*
yabanana commented 2026-10-21 09:04:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by yabanana on 2026-10-21T09:04:28Z.


@oneandonlydean Nothing else to add to this PR. The sampler and direct pointer-Phi work stays in #7395.

I merged main 27c88a8d7 to clear the new conflict, preserving published ancestry. The only textual conflict was the disk-plan version: now 44 over main's 43; image-table ABI stays 3. Head 87168157a2e4c893468e535bbe99a9003c6fcd97 passes 10/10 common tests on both main and candidate, plus 3/3 cold-cache nested tests. Loaded Khronos validation reports only the identical baseline VUID documented in the description.

@Tamalero I added your unpatched NVIDIA/AMD Ratchet results for 74700a08d to the description, separately from the new integration head.

Marked ready for review. Please proceed with the full CI and main/GPU comparison you proposed.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6312212861 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6312212861). Originally posted by [yabanana](https://github.com/yabanana) on 2026-10-21T09:04:28Z. --- @oneandonlydean Nothing else to add to this PR. The sampler and direct pointer-Phi work stays in #7395. I merged main `27c88a8d7` to clear the new conflict, preserving published ancestry. The only textual conflict was the disk-plan version: now 44 over main's 43; image-table ABI stays 3. Head `87168157a2e4c893468e535bbe99a9003c6fcd97` passes 10/10 common tests on both main and candidate, plus 3/3 cold-cache nested tests. Loaded Khronos validation reports only the identical baseline VUID documented in the description. @Tamalero I added your unpatched NVIDIA/AMD Ratchet results for `74700a08d` to the description, separately from the new integration head. Marked ready for review. Please proceed with the full CI and main/GPU comparison you proposed. AI-assisted: yes
oneandonlydean commented 2026-10-21 09:17:25 +00:00 (Migrated from github.com)

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


@yabanana thanks for un-drafting it and for the merge with main. We'll check the merge, then run full CI and the GPU comparison on 87168157a2. One heads-up on the version: another open PR also moves FormatVersion to 44, so whichever of the two lands second will need 45; we'll check that at merge time.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6312454392 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6312454392). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T09:17:25Z. --- @yabanana thanks for un-drafting it and for the merge with `main`. We'll check the merge, then run full CI and the GPU comparison on `87168157a2`. One heads-up on the version: another open PR also moves `FormatVersion` to 44, so whichever of the two lands second will need 45; we'll check that at merge time.
oneandonlydean commented 2026-10-21 10:01:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T10:01:17Z.


@yabanana a heads-up on the version line: the other PR I mentioned has just merged with FormatVersion 44, so main is now at 44. Could you move this branch to 45? The rest of the review and CI stand.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6313267666 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6313267666). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T10:01:17Z. --- @yabanana a heads-up on the version line: the other PR I mentioned has just merged with `FormatVersion` 44, so `main` is now at 44. Could you move this branch to 45? The rest of the review and CI stand.
EagleBearerYS commented 2026-10-21 21:24:14 +00:00 (Migrated from github.com)

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


@yabanana, since #8991 merged, this PR conflicts with main in ResourceTracker.cpp. #8991 adds FirstLaneOffset, ParseFirstLaneOffset and SameFirstLaneOffset just before TryMakeTableColumn, whose signature this PR changes.

A merge of main 0c6a5bd593 into this branch is ready if it helps: EagleBearerYS/AnyPS5 pm/7223-merge-main, one merge commit, 8ed8acc4ba, on your 87168157a2.

  • It keeps main's three helpers before TryMakeTableColumn with this PR's signature, the buffer parameter included. main's first-lane base check in the column loop merged on its own.
  • On GitHub's runners (run): on Linux, the image-table and nested-table tests and agc_shader_bindless, which runs #8991's new case, pass 3 times each. On Windows it builds and passes, with the Vulkan cases skipping.

You can fast-forward to it, or merge main yourself. It's the same resolution #7395 carries (bd4d8018d2).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326880357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#issuecomment-6326880357). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T21:24:14Z. --- @yabanana, since #8991 merged, this PR conflicts with `main` in `ResourceTracker.cpp`. #8991 adds `FirstLaneOffset`, `ParseFirstLaneOffset` and `SameFirstLaneOffset` just before `TryMakeTableColumn`, whose signature this PR changes. A merge of `main` 0c6a5bd593 into this branch is ready if it helps: [`EagleBearerYS/AnyPS5` `pm/7223-merge-main`](https://github.com/EagleBearerYS/AnyPS5/tree/pm/7223-merge-main), one merge commit, 8ed8acc4ba, on your 87168157a2. - It keeps `main`'s three helpers before `TryMakeTableColumn` with this PR's signature, the `buffer` parameter included. `main`'s first-lane base check in the column loop merged on its own. - On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39674666609)): on Linux, the image-table and nested-table tests and `agc_shader_bindless`, which runs #8991's new case, pass 3 times each. On Windows it builds and passes, with the Vulkan cases skipping. You can fast-forward to it, or merge `main` yourself. It's the same resolution #7395 carries (bd4d8018d2).
MarcZX10 commented 2026-10-29 05:45:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T05:45:20Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The cache format version is now stale against current main. The PR sets FormatVersion to 49, but current main 52c09d567d2fa453494dd720fcf53a98149468e4 also sets it to 49. This PR changes the serialized shader disk-cache plan, so using the same format number risks accepting entries written with a different layout. The PR description still says it is format 49 over main's 48, which was true for its earlier base but is no longer true.

The #12051 overlap is resolved by its closure; this request concerns the cache format and current-main integration only.

What I ran

  • Reviewed exact head 153400ba2b1193870e4dc7046fa18638214c2ae9 against current main 52c09d567d2fa453494dd720fcf53a98149468e4.
  • Ran git merge-tree --write-tree, git diff --check, and python3 tools/check_conventions.py --base refs/review/main-20261029c --head refs/review/pr-7223-latest.
  • Compared FormatVersion in ShaderDiskCache.hpp on both exact refs and checked current CI status.

Results

Check Result
Current-main merge preview Clean
git diff --check Passed
Conventions Passed
Cache format version Both current main and this PR use 49; this PR changes the encoded plan
Hosted checks Eligibility, conventions, labels, report, relinker, ASan, and Windows pass; Linux/product and register-context/write-watch jobs are skipped
Local C++/shader tests Not run locally

Please refresh the branch on current main, take the next available disk-cache format version for the changed encoding, update the description, and rerun the focused shader/image-table and cache tests on that exact integrated head. The reported hosted checks do not run the skipped product tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693382958 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#pullrequestreview-5693382958). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T05:45:20Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The cache format version is now stale against current `main`. The PR sets `FormatVersion` to 49, but current `main` `52c09d567d2fa453494dd720fcf53a98149468e4` also sets it to 49. This PR changes the serialized shader disk-cache plan, so using the same format number risks accepting entries written with a different layout. The PR description still says it is format 49 over main's 48, which was true for its earlier base but is no longer true. The #12051 overlap is resolved by its closure; this request concerns the cache format and current-main integration only. ## What I ran - Reviewed exact head `153400ba2b1193870e4dc7046fa18638214c2ae9` against current `main` `52c09d567d2fa453494dd720fcf53a98149468e4`. - Ran `git merge-tree --write-tree`, `git diff --check`, and `python3 tools/check_conventions.py --base refs/review/main-20261029c --head refs/review/pr-7223-latest`. - Compared `FormatVersion` in `ShaderDiskCache.hpp` on both exact refs and checked current CI status. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | `git diff --check` | Passed | | Conventions | Passed | | Cache format version | Both current `main` and this PR use 49; this PR changes the encoded plan | | Hosted checks | Eligibility, conventions, labels, report, relinker, ASan, and Windows pass; Linux/product and register-context/write-watch jobs are skipped | | Local C++/shader tests | Not run locally | Please refresh the branch on current `main`, take the next available disk-cache format version for the changed encoding, update the description, and rerun the focused shader/image-table and cache tests on that exact integrated head. The reported hosted checks do not run the skipped product tests.
XairRrR commented 2026-10-29 10:52:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T10:52:48Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The nested T# path builds, its tests pass on a physical NVIDIA GPU with Khronos validation and fail without the production change, but the new per-shader key budgets are not reset when the table snapshot is retried, so a retried snapshot is truncated.

What I ran

  • PR head 0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461, main 1db077e876a839f75d11a56e728e7f56a4a8c25e, merged with --no-ff in a clean worktree (no conflicts).
  • 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).
git diff --check origin/main...refs/review/7223
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target agc_shader_memory_tests agc_shader_disk_cache_tests agc_driver_bindless_images_tests agc_driver_image_table_tests agc_driver_image_table_cache_tests agc_driver_image_table_reuse_tests libs
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_bindless_images|agc_driver_image_table|agc_driver_image_table_cache|agc_driver_image_table_reuse|agc_driver_nested_image_table.*)$'
# the same build and ctest command on origin/main
# negative control: production files from origin/main, PR tests kept (see below)

Results

Check Result
Merge with current main Clean
git diff --check Clean
check_conventions.py All conventions checks passed.
Build (targets above, plus libs) OK, no warnings
Merged tree, focused tests 10/10 pass: the 7 common tests plus agc_driver_nested_image_table, _large, _budget
main, focused tests 7/7 common tests pass
Validation layer Inserted in both runs; no was not found but was requested by env var VK_INSTANCE_LAYERS
VUID- lines 0 on main, 0 on the merged tree
Test duration Longest 2.40 s (agc_driver_image_table); nested cases 0.45–0.67 s, under the 30 s limit
FormatVersion 50 on the PR, 49 on main 1db077e876. This resolves the format collision raised in the earlier changes-requested review
Merged tree, ctest excerpt
 7/10 Test #1574: agc_driver_nested_image_table_large ....   Passed    0.45 sec
 8/10 Test #1573: agc_driver_nested_image_table ..........   Passed    0.67 sec
 9/10 Test #1575: agc_driver_nested_image_table_budget ...   Passed    0.49 sec
10/10 Test #1203: agc_driver_image_table .................   Passed    2.40 sec
100% tests passed out of 10
1573: Selected GPU name=NVIDIA GeForce RTX 4070 Ti SUPER vendor=0x10de device=0x2705 subgroup=32
1573: nested image table independent keys, alias, descriptor replacement, faults, budget and refusals checked
1574: nested image table: 348156 parents, 131072 inner keys and pointer Phi checked
1575: nested image table parent and child budgets checked
1573: [Vulkan Loader] INFO | LAYER:   Insert instance layer "VK_LAYER_KHRONOS_validation" (/usr/lib/libVkLayer_khronos_validation.so)
main, ctest excerpt
1/7 Test  #964: agc_driver_bindless_images .......   Passed    0.56 sec
2/7 Test #1206: agc_driver_image_table_reuse .....   Passed    0.63 sec
3/7 Test  #903: agc_shader_bindless ..............   Passed    0.06 sec
4/7 Test #1204: agc_driver_image_table_cache .....   Passed    0.00 sec
5/7 Test  #929: agc_shader_memory ................   Passed    0.18 sec
6/7 Test  #944: agc_shader_disk_cache ............   Passed    1.13 sec
7/7 Test #1203: agc_driver_image_table ...........   Passed    2.49 sec

Negative control

I restored the nine non-test production files under core/shader/recompiler from origin/main. I kept the PR's tests/execution/ImageTable.cpp and the CMakeLists.txt test registrations, then rebuilt agc_driver_image_table_tests. All three nested tests fail with the #6191 refusal:

Output
1/3 Test #1573: agc_driver_nested_image_table ..........***Failed    0.33 sec
2/3 Test #1574: agc_driver_nested_image_table_large ....***Failed    0.35 sec
3/3 Test #1575: agc_driver_nested_image_table_budget ...***Failed    0.34 sec
ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x0000004c(GetBufferResource(LoadAddressU32@pc=0x00000044(...

The ShaderDiskCache.cpp test changes use the new pointers/nested/buffer fields and cannot compile against main, so they have no negative control.

Findings

Blocking

  1. The parent and child key budgets carry over into snapshot retries.
    • Where: core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1465-1466. parentKeysRemaining and nestedKeysRemaining are TableSnapshotter members, initialized once. They are decremented at L1068-L1069 and L1437-L1438.
    • The bug: Run() retries the whole snapshot up to three times when the descriptor epoch changes. Before a retry it clears columns, pages, wholePages and tables (L728-L735), but it does not restore the two budgets. Every column is re-read, so the retry draws on what the discarded attempt left over.
    • Effect: take the 348156-record parent domain this PR targets. Attempt 0 consumes 348156 of 524288 parent keys, so attempt 1 captures only 176132 parents and attempt 2 captures none. On the GPU, a lane whose pointer comes from an uncaptured record then misses the pointer dictionary and faults with "outside the snapshot". Without the retry, the same dispatch would have resolved. The retry path is reachable whenever the shader has more than one table (count > 1u, L726) and a descriptor invalidation lands during the snapshot.
    • How I found it: by reading the code. I did not reproduce it; none of the fixtures drives the epoch-retry path.
    • Suggested fix: reset both counters to ImageTableAbi::MaxParentKeys and ImageTableAbi::MaxNestedKeys at the start of each attempt, or make them per-attempt locals. Add a materializer-level test whose descriptorScope reports one invalidation on the first attempt, and check that the parent column still holds all its keys.

Non-blocking

  1. A shader whose only table is nested never gets the epoch re-check.
    • Where: core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:706-717. hasIndirect is set only when the image or sampler column itself is indirect (L706-L717).
    • The issue: a nested T# column is never indirect; decodePlan even rejects one that is. Its parent, the pointer-indirect V# column, is. So a shader whose only table is nested has checkEpoch == false. A single-level pointer-indirect table does get the multi-attempt consistency check, although the nested chain reads record → pointer → V# → T# and is at least as exposed.
    • Suggested fix: also set hasIndirect when plan.descriptorSources[column.heapSource].tableColumn is present, unless leaving it out is intentional. If it is, say why in the PR.
  2. The root TableOutsideCode is always counted as an expected fault.
    • Where: core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:2083 in the merged tree (L2058 at the PR head). For a nested root, fill always calls poison(resource, PoisonReason::Unmapped, nullptr) for TableOutsideCode.
    • The issue: that call marks the poison entry as expected and raises out.faults, even when every lane's pointer is non-null. This looks harmless given how faults is used today. If faults is meant to count reachable outcomes only, consider allocating the entry lazily.

Not verified

  • I did not exercise the snapshot epoch-retry path at runtime (finding 1 is from reading the code).
  • No title run. I did not check whether Ratchet & Clank: Rift Apart (PPSA01474) still passes the T# stop on this head.
  • Windows, AMD and Intel GPUs. I ran only the focused tests listed above, not the full suite, and not the disk-cache multiprocess or large-file variants.

To get this to a good state

  • Reset parentKeysRemaining/nestedKeysRemaining per snapshot attempt and add a regression test for a retried nested snapshot.
  • Consider counting nested columns in hasIndirect.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696539691 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#pullrequestreview-5696539691). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T10:52:48Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The nested T# path builds, its tests pass on a physical NVIDIA GPU with Khronos validation and fail without the production change, but the new per-shader key budgets are not reset when the table snapshot is retried, so a retried snapshot is truncated. ## What I ran - PR head `0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461`, `main` `1db077e876a839f75d11a56e728e7f56a4a8c25e`, merged with `--no-ff` in a clean worktree (no conflicts). - 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). ```sh git diff --check origin/main...refs/review/7223 python3 tools/check_conventions.py --base origin/main cmake --build build -j10 --target agc_shader_memory_tests agc_shader_disk_cache_tests agc_driver_bindless_images_tests agc_driver_image_table_tests agc_driver_image_table_cache_tests agc_driver_image_table_reuse_tests libs 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_bindless_images|agc_driver_image_table|agc_driver_image_table_cache|agc_driver_image_table_reuse|agc_driver_nested_image_table.*)$' # the same build and ctest command on origin/main # negative control: production files from origin/main, PR tests kept (see below) ``` ## Results | Check | Result | |---|---| | Merge with current `main` | Clean | | `git diff --check` | Clean | | `check_conventions.py` | `All conventions checks passed.` | | Build (targets above, plus `libs`) | OK, no warnings | | Merged tree, focused tests | 10/10 pass: the 7 common tests plus `agc_driver_nested_image_table`, `_large`, `_budget` | | `main`, focused tests | 7/7 common tests pass | | Validation layer | Inserted in both runs; no `was not found but was requested by env var VK_INSTANCE_LAYERS` | | `VUID-` lines | 0 on `main`, 0 on the merged tree | | Test duration | Longest 2.40 s (`agc_driver_image_table`); nested cases 0.45–0.67 s, under the 30 s limit | | `FormatVersion` | 50 on the PR, 49 on `main` `1db077e876`. This resolves the format collision raised in the earlier changes-requested review | <details><summary>Merged tree, ctest excerpt</summary> ``` 7/10 Test #1574: agc_driver_nested_image_table_large .... Passed 0.45 sec 8/10 Test #1573: agc_driver_nested_image_table .......... Passed 0.67 sec 9/10 Test #1575: agc_driver_nested_image_table_budget ... Passed 0.49 sec 10/10 Test #1203: agc_driver_image_table ................. Passed 2.40 sec 100% tests passed out of 10 1573: Selected GPU name=NVIDIA GeForce RTX 4070 Ti SUPER vendor=0x10de device=0x2705 subgroup=32 1573: nested image table independent keys, alias, descriptor replacement, faults, budget and refusals checked 1574: nested image table: 348156 parents, 131072 inner keys and pointer Phi checked 1575: nested image table parent and child budgets checked 1573: [Vulkan Loader] INFO | LAYER: Insert instance layer "VK_LAYER_KHRONOS_validation" (/usr/lib/libVkLayer_khronos_validation.so) ``` </details> <details><summary>main, ctest excerpt</summary> ``` 1/7 Test #964: agc_driver_bindless_images ....... Passed 0.56 sec 2/7 Test #1206: agc_driver_image_table_reuse ..... Passed 0.63 sec 3/7 Test #903: agc_shader_bindless .............. Passed 0.06 sec 4/7 Test #1204: agc_driver_image_table_cache ..... Passed 0.00 sec 5/7 Test #929: agc_shader_memory ................ Passed 0.18 sec 6/7 Test #944: agc_shader_disk_cache ............ Passed 1.13 sec 7/7 Test #1203: agc_driver_image_table ........... Passed 2.49 sec ``` </details> ## Negative control I restored the nine non-test production files under `core/shader/recompiler` from `origin/main`. I kept the PR's `tests/execution/ImageTable.cpp` and the `CMakeLists.txt` test registrations, then rebuilt `agc_driver_image_table_tests`. All three nested tests fail with the #6191 refusal: <details><summary>Output</summary> ``` 1/3 Test #1573: agc_driver_nested_image_table ..........***Failed 0.33 sec 2/3 Test #1574: agc_driver_nested_image_table_large ....***Failed 0.35 sec 3/3 Test #1575: agc_driver_nested_image_table_budget ...***Failed 0.34 sec ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x0000004c(GetBufferResource(LoadAddressU32@pc=0x00000044(... ``` </details> The `ShaderDiskCache.cpp` test changes use the new `pointers`/`nested`/`buffer` fields and cannot compile against `main`, so they have no negative control. ## Findings ### Blocking 1. **The parent and child key budgets carry over into snapshot retries.** - **Where:** `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:1465-1466`. `parentKeysRemaining` and `nestedKeysRemaining` are `TableSnapshotter` members, initialized once. They are decremented at [L1068-L1069](https://github.com/boykopovar/AnyPS5/blob/0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L1068-L1069) and [L1437-L1438](https://github.com/boykopovar/AnyPS5/blob/0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L1437-L1438). - **The bug:** `Run()` retries the whole snapshot up to three times when the descriptor epoch changes. Before a retry it clears `columns`, `pages`, `wholePages` and `tables` ([L728-L735](https://github.com/boykopovar/AnyPS5/blob/0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L728-L735)), but it does not restore the two budgets. Every column is re-read, so the retry draws on what the discarded attempt left over. - **Effect:** take the 348156-record parent domain this PR targets. Attempt 0 consumes 348156 of 524288 parent keys, so attempt 1 captures only 176132 parents and attempt 2 captures none. On the GPU, a lane whose pointer comes from an uncaptured record then misses the pointer dictionary and faults with "outside the snapshot". Without the retry, the same dispatch would have resolved. The retry path is reachable whenever the shader has more than one table (`count > 1u`, [L726](https://github.com/boykopovar/AnyPS5/blob/0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L726)) and a descriptor invalidation lands during the snapshot. - **How I found it:** by reading the code. I did not reproduce it; none of the fixtures drives the epoch-retry path. - **Suggested fix:** reset both counters to `ImageTableAbi::MaxParentKeys` and `ImageTableAbi::MaxNestedKeys` at the start of each attempt, or make them per-attempt locals. Add a materializer-level test whose `descriptorScope` reports one invalidation on the first attempt, and check that the parent column still holds all its keys. ### Non-blocking 1. **A shader whose only table is nested never gets the epoch re-check.** - **Where:** `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:706-717`. `hasIndirect` is set only when the image or sampler column itself is `indirect` ([L706-L717](https://github.com/boykopovar/AnyPS5/blob/0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L706-L717)). - **The issue:** a nested T# column is never `indirect`; `decodePlan` even rejects one that is. Its parent, the pointer-indirect V# column, is. So a shader whose only table is nested has `checkEpoch == false`. A single-level pointer-indirect table does get the multi-attempt consistency check, although the nested chain reads record → pointer → V# → T# and is at least as exposed. - **Suggested fix:** also set `hasIndirect` when `plan.descriptorSources[column.heapSource].tableColumn` is present, unless leaving it out is intentional. If it is, say why in the PR. 2. **The root `TableOutsideCode` is always counted as an expected fault.** - **Where:** `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp:2083` in the merged tree ([L2058 at the PR head](https://github.com/boykopovar/AnyPS5/blob/0dbf5478b2aaaac7f2a5f7a12e3724d9a2346461/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L2058)). For a nested root, `fill` always calls `poison(resource, PoisonReason::Unmapped, nullptr)` for `TableOutsideCode`. - **The issue:** that call marks the poison entry as expected and raises `out.faults`, even when every lane's pointer is non-null. This looks harmless given how `faults` is used today. If `faults` is meant to count reachable outcomes only, consider allocating the entry lazily. ## Not verified - I did not exercise the snapshot epoch-retry path at runtime (finding 1 is from reading the code). - No title run. I did not check whether Ratchet & Clank: Rift Apart (PPSA01474) still passes the T# stop on this head. - Windows, AMD and Intel GPUs. I ran only the focused tests listed above, not the full suite, and not the disk-cache multiprocess or large-file variants. ## To get this to a good state - Reset `parentKeysRemaining`/`nestedKeysRemaining` per snapshot attempt and add a regression test for a retried nested snapshot. - Consider counting nested columns in `hasIndirect`.
MarcZX10 commented 2026-10-29 11:12:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T11:12:29Z.

Review: CHANGES_REQUESTED


Re-checked — changes requested

The new update addresses the format-version finding: it reports version 50 on the PR versus 49 on main, keeps the other ABI versions unchanged, and supplies fresh cache, runtime and validation-layer results on the reported head. That is useful evidence, but the branch is still based on f7e84c4cf1; current main is ba5b5330b3 and has since changed ResourceMaterializer.cpp, ShaderDiskCache.cpp and the shader debt file touched by this PR. Please integrate current main and rerun the focused cache/replay and nested-image tests, including the paired validation check, on the resulting exact tree. Preserve the published stack order with #7395.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696756529 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#pullrequestreview-5696756529). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T11:12:29Z. **Review:** CHANGES_REQUESTED --- ## Re-checked — changes requested The new update addresses the format-version finding: it reports version 50 on the PR versus 49 on main, keeps the other ABI versions unchanged, and supplies fresh cache, runtime and validation-layer results on the reported head. That is useful evidence, but the branch is still based on `f7e84c4cf1`; current `main` is `ba5b5330b3` and has since changed `ResourceMaterializer.cpp`, `ShaderDiskCache.cpp` and the shader debt file touched by this PR. Please integrate current main and rerun the focused cache/replay and nested-image tests, including the paired validation check, on the resulting exact tree. Preserve the published stack order with #7395.
XairRrR commented 2026-11-03 16:27:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T16:27:02Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

The new commits fix my earlier blocking finding. Commit 7f36e41 resets both key budgets on every snapshot attempt and lets a nested column trigger the epoch check, and it adds agc_shader_nested_snapshot_retry. That test passes on the merged tree and fails under both negative controls. One thing still blocks: the new test is registered without the Windows PATH entry for libc's DLL directory, so it cannot start on the Windows job.

What changed since my last review

  • 7f36e41c45, "fix(shader): reset nested table budgets on snapshot retries":
    • parentKeysRemaining and nestedKeysRemaining are now reset at the top of every TableSnapshotter::Run() attempt.
    • hasIndirect is now also set when an image column's heapSource is itself a table column.
    • New test agc_shader_nested_snapshot_retry (ShaderMemory.cpp).
    • FormatVersion moved to 51 at that point.
  • 6d8f907c5a and 11366202db (EagleBearerYS, cherry-picked): drop the two shared-word refused(...) checks and their helper from ImageTable.cpp, and change the summary line to match.
  • Merges of main (b215a39ec1, 635f569fea):
    • Registrations moved into tests/cmake/agc_driver_image_table_tests.cmake and agc_shader_memory_tests.cmake.
    • The descriptor-source decoder minimum is now 81.
    • FormatVersion is now 56, against 52 on main 4f41f4c375.
  • The author replied on 30 October: they dispute my non-blocking finding about the root outside code (addressed below).

What I ran

PR head 635f569feae58702e4cd4ce4fc3ccfff0e2e2102, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged with --no-ff in a clean worktree. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release/Ninja, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...635f569feae58702e4cd4ce4fc3ccfff0e2e2102
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
git show 7f36e41c458c2abbf06c5a638636869ed9a4cc59
ctest --test-dir build -j8 --test-load 32 --output-on-failure \
  -R '^(agc_shader_nested_snapshot_retry|agc_driver_nested_image_table.*|agc_shader_disk_cache.*|agc_shader_table_snapshot_reuse|agc_driver_image_table|agc_driver_image_table_cache|agc_driver_image_table_reuse)$'
# negative control 1: delete the two budget-reset lines in Run()
ninja -C build -j32 -l32 agc_shader_memory_tests
ctest --test-dir build --output-on-failure -R '^agc_shader_nested_snapshot_retry$'
build/tests/agc_shader_memory_tests --nested-snapshot-retry
# negative control 2: merged file, with hasIndirect reverted to `column.indirect` only
ninja -C build -j32 -l32 agc_shader_memory_tests
build/tests/agc_shader_memory_tests --nested-snapshot-retry
# restore the merged file, rebuild, rerun, then git status --porcelain (clean)

The script's build and test run (build.json) also applies: build, libs and skips OK. 2218 tests ran, with no new failures and no timeouts; 7 known main failures. Khronos validation loaded in 772 of 773 tests, with no new VUIDs against main.

Results

Check Result
git diff --check Clean
check_conventions.py All conventions checks passed.
Focused tests, merged tree 11/11 pass. agc_shader_nested_snapshot_retry 1.70 s, agc_driver_image_table 8.57 s (the longest); all are under 30 s
Negative control 1: no budget reset agc_shader_nested_snapshot_retry fails: nested retry: a discarded attempt consumed the next attempt key budgets
Negative control 2: no nested epoch eligibility Fails: nested retry: expected inner retry and outer revalidation
Restored merged tree Passes again; git status --porcelain is empty
Validation (script) No new VUID- lines; the layer loaded in every test but one
FormatVersion 56 on the merged tree, 52 on main 4f41f4c375
Focused ctest excerpt
 5/11 Test #1820: agc_driver_nested_image_table_large ....   Passed    0.44 sec
 6/11 Test #1821: agc_driver_nested_image_table_budget ...   Passed    0.55 sec
 7/11 Test #1819: agc_driver_nested_image_table ..........   Passed    1.46 sec
 8/11 Test #2163: agc_shader_nested_snapshot_retry .......   Passed    1.70 sec
 9/11 Test #2152: agc_shader_disk_cache ..................   Passed    4.32 sec
10/11 Test #1272: agc_driver_image_table .................   Passed    8.57 sec
11/11 Test #2154: agc_shader_disk_cache_large_file .......   Passed    2.63 sec
100% tests passed, 0 tests failed out of 11

The author reports three separate controls (parent reset, child reset, epoch eligibility). I reproduced two of them: both resets removed together, and the eligibility change reverted.

Previous findings

  • Blocking 1, key budgets carry over into snapshot retries: Resolved.
    • ResourceMaterializer.cpp L768-L773 resets both budgets at the top of each attempt.
    • The new test forces one invalidation. It checks coverage through the last parent and leaf key on every attempt, and compares the final snapshot with an undisturbed one.
    • It passes here and fails with the reset removed (control 1).
  • Non-blocking 1, a nested-only shader never gets the epoch check: Resolved.
    • L745-L752 now sets hasIndirect when the column's heapSource is a table column.
    • Control 2 shows the test depends on this.
  • Non-blocking 2, the root TableOutsideCode is always counted as a fault: No longer applies.
    • The author's point holds: a runtime pointer can be null or uncaptured even when every captured pointer is non-null, so the root poison entry is needed.
    • faults counts the poison entries prepared in advance, not faults seen at dispatch. I withdraw the suggestion.

New findings

Blocking

  1. agc_shader_nested_snapshot_retry lacks the Windows libc PATH, so it cannot start on the Windows job.
    • Where: agc_shader_memory_tests.cmake L33-L34. The test sets only TIMEOUT 20.
    • Why it matters: every other test of agc_shader_memory_tests in this fragment has an if(WIN32) block with ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>" (for example L30-L32 and L38-L40 right next to it), because the executable links the guest libc DLL.
    • Evidence: I read the fragment in the merged tree. EagleBearerYS reports that the test exits with 0xc0000135 on upstream's Windows job for #7395, which carries this test (job). I did not run Windows myself. This PR's own Windows check would hit the same failure once it runs ctest.
    • Suggested fix: add if(WIN32) set_tests_properties(agc_shader_nested_snapshot_retry PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>") endif() after L34. That is what EagleBearerYS offered in 3fd2dd02f7, now applied to the split fragment.

Non-blocking

None.

Not verified

  • Windows: the blocking finding comes from reading the registration, backed by a contributor's CI report, not from my own run.
  • Physical GPUs and titles: I ran lavapipe only, and the NVIDIA reports in the thread belong to earlier heads (0dbf5478b2, 7f36e41c45).
  • I removed the parent and child resets together, not one at a time (the author reports both one-at-a-time controls).
  • The disk-cache multiprocess paths ran only as far as agc_shader_disk_cache* exercises them here.

To get this to a good state

  • Add the if(WIN32) libc PATH block for agc_shader_nested_snapshot_retry in tests/cmake/agc_shader_memory_tests.cmake, then ask for a Windows CI run.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5755842212 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#pullrequestreview-5755842212). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T16:27:02Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested The new commits fix my earlier blocking finding. Commit 7f36e41 resets both key budgets on every snapshot attempt and lets a nested column trigger the epoch check, and it adds `agc_shader_nested_snapshot_retry`. That test passes on the merged tree and fails under both negative controls. One thing still blocks: the new test is registered without the Windows `PATH` entry for libc's DLL directory, so it cannot start on the Windows job. ## What changed since my last review - `7f36e41c45`, "fix(shader): reset nested table budgets on snapshot retries": - `parentKeysRemaining` and `nestedKeysRemaining` are now reset at the top of every `TableSnapshotter::Run()` attempt. - `hasIndirect` is now also set when an image column's `heapSource` is itself a table column. - New test `agc_shader_nested_snapshot_retry` (`ShaderMemory.cpp`). - `FormatVersion` moved to 51 at that point. - `6d8f907c5a` and `11366202db` (EagleBearerYS, cherry-picked): drop the two shared-word `refused(...)` checks and their helper from `ImageTable.cpp`, and change the summary line to match. - Merges of `main` (`b215a39ec1`, `635f569fea`): - Registrations moved into `tests/cmake/agc_driver_image_table_tests.cmake` and `agc_shader_memory_tests.cmake`. - The descriptor-source decoder minimum is now 81. - `FormatVersion` is now 56, against 52 on `main` `4f41f4c375`. - The author replied on 30 October: they dispute my non-blocking finding about the root outside code (addressed below). ## What I ran PR head `635f569feae58702e4cd4ce4fc3ccfff0e2e2102`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged with `--no-ff` in a clean worktree. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release/Ninja, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19). ```sh git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...635f569feae58702e4cd4ce4fc3ccfff0e2e2102 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 git show 7f36e41c458c2abbf06c5a638636869ed9a4cc59 ctest --test-dir build -j8 --test-load 32 --output-on-failure \ -R '^(agc_shader_nested_snapshot_retry|agc_driver_nested_image_table.*|agc_shader_disk_cache.*|agc_shader_table_snapshot_reuse|agc_driver_image_table|agc_driver_image_table_cache|agc_driver_image_table_reuse)$' # negative control 1: delete the two budget-reset lines in Run() ninja -C build -j32 -l32 agc_shader_memory_tests ctest --test-dir build --output-on-failure -R '^agc_shader_nested_snapshot_retry$' build/tests/agc_shader_memory_tests --nested-snapshot-retry # negative control 2: merged file, with hasIndirect reverted to `column.indirect` only ninja -C build -j32 -l32 agc_shader_memory_tests build/tests/agc_shader_memory_tests --nested-snapshot-retry # restore the merged file, rebuild, rerun, then git status --porcelain (clean) ``` The script's build and test run (build.json) also applies: build, `libs` and skips OK. 2218 tests ran, with no new failures and no timeouts; 7 known `main` failures. Khronos validation loaded in 772 of 773 tests, with no new VUIDs against `main`. ## Results | Check | Result | |---|---| | `git diff --check` | Clean | | `check_conventions.py` | `All conventions checks passed.` | | Focused tests, merged tree | 11/11 pass. `agc_shader_nested_snapshot_retry` 1.70 s, `agc_driver_image_table` 8.57 s (the longest); all are under 30 s | | Negative control 1: no budget reset | `agc_shader_nested_snapshot_retry` fails: `nested retry: a discarded attempt consumed the next attempt key budgets` | | Negative control 2: no nested epoch eligibility | Fails: `nested retry: expected inner retry and outer revalidation` | | Restored merged tree | Passes again; `git status --porcelain` is empty | | Validation (script) | No new `VUID-` lines; the layer loaded in every test but one | | `FormatVersion` | 56 on the merged tree, 52 on `main` `4f41f4c375` | <details><summary>Focused ctest excerpt</summary> ``` 5/11 Test #1820: agc_driver_nested_image_table_large .... Passed 0.44 sec 6/11 Test #1821: agc_driver_nested_image_table_budget ... Passed 0.55 sec 7/11 Test #1819: agc_driver_nested_image_table .......... Passed 1.46 sec 8/11 Test #2163: agc_shader_nested_snapshot_retry ....... Passed 1.70 sec 9/11 Test #2152: agc_shader_disk_cache .................. Passed 4.32 sec 10/11 Test #1272: agc_driver_image_table ................. Passed 8.57 sec 11/11 Test #2154: agc_shader_disk_cache_large_file ....... Passed 2.63 sec 100% tests passed, 0 tests failed out of 11 ``` </details> The author reports three separate controls (parent reset, child reset, epoch eligibility). I reproduced two of them: both resets removed together, and the eligibility change reverted. ## Previous findings - **Blocking 1, key budgets carry over into snapshot retries: Resolved.** - [ResourceMaterializer.cpp L768-L773](https://github.com/boykopovar/AnyPS5/blob/635f569feae58702e4cd4ce4fc3ccfff0e2e2102/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L768-L773) resets both budgets at the top of each attempt. - The new test forces one invalidation. It checks coverage through the last parent and leaf key on every attempt, and compares the final snapshot with an undisturbed one. - It passes here and fails with the reset removed (control 1). - **Non-blocking 1, a nested-only shader never gets the epoch check: Resolved.** - [L745-L752](https://github.com/boykopovar/AnyPS5/blob/635f569feae58702e4cd4ce4fc3ccfff0e2e2102/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L745-L752) now sets `hasIndirect` when the column's `heapSource` is a table column. - Control 2 shows the test depends on this. - **Non-blocking 2, the root `TableOutsideCode` is always counted as a fault: No longer applies.** - The author's point holds: a runtime pointer can be null or uncaptured even when every captured pointer is non-null, so the root poison entry is needed. - `faults` counts the poison entries prepared in advance, not faults seen at dispatch. I withdraw the suggestion. ## New findings ### Blocking 1. **`agc_shader_nested_snapshot_retry` lacks the Windows libc `PATH`, so it cannot start on the Windows job.** - **Where:** [agc_shader_memory_tests.cmake L33-L34](https://github.com/boykopovar/AnyPS5/blob/635f569feae58702e4cd4ce4fc3ccfff0e2e2102/core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake#L33-L34). The test sets only `TIMEOUT 20`. - **Why it matters:** every other test of `agc_shader_memory_tests` in this fragment has an `if(WIN32)` block with `ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>"` (for example L30-L32 and L38-L40 right next to it), because the executable links the guest libc DLL. - **Evidence:** I read the fragment in the merged tree. EagleBearerYS reports that the test exits with 0xc0000135 on upstream's Windows job for #7395, which carries this test ([job](https://github.com/boykopovar/AnyPS5/actions/runs/41251317143/job/124687071071)). I did not run Windows myself. This PR's own Windows check would hit the same failure once it runs ctest. - **Suggested fix:** add `if(WIN32) set_tests_properties(agc_shader_nested_snapshot_retry PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>") endif()` after L34. That is what EagleBearerYS offered in [3fd2dd02f7](https://github.com/EagleBearerYS/AnyPS5/commit/3fd2dd02f73863e06e88733ca84c9cec67b15a4e), now applied to the split fragment. ### Non-blocking None. ## Not verified - Windows: the blocking finding comes from reading the registration, backed by a contributor's CI report, not from my own run. - Physical GPUs and titles: I ran lavapipe only, and the NVIDIA reports in the thread belong to earlier heads (`0dbf5478b2`, `7f36e41c45`). - I removed the parent and child resets together, not one at a time (the author reports both one-at-a-time controls). - The disk-cache multiprocess paths ran only as far as `agc_shader_disk_cache*` exercises them here. ## To get this to a good state - Add the `if(WIN32)` libc `PATH` block for `agc_shader_nested_snapshot_retry` in `tests/cmake/agc_shader_memory_tests.cmake`, then ask for a Windows CI run. <!-- anyps5-bots job=3438 head=635f569feae58702e4cd4ce4fc3ccfff0e2e2102 -->
XairRrR commented 2026-11-03 18:44:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T18:44:10Z.

Review: APPROVED


Re-checked — approved

Commit 51c9e3bdf6 adds the Windows libc PATH entry that agc_shader_nested_snapshot_retry was missing. That was the only open blocking finding. The checks and the focused tests pass on the PR merged with current main.

What changed since my last review

  • New commit 51c9e3bdf6, "test(agc): put libc's directory on PATH for agc_shader_nested_snapshot_retry on Windows". It adds three lines to tests/cmake/agc_shader_memory_tests.cmake and changes no sources.
  • main moved from 4f41f4c375 to 1e658521a0. Between those two commits, main did not touch core/shader, this PR's two test fragments or docs/dev/debt/shader.md.
  • FormatVersion is still 56 on the merged tree, against 52 on main 1e658521a0.
  • oneandonlydean replied on 3 November and asked for this re-check.

What I ran

PR head 51c9e3bdf651284df23e9037bdca5b4eaea83f07, main 1e658521a0a599872612bb91949311e2956b5283, merged with --no-ff (tree 4f3aac4b1c19364a4d58aea09bd7765a320e6772) in a clean worktree. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release/Ninja, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19).

git diff 635f569feae58702e4cd4ce4fc3ccfff0e2e2102 51c9e3bdf651284df23e9037bdca5b4eaea83f07
git diff --check 1e658521a0a599872612bb91949311e2956b5283...51c9e3bdf651284df23e9037bdca5b4eaea83f07
python3 tools/check_conventions.py --base 1e658521a0a599872612bb91949311e2956b5283
git diff --stat 4f41f4c375f5abb487dbd184fbc150f31994d762 1e658521a0a599872612bb91949311e2956b5283 -- core/shader <PR test fragments> docs/dev/debt/shader.md
ctest --test-dir build -j8 --test-load 32 --output-on-failure \
  -R '^(agc_shader_nested_snapshot_retry|agc_driver_nested_image_table.*|agc_shader_disk_cache.*|agc_shader_table_snapshot_reuse|agc_driver_image_table|agc_driver_image_table_cache|agc_driver_image_table_reuse)$'
git status --porcelain

The script's build and test run of this merge also applies:

  • Configure, build, libs and the skip check succeeded.
  • 2223 tests ran, with no new failures and no timeouts.
  • The 7 known failures also fail on main.
  • Khronos validation loaded in 774 of 775 tests (none reported a missing layer) and found no new VUID- lines compared with main.

Results

Check Result
git diff --check Clean
check_conventions.py All conventions checks passed.
Focused tests, merged tree 11/11 pass. agc_shader_nested_snapshot_retry took 1.64 s; the slowest was agc_driver_image_table at 8.60 s
Script test run No new failures, no timeouts, no new VUIDs
Worktree after the run git status --porcelain is empty

Negative control

None this round. The new commit only changes a Windows-only test property. The Linux negative controls I ran on 635f569fea cover the same test source and production code, and that code has not changed since.

Previous findings

  • Blocking 1, agc_shader_nested_snapshot_retry lacked the Windows libc PATH: Resolved. agc_shader_memory_tests.cmake L35-L37 now has the same if(WIN32) ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>" block as agc_shader_descriptor_phis and agc_shader_region_merge next to it.
  • The other findings from earlier rounds were already settled in my last review: the budget reset and the nested epoch eligibility were resolved, and the root outside-code point no longer applied. Nothing in this push touches them.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • Windows: I did not run the test on Windows. The fix matches the registrations next to it, but the test starting on Windows has not been shown here yet; this PR's Windows CI job will show it.
  • Physical GPUs and titles: I ran lavapipe only.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5757695301 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7223#pullrequestreview-5757695301). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T18:44:10Z. **Review:** APPROVED --- # Re-checked — approved Commit `51c9e3bdf6` adds the Windows libc `PATH` entry that `agc_shader_nested_snapshot_retry` was missing. That was the only open blocking finding. The checks and the focused tests pass on the PR merged with current `main`. ## What changed since my last review - New commit `51c9e3bdf6`, "test(agc): put libc's directory on PATH for agc_shader_nested_snapshot_retry on Windows". It adds three lines to `tests/cmake/agc_shader_memory_tests.cmake` and changes no sources. - `main` moved from `4f41f4c375` to `1e658521a0`. Between those two commits, `main` did not touch `core/shader`, this PR's two test fragments or `docs/dev/debt/shader.md`. - `FormatVersion` is still 56 on the merged tree, against 52 on `main` `1e658521a0`. - oneandonlydean replied on 3 November and asked for this re-check. ## What I ran PR head `51c9e3bdf651284df23e9037bdca5b4eaea83f07`, `main` `1e658521a0a599872612bb91949311e2956b5283`, merged with `--no-ff` (tree `4f3aac4b1c19364a4d58aea09bd7765a320e6772`) in a clean worktree. Debian 13 VM (2× Xeon Gold 6136), GCC 14.2.0, Release/Ninja, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19). ```sh git diff 635f569feae58702e4cd4ce4fc3ccfff0e2e2102 51c9e3bdf651284df23e9037bdca5b4eaea83f07 git diff --check 1e658521a0a599872612bb91949311e2956b5283...51c9e3bdf651284df23e9037bdca5b4eaea83f07 python3 tools/check_conventions.py --base 1e658521a0a599872612bb91949311e2956b5283 git diff --stat 4f41f4c375f5abb487dbd184fbc150f31994d762 1e658521a0a599872612bb91949311e2956b5283 -- core/shader <PR test fragments> docs/dev/debt/shader.md ctest --test-dir build -j8 --test-load 32 --output-on-failure \ -R '^(agc_shader_nested_snapshot_retry|agc_driver_nested_image_table.*|agc_shader_disk_cache.*|agc_shader_table_snapshot_reuse|agc_driver_image_table|agc_driver_image_table_cache|agc_driver_image_table_reuse)$' git status --porcelain ``` The script's build and test run of this merge also applies: - Configure, build, `libs` and the skip check succeeded. - 2223 tests ran, with no new failures and no timeouts. - The 7 known failures also fail on `main`. - Khronos validation loaded in 774 of 775 tests (none reported a missing layer) and found no new `VUID-` lines compared with `main`. ## Results | Check | Result | |---|---| | `git diff --check` | Clean | | `check_conventions.py` | `All conventions checks passed.` | | Focused tests, merged tree | 11/11 pass. `agc_shader_nested_snapshot_retry` took 1.64 s; the slowest was `agc_driver_image_table` at 8.60 s | | Script test run | No new failures, no timeouts, no new VUIDs | | Worktree after the run | `git status --porcelain` is empty | ## Negative control None this round. The new commit only changes a Windows-only test property. The Linux negative controls I ran on `635f569fea` cover the same test source and production code, and that code has not changed since. ## Previous findings - **Blocking 1, `agc_shader_nested_snapshot_retry` lacked the Windows libc `PATH`: Resolved.** [agc_shader_memory_tests.cmake L35-L37](https://github.com/boykopovar/AnyPS5/blob/51c9e3bdf651284df23e9037bdca5b4eaea83f07/core/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmake#L35-L37) now has the same `if(WIN32)` `ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>"` block as `agc_shader_descriptor_phis` and `agc_shader_region_merge` next to it. - The other findings from earlier rounds were already settled in my last review: the budget reset and the nested epoch eligibility were resolved, and the root outside-code point no longer applied. Nothing in this push touches them. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - Windows: I did not run the test on Windows. The fix matches the registrations next to it, but the test starting on Windows has not been shown here yet; this PR's Windows CI job will show it. - Physical GPUs and titles: I ran lavapipe only. <!-- anyps5-bots job=3509 head=51c9e3bdf651284df23e9037bdca5b4eaea83f07 -->
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!7223
No description provided.