fix(shader): read a 2D MSAA T# through image_sample_a as its sample 0 #12561

Merged
milescoviello merged 3 commits from upstream-pr/12561 into main 2026-10-30 09:56:13 +00:00
milescoviello commented 2026-10-28 20:18:56 +00:00 (Migrated from github.com)

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


What

Ghost of Tsushima Director's Cut (PPSA02225 02.024.000) stops in its opening, 10 to 14 minutes into a run (606, 744 and 806 s in three runs here):

AGC graphics: shader 0x20054f4e00 stage 5: image descriptor is incompatible with the static runtime image interface: descriptor format 22 decodes to {class 1, dim 6, ...}; modes: {class 1, dim 3, ...} ...; T# 1544ed00 c1600000 021bc1df e1810924 00000000 00700010 00000000 00000000

The pixel shader samples a two-sample 32-bit float T# (the 1920x2160 checkerboard depth at 0x1544ed0000) through a DIM 2D image_sample_a: the MIMG word 0xf0800109 with OPM set, which the decoder reads as image_sample with RdnaImageSampleFlagAdjust. thuanquang's 0a3ea213e1 already reads a DIM 2D sample of a 2D MSAA T# as its sample 0, but only for an image whose accesses ResourceTracker::Merge marks cubeFaceCompatible, and that check compares the whole sample flags against 0, LevelZero and Lod. The adjust bit fails it, so no 2D mode reads the T# and the draw throws.

How

Merge leaves RdnaImageSampleFlagAdjust out of the flags its plain-sample check compares. An _a form only changes how the tracker reads dword 3 of the S# (canonicalizeSampleAdjustDword3), not the image address, so image_sample_a now takes the same sample-0 path as image_sample. That check also feeds the cube-face mode and the 2D-array-through-3D mode, which nothing has measured with _a. So ResourceTracker now sets adjustedSample on an image when any of its samples has the adjust bit, and RuntimeImageModes leaves both of those modes out for such an image: an image_sample_a there still throws, as on main. adjustedSample is a new ImageResource field, so the shader disk cache format goes from 49 to 50.

The docs/dev/debt/shader.md entry for this read names image_sample_a and says that the gfx1031 measurement behind it has no _a read.

Tested

