fix(agc): sample cube descriptors with fewer than six slices as six faces #11507

Merged
hugodearaujo merged 3 commits from upstream-pr/11507 into main 2026-10-28 09:14:51 +00:00
hugodearaujo commented 2026-10-26 17:37:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-26T17:37:50Z.


What

A cube texture descriptor whose BASE_ARRAY to DEPTH range holds two to five slices threw (guest cube texture descriptor holds fewer than 6 array slices). When every access the shader makes to it takes a sampler, it now exposes six faces from BASE_ARRAY, which is what RDNA2 samples. A shader that loads, stores or queries dimensions through such a descriptor is rejected instead, because on the hardware those stop at DEPTH and a six-face view cannot reproduce that.

  • Decode (GuestTextureResource.cpp): a cube range of fewer than six slices exposes faces BASE_ARRAY to BASE_ARRAY + 5. The equal BASE_ARRAY and DEPTH case from #1308 becomes one case of that rule.
  • Recompiler: an image records sampledOnly when every access to it takes a sampler (ImageOpcodeInfo::needsSampler: samples, gathers and LOD queries). It is part of the shader info, so the disk cache encodes it. main already moved the format to 48 with #8077, which also added optionalDescriptor, so this PR takes format 49 and counts 45 ImageResource fields in the encoder check.
  • Materializer: a cube descriptor with fewer than six slices is rejected for a storage image or an image that is not sampledOnly ("a cube descriptor with fewer than six slices is implemented only for sampling; loads, stores and dimension queries through it stop at its last slice").

Hardware

tools/hw-oracle on the RDNA2 integrated GPU of a Ryzen 7 9800X3D (gfx1036, ROCm 7.2.4 HSA runtime, Arch Linux), wave32, ieee 0, dx10_clamp 1, denorm32 3, denorm16 3, round32 0, round16 0, fp16_overflow 0. A cube T# over 24 slices of 64x64 R32_UINT, slice s filled with its own value, read at the face centres:

BASE_ARRAY, DEPTH image_sample_lz faces 0 to 5 image_load faces 0 to 5 image_get_resinfo depth
0, 5 slices 0 to 5 slices 0 to 5 6
0, 0 slices 0 to 5 slices 0 to 5 6
0, 4 slices 0 to 5 slices 0 to 4, then 0 5
0, 3 slices 0 to 5 slices 0 to 3, then 0 4
0, 1 slices 0 to 5 slices 0 and 1, then 0 2
1, 3 slices 1 to 6 slices 1 to 3, then 0 3
2, 5 slices 2 to 7 slices 2 to 5, then 0 4
2, 6 slices 2 to 7 slices 2 to 6, then 0 5
  • The same in linear and SW_256B_S, with RESOURCE_LEVEL 0 and 1.
  • The title's shape, 512x512 RGBA16F in SW_64KB_R_X with BASE_ARRAY 0 and DEPTH 4: samples of faces 0 to 5 read slices 0 to 5, and the load of face 5 returns 0.
  • A bilinear image_sample_lz a quarter texel inside the +X face's -Z edge returns 0.75 × face 0 + 0.25 × face 5 for every range above, so the seamless filter also takes face 5 from the slice past DEPTH.

Title

Skyrim (PPSA03747 01.001.010) stops on this descriptor once the MayDecide fix in #11506 lets it past the New Game load:

AGC graphics: guest cube texture descriptor holds fewer than 6 array slices (format 71, 512x512x5, type 11, tile 27, mips 0..0 of 1) (base array 0)

The only shader of its 3586 that addresses a cube is pixel shader 0x121ddc3d00. It samples it once (image_sample, dim:SQ_RSRC_IMG_CUBE, dmask 7), with the face from v_cubeid and no array index, and does not load or query it.

Runs on main 88795ed448, this branch's base, Cross pressed every 30 s:

  • #11506 alone: the run stops at 161 s with the refusal above, on the New Game loading screen.
  • #11506 and this PR: no refusal. The game plays its opening until the 420 s limit of the run: the intro at 150 s, the cart ride from 180 s and the arrival in Helgen by 360 s, with the forest, the characters and the village drawn. In the game the frame rate is about 5 fps (median frame 172 ms), which is a separate problem: on Linux/RADV the host import ceiling drops to zero after three invalid-handle failures (#8091).

The same pair on the previous base, main 5bdda3661e: 156 s with the refusal, and the opening until the limit with this PR, where the cube is created as a 512x512 view of six slices at 0x11fb630000.

