feat(agc): read sampler border colours from the border colour table #6804

Closed
YossiYad wants to merge 18 commits from upstream-pr/6804 into main
YossiYad commented 2026-10-16 12:42:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-16T12:42:48Z.


What

A sampler whose S# takes its border colour from the border colour table (BORDER_COLOR_TYPE 3) and clamps to the border on any axis (clamp modes 4 to 7) throws:

AGC graphics: guest sampler descriptor uses a border color table which is not implemented

#941 stopped the throw when no axis reads the border, which got PPSA21567 past its Armadillo challenges, but the table itself was still missing (#665). This implements it, following the plan @awake-devel posted there.

  • Device. VK_EXT_custom_border_color is enabled when the device has customBorderColors and customBorderColorWithoutFormat (the S# carries no image format). Live table samplers are counted against maxCustomBorderColorSamplers; past it, or on a device without the extension, the sampler throws.
  • Decode. BORDER_COLOR_PTR (S# word 3, bits 0 to 11) names a 16-byte entry at base + ptr * 16. DecodeSamplerResource takes the entry's four dwords and returns them as VK_BORDER_COLOR_FLOAT_CUSTOM_EXT. Without an entry it throws as before, and a sampler paired with an integer image throws until an integer entry is measured.
  • Base. Draws use TA_BC_BASE_ADDR/_HI (context registers 0x20/0x21) and dispatches use TA_CS_BC_BASE_ADDR/_HI (user configuration registers 0x380/0x381), address bits 8 to 47, as Mesa's radeonsi programs them. A dispatch never falls back to the graphics pair. A sampler that reads the table with its pair never written throws, as @ThisIsAkill suggested in #665. The draw handler reads the graphics pair from the queue and passes it to VulkanDevice::Draw, so the decoded draw state, which the pipeline journal stores, does not change.
  • Caching. The entry is read from guest memory when the draw's or dispatch's resources are built. The sampler cache keys on the entry too. A build that read an entry is never marked reusable, so the draw and dispatch resource caches never hand it to a later draw whose entry may have changed.
  • Sampler tables (SamplerTable bindings) still refuse every border mode, as before.

Title. None known. PPSA21567 writes the table (entry 0 is 0.15, 0.5, 0.05, 0.0), but its only table-type sampler clamps to the edge, so after #941 it no longer reaches this path. The tests below are synthetic.

Tested

Current validation (2026-10-25): merged main 16ff208dc3 and reconciled the draw-trace parameters with border-table propagation. AMD Radeon RX 7700 XT, RADV Mesa 26.2.4, Bazzite 44: focused native-FMASK, shader-memory and graphics tests pass on main (3/3); the same pattern plus both border-table execution tests passes on this branch (5/5). Both runs use ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and ctest -V. Zero VUID- errors and no missing-layer warnings. No title or full-suite rerun for this update.

Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release, -DBUILD_TESTING=ON), based on main 66e71b63d:

  • Full build and ctest on Intel UHD Graphics 620 (Mesa 25.2.8 ANV): 1429 of 1431 pass. agc_driver_gated_dispatch_capture and its _short_timeout variant failed under ctest -j4 (11 s instead of 5 s) and pass 3 of 3 each when run alone. agc_driver_border_color_table and agc_driver_border_color_table_registers pass on the Intel GPU and on llvmpipe.

  • New agc_driver_border_color_table: a compute shader samples a 4x3 texture inside and one texel past each edge through a point clamp-to-border S# of type 3. Outside the texture it reads the named entry, another entry, the entry rewritten between two dispatches, and the table at a base moved by 256 bytes; a dispatch with no table base throws. It passes on both Intel UHD 620 (ANV) and llvmpipe, so it also runs on lavapipe in CI. ANV rounds the border colour to the texture's UNORM8 precision (0.5 reads back as 128/255), so border texels are compared within 1/255.

  • New agc_driver_border_color_table_registers, added after @Dextroid17 pointed out that the first test hands the base to VulkanDevice directly and never reaches the register reads. It submits through sceAgcDriverSubmitDcb:

    • a dispatch that sets TA_CS_BC_BASE_ADDR with SET_UCONFIG_REG 0x380/0x381;
    • a draw that sets TA_BC_BASE_ADDR with SET_CONTEXT_REG 0x20/0x21.

    Each samples one texel past the texture's edge through a type 3 S#, and checks the entry's colour, that the other pair naming a different table does not change it, and that a rewritten entry takes effect with the base kept from an earlier submission. A draw after a context clear throws for the missing base. It passes 3 of 3 on the Intel UHD 620 and on llvmpipe. With either handler's register read cut, it fails with the table base register was never written.

  • Negative controls:

    • With the decoder throwing for every table colour again, the new test fails with the old error.
    • With the entry left out of the sampler cache key, it fails on the rewritten entry (it reads 0.149 where 0.25 is expected).
  • agc_driver_graphics: the table-border decode tests replace the rejection test, and new tests decode both register pairs.

  • tools/check_conventions.py --base origin/main passes, and tools/pr_overlap.py reports no overlapping pull request. Windows and macOS were not built here; the draw and dispatch register reads are covered by agc_driver_border_color_table_registers.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 7700 XT (RADV Mesa 26.2.4), Bazzite 44; earlier runs: Intel UHD 620 (ANV Mesa 25.2.8), llvmpipe (Mesa 25.2.8), Ubuntu 24.04; NVIDIA RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 by @jotitadev
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4888527951 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-16T12:42:48Z. --- ### What A sampler whose S# takes its border colour from the border colour table (`BORDER_COLOR_TYPE` 3) and clamps to the border on any axis (clamp modes 4 to 7) throws: ``` AGC graphics: guest sampler descriptor uses a border color table which is not implemented ``` #941 stopped the throw when no axis reads the border, which got PPSA21567 past its Armadillo challenges, but the table itself was still missing (#665). This implements it, following the plan @awake-devel posted there. - **Device.** `VK_EXT_custom_border_color` is enabled when the device has `customBorderColors` and `customBorderColorWithoutFormat` (the S# carries no image format). Live table samplers are counted against `maxCustomBorderColorSamplers`; past it, or on a device without the extension, the sampler throws. - **Decode.** `BORDER_COLOR_PTR` (S# word 3, bits 0 to 11) names a 16-byte entry at `base + ptr * 16`. `DecodeSamplerResource` takes the entry's four dwords and returns them as `VK_BORDER_COLOR_FLOAT_CUSTOM_EXT`. Without an entry it throws as before, and a sampler paired with an integer image throws until an integer entry is measured. - **Base.** Draws use `TA_BC_BASE_ADDR`/`_HI` (context registers 0x20/0x21) and dispatches use `TA_CS_BC_BASE_ADDR`/`_HI` (user configuration registers 0x380/0x381), address bits 8 to 47, as Mesa's radeonsi programs them. A dispatch never falls back to the graphics pair. A sampler that reads the table with its pair never written throws, as @ThisIsAkill suggested in #665. The draw handler reads the graphics pair from the queue and passes it to `VulkanDevice::Draw`, so the decoded draw state, which the pipeline journal stores, does not change. - **Caching.** The entry is read from guest memory when the draw's or dispatch's resources are built. The sampler cache keys on the entry too. A build that read an entry is never marked reusable, so the draw and dispatch resource caches never hand it to a later draw whose entry may have changed. - Sampler tables (`SamplerTable` bindings) still refuse every border mode, as before. **Title.** None known. PPSA21567 writes the table (entry 0 is 0.15, 0.5, 0.05, 0.0), but its only table-type sampler clamps to the edge, so after #941 it no longer reaches this path. The tests below are synthetic. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Current validation (2026-10-25): merged main `16ff208dc3` and reconciled the draw-trace parameters with border-table propagation. AMD Radeon RX 7700 XT, RADV Mesa 26.2.4, Bazzite 44: focused native-FMASK, shader-memory and graphics tests pass on main (3/3); the same pattern plus both border-table execution tests passes on this branch (5/5). Both runs use `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, and `ctest -V`. Zero `VUID-` errors and no missing-layer warnings. No title or full-suite rerun for this update. Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release, `-DBUILD_TESTING=ON`), based on `main` `66e71b63d`: - Full build and `ctest` on Intel UHD Graphics 620 (Mesa 25.2.8 ANV): 1429 of 1431 pass. `agc_driver_gated_dispatch_capture` and its `_short_timeout` variant failed under `ctest -j4` (11 s instead of 5 s) and pass 3 of 3 each when run alone. `agc_driver_border_color_table` and `agc_driver_border_color_table_registers` pass on the Intel GPU and on llvmpipe. - New `agc_driver_border_color_table`: a compute shader samples a 4x3 texture inside and one texel past each edge through a point clamp-to-border S# of type 3. Outside the texture it reads the named entry, another entry, the entry rewritten between two dispatches, and the table at a base moved by 256 bytes; a dispatch with no table base throws. It passes on both Intel UHD 620 (ANV) and llvmpipe, so it also runs on lavapipe in CI. ANV rounds the border colour to the texture's UNORM8 precision (0.5 reads back as 128/255), so border texels are compared within 1/255. - New `agc_driver_border_color_table_registers`, added after @Dextroid17 pointed out that the first test hands the base to `VulkanDevice` directly and never reaches the register reads. It submits through `sceAgcDriverSubmitDcb`: - a dispatch that sets `TA_CS_BC_BASE_ADDR` with `SET_UCONFIG_REG` 0x380/0x381; - a draw that sets `TA_BC_BASE_ADDR` with `SET_CONTEXT_REG` 0x20/0x21. Each samples one texel past the texture's edge through a type 3 S#, and checks the entry's colour, that the other pair naming a different table does not change it, and that a rewritten entry takes effect with the base kept from an earlier submission. A draw after a context clear throws for the missing base. It passes 3 of 3 on the Intel UHD 620 and on llvmpipe. With either handler's register read cut, it fails with `the table base register was never written`. - Negative controls: - With the decoder throwing for every table colour again, the new test fails with the old error. - With the entry left out of the sampler cache key, it fails on the rewritten entry (it reads 0.149 where 0.25 is expected). - `agc_driver_graphics`: the table-border decode tests replace the rejection test, and new tests decode both register pairs. - `tools/check_conventions.py --base origin/main` passes, and `tools/pr_overlap.py` reports no overlapping pull request. Windows and macOS were not built here; the draw and dispatch register reads are covered by `agc_driver_border_color_table_registers`. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: AMD Radeon RX 7700 XT (RADV Mesa 26.2.4), Bazzite 44; earlier runs: Intel UHD 620 (ANV Mesa 25.2.8), llvmpipe (Mesa 25.2.8), Ubuntu 24.04; NVIDIA RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 by @jotitadev <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
jotitadev commented 2026-10-16 15:30:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T15:30:15Z.

Review: COMMENTED


NVIDIA run, since the description covers Intel ANV and lavapipe.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, plus lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same machine. Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head b376cf53b merged onto main bc400bede, clean merge.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04

  • agc_driver_border_color_table passes 3/3 on the RTX 3070 (0.28-0.34 s, border color table tests passed, not skipped) and 3/3 on lavapipe. So the VK_EXT_custom_border_color path with customBorderColorWithoutFormat also works on the NVIDIA proprietary driver. The test compares border texels within 1/255; I did not check whether this driver needs that tolerance.
  • agc_driver_graphics passes 3/3 on both, with the new register-pair decode tests.
  • RTX 3070, ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60: 616 tests. Only agc_driver_store_over_untracked fails, and it fails on unchanged main bc400bede here too (#6347).

Not checked: a red run on this machine. With only the tests on main's sources, GuestSamplerResource.cpp does not compile (it needs BorderColorTableIndex), so I relied on your negative controls. Also not checked: Windows, draw-path execution, titles.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5549987588 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#pullrequestreview-5549987588). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-16T15:30:15Z. **Review:** COMMENTED --- NVIDIA run, since the description covers Intel ANV and lavapipe. **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, plus lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same machine. Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. Head `b376cf53b` merged onto `main` `bc400bede`, clean merge. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04 - `agc_driver_border_color_table` passes 3/3 on the RTX 3070 (0.28-0.34 s, `border color table tests passed`, not skipped) and 3/3 on lavapipe. So the `VK_EXT_custom_border_color` path with `customBorderColorWithoutFormat` also works on the NVIDIA proprietary driver. The test compares border texels within 1/255; I did not check whether this driver needs that tolerance. - `agc_driver_graphics` passes 3/3 on both, with the new register-pair decode tests. - RTX 3070, `ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60`: 616 tests. Only `agc_driver_store_over_untracked` fails, and it fails on unchanged `main` `bc400bede` here too (#6347). Not checked: a red run on this machine. With only the tests on `main`'s sources, `GuestSamplerResource.cpp` does not compile (it needs `BorderColorTableIndex`), so I relied on your negative controls. Also not checked: Windows, draw-path execution, titles. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Dextroid17 commented 2026-10-16 21:06:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-16T21:06:58Z.


Draw-path execution run. The description notes there is no draw execution test, and @jotitadev's review lists draw-path execution as not checked.

Setup: head b376cf53b as is (based on main eb901bcf4), Release, BUILD_TESTING=ON, CachyOS (kernel 7.2.9), i9-11900K, GCC 16.2.1, lavapipe (Mesa 26.2.4, LLVM 23.1.1, Vulkan 1.4.354). Each run used a clean environment and a fresh shader cache. Two probe programs, not committed, were built as execution tests and run as binaries. They submit real DCBs through sceAgcDriverSubmitDcb, so the base registers go through Driver's packet handling, not straight into VulkanDevice.

  • Draw probe: sets TA_BC_BASE_ADDR/_HI with SET_CONTEXT_REG 0x20/0x21, then DRAW_INDEX_AUTO of a full-viewport triangle. The pixel shader samples the 4x3 texture at (-0.5, -0.5) through a clamp-to-border S# of type 3 and exports the result. Each case takes the most common non-zero RGBA8 value in the 1 KiB colour buffer (128 of its 256 pixels in every passing case) and compares each byte within 1. 4 runs, 0 failures in each:
    • entry 2 at the base, then the same draw 8 more times with the entry rewritten in guest memory before each submit. Each draw had the new colour. Over those 9 draws the draw cache counted 9 lookups and 7 hits, so the cache hits also read the rewritten entry.
    • the base not re-sent: the register is kept from the previous submit
    • the base moved by 256 bytes, and the compute pair (0x380) set to a third address in the same submit, which the draw ignores
    • entry 5 at the base
  • Draw probe, type switch: 6 draws with border type 0 (transparent black, checked as no non-zero pixel), then 4 draws with type 3 with the entry rewritten before each, then type 0 again. Every draw had the expected colour, in 4 runs.
  • Draw probe, no base: on a fresh queue, a draw with only the compute pair set throws a sampler reads border color table entry 2, but the table base register was never written (2 runs). The driver keeps its first failure, so a no-base draw later in the same process only gets that error back and is not a separate result. The probe then exits 1 with the same error at shutdown.
  • Controls: a constant-colour pixel shader and a sample inside the texture (128/255) give the expected pixels in the same harness (1 run). An earlier build of the probe, with a vertex shader that put all three vertices on one point, wrote no pixels and failed this control too. The counts above are from the fixed probe only.
  • Compute probe: the same base cases through SET_UCONFIG_REG 0x380/0x381 and DISPATCH_DIRECT (entry, 8 rewrites, base not re-sent, base moved by 256, graphics pair set elsewhere, entry 5), with and without APS5_PIPELINE_DISPATCH=1, 1 run each, 0 failures in each. The type 0 to type 3 switch read the new entry with and without APS5_PIPELINE_DISPATCH=1, 1 run each, on a build with two added log lines in Dispatch.cpp. Those lines showed recipeHit=0 on type 3 rounds 1 to 3 (round 0, a new key, logs nothing), while type 0 rounds 1 to 5 and the type 0 dispatch after the switch logged recipeHit=1. With APS5_PIPELINE_DISPATCH=1 the type 3 dispatches ran inline.
  • Revert arms: with borderColorTable set to std::nullopt at Draw.cpp line 20, the draw probe fails 3 of 3 with the error above. With the same change at Dispatch.cpp line 416, the compute probe fails 3 of 3. agc_driver_border_color_table still passes in both arms (1 run each). By reading, it calls VulkanDevice::Dispatch with the table address as an argument (BorderColorTable.cpp line 128), so it does not reach either register read. The probes cover that step.
  • On the unchanged head, agc_driver_border_color_table and agc_driver_graphics pass 3 of 3 through ctest, as the baseline for the arms above.

If you want a draw execution test in this PR, I can post the probe here (284 lines, setup taken from DrawCacheReuse.cpp).

Not checked: this head merged onto current main bc3c0fc13, which is 156 commits past eb901bcf4. Also not checked: a hardware GPU (lavapipe only), the maxCustomBorderColorSamplers limit, integer-format entries, indirect draws, Windows, titles. CI's build jobs are skipped on this head.

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

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6224704657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6224704657). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-16T21:06:58Z. --- Draw-path execution run. The description notes there is no draw execution test, and @jotitadev's review lists draw-path execution as not checked. **Setup:** head `b376cf53b` as is (based on `main` `eb901bcf4`), Release, `BUILD_TESTING=ON`, CachyOS (kernel 7.2.9), i9-11900K, GCC 16.2.1, lavapipe (Mesa 26.2.4, LLVM 23.1.1, Vulkan 1.4.354). Each run used a clean environment and a fresh shader cache. Two probe programs, not committed, were built as execution tests and run as binaries. They submit real DCBs through `sceAgcDriverSubmitDcb`, so the base registers go through `Driver`'s packet handling, not straight into `VulkanDevice`. - **Draw probe:** sets `TA_BC_BASE_ADDR`/`_HI` with `SET_CONTEXT_REG` 0x20/0x21, then `DRAW_INDEX_AUTO` of a full-viewport triangle. The pixel shader samples the 4x3 texture at (-0.5, -0.5) through a clamp-to-border S# of type 3 and exports the result. Each case takes the most common non-zero RGBA8 value in the 1 KiB colour buffer (128 of its 256 pixels in every passing case) and compares each byte within 1. 4 runs, 0 failures in each: - entry 2 at the base, then the same draw 8 more times with the entry rewritten in guest memory before each submit. Each draw had the new colour. Over those 9 draws the draw cache counted 9 lookups and 7 hits, so the cache hits also read the rewritten entry. - the base not re-sent: the register is kept from the previous submit - the base moved by 256 bytes, and the compute pair (0x380) set to a third address in the same submit, which the draw ignores - entry 5 at the base - **Draw probe, type switch:** 6 draws with border type 0 (transparent black, checked as no non-zero pixel), then 4 draws with type 3 with the entry rewritten before each, then type 0 again. Every draw had the expected colour, in 4 runs. - **Draw probe, no base:** on a fresh queue, a draw with only the compute pair set throws `a sampler reads border color table entry 2, but the table base register was never written` (2 runs). The driver keeps its first failure, so a no-base draw later in the same process only gets that error back and is not a separate result. The probe then exits 1 with the same error at shutdown. - **Controls:** a constant-colour pixel shader and a sample inside the texture (128/255) give the expected pixels in the same harness (1 run). An earlier build of the probe, with a vertex shader that put all three vertices on one point, wrote no pixels and failed this control too. The counts above are from the fixed probe only. - **Compute probe:** the same base cases through `SET_UCONFIG_REG` 0x380/0x381 and `DISPATCH_DIRECT` (entry, 8 rewrites, base not re-sent, base moved by 256, graphics pair set elsewhere, entry 5), with and without `APS5_PIPELINE_DISPATCH=1`, 1 run each, 0 failures in each. The type 0 to type 3 switch read the new entry with and without `APS5_PIPELINE_DISPATCH=1`, 1 run each, on a build with two added log lines in `Dispatch.cpp`. Those lines showed `recipeHit=0` on type 3 rounds 1 to 3 (round 0, a new key, logs nothing), while type 0 rounds 1 to 5 and the type 0 dispatch after the switch logged `recipeHit=1`. With `APS5_PIPELINE_DISPATCH=1` the type 3 dispatches ran inline. - **Revert arms:** with `borderColorTable` set to `std::nullopt` at `Draw.cpp` line 20, the draw probe fails 3 of 3 with the error above. With the same change at `Dispatch.cpp` line 416, the compute probe fails 3 of 3. `agc_driver_border_color_table` still passes in both arms (1 run each). By reading, it calls `VulkanDevice::Dispatch` with the table address as an argument (`BorderColorTable.cpp` line 128), so it does not reach either register read. The probes cover that step. - On the unchanged head, `agc_driver_border_color_table` and `agc_driver_graphics` pass 3 of 3 through ctest, as the baseline for the arms above. If you want a draw execution test in this PR, I can post the probe here (284 lines, setup taken from `DrawCacheReuse.cpp`). Not checked: this head merged onto current `main` `bc3c0fc13`, which is 156 commits past `eb901bcf4`. Also not checked: a hardware GPU (lavapipe only), the `maxCustomBorderColorSamplers` limit, integer-format entries, indirect draws, Windows, titles. CI's build jobs are skipped on this head. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine. AI-assisted: yes
TheSovietWaffle commented 2026-10-17 11:29:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-17T11:29:34Z.


Windows data point: head b376cf53b as-is, Release, Windows 10 Pro 22H2 (19045), WinLibs GCC 15.2.0 r7. agc_driver_border_color_table passes on both devices of this host, chosen with ANYPS5_GPU:

  • NVIDIA RTX 3080 (617.42): 5 of 5.
  • AMD Radeon Graphics (Raphael iGPU, 1002:164e, AMD Windows driver): 3 of 3.

Not checked: other tests, titles.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233361278 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6233361278). Originally posted by [TheSovietWaffle](https://github.com/TheSovietWaffle) on 2026-10-17T11:29:34Z. --- Windows data point: head `b376cf53b` as-is, Release, Windows 10 Pro 22H2 (19045), WinLibs GCC 15.2.0 r7. `agc_driver_border_color_table` passes on both devices of this host, chosen with `ANYPS5_GPU`: - NVIDIA RTX 3080 (617.42): 5 of 5. - AMD Radeon Graphics (Raphael iGPU, `1002:164e`, AMD Windows driver): 3 of 3. Not checked: other tests, titles. AI-assisted: yes (Claude Code).
YossiYad commented 2026-10-17 11:45:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-17T11:45:16Z.


@jotitadev thanks for the NVIDIA run. Good to see customBorderColorWithoutFormat work on the proprietary driver as well.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233497801 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6233497801). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-17T11:45:16Z. --- @jotitadev thanks for the NVIDIA run. Good to see `customBorderColorWithoutFormat` work on the proprietary driver as well.
YossiYad commented 2026-10-17 13:19:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-17T13:19:25Z.