Linux (Ubuntu 26.04.1, GCC 15.2), RTX 4070 Ti (NVIDIA 615.71.09), on main 319621ba2e:

  • At this head (f27177dd9b), which keeps _a out of the cube-face and 2D-array-through-3D modes:
    • Three new cases in agc_shader_memory:
      • A 2D image_sample_a of the two-sample T# still selects the 2D mode.
      • An _a read of a cube T# is refused. The same read without _a selects a cube-face mode.
      • A 2D-array image_sample_a of a 3D T# is refused.
    • ^agc_shader_|^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$ (42 tests, agc_shader_memory among them) pass 3 of 3.
    • The validation-layer command under Earlier heads, main 319621ba2e vs f27177dd9b, one run each:
      • 3 of 3 pass on each side, with no missing-layer message.
      • There are no VUID- messages on either side.
      • Each side created 2 Vulkan devices.
    • Merged with main dc38224141 (merge 696f0dd9fd, clean): ^agc_shader|^shader_|^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$ (54 tests) pass 3 of 3.
  • Earlier heads:
    • New case in agc_driver_sample_multisample_target: the plane read of the two-sample target through image_sample_a (the existing case's MIMG word with OPM set) must return sample 0, like the existing image_sample_lz read. The test alone on main (61b0579a3b) fails with image descriptor is incompatible with the static runtime image interface: descriptor format 71 decodes to {class 1, dim 6, ...}. At 1273808212 it passes.
    • Area: ^agc_shader|^shader_|^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$ (53 tests) pass 3 of 3.
    • Validation layer (Khronos VK_LAYER_KHRONOS_validation 1.4.363 from the LunarG SDK, same RTX 4070 Ti), on main 319621ba2e and at 1273808212:
      VK_LAYER_PATH=<sdk>/layers VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -R '^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$' -V
      • Both pass 3 of 3, and neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.
      • Neither log has a VUID- message (0 on main, 0 at 1273808212).
      • The layer checked two devices on each side: agc_driver_sample_multisample_target, including the new image_sample_a read, and agc_driver_native_fmask. agc_multisample_guest_access creates no Vulkan device.
    • GoT's draw, offline: agc_shader_replay --materialize of the request GoT dumped at the stop (shader 0x20054f4e00). On main 319621ba2e the capture fails with the title's error (descriptor format 22 decodes to {class 1, dim 6, ...}), 2 of 2. At 1273808212 it materializes 13,180 SPIR-V words, 2 of 2.
    • Ghost of Tsushima (PPSA02225 02.024.000), pad input. The build was a local stack with this change plus #8365, #8212, a separate stencil fix and env-gated diagnostics.
      • Without this change, three runs stopped at 606, 744 and 806 s with the error above.
      • With it, a 910 s run with cold caches and a 728 s run both ran to their timeouts with no stop.
      • One later run, with an unrelated local experiment on top, stopped at 539 s on reading sample 0 of a multisampled depth surface through a 2D image is not implemented. That is the same kind of read, made when a native multisample depth surface lives at the T#'s address. This PR doesn't cover that case; #12612 does.

Windows 11 VM (GeForce GT 1030, WinLibs GCC 15.2, Release): agc_driver_sample_multisample_target, agc_driver_native_fmask and agc_multisample_guest_access pass 3 of 3 at 1273808212 and on main 319621ba2e. At f27177dd9b, with agc_shader_memory added, all 4 pass 3 of 3, and on its base 319621ba2e too.

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: PPSA02225 #4461 (Ghost of Tsushima, past this stop in its opening)
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti (Linux)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5057098926 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-28T20:18:56Z. --- ### What Ghost of Tsushima Director's Cut (PPSA02225 02.024.000) stops in its opening, 10 to 14 minutes into a run (606, 744 and 806 s in three runs here): ``` AGC graphics: shader 0x20054f4e00 stage 5: image descriptor is incompatible with the static runtime image interface: descriptor format 22 decodes to {class 1, dim 6, ...}; modes: {class 1, dim 3, ...} ...; T# 1544ed00 c1600000 021bc1df e1810924 00000000 00700010 00000000 00000000 ``` The pixel shader samples a two-sample 32-bit float T# (the 1920x2160 checkerboard depth at 0x1544ed0000) through a DIM 2D `image_sample_a`: the MIMG word `0xf0800109` with OPM set, which the decoder reads as `image_sample` with `RdnaImageSampleFlagAdjust`. thuanquang's 0a3ea213e1 already reads a DIM 2D sample of a 2D MSAA T# as its sample 0, but only for an image whose accesses `ResourceTracker::Merge` marks `cubeFaceCompatible`, and that check compares the whole sample flags against 0, `LevelZero` and `Lod`. The adjust bit fails it, so no 2D mode reads the T# and the draw throws. ### How `Merge` leaves `RdnaImageSampleFlagAdjust` out of the flags its plain-sample check compares. An `_a` form only changes how the tracker reads dword 3 of the S# (`canonicalizeSampleAdjustDword3`), not the image address, so `image_sample_a` now takes the same sample-0 path as `image_sample`. That check also feeds the cube-face mode and the 2D-array-through-3D mode, which nothing has measured with `_a`. So `ResourceTracker` now sets `adjustedSample` on an image when any of its samples has the adjust bit, and `RuntimeImageModes` leaves both of those modes out for such an image: an `image_sample_a` there still throws, as on `main`. `adjustedSample` is a new `ImageResource` field, so the shader disk cache format goes from 49 to 50. The `docs/dev/debt/shader.md` entry for this read names `image_sample_a` and says that the gfx1031 measurement behind it has no `_a` read. ### Tested Linux (Ubuntu 26.04.1, GCC 15.2), RTX 4070 Ti (NVIDIA 615.71.09), on `main` `319621ba2e`: - **At this head (`f27177dd9b`)**, which keeps `_a` out of the cube-face and 2D-array-through-3D modes: - Three new cases in `agc_shader_memory`: - A 2D `image_sample_a` of the two-sample T# still selects the 2D mode. - An `_a` read of a cube T# is refused. The same read without `_a` selects a cube-face mode. - A 2D-array `image_sample_a` of a 3D T# is refused. - `^agc_shader_|^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$` (42 tests, `agc_shader_memory` among them) pass 3 of 3. - The validation-layer command under Earlier heads, `main` `319621ba2e` vs `f27177dd9b`, one run each: - 3 of 3 pass on each side, with no missing-layer message. - There are no `VUID-` messages on either side. - Each side created 2 Vulkan devices. - **Merged with `main` `dc38224141`** (merge `696f0dd9fd`, clean): `^agc_shader|^shader_|^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$` (54 tests) pass 3 of 3. - **Earlier heads:** - **New case in `agc_driver_sample_multisample_target`:** the plane read of the two-sample target through `image_sample_a` (the existing case's MIMG word with OPM set) must return sample 0, like the existing `image_sample_lz` read. The test alone on `main` (`61b0579a3b`) fails with `image descriptor is incompatible with the static runtime image interface: descriptor format 71 decodes to {class 1, dim 6, ...}`. At `1273808212` it passes. - **Area:** `^agc_shader|^shader_|^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$` (53 tests) pass 3 of 3. - **Validation layer** (Khronos `VK_LAYER_KHRONOS_validation` 1.4.363 from the LunarG SDK, same RTX 4070 Ti), on `main` `319621ba2e` and at `1273808212`: `VK_LAYER_PATH=<sdk>/layers VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest -R '^agc_driver_sample_multisample_target$|^agc_driver_native_fmask$|^agc_multisample_guest_access$' -V` - Both pass 3 of 3, and neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. - Neither log has a `VUID-` message (0 on `main`, 0 at `1273808212`). - The layer checked two devices on each side: `agc_driver_sample_multisample_target`, including the new `image_sample_a` read, and `agc_driver_native_fmask`. `agc_multisample_guest_access` creates no Vulkan device. - **GoT's draw, offline:** `agc_shader_replay --materialize` of the request GoT dumped at the stop (shader `0x20054f4e00`). On `main` `319621ba2e` the capture fails with the title's error (`descriptor format 22 decodes to {class 1, dim 6, ...}`), 2 of 2. At `1273808212` it materializes 13,180 SPIR-V words, 2 of 2. - **Ghost of Tsushima (PPSA02225 02.024.000)**, pad input. The build was a local stack with this change plus #8365, #8212, a separate stencil fix and env-gated diagnostics. - Without this change, three runs stopped at 606, 744 and 806 s with the error above. - With it, a 910 s run with cold caches and a 728 s run both ran to their timeouts with no stop. - One later run, with an unrelated local experiment on top, stopped at 539 s on `reading sample 0 of a multisampled depth surface through a 2D image is not implemented`. That is the same kind of read, made when a native multisample depth surface lives at the T#'s address. This PR doesn't cover that case; #12612 does. Windows 11 VM (GeForce GT 1030, WinLibs GCC 15.2, Release): `agc_driver_sample_multisample_target`, `agc_driver_native_fmask` and `agc_multisample_guest_access` pass 3 of 3 at `1273808212` and on `main` `319621ba2e`. At `f27177dd9b`, with `agc_shader_memory` added, all 4 pass 3 of 3, and on its base `319621ba2e` too. ### 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 - [x] Fixes: none - [x] Unblocks: PPSA02225 #4461 (Ghost of Tsushima, past this stop in its opening) - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti (Linux) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-28 20:35:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T20:35:43Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The source change looks narrowly scoped, but the PR does not report the Vulkan-validation runs required for shader-recompiler changes, so I cannot verify the asserted GPU behavior under the repository's test conditions.

What I ran

  • Reviewed PR head 1273808212c8407ee030e164df7517f6aa896d5e against base 319621ba2e578bd053b0baba2877fe70520e0737.
  • Linux x86_64 host: Matrox MGA G200eW; this environment does not provide a suitable Vulkan GPU for the required run.
  • git diff --check upstream/main...refs/review/pr-12561-current — passed.
  • git merge-tree --write-tree upstream/main refs/review/pr-12561-current — clean, tree 9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5.
  • Read the changed ResourceTracker flag predicate and the new image_sample_a test. I did not run the GPU tests locally.

Results

Check Result
Current-main merge preview Clean
Diff check Passed
Source review No code defect found in the reviewed predicate
Hosted Ubuntu/Windows relinker and ASan Passed
Hosted Windows job Passed
Hosted macOS relinker jobs Queued at last refresh
Required same-GPU Vulkan-validation CTest evidence Not present in the PR description
Local GPU test Not run; no suitable GPU in this environment
Merge and diff-check output
9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5

git diff --check produced no output.

Negative control

Not run locally. The PR reports a base failure for the new image_sample_a case and success on the head, but I did not independently rerun that GPU control.

Findings

Blocking

  • The contribution rules require shader-recompiler changes to run the same focused CTest selection on main and the PR with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1, then confirm the requested layer was found and the change adds no VUID- errors. The PR describes several GPU results and lists hardware, but does not record these required run settings or the validation-log comparison. Please add the exact ctest -V commands and relevant outputs for base and head, including the requested-layer and VUID checks. I have not found a code correctness blocker in the changed predicate itself.

Non-blocking

The current-main merge preview is clean, and the hosted build/policy checks that ran have passed. The report's Windows and title runs are author-provided evidence; I did not reproduce them.

Sources

Not verified

I did not run the focused CTest selection, Vulkan Validation, console behavior, or a full project build. The host has no supported GPU for this test.

To get this to a good state

Attach the same-machine, same-GPU base/head validation runs and confirm the layer-load message is absent and no new VUID- errors appear. I can then recheck the exact head and supplied outputs.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5689342823 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5689342823). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T20:35:43Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The source change looks narrowly scoped, but the PR does not report the Vulkan-validation runs required for shader-recompiler changes, so I cannot verify the asserted GPU behavior under the repository's test conditions. ## What I ran - Reviewed PR head `1273808212c8407ee030e164df7517f6aa896d5e` against base `319621ba2e578bd053b0baba2877fe70520e0737`. - Linux x86_64 host: Matrox MGA G200eW; this environment does not provide a suitable Vulkan GPU for the required run. - `git diff --check upstream/main...refs/review/pr-12561-current` — passed. - `git merge-tree --write-tree upstream/main refs/review/pr-12561-current` — clean, tree `9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5`. - Read the changed `ResourceTracker` flag predicate and the new `image_sample_a` test. I did not run the GPU tests locally. ## Results | Check | Result | |---|---| | Current-main merge preview | Clean | | Diff check | Passed | | Source review | No code defect found in the reviewed predicate | | Hosted Ubuntu/Windows relinker and ASan | Passed | | Hosted Windows job | Passed | | Hosted macOS relinker jobs | Queued at last refresh | | Required same-GPU Vulkan-validation CTest evidence | Not present in the PR description | | Local GPU test | Not run; no suitable GPU in this environment | <details> <summary>Merge and diff-check output</summary> ```text 9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5 ``` `git diff --check` produced no output. </details> ## Negative control Not run locally. The PR reports a base failure for the new `image_sample_a` case and success on the head, but I did not independently rerun that GPU control. ## Findings ### Blocking - The contribution rules require shader-recompiler changes to run the same focused CTest selection on `main` and the PR with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, and `ANYPS5_REQUIRE_VULKAN=1`, then confirm the requested layer was found and the change adds no `VUID-` errors. The PR describes several GPU results and lists hardware, but does not record these required run settings or the validation-log comparison. Please add the exact `ctest -V` commands and relevant outputs for base and head, including the requested-layer and VUID checks. I have not found a code correctness blocker in the changed predicate itself. ### Non-blocking The current-main merge preview is clean, and the hosted build/policy checks that ran have passed. The report's Windows and title runs are author-provided evidence; I did not reproduce them. ## Sources - [Repository's required shader-recompiler test conditions at the pinned base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/CONTRIBUTING.md#L68-L71) - [Changed sampler-flag compatibility predicate at this PR head](https://github.com/boykopovar/AnyPS5/blob/1273808212c8407ee030e164df7517f6aa896d5e/core/shader/recompiler/Optimization/src/ResourceTracker.cpp#L2194-L2202) - [New `image_sample_a` test invocation at this PR head](https://github.com/boykopovar/AnyPS5/blob/1273808212c8407ee030e164df7517f6aa896d5e/core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp#L1018-L1023) ## Not verified I did not run the focused CTest selection, Vulkan Validation, console behavior, or a full project build. The host has no supported GPU for this test. ## To get this to a good state Attach the same-machine, same-GPU base/head validation runs and confirm the layer-load message is absent and no new `VUID-` errors appear. I can then recheck the exact head and supplied outputs.
adriadam10 commented 2026-10-28 20:54:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T20:54:40Z.

