fix(agc): offset the CMASK of a plain color target slice by its slice #7668

Open
ArielWolle wants to merge 5 commits from upstream-pr/7668 into main
ArielWolle commented 2026-10-18 21:24:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ArielWolle on 2026-10-18T21:24:55Z.


What

A color view that selects slice N of a single-sample, single-mip 2D color target (CB_COLOR_VIEW slice start N, the surface itself without an array depth) with CMASK fast clear enabled threw CMASK fast clears of a 3D or array color target are unsupported. The decode moves the color address by N slices (ComputeSurfaceSize per slice) but kept the CMASK register's address.

The CMASK of slice N is now read N whole-slice CMASKs after the CMASK register (slice * totalBlocks * CmaskLayout::Alignment, the same block count the base mip 0 path already computes). The color address, the CMASK range check and the clear itself then follow the slice. The slice also goes into the in-block swizzle: AMD Addrlib's HwlComputeCmaskAddrFromCoord (Mesa mesa-25.2.0) passes it as the pattern's Z coordinate, and the pipe-aligned 16-pipe pattern puts Z0..Z3 into nibble bits 12, 11, 10 and 9. CmaskLayout::Nibble takes the slice and XORs it in, on the CPU path and in the clear shader (CmaskClear.comp, push constant slice). A uniform CMASK reads the same at every slice. Still throwing: a 3D target, a target with an array depth (CB_COLOR_ATTRIB3 MIP0_DEPTH), and a slice of a mipmapped target. Multisampled targets keep their own CMASK per slice.

Why this layout: PPSA34063 (NHL 27) binds one base register and one CMASK register for all six slices of a 512x512, 8-byte-texel target and selects the slice in CB_COLOR_VIEW. The color of slice 1 lies 2 MiB after the base (one slice of that surface). The CMASK memory behind the register holds six consecutive 4 KiB blocks, all expanded (0xF), then zeros. That is one 4 KiB block per slice, which is the stride used here. The stride and the swizzle come from Addrlib and the register values and memory, not checked on a console; the debt file says so.

Tested

