feat(agc): resolve runtime sampler addresses through device image keys #13929

Open
Celegans12 wants to merge 154 commits from upstream-pr/13929 into main
Celegans12 commented 2026-10-31 13:02:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-31T13:02:32Z.


What

Stacked on #13928; please review the runtime-address sampler changes and merge resolution.

After ordinary sampler planning fails, admit a GPU-loaded S# address only when its image already has an admitted device-table column. Carry the four GPU-loaded words into the lookup and sample through its resolved slot. Existing stage, subgroup and all-consumer demotion rules remain; no CPU descriptor capture or new fallback is added.

Coverage checks pointer-loaded keys, cold misses, colors, mutation, relocation and filter/LOD-only differences. An unsupported border sampler produces a shader fault, a drain diagnostic, no fallback and valid output after restoration. The parent supplies ownership and bounded diagnostics. Device image ABI 4 and cache format 76 are unchanged here; the source-version key still changes with the recompiler sources. Direct T# with runtime-only S#, new stages and wider divergence remain outside this change.

The combined-stack scan reports 64 other shared-line or export overlaps and 138 conflicting branches it could not compare. Reconcile shared changes as those PRs land.

Tested

Based on main 096c45570f plus #13928; merges cleanly with 9090972b7e. Windows 11 / MinGW-w64 GCC 15.2.0, Release with -DBUILD_TESTING=ON and SPIR-V Tools: 34 selected serializer, shader-cache, table, sampler, refusal and heap cases passed three times on NVIDIA RTX 3080 Laptop / 610.62 with validation 1.4.363; no VUIDs or skips. The runtime GPU poison case recorded the fault and recovered after restoring the valid sampler.

Ubuntu 24.04 WSL / Mesa 25.2.8 llvmpipe / LLVM 20.1.2, validation 1.4.363: 15 cases passed three times and 19 heap-dependent cases skipped; no VUIDs. Userfaultfd write protection was unavailable, so the same-texture sampler-refresh subcase did not run.

Not tested: native Linux descriptor-heap execution, macOS, full suite, live fragment/multiwave divergence, current titles/FPS, persistent-cache growth or windowed presentation. The 128-thread annotation coverage is structural only. The parent's title-scale cache-growth report remains unresolved.

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: #13928
  • Fixes: none
  • Unblocks: PPSA26344 #675
  • GPUs tested: NVIDIA RTX 3080 Laptop, 610.62, Windows 11; Mesa 25.2.8 llvmpipe / LLVM 20.1.2, Ubuntu 24.04 WSL
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5097738772 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13929). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-31T13:02:32Z. --- ### What Stacked on #13928; please review the runtime-address sampler changes and merge resolution. After ordinary sampler planning fails, admit a GPU-loaded S# address only when its image already has an admitted device-table column. Carry the four GPU-loaded words into the lookup and sample through its resolved slot. Existing stage, subgroup and all-consumer demotion rules remain; no CPU descriptor capture or new fallback is added. Coverage checks pointer-loaded keys, cold misses, colors, mutation, relocation and filter/LOD-only differences. An unsupported border sampler produces a shader fault, a drain diagnostic, no fallback and valid output after restoration. The parent supplies ownership and bounded diagnostics. Device image ABI 4 and cache format 76 are unchanged here; the source-version key still changes with the recompiler sources. Direct T# with runtime-only S#, new stages and wider divergence remain outside this change. The combined-stack scan reports 64 other shared-line or export overlaps and 138 conflicting branches it could not compare. Reconcile shared changes as those PRs land. ### Tested Based on `main` 096c45570f plus #13928; merges cleanly with 9090972b7e. Windows 11 / MinGW-w64 GCC 15.2.0, Release with `-DBUILD_TESTING=ON` and SPIR-V Tools: 34 selected serializer, shader-cache, table, sampler, refusal and heap cases passed three times on NVIDIA RTX 3080 Laptop / 610.62 with validation 1.4.363; no VUIDs or skips. The runtime GPU poison case recorded the fault and recovered after restoring the valid sampler. Ubuntu 24.04 WSL / Mesa 25.2.8 llvmpipe / LLVM 20.1.2, validation 1.4.363: 15 cases passed three times and 19 heap-dependent cases skipped; no VUIDs. Userfaultfd write protection was unavailable, so the same-texture sampler-refresh subcase did not run. Not tested: native Linux descriptor-heap execution, macOS, full suite, live fragment/multiwave divergence, current titles/FPS, persistent-cache growth or windowed presentation. The 128-thread annotation coverage is structural only. The parent's title-scale cache-growth report remains unresolved. ### 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: #13928 - [x] Fixes: none - [x] Unblocks: PPSA26344 #675 - [x] GPUs tested: NVIDIA RTX 3080 Laptop, 610.62, Windows 11; Mesa 25.2.8 llvmpipe / LLVM 20.1.2, Ubuntu 24.04 WSL - [x] AI-assisted: yes
MarcZX10 commented 2026-10-31 13:07:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T13:07:02Z.

