feat(agc): honour the DEPTH row pitch of linear 2D textures as RDNA2 does #11280

Merged
Michael-KD merged 3 commits from upstream-pr/11280 into main 2026-11-02 10:27:25 +00:00
Michael-KD commented 2026-10-25 23:39:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Michael-KD on 2026-10-25T23:39:20Z.


What

A linear 2D T# whose DEPTH field (word 4) named a row pitch other than its default threw guest 2D linear texture descriptor sets a custom pitch other than its default pitch, which is not implemented. RDNA2 hardware uses that field as the row pitch, so such textures now decode and read with the measured layout instead of stopping the guest.

The rule, measured with the hardware oracle: the row pitch is DEPTH + 1 elements, raised to the width and rounded up to 256 bytes. A DEPTH that rounds to the default pitch, including any below the width, now decodes as the default pitch; before, only DEPTH = default pitch − 1 was accepted.

  • GuestTextureResource: a new linearPitch field, in elements. DecodeTextureResource sets it for a single-level, uncompressed linear 2D T# with no base array, and only when the pitch differs from the default, so every descriptor accepted before decodes as before. Block-compressed, mipmapped and base-array surfaces with a DEPTH pitch still throw (not measured). EncodeTextureResource refuses a resource with a custom pitch rather than dropping it.
  • ComputeLinearMipLayout and ComputeMipLayout take the pitch; DescribeSurface and the texture cache pass it, so pitchBytes, blocksPerRow and the guest size follow it.
  • Texture::CanCopyFrom and StorageTexture::SameSurfaceShape compare the pitch, so a storage or sampled texture of one pitch does not serve another. The texture cache keys on the descriptor words, which hold DEPTH.
  • PS4 (GCN) guests keep main's rule: a linear 2D T# decodes only its default pitch and throws otherwise, since the pitch rule is measured on RDNA2 only.
  • docs/dev/debt/libSceAgcDriver.md: a new "Linear 2D texture pitch" entry for what stays open (gfx1013; compressed, mipmapped and base-array surfaces; PS4 guests).

Overlap: tools/pr_overlap.py lists #9891, #9892, #9893 and #9895 (PS4 support; heads 375f5630ba, 545e2b5b3f, 781ffafe9f, 3e32049166). No order is needed and none is a prerequisite. Each conflicts with this PR in three adjacent additions that keep both sides: the #include <array> they add next to RdnaDecoder/RdnaInstructionDecoder.hpp in GuestTextureResource.cpp, their if (gcn) { result.gcnPitch ... } block beside result.linearPitch there, and their Require(!IsGcnTiled(tileMode), ...) line beside this PR's ComputeLinearMipLayout(..., 0u) call in ComputeElementMipLayout. Their DescribeSurface returns through describeGcnSurface for a PS4 surface before the RDNA layout that reads linearPitch, and a PS4 guest's linear 2D T# keeps main's default-pitch rule here (GcnGuestShaders()), so this PR changes nothing for PS4 guests either way. #9891's head merged into this branch with that resolution passes agc_driver_graphics, agc_driver_gcn_detile and agc_driver_linear_texture_pitch on both GPUs below with the validation layer and no VUID- lines. No PR it could not compare changes the custom-pitch check.

Measurement:

  • GPU: AMD Radeon integrated graphics of a Ryzen 7 9800X3D (gfx1036, RDNA2), AMD Windows driver 32.0.21030.31, through HIP/comgr; wave32; IEEE 0, DX10_CLAMP 1.
  • Kernel: image_load (DIM 2D, data mask 1) through a linear 2D T# (TYPE 9, height 4, one level) over a buffer whose element at offset o encodes o (for 8-bit texels, two runs with the low and the high byte of the offset). Each lane loads (x, y) for 16 x values and y 0 to 3, and the element it reads gives the row pitch the hardware used.
  • 135 kernels: 32_UINT at widths 16, 64 and 100 with pitches 1, 4, 8, 16, 32, 63, 64, 65, 96, 100, 127, 128, 129, 192, 256, 320 and 1024; then 8_UINT (widths 16, 300; pitches 1 to 2048), 16_UINT (16, 200; 1 to 1024), 32_UINT (16, 100; 1 to 1024) and 32_32_UINT (16, 40; 1 to 512).
  • Result: every kernel reads row y at y × pitch, with pitch = max(DEPTH + 1, width) rounded up to 256 / bytes per element. For example, width 16 32_UINT: DEPTH 0 to 63 give 64, 64 to 127 give 128, 128 gives 192, 1023 gives 1024. No lane read anything the rule doesn't explain.