Review: CHANGES_REQUESTED


The change reads correctly: ignoring RdnaImageSampleFlagAdjust in the cubeFaceSample check (ResourceTracker.cpp:2197) makes image_sample_a take the same sample-0 path as image_sample, and the new AdjustedPlaneCode case in SampleMultisampleTarget.cpp pins it. One thing is missing before it can merge:

  • The shader recompiler rules in AGENTS.md require the focused tests on main and on this head with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (ctest --test-dir build -R <pattern> -V, same machine and GPU). Please add the commands, confirm neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS, and confirm the head adds no new VUID- errors. Use agc_driver_sample_multisample_target, agc_driver_native_fmask and agc_multisample_guest_access. You said in your reply to @MarcZX10 that this is queued.

Not blocking, but note it in the description: the change also gives image_sample_a the cube-face and volume-array modes, which the gfx1031 measurement doesn't cover. The debt entry already says so for the 2D read.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5689566041 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5689566041). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-28T20:54:40Z. **Review:** CHANGES_REQUESTED --- The change reads correctly: ignoring `RdnaImageSampleFlagAdjust` in the `cubeFaceSample` check (`ResourceTracker.cpp:2197`) makes `image_sample_a` take the same sample-0 path as `image_sample`, and the new `AdjustedPlaneCode` case in `SampleMultisampleTarget.cpp` pins it. One thing is missing before it can merge: - The shader recompiler rules in AGENTS.md require the focused tests on `main` and on this head with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (`ctest --test-dir build -R <pattern> -V`, same machine and GPU). Please add the commands, confirm neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`, and confirm the head adds no new `VUID-` errors. Use `agc_driver_sample_multisample_target`, `agc_driver_native_fmask` and `agc_multisample_guest_access`. You said in your reply to @MarcZX10 that this is queued. Not blocking, but note it in the description: the change also gives `image_sample_a` the cube-face and volume-array modes, which the gfx1031 measurement doesn't cover. The debt entry already says so for the 2D read.
MarcZX10 commented 2026-10-28 21:14:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T21:14:08Z.

Review: APPROVED


Re-checked — new head, looks good

The missing same-GPU Vulkan-validation evidence is now reported for both main and this head, and the focused code change and tests are consistent with the stated sample-0 behavior.

What I ran

  • Reviewed PR head 1273808212c8407ee030e164df7517f6aa896d5e against base 319621ba2e578bd053b0baba2877fe70520e0737; merge preview clean (9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5).
  • Environment: Linux x86_64; this host has no suitable Vulkan GPU for the required hardware run.
  • Commands:
git diff --check upstream/main...refs/review/pr-12561-current
git merge-tree --write-tree upstream/main refs/review/pr-12561-current

Results

Check Result
Diff check Passed
Merge preview onto current main Clean
Author-reported Linux RTX 4070 Ti tests 53 focused tests passed 3/3; required validation runs passed 3/3 on base and head, no missing-layer message or VUID- messages
Author-reported GoT offline replay Base capture failed at the reported descriptor error; head materialized the request 2/2
Author-reported title runs Three base runs stopped at the reported error; two head runs reached timeout without that stop; one later unrelated experiment exposed a separate unsupported read, disclosed in the PR
Hosted Ubuntu/Windows relinker, ASan, Windows jobs Passed
Hosted macOS relinker jobs Queued
Hosted Linux product and specialized jobs Skipped
Local GPU tests Not run; no suitable GPU on this host
Commands and output from this review
diff_check_exit=0
9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5
merge_tree_exit=0

Negative control

Assertion Change used Result
The new image_sample_a path accepts the two-sample target as sample 0 Author reports the new test on main without this PR Failed with the descriptor incompatibility error; on this head the test passed

I did not run this negative control locally; the result is reported in the PR's test evidence.

Findings

Blocking

None found in the reviewed change.

Non-blocking

  • The validation, focused GPU, offline replay, and title results are author-reported and were not independently reproduced on this host. The PR also clearly limits the gfx1031 measurement to the 2D path and records that cube-face/volume-array _a behavior is not measured.
  • macOS jobs remain queued and the hosted product Linux job was skipped.

Sources

Not verified

I did not run the Vulkan tests locally, reproduce the offline replay, or run Ghost of Tsushima. The author-reported tests and title runs are described in the PR. macOS jobs were queued, and hosted product Linux/specialized jobs were skipped.

To get this to a good state

