fix(shader): follow pointer hops and fixed-offset V# reads behind a record pointer #28483
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28483"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-11-30T23:48:45Z.
What
This carries #9457 by @EagleBearerYS, which has had no activity from its author since Nov 26 and conflicts with
main. Two stacks are waiting on it: #16472 → #16631 and #16812 → #16814. The branch is #9457's heada3617bb255with today'smainmerged in. All of #9457's commits keep their authors (@EagleBearerYS, and @hugodearaujo for the fixed-offset change). The only changes to them are in the merge commit:ResourceTracker.cpp: #9457's fixed-offset case againstmain'sSplitImmediateAddend(#23778). Both are kept: a fixed offset under a pointer-loaded V# takes the fixed-offset branch, and every other offset takesmain's masked-offset match with the immediate addend split off.FormatVersion: 98 → 99, the next aftermain.The full description of the two shapes, with their chains, is in #9457. In short:
TryMakeIndirectColumnrefused every hop once the record pointer was merged. It now refuses hops only for buffer columns.The open reviews on #9457:
main, theif (!hops.empty() && buffer) return false;guard still comes before both ofTryMakeIndirectColumn's read paths,UnwrapTableReadandPointerRecordReads/PointerRecordPairs, so a hop never reaches a buffer column on either. The three new tests were rerun (see Tested), andFormatVersionis renumbered.ImageTable.cpponmain; that case is now a passing test there. This PR adds no throw pins: its tests check sampled results, a moved pointer that must not recompile, and faults for pointers outside the snapshot. The pairedmainand branch runs with the validation layer are under Tested.main.#9633, #9749, #9790 and #9969 (also @EagleBearerYS's) are carried the same way by #16472 and #16812, which now depend on this PR only.
Tested
Release builds.
Focused tests:
^(agc_driver_(image_table|nested|pointer)|agc_shader_(disk_cache|memory|nested_sampler))withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -V, onmain93d64f2d1eand on this head478c70f7f8. The loader log shows the validation layer loaded in every build, and no log has aVUID-line. On Windows the tests ran as a normal user, so the loader takes the layer fromVK_ADD_LAYER_PATH; the skipped test on the Intel GPU isagc_driver_image_table_vouched_lookups, which skips there onmaintoo.mainagc_driver_pointer_hop_table,agc_driver_pointer_vsharp_fixed_table,agc_driver_pointer_vsharp_fixed_offset_table): withmain'sResourceTracker.cppput back on this head, exactly these three fail on the RTX 3080 Ti, twice, each withGetImageResource dword 0 is not a valid runtime value. The other 50 pass.VUID-line. On the Intel GPU, #16812 and #16814 fail #9969'sagc_driver_pointer_vsharp_child_key_arm_table, as reported on #9969 in November; that test is not in this PR.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)ReadConstBuffer@pc=0x8560, as in #9457; the next stop, 0x8f54/0x8fa0, needs a follow-up. Gran Turismo 7's shape is untested on that titleSupersedes #9457.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EqZu9J6tUMvmRP7RkxVCQr
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T23:58:29Z.
Review: APPROVED
Reviewed — looks good
The four changed files were inspected at the pinned head, and the implementation supports the stated pointer-hop and fixed-offset handling.
What I ran
Head:
478c70f7f859bc05e4bae43be2464a6e584a3ec6; base:main; no merged preview was run. I used the prepared review materials and the pinnedrepo_read.pyreader in the read-only review environment. No tests or builds were run locally.Results
Negative control
Not run; no test or source mutation was performed locally.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
The author's reported builds, test runs, hardware results, validation-layer output, and downstream stack results were not independently verified.
files.jsonlists four reviewed files and no exclusions; the changed regions and relevant surrounding code were inspected.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T23:59:28Z.
Review: COMMENTED
Actionable comments posted: 2
785b54cc-2877-4c3d-82e7-6a2156caceedReviewing files that changed from the base of the PR and between
93d64f2d1eand478c70f7f8.core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_table_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/ImageTable.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/shader/recompiler/ShaderDiskCache.hppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T08:40:23Z.
Review: COMMENTED
I reran the focused CTests with Linux lavapipe and Khronos validation 1.4.369. The baseline and patch both passed agc_driver_gcn_scalar_buffer_base. The patch also passed agc_driver_pointer_hop_table, agc_driver_pointer_vsharp_fixed_table, and agc_driver_pointer_vsharp_fixed_offset_table. Both logs confirm layer insertion and contain no VUIDs. The broader image-table fixture timed out at its 30-second limit in the earlier runs on both commits.
AI-assisted: yes.