Tested

Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release.

  • agc_driver_linear_texture_pitch (new): 128 threads image_load a 16×8 32_UINT linear 2D texture, whose element i holds 0xa0000000 | i, with DEPTH 15, 63, 64, 127, 128 and 255 in turn over the same memory, and check every texel against the measured pitch (64, 64, 128, 128, 192, 256). On main it fails at its first case, DEPTH 15, a pitch below the width that the hardware treats as the default: guest 2D linear texture descriptor sets a custom pitch other than its default pitch, which is not implemented (format 20, 16x8x16, type 9, tile 0, mips 0..0 of 1). With this change it passes.
  • agc_driver_graphics (GuestTextureResource.cpp cases updated): the decoded pitch for 32-bit and 8-bit formats, rounding, a pitch below the width, the surface layout, encoding with the default pitch, and the mipmapped refusal.

ctest --test-dir build -R '^agc_driver_(graphics|linear_texture_pitch|gcn_detile)$' -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Vulkan SDK 1.4.363.0, insertion confirmed with VK_LOADER_DEBUG=layer) and ANYPS5_GPU set to each device, on this PR's head 2baa6d8d40 and on its base main bb04a4f1ea. agc_driver_gcn_detile is included because the rebase onto the PS4 (GCN) texture path in 0bec339021 touched the same decode and layout code; PS4 descriptors carry their pitch in word 7 and never set linearPitch. The main arm builds every file this PR changes from main, including tests/GuestTextureResource.cpp, so agc_driver_graphics runs main's own test source; it keeps only the new LinearTexturePitch.cpp, so the new test runs on both sides:

Test main, RTX 5070 Ti main, Radeon iGPU this PR, RTX 5070 Ti this PR, Radeon iGPU
agc_driver_linear_texture_pitch Failed Failed Passed Passed
agc_driver_graphics Passed Passed Passed Passed
agc_driver_gcn_detile Passed Passed Passed Passed

No log contains was not found but was requested by env var VK_INSTANCE_LAYERS, no log has a VUID- line, and each log names the selected GPU.

