fix(agc): keep a mipmapped DCC color target's keys on its resident image #9597

Merged
milescoviello merged 1 commit from upstream-pr/9597 into main 2026-10-25 08:29:52 +00:00
milescoviello commented 2026-10-22 03:57:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T03:57:26Z.


What

A 2D color target with more than one mip and DCC enabled renders into a resident image without its keys, so later reads of it see the game's fast-clear keys instead of what was drawn.

On main:

  • DecodeColorBuffer drops the DCC address of a target whose CB_COLOR_ATTRIB2.MAX_MIP is above 0, and prints "DCC keys of mipmapped color targets are ignored" once.
  • SurfaceForTarget copies dccAddress into the resident surface, so the target's resident image has no keys either. It's uploaded from guest memory, and a draw into it never marks the keys uncompressed.
  • The guest's texture descriptors for the same surface do name the keys. A game that fast-clears the chain (keys 0x00), renders it, then samples it therefore samples Clear0000: (0,0,0,0), whatever the draws wrote.

MXGP 26 (PPSA30839), Borderlands 4 (PPSA01494) and Forspoken (PPSA03984) all print that line. In one 900 s MXGP run (#9510), with a local print of every DCC key read:

  • 14 such targets: BGRA8 sRGB or UNORM, 2048x2048 with 12 mips or 4096x4096 with 13, all slot 0.
  • Every one is later sampled, all mips, by a compute dispatch with every key byte 0x00, so it reads as cleared.

The change:

  • ColorTarget gains chainDccAddress. DecodeColorBuffer sets it, plus dccAlphaOnMsb and dccPipeAligned, for a 2D single-layer target with mips. dccAddress stays 0, so the per-draw handling written for one mip's keys (clear materialization, recipe key proofs, CB metadata passes) is unchanged.
  • SurfaceForTarget gives the resident surface chainDccAddress when dccAddress is 0. The resident image then handles the keys the way a multi-mip DCC storage image already does: a uniform clear over all keys is cleared on the GPU at upload (ClearColorFor), and the first write marks all of them uncompressed (StorageTexture::MarkDirty).
  • A draw recipe's key check (StorageImageServesKeys) takes the surface's address, so recipes keep matching the image.
  • Mipmapped DCC array and 3D targets keep the old behavior, and their message now says so.
  • sizeof(State) grows by the one field (832 to 840 on Linux on current main, in PipelineJournal.cpp's check). The recipe codec and CanonicalPipelineState copy only a color target's format, export index and component mapping, so neither changes, and FileFormat stays.
  • A debt entry says what's still not modeled: per-mip key states, ClearRegister keys on such a target, the copied (non-resident) draw path, and the refusal in CB metadata passes.

Overlap: tools/pr_overlap.py finds one shared line with #6612, #6639, #6801, #7948 and #9450: the sizeof(State) check in PipelineJournal.cpp. The integration order for that line:

  • #7948 (@Amoenus): the plan was for it to land after this PR (comment), but it merged first. This PR is rebased over it, with the combined size of 808.
  • #6612 and #6639 (mine): land after this PR. I'll rebase them over it.
  • #9450 (@fma-rc): lands after this PR. fma-rc agreed and will rebase it, setting the combined sizeof(State).
  • #6801 (@JJenkx): asked, no answer yet.

None of them is a prerequisite of this change, so Depends on stays none. #8707 (LeoFeitosa) changes how a multi-mip DCC storage image stores its units at write-back, which these resident images now are too. The two don't touch the same code.

Tested

  • Rebased onto main cf528e78c6 as 52f36c8aa2 (10-24, after MarcZX10's current-main request). The rebase applied cleanly but dropped the size check's line: main had moved it to 832 in the meantime. The build's static_assert caught it (840 == 832), and the check is now 840, main's 832 plus this PR's chainDccAddress. The journal format stays main's 10, since the field isn't journaled. Linux (Ubuntu 26.04.1, GCC 15.2, Release, RTX 4070 Ti, 615.71.09): agc_driver_graphics and agc_driver_dcc_keys_first_write pass 3 of 3. Khronos validation 1.4.363 over both, on main and on this head: both pass, no layer-missing line, no VUID- message on either side.
  • Rebased onto main b7a451d62b as 7f0f0d89fc, after #6801 merged. #6801 grew State to 824 bytes, and the one conflict was the size check, now 832 with this PR's chainDccAddress. The build's static_assert confirms it on the rebased tree. agc_driver_graphics and agc_driver_dcc_keys_first_write pass 3 of 3 on Linux. With the Khronos validation layer (1.4.363), both pass on main and on this head with no VUID. On the Windows 11 VM (GT 1030, R580), both pass 3 of 3 on the merge base and on this head.
  • Earlier: rebased onto main f6075c2f4a as 2d66748443, after #7948 merged, as the integration order planned. #7948 grew State from 784 to 800 bytes, and the one conflict was the size check, now 808: main's 800 plus this PR's 8. The build confirms it. On that head (Ubuntu 26.04.1, GCC 15.2, RTX 4070 Ti, 615.71.09), agc_driver_graphics and agc_driver_dcc_keys_first_write pass 3 of 3. Under Khronos 1.4.363 both pass on main and on this head, with no VUID on either side.
  • Earlier: rebased onto main b7d1d47a5f as 2f1fc22a24, with no conflicts; git range-diff shows the commit unchanged. main's State was still 784 bytes then, so this PR's size check stayed at 792. On that head:
    • Linux (as below): agc_driver_graphics and agc_driver_dcc_keys_first_write pass 3 of 3.
    • Khronos validation 1.4.363 on main b7d1d47a5f and on this head, same machine and same command as below: the layer loads, both tests pass on both sides, and no VUID is reported on either.
    • The earlier rebase onto main cc0078595d (c58d567e2d) also passed on the Windows 11 VM, 3 of 3 on the merge base and on that head.
    • The MXGP evidence below is from the pre-rebase head. The merge didn't change the code it exercises.
  • Linux (Ubuntu 26.04.1, RTX 4070 Ti, NVIDIA 615.71.09, GCC 15.2, Release), on main 6ef5a1c4c9: agc_driver_graphics and agc_driver_dcc_keys_first_write pass 3 of 3. The tree is the same as head 8bc99610a5; only the commit message changed after the runs.
  • New checks:
    • agc_driver_graphics: a decoded mipmapped DCC target keeps dccAddress 0, and its SurfaceForTarget has two mips and the keys. A mipmapped DCC array target's surface still has none.
    • agc_driver_dcc_keys_first_write (RunMipmappedTarget, not on Windows, like the other cases that take the device's context): a 64x64, seven-mip DCC target is decoded from registers, with its texels 0x55 and its keys 0x00. Its resident image is uploaded cleared (UploadedKeys() is Clear0000). After MarkDirty() the keys read uncompressed, and so does a texture lookup's TextureClearKeys.
  • Red: with main's State.cpp, State.hpp, Draw.cpp and PipelineJournal.cpp, and this branch's tests:
    • agc_driver_graphics fails with "the surface of a mipmapped DCC color target lost its keys".
    • agc_driver_dcc_keys_first_write fails with "the resident surface of a mipmapped DCC color target has no keys".
  • Validation layer: Khronos validation 1.4.363 (LunarG SDK), ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V, on main and on this branch, same machine. The layer was found, both tests pass on both sides, and there's no VUID- message on either.
  • Windows 11 VM (NVIDIA GeForce GT 1030, R580 driver, WinLibs GCC 15.2.0, Release): both tests pass 3 of 3 on this branch and on its merge base. There, only the agc_driver_graphics check covers the change.
  • MXGP 26 (PPSA30839), 900 s on the same route, with local prints of every DCC key read that isn't uncompressed:
    • Without the change: the 14 mipmapped DCC targets are sampled with keys 0000 from the locked stage 8 times (and from the pending-memo and unlocked paths).
    • With it: all 14 chains keep their keys, and no locked read of 0000 is left. The 21 reads during a still-pending clear remain, as before. The run ends at the timeout with no stop.
    • In that run one chain's key range later became inaccessible guest memory. 8 reads report "unreadable" keys and take the stored texels, and StoredKeyCount skips the store over it.
    • It doesn't change MXGP's black surfaces (#9510), and the race looks the same.
  • macOS, by @jotitadev (review): Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2, on MoltenVK 1.4.2 and on MoltenVK main with SPIRV-Cross #2704. The base is #8658's macOS port at 1688e5abb8 (current main plus the port), with this head's diff applied.
    • Both tests pass 3 of 3 on both drivers.
    • With only the tests applied, both fail with the texts above.
    • The full ^agc suite (856 tests) shows the same failures as the port's base, apart from one run of agc_driver_uint8x4_color_target, which is intermittent there without this change too.
  • Not tested: Borderlands 4 and Forspoken, which also print the old line; AMD and Intel GPUs.

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 (listed in the PPSA30839 bring-up discussion, #9725; no visible change in the title)
  • GPUs tested: NVIDIA RTX 4070 Ti (615.71.09, Ubuntu 26.04.1); NVIDIA GeForce GT 1030 (R580, Windows 11 VM); Apple M2 Max (MoltenVK 1.4.2 and MoltenVK main + SPIRV-Cross #2704, @jotitadev)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4961866864 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T03:57:26Z. --- ### What A 2D color target with more than one mip and DCC enabled renders into a resident image without its keys, so later reads of it see the game's fast-clear keys instead of what was drawn. **On `main`:** - `DecodeColorBuffer` drops the DCC address of a target whose `CB_COLOR_ATTRIB2.MAX_MIP` is above 0, and prints "DCC keys of mipmapped color targets are ignored" once. - `SurfaceForTarget` copies `dccAddress` into the resident surface, so the target's resident image has no keys either. It's uploaded from guest memory, and a draw into it never marks the keys uncompressed. - The guest's texture descriptors for the same surface do name the keys. A game that fast-clears the chain (keys 0x00), renders it, then samples it therefore samples `Clear0000`: (0,0,0,0), whatever the draws wrote. MXGP 26 (PPSA30839), Borderlands 4 (PPSA01494) and Forspoken (PPSA03984) all print that line. In one 900 s MXGP run (#9510), with a local print of every DCC key read: - 14 such targets: BGRA8 sRGB or UNORM, 2048x2048 with 12 mips or 4096x4096 with 13, all slot 0. - Every one is later sampled, all mips, by a compute dispatch with every key byte 0x00, so it reads as cleared. **The change:** - `ColorTarget` gains `chainDccAddress`. `DecodeColorBuffer` sets it, plus `dccAlphaOnMsb` and `dccPipeAligned`, for a 2D single-layer target with mips. `dccAddress` stays 0, so the per-draw handling written for one mip's keys (clear materialization, recipe key proofs, CB metadata passes) is unchanged. - `SurfaceForTarget` gives the resident surface `chainDccAddress` when `dccAddress` is 0. The resident image then handles the keys the way a multi-mip DCC storage image already does: a uniform clear over all keys is cleared on the GPU at upload (`ClearColorFor`), and the first write marks all of them uncompressed (`StorageTexture::MarkDirty`). - A draw recipe's key check (`StorageImageServesKeys`) takes the surface's address, so recipes keep matching the image. - Mipmapped DCC array and 3D targets keep the old behavior, and their message now says so. - `sizeof(State)` grows by the one field (832 to 840 on Linux on current `main`, in `PipelineJournal.cpp`'s check). The recipe codec and `CanonicalPipelineState` copy only a color target's format, export index and component mapping, so neither changes, and `FileFormat` stays. - A debt entry says what's still not modeled: per-mip key states, `ClearRegister` keys on such a target, the copied (non-resident) draw path, and the refusal in CB metadata passes. **Overlap:** `tools/pr_overlap.py` finds one shared line with #6612, #6639, #6801, #7948 and #9450: the `sizeof(State)` check in `PipelineJournal.cpp`. The integration order for that line: - **#7948 (@Amoenus):** the plan was for it to land after this PR ([comment](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6344555893)), but it merged first. This PR is rebased over it, with the combined size of 808. - **#6612 and #6639** (mine): land after this PR. I'll rebase them over it. - **#9450 (@fma-rc):** lands after this PR. fma-rc [agreed](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6351285269) and will rebase it, setting the combined `sizeof(State)`. - **#6801 (@JJenkx):** asked, no answer yet. None of them is a prerequisite of this change, so `Depends on` stays none. #8707 (LeoFeitosa) changes how a multi-mip DCC storage image stores its units at write-back, which these resident images now are too. The two don't touch the same code. ### Tested - **Rebased onto `main` cf528e78c6** as `52f36c8aa2` (10-24, after MarcZX10's current-main request). The rebase applied cleanly but dropped the size check's line: `main` had moved it to 832 in the meantime. The build's `static_assert` caught it (`840 == 832`), and the check is now 840, `main`'s 832 plus this PR's `chainDccAddress`. The journal format stays `main`'s 10, since the field isn't journaled. Linux (Ubuntu 26.04.1, GCC 15.2, Release, RTX 4070 Ti, 615.71.09): `agc_driver_graphics` and `agc_driver_dcc_keys_first_write` pass 3 of 3. Khronos validation 1.4.363 over both, on `main` and on this head: both pass, no layer-missing line, no `VUID-` message on either side. - **Rebased onto `main` b7a451d62b** as `7f0f0d89fc`, after #6801 merged. #6801 grew `State` to 824 bytes, and the one conflict was the size check, now 832 with this PR's `chainDccAddress`. The build's `static_assert` confirms it on the rebased tree. `agc_driver_graphics` and `agc_driver_dcc_keys_first_write` pass 3 of 3 on Linux. With the Khronos validation layer (1.4.363), both pass on `main` and on this head with no VUID. On the Windows 11 VM (GT 1030, R580), both pass 3 of 3 on the merge base and on this head. - Earlier: **rebased onto `main` f6075c2f4a** as `2d66748443`, after #7948 merged, as the integration order planned. #7948 grew `State` from 784 to 800 bytes, and the one conflict was the size check, now 808: `main`'s 800 plus this PR's 8. The build confirms it. On that head (Ubuntu 26.04.1, GCC 15.2, RTX 4070 Ti, 615.71.09), `agc_driver_graphics` and `agc_driver_dcc_keys_first_write` pass 3 of 3. Under Khronos 1.4.363 both pass on `main` and on this head, with no VUID on either side. - Earlier: rebased onto `main` b7d1d47a5f as `2f1fc22a24`, with no conflicts; `git range-diff` shows the commit unchanged. `main`'s `State` was still 784 bytes then, so this PR's size check stayed at 792. On that head: - Linux (as below): `agc_driver_graphics` and `agc_driver_dcc_keys_first_write` pass 3 of 3. - Khronos validation 1.4.363 on `main` b7d1d47a5f and on this head, same machine and same command as below: the layer loads, both tests pass on both sides, and no VUID is reported on either. - The earlier rebase onto `main` cc0078595d (`c58d567e2d`) also passed on the Windows 11 VM, 3 of 3 on the merge base and on that head. - The MXGP evidence below is from the pre-rebase head. The merge didn't change the code it exercises. - **Linux** (Ubuntu 26.04.1, RTX 4070 Ti, NVIDIA 615.71.09, GCC 15.2, Release), on `main` 6ef5a1c4c9: `agc_driver_graphics` and `agc_driver_dcc_keys_first_write` pass 3 of 3. The tree is the same as head `8bc99610a5`; only the commit message changed after the runs. - **New checks:** - `agc_driver_graphics`: a decoded mipmapped DCC target keeps `dccAddress` 0, and its `SurfaceForTarget` has two mips and the keys. A mipmapped DCC array target's surface still has none. - `agc_driver_dcc_keys_first_write` (`RunMipmappedTarget`, not on Windows, like the other cases that take the device's context): a 64x64, seven-mip DCC target is decoded from registers, with its texels 0x55 and its keys 0x00. Its resident image is uploaded cleared (`UploadedKeys()` is `Clear0000`). After `MarkDirty()` the keys read uncompressed, and so does a texture lookup's `TextureClearKeys`. - **Red:** with `main`'s `State.cpp`, `State.hpp`, `Draw.cpp` and `PipelineJournal.cpp`, and this branch's tests: - `agc_driver_graphics` fails with "the surface of a mipmapped DCC color target lost its keys". - `agc_driver_dcc_keys_first_write` fails with "the resident surface of a mipmapped DCC color target has no keys". - **Validation layer:** Khronos validation 1.4.363 (LunarG SDK), `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest -V`, on `main` and on this branch, same machine. The layer was found, both tests pass on both sides, and there's no `VUID-` message on either. - **Windows 11 VM** (NVIDIA GeForce GT 1030, R580 driver, WinLibs GCC 15.2.0, Release): both tests pass 3 of 3 on this branch and on its merge base. There, only the `agc_driver_graphics` check covers the change. - **MXGP 26 (PPSA30839)**, 900 s on the same route, with local prints of every DCC key read that isn't uncompressed: - Without the change: the 14 mipmapped DCC targets are sampled with keys 0000 from the locked stage 8 times (and from the pending-memo and unlocked paths). - With it: all 14 chains keep their keys, and no locked read of 0000 is left. The 21 reads during a still-pending clear remain, as before. The run ends at the timeout with no stop. - In that run one chain's key range later became inaccessible guest memory. 8 reads report "unreadable" keys and take the stored texels, and `StoredKeyCount` skips the store over it. - It doesn't change MXGP's black surfaces (#9510), and the race looks the same. - **macOS**, by @jotitadev ([review](https://github.com/boykopovar/AnyPS5/pull/9597#pullrequestreview-5613927781)): Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2, on MoltenVK 1.4.2 and on MoltenVK main with SPIRV-Cross #2704. The base is #8658's macOS port at `1688e5abb8` (current `main` plus the port), with this head's diff applied. - Both tests pass 3 of 3 on both drivers. - With only the tests applied, both fail with the texts above. - The full `^agc` suite (856 tests) shows the same failures as the port's base, apart from one run of `agc_driver_uint8x4_color_target`, which is intermittent there without this change too. - **Not tested:** Borderlands 4 and Forspoken, which also print the old line; AMD and Intel GPUs. ### 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: none (listed in the PPSA30839 bring-up discussion, #9725; no visible change in the title) - [x] GPUs tested: NVIDIA RTX 4070 Ti (615.71.09, Ubuntu 26.04.1); NVIDIA GeForce GT 1030 (R580, Windows 11 VM); Apple M2 Max (MoltenVK 1.4.2 and MoltenVK main + SPIRV-Cross #2704, @jotitadev) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-22 04:07:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:07:41Z.

Review: CHANGES_REQUESTED


The resident surface now receives the mip-chain DCC address only for single-layer 2D targets, while array/3D behavior remains excluded; the added decode and first-write checks exercise clear-key upload and the transition to uncompressed keys. The report includes a same-machine main/change validation-layer comparison and a measured MXGP run. I found no additional implementation blocker. Hosted conventions, eligibility, intake, labels and report checks pass; hosted product/relinker jobs are skipped. The detailed runtime/test claims are author-reported; I did not run tests locally.

One repository overlap requirement remains: the PR identifies the shared sizeof(State) assertion with open PRs #6612, #6639, #6801, #7948 and #9450, but does not record an agreed integration order with those authors. Please coordinate which changes land first, keep each assertion at the resulting State size, and add Depends on wherever one must land before this PR. The note that the later PR will update the size describes a rebase, but is not yet recorded author agreement.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609140469 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#pullrequestreview-5609140469). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:07:41Z. **Review:** CHANGES_REQUESTED --- The resident surface now receives the mip-chain DCC address only for single-layer 2D targets, while array/3D behavior remains excluded; the added decode and first-write checks exercise clear-key upload and the transition to uncompressed keys. The report includes a same-machine main/change validation-layer comparison and a measured MXGP run. I found no additional implementation blocker. Hosted conventions, eligibility, intake, labels and report checks pass; hosted product/relinker jobs are skipped. The detailed runtime/test claims are author-reported; I did not run tests locally. One repository overlap requirement remains: the PR identifies the shared `sizeof(State)` assertion with open PRs #6612, #6639, #6801, #7948 and #9450, but does not record an agreed integration order with those authors. Please coordinate which changes land first, keep each assertion at the resulting `State` size, and add `Depends on` wherever one must land before this PR. The note that the later PR will update the size describes a rebase, but is not yet recorded author agreement.
milescoviello commented 2026-10-22 04:12:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T04:12:08Z.


@MarcZX10 thanks. A proposed integration order for the one shared line, the sizeof(State) check in PipelineJournal.cpp:

This PR goes after #6612, #6639, #6801, #7948 and #9450. None of them needs this PR, and this PR needs none of them. After each one merges, I'll rebase this onto main and set the check to main's size plus this field's 8 bytes. The other five don't have to rebase for this one.

  • #6612 and #6639 are mine, so that's agreed for them.
  • @JJenkx (#6801), @Amoenus (#7948), @fma-rc (#9450): is that OK with you? If you'd rather this land first and take the size in your PR instead, say so and I'll record that.

Once you've answered, the Depends on line will say "after #6612, #6639, #6801, #7948 and #9450".

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6332499727 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6332499727). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T04:12:08Z. --- @MarcZX10 thanks. A proposed integration order for the one shared line, the `sizeof(State)` check in `PipelineJournal.cpp`: **This PR goes after #6612, #6639, #6801, #7948 and #9450.** None of them needs this PR, and this PR needs none of them. After each one merges, I'll rebase this onto `main` and set the check to `main`'s size plus this field's 8 bytes. The other five don't have to rebase for this one. - #6612 and #6639 are mine, so that's agreed for them. - @JJenkx (#6801), @Amoenus (#7948), @fma-rc (#9450): is that OK with you? If you'd rather this land first and take the size in your PR instead, say so and I'll record that. Once you've answered, the `Depends on` line will say "after #6612, #6639, #6801, #7948 and #9450". AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-22 09:58:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T09:58:51Z.


I rechecked this against the current queue and exact head 8bc99610a5. The implementation and added tests are scoped to single-layer 2D mipmapped color targets; array/3D targets remain excluded. Exact-head conventions and git diff --check pass. Hosted eligibility, conventions, intake, labels and report pass, while product/relinker checks are skipped. The author reports focused Linux/Windows tests, a validation-layer A/B, and an MXGP run, but the tested baseline is 6ef5a1c4c9; current main has advanced 100 commits beyond this branch. Please rebase onto current main, rerun the focused tests and the paired validation-layer checks, and refresh the title evidence if the merge changes the relevant code path.

The report demonstrates a wrong DCC-key result for mipmapped targets used by PPSA30839, even though it says this change does not fix the black surfaces tracked by #9510. I could not find a Game bring-up discussion for PPSA30839. Please locate or create the title discussion, list this PR there, and put Unblocks: PPSA30839 #<discussion> on the checklist if this is the title-visible wrong result the change fixes. Keep Fixes: none for #9510 unless the reported black-surface issue is actually resolved.

The existing PR overlap review also remains open: the sizeof(State) line is shared with #6612, #6639, #6801, #7948 and #9450. The proposed order is not yet agreement from the other listed authors. Please record their agreement, add the actual Depends on entries to the checklist where needed, and preserve the size assertion as each preceding change lands. The rebase should refresh this line against current State size.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6338003593 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6338003593). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T09:58:51Z. --- I rechecked this against the current queue and exact head `8bc99610a5`. The implementation and added tests are scoped to single-layer 2D mipmapped color targets; array/3D targets remain excluded. Exact-head conventions and `git diff --check` pass. Hosted eligibility, conventions, intake, labels and report pass, while product/relinker checks are skipped. The author reports focused Linux/Windows tests, a validation-layer A/B, and an MXGP run, but the tested baseline is `6ef5a1c4c9`; current `main` has advanced 100 commits beyond this branch. Please rebase onto current `main`, rerun the focused tests and the paired validation-layer checks, and refresh the title evidence if the merge changes the relevant code path. The report demonstrates a wrong DCC-key result for mipmapped targets used by PPSA30839, even though it says this change does not fix the black surfaces tracked by #9510. I could not find a Game bring-up discussion for PPSA30839. Please locate or create the title discussion, list this PR there, and put `Unblocks: PPSA30839 #<discussion>` on the checklist if this is the title-visible wrong result the change fixes. Keep `Fixes: none` for #9510 unless the reported black-surface issue is actually resolved. The existing PR overlap review also remains open: the `sizeof(State)` line is shared with #6612, #6639, #6801, #7948 and #9450. The proposed order is not yet agreement from the other listed authors. Please record their agreement, add the actual `Depends on` entries to the checklist where needed, and preserve the size assertion as each preceding change lands. The rebase should refresh this line against current `State` size.
milescoviello commented 2026-10-22 10:22:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T10:22:56Z.


@MarcZX10 done:

  • Rebase: onto main cc0078595d as c58d567e2d, with no conflicts.
  • Focused tests: pass 3 of 3 on Linux.
  • Validation layer: the paired 1.4.363 run reports no VUID on main or on this head.
  • Windows VM: both tests pass 3 of 3 on the merge base and on this head.
  • Title evidence: this PR's Draw.cpp line is in DrawWithRecipe, which #8992's prepare/record split left unchanged. So the merge doesn't touch the code the MXGP run exercised, and I kept that run's results, marked as from the pre-rebase head.
  • Bring-up discussion: there wasn't one for PPSA30839, so I opened #9725 and listed this PR there. The change fixes the keys MXGP's mipmapped chains read, but nothing visible in the title changes, so Unblocks stays none (pointing at #9725) and Fixes stays none.

The order for the sizeof(State) line still has no answer from the other authors. main's State is still 784 bytes, so this PR's check stays at 792 after the rebase.

@JJenkx (#6801), @Amoenus (#7948), @fma-rc (#9450): do you agree that this PR lands after yours? Whichever lands later sets the shared static_assert(sizeof(State) == ...) line to the combined size. If you'd rather have this one first, that works too. I'll add the order to Depends on once you've answered.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6338447562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6338447562). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T10:22:56Z. --- @MarcZX10 done: - **Rebase:** onto `main` cc0078595d as `c58d567e2d`, with no conflicts. - **Focused tests:** pass 3 of 3 on Linux. - **Validation layer:** the paired 1.4.363 run reports no VUID on `main` or on this head. - **Windows VM:** both tests pass 3 of 3 on the merge base and on this head. - **Title evidence:** this PR's `Draw.cpp` line is in `DrawWithRecipe`, which #8992's prepare/record split left unchanged. So the merge doesn't touch the code the MXGP run exercised, and I kept that run's results, marked as from the pre-rebase head. - **Bring-up discussion:** there wasn't one for PPSA30839, so I opened #9725 and listed this PR there. The change fixes the keys MXGP's mipmapped chains read, but nothing visible in the title changes, so `Unblocks` stays none (pointing at #9725) and `Fixes` stays none. The order for the `sizeof(State)` line still has no answer from the other authors. `main`'s `State` is still 784 bytes, so this PR's check stays at 792 after the rebase. @JJenkx (#6801), @Amoenus (#7948), @fma-rc (#9450): do you agree that this PR lands after yours? Whichever lands later sets the shared `static_assert(sizeof(State) == ...)` line to the combined size. If you'd rather have this one first, that works too. I'll add the order to `Depends on` once you've answered. AI-assisted: yes (Claude Code)
jotitadev commented 2026-10-22 12:12:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T12:12:32Z.

Review: COMMENTED


Apple GPU / MoltenVK run, for the macOS and non-NVIDIA rows under "Not tested". Both new checks fail without the change and pass with it on MoltenVK.

Machine: Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. Release, BUILD_TESTING=ON.
Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704.
Base/method: PR #8658 feat/macos-port @ 1688e5abb8 (current main plus the macOS port), not main, which does not build on macOS. This head's diff (merge base cc0078595d, without docs/) applies to it with no conflicts. Full rebuild before each run.

  • With the PR: agc_driver_graphics and agc_driver_dcc_keys_first_write pass 3 of 3 on both drivers.
  • Tests only (State.*, Draw.cpp and PipelineJournal.cpp at the base): both fail on both drivers, with the texts in the description: the surface of a mipmapped DCC color target lost its keys and the resident surface of a mipmapped DCC color target has no keys.
  • RunMipmappedTarget is under #ifndef _WIN32, so it runs on macOS as well, not only Linux. The resident image upload (UploadedKeys() is Clear0000) and MarkDirty() checks pass on MoltenVK.
  • Full ^agc suite with the PR: -j1 --timeout 30, 856 tests, no timeouts. Same failures as the base on both drivers (18 with MoltenVK 1.4.2, 17 with main + #2704), except agc_driver_uint8x4_color_target once on 1.4.2. That test is intermittent on this machine without the PR too, and it passed on main + #2704.

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

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5613927781 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#pullrequestreview-5613927781). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-22T12:12:32Z. **Review:** COMMENTED --- Apple GPU / MoltenVK run, for the macOS and non-NVIDIA rows under "Not tested". Both new checks fail without the change and pass with it on MoltenVK. **Machine:** Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. Release, `BUILD_TESTING=ON`. **Drivers:** MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704. **Base/method:** PR #8658 `feat/macos-port` @ `1688e5abb8` (current `main` plus the macOS port), not `main`, which does not build on macOS. This head's diff (merge base `cc0078595d`, without `docs/`) applies to it with no conflicts. Full rebuild before each run. - **With the PR:** `agc_driver_graphics` and `agc_driver_dcc_keys_first_write` pass 3 of 3 on both drivers. - **Tests only** (`State.*`, `Draw.cpp` and `PipelineJournal.cpp` at the base): both fail on both drivers, with the texts in the description: `the surface of a mipmapped DCC color target lost its keys` and `the resident surface of a mipmapped DCC color target has no keys`. - `RunMipmappedTarget` is under `#ifndef _WIN32`, so it runs on macOS as well, not only Linux. The resident image upload (`UploadedKeys()` is `Clear0000`) and `MarkDirty()` checks pass on MoltenVK. - **Full `^agc` suite with the PR:** `-j1 --timeout 30`, 856 tests, no timeouts. Same failures as the base on both drivers (18 with MoltenVK 1.4.2, 17 with main + #2704), except `agc_driver_uint8x4_color_target` once on 1.4.2. That test is intermittent on this machine without the PR too, and it passed on main + #2704. GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704) Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
milescoviello commented 2026-10-22 12:13:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T12:13:48Z.


@jotitadev thanks for the M2 Max runs on both MoltenVK builds, with the tests-only red as well. You're right that RunMipmappedTarget only skips Windows, so it runs on macOS too. I fixed the description, and your run is now in Tested and on the GPUs line.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340459227 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6340459227). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T12:13:48Z. --- @jotitadev thanks for the M2 Max runs on both MoltenVK builds, with the tests-only red as well. You're right that `RunMipmappedTarget` only skips Windows, so it runs on macOS too. I fixed the description, and your run is now in Tested and on the GPUs line. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-22 13:22:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T13:22:13Z.

Review: DISMISSED


The implementation and focused regression remain supported by strong reports: the author has paired current-at-test-time Linux validation, Windows and title data; an independent reviewer reports the new tests fail without the change and pass on both MoltenVK builds. Exact-head whitespace and conventions pass against current main 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b, and the current-main merge tree is clean. I did not run GPU tests locally; hosted product jobs are skipped.

The shared static_assert(sizeof(State)) integration order is still unresolved with #6612, #6639, #6801, #7948 and #9450. The proposed sequence in the description is not yet agreement from those authors, and the latest comment asks them but has no replies. Please record their agreement, put Depends on entries only for actual prerequisites, and preserve the combined size assertion as the changes land. The PR is based on cc0078595d, behind current main 3ca07d086d5f44fbe3c00370e7f03953ab46ca1b; update to current main and refresh the shared size assertion, overlap checks and focused tests. No new intake objection applies.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5614889180 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#pullrequestreview-5614889180). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T13:22:13Z. **Review:** DISMISSED --- The implementation and focused regression remain supported by strong reports: the author has paired current-at-test-time Linux validation, Windows and title data; an independent reviewer reports the new tests fail without the change and pass on both MoltenVK builds. Exact-head whitespace and conventions pass against current main `3ca07d086d5f44fbe3c00370e7f03953ab46ca1b`, and the current-main merge tree is clean. I did not run GPU tests locally; hosted product jobs are skipped. The shared `static_assert(sizeof(State))` integration order is still unresolved with #6612, #6639, #6801, #7948 and #9450. The proposed sequence in the description is not yet agreement from those authors, and the latest comment asks them but has no replies. Please record their agreement, put `Depends on` entries only for actual prerequisites, and preserve the combined size assertion as the changes land. The PR is based on `cc0078595d`, behind current main `3ca07d086d5f44fbe3c00370e7f03953ab46ca1b`; update to current main and refresh the shared size assertion, overlap checks and focused tests. No new intake objection applies.
milescoviello commented 2026-10-22 14:47:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T14:47:01Z.


@MarcZX10 rebased onto main b7d1d47a5f as 2f1fc22a24, with no conflicts; the commit is unchanged.

  • The focused tests pass 3 of 3.
  • The paired Khronos 1.4.363 run on main b7d1d47a5f and on this head reports no VUID on either side.
  • The overlap scan's line-level entries are the same five PRs, all on the sizeof(State) line. Its other entries are PRs that conflict with main, so they can't be compared. git merge-tree is clean against current main.
  • main's State is still 784 bytes, so the check stays at 792.

On the sizeof(State) order: I've asked @JJenkx, @Amoenus and @fma-rc twice, and none of them has answered yet. None of #6612, #6639, #6801, #7948 or #9450 is a prerequisite for this change, so Depends on stays none. The shared line is the only interaction, and whichever lands later only has to set the combined size, which I'll do here if any of them lands first.

Is that enough for this PR, or should it wait for their replies?

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6343631702 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6343631702). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T14:47:01Z. --- @MarcZX10 rebased onto `main` b7d1d47a5f as `2f1fc22a24`, with no conflicts; the commit is unchanged. - The focused tests pass 3 of 3. - The paired Khronos 1.4.363 run on `main` b7d1d47a5f and on this head reports no VUID on either side. - The overlap scan's line-level entries are the same five PRs, all on the `sizeof(State)` line. Its other entries are PRs that conflict with `main`, so they can't be compared. `git merge-tree` is clean against current `main`. - `main`'s `State` is still 784 bytes, so the check stays at 792. On the `sizeof(State)` order: I've asked @JJenkx, @Amoenus and @fma-rc twice, and none of them has answered yet. None of #6612, #6639, #6801, #7948 or #9450 is a prerequisite for this change, so `Depends on` stays none. The shared line is the only interaction, and whichever lands later only has to set the combined size, which I'll do here if any of them lands first. Is that enough for this PR, or should it wait for their replies? AI-assisted: yes (Claude Code)
milescoviello commented 2026-10-22 15:29:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-22T15:29:52Z.


@Amoenus thanks for checking both diffs and agreeing. I've recorded it in the description: #7948 after this PR. My own #6612 and #6639 will also go after it and rebase over it.

@JJenkx (#6801) and @fma-rc (#9450), that leaves yours: is this PR landing first fine with you? Your rebase then only has to set the combined sizeof(State).

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6344580035 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9597#issuecomment-6344580035). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-22T15:29:52Z. --- @Amoenus thanks for checking both diffs and agreeing. I've recorded it in the description: #7948 after this PR. My own #6612 and #6639 will also go after it and rebase over it. @JJenkx (#6801) and @fma-rc (#9450), that leaves yours: is this PR landing first fine with you? Your rebase then only has to set the combined `sizeof(State)`. AI-assisted: yes (Claude Code)
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!9597
No description provided.