feat(agc): render layered draws into 2D array color views #7254

Merged
gjonn merged 4 commits from upstream-pr/7254 into main 2026-10-19 20:05:16 +00:00
gjonn commented 2026-10-17 19:52:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-17T19:52:29Z.


What

PPSA01317 on main aborts in a 512x512 cube map pass with layered draws into a color view of several array slices are unsupported. The draw's vertex shader exports the render target array index (PA_CL_VS_OUT_CNTL USE_VTX_RENDER_TARGET_INDX) into a CB_COLOR_VIEW of slices 0 to 5. Only 3D color targets rendered several slices; a layered draw into any other slice range threw.

Two commits:

  • 2D array color views. A layered draw into a view of several slices of a 2D array target renders lastSlice - slice + 1 layers through a 2D array attachment view of the array's resident image, starting at the view's first slice. The draw marks every rendered slice dirty (MarkSliceDirty takes a slice count). A layered draw into an array without its resident image throws.
  • One-slice surface viewed as several slices. In this pass CB_COLOR_ATTRIB3 declares one slice while the view covers slices 0 to 5, which then threw ... of several slices of a surface that is not a 2D array are unsupported. The CB clamps the layer to the view's SLICE_MAX, not to the surface's slice count, so each layer is written one slice pitch further on. Such a view now renders as a 2D array of the view's last slice + 1 slices. The "Layered color targets" debt entry is updated to match.

Single-slice views and views without the layer export behave as before (the first slice of the range). A layered draw with a depth target still throws; #7256 handles that. #6959 also touches layered rendering (mesh layer windows) and keeps the refusals this PR removes; the two do not overlap.

Tested

Windows 11, NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92. Ninja/MinGW Release with BUILD_TESTING=ON, rebased on main 922dc8999.

  • agc_driver_graphics_tests: the two decode cases that expected the refusal now require two layers (a 2D array view of slices 0 to 1 and a one-slice surface viewed as slices 0 to 1).
  • GPU tests agc_driver_array_layer_target, agc_driver_depth_plane_guest_layers, agc_driver_layered_volume_draw, agc_driver_layered_volume_submit, agc_driver_layered_volume_vertex, agc_driver_layered_volume_vertex_no_gpl, agc_vertex_layer_export and the decode state tests (agc_driver_msaa_dcc_state, the alpha-to-coverage state tests): 11/11 pass.
  • tools/check_conventions.py --base origin/main and tools/check_test_registration.py pass.
  • PPSA01317 gets past both aborts on main (checked in boots). It then stops at layered rendering with a depth target is unsupported on the same pass, which #7256 handles.

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: PPSA01317 #4697
  • GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92, Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4903410173 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-17T19:52:29Z. --- ### What PPSA01317 on `main` aborts in a 512x512 cube map pass with `layered draws into a color view of several array slices are unsupported`. The draw's vertex shader exports the render target array index (`PA_CL_VS_OUT_CNTL` USE_VTX_RENDER_TARGET_INDX) into a `CB_COLOR_VIEW` of slices 0 to 5. Only 3D color targets rendered several slices; a layered draw into any other slice range threw. Two commits: - **2D array color views.** A layered draw into a view of several slices of a 2D array target renders `lastSlice - slice + 1` layers through a 2D array attachment view of the array's resident image, starting at the view's first slice. The draw marks every rendered slice dirty (`MarkSliceDirty` takes a slice count). A layered draw into an array without its resident image throws. - **One-slice surface viewed as several slices.** In this pass `CB_COLOR_ATTRIB3` declares one slice while the view covers slices 0 to 5, which then threw `... of several slices of a surface that is not a 2D array are unsupported`. The CB clamps the layer to the view's `SLICE_MAX`, not to the surface's slice count, so each layer is written one slice pitch further on. Such a view now renders as a 2D array of the view's last slice + 1 slices. The "Layered color targets" debt entry is updated to match. Single-slice views and views without the layer export behave as before (the first slice of the range). A layered draw with a depth target still throws; #7256 handles that. #6959 also touches layered rendering (mesh layer windows) and keeps the refusals this PR removes; the two do not overlap. ### Tested Windows 11, NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92. Ninja/MinGW Release with `BUILD_TESTING=ON`, rebased on `main` 922dc8999. - `agc_driver_graphics_tests`: the two decode cases that expected the refusal now require two layers (a 2D array view of slices 0 to 1 and a one-slice surface viewed as slices 0 to 1). - GPU tests `agc_driver_array_layer_target`, `agc_driver_depth_plane_guest_layers`, `agc_driver_layered_volume_draw`, `agc_driver_layered_volume_submit`, `agc_driver_layered_volume_vertex`, `agc_driver_layered_volume_vertex_no_gpl`, `agc_vertex_layer_export` and the decode state tests (`agc_driver_msaa_dcc_state`, the alpha-to-coverage state tests): 11/11 pass. - `tools/check_conventions.py --base origin/main` and `tools/check_test_registration.py` pass. - PPSA01317 gets past both aborts on `main` (checked in boots). It then stops at `layered rendering with a depth target is unsupported` on the same pass, which #7256 handles. ### Checklist - [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: PPSA01317 #4697 - [x] GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92, Windows 11 - [x] AI-assisted: yes