Full ctest -j8 with this change, before the rebase onto bb04a4f1ea (on main 48c160c58b): 2394 of 2396 pass. The two failures, agc_host_import_cut_lifetime (#10746) and agc_driver_depth_plane_partial_store (#10664), also fail with the change reverted.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 Pro 26200; AMD Radeon Graphics (Ryzen 7 9800X3D, gfx1036), Windows driver 32.0.21030.31 (Vulkan driver 2.0.353), Windows 11 Pro 26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5009835301 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11280). Originally posted by [Michael-KD](https://github.com/Michael-KD) on 2026-10-25T23:39:20Z. --- ### What A linear 2D T# whose `DEPTH` field (word 4) named a row pitch other than its default threw `guest 2D linear texture descriptor sets a custom pitch other than its default pitch, which is not implemented`. RDNA2 hardware uses that field as the row pitch, so such textures now decode and read with the measured layout instead of stopping the guest. The rule, measured with the [hardware oracle](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/HW_ORACLE.md): the row pitch is `DEPTH` + 1 elements, raised to the width and rounded up to 256 bytes. A `DEPTH` that rounds to the default pitch, including any below the width, now decodes as the default pitch; before, only `DEPTH` = default pitch − 1 was accepted. - `GuestTextureResource`: a new `linearPitch` field, in elements. `DecodeTextureResource` sets it for a single-level, uncompressed linear 2D T# with no base array, and only when the pitch differs from the default, so every descriptor accepted before decodes as before. Block-compressed, mipmapped and base-array surfaces with a `DEPTH` pitch still throw (not measured). `EncodeTextureResource` refuses a resource with a custom pitch rather than dropping it. - `ComputeLinearMipLayout` and `ComputeMipLayout` take the pitch; `DescribeSurface` and the texture cache pass it, so `pitchBytes`, `blocksPerRow` and the guest size follow it. - `Texture::CanCopyFrom` and `StorageTexture::SameSurfaceShape` compare the pitch, so a storage or sampled texture of one pitch does not serve another. The texture cache keys on the descriptor words, which hold `DEPTH`. - PS4 (GCN) guests keep `main`'s rule: a linear 2D T# decodes only its default pitch and throws otherwise, since the pitch rule is measured on RDNA2 only. - `docs/dev/debt/libSceAgcDriver.md`: a new "Linear 2D texture pitch" entry for what stays open (gfx1013; compressed, mipmapped and base-array surfaces; PS4 guests). Overlap: `tools/pr_overlap.py` lists #9891, #9892, #9893 and #9895 (PS4 support; heads `375f5630ba`, `545e2b5b3f`, `781ffafe9f`, `3e32049166`). No order is needed and none is a prerequisite. Each conflicts with this PR in three adjacent additions that keep both sides: the `#include <array>` they add next to `RdnaDecoder/RdnaInstructionDecoder.hpp` in `GuestTextureResource.cpp`, their `if (gcn) { result.gcnPitch ... }` block beside `result.linearPitch` there, and their `Require(!IsGcnTiled(tileMode), ...)` line beside this PR's `ComputeLinearMipLayout(..., 0u)` call in `ComputeElementMipLayout`. Their `DescribeSurface` returns through `describeGcnSurface` for a PS4 surface before the RDNA layout that reads `linearPitch`, and a PS4 guest's linear 2D T# keeps `main`'s default-pitch rule here (`GcnGuestShaders()`), so this PR changes nothing for PS4 guests either way. #9891's head merged into this branch with that resolution passes `agc_driver_graphics`, `agc_driver_gcn_detile` and `agc_driver_linear_texture_pitch` on both GPUs below with the validation layer and no `VUID-` lines. No PR it could not compare changes the custom-pitch check. Measurement: - GPU: AMD Radeon integrated graphics of a Ryzen 7 9800X3D (gfx1036, RDNA2), AMD Windows driver 32.0.21030.31, through HIP/comgr; wave32; IEEE 0, DX10_CLAMP 1. - Kernel: `image_load` (DIM 2D, data mask 1) through a linear 2D T# (`TYPE` 9, height 4, one level) over a buffer whose element at offset `o` encodes `o` (for 8-bit texels, two runs with the low and the high byte of the offset). Each lane loads `(x, y)` for 16 x values and y 0 to 3, and the element it reads gives the row pitch the hardware used. - 135 kernels: 32_UINT at widths 16, 64 and 100 with pitches 1, 4, 8, 16, 32, 63, 64, 65, 96, 100, 127, 128, 129, 192, 256, 320 and 1024; then 8_UINT (widths 16, 300; pitches 1 to 2048), 16_UINT (16, 200; 1 to 1024), 32_UINT (16, 100; 1 to 1024) and 32_32_UINT (16, 40; 1 to 512). - Result: every kernel reads row `y` at `y × pitch`, with pitch = `max(DEPTH + 1, width)` rounded up to `256 / bytes per element`. For example, width 16 32_UINT: `DEPTH` 0 to 63 give 64, 64 to 127 give 128, 128 gives 192, 1023 gives 1024. No lane read anything the rule doesn't explain. ### Tested Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release. - `agc_driver_linear_texture_pitch` (new): 128 threads `image_load` a 16×8 32_UINT linear 2D texture, whose element `i` holds `0xa0000000 | i`, with `DEPTH` 15, 63, 64, 127, 128 and 255 in turn over the same memory, and check every texel against the measured pitch (64, 64, 128, 128, 192, 256). On `main` it fails at its first case, `DEPTH` 15, a pitch below the width that the hardware treats as the default: `guest 2D linear texture descriptor sets a custom pitch other than its default pitch, which is not implemented (format 20, 16x8x16, type 9, tile 0, mips 0..0 of 1)`. With this change it passes. - `agc_driver_graphics` (`GuestTextureResource.cpp` cases updated): the decoded pitch for 32-bit and 8-bit formats, rounding, a pitch below the width, the surface layout, encoding with the default pitch, and the mipmapped refusal. `ctest --test-dir build -R '^agc_driver_(graphics|linear_texture_pitch|gcn_detile)$' -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Vulkan SDK 1.4.363.0, insertion confirmed with `VK_LOADER_DEBUG=layer`) and `ANYPS5_GPU` set to each device, on this PR's head `2baa6d8d40` and on its base `main` `bb04a4f1ea`. `agc_driver_gcn_detile` is included because the rebase onto the PS4 (GCN) texture path in `0bec339021` touched the same decode and layout code; PS4 descriptors carry their pitch in word 7 and never set `linearPitch`. The `main` arm builds every file this PR changes from `main`, including `tests/GuestTextureResource.cpp`, so `agc_driver_graphics` runs `main`'s own test source; it keeps only the new `LinearTexturePitch.cpp`, so the new test runs on both sides: | Test | `main`, RTX 5070 Ti | `main`, Radeon iGPU | this PR, RTX 5070 Ti | this PR, Radeon iGPU | |---|---|---|---|---| | `agc_driver_linear_texture_pitch` | Failed | Failed | Passed | Passed | | `agc_driver_graphics` | Passed | Passed | Passed | Passed | | `agc_driver_gcn_detile` | Passed | Passed | Passed | Passed | No log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`, no log has a `VUID-` line, and each log names the selected GPU. Full `ctest -j8` with this change, before the rebase onto `bb04a4f1ea` (on `main` `48c160c58b`): 2394 of 2396 pass. The two failures, `agc_host_import_cut_lifetime` (#10746) and `agc_driver_depth_plane_partial_store` (#10664), also fail with the change reverted. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 Pro 26200; AMD Radeon Graphics (Ryzen 7 9800X3D, gfx1036), Windows driver 32.0.21030.31 (Vulkan driver 2.0.353), Windows 11 Pro 26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-26 00:04:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T00:04:58Z.

Review: CHANGES_REQUESTED


I reviewed the updated exact head bf4b9e17d6433887e05143f09a93cd3834a565f1. The revised overlap explanation addresses the earlier question: it identifies the three adjacent insertions and describes why the PS4 GCN path does not consume linearPitch.

One required validation result is still missing. CONTRIBUTING.md requires the same focused AGC tests on main and the change, with validation enabled, on each reported GPU. The report shows agc_driver_graphics as n/a on main; only agc_driver_linear_texture_pitch is shown there. Please run the baseline agc_driver_graphics test (using the baseline test source if the new assertions depend on linearPitch) on both listed GPUs with the same validation settings, and add its outcome alongside the PR result. The hosted Linux/Windows product checks are skipped for this change, so CI does not supply that baseline evidence. I have not independently run these hardware tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5646086345 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11280#pullrequestreview-5646086345). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T00:04:58Z. **Review:** CHANGES_REQUESTED --- I reviewed the updated exact head `bf4b9e17d6433887e05143f09a93cd3834a565f1`. The revised overlap explanation addresses the earlier question: it identifies the three adjacent insertions and describes why the PS4 GCN path does not consume `linearPitch`. One required validation result is still missing. `CONTRIBUTING.md` requires the same focused AGC tests on `main` and the change, with validation enabled, on each reported GPU. The report shows `agc_driver_graphics` as `n/a` on `main`; only `agc_driver_linear_texture_pitch` is shown there. Please run the baseline `agc_driver_graphics` test (using the baseline test source if the new assertions depend on `linearPitch`) on both listed GPUs with the same validation settings, and add its outcome alongside the PR result. The hosted Linux/Windows product checks are skipped for this change, so CI does not supply that baseline evidence. I have not independently run these hardware tests.
MarcZX10 commented 2026-10-26 00:11:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T00:11:12Z.

Review: APPROVED


The exact-head report now includes the missing baseline run on both listed GPUs, plus the same focused tests on the change, with validation-layer insertion confirmed and no new output. The prior baseline-evidence blocker is resolved. The current conventions check passes; hosted product tests remain path-skipped, and the GPU runs are author-reported rather than independently reproduced by me.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5646107982 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11280#pullrequestreview-5646107982). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T00:11:12Z. **Review:** APPROVED --- The exact-head report now includes the missing baseline run on both listed GPUs, plus the same focused tests on the change, with validation-layer insertion confirmed and no new output. The prior baseline-evidence blocker is resolved. The current conventions check passes; hosted product tests remain path-skipped, and the GPU runs are author-reported rather than independently reproduced by me.
jotitadev commented 2026-10-27 10:17:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T10:17:38Z.

Review: COMMENTED


NVIDIA run on Linux for head 3773b4960.

Linux run: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3), one at a time via VK_DRIVER_FILES. Khronos validation layer 1.4.341 with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1; VK_LOADER_DEBUG=layer shows the layer inserted, no "was not found but was requested", 0 VUID- lines.