No code change is needed based on the reviewed evidence. If the code head changes, I will review the new diff and rerun the same diff and merge checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5689783207 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5689783207). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T21:14:08Z. **Review:** APPROVED --- # Re-checked — new head, looks good The missing same-GPU Vulkan-validation evidence is now reported for both `main` and this head, and the focused code change and tests are consistent with the stated sample-0 behavior. ## What I ran - Reviewed PR head `1273808212c8407ee030e164df7517f6aa896d5e` against base `319621ba2e578bd053b0baba2877fe70520e0737`; merge preview clean (`9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5`). - Environment: Linux x86_64; this host has no suitable Vulkan GPU for the required hardware run. - Commands: ```sh git diff --check upstream/main...refs/review/pr-12561-current git merge-tree --write-tree upstream/main refs/review/pr-12561-current ``` ## Results | Check | Result | |---|---| | Diff check | Passed | | Merge preview onto current `main` | Clean | | Author-reported Linux RTX 4070 Ti tests | 53 focused tests passed 3/3; required validation runs passed 3/3 on base and head, no missing-layer message or `VUID-` messages | | Author-reported GoT offline replay | Base capture failed at the reported descriptor error; head materialized the request 2/2 | | Author-reported title runs | Three base runs stopped at the reported error; two head runs reached timeout without that stop; one later unrelated experiment exposed a separate unsupported read, disclosed in the PR | | Hosted Ubuntu/Windows relinker, ASan, Windows jobs | Passed | | Hosted macOS relinker jobs | Queued | | Hosted Linux product and specialized jobs | Skipped | | Local GPU tests | Not run; no suitable GPU on this host | <details> <summary>Commands and output from this review</summary> ```text diff_check_exit=0 9d0cb9dad631c95ce76cb568e2ad10df5eb4c0a5 merge_tree_exit=0 ``` </details> ## Negative control | Assertion | Change used | Result | |---|---|---| | The new `image_sample_a` path accepts the two-sample target as sample 0 | Author reports the new test on `main` without this PR | Failed with the descriptor incompatibility error; on this head the test passed | I did not run this negative control locally; the result is reported in the PR's test evidence. ## Findings ### Blocking None found in the reviewed change. ### Non-blocking - The validation, focused GPU, offline replay, and title results are author-reported and were not independently reproduced on this host. The PR also clearly limits the gfx1031 measurement to the 2D path and records that cube-face/volume-array `_a` behavior is not measured. - macOS jobs remain queued and the hosted product Linux job was skipped. ## Sources - [Shader-recompiler test requirements at `AGENTS.md` lines 15–16, pinned to current base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/AGENTS.md#L15-L16) - [Current PR's flag handling in `ResourceTracker.cpp`](https://github.com/boykopovar/AnyPS5/blob/1273808212c8407ee030e164df7517f6aa896d5e/core/shader/recompiler/Optimization/src/ResourceTracker.cpp) - [Current PR's regression test in `SampleMultisampleTarget.cpp`](https://github.com/boykopovar/AnyPS5/blob/1273808212c8407ee030e164df7517f6aa896d5e/core/libs/prx/libSceAgcDriver/tests/execution/SampleMultisampleTarget.cpp) - [PR test evidence and disclosed limits](https://github.com/boykopovar/AnyPS5/pull/12561) ## Not verified I did not run the Vulkan tests locally, reproduce the offline replay, or run Ghost of Tsushima. The author-reported tests and title runs are described in the PR. macOS jobs were queued, and hosted product Linux/specialized jobs were skipped. ## To get this to a good state No code change is needed based on the reviewed evidence. If the code head changes, I will review the new diff and rerun the same diff and merge checks.
XairRrR commented 2026-10-29 04:23:48 +00:00 (Migrated from github.com)

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

Review: APPROVED


Reviewed — approved

image_sample_a of a 2D MSAA T# now takes the existing sample-0 plane path. The new test case fails without the tracker change and passes with it, and I see no new validation messages on main or on this head.

What I ran

  • Head 1273808212c8407ee030e164df7517f6aa896d5e, merged with --no-ff onto main b433c40f2f46aa2e59e19806010a839ac8572d64 in a clean worktree. The merge was clean: docs/dev/debt/shader.md auto-merged.
  • Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Release build, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), system VK_LAYER_KHRONOS_validation.
git diff --check origin/main...<head>
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target agc_driver_recorder_tests agc_driver_sample_multisample_target_tests \
  agc_driver_image_msaa_address_on_plane_tests agc_driver_image_plane_address_on_cube_tests \
  agc_driver_image_store_face_on_cube_tests agc_driver_image_volume_address_on_line_tests \
  agc_driver_image_volume_address_on_plane_tests image_msaa_load_tests
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 \
VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -j4 -V --output-on-failure -R \
  '^(agc_multisample_guest_access|agc_driver_native_fmask|agc_driver_native_msaa_vertex_input|agc_driver_image_msaa_address_on_plane|agc_driver_image_plane_address_on_cube|agc_driver_image_store_face_on_cube|agc_driver_image_volume_address_on_line|agc_driver_image_volume_address_on_plane|agc_driver_sample_multisample_target|image_msaa_load)$'
# same build and ctest command on origin/main in the same worktree
# negative control: git checkout origin/main -- core/shader/recompiler/Optimization/src/ResourceTracker.cpp, rebuild, run agc_driver_sample_multisample_target

Along with the tests the PR names, I added the cube-face, volume-array and plane tests, because cubeFaceSample also gates those modes (ResourceMaterializer.cpp:2021, :2056).

Results

Check Result
Merge onto current main Clean
git diff --check No output
check_conventions.py 0 errors, 1 warning (debt-length, see Non-blocking)
Build of the 8 test targets (merged tree and main) OK
Focused ctest with validation, merged tree 10/10 passed
Focused ctest with validation, main 10/10 passed
VUID- lines, merged / main 0 / 0
was not found but was requested by env var VK_INSTANCE_LAYERS Absent from both logs
Validation layer loaded Insert instance layer "VK_LAYER_KHRONOS_validation" appears for the 9 Vulkan tests in both logs (image_msaa_load creates no Vulkan instance)
New case ran Yes, the log prints its line (below)
Negative control Fails as expected (below)
Merged tree, ctest summary
1371: a DIM 2D image_sample_a read of a 4x color target returns each pixel's sample 0
10/10 Test #1371: agc_driver_sample_multisample_target .......   Passed    0.84 sec
100% tests passed out of 10
check_conventions.py
docs/dev/debt/shader.md:58: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1139 characters
1 findings, 0 errors

Negative control

I restored only core/shader/recompiler/Optimization/src/ResourceTracker.cpp from main, kept the PR's test, rebuilt and ran agc_driver_sample_multisample_target. It fails on the new image_sample_a read, with the error the PR describes:

Output
ShaderRecompiler::Recompile: image descriptor is incompatible with the static runtime image interface: descriptor format 71 decodes to {class 1, dim 6, conversion 0, packed 0, cube 0, depthBits 0, unorm16 0, srgb 0}; modes: {class 1, dim 3, ...} ...
1/1 Test #1371: agc_driver_sample_multisample_target ...***Failed    0.56 sec

I then restored the PR's file.

Findings

Blocking

None.

On the validation runs that MarcZX10 and adriadam10 asked for: I ran them myself on main and on this head, on a different machine from the author's, and they match what the PR now reports.

Non-blocking

  • Debt entry goes over the length limit. docs/dev/debt/shader.md:58 grows from 995 to 1139 characters, so the conventions check now warns (debt-length, limit 1000). CONTRIBUTING's Documentation section asks an entry to state the gap first and keep only the behaviour the gap needs. The clause explaining why the _a form keeps the address describes behaviour rather than a gap. A shorter version keeps the gap: "…image_sample_l of a direct sampled image, or image_sample_a (unmeasured: gfx1031 has no _a read); …".
  • No test covers the extra modes. ResourceTracker.cpp:2197-2198 also lets an image_sample_a get the cube-face mode (ResourceMaterializer.cpp:2056) and the volume-array mode (ResourceMaterializer.cpp:2021). No test exercises _a in those modes. The description and adriadam10's review already note this. These modes are only added to the list (RuntimeImageModes pushes extra entries), so no access that worked before changes. Those that threw before now resolve, and the existing cube, volume and plane tests above still pass. A cube-face image_sample_a case in ImagePlaneAddressOnCube.cpp would pin it; this can be a follow-up.