@Dextroid17 thanks, that is the step the test didn't reach. I'll add a draw and a dispatch execution test that set the base through SET_CONTEXT_REG and SET_UCONFIG_REG and submit through the driver, so the register reads are covered in the PR itself.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234361377 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6234361377). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-17T13:19:25Z. --- @Dextroid17 thanks, that is the step the test didn't reach. I'll add a draw and a dispatch execution test that set the base through `SET_CONTEXT_REG` and `SET_UCONFIG_REG` and submit through the driver, so the register reads are covered in the PR itself.
YossiYad commented 2026-10-17 13:19:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-17T13:19:26Z.


@TheSovietWaffle thanks for the Windows runs on NVIDIA and AMD.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6234361523 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6234361523). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-17T13:19:26Z. --- @TheSovietWaffle thanks for the Windows runs on NVIDIA and AMD.
jotitadev commented 2026-10-17 15:09:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-17T15:09:16Z.

Review: COMMENTED


Re-run on 7f8812e96 for the new register test, on NVIDIA and lavapipe.

Machine: Ubuntu 26.04, i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. Head 7f8812e96 merged onto main 47a266cf9 (clean). ANYPS5_NO_SHADER_CACHE=1, -j1 --timeout 30.

Run RTX 3070 lavapipe
agc_driver_border_color_table_registers, agc_driver_border_color_table, agc_driver_graphics pass 3/3 pass
^agc (651 tests) 651/651 (main: 649/649) 651/651 (main: 649/649)
Draw.cpp passes no table base (borderColorTable = std::nullopt) ..._registers fails: a sampler reads border color table entry 2, but the table base register was never written; agc_driver_border_color_table passes same
Dispatch.cpp passes no table base ..._registers fails: compute shader ...: a sampler reads border color table entry 2, but the table base register was never written; agc_driver_border_color_table passes same