Base main 808a557ac; the merge is clean.

  • Red: main + only LinearTexturePitch.cpp: agc_driver_linear_texture_pitch fails on both devices with guest 2D linear texture descriptor sets a custom pitch other than its default pitch, which is not implemented (format 20, 16x8x16 ...).
  • Green: agc_driver_linear_texture_pitch, agc_driver_graphics and agc_driver_linear_target_* (14 tests) pass 3/3 on each device. On lavapipe linear_target_direct_write_completion skips, as on main. 0 VUID-.
  • ^agc suite (no flip/display/lds64, -j1): 3070 1053/1053, lavapipe 1052/1053. The one failure is agc_driver_multisample_retirement, which also fails on main.
  • Builds on Linux/GCC; public_headers passes.

GPUs tested: NVIDIA RTX 3070 (Linux), lavapipe.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5665455430 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11280#pullrequestreview-5665455430). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T10:17:38Z. **Review:** COMMENTED --- NVIDIA run on Linux for head `3773b4960`. Linux run: Ubuntu 26.04, GCC 15.2, Release. RTX 3070 (NVIDIA 595.99.02) and lavapipe (Mesa 26.0.3), one at a time via `VK_DRIVER_FILES`. Khronos validation layer 1.4.341 with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`; `VK_LOADER_DEBUG=layer` shows the layer inserted, no "was not found but was requested", 0 `VUID-` lines. Base `main` `808a557ac`; the merge is clean. - Red: `main` + only `LinearTexturePitch.cpp`: `agc_driver_linear_texture_pitch` fails on both devices with `guest 2D linear texture descriptor sets a custom pitch other than its default pitch, which is not implemented (format 20, 16x8x16 ...)`. - Green: `agc_driver_linear_texture_pitch`, `agc_driver_graphics` and `agc_driver_linear_target_*` (14 tests) pass 3/3 on each device. On lavapipe `linear_target_direct_write_completion` skips, as on `main`. 0 `VUID-`. - `^agc` suite (no flip/display/lds64, `-j1`): 3070 1053/1053, lavapipe 1052/1053. The one failure is `agc_driver_multisample_retirement`, which also fails on `main`. - Builds on Linux/GCC; `public_headers` passes. GPUs tested: NVIDIA RTX 3070 (Linux), lavapipe. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
MarcZX10 commented 2026-10-29 23:25:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T23:25:44Z.