Not verified

  • Hardware semantics of the _a form on gfx1013. The PR records this as debt; I have no console measurement.
  • The Ghost of Tsushima runs and the offline agc_shader_replay of the dumped request: I have neither the title nor the dump.
  • Windows, AMD and Intel GPUs. I ran no tests other than the 10 listed above.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692833040 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5692833040). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T04:23:48Z. **Review:** APPROVED --- # Reviewed — approved `image_sample_a` of a 2D MSAA T# now takes the existing sample-0 plane path. The new test case fails without the tracker change and passes with it, and I see no new validation messages on `main` or on this head. ## What I ran - Head `1273808212c8407ee030e164df7517f6aa896d5e`, merged with `--no-ff` onto `main` `b433c40f2f46aa2e59e19806010a839ac8572d64` in a clean worktree. The merge was clean: `docs/dev/debt/shader.md` auto-merged. - Machine: Arch Linux 7.2.11-zen, GCC 16.2.1, Release build, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), system `VK_LAYER_KHRONOS_validation`. ```sh git diff --check origin/main...<head> python3 tools/check_conventions.py --base origin/main cmake --build build -j10 --target agc_driver_recorder_tests agc_driver_sample_multisample_target_tests \ agc_driver_image_msaa_address_on_plane_tests agc_driver_image_plane_address_on_cube_tests \ agc_driver_image_store_face_on_cube_tests agc_driver_image_volume_address_on_line_tests \ agc_driver_image_volume_address_on_plane_tests image_msaa_load_tests VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 \ VK_LOADER_DEBUG=error,warn,layer ctest --test-dir build -j4 -V --output-on-failure -R \ '^(agc_multisample_guest_access|agc_driver_native_fmask|agc_driver_native_msaa_vertex_input|agc_driver_image_msaa_address_on_plane|agc_driver_image_plane_address_on_cube|agc_driver_image_store_face_on_cube|agc_driver_image_volume_address_on_line|agc_driver_image_volume_address_on_plane|agc_driver_sample_multisample_target|image_msaa_load)$' # same build and ctest command on origin/main in the same worktree # negative control: git checkout origin/main -- core/shader/recompiler/Optimization/src/ResourceTracker.cpp, rebuild, run agc_driver_sample_multisample_target ``` Along with the tests the PR names, I added the cube-face, volume-array and plane tests, because `cubeFaceSample` also gates those modes (`ResourceMaterializer.cpp:2021`, `:2056`). ## Results | Check | Result | |---|---| | Merge onto current `main` | Clean | | `git diff --check` | No output | | `check_conventions.py` | 0 errors, 1 warning (`debt-length`, see Non-blocking) | | Build of the 8 test targets (merged tree and `main`) | OK | | Focused ctest with validation, merged tree | 10/10 passed | | Focused ctest with validation, `main` | 10/10 passed | | `VUID-` lines, merged / `main` | 0 / 0 | | `was not found but was requested by env var VK_INSTANCE_LAYERS` | Absent from both logs | | Validation layer loaded | `Insert instance layer "VK_LAYER_KHRONOS_validation"` appears for the 9 Vulkan tests in both logs (`image_msaa_load` creates no Vulkan instance) | | New case ran | Yes, the log prints its line (below) | | Negative control | Fails as expected (below) | <details> <summary>Merged tree, ctest summary</summary> ```text 1371: a DIM 2D image_sample_a read of a 4x color target returns each pixel's sample 0 10/10 Test #1371: agc_driver_sample_multisample_target ....... Passed 0.84 sec 100% tests passed out of 10 ``` </details> <details> <summary>check_conventions.py</summary> ```text docs/dev/debt/shader.md:58: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1139 characters 1 findings, 0 errors ``` </details> ## Negative control I restored only `core/shader/recompiler/Optimization/src/ResourceTracker.cpp` from `main`, kept the PR's test, rebuilt and ran `agc_driver_sample_multisample_target`. It fails on the new `image_sample_a` read, with the error the PR describes: <details> <summary>Output</summary> ```text ShaderRecompiler::Recompile: image descriptor is incompatible with the static runtime image interface: descriptor format 71 decodes to {class 1, dim 6, conversion 0, packed 0, cube 0, depthBits 0, unorm16 0, srgb 0}; modes: {class 1, dim 3, ...} ... 1/1 Test #1371: agc_driver_sample_multisample_target ...***Failed 0.56 sec ``` </details> I then restored the PR's file. ## Findings ### Blocking None. On the validation runs that MarcZX10 and adriadam10 asked for: I ran them myself on `main` and on this head, on a different machine from the author's, and they match what the PR now reports. ### Non-blocking - **Debt entry goes over the length limit.** [`docs/dev/debt/shader.md:58`](https://github.com/boykopovar/AnyPS5/blob/1273808212c8407ee030e164df7517f6aa896d5e/docs/dev/debt/shader.md#L58-L58) grows from 995 to 1139 characters, so the conventions check now warns (`debt-length`, limit 1000). CONTRIBUTING's Documentation section asks an entry to state the gap first and keep only the behaviour the gap needs. The clause explaining why the `_a` form keeps the address describes behaviour rather than a gap. A shorter version keeps the gap: "…`image_sample_l` of a direct sampled image, or `image_sample_a` (unmeasured: gfx1031 has no `_a` read); …". - **No test covers the extra modes.** [`ResourceTracker.cpp:2197-2198`](https://github.com/boykopovar/AnyPS5/blob/1273808212c8407ee030e164df7517f6aa896d5e/core/shader/recompiler/Optimization/src/ResourceTracker.cpp#L2197-L2198) also lets an `image_sample_a` get the cube-face mode (`ResourceMaterializer.cpp:2056`) and the volume-array mode (`ResourceMaterializer.cpp:2021`). No test exercises `_a` in those modes. The description and adriadam10's review already note this. These modes are only added to the list (`RuntimeImageModes` pushes extra entries), so no access that worked before changes. Those that threw before now resolve, and the existing cube, volume and plane tests above still pass. A cube-face `image_sample_a` case in `ImagePlaneAddressOnCube.cpp` would pin it; this can be a follow-up. ## Not verified - Hardware semantics of the `_a` form on gfx1013. The PR records this as debt; I have no console measurement. - The Ghost of Tsushima runs and the offline `agc_shader_replay` of the dumped request: I have neither the title nor the dump. - Windows, AMD and Intel GPUs. I ran no tests other than the 10 listed above.
XairRrR commented 2026-10-29 04:31:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T04:31:39Z.

Review: APPROVED


Re-checked — approved

The new commit 90efd76e2a changes only the docs: it moves the image_sample_a clause into a debt entry of its own, which resolves the debt-length warning from my last review. The code and tests are the same as at the head I approved.