Review: COMMENTED


Re-checked — final commit, stack review pending

I reviewed only the final commit 87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace on parent de14864edf9f6f626afd0b057f208c1942998aae, as the PR requests; this is not approval of the inherited stack.

What I ran

Reviewed the final-commit diff against its parent and refreshed the PR at head 87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace, base cd087bd12c258cf6dbb82e203bafd20d9fe2596c. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No local build or GPU test was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13929
gh api repos/boykopovar/AnyPS5/compare/de14864edf9f6f626afd0b057f208c1942998aae...87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace

Results

Check Result
Final-commit source review No specific blocker found in the added runtime-sampler planning and lookup path
Diff and conventions Passed
Dependency/merge preview The full stack check reports #7642 conflicts with current main; the target PR itself previews cleanly when applied alone
ABI and test-quality helpers Could not run from the isolated PR checkout because the helper scripts are absent there
GPU tests The author reports focused GPU-path runs; I did not reproduce them locally
Raw precheck output
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13929-87d9bdfdc053/report.md
/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13929-87d9bdfdc053/report.json
Conclusion: checks failed

The precheck report records the helper-script execution failures and the stack result. It does not identify a failing product test.

Sources

Not verified

I did not review the inherited changes from #10193 or #13928 in this focused pass, and did not run the GPU tests. #13928 has no recorded review yet; #10193 remains in changes-requested state and its author says the reported shader-cache growth is still unresolved. I therefore cannot approve the cumulative stack from this final-commit-only review.

To get this to a good state

Have the parent PRs reviewed and resolve the outstanding #10193 cache-growth finding; then request review again on the updated stack. I can reassess the exact new head and its dependency chain then.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5722824931 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13929#pullrequestreview-5722824931). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-31T13:07:02Z. **Review:** COMMENTED --- # Re-checked — final commit, stack review pending I reviewed only the final commit `87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace` on parent `de14864edf9f6f626afd0b057f208c1942998aae`, as the PR requests; this is not approval of the inherited stack. ## What I ran Reviewed the final-commit diff against its parent and refreshed the PR at head `87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace`, base `cd087bd12c258cf6dbb82e203bafd20d9fe2596c`. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No local build or GPU test was run. ```sh python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13929 gh api repos/boykopovar/AnyPS5/compare/de14864edf9f6f626afd0b057f208c1942998aae...87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace ``` ## Results | Check | Result | |---|---| | Final-commit source review | No specific blocker found in the added runtime-sampler planning and lookup path | | Diff and conventions | Passed | | Dependency/merge preview | The full stack check reports #7642 conflicts with current `main`; the target PR itself previews cleanly when applied alone | | ABI and test-quality helpers | Could not run from the isolated PR checkout because the helper scripts are absent there | | GPU tests | The author reports focused GPU-path runs; I did not reproduce them locally | <details><summary>Raw precheck output</summary> ```text /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13929-87d9bdfdc053/report.md /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13929-87d9bdfdc053/report.json Conclusion: checks failed ``` The precheck report records the helper-script execution failures and the stack result. It does not identify a failing product test. </details> ## Sources - [Final runtime-sampler commit](https://github.com/boykopovar/AnyPS5/commit/87d9bdfdc053813e2e561c5d2a3e0ddb3ae47ace). - [Parent sampler-table PR #13928](https://github.com/boykopovar/AnyPS5/pull/13928) and [upstream image-table PR #10193](https://github.com/boykopovar/AnyPS5/pull/10193). ## Not verified I did not review the inherited changes from #10193 or #13928 in this focused pass, and did not run the GPU tests. #13928 has no recorded review yet; #10193 remains in changes-requested state and its author says the reported shader-cache growth is still unresolved. I therefore cannot approve the cumulative stack from this final-commit-only review. ## To get this to a good state Have the parent PRs reviewed and resolve the outstanding #10193 cache-growth finding; then request review again on the updated stack. I can reassess the exact new head and its dependency chain then.
XairRrR commented 2026-11-02 21:28:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T21:28:15Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The runtime-address sampler planning in ResourceTracker.cpp is small and works on its own: the new shader test fails without it. But on a device without VK_EXT_descriptor_heap, the device-image sampler tests skip with a message tools/check_skips.py does not accept, so the Linux (lavapipe) CI job fails its skip check on this merge.