So the new test covers the TA_BC_BASE_ADDR and TA_CS_BC_BASE_ADDR reads on the draw and dispatch paths that @Dextroid17 pointed out. The older test does not cover them. In both broken runs the error escapes as terminate (ctest reports Subprocess aborted), not through the test's own catch in main.

Not run: Windows, AMD, Intel, any title.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5558396423 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#pullrequestreview-5558396423). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-17T15:09:16Z. **Review:** COMMENTED --- Re-run on `7f8812e96` for the new register test, on NVIDIA and lavapipe. **Machine:** Ubuntu 26.04, i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. NVIDIA GeForce RTX 3070 (driver 595.99.02) and lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same host. Head `7f8812e96` merged onto `main` `47a266cf9` (clean). `ANYPS5_NO_SHADER_CACHE=1`, `-j1 --timeout 30`. | Run | RTX 3070 | lavapipe | |---|---|---| | `agc_driver_border_color_table_registers`, `agc_driver_border_color_table`, `agc_driver_graphics` | pass 3/3 | pass | | `^agc` (651 tests) | 651/651 (`main`: 649/649) | 651/651 (`main`: 649/649) | | `Draw.cpp` passes no table base (`borderColorTable = std::nullopt`) | `..._registers` fails: `a sampler reads border color table entry 2, but the table base register was never written`; `agc_driver_border_color_table` passes | same | | `Dispatch.cpp` passes no table base | `..._registers` fails: `compute shader ...: a sampler reads border color table entry 2, but the table base register was never written`; `agc_driver_border_color_table` passes | same | So the new test covers the `TA_BC_BASE_ADDR` and `TA_CS_BC_BASE_ADDR` reads on the draw and dispatch paths that @Dextroid17 pointed out. The older test does not cover them. In both broken runs the error escapes as `terminate` (ctest reports `Subprocess aborted`), not through the test's own `catch` in `main`. Not run: Windows, AMD, Intel, any title. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02) and lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
YossiYad commented 2026-10-18 06:52:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-18T06:52:20Z.