What changed since my last review

  • One new commit, 90efd76e2a (docs(shader): give image_sample_a of a 2D MSAA T# its own debt entry). It touches only docs/dev/debt/shader.md, and git diff 1273808212 90efd76e2a -- core is empty.
  • The DIM 2D MSAA entry is back to its text on main (995 characters). The new entry docs/dev/debt/shader.md:59 has 305 characters. It states the gap: the _a read is served as sample 0 and is unmeasured.
  • The author replied about the cube-face and volume-array modes (see below).

What I ran

  • Head 90efd76e2a408560e874872a57bc38b9b91bc295, merged with --no-ff onto main b433c40f2f46aa2e59e19806010a839ac8572d64 in a clean worktree. This is the same main as in my last review. The merge was clean: docs/dev/debt/shader.md auto-merged.
git diff 1273808212c8407ee030e164df7517f6aa896d5e 90efd76e2a408560e874872a57bc38b9b91bc295
git merge-tree --write-tree origin/main <head>
git diff --check origin/main...<head>
python3 tools/check_conventions.py --base origin/main

I did not rebuild or rerun tests. No code, test or build file changed since 1273808212, and main has not moved, so the merged code is identical to the tree I built and tested last time.

Previous findings

  • Debt entry over the length limit: Resolved. check_conventions.py now prints All conventions checks passed. The two entries are 995 and 305 characters.
  • No test covers _a in the cube-face and volume-array modes: Still open, non-blocking, and acknowledged. The author replied that these modes are only added to the list of modes an _a read may take, so nothing that worked before changes. That matches what I found last time, and I accept a follow-up when a title needs it.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • As before: hardware semantics of the _a form on gfx1013, the Ghost of Tsushima runs, the offline replay, Windows, and AMD or Intel GPUs.
  • The Tested section still names 1273808212 as the head. The only change since then is the docs commit, so the reported runs still apply to the code.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692879324 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5692879324). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T04:31:39Z. **Review:** APPROVED --- # Re-checked — approved The new commit `90efd76e2a` changes only the docs: it moves the `image_sample_a` clause into a debt entry of its own, which resolves the `debt-length` warning from my last review. The code and tests are the same as at the head I approved. ## What changed since my last review - One new commit, `90efd76e2a` (`docs(shader): give image_sample_a of a 2D MSAA T# its own debt entry`). It touches only `docs/dev/debt/shader.md`, and `git diff 1273808212 90efd76e2a -- core` is empty. - The DIM 2D MSAA entry is back to its text on `main` (995 characters). The new entry [`docs/dev/debt/shader.md:59`](https://github.com/boykopovar/AnyPS5/blob/90efd76e2a408560e874872a57bc38b9b91bc295/docs/dev/debt/shader.md#L59-L59) has 305 characters. It states the gap: the `_a` read is served as sample 0 and is unmeasured. - The author replied about the cube-face and volume-array modes (see below). ## What I ran - Head `90efd76e2a408560e874872a57bc38b9b91bc295`, merged with `--no-ff` onto `main` `b433c40f2f46aa2e59e19806010a839ac8572d64` in a clean worktree. This is the same `main` as in my last review. The merge was clean: `docs/dev/debt/shader.md` auto-merged. ```sh git diff 1273808212c8407ee030e164df7517f6aa896d5e 90efd76e2a408560e874872a57bc38b9b91bc295 git merge-tree --write-tree origin/main <head> git diff --check origin/main...<head> python3 tools/check_conventions.py --base origin/main ``` I did not rebuild or rerun tests. No code, test or build file changed since `1273808212`, and `main` has not moved, so the merged code is identical to the tree I built and tested last time. ## Previous findings - **Debt entry over the length limit**: Resolved. `check_conventions.py` now prints `All conventions checks passed.` The two entries are 995 and 305 characters. - **No test covers `_a` in the cube-face and volume-array modes**: Still open, non-blocking, and acknowledged. The author replied that these modes are only added to the list of modes an `_a` read may take, so nothing that worked before changes. That matches what I found last time, and I accept a follow-up when a title needs it. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - As before: hardware semantics of the `_a` form on gfx1013, the Ghost of Tsushima runs, the offline replay, Windows, and AMD or Intel GPUs. - The Tested section still names `1273808212` as the head. The only change since then is the docs commit, so the reported runs still apply to the code.
MarcZX10 commented 2026-10-29 10:27:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T10:27:38Z.

Review: APPROVED


Re-reviewed — approved

The head adds only the requested debt-entry split; the production change and test diff are unchanged from the revision I approved. I checked exact head 90efd76e2a408560e874872a57bc38b9b91bc295 against current main bc3e33f4e334996ab9ba5cbf8544942465be18f3.

What I checked

  • Current-main merge preview is clean (afc9087818406bbb329bc4b8dab3e4bf75c2314f).
  • git diff --check passes.
  • python3 tools/check_conventions.py --base refs/review/live-main --head refs/review/upstream-12561 passes.
  • The only change since my prior approval is the documentation split for the image_sample_a debt entry. It now separates the unmeasured _a mode from the evidence-backed image_sample wording.
  • The earlier same-GPU validation comparison still applies to the unchanged code/tests. I did not rerun GPU tests locally. The supplementary title traces include event drops in five runs, as noted in my comment; the report treats those captures as supplementary.

I found no remaining blocker on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696213551 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5696213551). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T10:27:38Z. **Review:** APPROVED --- # Re-reviewed — approved The head adds only the requested debt-entry split; the production change and test diff are unchanged from the revision I approved. I checked exact head `90efd76e2a408560e874872a57bc38b9b91bc295` against current `main` `bc3e33f4e334996ab9ba5cbf8544942465be18f3`. ## What I checked - Current-main merge preview is clean (`afc9087818406bbb329bc4b8dab3e4bf75c2314f`). - `git diff --check` passes. - `python3 tools/check_conventions.py --base refs/review/live-main --head refs/review/upstream-12561` passes. - The only change since my prior approval is the documentation split for the `image_sample_a` debt entry. It now separates the unmeasured `_a` mode from the evidence-backed `image_sample` wording. - The earlier same-GPU validation comparison still applies to the unchanged code/tests. I did not rerun GPU tests locally. The supplementary title traces include event drops in five runs, as noted in my comment; the report treats those captures as supplementary. I found no remaining blocker on this head.
adriadam10 commented 2026-10-29 22:09:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-29T22:09:46Z.

Review: CHANGES_REQUESTED


The plane read itself is fine: image_sample_a already samples like image_sample with dword 3 of the S# canonicalized, so the 2D MSAA read taking sample 0 is in line with that, and the new AdjustedPlaneCode case pins it. One thing is broader than the PR needs, though:

  • ResourceTracker.cpp:2197-2198: cubeFaceSample also feeds cubeFaceCompatible for the cube-face mode (ResourceMaterializer.cpp:2081) and volumeArraySampleCompatible for the 2D-array-through-3D mode (ResourceMaterializer.cpp:2046, via ResourceTracker.cpp:2201). With the adjust bit masked, image_sample_a now takes both of those modes as well. No one has measured them, and no title in the PR needs them. The two docs/dev/debt/shader.md entries for those modes become false: the 2D-array-through-3D entry (line 79) lists _a among the samples that throw, and the cube entry (line 81) says only image_sample_lz, plain image_sample, image_sample_l and mip-less loads and stores take that mode. Per "exact or throw", please limit the _a relaxation to the DIM 2D read of a 2D MSAA T#, so image_sample_a still throws in the cube-face and volume-array modes, and add a test case showing that it does. If you'd rather keep them, those two entries need to say that image_sample_a takes those modes unmeasured.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5705622836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5705622836). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-29T22:09:46Z. **Review:** CHANGES_REQUESTED --- The plane read itself is fine: `image_sample_a` already samples like `image_sample` with dword 3 of the S# canonicalized, so the 2D MSAA read taking sample 0 is in line with that, and the new `AdjustedPlaneCode` case pins it. One thing is broader than the PR needs, though: - `ResourceTracker.cpp:2197-2198`: `cubeFaceSample` also feeds `cubeFaceCompatible` for the cube-face mode (`ResourceMaterializer.cpp:2081`) and `volumeArraySampleCompatible` for the 2D-array-through-3D mode (`ResourceMaterializer.cpp:2046`, via `ResourceTracker.cpp:2201`). With the adjust bit masked, `image_sample_a` now takes both of those modes as well. No one has measured them, and no title in the PR needs them. The two `docs/dev/debt/shader.md` entries for those modes become false: the 2D-array-through-3D entry (line 79) lists `_a` among the samples that throw, and the cube entry (line 81) says only `image_sample_lz`, plain `image_sample`, `image_sample_l` and mip-less loads and stores take that mode. Per "exact or throw", please limit the `_a` relaxation to the DIM 2D read of a 2D MSAA T#, so `image_sample_a` still throws in the cube-face and volume-array modes, and add a test case showing that it does. If you'd rather keep them, those two entries need to say that `image_sample_a` takes those modes unmeasured.