What I ran

Head 313aa2c8324621f9c1755ba90ffe2fa938baeddc, main 9090972b7e91fd266819cbd77a8b058e177b5682, merged with --no-ff (tree b78c672fe7c08e7db15d5100fd0bf5ea66e3aef8). Debian 13 VM, 2× Xeon Gold 6136, GCC 14.2.0, Release/Ninja, lavapipe (Mesa 26.1.6, LLVM 19). Lavapipe does not expose VK_EXT_descriptor_heap.

Per the description, I focused on the PR's own commit 39ed098b9a74 (ResourceTracker.cpp and the sampler tests) and on how the merge resolved. I did not review the inherited #9508, #10193 or #13928 code line by line.

git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...313aa2c8324621f9c1755ba90ffe2fa938baeddc
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
ctest --test-dir build -R "agc_driver_device_image_samplers|agc_driver_presentation_pass_gpu_heap|agc_driver_heap_draw_sample|agc_driver_device_image_path" --output-on-failure -j8 --test-load 32
ctest --test-dir build -R "agc_driver_device_image_samplers_runtime_address|agc_driver_heap_draw_sample_heap$|agc_driver_presentation_pass_gpu_heap|agc_driver_device_image_path_runtime_address" -V
ctest --test-dir build -R "agc_shader_device|agc_driver_device_image_samplers|agc_shader_table_trailer|agc_device_image_keys|agc_driver_device_image_table$|shader_disk_cache|request_serial" --output-on-failure -j8 --test-load 32
# negative control
git show 39ed098b9a74 -- core/shader/recompiler/Optimization/src/ResourceTracker.cpp | git apply -R
ninja -C build agc_shader_memory_tests agc_driver_device_image_samplers_tests
ctest --test-dir build -R "agc_shader_device_runtime_sampler_columns|agc_shader_device_runtime_address_columns|agc_shader_device_pointer_columns|agc_driver_device_image_samplers$" --output-on-failure
git show b78c672fe7c08e7db15d5100fd0bf5ea66e3aef8:core/shader/recompiler/Optimization/src/ResourceTracker.cpp > core/shader/recompiler/Optimization/src/ResourceTracker.cpp
ninja -C build agc_shader_memory_tests agc_driver_device_image_samplers_tests
git status --porcelain

Results

Check Result
git diff --check clean
check_conventions.py All conventions checks passed
Configure / build / libs (script) passed
Tests (script, 3752 ran) no new failures and no timeouts; the 9 known failures also fail on main
check_skips.py (script) failed: 9 new unexpected skips (8 agc_driver_device_image_samplers_*, plus agc_driver_presentation_pass_gpu_heap). The 10th, guest_net_ctl, also skips unexpectedly on main
Vulkan validation (script, 887 tests, layer loaded in 886, none missing) no new VUIDs. The heap/device-image path is not exercised on lavapipe
Focused shader and sampler tests 24 run: 16 passed, 8 heap-dependent skipped. Includes agc_shader_device_runtime_sampler_columns, agc_shader_device_runtime_address_columns, agc_shader_device_pointer_columns, agc_shader_device_image_tables, agc_shader_disk_cache, agc_device_image_keys, agc_driver_device_image_table and agc_driver_device_image_samplers
Negative control agc_shader_device_runtime_sampler_columns fails without the PR's hunk, passes with it
Skip lines on lavapipe
1545: [device-images] APS5_GPU_PATH stays off on this device: the device lacks VK_EXT_descriptor_heap, which the GPU heap the device image table takes its slots from needs
1545: skipped, descriptor heap features, limits or validation policy do not permit the device image path; see the device diagnostics
1542: skipped, the device lacks VK_EXT_descriptor_heap, which the GPU heap the device image path reads its tables through needs
1846: presentation source in host memory: skipped, the device offers no host memory type for the image
1846: skipped, the device lacks VK_EXT_descriptor_heap, or the maintenance5, slot room and push data the GPU heap needs with it, so the GPU heap has nothing to run through