@jotitadev thanks for the re-run on the register test.

Rebased onto current main (head 6aa198507, main 66e71b63d). The only conflict was in VulkanDevice.cpp, where main added PresyncCounts next to PrepareDispatch; I kept it as it is on main and added the borderColorTable parameter. The other commits are unchanged.

On the rebased head, the full build passes, and agc_driver_border_color_table and agc_driver_border_color_table_registers pass on Intel UHD 620 (ANV) and llvmpipe. Full ctest on the Intel GPU: 1429 of 1431; the two agc_driver_gated_dispatch_capture tests failed under -j4 and pass 3 of 3 each when run alone.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6246772266 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6246772266). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-18T06:52:20Z. --- @jotitadev thanks for the re-run on the register test. Rebased onto current `main` (head `6aa198507`, `main` `66e71b63d`). The only conflict was in `VulkanDevice.cpp`, where `main` added `PresyncCounts` next to `PrepareDispatch`; I kept it as it is on `main` and added the `borderColorTable` parameter. The other commits are unchanged. On the rebased head, the full build passes, and `agc_driver_border_color_table` and `agc_driver_border_color_table_registers` pass on Intel UHD 620 (ANV) and llvmpipe. Full `ctest` on the Intel GPU: 1429 of 1431; the two `agc_driver_gated_dispatch_capture` tests failed under `-j4` and pass 3 of 3 each when run alone.
YossiYad commented 2026-10-19 10:11:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-19T10:11:58Z.


