fix(agc): place the HTILE of a mipmapped depth view #26035

Merged
birdmarty merged 2 commits from upstream-pr/26035 into main 2026-11-23 13:36:39 +00:00
birdmarty commented 2026-11-23 04:53:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by birdmarty on 2026-11-23T04:53:44Z.


What

A depth target with mip levels and HTILE threw HTILE for the depth view mip N of M ... is unsupported: decodeDepthPlane accepted mipmapped depth views only without HTILE, because it had no place for each level's HTILE.

AMD PAL's gfx10 addrlib (Gfx10Lib::HwlComputeHtileInfo, src/core/imported/addrlib/src/gfx10/gfx10addrlib.cpp) gives that place for SW_64KB_Z_X: with more than one mip, the levels' HTILE starts with one meta block for the mip tail, when there is one, then the levels outside the tail follow from the smallest to mip 0, each its extent at that level rounded up (GetMipSize, ShiftCeil) and aligned to the meta block, in meta blocks; a slice is the whole chain. The PS5's meta block is 1024x512 pixels and 32 KiB, as HtileMetadataBytes already assumes.

A mipmapped depth view now gets its HTILE address by that rule, and slices step by the whole chain's HTILE. A view of a level in the mip tail stays refused (its depth already is). The code that uses a target's HTILE sizes it from the target's extent (HtileMetadataBytes(target.extent)), and a view's extent is its level's logical size, rounded down. When the rounded-up size needs more meta blocks than that, as mip 1 of a 2049x1024 surface does (1025x512, two blocks, against 1024x512, one), the view is refused instead of being tracked one meta block short.

Changes

  • core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp: decodeDepthPlane places a mipmapped view's HTILE.
  • core/libs/prx/libSceAgcDriver/tests/Graphics.cpp (agc_driver_graphics): the case that expected the refusal now checks the HTILE address. For a 1024x1024 D16 chain of three levels, mip 1 is at base + 0x8000, mip 0 at base + 0x10000, and slice 1 steps by 0x20000. For a 1536x1536 D32 chain of five levels, as the game below uses, mip 0 is at base + 0x28000 and mip 1 at base + 0x18000. For a 2049x1024 D32 chain of two levels, mip 0 is at base + 0x10000 (after mip 1's two meta blocks), slice 1 steps by 0x40000, and a view of mip 1 is refused. The values were worked out by hand from the rule above. A level in the mip tail still refuses.
  • docs/dev/debt/changes/fix-agc-htile-mipmapped-depth-view.md: a new entry. It also records the refused views whose rounded-up extent needs more HTILE than their own. The offsets are not measured on the console, and the HTILE inside a level is taken to be laid out like a surface of that level's extent (addrlib's HwlComputeHtileAddrFromCoord returns ADDR_NOTIMPLEMENTED for more than one mip).

Tested

Windows 11 Pro (build 26300), Intel Core i9-9900K, AMD Radeon RX 6800 (AMD driver 26.10.1, Windows driver 32.0.21045.16010, Vulkan 1.4.315), MinGW-w64 GCC 15.3.0, Release, main 03a717f38e.

Focused set (agc_driver_graphics, agc_shader_memory, agc_driver_recorder, agc_driver_native_*, agc_driver_depth*, agc_driver_htile*, agc_driver_stencil*, agc_driver_dispatch*, agc_driver_*fill*, agc_driver_layered*, agc_driver_sampled_cache*) with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.363) and VK_LOADER_DEBUG=layer:

main 03a717f38e this change (f13719ce15)
Passed / failed 151 / 0 151 / 0
Validation layer inserted 213 213
VUID- lines 0 0

Without the fix (main's State.cpp with this branch's test), agc_driver_graphics fails with AGC graphics: HTILE for the depth view mip 1 of 3 at 1024x1024 (DB_Z_INFO 0xa0020181, DB_DEPTH_VIEW 0x04000000) is unsupported. With 153ce1cbbc's State.cpp, which rounded each level down, it fails with the HTILE of view mip 0 of a 2049x1024 two-mip D32 chain is not after the two meta blocks of mip 1, whose rounded-up extent is 1025x512.