Review: APPROVED


Re-checked — new head, looks good

The rebased head carries the measured RDNA2 linear 2D row pitch through decoding, surface sizing, and texture compatibility checks, and the reported exact-head GPU tests pass.

What I ran

Reviewed PR head 2baa6d8d407e8b79192f3e2a272cfe17c12ca9d3 against base bb04a4f1ea0175e9e4f149f0359a764d62ff3296; refreshed current main is f46f453a56f91d77e29ce0cbd7fe5bfb2fb69834. The merge preview with current main is clean (tree a434269dc23e81758c5b2eca46693f30da0e3ba0). Environment: Linux 6.1.0-54-amd64 x86_64; no local compiler, build, or tests run.

git diff --check upstream/main...refs/review/pr-11280-current
python3 tools/check_conventions.py --base upstream/main
git merge-tree --write-tree upstream/main refs/review/pr-11280-current
gh pr checks 11280 --repo boykopovar/AnyPS5

Results

Check Result
Diff whitespace check Pass; exit 0, no output.
Repository conventions Pass.
Merge preview with current main Clean.
Hosted Windows job Pass on this exact head.
Other hosted jobs Conventions, eligibility, labels, and report pass; Linux and specialized jobs skipped.
Focused GPU tests The author reports baseline/current-head tests on an NVIDIA RTX 5070 Ti and an AMD Radeon iGPU, including the new row-pitch test, graphics and GCN-detile tests with validation enabled and no new VUIDs. These are author-run results, not local runs.
Unedited output from local and hosted checks
$ git diff --check upstream/main...refs/review/pr-11280-current
(exit 0; no output)
$ python3 tools/check_conventions.py --base upstream/main
All conventions checks passed.
$ git merge-tree --write-tree upstream/main refs/review/pr-11280-current
a434269dc23e81758c5b2eca46693f30da0e3ba0
$ gh pr checks 11280 --repo boykopovar/AnyPS5
conventions	pass	17s	https://github.com/boykopovar/AnyPS5/actions/runs/40928209377/job/123639355169
labels	pass	9s	https://github.com/boykopovar/AnyPS5/actions/runs/40928209684/job/123639334925
windows	pass	13m9s	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639266398
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639268895
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269091
relinker	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269270
relinker-asan	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269526
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269795
eligibility	pass	5s	https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639199466
report	pass	49s	https://github.com/boykopovar/AnyPS5/actions/runs/40928272820/job/123639197837

