fix(agc): color targets with gaps between written MRT slots, depth array slices #294
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/294"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-01T21:58:15Z.
What
Split out of #167.
CB_TARGET_MASKgap) used to be rejected. It is now aVK_ATTACHMENT_UNUSEDcolor reference with a disabled blend. Color targets keep their slot (ColorTarget::slot) for export mappings and pipeline and pass keys.DB_DEPTH_VIEWSLICE_START moves the depth and stencil planes by whole slices, so each slice of a depth array is its own depth surface. Mips are still rejected.GTA V's G-buffer pass writes MRT slots with gaps.
Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
main.ctest: all tests pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-03T06:28:25Z.
One case this doesn't cover yet: colour exports are compacted. Export i goes to the i-th slot with a non-zero CB_SHADER_MASK nibble and uses the i-th SPI_SHADER_COL_FORMAT field, not slot i's. PPSA21564's glass material has CB_SHADER_MASK 0xf000f with SPI_SHADER_COL_FORMAT 0x44 (colour to slot 0, velocity to slot 4). With this PR, slot 4 reads export format 0 and the draw is still refused, so the glass floor and windows show the interior behind them. My integration branch has this as a small change to the export mapping plus a test; I can send it as a follow-up once this lands.
Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-03T08:43:25Z.
Thanks, that's a real gap: this PR still reads slot i's own SPI_SHADER_COL_FORMAT field, so compacted exports like your glass material's 0xf000f / 0x44 stay refused. Since your branch already has the export mapping with a test checked on PPSA21564, please send it as a follow-up once this lands; I'll test it on GTA V too.