Windows 11 (build 26200), MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 3070, driver 617.42.

  • cmake --build build-nhl --target agc_driver_graphics_tests, then agc_driver_graphics_tests.exe with build-nhl/core/libs/libs/unpatched first on PATH: ends with Graphics validation tests passed. New cases in cmaskTests: slice 0 keeps the CMASK register address; slice 2 of a 64x4 target decodes at register + 2 blocks; slice 1 of a 1024x1024 target (two blocks per slice) decodes at register + 2 blocks with a two-block cmaskBytes; a slice of a mipmapped target still fails with slice of a mipmapped. The existing array and volume rejections still pass. Run on 48d61f53b; State.cpp is identical on current main (0d1c299a9), and the patch applies to it without changes.
  • Slice swizzle (355e85a99), run on my integration build (this branch plus other open PRs, not a build of the branch alone): agc_driver_graphics_tests passes, and agc_driver_cmask_fast_clear_tests (with ANYPS5_REQUIRE_VULKAN=1) passes with new runs that clear partial CMASKs of slices 1, 2, 3 and 8 through the draw and eliminate paths. ColorTargetLayout.cpp pins 14 nibbles for slices 1-15, evaluated from the Mesa pattern text, not from this code; the slice 0 values reproduce the existing references. With the shader's XOR removed the CMASK test fails at slice 1.
  • python tools/check_conventions.py --base origin/main: all checks passed.
  • PPSA34063: before the change the title aborts at its menu with this message (slot 0, 512x512, slice 1..1). With the change the decode succeeds and the title goes on to the next unsupported feature (layered draws into a color view of several array slices are unsupported), which this PR does not touch. The title was run with a local video output switch that is not part of this change.
  • Not tested: Linux, macOS. On the title the slice's CMASK was expanded when it reached it, so nothing was cleared there; the clears of slices above 0 are covered by agc_driver_cmask_fast_clear_tests, not by the title.

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: PPSA34063 #4275 (this stop only; the next is layered draws into several array slices)
  • GPUs tested: NVIDIA GeForce RTX 3070, driver 617.42, Windows 11 (build 26200): the unit tests and the title's decode; a fast clear of a slice was not drawn
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4912941047 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668). Originally posted by [ArielWolle](https://github.com/ArielWolle) on 2026-10-18T21:24:55Z. --- ### What A color view that selects slice N of a single-sample, single-mip 2D color target (`CB_COLOR_VIEW` slice start N, the surface itself without an array depth) with CMASK fast clear enabled threw `CMASK fast clears of a 3D or array color target are unsupported`. The decode moves the color address by N slices (`ComputeSurfaceSize` per slice) but kept the CMASK register's address. The CMASK of slice N is now read N whole-slice CMASKs after the CMASK register (`slice * totalBlocks * CmaskLayout::Alignment`, the same block count the base mip 0 path already computes). The color address, the CMASK range check and the clear itself then follow the slice. The slice also goes into the in-block swizzle: AMD Addrlib's `HwlComputeCmaskAddrFromCoord` (Mesa `mesa-25.2.0`) passes it as the pattern's Z coordinate, and the pipe-aligned 16-pipe pattern puts Z0..Z3 into nibble bits 12, 11, 10 and 9. `CmaskLayout::Nibble` takes the slice and XORs it in, on the CPU path and in the clear shader (`CmaskClear.comp`, push constant `slice`). A uniform CMASK reads the same at every slice. Still throwing: a 3D target, a target with an array depth (`CB_COLOR_ATTRIB3` MIP0_DEPTH), and a slice of a mipmapped target. Multisampled targets keep their own CMASK per slice. Why this layout: PPSA34063 (NHL 27) binds one base register and one CMASK register for all six slices of a 512x512, 8-byte-texel target and selects the slice in `CB_COLOR_VIEW`. The color of slice 1 lies 2 MiB after the base (one slice of that surface). The CMASK memory behind the register holds six consecutive 4 KiB blocks, all expanded (0xF), then zeros. That is one 4 KiB block per slice, which is the stride used here. The stride and the swizzle come from Addrlib and the register values and memory, not checked on a console; the debt file says so. ### Tested Windows 11 (build 26200), MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 3070, driver 617.42. - `cmake --build build-nhl --target agc_driver_graphics_tests`, then `agc_driver_graphics_tests.exe` with `build-nhl/core/libs/libs/unpatched` first on `PATH`: ends with `Graphics validation tests passed`. New cases in `cmaskTests`: slice 0 keeps the CMASK register address; slice 2 of a 64x4 target decodes at register + 2 blocks; slice 1 of a 1024x1024 target (two blocks per slice) decodes at register + 2 blocks with a two-block `cmaskBytes`; a slice of a mipmapped target still fails with `slice of a mipmapped`. The existing array and volume rejections still pass. Run on `48d61f53b`; `State.cpp` is identical on current `main` (`0d1c299a9`), and the patch applies to it without changes. - Slice swizzle (355e85a99), run on my integration build (this branch plus other open PRs, not a build of the branch alone): `agc_driver_graphics_tests` passes, and `agc_driver_cmask_fast_clear_tests` (with `ANYPS5_REQUIRE_VULKAN=1`) passes with new runs that clear partial CMASKs of slices 1, 2, 3 and 8 through the draw and eliminate paths. `ColorTargetLayout.cpp` pins 14 nibbles for slices 1-15, evaluated from the Mesa pattern text, not from this code; the slice 0 values reproduce the existing references. With the shader's XOR removed the CMASK test fails at slice 1. - `python tools/check_conventions.py --base origin/main`: all checks passed. - PPSA34063: before the change the title aborts at its menu with this message (slot 0, 512x512, slice 1..1). With the change the decode succeeds and the title goes on to the next unsupported feature (`layered draws into a color view of several array slices are unsupported`), which this PR does not touch. The title was run with a local video output switch that is not part of this change. - Not tested: Linux, macOS. On the title the slice's CMASK was expanded when it reached it, so nothing was cleared there; the clears of slices above 0 are covered by `agc_driver_cmask_fast_clear_tests`, not by the title. ### 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: PPSA34063 #4275 (this stop only; the next is layered draws into several array slices) - [x] GPUs tested: NVIDIA GeForce RTX 3070, driver 617.42, Windows 11 (build 26200): the unit tests and the title's decode; a fast clear of a slice was not drawn - [x] AI-assisted: yes
LeandroLP23 commented 2026-10-18 22:33:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T22:33:49Z.


AMD run, since the description covers an RTX 3070. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main 8a456334f with #7677, #7673, #7671, #7666, #7676, #7675, #7672, #7668, #7664 and #7658 merged together (each merge clean, built once).

The build is clean and agc_driver_graphics, which holds this PR's new checks, passes 3 runs of 3.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6255993586 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6255993586). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T22:33:49Z. --- AMD run, since the description covers an RTX 3070. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. Build: `main` `8a456334f` with #7677, #7673, #7671, #7666, #7676, #7675, #7672, #7668, #7664 and #7658 merged together (each merge clean, built once). The build is clean and `agc_driver_graphics`, which holds this PR's new checks, passes 3 runs of 3. AI-assisted
wachi35676 commented 2026-10-19 01:24:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-19T01:24:00Z.


The per-slice stride matches AMD Addrlib: Mesa mesa-25.2.0 src/amd/addrlib/src/gfx10/gfx10addrlib.cpp:355 and :610 (addr = sliceSize * slice + ...).

But Addrlib also passes the slice into the in-block swizzle (:598-603). The pipe-aligned 16-pipe CMASK pattern (gfx10SwizzlePattern.h:5484 → pattern 4 at :5986) has X3^Y3^Z3, Z2^X4^Y4, Z1^Y5^X6, Z0^X5^Y6 in nibble bits 9-12. CmaskLayout::Nibble is that pattern with Z=0, and this PR keeps it for slice N.

Evaluating the pattern:

  • slice 1 moves every tile by nibble 0x1000, so tile (0,0) is at 0x1000, not 0;
  • slice 2 moves every tile by nibble 0x800;
  • for 512x512 and 1024x1024, the set of nibbles stays the same, so a uniform CMASK (PPSA34063's six expanded blocks) still decodes correctly;
  • for the 64x4 slice-2 case in the new test, the set itself changes, so a full fast clear of that slice would be read from padding nibbles.

Could slice > 0 either XOR the slice's Z bits into bits 9-12, or require the slice's CMASK block to be uniform until that is checked?

The tests pass for me on Windows (RTX 5070 Ti and AMD RDNA2 iGPU) and on Linux (gcc 13.3). On main a373e85e5 they fail with CMASK fast clears of a 3D or array color target are unsupported.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6257667380 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6257667380). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-19T01:24:00Z. --- The per-slice stride matches AMD Addrlib: Mesa `mesa-25.2.0` `src/amd/addrlib/src/gfx10/gfx10addrlib.cpp:355` and `:610` (`addr = sliceSize * slice + ...`). But Addrlib also passes the slice into the in-block swizzle (`:598-603`). The pipe-aligned 16-pipe CMASK pattern (`gfx10SwizzlePattern.h:5484` → pattern 4 at `:5986`) has `X3^Y3^Z3, Z2^X4^Y4, Z1^Y5^X6, Z0^X5^Y6` in nibble bits 9-12. `CmaskLayout::Nibble` is that pattern with Z=0, and this PR keeps it for slice N. Evaluating the pattern: - slice 1 moves every tile by nibble 0x1000, so tile (0,0) is at 0x1000, not 0; - slice 2 moves every tile by nibble 0x800; - for 512x512 and 1024x1024, the set of nibbles stays the same, so a uniform CMASK (PPSA34063's six expanded blocks) still decodes correctly; - for the 64x4 slice-2 case in the new test, the set itself changes, so a full fast clear of that slice would be read from padding nibbles. Could slice > 0 either XOR the slice's Z bits into bits 9-12, or require the slice's CMASK block to be uniform until that is checked? The tests pass for me on Windows (RTX 5070 Ti and AMD RDNA2 iGPU) and on Linux (gcc 13.3). On `main` `a373e85e5` they fail with `CMASK fast clears of a 3D or array color target are unsupported`. AI-assisted: yes (Claude Code); results above were run on this machine.
savvaniss commented 2026-10-19 06:35:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T06:35:40Z.


Intel and AMD Windows data: agc_driver_graphics fails on main and passes with this PR, on an Intel UHD 770 and an AMD RX 9070 XT.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. This head c075d28f2 merged into main 07377573f. "Without" means this PR's test files on main 07377573f, with none of its other changes.

Tests, ×3 UHD 770 RX 9070 XT
This head: the 18 tests built from tests/Graphics.cpp 18 of 18 pass 18 of 18 pass
Without agc_driver_graphics fails: CMASK fast clears of a 3D or array color target are unsupported same

I also ran full CTest with this PR and the 13 other open AGC and shader PRs I tested in the same batch merged together (#7659, #7504, #7432, #7426, #7413, #7480, #7465, #7466, #7464, #7449, #7489, #7673, #7560). Neither GPU showed a failure beyond main's own: the five image-table tests (#6647) and agc_driver_sample_multisample_target (#6957) on the UHD 770, and agc_driver_layered_volume_vertex_no_gpl (#4768) on the RX 9070 XT.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6261240738 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6261240738). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-19T06:35:40Z. --- Intel and AMD Windows data: `agc_driver_graphics` fails on `main` and passes with this PR, on an Intel UHD 770 and an AMD RX 9070 XT. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest. Intel UHD Graphics 770 (`8086:a780`), driver 32.0.101.7088. AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.31041.1004, with `VkCache` emptied first. This head `c075d28f2` merged into `main` `07377573f`. "Without" means this PR's test files on `main` `07377573f`, with none of its other changes. | Tests, ×3 | UHD 770 | RX 9070 XT | |---|---|---| | This head: the 18 tests built from `tests/Graphics.cpp` | 18 of 18 pass | 18 of 18 pass | | Without | `agc_driver_graphics` fails: `CMASK fast clears of a 3D or array color target are unsupported` | same | I also ran full CTest with this PR and the 13 other open AGC and shader PRs I tested in the same batch merged together (#7659, #7504, #7432, #7426, #7413, #7480, #7465, #7466, #7464, #7449, #7489, #7673, #7560). Neither GPU showed a failure beyond `main`'s own: the five image-table tests (#6647) and `agc_driver_sample_multisample_target` (#6957) on the UHD 770, and `agc_driver_layered_volume_vertex_no_gpl` (#4768) on the RX 9070 XT. AI-assisted: yes (Claude Code)
ArielWolle commented 2026-10-19 13:28:51 +00:00 (Migrated from github.com)

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


Thanks, you're right. I checked it against the Mesa source before changing anything:

  • Gfx10Lib::HwlComputeCmaskAddrFromCoord (mesa-25.2.0, gfx10addrlib.cpp) passes pIn->slice as the Z argument of ComputeOffsetFromSwizzlePattern and also adds sliceSize * slice.
  • Pattern 4 of GFX10_CMASK_SW_PATTERN (the 16-pipe, pipe-aligned entry) has nibble bits 9-12 = X3^Y3^Z3, Z2^X4^Y4, Z1^Y5^X6, Z0^X5^Y6. CmaskLayout::Nibble was that pattern with Z fixed at 0.

Pushed 355e85a99:

  • CmaskLayout::Nibble(tileX, tileY, slice) XORs the slice's low four bits into nibble bits 12, 11, 10 and 9. Slice 1 moves every tile by 0x1000, slice 2 by 0x800, as you computed.
  • ColorTarget::cmaskSlice carries the slice from DecodeColorBuffer to the CPU path (readCmask).
  • The GPU clear (CmaskClear.comp) had its own copy of the equation, so the slice is now a push constant there too. The two paths agree.
  • I took the XOR rather than "require a uniform CMASK", since the pattern is in Addrlib. A uniform block (PPSA34063's) reads the same at every slice, so its behaviour is unchanged.

Tests:

  • ColorTargetLayout.cpp pins 14 nibbles for slices 1-15. I evaluated them from the pattern text in Mesa, not from our code. The slice 0 column reproduces the existing references, so the evaluation matches what we had. It also checks that tiles still don't alias for several slices.
  • CmaskFastClear.cpp now clears partial CMASKs of slices 1, 2, 3 and 8 through the draw and eliminate paths. With the shader's XOR removed, it fails at slice 1.
  • agc_driver_graphics_tests and agc_driver_cmask_fast_clear_tests pass on Windows (RTX 3070, GCC 15.2). I haven't run Linux or AMD.

Still unverified on a console: what the PS5 writes for a slice above 0. The stride and the swizzle both come from Addrlib, and the debt entry says so.

Why my tests missed it:

  • The nibble reference values in ColorTargetLayout.cpp and the GPU test in CmaskFastClear.cpp only ever used slice 0, because Nibble had no slice input. They were correct for Z = 0 and said nothing about other slices.
  • The tests I added in this PR only checked where the CMASK address lands for a slice (cmaskAddress, cmaskBytes). None of them read a mixed CMASK of a slice above 0, which is the only case where the swizzle matters.
  • The real data couldn't expose it either. PPSA34063's six CMASK blocks are all 0xF, and a uniform block decodes the same under any swizzle.
  • The mistake was mine in the review of the source: I took the per-slice stride from the register values and memory, and cited Addrlib only for the mip chain (HwlComputeCmaskInfo). I never read HwlComputeCmaskAddrFromCoord, where the slice also goes into the pattern.

AI-assisted: yes (GitHub Copilot).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6268385233 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6268385233). Originally posted by [ArielWolle](https://github.com/ArielWolle) on 2026-10-19T13:28:51Z. --- Thanks, you're right. I checked it against the Mesa source before changing anything: - `Gfx10Lib::HwlComputeCmaskAddrFromCoord` (`mesa-25.2.0`, `gfx10addrlib.cpp`) passes `pIn->slice` as the Z argument of `ComputeOffsetFromSwizzlePattern` and also adds `sliceSize * slice`. - Pattern 4 of `GFX10_CMASK_SW_PATTERN` (the 16-pipe, pipe-aligned entry) has nibble bits 9-12 = `X3^Y3^Z3`, `Z2^X4^Y4`, `Z1^Y5^X6`, `Z0^X5^Y6`. `CmaskLayout::Nibble` was that pattern with Z fixed at 0. Pushed 355e85a99: - `CmaskLayout::Nibble(tileX, tileY, slice)` XORs the slice's low four bits into nibble bits 12, 11, 10 and 9. Slice 1 moves every tile by 0x1000, slice 2 by 0x800, as you computed. - `ColorTarget::cmaskSlice` carries the slice from `DecodeColorBuffer` to the CPU path (`readCmask`). - The GPU clear (`CmaskClear.comp`) had its own copy of the equation, so the slice is now a push constant there too. The two paths agree. - I took the XOR rather than "require a uniform CMASK", since the pattern is in Addrlib. A uniform block (PPSA34063's) reads the same at every slice, so its behaviour is unchanged. Tests: - `ColorTargetLayout.cpp` pins 14 nibbles for slices 1-15. I evaluated them from the pattern text in Mesa, not from our code. The slice 0 column reproduces the existing references, so the evaluation matches what we had. It also checks that tiles still don't alias for several slices. - `CmaskFastClear.cpp` now clears partial CMASKs of slices 1, 2, 3 and 8 through the draw and eliminate paths. With the shader's XOR removed, it fails at slice 1. - `agc_driver_graphics_tests` and `agc_driver_cmask_fast_clear_tests` pass on Windows (RTX 3070, GCC 15.2). I haven't run Linux or AMD. Still unverified on a console: what the PS5 writes for a slice above 0. The stride and the swizzle both come from Addrlib, and the debt entry says so. Why my tests missed it: - The nibble reference values in `ColorTargetLayout.cpp` and the GPU test in `CmaskFastClear.cpp` only ever used slice 0, because `Nibble` had no slice input. They were correct for Z = 0 and said nothing about other slices. - The tests I added in this PR only checked where the CMASK address lands for a slice (`cmaskAddress`, `cmaskBytes`). None of them read a mixed CMASK of a slice above 0, which is the only case where the swizzle matters. - The real data couldn't expose it either. PPSA34063's six CMASK blocks are all 0xF, and a uniform block decodes the same under any swizzle. - The mistake was mine in the review of the source: I took the per-slice stride from the register values and memory, and cited Addrlib only for the mip chain (`HwlComputeCmaskInfo`). I never read `HwlComputeCmaskAddrFromCoord`, where the slice also goes into the pattern. AI-assisted: yes (GitHub Copilot).
LeandroLP23 commented 2026-10-19 13:40:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-19T13:40:07Z.


Rechecked 355e85a99 (the slice XOR) on AMD's Windows driver. Radeon 860M (RDNA 3.5, 1002:1114), driver 32.0.13058.8001, Windows 11, WinLibs GCC 15.2.0, Release, ANYPS5_NO_SHADER_CACHE=1. Head merged into main 5eba12d6b (clean merge).

Test This head This head with main's CmaskClear.comp
agc_driver_cmask_fast_clear pass, 3 of 3 fails 2 of 2: SW_64KB_R_X slice 1 partly fast-cleared target drawn over its left part: texel (32, 0) holds 287454020
agc_driver_graphics pass, 3 of 3

So the new slice cases cover the GPU clear's XOR on this driver as well. A full revert to main's sources doesn't build, since the tests use cmaskSlice and the three-argument Nibble.

Separately, with APS5_NO_GPL=1 agc_driver_cmask_fast_clear still fails here at the existing SW_64KB_R_X case (texel (0, 0) holds 1515870810), as on main. That's #7875's open entry and doesn't come from this change.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6268612909 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6268612909). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-19T13:40:07Z. --- Rechecked 355e85a99 (the slice XOR) on AMD's Windows driver. Radeon 860M (RDNA 3.5, `1002:1114`), driver 32.0.13058.8001, Windows 11, WinLibs GCC 15.2.0, Release, `ANYPS5_NO_SHADER_CACHE=1`. Head merged into `main` 5eba12d6b (clean merge). | Test | This head | This head with `main`'s `CmaskClear.comp` | |---|---|---| | `agc_driver_cmask_fast_clear` | pass, 3 of 3 | fails 2 of 2: `SW_64KB_R_X slice 1 partly fast-cleared target drawn over its left part: texel (32, 0) holds 287454020` | | `agc_driver_graphics` | pass, 3 of 3 | | So the new slice cases cover the GPU clear's XOR on this driver as well. A full revert to `main`'s sources doesn't build, since the tests use `cmaskSlice` and the three-argument `Nibble`. Separately, with `APS5_NO_GPL=1` `agc_driver_cmask_fast_clear` still fails here at the existing `SW_64KB_R_X` case (`texel (0, 0) holds 1515870810`), as on `main`. That's #7875's open entry and doesn't come from this change. AI-assisted: yes (Claude Code)
wachi35676 commented 2026-10-19 23:11:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-19T23:11:30Z.


I rechecked the slice XOR from 355e85a99 (head 5fd2541ce). The point I raised is fixed.

Against Mesa. I evaluated GFX10_CMASK_SW_PATTERN row 4 directly from the text of mesa-25.2.0 src/amd/addrlib/src/gfx10/gfx10SwizzlePattern.h:5986:

  • The 13 bits are X3, Y4, X6, Y6, X7, Y7, X8, Y8, X9, X3^Y3^Z3, Z2^X4^Y4, Z1^Y5^X6, Z0^X5^Y6, with Z = pIn->slice as gfx10addrlib.cpp:598-603 passes it, and 8192 nibbles per 4 KiB block.
  • That evaluation reproduces all 14 new cmaskSliceReferences and the 5 existing slice 0 references, 19 of 19.
  • Slice 16 gives the same nibble as slice 0, as the new check expects.
  • Z0..Z3 land on nibble bits 12, 11, 10 and 9, which is the XOR that CmaskLayout::Nibble and CmaskClear.comp apply.

Tests. Windows 11 Home 26300, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON, main 9127ea36d with this head merged. GPUs: RTX 5070 Ti (NVIDIA 617.42) and the AMD Radeon iGPU (RDNA2, 1002:13c0, AMD proprietary driver 2026.04.17, ANYPS5_GPU=AMD). Run with ANYPS5_REQUIRE_VULKAN=1. On both GPUs, 12 tests pass:

  • agc_driver_graphics and agc_driver_cmask_fast_clear;
  • the prepared graphics tests;
  • the packed, sRGB8 and uint8x4 color target tests.

Negative controls:

  • With only the offset ^= ...slice... line removed from ColorTargetLayout.cpp, agc_driver_graphics fails with CMASK nibble of a slice differs from addrlib's, which passes the slice into the swizzle pattern.
  • With only the XOR removed from CmaskClear.comp, agc_driver_cmask_fast_clear fails on both GPUs with SW_64KB_R_X slice 1 partly fast-cleared target drawn over its left part: texel (32, 0) holds 287454020. This is the same failure @LeandroLP23 got on RDNA 3.5.

Linux. WSL Ubuntu 24.04, GCC 13.3, llvmpipe (Mesa 25.2.8), with this head and six other open AGC and shader PRs merged into main 9127ea36d. agc_driver_graphics and agc_driver_cmask_fast_clear pass.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6279386899 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6279386899). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-19T23:11:30Z. --- I rechecked the slice XOR from 355e85a99 (head `5fd2541ce`). The point I raised is fixed. **Against Mesa.** I evaluated `GFX10_CMASK_SW_PATTERN` row 4 directly from the text of `mesa-25.2.0` `src/amd/addrlib/src/gfx10/gfx10SwizzlePattern.h:5986`: - The 13 bits are `X3, Y4, X6, Y6, X7, Y7, X8, Y8, X9, X3^Y3^Z3, Z2^X4^Y4, Z1^Y5^X6, Z0^X5^Y6`, with Z = `pIn->slice` as `gfx10addrlib.cpp:598-603` passes it, and 8192 nibbles per 4 KiB block. - That evaluation reproduces all 14 new `cmaskSliceReferences` and the 5 existing slice 0 references, 19 of 19. - Slice 16 gives the same nibble as slice 0, as the new check expects. - Z0..Z3 land on nibble bits 12, 11, 10 and 9, which is the XOR that `CmaskLayout::Nibble` and `CmaskClear.comp` apply. **Tests.** Windows 11 Home 26300, WinLibs GCC 15.2.0, Release, `BUILD_TESTING=ON`, `main` `9127ea36d` with this head merged. GPUs: RTX 5070 Ti (NVIDIA 617.42) and the AMD Radeon iGPU (RDNA2, `1002:13c0`, AMD proprietary driver 2026.04.17, `ANYPS5_GPU=AMD`). Run with `ANYPS5_REQUIRE_VULKAN=1`. On both GPUs, 12 tests pass: - `agc_driver_graphics` and `agc_driver_cmask_fast_clear`; - the prepared graphics tests; - the packed, sRGB8 and `uint8x4` color target tests. **Negative controls:** - With only the `offset ^= ...slice...` line removed from `ColorTargetLayout.cpp`, `agc_driver_graphics` fails with `CMASK nibble of a slice differs from addrlib's, which passes the slice into the swizzle pattern`. - With only the XOR removed from `CmaskClear.comp`, `agc_driver_cmask_fast_clear` fails on both GPUs with `SW_64KB_R_X slice 1 partly fast-cleared target drawn over its left part: texel (32, 0) holds 287454020`. This is the same failure @LeandroLP23 got on RDNA 3.5. **Linux.** WSL Ubuntu 24.04, GCC 13.3, llvmpipe (Mesa 25.2.8), with this head and six other open AGC and shader PRs merged into `main` `9127ea36d`. `agc_driver_graphics` and `agc_driver_cmask_fast_clear` pass. AI-assisted: yes (Claude Code); results above were run on this machine.
oneandonlydean commented 2026-10-20 08:56:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T08:56:59Z.


Taking this over so it can merge ahead of the layered CMASK work that builds on it (#8065). We'll do the rebase onto current main and review it under the normal process; your commits and credit stay as they are.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287301983 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6287301983). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T08:56:59Z. --- Taking this over so it can merge ahead of the layered CMASK work that builds on it (#8065). We'll do the rebase onto current main and review it under the normal process; your commits and credit stay as they are.
ArielWolle commented 2026-10-20 17:57:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ArielWolle on 2026-10-20T17:57:42Z.


Rebased onto the latest main and pushed. @oneandonlydean, could you take another look when convenient?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297560354 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#issuecomment-6297560354). Originally posted by [ArielWolle](https://github.com/ArielWolle) on 2026-10-20T17:57:42Z. --- Rebased onto the latest `main` and pushed. @oneandonlydean, could you take another look when convenient?
XairRrR commented 2026-11-03 23:04:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T23:04:59Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The per-slice CMASK offset and the slice XOR into the swizzle work and are covered by tests. Both new tests fail when the production code is restored from main. One call site in readCmask still reads slice 0 nibbles.

What I ran

Head a40a71c16f9f4ab5b5a2171b2385a9e105f3e0a2 merged into main 1c8c0efc8c41314402e6966da5bef6ea3d639d10 (merged tree b1e2afab4047edfea25a40224086169fa3436ac1). Debian 13 VM, GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19).

git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...a40a71c16f9f4ab5b5a2171b2385a9e105f3e0a2
python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10
env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -j8 --test-load 32 --output-on-failure -R '^agc_driver_(graphics|cmask_fast_clear|image_gather_volume)$'
env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -V -R '^agc_driver_cmask_fast_clear$'
# negative control
git show 1c8c0efc8c41314402e6966da5bef6ea3d639d10:core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
git show 1c8c0efc8c41314402e6966da5bef6ea3d639d10:core/libs/prx/libSceAgcDriver/Graphics/shaders/CmaskClear.comp > core/libs/prx/libSceAgcDriver/Graphics/shaders/CmaskClear.comp
ninja -C build -j32 -l32 agc_driver_graphics_tests agc_driver_cmask_fast_clear_tests
env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R '^agc_driver_(graphics|cmask_fast_clear)$'
# restore merged files from b1e2afab…, rebuild, rerun the same two tests, git status --porcelain
env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -R '^agc_driver_graphics$'

Results

Check Result
git diff --check clean
check_conventions.py 0 errors, 1 warning: [debt-length] on docs/dev/debt/libSceAgcDriver.md:249 (2486 characters)
Build (script) configure, build and libs OK
Selected tests (script) 2184 ran, 0 new failures, 0 timeouts; 7 known failures that also fail on main
agc_driver_graphics passed (35.9 s when run alone)
agc_driver_cmask_fast_clear passed, CMASK fast clear draw and eliminate tests passed
agc_driver_image_gather_volume passed
Validation (script) 783 of 784 tests loaded the layer. New VUIDs appear only in agc_driver_image_gather_volume (see below)
Negative control both tests fail (see below)
Worktree after restore git status --porcelain empty; both tests pass again

The script's new_vuid entries are all VUID-VkSamplerCreateInfo-addressMode*, and all are marked "test not run on main": the validation baseline is 1e658521a0, which is older than main 1c8c0efc8c. This PR changes no sampler code, and that test does not touch CMASK. So I don't count them against the PR, but I did not confirm them on a main build.

Negative control

The tests use cmaskSlice and the three-argument Nibble, so restoring every production file from main does not build, as LeandroLP23 noted. Instead I restored only Graphics/src/State.cpp (the slice decode) and Graphics/shaders/CmaskClear.comp (the GPU XOR) from main and rebuilt both test executables:

Output
1/2 Test #1672: agc_driver_cmask_fast_clear ......***Failed    0.17 sec
AGC graphics: SW_64KB_R_X slice 1 partly fast-cleared target drawn over its left part: texel (32, 0) holds 287454020
2/2 Test #1775: agc_driver_graphics ..............***Failed    2.92 sec
AGC graphics: CMASK fast clears of a 3D or array color target are unsupported

On lavapipe this gives the same CmaskClear.comp failure that LeandroLP23 and wachi35676 reported on RDNA 3.5 and NVIDIA. I did not repeat the control for the CPU Nibble XOR, which wachi35676 already covered. After restoring the merged files the tree is clean and both tests pass.

Findings

Blocking

  • The EQAA code scan in readCmask still reads slice 0 nibbles (core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:544).
    • What happens: when color.coverageSamples > color.samples (a one-fragment EQAA target), each tile's code is checked with layout.Nibble(tileX, tileY), so slice 0 is used. The cleared-tile loop at Draw.cpp:558 and the GPU clear now use color.cmaskSlice. DecodeColorBuffer sets coverageSamples from CB_COLOR_ATTRIB NUM_SAMPLES for any target (State.cpp:2168), and this PR now accepts slice > 0 when samples == 1, so this path is reachable for a sliced EQAA target.
    • Why it matters: in some sizes a slice changes the set of nibbles a target uses. wachi35676 showed this for the 64x4 case. There the scan reads the wrong nibbles. It can throw on padding nibbles, or miss a code other than 0, 0xC..0xF in the slice's real tiles. The loop at line 558 then keeps a tile with that code as expanded instead of throwing, which goes against "unimplemented paths throw".
    • Fix: pass color.cmaskSlice at line 544 as well. Ideally add a oneFragment run at a slice above 0 in tests/CmaskFastClear.cpp.

Non-blocking

  • The debt entry got longer instead of staying gap-first (docs/dev/debt/libSceAgcDriver.md:249). The checker warns at 2486 characters. The entry was already over the 1000-character limit on main, and the PR adds about 750 characters, much of it describing the implemented behaviour and PPSA34063's memory contents. CONTRIBUTING asks for the gap first and the behaviour only as far as the gap needs it. Suggest cutting the addition to the open gap: the stride and the Z swizzle come from Addrlib HwlComputeCmaskAddrFromCoord (mesa-25.2.0) and are unverified on PS5 hardware; 3D, array-depth and mipmapped-slice targets throw. Put the PPSA34063 evidence in the PR description.
  • agc_driver_graphics takes 35.9 s alone on lavapipe, over the 30 s rule. The PR adds only four CPU-side DecodeColorBuffer calls to it, so this is almost certainly the case on main too. It is not counted against this PR (I did not time main).

Not verified

  • I did not check Mesa's gfx10addrlib.cpp or gfx10SwizzlePattern.h myself (no network). The stride and Z-bit placement match wachi35676's independent evaluation, which reproduced all 19 references.
  • Console behaviour for slices above 0 (the PR and the debt entry say this is unverified).
  • I did not reproduce the agc_driver_image_gather_volume VUIDs on a main build at 1c8c0efc8c.
  • Non-lavapipe GPUs. Other people's runs cover NVIDIA, AMD and Intel.

To get this to a good state

  1. Pass color.cmaskSlice to layout.Nibble at Draw.cpp:544, and ideally cover a sliced one-fragment target in CmaskFastClear.cpp.
  2. Optionally, trim the debt entry addition to the open gap.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5760745393 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#pullrequestreview-5760745393). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T23:04:59Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The per-slice CMASK offset and the slice XOR into the swizzle work and are covered by tests. Both new tests fail when the production code is restored from `main`. One call site in `readCmask` still reads slice 0 nibbles. ## What I ran Head `a40a71c16f9f4ab5b5a2171b2385a9e105f3e0a2` merged into `main` `1c8c0efc8c41314402e6966da5bef6ea3d639d10` (merged tree `b1e2afab4047edfea25a40224086169fa3436ac1`). Debian 13 VM, GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19). ``` git diff --check 1c8c0efc8c41314402e6966da5bef6ea3d639d10...a40a71c16f9f4ab5b5a2171b2385a9e105f3e0a2 python3 tools/check_conventions.py --base 1c8c0efc8c41314402e6966da5bef6ea3d639d10 env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -j8 --test-load 32 --output-on-failure -R '^agc_driver_(graphics|cmask_fast_clear|image_gather_volume)$' env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -V -R '^agc_driver_cmask_fast_clear$' # negative control git show 1c8c0efc8c41314402e6966da5bef6ea3d639d10:core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp git show 1c8c0efc8c41314402e6966da5bef6ea3d639d10:core/libs/prx/libSceAgcDriver/Graphics/shaders/CmaskClear.comp > core/libs/prx/libSceAgcDriver/Graphics/shaders/CmaskClear.comp ninja -C build -j32 -l32 agc_driver_graphics_tests agc_driver_cmask_fast_clear_tests env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R '^agc_driver_(graphics|cmask_fast_clear)$' # restore merged files from b1e2afab…, rebuild, rerun the same two tests, git status --porcelain env ANYPS5_REQUIRE_VULKAN=1 GALLIUM_OVERRIDE_CPU_CAPS=avx ctest --test-dir build -R '^agc_driver_graphics$' ``` ## Results | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | 0 errors, 1 warning: `[debt-length]` on `docs/dev/debt/libSceAgcDriver.md:249` (2486 characters) | | Build (script) | configure, build and `libs` OK | | Selected tests (script) | 2184 ran, 0 new failures, 0 timeouts; 7 known failures that also fail on `main` | | `agc_driver_graphics` | passed (35.9 s when run alone) | | `agc_driver_cmask_fast_clear` | passed, `CMASK fast clear draw and eliminate tests passed` | | `agc_driver_image_gather_volume` | passed | | Validation (script) | 783 of 784 tests loaded the layer. New VUIDs appear only in `agc_driver_image_gather_volume` (see below) | | Negative control | both tests fail (see below) | | Worktree after restore | `git status --porcelain` empty; both tests pass again | The script's `new_vuid` entries are all `VUID-VkSamplerCreateInfo-addressMode*`, and all are marked "test not run on main": the validation baseline is `1e658521a0`, which is older than `main` `1c8c0efc8c`. This PR changes no sampler code, and that test does not touch CMASK. So I don't count them against the PR, but I did not confirm them on a `main` build. ## Negative control The tests use `cmaskSlice` and the three-argument `Nibble`, so restoring every production file from `main` does not build, as LeandroLP23 noted. Instead I restored only `Graphics/src/State.cpp` (the slice decode) and `Graphics/shaders/CmaskClear.comp` (the GPU XOR) from `main` and rebuilt both test executables: <details><summary>Output</summary> ``` 1/2 Test #1672: agc_driver_cmask_fast_clear ......***Failed 0.17 sec AGC graphics: SW_64KB_R_X slice 1 partly fast-cleared target drawn over its left part: texel (32, 0) holds 287454020 2/2 Test #1775: agc_driver_graphics ..............***Failed 2.92 sec AGC graphics: CMASK fast clears of a 3D or array color target are unsupported ``` </details> On lavapipe this gives the same `CmaskClear.comp` failure that LeandroLP23 and wachi35676 reported on RDNA 3.5 and NVIDIA. I did not repeat the control for the CPU `Nibble` XOR, which wachi35676 already covered. After restoring the merged files the tree is clean and both tests pass. ## Findings ### Blocking - **The EQAA code scan in `readCmask` still reads slice 0 nibbles** (`core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:544`). - **What happens:** when `color.coverageSamples > color.samples` (a one-fragment EQAA target), each tile's code is checked with `layout.Nibble(tileX, tileY)`, so slice 0 is used. The cleared-tile loop at `Draw.cpp:558` and the GPU clear now use `color.cmaskSlice`. `DecodeColorBuffer` sets `coverageSamples` from `CB_COLOR_ATTRIB` NUM_SAMPLES for any target (`State.cpp:2168`), and this PR now accepts slice > 0 when `samples == 1`, so this path is reachable for a sliced EQAA target. - **Why it matters:** in some sizes a slice changes the set of nibbles a target uses. wachi35676 showed this for the 64x4 case. There the scan reads the wrong nibbles. It can throw on padding nibbles, or miss a code other than 0, 0xC..0xF in the slice's real tiles. The loop at line 558 then keeps a tile with that code as expanded instead of throwing, which goes against "unimplemented paths throw". - **Fix:** pass `color.cmaskSlice` at line 544 as well. Ideally add a `oneFragment` run at a slice above 0 in `tests/CmaskFastClear.cpp`. ### Non-blocking - **The debt entry got longer instead of staying gap-first** (`docs/dev/debt/libSceAgcDriver.md:249`). The checker warns at 2486 characters. The entry was already over the 1000-character limit on `main`, and the PR adds about 750 characters, much of it describing the implemented behaviour and PPSA34063's memory contents. CONTRIBUTING asks for the gap first and the behaviour only as far as the gap needs it. Suggest cutting the addition to the open gap: the stride and the Z swizzle come from Addrlib `HwlComputeCmaskAddrFromCoord` (`mesa-25.2.0`) and are unverified on PS5 hardware; 3D, array-depth and mipmapped-slice targets throw. Put the PPSA34063 evidence in the PR description. - **`agc_driver_graphics` takes 35.9 s alone on lavapipe**, over the 30 s rule. The PR adds only four CPU-side `DecodeColorBuffer` calls to it, so this is almost certainly the case on `main` too. It is not counted against this PR (I did not time `main`). ## Not verified - I did not check Mesa's `gfx10addrlib.cpp` or `gfx10SwizzlePattern.h` myself (no network). The stride and Z-bit placement match wachi35676's independent evaluation, which reproduced all 19 references. - Console behaviour for slices above 0 (the PR and the debt entry say this is unverified). - I did not reproduce the `agc_driver_image_gather_volume` VUIDs on a `main` build at `1c8c0efc8c`. - Non-lavapipe GPUs. Other people's runs cover NVIDIA, AMD and Intel. ## To get this to a good state 1. Pass `color.cmaskSlice` to `layout.Nibble` at `Draw.cpp:544`, and ideally cover a sliced one-fragment target in `CmaskFastClear.cpp`. 2. Optionally, trim the debt entry addition to the open gap. <!-- anyps5-bots job=3650 head=a40a71c16f9f4ab5b5a2171b2385a9e105f3e0a2 -->
MarcZX10 commented 2026-11-23 02:38:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T02:38:36Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected implementation consistently carries the slice through CMASK addressing and nibble selection; the reported test runs were not independently reproduced, and one changed test file was not read.

What I ran

Reviewed head cd4b5811a70506e524c7c782c270aa179b8b082c using the prepared diff and repo_read.py source reads. No build or test commands were run. No merged-preview check was performed.

Results

Check Result Note
Diff and targeted source review passed CMASK slice paths inspected
Build and tests not run Author-reported runs not reproduced
Full changed-file review not run One changed test file excluded below

Findings

Blocking

None identified in the code inspected.

Non-blocking

None.

Not verified

Read: ColorTargetLayout.hpp, State.hpp, TextureDetiler.hpp, CmaskClear.comp, ColorTargetLayout.cpp, Draw.cpp, State.cpp, TextureDetiler.cpp, CmaskFastClear.cpp, ColorTargetLayout.cpp tests, and docs/dev/debt/libSceAgcDriver.md.

Not read: core/libs/prx/libSceAgcDriver/tests/Graphics.cpp (excluded from the review bundle because it was too large). Build and test results in the PR description were author-reported; they were not run during this review. Console hardware behavior was not independently verified.

To get this to a good state

Nothing is required. Optional: include a focused excerpt or split out the changed Graphics.cpp test case so it can be reviewed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6015970201 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7668#pullrequestreview-6015970201). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T02:38:36Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected implementation consistently carries the slice through CMASK addressing and nibble selection; the reported test runs were not independently reproduced, and one changed test file was not read. ## What I ran Reviewed head `cd4b5811a70506e524c7c782c270aa179b8b082c` using the prepared diff and `repo_read.py` source reads. No build or test commands were run. No merged-preview check was performed. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | CMASK slice paths inspected | | Build and tests | not run | Author-reported runs not reproduced | | Full changed-file review | not run | One changed test file excluded below | ## Findings ### Blocking None identified in the code inspected. ### Non-blocking None. ## Not verified Read: `ColorTargetLayout.hpp`, `State.hpp`, `TextureDetiler.hpp`, `CmaskClear.comp`, `ColorTargetLayout.cpp`, `Draw.cpp`, `State.cpp`, `TextureDetiler.cpp`, `CmaskFastClear.cpp`, `ColorTargetLayout.cpp` tests, and `docs/dev/debt/libSceAgcDriver.md`. Not read: `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` (excluded from the review bundle because it was too large). Build and test results in the PR description were author-reported; they were not run during this review. Console hardware behavior was not independently verified. ## To get this to a good state Nothing is required. Optional: include a focused excerpt or split out the changed `Graphics.cpp` test case so it can be reviewed.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.

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

git switch 'main'
git merge --no-ff 'upstream-pr/7668'
git switch 'upstream-pr/7668'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/7668'
git switch 'upstream-pr/7668'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/7668'
git switch 'main'
git merge --squash 'upstream-pr/7668'
git switch 'main'
git merge --ff-only 'upstream-pr/7668'
git switch 'main'
git merge 'upstream-pr/7668'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7668
No description provided.