Rebased onto current main (head 4f68fde80, main 36f60df9e). The only conflict was in Graphics/include/State.hpp, where main declared NormalizeUnusedViewportDepth at the spot where this PR declares the border colour table base; I kept both. The other commits are unchanged, and the added and removed lines match the previous head line for line.

On the rebased head the full build passes, and agc_driver_border_color_table and agc_driver_border_color_table_registers pass 3 of 3 on the RX 7700 XT (RADV). Five other tests fail in the full ctest here (application_heap_lazy, agc_driver_tessellation, agc_driver_bda_device, agc_driver_image_table_vouched_lookups, agc_driver_guest_memory_lifetime), and they fail the same way on plain main on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6264821286 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6264821286). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-19T10:11:58Z. --- Rebased onto current `main` (head `4f68fde80`, `main` `36f60df9e`). The only conflict was in `Graphics/include/State.hpp`, where `main` declared `NormalizeUnusedViewportDepth` at the spot where this PR declares the border colour table base; I kept both. The other commits are unchanged, and the added and removed lines match the previous head line for line. On the rebased head the full build passes, and `agc_driver_border_color_table` and `agc_driver_border_color_table_registers` pass 3 of 3 on the RX 7700 XT (RADV). Five other tests fail in the full `ctest` here (`application_heap_lazy`, `agc_driver_tessellation`, `agc_driver_bda_device`, `agc_driver_image_table_vouched_lookups`, `agc_driver_guest_memory_lifetime`), and they fail the same way on plain `main` on this machine.
YossiYad commented 2026-10-19 10:15:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-19T10:15:59Z.