oneandonlydean commented 2026-10-17 20:16:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T20:16:52Z.


Thanks, this unblocks the first two PPSA01317 aborts nicely. We read through it: the change is confined to paths that threw on main (a layer export over a slice range), the dirty range from MarkSliceDirty(slice, count) is exact, and volume targets are unchanged.

One ask before it can merge, a test that runs the new path. The tests added here are decode-only (they check layers, renderLayers and arrayLastSlice after DecodeState). agc_driver_array_layer_target uses single-slice views, and the agc_driver_layered_volume_* tests are 3D only. Nothing renders a layered draw into a 2D array yet, and the title stops at the next abort, so a wrong base layer, layer count or write-back range would go unnoticed, where main at least threw.

Could you add an execution test modelled on LayeredVolumeDraw that draws with a layer-exporting VS into:

  • (a) a CB_COLOR_VIEW of slices 1..3 of a 4-slice 2D array, and
  • (b) a one-slice surface viewed as slices 0..2,

with a distinct colour per layer, then checks guest memory per slice after write-back, including that slice 0 is untouched in case (a)? It needs to run on Linux llvmpipe (no early skip other than "no device"), since that's the only CI lane with a Vulkan device. It would also cover the colour side of #7256.

Two small optional points:

  • AttachmentView's second Require now accepts any layer for a volume (|| volume), where main required layer == 0. It's unreachable today, but (volume && layer == 0) would keep the guard.
  • With slice == 0 the pitch check in the resident path in Draw.cpp is trivially true, so nothing compares the synthesized array's layerBytes with the per-slice size State.cpp uses for slice offsets. Comparing them for every slice would be cheap hardening.