check_skips.py accepts a skip only when every skipped, ... line matches DEVICE_LIMITATION (the device (has no|reports|lacks|does not|...)). The agc_driver_device_image_path_* and agc_driver_heap_draw_sample_*_heap skips pass this check. The sampler test's line, and the presentation test's "the device offers no host memory type" line, do not.

Negative control

The PR's production change is the PlanRuntimeAddressColumn hunk in core/shader/recompiler/Optimization/src/ResourceTracker.cpp. Restoring that file from main would also drop the whole stack below it, so instead I reverse-applied only commit 39ed098b9a74's hunk and rebuilt.

  • agc_shader_device_runtime_sampler_columns then fails: GetSamplerResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000044(GetAddressResource(ReadFirstLane(...LoadBufferU32x2...))).
  • The image-only runtime-address and pointer column tests still pass, as expected.

I then restored the merged file, rebuilt, and the test passed again. git status --porcelain is empty.

The GPU-side runtime cases (_runtime_address, _runtime_filter, _runtime_lod_bias, _runtime_poison) skip on lavapipe, so I could not run them before and after the change.

Findings

Blocking

  • Device-image sampler tests skip with a reason the CI skip check rejects. core/libs/prx/libSceAgcDriver/tests/execution/DeviceImageSamplers.cpp:584 prints skipped, descriptor heap features, limits or validation policy do not permit the device image path; ... and line 588 prints skipped, runtime sampler addresses require the enabled and supported device image path. Neither matches DEVICE_LIMITATION in tools/check_skips.py.
    • .github/workflows/build.yml runs check_skips.py after ctest on Linux and Windows. On lavapipe, which has no VK_EXT_descriptor_heap, the four runtime registrations this PR adds and the four _gpu_path/_poison_gpu_path ones from #13928 are flagged. The merged main would fail that step.
    • Suggested fix: name the missing capability the way the sibling tests do, for example DeviceImagePath.cpp:399: skipped, the device lacks VK_EXT_descriptor_heap, which the GPU heap the device image path reads its tables through needs. Then rerun python3 tools/check_skips.py build/ctest.xml on a device without the heap.