The hosted results above are the recorded output of gh pr checks; the hardware runs are author-reported in the PR description.

Negative control

Assertion Change to code under test Did the new test fail?
A non-default DEPTH pitch is decoded and used for row addressing The author reports running the new test against base bb04a4f, before this change. Yes; it failed at the first case with the expected unsupported-custom-pitch error.

Findings

Blocking

None found in the reviewed head. The custom pitch is accepted only for uncompressed, single-level linear 2D surfaces without a base array; it is rounded using the element size and propagated into layout and compatibility checks. PS4 GCN descriptors retain their separate pitch handling.

Non-blocking

The measured hardware rule is reported for RDNA2; the PR leaves PS5 gfx1013 and unsupported compressed, mipmapped, and base-array cases documented as unverified or unsupported.

Sources

Not verified

I did not build or run tests locally, independently reproduce the two GPU reports, or verify the behavior on PS5 hardware. Linux and specialized hosted jobs were skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5706253704 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11280#pullrequestreview-5706253704). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T23:25:44Z. **Review:** APPROVED --- # Re-checked — new head, looks good The rebased head carries the measured RDNA2 linear 2D row pitch through decoding, surface sizing, and texture compatibility checks, and the reported exact-head GPU tests pass. ## What I ran Reviewed PR head `2baa6d8d407e8b79192f3e2a272cfe17c12ca9d3` against base `bb04a4f1ea0175e9e4f149f0359a764d62ff3296`; refreshed current `main` is `f46f453a56f91d77e29ce0cbd7fe5bfb2fb69834`. The merge preview with current `main` is clean (tree `a434269dc23e81758c5b2eca46693f30da0e3ba0`). Environment: Linux 6.1.0-54-amd64 x86_64; no local compiler, build, or tests run. ```sh git diff --check upstream/main...refs/review/pr-11280-current python3 tools/check_conventions.py --base upstream/main git merge-tree --write-tree upstream/main refs/review/pr-11280-current gh pr checks 11280 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Diff whitespace check | Pass; exit 0, no output. | | Repository conventions | Pass. | | Merge preview with current `main` | Clean. | | Hosted Windows job | Pass on this exact head. | | Other hosted jobs | Conventions, eligibility, labels, and report pass; Linux and specialized jobs skipped. | | Focused GPU tests | The author reports baseline/current-head tests on an NVIDIA RTX 5070 Ti and an AMD Radeon iGPU, including the new row-pitch test, graphics and GCN-detile tests with validation enabled and no new VUIDs. These are author-run results, not local runs. | <details> <summary>Unedited output from local and hosted checks</summary> ```text $ git diff --check upstream/main...refs/review/pr-11280-current (exit 0; no output) $ python3 tools/check_conventions.py --base upstream/main All conventions checks passed. $ git merge-tree --write-tree upstream/main refs/review/pr-11280-current a434269dc23e81758c5b2eca46693f30da0e3ba0 $ gh pr checks 11280 --repo boykopovar/AnyPS5 conventions pass 17s https://github.com/boykopovar/AnyPS5/actions/runs/40928209377/job/123639355169 labels pass 9s https://github.com/boykopovar/AnyPS5/actions/runs/40928209684/job/123639334925 windows pass 13m9s https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639266398 linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639268895 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269091 relinker skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269270 relinker-asan skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269526 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639269795 eligibility pass 5s https://github.com/boykopovar/AnyPS5/actions/runs/40928172880/job/123639199466 report pass 49s https://github.com/boykopovar/AnyPS5/actions/runs/40928272820/job/123639197837 ``` The hosted results above are the recorded output of `gh pr checks`; the hardware runs are author-reported in the PR description. </details> ## Negative control | Assertion | Change to code under test | Did the new test fail? | |---|---|---| | A non-default `DEPTH` pitch is decoded and used for row addressing | The author reports running the new test against base `bb04a4f`, before this change. | Yes; it failed at the first case with the expected unsupported-custom-pitch error. | ## Findings ### Blocking None found in the reviewed head. The custom pitch is accepted only for uncompressed, single-level linear 2D surfaces without a base array; it is rounded using the element size and propagated into layout and compatibility checks. PS4 GCN descriptors retain their separate pitch handling. ### Non-blocking The measured hardware rule is reported for RDNA2; the PR leaves PS5 gfx1013 and unsupported compressed, mipmapped, and base-array cases documented as unverified or unsupported. ## Sources - [Pitch decoding and validation at this head](https://github.com/boykopovar/AnyPS5/blob/2baa6d8d407e8b79192f3e2a272cfe17c12ca9d3/core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp) - [Linear row layout at this head](https://github.com/boykopovar/AnyPS5/blob/2baa6d8d407e8b79192f3e2a272cfe17c12ca9d3/core/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cpp) - [Repository hardware-oracle procedure at this head](https://github.com/boykopovar/AnyPS5/blob/2baa6d8d407e8b79192f3e2a272cfe17c12ca9d3/docs/dev/HW_ORACLE.md) ## Not verified I did not build or run tests locally, independently reproduce the two GPU reports, or verify the behavior on PS5 hardware. Linux and specialized hosted jobs were skipped.
CnRJay commented 2026-11-01 19:48:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:48:10Z.

Review: COMMENTED


Withdrawn. The validation comparison this review asked for is already in the PR's Tested section: main vs this head on both GPUs with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, no VUID-. The PR also has no title to name; Unblocks: none is correct.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5729918178 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11280#pullrequestreview-5729918178). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-11-01T19:48:10Z. **Review:** COMMENTED --- Withdrawn. The validation comparison this review asked for is already in the PR's `Tested` section: `main` vs this head on both GPUs with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, no `VUID-`. The PR also has no title to name; `Unblocks: none` is correct.
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!11280
No description provided.