MarcZX10 commented 2026-10-29 22:12:15 +00:00 (Migrated from github.com)

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

Review: CHANGES_REQUESTED


Reviewed — changes requested

I confirmed the new finding on the unchanged head; my earlier approval was premature because _a is admitted for cube-face and volume-array shader modes that the PR neither tests nor documents as supported.

What I ran

Exact PR head: 90efd76e2a408560e874872a57bc38b9b91bc295. PR base: main at b433c40f2f46aa2e59e19806010a839ac8572d64; refreshed current main: 4c8cff191609bc5f28bf9ee2f93672b531285aa4. The current-main merge preview is clean (62a8661c938b040cd692e40a8c49fa6293060a16). Environment: Linux x86_64; no compiler or GPU test run.

git diff --check upstream/main...refs/review/pr-12561-head
python3 tools/check_conventions.py --base upstream/main
git merge-tree --write-tree upstream/main refs/review/pr-12561-head
git show refs/review/pr-12561-head:core/shader/recompiler/Optimization/src/ResourceTracker.cpp | nl -ba | sed -n '2193,2201p'
git show refs/review/pr-12561-head:core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp | nl -ba | sed -n '2021,2037p;2056,2061p'
git show refs/review/pr-12561-head:docs/dev/debt/shader.md | nl -ba | sed -n '78,81p'

Results

Check Result
Diff whitespace check Pass; exit 0, no output.
Repository conventions Pass.
Merge preview against current main Clean.
Source and debt audit The masked ADJUST flag makes cubeFaceSample true for _a; that predicate feeds both cube-face and volume-array compatibility. The debt entries still say _a throws for those modes.
Hosted CI Windows, relinker, ASan, conventions, eligibility, labels and report pass; Linux and specialized jobs skipped.
Focused Vulkan tests The author reports base/head tests on an RTX 4070 Ti with validation; the new test covers the 2D MSAA plane case. I did not rerun them.
Exact output from local checks
$ python3 tools/check_conventions.py --base upstream/main
All conventions checks passed.
$ git merge-tree --write-tree upstream/main refs/review/pr-12561-head
62a8661c938b040cd692e40a8c49fa6293060a16

git diff --check exited 0 and produced no output.

Findings

Blocking

ResourceTracker.cpp removes RdnaImageSampleFlagAdjust before deciding cubeFaceSample. ResourceMaterializer.cpp uses the resulting compatibility flags to add cube-face and 2D-array-through-3D modes. This means the PR's new image_sample_a allowance is broader than the tested 2D MSAA plane read. The existing debt entries for cube-face and volume-array access still list _a among the cases that throw, so both the supported behavior and documented limitation are now inconsistent. Please restrict the relaxation to the intended DIM 2D read of a 2D MSAA T# and add regression checks that _a still rejects the unmeasured cube-face and volume-array modes, or explicitly implement and document those modes with evidence. ResourceTracker at this head, mode generation at this head, debt entries at this head

Non-blocking

The focused 2D MSAA sample-0 test and the reported matched validation runs remain useful evidence for the intended case. They do not cover the two newly admitted modes described above.

Not verified

I did not build or run CTest, GPU validation, or console tests. The author-reported GPU validation is not independently reproduced here. Linux and specialized hosted jobs were skipped.

To get this to a good state

Please narrow the compatibility change to the measured/tested 2D MSAA path and add coverage that the cube-face and volume-array _a modes still throw, or provide tested and documented behavior for those modes. I will re-run the same static checks and merge preview on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5705644496 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5705644496). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T22:12:15Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested I confirmed the new finding on the unchanged head; my earlier approval was premature because `_a` is admitted for cube-face and volume-array shader modes that the PR neither tests nor documents as supported. ## What I ran Exact PR head: `90efd76e2a408560e874872a57bc38b9b91bc295`. PR base: `main` at `b433c40f2f46aa2e59e19806010a839ac8572d64`; refreshed current `main`: `4c8cff191609bc5f28bf9ee2f93672b531285aa4`. The current-main merge preview is clean (`62a8661c938b040cd692e40a8c49fa6293060a16`). Environment: Linux x86_64; no compiler or GPU test run. ```sh git diff --check upstream/main...refs/review/pr-12561-head python3 tools/check_conventions.py --base upstream/main git merge-tree --write-tree upstream/main refs/review/pr-12561-head git show refs/review/pr-12561-head:core/shader/recompiler/Optimization/src/ResourceTracker.cpp | nl -ba | sed -n '2193,2201p' git show refs/review/pr-12561-head:core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp | nl -ba | sed -n '2021,2037p;2056,2061p' git show refs/review/pr-12561-head:docs/dev/debt/shader.md | nl -ba | sed -n '78,81p' ``` ## Results | Check | Result | |---|---| | Diff whitespace check | Pass; exit 0, no output. | | Repository conventions | Pass. | | Merge preview against current `main` | Clean. | | Source and debt audit | The masked `ADJUST` flag makes `cubeFaceSample` true for `_a`; that predicate feeds both cube-face and volume-array compatibility. The debt entries still say `_a` throws for those modes. | | Hosted CI | Windows, relinker, ASan, conventions, eligibility, labels and report pass; Linux and specialized jobs skipped. | | Focused Vulkan tests | The author reports base/head tests on an RTX 4070 Ti with validation; the new test covers the 2D MSAA plane case. I did not rerun them. | <details> <summary>Exact output from local checks</summary> ```text $ python3 tools/check_conventions.py --base upstream/main All conventions checks passed. $ git merge-tree --write-tree upstream/main refs/review/pr-12561-head 62a8661c938b040cd692e40a8c49fa6293060a16 ``` `git diff --check` exited 0 and produced no output. </details> ## Findings ### Blocking `ResourceTracker.cpp` removes `RdnaImageSampleFlagAdjust` before deciding `cubeFaceSample`. `ResourceMaterializer.cpp` uses the resulting compatibility flags to add cube-face and 2D-array-through-3D modes. This means the PR's new `image_sample_a` allowance is broader than the tested 2D MSAA plane read. The existing debt entries for cube-face and volume-array access still list `_a` among the cases that throw, so both the supported behavior and documented limitation are now inconsistent. Please restrict the relaxation to the intended DIM 2D read of a 2D MSAA T# and add regression checks that `_a` still rejects the unmeasured cube-face and volume-array modes, or explicitly implement and document those modes with evidence. [ResourceTracker at this head](https://github.com/boykopovar/AnyPS5/blob/90efd76e2a408560e874872a57bc38b9b91bc295/core/shader/recompiler/Optimization/src/ResourceTracker.cpp#L2193-L2201), [mode generation at this head](https://github.com/boykopovar/AnyPS5/blob/90efd76e2a408560e874872a57bc38b9b91bc295/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L2021-L2037), [debt entries at this head](https://github.com/boykopovar/AnyPS5/blob/90efd76e2a408560e874872a57bc38b9b91bc295/docs/dev/debt/shader.md#L78-L81) ### Non-blocking The focused 2D MSAA sample-0 test and the reported matched validation runs remain useful evidence for the intended case. They do not cover the two newly admitted modes described above. ## Not verified I did not build or run CTest, GPU validation, or console tests. The author-reported GPU validation is not independently reproduced here. Linux and specialized hosted jobs were skipped. ## To get this to a good state Please narrow the compatibility change to the measured/tested 2D MSAA path and add coverage that the cube-face and volume-array `_a` modes still throw, or provide tested and documented behavior for those modes. I will re-run the same static checks and merge preview on the new head.
MarcZX10 commented 2026-10-29 23:16:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T23:16:58Z.