Forza Horizon 5 (PPSA22327 01.685.672), local stack of open PRs:

  • What the game does: it renders a 1536x1536 D32 depth target with five mip levels and HTILE (DB_Z_INFO 0xa0040183), at mip 0.
  • Without this change: the refusal stopped 4 runs, at 291 s, 276 s and 258 s, and in one manual run.
  • With this change: 5 runs on 153ce1cbbc, none with it. All five ran past the point where it stopped, to a later, unrelated freeze. f13719ce15 changes nothing for this target (every level of 1536x1536 is a whole number of pixels, so rounding up and down agree) and was not run in the game.

py -3 tools/check_conventions.py --base origin/main and py -3 tools/debt_fold.py --check pass. py -3 tools/pr_overlap.py --branch fix/agc-htile-mipmapped-depth-view (2,503 open PRs): all 51 mergeable PRs that share files merge cleanly except #21948, which sizes HTILE that is not pipe-aligned (TargetHtileBytes) on the same slice line, and #24083, which names the depth slice pitch in the same mip block; neither places the HTILE of a mip. Whichever merges second keeps both. The 34 PRs that conflict with main were searched by hand; #6808 and #7256 touch HTILE elsewhere, and none places mip HTILE.

Not tested: the console's HTILE offsets for mip levels (taken from addrlib, not measured), HTILE that is not pipe-aligned with mips, other GPUs, Linux.