Heads-up on merge order: this conflicts textually in Draw.cpp with the native-multisample series (#6973, #6987, #6989, #6995, #7002); whichever lands second will need a rebase. #7256 builds on this one, so this merges first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240324626 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#issuecomment-6240324626). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T20:16:52Z. --- Thanks, this unblocks the first two PPSA01317 aborts nicely. We read through it: the change is confined to paths that threw on main (a layer export over a slice range), the dirty range from `MarkSliceDirty(slice, count)` is exact, and volume targets are unchanged. One ask before it can merge, a test that runs the new path. The tests added here are decode-only (they check `layers`, `renderLayers` and `arrayLastSlice` after `DecodeState`). `agc_driver_array_layer_target` uses single-slice views, and the `agc_driver_layered_volume_*` tests are 3D only. Nothing renders a layered draw into a 2D array yet, and the title stops at the next abort, so a wrong base layer, layer count or write-back range would go unnoticed, where main at least threw. Could you add an execution test modelled on `LayeredVolumeDraw` that draws with a layer-exporting VS into: - (a) a `CB_COLOR_VIEW` of slices 1..3 of a 4-slice 2D array, and - (b) a one-slice surface viewed as slices 0..2, with a distinct colour per layer, then checks guest memory per slice after write-back, including that slice 0 is untouched in case (a)? It needs to run on Linux llvmpipe (no early skip other than "no device"), since that's the only CI lane with a Vulkan device. It would also cover the colour side of #7256. Two small optional points: - `AttachmentView`'s second `Require` now accepts any `layer` for a volume (`|| volume`), where main required `layer == 0`. It's unreachable today, but `(volume && layer == 0)` would keep the guard. - With `slice == 0` the pitch check in the resident path in `Draw.cpp` is trivially true, so nothing compares the synthesized array's `layerBytes` with the per-slice size `State.cpp` uses for slice offsets. Comparing them for every slice would be cheap hardening. Heads-up on merge order: this conflicts textually in `Draw.cpp` with the native-multisample series (#6973, #6987, #6989, #6995, #7002); whichever lands second will need a rebase. #7256 builds on this one, so this merges first.
github-actions[bot] commented 2026-10-17 20:34:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T20:34:23Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7310 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L2219
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp L1825-1826
PR 7369 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L2857-2858

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4072 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5431 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5441 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6146 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6187 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6252 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6557 docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6661 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6682 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6718 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6727 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6772 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6820 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6960 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7048 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7154 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7427 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7446 docs/dev/debt/libSceAgcDriver.md
PR 7449 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7579 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7746 docs/dev/debt/libSceAgcDriver.md
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7927 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7978 docs/dev/debt/libSceAgcDriver.md
PR 8014 docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240590364 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#issuecomment-6240590364). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T20:34:23Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 7310](https://www.github.com/boykopovar/AnyPS5/pull/7310) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` [L2219](https://github.com/boykopovar/AnyPS5/blob/8075b6af190ff8f83c1bff9a7f74cd71e5902140/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L2219)<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` [L1825-1826](https://github.com/boykopovar/AnyPS5/blob/8075b6af190ff8f83c1bff9a7f74cd71e5902140/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp#L1825-L1826) | | | | [PR 7369](https://www.github.com/boykopovar/AnyPS5/pull/7369) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` [L2857-2858](https://github.com/boykopovar/AnyPS5/blob/8075b6af190ff8f83c1bff9a7f74cd71e5902140/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp#L2857-L2858) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1191](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` | | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4072](https://www.github.com/boykopovar/AnyPS5/pull/4072) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6202](https://www.github.com/boykopovar/AnyPS5/pull/6202) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6252](https://www.github.com/boykopovar/AnyPS5/pull/6252) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6549](https://www.github.com/boykopovar/AnyPS5/pull/6549) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6557](https://www.github.com/boykopovar/AnyPS5/pull/6557) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6661](https://www.github.com/boykopovar/AnyPS5/pull/6661) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` | | [PR 6682](https://www.github.com/boykopovar/AnyPS5/pull/6682) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6727](https://www.github.com/boykopovar/AnyPS5/pull/6727) | `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6772](https://www.github.com/boykopovar/AnyPS5/pull/6772) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6960](https://www.github.com/boykopovar/AnyPS5/pull/6960) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6970](https://www.github.com/boykopovar/AnyPS5/pull/6970) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6971](https://www.github.com/boykopovar/AnyPS5/pull/6971) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6972](https://www.github.com/boykopovar/AnyPS5/pull/6972) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7154](https://www.github.com/boykopovar/AnyPS5/pull/7154) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7427](https://www.github.com/boykopovar/AnyPS5/pull/7427) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7446](https://www.github.com/boykopovar/AnyPS5/pull/7446) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7449](https://www.github.com/boykopovar/AnyPS5/pull/7449) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7579](https://www.github.com/boykopovar/AnyPS5/pull/7579) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7746](https://www.github.com/boykopovar/AnyPS5/pull/7746) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7927](https://www.github.com/boykopovar/AnyPS5/pull/7927) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7978](https://www.github.com/boykopovar/AnyPS5/pull/7978) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `docs/dev/debt/libSceAgcDriver.md` |
gjonn commented 2026-10-17 21:02:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-17T21:02:19Z.


Thanks for the review. Pushed two follow-up commits:

Test: agc_driver_layered_array_color_draw (tests/execution/LayeredArrayColorDraw.cpp, modelled on LayeredVolumeDraw). A VS exporting the render target index draws one full-screen quad per layer. The PS writes 1 + layer / 2 from the ancillary RT-index field, so each layer gets its own value. The colour view comes from DecodeColorBuffer with the layer export set in PA_CL_VS_OUT_CNTL:

  • (a) a CB_COLOR_VIEW of slices 1..3 of a four-slice 2D array (R32_FLOAT, 64 KiB R_X, one 64 KiB block per slice).
  • (b) a one-slice surface viewed as slices 0..2.

After FlushPending over the surface it checks every word of all four slices in guest memory:

  • each drawn slice holds its layer's value;
  • slice 0 in (a) and slice 3 in (b) still hold their initial bytes.

It only skips with no device. The VK_EXT_shader_viewport_index_layer check is the same one LayeredVolumeDraw makes, and lavapipe exposes that extension. I ran it on llvmpipe (LLVM 21.1.8) under WSL Ubuntu and it passes there, not skipped. It also passes on Windows.

Mutation check (one change at a time; each should make the test fail):

mutation result
attachment view base layer ignores the view's first slice fails: slice 1 holds layer 1's value
decoded layer count one short (lastSlice - slice) fails at the decode check
MarkSliceDirty covers one slice (in Texture.cpp) fails: slice 2 never written back
Draw.cpp passes a dirty count of 1 at every site fails: slice 2 never written back

One mutation didn't fail: shrinking only the attachment view's layerCount, with the framebuffer still at 3 layers. That is undefined behaviour in Vulkan, and the NVIDIA driver still wrote the third layer, so I left it out of the table.

Optional points, both done (fix(agc): ... commit):

  • AttachmentView's second Require now uses (volume && layer == 0), so volumes keep main's guard.
  • In the resident path, every slice of the synthesized array image is now compared with the slice size DecodeColorBuffer offsets slices by (ComputeSurfaceSize of the surface's mip chain, one layer), not just slice 0. A mismatch throws. The view's own surfaceAddress check uses that same size.

#7256 is rebased onto the new tip. Its tests, including LayeredDepthTarget, pass again.

On merge order: understood that this conflicts in Draw.cpp with #6973, #6987, #6989, #6995 and #7002. If any of them lands first I'll rebase this one and #7256 on top.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6240993622 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#issuecomment-6240993622). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-17T21:02:19Z. --- Thanks for the review. Pushed two follow-up commits: **Test: `agc_driver_layered_array_color_draw`** (`tests/execution/LayeredArrayColorDraw.cpp`, modelled on `LayeredVolumeDraw`). A VS exporting the render target index draws one full-screen quad per layer. The PS writes `1 + layer / 2` from the ancillary RT-index field, so each layer gets its own value. The colour view comes from `DecodeColorBuffer` with the layer export set in `PA_CL_VS_OUT_CNTL`: - (a) a `CB_COLOR_VIEW` of slices 1..3 of a four-slice 2D array (R32_FLOAT, 64 KiB R_X, one 64 KiB block per slice). - (b) a one-slice surface viewed as slices 0..2. After `FlushPending` over the surface it checks every word of all four slices in guest memory: - each drawn slice holds its layer's value; - slice 0 in (a) and slice 3 in (b) still hold their initial bytes. It only skips with no device. The `VK_EXT_shader_viewport_index_layer` check is the same one `LayeredVolumeDraw` makes, and lavapipe exposes that extension. I ran it on llvmpipe (LLVM 21.1.8) under WSL Ubuntu and it passes there, not skipped. It also passes on Windows. **Mutation check** (one change at a time; each should make the test fail): | mutation | result | |---|---| | attachment view base layer ignores the view's first slice | fails: slice 1 holds layer 1's value | | decoded layer count one short (`lastSlice - slice`) | fails at the decode check | | `MarkSliceDirty` covers one slice (in `Texture.cpp`) | fails: slice 2 never written back | | `Draw.cpp` passes a dirty count of 1 at every site | fails: slice 2 never written back | One mutation didn't fail: shrinking only the attachment view's `layerCount`, with the framebuffer still at 3 layers. That is undefined behaviour in Vulkan, and the NVIDIA driver still wrote the third layer, so I left it out of the table. **Optional points, both done** (`fix(agc): ...` commit): - `AttachmentView`'s second `Require` now uses `(volume && layer == 0)`, so volumes keep main's guard. - In the resident path, every slice of the synthesized array image is now compared with the slice size `DecodeColorBuffer` offsets slices by (`ComputeSurfaceSize` of the surface's mip chain, one layer), not just slice 0. A mismatch throws. The view's own `surfaceAddress` check uses that same size. #7256 is rebased onto the new tip. Its tests, including `LayeredDepthTarget`, pass again. On merge order: understood that this conflicts in `Draw.cpp` with #6973, #6987, #6989, #6995 and #7002. If any of them lands first I'll rebase this one and #7256 on top. AI-assisted: yes
gjonn commented 2026-10-17 21:27:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-17T21:27:11Z.


Rebased onto main 5f8d2a252 (force-push, head ebe289bdc). No conflicts; main's Draw.cpp/DepthSurface.cpp changes since the previous base (depth plane fill, 5_6_5 and unclamped normalized color targets) merged cleanly. Rebuilt; all 666 agc_* tests pass, including agc_driver_graphics, agc_driver_layered_array_color_draw, agc_driver_array_layer_target, agc_driver_layered_volume_, and the new agc_driver_color565_target, agc_driver_depth_plane_fill, agc_driver_native_depth_bda_clear and agc_pipeline_queue_failure_. check_conventions.py --base origin/main and check_test_registration.py are clean.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6241354594 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#issuecomment-6241354594). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-17T21:27:11Z. --- Rebased onto main 5f8d2a252 (force-push, head ebe289bdc). No conflicts; main's Draw.cpp/DepthSurface.cpp changes since the previous base (depth plane fill, 5_6_5 and unclamped normalized color targets) merged cleanly. Rebuilt; all 666 agc_* tests pass, including agc_driver_graphics, agc_driver_layered_array_color_draw, agc_driver_array_layer_target, agc_driver_layered_volume_*, and the new agc_driver_color565_target, agc_driver_depth_plane_fill, agc_driver_native_depth_bda_clear and agc_pipeline_queue_failure_*. check_conventions.py --base origin/main and check_test_registration.py are clean. AI-assisted: yes
frankea commented 2026-10-18 04:15:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-18T04:15:19Z.


RTX 4090 data point on PPSA01317, continuing the chain from my #7243, #7238 and #7240 runs tonight, where the title stopped on layered draws into a color view of several array slices are unsupported in its cube map pass. Short version: with this PR the pass gets through its colour side on this GPU too, 3 of 3 runs, and the title stops on the depth side (layered rendering with a depth target is unsupported), exactly as the description of #7256 says.

Setup. Gran Turismo 7 PPSA01317 01.000.001 (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release libs target only (no tests built). app.exe is the relink from main 31cbb55d7 (--windows --registry --module-dir .); only libs/ is swapped between runs. Tree: the stack from the earlier runs (main e1041f6a5 + #7137 2aa6bfca6 + #7207 ec28b6be8 + #7175 555b7e824 + #5958 87a9b8d28 + #7243 da158d61f + #7238 4aaf27699 + #7240 7c19c66de, ac5e28d17) merged with this PR's head ebe289bdc (9ea37b61b). The merge brings the PR's base, main 5f8d2a252, with it (115 main commits, none of them libSceHmd2, so the #7323 abort from the #7243 comment does not apply here). One conflict, in Graphics/src/State.cpp: the COMP_SWAP > 1 format list, where the stack's pr7207-branch line and the PR's pre-#7207 main line differ; resolved to current main's line (format != 7 ... && format != 16). With the PR's side taken instead, the title aborts on unsupported color format 7 number type 7 component swap 2 28 s in (3 runs), which is just #7207 missing again, not this PR. The libSceSsl.prx is the one from #7319 (1f267559e). No controller, no input, nobody at the keyboard; one-shot interactive task per run, 600 s cap, box otherwise idle.

Result. All three runs get past the layered colour draw: splash, the black loading screen with the GT spinner (title-bar counter 27 FPS, 1,134 frames at the last capture of run 3), save data mounted, three sceNetResolverStartNtoa -> host DNS lookup failed, 392 further shaders registered, and then, identically every time:

[gpu] driver failure: AGC graphics: layered rendering with a depth target is unsupported
[videoout] presentation failed: AGC graphics: layered rendering with a depth target is unsupported
terminate called after throwing an instance of 'std::runtime_error'
  what():  AGC graphics: layered rendering with a depth target is unsupported
FATAL: abort() (SIGABRT) on thread 17748

No several slices of a surface that is not a 2D array refusal, no layered draw into an array without its resident image, no device loss. With #7256 on top the depth stop goes away as well; that result is on #7256.

run shader cache exit after stop
stack without #7254 (earlier tonight, 3 runs) cold / warm 34 to 40 s layered draws into a color view of several array slices are unsupported
1 warm 42 s layered rendering with a depth target is unsupported
2 warm 35 s same
3 warm 35 s same
stderr of run 3 (warm, box idle) from the second 10 s summary to the abort, the 392 per-shader ShaderRegistry lines removed
[log] 10.5 s: 191 lines (19 stdout, 172 stderr), 26.7 KiB written, 0 repeats coalesced; callers spent 0.32 ms queueing and formatting (0.003% of one thread), logger thread 88.26 ms, queue peak 5.5 KiB
[SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0
[SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000
[shader-disk-cache] (10 s): 118 hits, 0 misses, 0 writes (0.0 MiB), 0 load failures, 0 write failures; resource plans: 112 hits, 0 misses, 0 writes, 0 load failures; 12.6 MiB read in 25.8 ms (totals: 1792 hits, 0 misses, 0 writes; plans 1760 hits, 0 misses)
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[gpu] driver failure: AGC graphics: layered rendering with a depth target is unsupported
[videoout] presentation failed: AGC graphics: layered rendering with a depth target is unsupported
terminate called after throwing an instance of 'std::runtime_error'
  what():  AGC graphics: layered rendering with a depth target is unsupported
FATAL: abort() (SIGABRT) on thread 17748
terminate called after throwing an instance of 'std::runtime_error'
  what():  AGC graphics: layered rendering with a depth target is unsupported

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6245554013 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#issuecomment-6245554013). Originally posted by [frankea](https://github.com/frankea) on 2026-10-18T04:15:19Z. --- RTX 4090 data point on PPSA01317, continuing the chain from my [#7243](https://github.com/boykopovar/AnyPS5/pull/7243#issuecomment-6244924007), #7238 and #7240 runs tonight, where the title stopped on `layered draws into a color view of several array slices are unsupported` in its cube map pass. Short version: with this PR the pass gets through its colour side on this GPU too, 3 of 3 runs, and the title stops on the depth side (`layered rendering with a depth target is unsupported`), exactly as the description of #7256 says. **Setup.** Gran Turismo 7 PPSA01317 **01.000.001** (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release `libs` target only (no tests built). `app.exe` is the relink from `main` 31cbb55d7 (`--windows --registry --module-dir .`); only `libs/` is swapped between runs. Tree: the stack from the earlier runs (`main` e1041f6a5 + #7137 2aa6bfca6 + #7207 ec28b6be8 + #7175 555b7e824 + #5958 87a9b8d28 + #7243 da158d61f + #7238 4aaf27699 + #7240 7c19c66de, ac5e28d17) merged with this PR's head ebe289bdc (9ea37b61b). The merge brings the PR's base, `main` 5f8d2a252, with it (115 `main` commits, none of them libSceHmd2, so the #7323 abort from the #7243 comment does not apply here). One conflict, in `Graphics/src/State.cpp`: the `COMP_SWAP > 1` format list, where the stack's pr7207-branch line and the PR's pre-#7207 `main` line differ; resolved to current `main`'s line (`format != 7 ... && format != 16`). With the PR's side taken instead, the title aborts on `unsupported color format 7 number type 7 component swap 2` 28 s in (3 runs), which is just #7207 missing again, not this PR. The `libSceSsl.prx` is the one from #7319 (1f267559e). No controller, no input, nobody at the keyboard; one-shot interactive task per run, 600 s cap, box otherwise idle. **Result.** All three runs get past the layered colour draw: splash, the black loading screen with the GT spinner (title-bar counter 27 FPS, 1,134 frames at the last capture of run 3), save data mounted, three `sceNetResolverStartNtoa -> host DNS lookup failed`, 392 further shaders registered, and then, identically every time: ``` [gpu] driver failure: AGC graphics: layered rendering with a depth target is unsupported [videoout] presentation failed: AGC graphics: layered rendering with a depth target is unsupported terminate called after throwing an instance of 'std::runtime_error' what(): AGC graphics: layered rendering with a depth target is unsupported FATAL: abort() (SIGABRT) on thread 17748 ``` No `several slices of a surface that is not a 2D array` refusal, no `layered draw into an array without its resident image`, no device loss. With #7256 on top the depth stop goes away as well; that result is on #7256. | run | shader cache | exit after | stop | |---|---|---|---| | stack without #7254 (earlier tonight, 3 runs) | cold / warm | 34 to 40 s | `layered draws into a color view of several array slices are unsupported` | | 1 | warm | 42 s | `layered rendering with a depth target is unsupported` | | 2 | warm | 35 s | same | | 3 | warm | 35 s | same | <details><summary>stderr of run 3 (warm, box idle) from the second 10 s summary to the abort, the 392 per-shader <code>ShaderRegistry</code> lines removed</summary> ```text [log] 10.5 s: 191 lines (19 stdout, 172 stderr), 26.7 KiB written, 0 repeats coalesced; callers spent 0.32 ms queueing and formatting (0.003% of one thread), logger thread 88.26 ms, queue peak 5.5 KiB [SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0 [SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000 [shader-disk-cache] (10 s): 118 hits, 0 misses, 0 writes (0.0 MiB), 0 load failures, 0 write failures; resource plans: 112 hits, 0 misses, 0 writes, 0 load failures; 12.6 MiB read in 25.8 ms (totals: 1792 hits, 0 misses, 0 writes; plans 1760 hits, 0 misses) [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed [gpu] driver failure: AGC graphics: layered rendering with a depth target is unsupported [videoout] presentation failed: AGC graphics: layered rendering with a depth target is unsupported terminate called after throwing an instance of 'std::runtime_error' what(): AGC graphics: layered rendering with a depth target is unsupported FATAL: abort() (SIGABRT) on thread 17748 terminate called after throwing an instance of 'std::runtime_error' what(): AGC graphics: layered rendering with a depth target is unsupported ``` </details> AI-assisted: yes (Claude Code)
jotitadev commented 2026-10-19 03:22:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T03:22:40Z.

Review: COMMENTED


Apple GPU / MoltenVK run. agc_driver_layered_array_color_draw runs on Metal (no skip) and passes, fails without the fix with the original refusal, and the full ^agc suite is unchanged.

Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head ebe289bdc. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704.

Tested: the tree is main a373e85e5 + mugurc's macOS series (ci/macos-series-2) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain main (it doesn't build on macOS yet). One textual conflict in Draw.cpp, in the DrawRecord declaration: that tree's main already has multisampleTargets, and this PR changes targetSlices to a slice/count pair. I kept both. #7671 was applied in the same build (disjoint files: recompiler vs driver). Base on that tree: 40 ^agc failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, the same known failures in every run below.

  • MoltenVK exposes VK_EXT_shader_viewport_index_layer, so the test takes the layered path here. agc_driver_layered_array_color_draw, agc_driver_graphics, agc_driver_array_layer_target, the four agc_driver_layered_volume_* tests and agc_vertex_layer_export pass 3 of 3 on MoltenVK 1.4.2; the new test and agc_driver_graphics also pass 3 of 3 on MoltenVK main + #2704.
  • Without the fix (the four driver files back to the base, tests kept), agc_driver_layered_array_color_draw fails on both drivers with layered draws into a color view of several array slices are unsupported, and agc_driver_graphics fails on the changed decode cases.
  • Full ^agc suite with the PR: 40 of 729 fail on MoltenVK 1.4.2 and 26 of 729 on MoltenVK main + #2704, the same tests as the base on each driver.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5566569967 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#pullrequestreview-5566569967). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-19T03:22:40Z. **Review:** COMMENTED --- <!-- head: ebe289bdc --> Apple GPU / MoltenVK run. `agc_driver_layered_array_color_draw` runs on Metal (no skip) and passes, fails without the fix with the original refusal, and the full `^agc` suite is unchanged. Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head ebe289bdc. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704. **Tested:** the tree is `main` a373e85e5 + mugurc's macOS series (`ci/macos-series-2`) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain `main` (it doesn't build on macOS yet). One textual conflict in `Draw.cpp`, in the `DrawRecord` declaration: that tree's `main` already has `multisampleTargets`, and this PR changes `targetSlices` to a slice/count pair. I kept both. #7671 was applied in the same build (disjoint files: recompiler vs driver). Base on that tree: 40 `^agc` failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, the same known failures in every run below. - MoltenVK exposes `VK_EXT_shader_viewport_index_layer`, so the test takes the layered path here. `agc_driver_layered_array_color_draw`, `agc_driver_graphics`, `agc_driver_array_layer_target`, the four `agc_driver_layered_volume_*` tests and `agc_vertex_layer_export` pass 3 of 3 on MoltenVK 1.4.2; the new test and `agc_driver_graphics` also pass 3 of 3 on MoltenVK main + #2704. - Without the fix (the four driver files back to the base, tests kept), `agc_driver_layered_array_color_draw` fails on both drivers with `layered draws into a color view of several array slices are unsupported`, and `agc_driver_graphics` fails on the changed decode cases. - Full `^agc` suite with the PR: 40 of 729 fail on MoltenVK 1.4.2 and 26 of 729 on MoltenVK main + #2704, the same tests as the base on each driver. GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704) Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
adriadam10 commented 2026-10-19 20:07:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T20:07:00Z.


Rebased onto current main (one adjacency conflict in Draw.cpp: targetSlices next to the new multisampleTargets). Checked that every changed path threw on main, the per-slice pitch validation, the dirty-slice range from MarkSliceDirty(slice, count), that multisampled targets still reject layers > 1, the debt entry, and that agc_driver_layered_array_color_draw checks each layer's value and the untouched slices. Thanks @oneandonlydean, @frankea and @jotitadev for the runs; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6276207076 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7254#issuecomment-6276207076). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T20:07:00Z. --- Rebased onto current main (one adjacency conflict in `Draw.cpp`: `targetSlices` next to the new `multisampleTargets`). Checked that every changed path threw on main, the per-slice pitch validation, the dirty-slice range from `MarkSliceDirty(slice, count)`, that multisampled targets still reject layers > 1, the debt entry, and that `agc_driver_layered_array_color_draw` checks each layer's value and the untouched slices. Thanks @oneandonlydean, @frankea and @jotitadev for the runs; merged.
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!7254
No description provided.