Non-blocking

  • agc_driver_presentation_pass_gpu_heap is flagged by the same check. It is inherited from #9508, not from this PR's commits. Its heap skip line matches, but the earlier subcase line presentation source in host memory: skipped, the device offers no host memory type for the image (core/libs/prx/libSceAgcDriver/tests/PresentationPass.cpp) does not, so the whole skip counts as unexpected. The fix belongs in #9508: either word the line as the device has no host memory type ..., or stop printing skipped, for a subcase when the test as a whole skips.
  • Earlier review requests from oneandonlydean.
    • Request 3 (filter- and LOD-bias-only runtime keys) is addressed by _runtime_filter and _runtime_lod_bias.
    • Request 1 (poison for GPU-loaded S#) is covered by _runtime_poison, and documented under "Device image table samplers" in docs/dev/debt/libSceAgcDriver.md. The entry also states the 64-key rejection bound that request 2 asked about.
    • I could not run any of these on this machine (all skip), so I am relying on the author's NVIDIA runs.

Not verified

  • The GPU-side runtime-address sampler path: lookup, cold miss, settled colours, mutation, relocation, poison and recovery. Every such test skips on lavapipe, so the validation-layer comparison does not cover it either.
  • The inherited #9508, #10193 and #13928 code, beyond what the build, test and validation runs above cover. The cache-growth finding on #10193 that the author mentions is still open.
  • Windows/MinGW and other vendors' drivers.

To get this to a good state

  1. Change the skip messages at DeviceImageSamplers.cpp:584 and :588, either in this PR or in #13928 where the first one comes from, to a wording check_skips.py accepts. Then confirm check_skips.py passes on a lavapipe or no-heap run.
  2. Coordinate the agc_driver_presentation_pass_gpu_heap subcase wording with #9508.
  3. Ask for a rerun of the four _runtime_* sampler tests on a driver with VK_EXT_descriptor_heap, with validation, at the new head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5743606052 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13929#pullrequestreview-5743606052). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T21:28:15Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The runtime-address sampler planning in `ResourceTracker.cpp` is small and works on its own: the new shader test fails without it. But on a device without `VK_EXT_descriptor_heap`, the device-image sampler tests skip with a message `tools/check_skips.py` does not accept, so the Linux (lavapipe) CI job fails its skip check on this merge. ## What I ran Head `313aa2c8324621f9c1755ba90ffe2fa938baeddc`, `main` `9090972b7e91fd266819cbd77a8b058e177b5682`, merged with `--no-ff` (tree `b78c672fe7c08e7db15d5100fd0bf5ea66e3aef8`). Debian 13 VM, 2× Xeon Gold 6136, GCC 14.2.0, Release/Ninja, lavapipe (Mesa 26.1.6, LLVM 19). Lavapipe does not expose `VK_EXT_descriptor_heap`. Per the description, I focused on the PR's own commit `39ed098b9a74` (`ResourceTracker.cpp` and the sampler tests) and on how the merge resolved. I did not review the inherited #9508, #10193 or #13928 code line by line. ``` git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...313aa2c8324621f9c1755ba90ffe2fa938baeddc python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682 ctest --test-dir build -R "agc_driver_device_image_samplers|agc_driver_presentation_pass_gpu_heap|agc_driver_heap_draw_sample|agc_driver_device_image_path" --output-on-failure -j8 --test-load 32 ctest --test-dir build -R "agc_driver_device_image_samplers_runtime_address|agc_driver_heap_draw_sample_heap$|agc_driver_presentation_pass_gpu_heap|agc_driver_device_image_path_runtime_address" -V ctest --test-dir build -R "agc_shader_device|agc_driver_device_image_samplers|agc_shader_table_trailer|agc_device_image_keys|agc_driver_device_image_table$|shader_disk_cache|request_serial" --output-on-failure -j8 --test-load 32 # negative control git show 39ed098b9a74 -- core/shader/recompiler/Optimization/src/ResourceTracker.cpp | git apply -R ninja -C build agc_shader_memory_tests agc_driver_device_image_samplers_tests ctest --test-dir build -R "agc_shader_device_runtime_sampler_columns|agc_shader_device_runtime_address_columns|agc_shader_device_pointer_columns|agc_driver_device_image_samplers$" --output-on-failure git show b78c672fe7c08e7db15d5100fd0bf5ea66e3aef8:core/shader/recompiler/Optimization/src/ResourceTracker.cpp > core/shader/recompiler/Optimization/src/ResourceTracker.cpp ninja -C build agc_shader_memory_tests agc_driver_device_image_samplers_tests git status --porcelain ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | All conventions checks passed | | Configure / build / libs (script) | passed | | Tests (script, 3752 ran) | no new failures and no timeouts; the 9 known failures also fail on `main` | | `check_skips.py` (script) | **failed**: 9 new unexpected skips (8 `agc_driver_device_image_samplers_*`, plus `agc_driver_presentation_pass_gpu_heap`). The 10th, `guest_net_ctl`, also skips unexpectedly on `main` | | Vulkan validation (script, 887 tests, layer loaded in 886, none missing) | no new VUIDs. The heap/device-image path is not exercised on lavapipe | | Focused shader and sampler tests | 24 run: 16 passed, 8 heap-dependent skipped. Includes `agc_shader_device_runtime_sampler_columns`, `agc_shader_device_runtime_address_columns`, `agc_shader_device_pointer_columns`, `agc_shader_device_image_tables`, `agc_shader_disk_cache`, `agc_device_image_keys`, `agc_driver_device_image_table` and `agc_driver_device_image_samplers` | | Negative control | `agc_shader_device_runtime_sampler_columns` fails without the PR's hunk, passes with it | <details><summary>Skip lines on lavapipe</summary> ``` 1545: [device-images] APS5_GPU_PATH stays off on this device: the device lacks VK_EXT_descriptor_heap, which the GPU heap the device image table takes its slots from needs 1545: skipped, descriptor heap features, limits or validation policy do not permit the device image path; see the device diagnostics 1542: skipped, the device lacks VK_EXT_descriptor_heap, which the GPU heap the device image path reads its tables through needs 1846: presentation source in host memory: skipped, the device offers no host memory type for the image 1846: skipped, the device lacks VK_EXT_descriptor_heap, or the maintenance5, slot room and push data the GPU heap needs with it, so the GPU heap has nothing to run through ``` `check_skips.py` accepts a skip only when every `skipped, ...` line matches `DEVICE_LIMITATION` (`the device (has no|reports|lacks|does not|...)`). The `agc_driver_device_image_path_*` and `agc_driver_heap_draw_sample_*_heap` skips pass this check. The sampler test's line, and the presentation test's "the device offers no host memory type" line, do not. </details> ## Negative control The PR's production change is the `PlanRuntimeAddressColumn` hunk in `core/shader/recompiler/Optimization/src/ResourceTracker.cpp`. Restoring that file from `main` would also drop the whole stack below it, so instead I reverse-applied only commit `39ed098b9a74`'s hunk and rebuilt. - `agc_shader_device_runtime_sampler_columns` then fails: `GetSamplerResource dword 0 is not a valid runtime value; chain: LoadAddressU32@pc=0x00000044(GetAddressResource(ReadFirstLane(...LoadBufferU32x2...)))`. - The image-only runtime-address and pointer column tests still pass, as expected. I then restored the merged file, rebuilt, and the test passed again. `git status --porcelain` is empty. The GPU-side runtime cases (`_runtime_address`, `_runtime_filter`, `_runtime_lod_bias`, `_runtime_poison`) skip on lavapipe, so I could not run them before and after the change. ## Findings ### Blocking - **Device-image sampler tests skip with a reason the CI skip check rejects.** `core/libs/prx/libSceAgcDriver/tests/execution/DeviceImageSamplers.cpp:584` prints `skipped, descriptor heap features, limits or validation policy do not permit the device image path; ...` and line 588 prints `skipped, runtime sampler addresses require the enabled and supported device image path`. Neither matches `DEVICE_LIMITATION` in `tools/check_skips.py`. - `.github/workflows/build.yml` runs `check_skips.py` after ctest on Linux and Windows. On lavapipe, which has no `VK_EXT_descriptor_heap`, the four runtime registrations this PR adds and the four `_gpu_path`/`_poison_gpu_path` ones from #13928 are flagged. The merged `main` would fail that step. - Suggested fix: name the missing capability the way the sibling tests do, for example `DeviceImagePath.cpp:399`: `skipped, the device lacks VK_EXT_descriptor_heap, which the GPU heap the device image path reads its tables through needs`. Then rerun `python3 tools/check_skips.py build/ctest.xml` on a device without the heap. ### Non-blocking - **`agc_driver_presentation_pass_gpu_heap` is flagged by the same check.** It is inherited from #9508, not from this PR's commits. Its heap skip line matches, but the earlier subcase line `presentation source in host memory: skipped, the device offers no host memory type for the image` (`core/libs/prx/libSceAgcDriver/tests/PresentationPass.cpp`) does not, so the whole skip counts as unexpected. The fix belongs in #9508: either word the line as `the device has no host memory type ...`, or stop printing `skipped,` for a subcase when the test as a whole skips. - **Earlier review requests from oneandonlydean.** - Request 3 (filter- and LOD-bias-only runtime keys) is addressed by `_runtime_filter` and `_runtime_lod_bias`. - Request 1 (poison for GPU-loaded S#) is covered by `_runtime_poison`, and documented under "Device image table samplers" in `docs/dev/debt/libSceAgcDriver.md`. The entry also states the 64-key rejection bound that request 2 asked about. - I could not run any of these on this machine (all skip), so I am relying on the author's NVIDIA runs. ## Not verified - The GPU-side runtime-address sampler path: lookup, cold miss, settled colours, mutation, relocation, poison and recovery. Every such test skips on lavapipe, so the validation-layer comparison does not cover it either. - The inherited #9508, #10193 and #13928 code, beyond what the build, test and validation runs above cover. The cache-growth finding on #10193 that the author mentions is still open. - Windows/MinGW and other vendors' drivers. ## To get this to a good state 1. Change the skip messages at `DeviceImageSamplers.cpp:584` and `:588`, either in this PR or in #13928 where the first one comes from, to a wording `check_skips.py` accepts. Then confirm `check_skips.py` passes on a lavapipe or no-heap run. 2. Coordinate the `agc_driver_presentation_pass_gpu_heap` subcase wording with #9508. 3. Ask for a rerun of the four `_runtime_*` sampler tests on a driver with `VK_EXT_descriptor_heap`, with validation, at the new head. <!-- anyps5-bots job=2477 head=313aa2c8324621f9c1755ba90ffe2fa938baeddc -->
MarcZX10 commented 2026-11-20 06:40:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T06:40:52Z.

Review: COMMENTED


Reviewed — comments

This review covers head 313aa2c8324621f9c1755ba90ffe2fa938baeddc; the change is extensive and many changed files were not fully inspectable within this review, so a formal merge decision is not justified.

What I ran

No tests or build commands were run. I read the PR description, commit list, manifest, and targeted diff sections, then inspected selected changed source files at the pinned head.

Results

Check Result Note
Targeted source review not run Partial inspection only
Build and tests not run No commands executed

Findings

Blocking

None verified.

Non-blocking

None.

Not verified

The changed set is very large. I did not read every file listed in the manifest, including the non-text Vulkan-Headers submodule and files excluded from the prepared bundle for size; the claims about those files and the overall behavior are not verified. The author-reported Windows and WSL test runs were not independently run.

Files read: review/description.md, review/commits.md, review/manifest.json, relevant sections of review/diff.patch, core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/HeapStages.cpp, core/libs/prx/libSceAgcDriver/Graphics/src/DeviceImageTable.cpp, and core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp. The manifest and file listing contain many additional changed files that were not read; exclusions are noted in review/manifest.json and the file listing.

To get this to a good state

Nothing is required. The review is incomplete, so no approval is given.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5988550834 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13929#pullrequestreview-5988550834). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T06:40:52Z. **Review:** COMMENTED --- # Reviewed — comments This review covers head `313aa2c8324621f9c1755ba90ffe2fa938baeddc`; the change is extensive and many changed files were not fully inspectable within this review, so a formal merge decision is not justified. ## What I ran No tests or build commands were run. I read the PR description, commit list, manifest, and targeted diff sections, then inspected selected changed source files at the pinned head. ## Results | Check | Result | Note | |---|---|---| | Targeted source review | not run | Partial inspection only | | Build and tests | not run | No commands executed | ## Findings ### Blocking None verified. ### Non-blocking None. ## Not verified The changed set is very large. I did not read every file listed in the manifest, including the non-text Vulkan-Headers submodule and files excluded from the prepared bundle for size; the claims about those files and the overall behavior are not verified. The author-reported Windows and WSL test runs were not independently run. Files read: `review/description.md`, `review/commits.md`, `review/manifest.json`, relevant sections of `review/diff.patch`, `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/HeapStages.cpp`, `core/libs/prx/libSceAgcDriver/Graphics/src/DeviceImageTable.cpp`, and `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`. The manifest and file listing contain many additional changed files that were not read; exclusions are noted in `review/manifest.json` and the file listing. ## To get this to a good state Nothing is required. The review is incomplete, so no approval is given.
ligmaSec commented 2026-12-03 22:49:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:49:59Z.

Review: COMMENTED


I verified that the exact head contains current #13928. The trial merge onto c1601e56d5 conflicts throughout the device image-key stack. For this PR’s own delta, please retain the runtime sampler-pointer case that mutates the four words between uses and independently checks a cold miss. Also keep the mixed-consumer refusal, so resolving one GPU consumer cannot silently replace the others’ planning. The core stack needs to merge before a paired run.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6180013255 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13929#pullrequestreview-6180013255). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:49:59Z. **Review:** COMMENTED --- I verified that the exact head contains current #13928. The trial merge onto `c1601e56d5` conflicts throughout the device image-key stack. For this PR’s own delta, please retain the runtime sampler-pointer case that mutates the four words between uses and independently checks a cold miss. Also keep the mixed-consumer refusal, so resolving one GPU consumer cannot silently replace the others’ planning. The core stack needs to merge before a paired run. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/13929:upstream-pr/13929'
git switch 'upstream-pr/13929'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/13929'
git switch 'upstream-pr/13929'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/13929'
git switch 'upstream-pr/13929'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/13929'
git switch 'main'
git merge --squash 'upstream-pr/13929'
git switch 'main'
git merge --ff-only 'upstream-pr/13929'
git switch 'main'
git merge 'upstream-pr/13929'
git push origin 'main'
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!13929
No description provided.