Tested

  • Paired validation on main 951e5963a4 and this head b9f4f65904 (main merged in, then the format and field-count update), same machine and GPU: Linux (Arch, kernel 7.2.11), AMD Radeon RX 9070 XT (gfx1201) with RADV, Mesa 26.2.5, GCC 16.2.1, Release. ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Khronos validation layer 1.4.363; the loader logs Insert instance layer "VK_LAYER_KHRONOS_validation"), ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, on the cube tests and the ones this change touches: agc_recorder_cube, agc_driver_graphics, agc_shader_memory, agc_shader_disk_cache, agc_shader_disk_cache_large_file, agc_driver_depth_plane_sampling, agc_driver_image_plane_address_on_cube, agc_driver_image_resinfo_dimension, agc_driver_image_sample_cube_derivatives, agc_driver_image_store_face_on_cube, agc_driver_vop3_cube_clamp and the new agc_driver_image_sample_short_cube.
    • main: 11 of 11 pass. This head: 12 of 12 pass.
    • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- line.
  • The earlier paired run on main 88795ed448 and head 787b6a6720 gave 10 of 10 and 11 of 11, also without VUID- lines.
  • On the previous base, main 5bdda3661e: the 1497 tests tools/select_tests.py selects for this change, ANYPS5_REQUIRE_VULKAN=1: 1496 pass. agc_driver_tessellation segfaults the same way on main (#5444).
  • New agc_driver_image_sample_short_cube: a compute shader samples a cube of 64x64 R32_FLOAT slices at each face centre through image_sample_lz for seven BASE_ARRAY/DEPTH pairs and checks the measured slices; an image_load through BASE_ARRAY 0, DEPTH 4 must be rejected. It passes 3 of 3. With main's production files it fails with the refusal above; with only the decode change it fails because the load is accepted. The bilinear edge rows are not in it: on main a whole cube does not filter across faces either, since each face is sampled as a layer of a 2D array.
  • agc_driver_graphics decodes ranges (0, 4), (0, 1), (2, 5) and (6, 10) to six faces from BASE_ARRAY; agc_recorder_cube samples the snapshot and storage views of (0, 4) and (2, 5) cubes at every face; agc_shader_memory checks the runtime mode accepts a sampled five-slice cube and rejects a loaded one, a loaded six-face cube and a seven-slice cube stay accepted, and a stored three-slice cube is rejected; agc_shader_disk_cache round-trips the new flag.
  • tools/check_conventions.py passes. tools/pr_overlap.py lists only neighbouring lines: the disk cache format version in ShaderDiskCache.hpp, which 14 open PRs also raise; ResourceMaterializer.cpp beside #7085 and #9889; and ResourceTracker.cpp beside #10867. None of them changes cube ranges.

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 (merge order agreed on #11551: #11507 with format 49, then #10351 with 50, then #11551 with 51)
  • Fixes: none
  • Unblocks: PPSA03747 #11508
  • GPUs tested: AMD Radeon RX 9070 XT (gfx1201), RADV (Mesa 26.2.5), Arch Linux, kernel 7.2.11; hardware measurements on the RDNA2 integrated GPU of a Ryzen 7 9800X3D (gfx1036) with tools/hw-oracle
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5021931066 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11507). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-26T17:37:50Z. --- ### What A cube texture descriptor whose `BASE_ARRAY` to `DEPTH` range holds two to five slices threw (`guest cube texture descriptor holds fewer than 6 array slices`). When every access the shader makes to it takes a sampler, it now exposes six faces from `BASE_ARRAY`, which is what RDNA2 samples. A shader that loads, stores or queries dimensions through such a descriptor is rejected instead, because on the hardware those stop at `DEPTH` and a six-face view cannot reproduce that. - Decode (`GuestTextureResource.cpp`): a cube range of fewer than six slices exposes faces `BASE_ARRAY` to `BASE_ARRAY + 5`. The equal `BASE_ARRAY` and `DEPTH` case from #1308 becomes one case of that rule. - Recompiler: an image records `sampledOnly` when every access to it takes a sampler (`ImageOpcodeInfo::needsSampler`: samples, gathers and LOD queries). It is part of the shader info, so the disk cache encodes it. `main` already moved the format to 48 with #8077, which also added `optionalDescriptor`, so this PR takes format 49 and counts 45 `ImageResource` fields in the encoder check. - Materializer: a cube descriptor with fewer than six slices is rejected for a storage image or an image that is not `sampledOnly` ("a cube descriptor with fewer than six slices is implemented only for sampling; loads, stores and dimension queries through it stop at its last slice"). ### Hardware `tools/hw-oracle` on the RDNA2 integrated GPU of a Ryzen 7 9800X3D (gfx1036, ROCm 7.2.4 HSA runtime, Arch Linux), wave32, `ieee 0`, `dx10_clamp 1`, `denorm32 3`, `denorm16 3`, `round32 0`, `round16 0`, `fp16_overflow 0`. A cube T# over 24 slices of 64x64 R32_UINT, slice `s` filled with its own value, read at the face centres: | `BASE_ARRAY`, `DEPTH` | `image_sample_lz` faces 0 to 5 | `image_load` faces 0 to 5 | `image_get_resinfo` depth | |---|---|---|---| | 0, 5 | slices 0 to 5 | slices 0 to 5 | 6 | | 0, 0 | slices 0 to 5 | slices 0 to 5 | 6 | | 0, 4 | slices 0 to 5 | slices 0 to 4, then 0 | 5 | | 0, 3 | slices 0 to 5 | slices 0 to 3, then 0 | 4 | | 0, 1 | slices 0 to 5 | slices 0 and 1, then 0 | 2 | | 1, 3 | slices 1 to 6 | slices 1 to 3, then 0 | 3 | | 2, 5 | slices 2 to 7 | slices 2 to 5, then 0 | 4 | | 2, 6 | slices 2 to 7 | slices 2 to 6, then 0 | 5 | - The same in linear and `SW_256B_S`, with `RESOURCE_LEVEL` 0 and 1. - The title's shape, 512x512 RGBA16F in `SW_64KB_R_X` with `BASE_ARRAY` 0 and `DEPTH` 4: samples of faces 0 to 5 read slices 0 to 5, and the load of face 5 returns 0. - A bilinear `image_sample_lz` a quarter texel inside the +X face's -Z edge returns 0.75 × face 0 + 0.25 × face 5 for every range above, so the seamless filter also takes face 5 from the slice past `DEPTH`. ### Title Skyrim (PPSA03747 01.001.010) stops on this descriptor once the MayDecide fix in #11506 lets it past the New Game load: ``` AGC graphics: guest cube texture descriptor holds fewer than 6 array slices (format 71, 512x512x5, type 11, tile 27, mips 0..0 of 1) (base array 0) ``` The only shader of its 3586 that addresses a cube is pixel shader `0x121ddc3d00`. It samples it once (`image_sample`, `dim:SQ_RSRC_IMG_CUBE`, dmask 7), with the face from `v_cubeid` and no array index, and does not load or query it. Runs on `main` 88795ed448, this branch's base, Cross pressed every 30 s: - #11506 alone: the run stops at 161 s with the refusal above, on the New Game loading screen. - #11506 and this PR: no refusal. The game plays its opening until the 420 s limit of the run: the intro at 150 s, the cart ride from 180 s and the arrival in Helgen by 360 s, with the forest, the characters and the village drawn. In the game the frame rate is about 5 fps (median frame 172 ms), which is a separate problem: on Linux/RADV the host import ceiling drops to zero after three invalid-handle failures (#8091). The same pair on the previous base, `main` 5bdda3661e: 156 s with the refusal, and the opening until the limit with this PR, where the cube is created as a 512x512 view of six slices at `0x11fb630000`. ### Tested - Paired validation on `main` 951e5963a4 and this head b9f4f65904 (`main` merged in, then the format and field-count update), same machine and GPU: Linux (Arch, kernel 7.2.11), AMD Radeon RX 9070 XT (gfx1201) with RADV, Mesa 26.2.5, GCC 16.2.1, Release. `ctest -V` with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Khronos validation layer 1.4.363; the loader logs `Insert instance layer "VK_LAYER_KHRONOS_validation"`), `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, on the cube tests and the ones this change touches: `agc_recorder_cube`, `agc_driver_graphics`, `agc_shader_memory`, `agc_shader_disk_cache`, `agc_shader_disk_cache_large_file`, `agc_driver_depth_plane_sampling`, `agc_driver_image_plane_address_on_cube`, `agc_driver_image_resinfo_dimension`, `agc_driver_image_sample_cube_derivatives`, `agc_driver_image_store_face_on_cube`, `agc_driver_vop3_cube_clamp` and the new `agc_driver_image_sample_short_cube`. - `main`: 11 of 11 pass. This head: 12 of 12 pass. - Neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`, and neither has a `VUID-` line. - The earlier paired run on `main` 88795ed448 and head 787b6a6720 gave 10 of 10 and 11 of 11, also without `VUID-` lines. - On the previous base, `main` 5bdda3661e: the 1497 tests `tools/select_tests.py` selects for this change, `ANYPS5_REQUIRE_VULKAN=1`: 1496 pass. `agc_driver_tessellation` segfaults the same way on `main` (#5444). - New `agc_driver_image_sample_short_cube`: a compute shader samples a cube of 64x64 R32_FLOAT slices at each face centre through `image_sample_lz` for seven `BASE_ARRAY`/`DEPTH` pairs and checks the measured slices; an `image_load` through `BASE_ARRAY` 0, `DEPTH` 4 must be rejected. It passes 3 of 3. With `main`'s production files it fails with the refusal above; with only the decode change it fails because the load is accepted. The bilinear edge rows are not in it: on `main` a whole cube does not filter across faces either, since each face is sampled as a layer of a 2D array. - `agc_driver_graphics` decodes ranges (0, 4), (0, 1), (2, 5) and (6, 10) to six faces from `BASE_ARRAY`; `agc_recorder_cube` samples the snapshot and storage views of (0, 4) and (2, 5) cubes at every face; `agc_shader_memory` checks the runtime mode accepts a sampled five-slice cube and rejects a loaded one, a loaded six-face cube and a seven-slice cube stay accepted, and a stored three-slice cube is rejected; `agc_shader_disk_cache` round-trips the new flag. - `tools/check_conventions.py` passes. `tools/pr_overlap.py` lists only neighbouring lines: the disk cache format version in `ShaderDiskCache.hpp`, which 14 open PRs also raise; `ResourceMaterializer.cpp` beside #7085 and #9889; and `ResourceTracker.cpp` beside #10867. None of them changes cube ranges. ### 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 (merge order agreed on #11551: #11507 with format 49, then #10351 with 50, then #11551 with 51) - [x] Fixes: none - [x] Unblocks: PPSA03747 #11508 - [x] GPUs tested: AMD Radeon RX 9070 XT (gfx1201), RADV (Mesa 26.2.5), Arch Linux, kernel 7.2.11; hardware measurements on the RDNA2 integrated GPU of a Ryzen 7 9800X3D (gfx1036) with `tools/hw-oracle` - [x] AI-assisted: yes
MarcZX10 commented 2026-10-26 17:46:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T17:46:02Z.

Review: CHANGES_REQUESTED


The branch is 150 commits behind current main (5bdda3661e merge base; current main is 88795ed448). Please rebase or otherwise sync it before merge and rerun the required AGC comparison on current main and the updated change, on the same machine/GPU with the specified Vulkan validation settings. The report’s title and test runs use the older base, and hosted product/relinker jobs are skipped, so they do not establish behavior against current main or replace the paired run required by CONTRIBUTING.md.

My changed-path comparison found only docs/dev/debt/libSceAgcDriver.md shared with the intervening commits; I have not found a specific implementation defect in this review. Local tools/check_conventions.py and git show --check pass. Please update the evidence and request another review after syncing; changes requested for branch freshness and required validation, not for a demonstrated runtime defect.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5656492537 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11507#pullrequestreview-5656492537). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T17:46:02Z. **Review:** CHANGES_REQUESTED --- The branch is 150 commits behind current `main` (`5bdda3661e` merge base; current `main` is `88795ed448`). Please rebase or otherwise sync it before merge and rerun the required AGC comparison on current `main` and the updated change, on the same machine/GPU with the specified Vulkan validation settings. The report’s title and test runs use the older base, and hosted product/relinker jobs are skipped, so they do not establish behavior against current `main` or replace the paired run required by `CONTRIBUTING.md`. My changed-path comparison found only `docs/dev/debt/libSceAgcDriver.md` shared with the intervening commits; I have not found a specific implementation defect in this review. Local `tools/check_conventions.py` and `git show --check` pass. Please update the evidence and request another review after syncing; changes requested for branch freshness and required validation, not for a demonstrated runtime defect.
MarcZX10 commented 2026-10-26 19:13:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T19:13:44Z.

Review: DISMISSED


The branch freshness and paired Vulkan validation requested in my previous review are now addressed: this head is based on main 88795ed448, and the same-machine RX 9070 XT/RADV/Mesa 26.2.5 run reports 10/10 on main and 11/11 on this head, with the validation layer loaded and no missing-layer message or VUID lines. The applicable hosted checks pass; product and relinker jobs are skipped.

One separate merge-order issue remains. This PR changes ShaderDiskCache format 47 to 48 for the new serialized image field. Still-open #11551 also changes the same format from 47 to 48 for depth-bounds metadata, and its review already requests coordination and a declared dependency. If both changes land, the second must advance the format again to 49 (and retain both serialization changes). Please coordinate with #11551’s author, record the agreed order in Depends on, and update the follow-up format-bump plan before approval. The checklist currently says Depends on: none, so the ordering is not declared yet. I found no implementation defect in the cube-range handling; this request is limited to the conflicting cache-format merge plan.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5657639094 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11507#pullrequestreview-5657639094). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-26T19:13:44Z. **Review:** DISMISSED --- The branch freshness and paired Vulkan validation requested in my previous review are now addressed: this head is based on main 88795ed448, and the same-machine RX 9070 XT/RADV/Mesa 26.2.5 run reports 10/10 on main and 11/11 on this head, with the validation layer loaded and no missing-layer message or VUID lines. The applicable hosted checks pass; product and relinker jobs are skipped. One separate merge-order issue remains. This PR changes ShaderDiskCache format 47 to 48 for the new serialized image field. Still-open #11551 also changes the same format from 47 to 48 for depth-bounds metadata, and its review already requests coordination and a declared dependency. If both changes land, the second must advance the format again to 49 (and retain both serialization changes). Please coordinate with #11551’s author, record the agreed order in Depends on, and update the follow-up format-bump plan before approval. The checklist currently says Depends on: none, so the ordering is not declared yet. I found no implementation defect in the cube-range handling; this request is limited to the conflicting cache-format merge plan.
jotitadev commented 2026-10-27 04:44:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-27T04:44:24Z.

Review: COMMENTED


Head 787b6a6720 merged onto current main b986c11a34 merges without a text conflict, but the result does not compile on any host. #8077 (merged into main today) also added a field to ImageResource (optionalDescriptor) and also moved the shader cache format from 47 to 48, so the two bumps land on the same numbers:

core/shader/recompiler/ShaderDiskCache.cpp:144:43: error: static assertion failed: ImageResource changed: update the info encoder
  144 | static_assert(fieldCount<ImageResource>() == 44, "ImageResource changed: update the info encoder");
note: the comparison reduces to '(45 == 44)'

The CI product jobs (linux, windows) are skipped on this PR, so nothing reports it.

Fix, on top of the merge:

  • ShaderDiskCache.cpp: fieldCount<ImageResource>() == 45.
  • ShaderDiskCache.hpp: FormatVersion = 49. main is already 48 with optionalDescriptor and without sampledOnly, and the merge keeps 48 silently because both sides made the same edit.

The auto-merged encoder and decoder already write and read both sampledOnly and optionalDescriptor. The Linux-only sizeof(ImageResource) == 96 check still holds, because the new bool fits in padding.

With those two lines changed locally (Ubuntu 26.04, GCC 15.2, Release, full build), ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, -j1:

test RTX 3070 (NVIDIA 595.99.02) lavapipe (Mesa 26.0.3)
agc_driver_image_sample_short_cube pass pass
agc_shader_disk_cache, agc_shader_disk_cache_large_file pass pass
agc_shader_memory, agc_recorder_cube pass pass
agc_driver_image_plane_address_on_cube, _sample_cube_derivatives, _store_face_on_cube, agc_driver_vop3_cube_clamp pass pass

agc_driver_graphics (decoder cases) also passes.

GPUs tested: NVIDIA GeForce RTX 3070 (proprietary 595.99.02, Linux), lavapipe (Mesa 26.0.3, LLVM 21).

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5662306273 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11507#pullrequestreview-5662306273). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T04:44:24Z. **Review:** COMMENTED --- Head `787b6a6720` merged onto current `main` `b986c11a34` merges without a text conflict, but the result does not compile on any host. #8077 (merged into `main` today) also added a field to `ImageResource` (`optionalDescriptor`) and also moved the shader cache format from 47 to 48, so the two bumps land on the same numbers: ```text core/shader/recompiler/ShaderDiskCache.cpp:144:43: error: static assertion failed: ImageResource changed: update the info encoder 144 | static_assert(fieldCount<ImageResource>() == 44, "ImageResource changed: update the info encoder"); note: the comparison reduces to '(45 == 44)' ``` The CI product jobs (`linux`, `windows`) are skipped on this PR, so nothing reports it. Fix, on top of the merge: - `ShaderDiskCache.cpp`: `fieldCount<ImageResource>() == 45`. - `ShaderDiskCache.hpp`: `FormatVersion = 49`. `main` is already 48 with `optionalDescriptor` and without `sampledOnly`, and the merge keeps 48 silently because both sides made the same edit. The auto-merged encoder and decoder already write and read both `sampledOnly` and `optionalDescriptor`. The Linux-only `sizeof(ImageResource) == 96` check still holds, because the new `bool` fits in padding. With those two lines changed locally (Ubuntu 26.04, GCC 15.2, Release, full build), `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`, `-j1`: | test | RTX 3070 (NVIDIA 595.99.02) | lavapipe (Mesa 26.0.3) | |---|---|---| | `agc_driver_image_sample_short_cube` | pass | pass | | `agc_shader_disk_cache`, `agc_shader_disk_cache_large_file` | pass | pass | | `agc_shader_memory`, `agc_recorder_cube` | pass | pass | | `agc_driver_image_plane_address_on_cube`, `_sample_cube_derivatives`, `_store_face_on_cube`, `agc_driver_vop3_cube_clamp` | pass | pass | `agc_driver_graphics` (decoder cases) also passes. GPUs tested: NVIDIA GeForce RTX 3070 (proprietary 595.99.02, Linux), lavapipe (Mesa 26.0.3, LLVM 21). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
jotitadev commented 2026-10-27 10:27:58 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Follow-up on head b9f4f65904: the fieldCount/format issue from my previous review is fixed, and the merge with main now builds and passes on Linux.

Machine: Ubuntu 26.04, GCC 15.2, Release, ninja of all plus every *_tests target. Head merged onto current main 801d5b9bc with no conflicts.

  • Build: clean. fieldCount<ImageResource>() == 45 holds with optionalDescriptor from #8077 and the new sampledOnly, and FormatVersion is 49. The Linux-only sizeof checks in ShaderDiskCache.cpp and PipelineJournal.cpp are unchanged and hold (ImageResource stays 96 bytes). public_headers passes 65 of 65.
  • Focused tests, 3 runs each, with the Khronos validation layer (1.4.341) loaded, ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. These are the 12 tests from your paired run.
    • NVIDIA RTX 3070 (595.99.02): 36 of 36 pass, with no VUID- lines.
    • lavapipe (Mesa 26.0.3): 36 of 36 pass, with no VUID- lines.
  • Control: ImageSampleShortCube.cpp alone on main 801d5b9bc fails on both devices with guest cube texture descriptor holds fewer than 6 array slices (format 22, 64x64x5, type 11, tile 0, mips 0..0 of 1) (base array 0).
  • ^agc on lavapipe (without display, flip and lds_atomics64): 1054 of 1055 pass. The one failure, agc_driver_multisample_retirement, also fails on main on this machine.

GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3), Ubuntu 26.04

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5665584338 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11507#pullrequestreview-5665584338). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-27T10:27:58Z. **Review:** COMMENTED --- Follow-up on head `b9f4f65904`: the `fieldCount`/format issue from my previous review is fixed, and the merge with `main` now builds and passes on Linux. Machine: Ubuntu 26.04, GCC 15.2, Release, `ninja` of `all` plus every `*_tests` target. Head merged onto current `main` `801d5b9bc` with no conflicts. - **Build:** clean. `fieldCount<ImageResource>() == 45` holds with `optionalDescriptor` from #8077 and the new `sampledOnly`, and `FormatVersion` is 49. The Linux-only `sizeof` checks in `ShaderDiskCache.cpp` and `PipelineJournal.cpp` are unchanged and hold (`ImageResource` stays 96 bytes). `public_headers` passes 65 of 65. - **Focused tests, 3 runs each,** with the Khronos validation layer (1.4.341) loaded, `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. These are the 12 tests from your paired run. - NVIDIA RTX 3070 (595.99.02): 36 of 36 pass, with no `VUID-` lines. - lavapipe (Mesa 26.0.3): 36 of 36 pass, with no `VUID-` lines. - **Control:** `ImageSampleShortCube.cpp` alone on `main` `801d5b9bc` fails on both devices with `guest cube texture descriptor holds fewer than 6 array slices (format 22, 64x64x5, type 11, tile 0, mips 0..0 of 1) (base array 0)`. - **`^agc` on lavapipe** (without display, flip and `lds_atomics64`): 1054 of 1055 pass. The one failure, `agc_driver_multisample_retirement`, also fails on `main` on this machine. GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3), Ubuntu 26.04 Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
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!11507
No description provided.