Part of the Forza Horizon 5 (PPSA22327) bring-up, #25152. It was found on the stack of open PRs the game needs (#24960, #24994, #25151, #23688, #23545, #21479, #11825, #23778, #21155, #22306, #21199 and #25867–#25874) and stands alone: it applies to main by itself and needs none of them to build or pass its tests.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: PPSA22327 #25152
  • GPUs tested: AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315), Windows 11 Pro (build 26300); Khronos validation layer 1.4.363.0 on main and this change, 0 VUIDs
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5447332450 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26035). Originally posted by [birdmarty](https://github.com/birdmarty) on 2026-11-23T04:53:44Z. --- ### What A depth target with mip levels and HTILE threw `HTILE for the depth view mip N of M ... is unsupported`: `decodeDepthPlane` accepted mipmapped depth views only without HTILE, because it had no place for each level's HTILE. AMD PAL's gfx10 addrlib (`Gfx10Lib::HwlComputeHtileInfo`, `src/core/imported/addrlib/src/gfx10/gfx10addrlib.cpp`) gives that place for SW_64KB_Z_X: with more than one mip, the levels' HTILE starts with one meta block for the mip tail, when there is one, then the levels outside the tail follow from the smallest to mip 0, each its extent at that level rounded up (`GetMipSize`, `ShiftCeil`) and aligned to the meta block, in meta blocks; a slice is the whole chain. The PS5's meta block is 1024x512 pixels and 32 KiB, as `HtileMetadataBytes` already assumes. A mipmapped depth view now gets its HTILE address by that rule, and slices step by the whole chain's HTILE. A view of a level in the mip tail stays refused (its depth already is). The code that uses a target's HTILE sizes it from the target's extent (`HtileMetadataBytes(target.extent)`), and a view's extent is its level's logical size, rounded down. When the rounded-up size needs more meta blocks than that, as mip 1 of a 2049x1024 surface does (1025x512, two blocks, against 1024x512, one), the view is refused instead of being tracked one meta block short. #### Changes - `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`: `decodeDepthPlane` places a mipmapped view's HTILE. - `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` (`agc_driver_graphics`): the case that expected the refusal now checks the HTILE address. For a 1024x1024 D16 chain of three levels, mip 1 is at base + 0x8000, mip 0 at base + 0x10000, and slice 1 steps by 0x20000. For a 1536x1536 D32 chain of five levels, as the game below uses, mip 0 is at base + 0x28000 and mip 1 at base + 0x18000. For a 2049x1024 D32 chain of two levels, mip 0 is at base + 0x10000 (after mip 1's two meta blocks), slice 1 steps by 0x40000, and a view of mip 1 is refused. The values were worked out by hand from the rule above. A level in the mip tail still refuses. - `docs/dev/debt/changes/fix-agc-htile-mipmapped-depth-view.md`: a new entry. It also records the refused views whose rounded-up extent needs more HTILE than their own. The offsets are not measured on the console, and the HTILE inside a level is taken to be laid out like a surface of that level's extent (addrlib's `HwlComputeHtileAddrFromCoord` returns `ADDR_NOTIMPLEMENTED` for more than one mip). ### Tested Windows 11 Pro (build 26300), Intel Core i9-9900K, AMD Radeon RX 6800 (AMD driver 26.10.1, Windows driver 32.0.21045.16010, Vulkan 1.4.315), MinGW-w64 GCC 15.3.0, Release, `main` 03a717f38e. Focused set (`agc_driver_graphics`, `agc_shader_memory`, `agc_driver_recorder`, `agc_driver_native_*`, `agc_driver_depth*`, `agc_driver_htile*`, `agc_driver_stencil*`, `agc_driver_dispatch*`, `agc_driver_*fill*`, `agc_driver_layered*`, `agc_driver_sampled_cache*`) with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (1.4.363) and `VK_LOADER_DEBUG=layer`: | | `main` 03a717f38e | this change (f13719ce15) | |---|---|---| | Passed / failed | 151 / 0 | 151 / 0 | | Validation layer inserted | 213 | 213 | | `VUID-` lines | 0 | 0 | Without the fix (`main`'s `State.cpp` with this branch's test), `agc_driver_graphics` fails with `AGC graphics: HTILE for the depth view mip 1 of 3 at 1024x1024 (DB_Z_INFO 0xa0020181, DB_DEPTH_VIEW 0x04000000) is unsupported`. With 153ce1cbbc's `State.cpp`, which rounded each level down, it fails with `the HTILE of view mip 0 of a 2049x1024 two-mip D32 chain is not after the two meta blocks of mip 1, whose rounded-up extent is 1025x512`. Forza Horizon 5 (PPSA22327 01.685.672), local stack of open PRs: - **What the game does:** it renders a 1536x1536 D32 depth target with five mip levels and HTILE (`DB_Z_INFO 0xa0040183`), at mip 0. - **Without this change:** the refusal stopped 4 runs, at 291 s, 276 s and 258 s, and in one manual run. - **With this change:** 5 runs on 153ce1cbbc, none with it. All five ran past the point where it stopped, to a later, unrelated freeze. f13719ce15 changes nothing for this target (every level of 1536x1536 is a whole number of pixels, so rounding up and down agree) and was not run in the game. `py -3 tools/check_conventions.py --base origin/main` and `py -3 tools/debt_fold.py --check` pass. `py -3 tools/pr_overlap.py --branch fix/agc-htile-mipmapped-depth-view` (2,503 open PRs): all 51 mergeable PRs that share files merge cleanly except #21948, which sizes HTILE that is not pipe-aligned (`TargetHtileBytes`) on the same slice line, and #24083, which names the depth slice pitch in the same mip block; neither places the HTILE of a mip. Whichever merges second keeps both. The 34 PRs that conflict with `main` were searched by hand; #6808 and #7256 touch HTILE elsewhere, and none places mip HTILE. Not tested: the console's HTILE offsets for mip levels (taken from addrlib, not measured), HTILE that is not pipe-aligned with mips, other GPUs, Linux. ### Related Part of the Forza Horizon 5 (PPSA22327) bring-up, #25152. It was found on the stack of open PRs the game needs (#24960, #24994, #25151, #23688, #23545, #21479, #11825, #23778, #21155, #22306, #21199 and #25867–#25874) and stands alone: it applies to `main` by itself and needs none of them to build or pass its tests. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.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: PPSA22327 #25152 - [x] GPUs tested: AMD Radeon RX 6800 (vendor=0x1002, device=0x73bf), AMD proprietary driver 26.10.1 (Windows driver 32.0.21045.16010, Vulkan 1.4.315), Windows 11 Pro (build 26300); Khronos validation layer 1.4.363.0 on `main` and this change, 0 VUIDs - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-23 04:56:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T04:56:41Z.

Review: APPROVED


Reviewed — looks good

The reviewed change computes mipmapped HTILE addresses using the described block sizes and slice stride; downstream depth handling accepts these targets, though its per-view metadata sizing warrants follow-up.

What I ran

Reviewed head 153ce1cbbc085168d2604eb056b72f418b56ce4a using the pinned repo_read.py reader. No tests or builds were run.

Results

Check Result Note
Diff and changed source review passed Decoder, test hunk, and debt note read
Test execution not run No commands run
Console HTILE offsets not run Description says offsets are inferred from addrlib

Findings

Blocking

None.

Non-blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:566-567 computes the mip’s HTILE address, but the resulting DepthTarget carries no metadata size. Existing consumers size, inspect, and claim HTILE using HtileMetadataBytes(target.extent); for a mip target this is only that mip’s extent, while offsets for later mips and slices use the whole chain. Consider carrying the applicable HTILE range size with the target so bookkeeping follows the decoded layout. This was not verified to cause incorrect behavior in a runtime scenario.

Not verified

  • No tests, build, hardware run, or console HTILE offset measurement was performed. Author-reported validation and game runs were not independently verified.
  • The full Graphics.cpp file was excluded by the review-folder size rule; its changed lines were read through the reader. State.cpp and the new debt note were read. No other changed files were excluded.
  • HTILE address behavior beyond the test examples and the stated addrlib-derived rule was not independently confirmed.

To get this to a good state

Nothing is required. The metadata-range sizing point above is optional follow-up.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6016747623 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26035#pullrequestreview-6016747623). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T04:56:41Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change computes mipmapped HTILE addresses using the described block sizes and slice stride; downstream depth handling accepts these targets, though its per-view metadata sizing warrants follow-up. ## What I ran Reviewed head `153ce1cbbc085168d2604eb056b72f418b56ce4a` using the pinned `repo_read.py` reader. No tests or builds were run. ## Results | Check | Result | Note | |---|---|---| | Diff and changed source review | passed | Decoder, test hunk, and debt note read | | Test execution | not run | No commands run | | Console HTILE offsets | not run | Description says offsets are inferred from addrlib | ## Findings ### Blocking None. ### Non-blocking - `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:566-567` computes the mip’s HTILE address, but the resulting `DepthTarget` carries no metadata size. Existing consumers size, inspect, and claim HTILE using `HtileMetadataBytes(target.extent)`; for a mip target this is only that mip’s extent, while offsets for later mips and slices use the whole chain. Consider carrying the applicable HTILE range size with the target so bookkeeping follows the decoded layout. This was not verified to cause incorrect behavior in a runtime scenario. ## Not verified - No tests, build, hardware run, or console HTILE offset measurement was performed. Author-reported validation and game runs were not independently verified. - The full `Graphics.cpp` file was excluded by the review-folder size rule; its changed lines were read through the reader. `State.cpp` and the new debt note were read. No other changed files were excluded. - HTILE address behavior beyond the test examples and the stated addrlib-derived rule was not independently confirmed. ## To get this to a good state Nothing is required. The metadata-range sizing point above is optional follow-up.
mihiii1337 commented 2026-11-23 07:07:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T07:07:08Z.

Review: CHANGES_REQUESTED


Reviewed exact head 153ce1cbbc085168d2604eb056b72f418b56ce4a. The new chain layout floors each mip's dimensions before calculating HTILE bytes:

HtileMetadataBytes({max(width >> mip, 1), max(height >> mip, 1)})

That differs from the PAL routine this PR uses as its layout source. Gfx10Lib::HwlComputeHtileInfo calls GetMipSize for every non-tail mip, and GetMipSize uses ShiftCeil for width and height before aligning them to the HTILE meta block (PAL source at pinned c5e8000, ceil helper).

A concrete non-tail case is a 2049×1024 D32 surface with two mip levels. PAL sizes mip 1 as 1025×512, which occupies 0x10000 HTILE bytes. This head uses 1024×512 and only 0x8000, so it places mip 0 at HTILE base + 0x8000 instead of + 0x10000; the whole-slice stride is 0x38000 instead of 0x40000. The selected mip's downstream HtileMetadataBytes(target.extent) uses the same logical/floored extent, so memory claims and HTILE read/write ranges can also be one metadata block short.

Please derive each HTILE mip allocation and the slice stride with the same ceil-reduced dimensions as PAL, and carry the selected mip's allocation size to consumers (or conservatively keep these odd extents refused until that size is represented). Add a regression around an odd meta-block boundary such as 2049×1024.

I compared the exact changed source with the pinned PAL implementation and reproduced the offsets/slice sizes in CPU arithmetic controls, including even-size controls. git diff --check and merge probes were clean; hosted CI is terminal with 7 successes and 7 expected skips, and the published GPU matrices use even extents. I did not run a local project build, CTest, or GPU workload.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6017671748 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26035#pullrequestreview-6017671748). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-23T07:07:08Z. **Review:** CHANGES_REQUESTED --- Reviewed exact head `153ce1cbbc085168d2604eb056b72f418b56ce4a`. The new chain layout floors each mip's dimensions before calculating HTILE bytes: ```cpp HtileMetadataBytes({max(width >> mip, 1), max(height >> mip, 1)}) ``` That differs from the PAL routine this PR uses as its layout source. `Gfx10Lib::HwlComputeHtileInfo` calls `GetMipSize` for every non-tail mip, and `GetMipSize` uses `ShiftCeil` for width and height before aligning them to the HTILE meta block ([PAL source at pinned `c5e8000`](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/imported/addrlib/src/gfx10/gfx10addrlib.cpp#L193-L224), [ceil helper](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/imported/addrlib/src/gfx10/gfx10addrlib.h#L384-L400)). A concrete non-tail case is a 2049×1024 D32 surface with two mip levels. PAL sizes mip 1 as 1025×512, which occupies `0x10000` HTILE bytes. This head uses 1024×512 and only `0x8000`, so it places mip 0 at HTILE base + `0x8000` instead of + `0x10000`; the whole-slice stride is `0x38000` instead of `0x40000`. The selected mip's downstream `HtileMetadataBytes(target.extent)` uses the same logical/floored extent, so memory claims and HTILE read/write ranges can also be one metadata block short. Please derive each HTILE mip allocation and the slice stride with the same ceil-reduced dimensions as PAL, and carry the selected mip's allocation size to consumers (or conservatively keep these odd extents refused until that size is represented). Add a regression around an odd meta-block boundary such as 2049×1024. I compared the exact changed source with the pinned PAL implementation and reproduced the offsets/slice sizes in CPU arithmetic controls, including even-size controls. `git diff --check` and merge probes were clean; hosted CI is terminal with 7 successes and 7 expected skips, and the published GPU matrices use even extents. I did not run a local project build, CTest, or GPU workload. AI-assisted: yes.
mihiii1337 commented 2026-11-23 08:32:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T08:32:25Z.

Review: APPROVED


Re-reviewed fix head f13719ce157a3ec05bacfb32b69e874cd0985040. This resolves my PAL ShiftCeil/mip-placement finding.

A CPU-only witness using the exact old/new placement loops and HtileMetadataBytes reproduced the 2049×1024 case: old mip-0 offset/slice stride were 0x8000/0x38000; this head produces 0x10000/0x40000, matching the pinned PAL calculation. For selected mip 1, floor/ceil metadata requirements are 0x8000/0x10000, and this head refuses the inconsistent logical view with the expected diagnostic rather than silently binding too little metadata. Even-dimension controls (2048×1024, 1024² and 1536²) are unchanged.

The head's ceil expression also matched PAL ShiftCeil for all 262,144 tested one-axis width/mip pairs (widths 1..16384, mips 0..15); mip-tail membership already uses the corresponding ceil layout. Merge preview, diff, conventions and debt-fold are clean.

The author reports exact-head AMD results of 151/151 tests on both base and change with 213 validation-layer insertions and 0 VUIDs. I did not run a local GPU or full CTest suite. Hosted intake/portability/report checks are green; the replacement Windows/conventions/labels jobs are queued and remain watched.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6018559226 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26035#pullrequestreview-6018559226). Originally posted by [mihiii1337](https://github.com/mihiii1337) on 2026-11-23T08:32:25Z. **Review:** APPROVED --- Re-reviewed fix head `f13719ce157a3ec05bacfb32b69e874cd0985040`. This resolves my PAL `ShiftCeil`/mip-placement finding. A CPU-only witness using the exact old/new placement loops and `HtileMetadataBytes` reproduced the 2049×1024 case: old mip-0 offset/slice stride were `0x8000/0x38000`; this head produces `0x10000/0x40000`, matching the pinned PAL calculation. For selected mip 1, floor/ceil metadata requirements are `0x8000/0x10000`, and this head refuses the inconsistent logical view with the expected diagnostic rather than silently binding too little metadata. Even-dimension controls (2048×1024, 1024² and 1536²) are unchanged. The head's ceil expression also matched PAL `ShiftCeil` for all 262,144 tested one-axis width/mip pairs (widths 1..16384, mips 0..15); mip-tail membership already uses the corresponding ceil layout. Merge preview, diff, conventions and debt-fold are clean. The author reports exact-head AMD results of 151/151 tests on both base and change with 213 validation-layer insertions and 0 VUIDs. I did not run a local GPU or full CTest suite. Hosted intake/portability/report checks are green; the replacement Windows/conventions/labels jobs are queued and remain watched. AI-assisted: yes.
MarcZX10 commented 2026-11-23 08:37:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T08:37:45Z.

Review: COMMENTED


Reviewed — comments

The HTILE mip placement is supported by focused tests and targeted code inspection, but its layout is inferred from AMD addrlib rather than confirmed on console, so a formal approval is not justified.

What I ran

Reviewed head f13719ce157a3ec05bacfb32b69e874cd0985040. No commands or tests were run in this review; the description reports author-run tests and console runs, which I did not independently verify.

Results

Check Result Note
Changed code inspection passed State decoding and nearby consumers inspected
Test execution not run Reported results are author-supplied
Console HTILE layout not run Offsets are inferred, not measured

Findings

Blocking

None.

Non-blocking

  • The mip offsets and per-level HTILE layout are inferred from AMD PAL addrlib; the description explicitly says console offsets were not measured. Confirming these offsets on console would strengthen confidence in this change.

Not verified

  • Did not run the changed tests, convention checks, debt check, or overlap check.
  • Did not verify physical-console HTILE offsets, non-pipe-aligned HTILE with mips, other GPUs, or Linux.
  • Read core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp around the changed tests, and docs/dev/debt/changes/fix-agc-htile-mipmapped-depth-view.md. The full Graphics.cpp was excluded from the prepared review folder due to size, so only the targeted head range was read. No other changed files were excluded.

To get this to a good state

Nothing is required. Optional: confirm the inferred HTILE placement against console behavior.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6018612256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/26035#pullrequestreview-6018612256). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-23T08:37:45Z. **Review:** COMMENTED --- # Reviewed — comments The HTILE mip placement is supported by focused tests and targeted code inspection, but its layout is inferred from AMD addrlib rather than confirmed on console, so a formal approval is not justified. ## What I ran Reviewed head `f13719ce157a3ec05bacfb32b69e874cd0985040`. No commands or tests were run in this review; the description reports author-run tests and console runs, which I did not independently verify. ## Results | Check | Result | Note | |---|---|---| | Changed code inspection | passed | State decoding and nearby consumers inspected | | Test execution | not run | Reported results are author-supplied | | Console HTILE layout | not run | Offsets are inferred, not measured | ## Findings ### Blocking None. ### Non-blocking - The mip offsets and per-level HTILE layout are inferred from AMD PAL addrlib; the description explicitly says console offsets were not measured. Confirming these offsets on console would strengthen confidence in this change. ## Not verified - Did not run the changed tests, convention checks, debt check, or overlap check. - Did not verify physical-console HTILE offsets, non-pipe-aligned HTILE with mips, other GPUs, or Linux. - Read `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`, `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` around the changed tests, and `docs/dev/debt/changes/fix-agc-htile-mipmapped-depth-view.md`. The full `Graphics.cpp` was excluded from the prepared review folder due to size, so only the targeted head range was read. No other changed files were excluded. ## To get this to a good state Nothing is required. Optional: confirm the inferred HTILE placement against console behavior.
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!26035
No description provided.