@adriadam10 this is rebased onto current main and mergeable again (head 4f68fde80), with an approval from @Dextroid17 and runs on NVIDIA, AMD, Intel and lavapipe above. Ready for review when you have a moment.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6264892751 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6264892751). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-19T10:15:59Z. --- @adriadam10 this is rebased onto current `main` and mergeable again (head `4f68fde80`), with an approval from @Dextroid17 and runs on NVIDIA, AMD, Intel and lavapipe above. Ready for review when you have a moment.
YossiYad commented 2026-10-19 13:51:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-19T13:51:33Z.


Rebased onto current main (head 78edb1495e). The only conflict was in Execution/src/Driver/Draw/Draw.cpp, where main now computes QueuedDrawReadRanges and passes the reads to Queue0().Enqueue; I kept that and the borderColorTable capture on the commit lambda together. The other commits are unchanged, and the added and removed lines match the previous head line for line.

On the rebased head the full build passes, and agc_driver_border_color_table, agc_driver_border_color_table_registers and agc_driver_image_sample_border_color pass here (3/3 each, --repeat until-fail) on RADV.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6268845352 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6268845352). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-19T13:51:33Z. --- Rebased onto current `main` (head `78edb1495e`). The only conflict was in `Execution/src/Driver/Draw/Draw.cpp`, where `main` now computes `QueuedDrawReadRanges` and passes the reads to `Queue0().Enqueue`; I kept that and the `borderColorTable` capture on the commit lambda together. The other commits are unchanged, and the added and removed lines match the previous head line for line. On the rebased head the full build passes, and `agc_driver_border_color_table`, `agc_driver_border_color_table_registers` and `agc_driver_image_sample_border_color` pass here (3/3 each, `--repeat until-fail`) on RADV.
YossiYad commented 2026-10-19 21:17:35 +00:00 (Migrated from github.com)

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


Rebased onto current main (head 7d1e77541, main bf2c63f85), with two changes beyond the rebase:

  • main added a second queued commitDraw call for direct draws, which no longer compiled against this PR's signature. It now captures borderColorTable and passes it on, the same as the recipe path. That is folded into feat(agc): read table border colours when a draw builds its samplers.
  • main now warns on debt entries over 1000 characters, and this PR's entry was 1438. I shortened it to 916 and put the gap first (not measured on a PS5 or seen in a title). The facts in it are the same.

The other text conflict was an include in Dispatch.cpp (kept both). Apart from those two changes, the added and removed lines match the previous head.

On the rebased head the full build passes, agc_driver_border_color_table and agc_driver_border_color_table_registers pass 3 of 3 on RADV, and check_conventions has no findings. The full ctest has 6 failures here (application_heap_lazy, application_heap_scripting, agc_driver_tessellation, agc_driver_bda_device, agc_driver_image_table_vouched_lookups, agc_driver_guest_memory_lifetime), and all six fail the same way on plain main on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6277520771 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6277520771). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-19T21:17:35Z. --- Rebased onto current `main` (head `7d1e77541`, `main` `bf2c63f85`), with two changes beyond the rebase: - `main` added a second queued `commitDraw` call for direct draws, which no longer compiled against this PR's signature. It now captures `borderColorTable` and passes it on, the same as the recipe path. That is folded into `feat(agc): read table border colours when a draw builds its samplers`. - `main` now warns on debt entries over 1000 characters, and this PR's entry was 1438. I shortened it to 916 and put the gap first (not measured on a PS5 or seen in a title). The facts in it are the same. The other text conflict was an include in `Dispatch.cpp` (kept both). Apart from those two changes, the added and removed lines match the previous head. On the rebased head the full build passes, `agc_driver_border_color_table` and `agc_driver_border_color_table_registers` pass 3 of 3 on RADV, and `check_conventions` has no findings. The full `ctest` has 6 failures here (`application_heap_lazy`, `application_heap_scripting`, `agc_driver_tessellation`, `agc_driver_bda_device`, `agc_driver_image_table_vouched_lookups`, `agc_driver_guest_memory_lifetime`), and all six fail the same way on plain `main` on this machine.
YossiYad commented 2026-10-20 14:35:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-20T14:35:23Z.


Rebased onto current main (head ba13cf766, main 5f7e30233). The only conflict was the Draw declaration in VulkanDevice.hpp, where main added DrawInputsInPlace() right below it; I kept both. The added and removed lines match the previous head, and the three Draw call sites still pass borderColorTable.

On the rebased head the full build passes, agc_driver_border_color_table and agc_driver_border_color_table_registers pass 3 of 3 on RADV, and check_conventions has no findings. The full ctest has 5 failures here (application_heap_lazy, application_heap_scripting, agc_driver_tessellation, agc_driver_guest_memory_lifetime, agc_driver_image_array_window_past_layer_limit). The last two fail 3 of 3 on plain main on this machine as well, and the first three are the known ones from my previous rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293379805 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6293379805). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-20T14:35:23Z. --- Rebased onto current `main` (head `ba13cf766`, `main` `5f7e30233`). The only conflict was the `Draw` declaration in `VulkanDevice.hpp`, where `main` added `DrawInputsInPlace()` right below it; I kept both. The added and removed lines match the previous head, and the three `Draw` call sites still pass `borderColorTable`. On the rebased head the full build passes, `agc_driver_border_color_table` and `agc_driver_border_color_table_registers` pass 3 of 3 on RADV, and `check_conventions` has no findings. The full `ctest` has 5 failures here (`application_heap_lazy`, `application_heap_scripting`, `agc_driver_tessellation`, `agc_driver_guest_memory_lifetime`, `agc_driver_image_array_window_past_layer_limit`). The last two fail 3 of 3 on plain `main` on this machine as well, and the first three are the known ones from my previous rebase.
YossiYad commented 2026-10-21 06:54:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-21T06:54:05Z.