Review: APPROVED


Re-checked — new head, looks good

The updated head narrows the image_sample_a exception to the tested 2D MSAA path and adds rejection coverage for cube-face and volume-array modes.

What I ran

Reviewed exact PR head f27177dd9b6b6b73d8cf543701230e261f93edb0 against base b433c40f2f46aa2e59e19806010a839ac8572d64; refreshed current main is dc38224141e0b6096007b876b4c42fc9144d11b8. The merge preview against current main is clean (tree 1bacb9bbe3dfdef82c21571116d347f2f3545917). Environment: Linux x86_64; no local compiler, build, or tests run.

git diff --check upstream/main...refs/review/pr-12561-current
python3 tools/check_conventions.py --base upstream/main
git merge-tree --write-tree upstream/main refs/review/pr-12561-current
gh pr checks 12561 --repo boykopovar/AnyPS5

Results

Check Result
Diff whitespace check Pass; exit 0, no output.
Repository conventions Pass.
Merge preview with current main Clean.
Hosted CI Windows, Ubuntu/Windows relinker, relinker ASan, conventions, eligibility, labels, and report pass; macOS relinker jobs are pending; Linux and specialized jobs skipped.
Focused shader tests The author reports 42 matching tests passed 3/3 on an RTX 4070 Ti at this exact head; I did not rerun them.
Unedited output from local and hosted checks
$ git diff --check upstream/main...refs/review/pr-12561-current
(exit 0; no output)
$ python3 tools/check_conventions.py --base upstream/main
All conventions checks passed.
$ git merge-tree --write-tree upstream/main refs/review/pr-12561-current
1bacb9bbe3dfdef82c21571116d347f2f3545917
$ gh pr checks 12561 --repo boykopovar/AnyPS5
conventions	pass	14s	https://github.com/boykopovar/AnyPS5/actions/runs/40970412014/job/123785465892
eligibility	pass	5s	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123785298594
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/40970411967/job/123787375885
relinker (ubuntu-latest, g++)	pass	3m28s	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710422
relinker (windows-latest, g++)	pass	5m0s	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710438
relinker-asan	pass	2m30s	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710383
report	pass	28s	https://github.com/boykopovar/AnyPS5/actions/runs/40970364066/job/123785299844
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710448
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710528
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786712731
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786712933
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786712979
windows	pass	5m1s	https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710472

The focused test results above are author-reported in the update comment, not a local run.

Findings

Blocking

None found in the updated head. It now sets adjustedSample when an adjusted image sample is tracked, excludes that image from cube-face and volume-array runtime modes, and adds regression assertions for those two rejected cases.

Non-blocking

The new behavior remains unmeasured on console hardware. The author’s GPU tests and current hosted results support the change, while the remaining skipped and pending jobs are listed above.

Sources

Not verified

I did not build or run tests locally, run Linux or macOS product tests, independently reproduce the author’s RTX 4070 Ti results, or test console behavior. The two macOS relinker jobs were pending when checked; Linux and specialized hosted jobs were skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5706190919 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12561#pullrequestreview-5706190919). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T23:16:58Z. **Review:** APPROVED --- # Re-checked — new head, looks good The updated head narrows the `image_sample_a` exception to the tested 2D MSAA path and adds rejection coverage for cube-face and volume-array modes. ## What I ran Reviewed exact PR head `f27177dd9b6b6b73d8cf543701230e261f93edb0` against base `b433c40f2f46aa2e59e19806010a839ac8572d64`; refreshed current `main` is `dc38224141e0b6096007b876b4c42fc9144d11b8`. The merge preview against current `main` is clean (tree `1bacb9bbe3dfdef82c21571116d347f2f3545917`). Environment: Linux x86_64; no local compiler, build, or tests run. ```sh git diff --check upstream/main...refs/review/pr-12561-current python3 tools/check_conventions.py --base upstream/main git merge-tree --write-tree upstream/main refs/review/pr-12561-current gh pr checks 12561 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff whitespace check | Pass; exit 0, no output. | | Repository conventions | Pass. | | Merge preview with current `main` | Clean. | | Hosted CI | Windows, Ubuntu/Windows relinker, relinker ASan, conventions, eligibility, labels, and report pass; macOS relinker jobs are pending; Linux and specialized jobs skipped. | | Focused shader tests | The author reports 42 matching tests passed 3/3 on an RTX 4070 Ti at this exact head; I did not rerun them. | <details> <summary>Unedited output from local and hosted checks</summary> ```text $ git diff --check upstream/main...refs/review/pr-12561-current (exit 0; no output) $ python3 tools/check_conventions.py --base upstream/main All conventions checks passed. $ git merge-tree --write-tree upstream/main refs/review/pr-12561-current 1bacb9bbe3dfdef82c21571116d347f2f3545917 $ gh pr checks 12561 --repo boykopovar/AnyPS5 conventions pass 14s https://github.com/boykopovar/AnyPS5/actions/runs/40970412014/job/123785465892 eligibility pass 5s https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123785298594 labels pass 9s https://github.com/boykopovar/AnyPS5/actions/runs/40970411967/job/123787375885 relinker (ubuntu-latest, g++) pass 3m28s https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710422 relinker (windows-latest, g++) pass 5m0s https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710438 relinker-asan pass 2m30s https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710383 report pass 28s https://github.com/boykopovar/AnyPS5/actions/runs/40970364066/job/123785299844 relinker (macos-latest, clang++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710448 relinker (macos-latest, clang++, x86_64) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710528 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786712731 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786712933 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786712979 windows pass 5m1s https://github.com/boykopovar/AnyPS5/actions/runs/40970364022/job/123786710472 ``` The focused test results above are author-reported in [the update comment](https://github.com/boykopovar/AnyPS5/pull/12561#issuecomment-6510565922), not a local run. </details> ## Findings ### Blocking None found in the updated head. It now sets `adjustedSample` when an adjusted image sample is tracked, excludes that image from cube-face and volume-array runtime modes, and adds regression assertions for those two rejected cases. ### Non-blocking The new behavior remains unmeasured on console hardware. The author’s GPU tests and current hosted results support the change, while the remaining skipped and pending jobs are listed above. ## Sources - [Resource tracking and adjusted-sample flag at this head](https://github.com/boykopovar/AnyPS5/blob/f27177dd9b6b6b73d8cf543701230e261f93edb0/core/shader/recompiler/Optimization/src/ResourceTracker.cpp) - [Runtime image mode exclusions at this head](https://github.com/boykopovar/AnyPS5/blob/f27177dd9b6b6b73d8cf543701230e261f93edb0/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp) - [Regression cases at this head](https://github.com/boykopovar/AnyPS5/blob/f27177dd9b6b6b73d8cf543701230e261f93edb0/core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp) ## Not verified I did not build or run tests locally, run Linux or macOS product tests, independently reproduce the author’s RTX 4070 Ti results, or test console behavior. The two macOS relinker jobs were pending when checked; Linux and specialized hosted jobs were skipped.
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!12561
No description provided.