Merged current main into the branch again (head 0a4de8265, main 7ce3b1df3), on top of the earlier merge, so nothing was rewritten. main added a threadGroup parameter to DispatchIndirect and dispatch, the same functions this PR gives a trailing borderColorTable. Both are kept now, threadGroup first and borderColorTable after it, and the direct Dispatch passes {} for the thread group. In the debt file main rewrote the FORCE_DEGAMMA entry next to the border colour entry; I took main's text and kept ours. Apart from those signatures, the PR's added and removed lines against main match the previous head.

The full build passes, the three border_color tests pass 3 of 3 on RADV, and check_conventions has no findings. agc_driver_image_array_window_past_layer_limit fails here, but it fails the same way on main 7ce3b1df3 (a sampled value of 107/255 where 147 is expected), so it isn't from this PR.

@Dextroid17 thanks for the approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309994568 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6309994568). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-21T06:54:05Z. --- Merged current `main` into the branch again (head `0a4de8265`, `main` `7ce3b1df3`), on top of the earlier merge, so nothing was rewritten. `main` added a `threadGroup` parameter to `DispatchIndirect` and `dispatch`, the same functions this PR gives a trailing `borderColorTable`. Both are kept now, `threadGroup` first and `borderColorTable` after it, and the direct `Dispatch` passes `{}` for the thread group. In the debt file `main` rewrote the `FORCE_DEGAMMA` entry next to the border colour entry; I took `main`'s text and kept ours. Apart from those signatures, the PR's added and removed lines against `main` match the previous head. The full build passes, the three `border_color` tests pass 3 of 3 on RADV, and `check_conventions` has no findings. `agc_driver_image_array_window_past_layer_limit` fails here, but it fails the same way on `main` `7ce3b1df3` (a sampled value of 107/255 where 147 is expected), so it isn't from this PR. @Dextroid17 thanks for the approval.
YossiYad commented 2026-10-22 05:34:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-22T05:34:41Z.


@oneandonlydean @adriadam10 ready from my side: it merges cleanly, CI is green, Dextroid17 approved it, and Dextroid17 and TheSovietWaffle both ran it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6333570164 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6333570164). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-22T05:34:41Z. --- @oneandonlydean @adriadam10 ready from my side: it merges cleanly, CI is green, Dextroid17 approved it, and Dextroid17 and TheSovietWaffle both ran it.
YossiYad commented 2026-10-22 13:07:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-22T13:07:23Z.


Merged current main (3ca07d086) into the branch again (head 321bff9a5). main added an htileClear parameter to Dispatch and dispatch, in the same spot as this PR's borderColorTable. Both are kept, htileClear first, and the calls that pass borderColorTable by position (DispatchIndirect into dispatch, and BorderColorTable.cpp) now pass std::nullopt for it. The full build is clean, and the three border colour tests and native_depth_bda_clear pass 3 of 3 (the latter skips on this GPU). Across all 639 AGC tests the only failures on this machine are image_array_window_past_layer_limit and tessellation, which fail the same way on main. pixel_interlock failed once in the full parallel run and then passed every rerun, alone and in parallel.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6341518803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#issuecomment-6341518803). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-22T13:07:23Z. --- Merged current `main` (`3ca07d086`) into the branch again (head `321bff9a5`). `main` added an `htileClear` parameter to `Dispatch` and `dispatch`, in the same spot as this PR's `borderColorTable`. Both are kept, `htileClear` first, and the calls that pass `borderColorTable` by position (`DispatchIndirect` into `dispatch`, and `BorderColorTable.cpp`) now pass `std::nullopt` for it. The full build is clean, and the three border colour tests and `native_depth_bda_clear` pass 3 of 3 (the latter skips on this GPU). Across all 639 AGC tests the only failures on this machine are `image_array_window_past_layer_limit` and `tessellation`, which fail the same way on `main`. `pixel_interlock` failed once in the full parallel run and then passed every rerun, alone and in parallel.
CnRJay commented 2026-11-01 20:00:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T20:00:18Z.

Review: COMMENTED


Correction (2026-11-01): the title-ID/log demand below is not a CONTRIBUTING requirement; Unblocks: none is allowed. The technical points below are unaffected.

1. No title reaches this on main. The body says "Title. None known" and "Unblocks: none": PPSA21567 writes the table but its only table-type sampler clamps to the edge and no longer reaches the path after #941. The tests are synthetic. With no title ID and log line this is a new device feature (VK_EXT_custom_border_color plumbing, register reads, sampler counting) that nothing running exercises, which is the kind of PR that gets closed.

2. Draws that read the table are never cached. "A build that read an entry is never marked reusable, so the draw and dispatch resource caches never hand it to a later draw whose entry may have changed." Every draw or dispatch with a table-type border sampler therefore rebuilds its resources from scratch, each time. That may be the only exact option, but the cost is unmeasured: please say how a title using this pays it (a counter for uncached builds), or key the cache on the entry bytes as the sampler cache already does so the draw cache can be reused when the entry is unchanged.

3. Custom border sampler budget. Samplers are counted against maxCustomBorderColorSamplers and the sampler "throws" past it. Does a sampler that is released (the fetch_sub paths in DecodeSamplerResource) always get released when a sampler-cache entry is evicted or when a build fails after the sampler was created? A leak here turns into a permanent throw after N draws, and I do not see a test that creates and drops more than the limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729958262 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#pullrequestreview-5729958262). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T20:00:18Z. **Review:** COMMENTED --- **Correction (2026-11-01):** the title-ID/log demand below is not a CONTRIBUTING requirement; `Unblocks: none` is allowed. The technical points below are unaffected. **1. No title reaches this on `main`.** The body says "Title. None known" and "Unblocks: none": PPSA21567 writes the table but its only table-type sampler clamps to the edge and no longer reaches the path after #941. The tests are synthetic. With no title ID and log line this is a new device feature (`VK_EXT_custom_border_color` plumbing, register reads, sampler counting) that nothing running exercises, which is the kind of PR that gets closed. **2. Draws that read the table are never cached.** "A build that read an entry is never marked reusable, so the draw and dispatch resource caches never hand it to a later draw whose entry may have changed." Every draw or dispatch with a table-type border sampler therefore rebuilds its resources from scratch, each time. That may be the only exact option, but the cost is unmeasured: please say how a title using this pays it (a counter for uncached builds), or key the cache on the entry bytes as the sampler cache already does so the draw cache can be reused when the entry is unchanged. **3. Custom border sampler budget.** Samplers are counted against `maxCustomBorderColorSamplers` and the sampler "throws" past it. Does a sampler that is released (the `fetch_sub` paths in `DecodeSamplerResource`) always get released when a sampler-cache entry is evicted or when a build fails after the sampler was created? A leak here turns into a permanent throw after N draws, and I do not see a test that creates and drops more than the limit.
adriadam10 commented 2026-11-08 03:10:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-08T03:10:58Z.

Review: CHANGES_REQUESTED


This no longer merges with current main, and a mechanical rebase is not enough:

  • Conflicts. git merge-tree against main conflicts in VulkanDevice.hpp, VulkanDevice.cpp, Dispatch.cpp, ShaderResources.hpp and ShaderResources.cpp. Replaying the commits one by one also hits Driver.hpp and Draw/Draw.cpp: main moved the draw path into DrawTail, with the new trace and shape parameters on Draw/commitDraw, so where borderColorTable is captured and passed on needs re-deciding, not just merging. The new tests go through that path, so they need rerunning after it.
  • History. The branch carries seven merge commits (372c509265, 0a4de8265b, 321bff9a5c, 9d9cd22707, 132ee009f4, 0853681320 and the earlier ones). CONTRIBUTING asks for a linear history, so please rebase onto main instead of merging it again.
  • Requested by @oneandonlydean, not done yet. Drop the integer-table rejection assertion at core/libs/prx/libSceAgcDriver/tests/GuestSamplerResource.cpp:566 (DecodeSamplerResource(words, false, false, true, &tableColor) expecting "integer border color from the border color table"). The production check marks that path as unimplemented, so the assertion would fail once it is implemented. Keep the positive custom-float cases and the missing-entry checks.

After the rebase, rerun agc_driver_border_color_table, agc_driver_border_color_table_registers and agc_driver_graphics. The rest was checked in earlier reviews and is unchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5816281652 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#pullrequestreview-5816281652). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-11-08T03:10:58Z. **Review:** CHANGES_REQUESTED --- This no longer merges with current `main`, and a mechanical rebase is not enough: - **Conflicts.** `git merge-tree` against `main` conflicts in `VulkanDevice.hpp`, `VulkanDevice.cpp`, `Dispatch.cpp`, `ShaderResources.hpp` and `ShaderResources.cpp`. Replaying the commits one by one also hits `Driver.hpp` and `Draw/Draw.cpp`: `main` moved the draw path into `DrawTail`, with the new trace and `shape` parameters on `Draw`/`commitDraw`, so where `borderColorTable` is captured and passed on needs re-deciding, not just merging. The new tests go through that path, so they need rerunning after it. - **History.** The branch carries seven merge commits (`372c509265`, `0a4de8265b`, `321bff9a5c`, `9d9cd22707`, `132ee009f4`, `0853681320` and the earlier ones). CONTRIBUTING asks for a linear history, so please rebase onto `main` instead of merging it again. - **Requested by @oneandonlydean, not done yet.** Drop the integer-table rejection assertion at `core/libs/prx/libSceAgcDriver/tests/GuestSamplerResource.cpp:566` (`DecodeSamplerResource(words, false, false, true, &tableColor)` expecting "integer border color from the border color table"). The production check marks that path as unimplemented, so the assertion would fail once it is implemented. Keep the positive custom-float cases and the missing-entry checks. After the rebase, rerun `agc_driver_border_color_table`, `agc_driver_border_color_table_registers` and `agc_driver_graphics`. The rest was checked in earlier reviews and is unchanged.
MarcZX10 commented 2026-11-20 05:58:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T05:58:28Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the implementation and inspected tests support the stated border colour table behavior.

What I ran

Reviewed head 0853681320bb72964e9eea75cdbb1586d734d066. No commands or tests were run in this review; validation results in the PR description are author reported.

Results

Check Result Note
Code review passed Core decode, register, cache, and sampler paths inspected
Build and tests not run PR description reports focused tests; not run here

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp and core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was excluded from the review folder; their relevant changed regions were inspected through the pinned reader and diff. Other full changed-file texts listed as included in manifest.json were read selectively, not exhaustively. No build, tests, CI, or physical-console behavior was independently verified. The PR description's reported test results were not rerun.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5988203372 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6804#pullrequestreview-5988203372). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T05:58:28Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the implementation and inspected tests support the stated border colour table behavior. ## What I ran Reviewed head `0853681320bb72964e9eea75cdbb1586d734d066`. No commands or tests were run in this review; validation results in the PR description are author reported. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | Core decode, register, cache, and sampler paths inspected | | Build and tests | not run | PR description reports focused tests; not run here | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` and `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` was excluded from the review folder; their relevant changed regions were inspected through the pinned reader and diff. Other full changed-file texts listed as included in `manifest.json` were read selectively, not exhaustively. No build, tests, CI, or physical-console behavior was independently verified. The PR description's reported test results were not rerun. ## To get this to a good state Nothing is required.

Pull request closed

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!6804
No description provided.