fix(agc): keep texture images inside their extent's mip chain #6280

Open
fdfawef324 wants to merge 6 commits from upstream-pr/6280 into main
fdfawef324 commented 2026-10-15 08:55:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T08:55:10Z.


What

A guest texture descriptor can name more mip levels than Vulkan permits for its extent. Cap sampled, storage and expanded-copy images at the physical chain; bound their allocations, views, uploads, blits, barriers, clears and write-back. Extra-level storage views and attachments remain refused; #7085 supplies separate backing in a follow-up.

Demon's Souls PPSA01342 originally lost the device after a 28x1 BC3 array declared ten levels while the extent held five. The private integration fault pointed to the first byte beyond that image. This is historical diagnosis; it is not a fresh title run on the final rebase.

For the decoded views exercised here (MAX_MIP = LAST_LEVEL), image_get_resinfo retains the guest level count and returns 1x1 spatial extents for extra levels within that count. At LOD >= count, it zeros every extent/layer component and retains the count. The emitter selects a valid physical query LOD before asking Vulkan, including for LOD 31 / UINT_MAX. Single-level descriptors with an unrepresented base refuse texel loads and LOD queries; pure size queries remain valid. Repacked storage-to-sampled copies use the same allocation/view cap.

The rebase preserves #6054's uploadImage path and passes physical geometry.imageLevels/copyLevels through sRGB image creation, blits, views and refresh. It retains main's ConvertedSampleRequired alongside ViewLevelsPastChain/LevelsPastChain, and keeps convertedSamples and levelUses in the cache encoder, decoder and nonzero round-trip fixture. Final cache format: 41; ImageResource guard: 40.

The existing decoder still clamps raw LAST_LEVEL to MAX_MIP when BASE_LEVEL <= MAX_MIP. The reported 28x1 LAST_LEVEL=9 / MAX_MIP=0 count of ten remains a discrepancy; this change does not fix it. A CPU LAST9/MAX6 control pins that unchanged decode. Samples/gathers past the chain still clamp to represented data, with console behavior unverified. There is no local PS5 or 3D/cube resinfo hardware claim.

External evidence is attributed, not counted as our own testing:

  • XairRrR reports Uncharted PPSA05684 overlong storage chains and eight ten-minute composed Linux/RTX4070TiSUPER runs without device loss. This supersedes the old no-title-use statement; no missing-level access was reported.
  • fisherjoey reports one 1500-second clean Demon's Souls PPSA01341 run and #6054 composition guidance, adopted here. That run tested the driver commit. Their later stack passed 1535/1536 lavapipe tests, with application_heap_lazy also failing previously; no game run was claimed on that later build. Its suggested format40 applied to its earlier main, so this rebase uses the next available version on its own pinned base.
  • thuanquang reports RX 6700 XT/gfx1031 HIP query counts/extents, zero extents beyond count and distinct texels for extra mip loads. That is desktop RDNA2 evidence, not PS5 or sampling/gather coverage; the raw LAST_LEVEL/MAX_MIP discrepancy above remains.
  • Amoenus's #7085 remains the extra-level representation follow-up, whose reviewed head was based on the earlier c80ba9e prerequisite. Its composed-title outcomes are not standalone cap-only success evidence.

Tested

Windows Server 2025 (10.0.26100), WinLibs MinGW-w64 GCC 15.2.0, Release. Final publication candidate 0e1f2ab53b596a4d33ec8426097bda2c05b82068 on main 676d423968a1a8fcc79c6247020ce22090a8e0d4.

Seven selected Release/O3 targets complete; the final restored incremental build took 14.06 seconds. Four CPU/mock CTests passed without skips in 14.91 seconds: agc_shader_bindless, agc_shader_memory, agc_shader_disk_cache and agc_driver_graphics. Two precise current-source controls failed at the intended single-unrepresented-base admission and repacked mip-5-of-5 copy assertions. Source was restored, rebuilt and retested. Conventions pass against the pinned base and later main 72a3d9f2a49d; its clean merge was checked separately from this 676-based execution.

The recording mock checks ordinary and beyond-chain sampled/upload/storage sRGB expansion and repacked-copy allocation, view and copy bounds. Device query fixtures cover shortened and ordinary five-level views, single-level base 7 / last 7, 2D/2D-array layouts, LOD=count/count+1/31/UINT_MAX, and uniform/mixed lanes. The inherited llvmpipe mixed-LOD exclusion remains; no Mesa-version cutoff is newly claimed.

Current-head device checks passed 5/5 registrations / four executables without skips in 4.35 seconds on the RTX 3060, sequentially in the managed slot. Required cases: image_levels_past_chain, image_sample_lod_clamp, image_srgb_load, image_srgb_sample_copy and forced sRGB-copy. The frozen naturally dirty query control at this same source head exited 1 in 0.90 seconds and reproduced both expected errors (LOD10 width1 instead of0; LOD5 width28 instead of0), with actual RTX/Vulkan initialization. The checker requires both diagnostics; this is an expected regression failure, separate from the five passing production cases. Device skips/exit77 are not passes. The selective control removes only the zero-extent selection, retaining the safe physical query LOD and guest count; count-boundary mismatches must be observed to count it as a meaningful red.

Runtime hashes were verified before and after; ANYPS5_REQUIRE_VULKAN=1 was set. No fresh title, FPS, console-equivalence or playability result is claimed by this update.

Shared-source coordination is pending: #7550 codec order and #7579 eligibility-line order propose this PR first, with both changes retained by the later rebase. Those proposals are not agreements, so the verified update remains a draft. #7085 already declares this PR as a prerequisite; its depth/layer/level argument order must be reconciled by meaning. There is no additional standalone build dependency or combined-runtime claim.

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: PPSA01342 #1283, overlong image-chain stop only
  • GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100 (TextureMipChain is a recording mock; external vendor/title reports remain separately attributed)
  • AI-assisted: yes (Claude Code and Codex)

Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4870722116 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-15T08:55:10Z. --- ### What A guest texture descriptor can name more mip levels than Vulkan permits for its extent. Cap sampled, storage and expanded-copy images at the physical chain; bound their allocations, views, uploads, blits, barriers, clears and write-back. Extra-level storage views and attachments remain refused; #7085 supplies separate backing in a follow-up. Demon's Souls PPSA01342 originally lost the device after a 28x1 BC3 array declared ten levels while the extent held five. The private integration fault pointed to the first byte beyond that image. This is historical diagnosis; it is not a fresh title run on the final rebase. For the decoded views exercised here (`MAX_MIP = LAST_LEVEL`), `image_get_resinfo` retains the guest level count and returns 1x1 spatial extents for extra levels within that count. At `LOD >= count`, it zeros every extent/layer component and retains the count. The emitter selects a valid physical query LOD before asking Vulkan, including for LOD 31 / UINT_MAX. Single-level descriptors with an unrepresented base refuse texel loads and LOD queries; pure size queries remain valid. Repacked storage-to-sampled copies use the same allocation/view cap. The rebase preserves #6054's uploadImage path and passes physical `geometry.imageLevels`/`copyLevels` through sRGB image creation, blits, views and refresh. It retains main's `ConvertedSampleRequired` alongside `ViewLevelsPastChain`/`LevelsPastChain`, and keeps `convertedSamples` and `levelUses` in the cache encoder, decoder and nonzero round-trip fixture. Final cache format: `41`; `ImageResource` guard: `40`. The existing decoder still clamps raw `LAST_LEVEL` to `MAX_MIP` when `BASE_LEVEL <= MAX_MIP`. The reported 28x1 LAST_LEVEL=9 / MAX_MIP=0 count of ten remains a discrepancy; this change does not fix it. A CPU LAST9/MAX6 control pins that unchanged decode. Samples/gathers past the chain still clamp to represented data, with console behavior unverified. There is no local PS5 or 3D/cube resinfo hardware claim. External evidence is attributed, not counted as our own testing: - [XairRrR](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6233123967) reports Uncharted PPSA05684 overlong storage chains and eight ten-minute composed Linux/RTX4070TiSUPER runs without device loss. This supersedes the old no-title-use statement; no missing-level access was reported. - [fisherjoey](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6253575693) reports one 1500-second clean Demon's Souls PPSA01341 run and #6054 composition guidance, adopted here. That run tested the driver commit. [Their later stack](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6258382934) passed 1535/1536 lavapipe tests, with application_heap_lazy also failing previously; no game run was claimed on that later build. Its suggested format40 applied to its earlier main, so this rebase uses the next available version on its own pinned base. - [thuanquang](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6254884569) reports RX 6700 XT/gfx1031 HIP query counts/extents, zero extents beyond count and distinct texels for extra mip loads. That is desktop RDNA2 evidence, not PS5 or sampling/gather coverage; the raw LAST_LEVEL/MAX_MIP discrepancy above remains. - [Amoenus's #7085](https://github.com/boykopovar/AnyPS5/pull/7085) remains the extra-level representation follow-up, whose reviewed head was based on the earlier c80ba9e prerequisite. Its composed-title outcomes are not standalone cap-only success evidence. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows Server 2025 (10.0.26100), WinLibs MinGW-w64 GCC 15.2.0, Release. Final publication candidate `0e1f2ab53b596a4d33ec8426097bda2c05b82068` on main `676d423968a1a8fcc79c6247020ce22090a8e0d4`. Seven selected Release/O3 targets complete; the final restored incremental build took 14.06 seconds. Four CPU/mock CTests passed without skips in 14.91 seconds: agc_shader_bindless, agc_shader_memory, agc_shader_disk_cache and agc_driver_graphics. Two precise current-source controls failed at the intended single-unrepresented-base admission and repacked mip-5-of-5 copy assertions. Source was restored, rebuilt and retested. Conventions pass against the pinned base and later main `72a3d9f2a49d`; its clean merge was checked separately from this 676-based execution. The recording mock checks ordinary and beyond-chain sampled/upload/storage sRGB expansion and repacked-copy allocation, view and copy bounds. Device query fixtures cover shortened and ordinary five-level views, single-level base 7 / last 7, 2D/2D-array layouts, LOD=count/count+1/31/UINT_MAX, and uniform/mixed lanes. The inherited llvmpipe mixed-LOD exclusion remains; no Mesa-version cutoff is newly claimed. Current-head device checks passed 5/5 registrations / four executables without skips in 4.35 seconds on the RTX 3060, sequentially in the managed slot. Required cases: image_levels_past_chain, image_sample_lod_clamp, image_srgb_load, image_srgb_sample_copy and forced sRGB-copy. The frozen naturally dirty query control at this same source head exited 1 in 0.90 seconds and reproduced both expected errors (LOD10 width1 instead of0; LOD5 width28 instead of0), with actual RTX/Vulkan initialization. The checker requires both diagnostics; this is an expected regression failure, separate from the five passing production cases. Device skips/exit77 are not passes. The selective control removes only the zero-extent selection, retaining the safe physical query LOD and guest count; count-boundary mismatches must be observed to count it as a meaningful red. Runtime hashes were verified before and after; ANYPS5_REQUIRE_VULKAN=1 was set. No fresh title, FPS, console-equivalence or playability result is claimed by this update. Shared-source coordination is pending: [#7550 codec order](https://github.com/boykopovar/AnyPS5/pull/7550#issuecomment-6260335187) and [#7579 eligibility-line order](https://github.com/boykopovar/AnyPS5/pull/7579#issuecomment-6260337321) propose this PR first, with both changes retained by the later rebase. Those proposals are not agreements, so the verified update remains a draft. [#7085 already declares this PR as a prerequisite](https://github.com/boykopovar/AnyPS5/pull/7085#issuecomment-6260335490); its depth/layer/level argument order must be reconciled by meaning. There is no additional standalone build dependency or combined-runtime claim. ### 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: PPSA01342 #1283, overlong image-chain stop only - [x] GPUs tested: NVIDIA GeForce RTX 3060 12 GB, driver 591.86 (32.0.15.9186), Vulkan 1.4.325, Windows Server 2025 10.0.26100 (TextureMipChain is a recording mock; external vendor/title reports remain separately attributed) - [x] AI-assisted: yes (Claude Code and Codex) Co-Authored-By: Codex <[email protected]>
fdfawef324 commented 2026-10-15 13:35:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T13:35:37Z.


Rebased on main 71bd2876e and added a second commit for the review gaps on the shader side of a view shortened to the mip chain:

  • image_get_resinfo now returns the T#'s level count (LAST_LEVEL - BASE_LEVEL + 1, 10 for the 28x1 T# of levels 0-9 instead of the view's 5) and 1x1 at LODs the view lacks, as Mesa's ac_nir_lower_resinfo.c derives them from the descriptor. The missing level count reaches the shader as a specialization constant, or in the runtime image metadata for registration modules.
  • BY2/BY4 and PCK2/PCK4 loads were already exact (zero at every 1x1 level). image_load_mip, image_get_lod, image_load through a base level past the chain and image_get_resinfo through an image table now refuse the descriptor instead of reading another level.
  • Tests: new device test agc_driver_image_levels_past_chain, red without the commit. It also covers sampled levels 0-4 and a storage write-back that leaves levels 1-9 untouched in guest memory. The mock test now checks that the recompiler's level arithmetic matches the driver's view for seven T#s, and its range check covers layers. 147 related tests pass on the RTX 3060.
  • #5480 / #6054: whichever lands second carries the cap (CopyRefusal, the sRGB copy's image and view levels); noted in the description.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193373457 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6193373457). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-15T13:35:37Z. --- Rebased on `main` 71bd2876e and added a second commit for the review gaps on the shader side of a view shortened to the mip chain: - `image_get_resinfo` now returns the T#'s level count (`LAST_LEVEL - BASE_LEVEL + 1`, 10 for the 28x1 T# of levels 0-9 instead of the view's 5) and 1x1 at LODs the view lacks, as Mesa's `ac_nir_lower_resinfo.c` derives them from the descriptor. The missing level count reaches the shader as a specialization constant, or in the runtime image metadata for registration modules. - BY2/BY4 and PCK2/PCK4 loads were already exact (zero at every 1x1 level). `image_load_mip`, `image_get_lod`, `image_load` through a base level past the chain and `image_get_resinfo` through an image table now refuse the descriptor instead of reading another level. - Tests: new device test `agc_driver_image_levels_past_chain`, red without the commit. It also covers sampled levels 0-4 and a storage write-back that leaves levels 1-9 untouched in guest memory. The mock test now checks that the recompiler's level arithmetic matches the driver's view for seven T#s, and its range check covers layers. 147 related tests pass on the RTX 3060. - #5480 / #6054: whichever lands second carries the cap (`CopyRefusal`, the sRGB copy's image and view levels); noted in the description. AI-assisted: yes
coltken95 commented 2026-10-15 19:56:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-15T19:56:34Z.


Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with 5fb9380b7 merged into main 44df21632:

  • 9 of the 10 tests built from the changed test files pass (agc_driver_graphics, agc_shader_disk_cache and the rest).
  • The new agc_driver_image_levels_past_chain fails on lavapipe, in two cases:
    • AGC graphics: image_get_resinfo of a 28x1 2D T# of levels 0-9 at LOD 1: the width is 28, expected 14
    • AGC graphics: image_get_resinfo of a 28x1 2D-array T# of levels 0-9 at LOD 1: the width is 28, expected 14
      Before that, the log shows [texture] ... (28x1, 1 layers) names 10 mip levels, more than the 5 its extent holds: levels 5-9 are not uploaded.
  • No NVIDIA/AMD Linux run here, so I can't say whether this is lavapipe-only.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6201037050 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6201037050). Originally posted by [coltken95](https://github.com/coltken95) on 2026-10-15T19:56:34Z. --- Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with 5fb9380b7 merged into main 44df21632: - 9 of the 10 tests built from the changed test files pass (`agc_driver_graphics`, `agc_shader_disk_cache` and the rest). - The new `agc_driver_image_levels_past_chain` fails on lavapipe, in two cases: - `AGC graphics: image_get_resinfo of a 28x1 2D T# of levels 0-9 at LOD 1: the width is 28, expected 14` - `AGC graphics: image_get_resinfo of a 28x1 2D-array T# of levels 0-9 at LOD 1: the width is 28, expected 14` Before that, the log shows `[texture] ... (28x1, 1 layers) names 10 mip levels, more than the 5 its extent holds: levels 5-9 are not uploaded`. - No NVIDIA/AMD Linux run here, so I can't say whether this is lavapipe-only. AI-assisted: yes (Claude Code)
fdfawef324 commented 2026-10-16 19:53:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-16T19:53:50Z.


Thanks for running this on lavapipe. We have no lavapipe here, so what follows comes from the module our code emits and from reading Mesa's source; we did not reproduce it on lavapipe.

What we checked:

  • The device test sends every invocation its own LOD (tid % levels) through one image_get_resinfo dispatch. The module we emit for the 28x1 T# of levels 0-9 asks the view for OpImageQueryLevels (5), OpImageQuerySizeLod with the invocation's own LOD, and adds the 5 levels the view lacks. We compiled the test's shader on the CPU (with a representative capability set, not a device's own) and read the instructions. At LOD 1 they give a width of 14, a height of 1 and a level count of 10, which is what the test expects. OpImageQuerySizeLod takes any integer LOD per invocation (SPIR-V specification 1.6, OpImageQuerySizeLod: "Level of Detail is used to compute which mipmap level to query"), so we do not see a problem in the module.
  • In the Mesa source we read, lp_build_size_query_soa (src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c) takes element 0 of the explicit-LOD vector for the whole group of invocations, with the comment /* FIXME: this needs to honor per-element lod */. We did not establish which Mesa release, if any, changed that, so we cannot say whether your lavapipe has it.
  • A model of that behaviour (the size query of each group of 4 or 8 invocations answered at the LOD of its first invocation) applied to our emitted instructions gives exactly the two failures you report: invocation 1, LOD 1, width 28 instead of 14, for the 2D and the 2D-array T#. It passes the levels 7-9 case, which your report does not list as failing, because every width there is 1.

What we have not verified: your Mesa version (could you post the driverInfo line of vulkaninfo --summary?) and that the model above is what your run does. If the commit below still fails on your lavapipe, this explanation is wrong and we would like the full output.

We pushed c80ba9e31 on top (it passes on our RTX 3060, where the mixed-LOD dispatch still runs): each LOD of the T# now gets a dispatch of its own, with the same expected values (width, height, layer count, level count), so the size query never sees different LODs in one group of invocations. The dispatch with a different LOD per invocation still runs on every device except llvmpipe, where it prints that it is skipped. It changes only the test. If this commit passes on your lavapipe, the cause is the one-LOD-per-vector size query; if it still fails, it is something else.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6223519366 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6223519366). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-16T19:53:50Z. --- Thanks for running this on lavapipe. We have no lavapipe here, so what follows comes from the module our code emits and from reading Mesa's source; we did not reproduce it on lavapipe. What we checked: - The device test sends every invocation its own LOD (`tid % levels`) through one `image_get_resinfo` dispatch. The module we emit for the 28x1 T# of levels 0-9 asks the view for `OpImageQueryLevels` (5), `OpImageQuerySizeLod` with the invocation's own LOD, and adds the 5 levels the view lacks. We compiled the test's shader on the CPU (with a representative capability set, not a device's own) and read the instructions. At LOD 1 they give a width of 14, a height of 1 and a level count of 10, which is what the test expects. `OpImageQuerySizeLod` takes any integer LOD per invocation (SPIR-V specification 1.6, `OpImageQuerySizeLod`: "Level of Detail is used to compute which mipmap level to query"), so we do not see a problem in the module. - In the Mesa source we read, `lp_build_size_query_soa` (`src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c`) takes element 0 of the explicit-LOD vector for the whole group of invocations, with the comment `/* FIXME: this needs to honor per-element lod */`. We did not establish which Mesa release, if any, changed that, so we cannot say whether your lavapipe has it. - A model of that behaviour (the size query of each group of 4 or 8 invocations answered at the LOD of its first invocation) applied to our emitted instructions gives exactly the two failures you report: invocation 1, LOD 1, width 28 instead of 14, for the 2D and the 2D-array T#. It passes the levels 7-9 case, which your report does not list as failing, because every width there is 1. What we have not verified: your Mesa version (could you post the `driverInfo` line of `vulkaninfo --summary`?) and that the model above is what your run does. If the commit below still fails on your lavapipe, this explanation is wrong and we would like the full output. We pushed `c80ba9e31` on top (it passes on our RTX 3060, where the mixed-LOD dispatch still runs): each LOD of the T# now gets a dispatch of its own, with the same expected values (width, height, layer count, level count), so the size query never sees different LODs in one group of invocations. The dispatch with a different LOD per invocation still runs on every device except llvmpipe, where it prints that it is skipped. It changes only the test. If this commit passes on your lavapipe, the cause is the one-LOD-per-vector size query; if it still fails, it is something else. AI-assisted: yes
XairRrR commented 2026-10-17 11:01:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-17T11:01:38Z.


Another title that needs the storage-image part: Uncharted: Legacy of Thieves Collection (PPSA05684) binds storage textures whose T#s name 15 mip levels on 2560x1440, 1280x720, 480x270, 512x512 and 16x16 surfaces, so the description's "no title is shown to use a storage image with more levels than its extent" no longer holds.

Tested on Linux, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), Release, on a private build of main plus other open PRs (#6003, #6004, #6182, #6412, #6771, #6772), with this PR's head c80ba9e31 merged in:

  • Without this PR, the orphanage level lost the device in 7 of 19 ten-minute runs: Xid 109 (CTX SWITCH TIMEOUT), then Xid 31.
  • In the run with VK_EXT_device_address_binding_report, the fault was write invalid at 0x546d10000. That is the first byte past a 2560x1440, 15-level, 7-layer R16G16B16A16F storage image ([0x532b60000, +0x141b0000)), created just before the fault.
  • In 6 of 6 hangs, a 15-level storage texture was among the last two created; across all storage textures only about 3% have 15 levels.
  • Tracking object lifetimes found no image, buffer or descriptor released while a batch using it was pending, so lifetime is not the cause.
  • With this PR: 8 of 8 ten-minute orphanage runs, no device loss. Each run created 9 to 18 15-level storage textures and none of the new refusals fired (past its extent's full mip chain, storage image view of mip level), so the title never accesses a level past the chain.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233123967 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6233123967). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-17T11:01:38Z. --- Another title that needs the storage-image part: Uncharted: Legacy of Thieves Collection (PPSA05684) binds storage textures whose T#s name 15 mip levels on 2560x1440, 1280x720, 480x270, 512x512 and 16x16 surfaces, so the description's "no title is shown to use a storage image with more levels than its extent" no longer holds. Tested on Linux, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), Release, on a private build of `main` plus other open PRs (#6003, #6004, #6182, #6412, #6771, #6772), with this PR's head c80ba9e31 merged in: - Without this PR, the orphanage level lost the device in 7 of 19 ten-minute runs: Xid 109 (CTX SWITCH TIMEOUT), then Xid 31. - In the run with `VK_EXT_device_address_binding_report`, the fault was `write invalid at 0x546d10000`. That is the first byte past a 2560x1440, 15-level, 7-layer R16G16B16A16F storage image (`[0x532b60000, +0x141b0000)`), created just before the fault. - In 6 of 6 hangs, a 15-level storage texture was among the last two created; across all storage textures only about 3% have 15 levels. - Tracking object lifetimes found no image, buffer or descriptor released while a batch using it was pending, so lifetime is not the cause. - With this PR: 8 of 8 ten-minute orphanage runs, no device loss. Each run created 9 to 18 15-level storage textures and none of the new refusals fired (`past its extent's full mip chain`, `storage image view of mip level`), so the title never accesses a level past the chain. AI-assisted: yes
fisherjoey commented 2026-10-18 18:32:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-18T18:32:37Z.


Two things from Demon's Souls (PPSA01341 v1.07, Linux, RTX 5070 Ti, NVIDIA 595.91.07).

It fixes our Xid 31. We'd hit NVRM: Xid 31 (MMU fault, copy engine write) three times in the level. With b9badf4c2 on our base, a 1500 s run was clean, and the clamp fired once, on the 256-layer BC array at 0x1009000000 (11 mips cut to 5). That's the texture that had been created right before each of the three faults.

The conflict with main is #6054. It added CreateExpandImage/RecordExpandBlit, which size the RGBA8 copy from descriptor.mipCount. Applied on top of this PR, they rebuild the over-long chain this PR removes. Our resolution, replaying b9badf4c2 on main 505767380:

  • CreateExpandImage and RecordExpandBlit take a levels argument, fed geometry.imageLevels on the upload path.
  • The sRGB storage-copy constructor sets copyLevels = geometry.imageLevels and uses ViewLevels() for the view, like your block-copy and depth-copy paths. refreshSrgbExpand passes copyLevels through.
  • In the barrier hunk, #6054's uploadImage is combined with your geometry.imageLevels.

Lavapipe full suite on that tree: 1460 of 1461 pass. The one failure, application_heap_lazy, also fails on our trees without this PR. image_levels_past_chain, image_sample_lod_clamp, image_srgb_sample_copy, image_srgb_sample_copy_forced and image_srgb_load pass. This covers only the driver commit b9badf4c2, not 5fb9380b7. Use any of it if it helps.

Resolution hunks (b9badf4c2 replayed on main 505767380)
diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
index 82f733941..a16eb56fe 100644
--- a/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
+++ b/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
@@ -244,14 +257,14 @@ struct ExpandImage {
     VkDeviceSize bytes = 0;
 };
 
-ExpandImage CreateExpandImage(const Context& context, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t layers) {
+ExpandImage CreateExpandImage(const Context& context, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t levels, std::uint32_t layers) {
     ExpandImage result;
     VkImageCreateInfo imageInfo{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO};
     imageInfo.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | (descriptor.dimension == TextureDimension::kCube ? VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT : 0u);
     imageInfo.imageType = ImageTypeFor(descriptor.dimension);
     imageInfo.format = VK_FORMAT_R8G8B8A8_UNORM;
     imageInfo.extent = {descriptor.width, descriptor.height, depth};
-    imageInfo.mipLevels = descriptor.mipCount;
+    imageInfo.mipLevels = levels;
     imageInfo.arrayLayers = layers;
     imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
     imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
@@ -271,9 +284,9 @@ ExpandImage CreateExpandImage(const Context& context, const GuestTextureResource
     return result;
 }
 
-void RecordExpandBlit(const Context& context, VkCommandBuffer commands, VkImage source, VkImageLayout sourceLayout, VkImage target, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t layers) {
+void RecordExpandBlit(const Context& context, VkCommandBuffer commands, VkImage source, VkImageLayout sourceLayout, VkImage target, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t levels, std::uint32_t layers) {
     std::vector<VkImageBlit> regions;
-    for (std::uint32_t level = 0; level < descriptor.mipCount; ++level) {
+    for (std::uint32_t level = 0; level < levels; ++level) {
         const VkOffset3D end{static_cast<std::int32_t>(std::max(descriptor.width >> level, 1u)), static_cast<std::int32_t>(std::max(descriptor.height >> level, 1u)), static_cast<std::int32_t>(descriptor.dimension == TextureDimension::k3D ? std::max(depth >> level, 1u) : 1u)};
         VkImageBlit region{};
         region.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, level, 0, layers};
@@ -285,6 +298,11 @@ void RecordExpandBlit(const Context& context, VkCommandBuffer commands, VkImage
     context.Function<PFN_vkCmdBlitImage>("vkCmdBlitImage")(commands, source, sourceLayout, target, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, static_cast<std::uint32_t>(regions.size()), regions.data(), VK_FILTER_NEAREST);
 }
 
+void RequireImageLevel(const GuestTextureResource& descriptor, const SurfaceGeometry& geometry, std::uint32_t level, const char* access) {
+    if (level < geometry.imageLevels) return;
+    throw std::runtime_error("AGC graphics: " + std::string(access) + " of mip level " + std::to_string(level) + " of a " + std::to_string(descriptor.width) + "x" + std::to_string(descriptor.height) + "x" + std::to_string(geometry.imageDepth) + " surface of " + std::to_string(descriptor.mipCount) + " levels is not implemented: a Vulkan image of that extent holds " + std::to_string(geometry.imageLevels) + " levels, and the 1x1 levels past floor(log2(max extent)) + 1 are not represented");
+}
+
 std::atomic<std::uint64_t>& SampledMemoryCounter() {
     static std::atomic<std::uint64_t> bytes{0};
     return bytes;
@@ -353,7 +375,7 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex
         const VkImage uploadImage = image;
         std::shared_ptr<OwnedImage> uploadOwned;
         if (srgbExpand) {
-            auto expanded = CreateExpandImage(context, descriptor, geometry.imageDepth, geometry.imageLayers);
+            auto expanded = CreateExpandImage(context, descriptor, geometry.imageDepth, geometry.imageLevels, geometry.imageLayers);
             uploadOwned = std::move(owned);
             owned = std::move(expanded.owned);
             image = expanded.image;
@@ -445,14 +467,14 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex
             toTransferDst.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
             toTransferDst.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
             toTransferDst.image = uploadImage;
-            toTransferDst.subresourceRange = {aspect, 0, descriptor.mipCount, 0, geometry.imageLayers};
+            toTransferDst.subresourceRange = {aspect, 0, geometry.imageLevels, 0, geometry.imageLayers};
             context.Function<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(commands, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 1, &linearReadBarrier, 1, &toTransferDst);
 
             std::vector<VkBufferImageCopy> regions;
             regions.reserve(static_cast<std::size_t>(arrayLayers) * mips.size());
             for (std::uint32_t layer = 0; layer < arrayLayers; ++layer) {
                 const auto linearLayerOffset = static_cast<std::uint64_t>(layer) * sliceLinearBytes;
-                for (std::uint32_t level = 0; level < descriptor.mipCount; ++level) {
+                for (std::uint32_t level = 0; level < geometry.imageLevels; ++level) {
                     if (!geometry.HasLayer(level, layer)) continue;
                     const auto& mip = mips[level];
                     VkBufferImageCopy region{};
@@ -476,7 +498,7 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex
                 toBlit[1] = toTransferDst;
                 toBlit[1].image = image;
                 context.Function<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(commands, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 2, toBlit.data());
-                RecordExpandBlit(context, commands, uploadImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, image, descriptor, geometry.imageDepth, geometry.imageLayers);
+                RecordExpandBlit(context, commands, uploadImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, image, descriptor, geometry.imageDepth, geometry.imageLevels, geometry.imageLayers);
             }
             std::unique_ptr<Buffer> dump;
             if (dumpWanted) {
@@ -531,7 +553,7 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex
         viewInfo.format = srgbExpand ? VK_FORMAT_R8G8B8A8_SRGB : vkFormat;
         viewFormat = viewInfo.format;
         viewInfo.components = depthCompare ? VkComponentMapping{} : components;
-        viewInfo.subresourceRange = {aspect, descriptor.baseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount};
+        viewInfo.subresourceRange = {aspect, viewBaseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount};
         VkImageViewMinLodCreateInfoEXT minLod{VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT};
         ChainMinLod(context, descriptor, viewInfo, minLod);
 
@@ -777,15 +799,15 @@ Texture::Texture(const Context& context, const std::shared_ptr<StorageTexture>&
         const auto geometry = DescribeSurface(descriptor);
         copyWidth = descriptor.width;
         copyHeight = descriptor.height;
-        copyLevels = descriptor.mipCount;
+        copyLevels = geometry.imageLevels;
         copyLayers = geometry.imageLayers;
         APS5_LOG_OUT("Texture address=0x%llx %ux%u mips=%u layers=%u sRGB copy of storage image (guest format %u)", static_cast<unsigned long long>(descriptor.baseAddress), descriptor.width, descriptor.height, descriptor.mipCount, copyLayers, descriptor.format);
-        auto expanded = CreateExpandImage(context, descriptor, 1u, copyLayers);
+        auto expanded = CreateExpandImage(context, descriptor, 1u, copyLevels, copyLayers);
         image = expanded.image;
         owned = std::move(expanded.owned);
         allocationBytes = expanded.bytes;
 
-        const auto viewLevelCount = std::min(descriptor.lastLevel, descriptor.mipCount - 1u) - descriptor.baseLevel + 1u;
+        const auto [viewBaseLevel, viewLevelCount] = ViewLevels(descriptor, geometry.imageLevels);
         const auto viewLayerCount = geometry.imageLayers - descriptor.baseArray;
         if (descriptor.dimension == TextureDimension::kCube) {
             Require(viewLayerCount % 6u == 0, "guest cube texture view does not contain a multiple of 6 array slices");
@@ -796,7 +818,7 @@ Texture::Texture(const Context& context, const std::shared_ptr<StorageTexture>&
         viewInfo.format = VK_FORMAT_R8G8B8A8_SRGB;
         viewFormat = viewInfo.format;
         viewInfo.components = components;
-        viewInfo.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, descriptor.baseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount};
+        viewInfo.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, viewBaseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount};
         VkImageViewMinLodCreateInfoEXT minLod{VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT};
         ChainMinLod(context, descriptor, viewInfo, minLod);
         Check(context.Function<PFN_vkCreateImageView>("vkCreateImageView")(context.device, &viewInfo, nullptr, &view), "vkCreateImageView sRGB copy");
@@ -836,7 +858,7 @@ bool Texture::refreshSrgbExpand() {
     toTransferDst.image = image;
     toTransferDst.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, copyLevels, 0, copyLayers};
     barrier(commands, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &produced, 0, nullptr, 1, &toTransferDst);
-    RecordExpandBlit(context, commands, storageSource->Image(), VK_IMAGE_LAYOUT_GENERAL, image, sourceDescriptor, 1u, copyLayers);
+    RecordExpandBlit(context, commands, storageSource->Image(), VK_IMAGE_LAYOUT_GENERAL, image, sourceDescriptor, 1u, copyLevels, copyLayers);
     VkImageMemoryBarrier toShaderRead = toTransferDst;
     toShaderRead.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
     toShaderRead.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253575693 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6253575693). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-18T18:32:37Z. --- Two things from Demon's Souls (PPSA01341 v1.07, Linux, RTX 5070 Ti, NVIDIA 595.91.07). **It fixes our Xid 31.** We'd hit `NVRM: Xid 31` (MMU fault, copy engine write) three times in the level. With b9badf4c2 on our base, a 1500 s run was clean, and the clamp fired once, on the 256-layer BC array at 0x1009000000 (11 mips cut to 5). That's the texture that had been created right before each of the three faults. **The conflict with main is #6054.** It added `CreateExpandImage`/`RecordExpandBlit`, which size the RGBA8 copy from `descriptor.mipCount`. Applied on top of this PR, they rebuild the over-long chain this PR removes. Our resolution, replaying b9badf4c2 on main 505767380: - `CreateExpandImage` and `RecordExpandBlit` take a levels argument, fed `geometry.imageLevels` on the upload path. - The sRGB storage-copy constructor sets `copyLevels = geometry.imageLevels` and uses `ViewLevels()` for the view, like your block-copy and depth-copy paths. `refreshSrgbExpand` passes `copyLevels` through. - In the barrier hunk, #6054's `uploadImage` is combined with your `geometry.imageLevels`. Lavapipe full suite on that tree: 1460 of 1461 pass. The one failure, `application_heap_lazy`, also fails on our trees without this PR. `image_levels_past_chain`, `image_sample_lod_clamp`, `image_srgb_sample_copy`, `image_srgb_sample_copy_forced` and `image_srgb_load` pass. This covers only the driver commit b9badf4c2, not 5fb9380b7. Use any of it if it helps. <details><summary>Resolution hunks (b9badf4c2 replayed on main 505767380)</summary> ```diff diff --git a/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp b/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp index 82f733941..a16eb56fe 100644 --- a/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp +++ b/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp @@ -244,14 +257,14 @@ struct ExpandImage { VkDeviceSize bytes = 0; }; -ExpandImage CreateExpandImage(const Context& context, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t layers) { +ExpandImage CreateExpandImage(const Context& context, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t levels, std::uint32_t layers) { ExpandImage result; VkImageCreateInfo imageInfo{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; imageInfo.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | (descriptor.dimension == TextureDimension::kCube ? VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT : 0u); imageInfo.imageType = ImageTypeFor(descriptor.dimension); imageInfo.format = VK_FORMAT_R8G8B8A8_UNORM; imageInfo.extent = {descriptor.width, descriptor.height, depth}; - imageInfo.mipLevels = descriptor.mipCount; + imageInfo.mipLevels = levels; imageInfo.arrayLayers = layers; imageInfo.samples = VK_SAMPLE_COUNT_1_BIT; imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL; @@ -271,9 +284,9 @@ ExpandImage CreateExpandImage(const Context& context, const GuestTextureResource return result; } -void RecordExpandBlit(const Context& context, VkCommandBuffer commands, VkImage source, VkImageLayout sourceLayout, VkImage target, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t layers) { +void RecordExpandBlit(const Context& context, VkCommandBuffer commands, VkImage source, VkImageLayout sourceLayout, VkImage target, const GuestTextureResource& descriptor, std::uint32_t depth, std::uint32_t levels, std::uint32_t layers) { std::vector<VkImageBlit> regions; - for (std::uint32_t level = 0; level < descriptor.mipCount; ++level) { + for (std::uint32_t level = 0; level < levels; ++level) { const VkOffset3D end{static_cast<std::int32_t>(std::max(descriptor.width >> level, 1u)), static_cast<std::int32_t>(std::max(descriptor.height >> level, 1u)), static_cast<std::int32_t>(descriptor.dimension == TextureDimension::k3D ? std::max(depth >> level, 1u) : 1u)}; VkImageBlit region{}; region.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, level, 0, layers}; @@ -285,6 +298,11 @@ void RecordExpandBlit(const Context& context, VkCommandBuffer commands, VkImage context.Function<PFN_vkCmdBlitImage>("vkCmdBlitImage")(commands, source, sourceLayout, target, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, static_cast<std::uint32_t>(regions.size()), regions.data(), VK_FILTER_NEAREST); } +void RequireImageLevel(const GuestTextureResource& descriptor, const SurfaceGeometry& geometry, std::uint32_t level, const char* access) { + if (level < geometry.imageLevels) return; + throw std::runtime_error("AGC graphics: " + std::string(access) + " of mip level " + std::to_string(level) + " of a " + std::to_string(descriptor.width) + "x" + std::to_string(descriptor.height) + "x" + std::to_string(geometry.imageDepth) + " surface of " + std::to_string(descriptor.mipCount) + " levels is not implemented: a Vulkan image of that extent holds " + std::to_string(geometry.imageLevels) + " levels, and the 1x1 levels past floor(log2(max extent)) + 1 are not represented"); +} + std::atomic<std::uint64_t>& SampledMemoryCounter() { static std::atomic<std::uint64_t> bytes{0}; return bytes; @@ -353,7 +375,7 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex const VkImage uploadImage = image; std::shared_ptr<OwnedImage> uploadOwned; if (srgbExpand) { - auto expanded = CreateExpandImage(context, descriptor, geometry.imageDepth, geometry.imageLayers); + auto expanded = CreateExpandImage(context, descriptor, geometry.imageDepth, geometry.imageLevels, geometry.imageLayers); uploadOwned = std::move(owned); owned = std::move(expanded.owned); image = expanded.image; @@ -445,14 +467,14 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex toTransferDst.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; toTransferDst.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; toTransferDst.image = uploadImage; - toTransferDst.subresourceRange = {aspect, 0, descriptor.mipCount, 0, geometry.imageLayers}; + toTransferDst.subresourceRange = {aspect, 0, geometry.imageLevels, 0, geometry.imageLayers}; context.Function<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(commands, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 1, &linearReadBarrier, 1, &toTransferDst); std::vector<VkBufferImageCopy> regions; regions.reserve(static_cast<std::size_t>(arrayLayers) * mips.size()); for (std::uint32_t layer = 0; layer < arrayLayers; ++layer) { const auto linearLayerOffset = static_cast<std::uint64_t>(layer) * sliceLinearBytes; - for (std::uint32_t level = 0; level < descriptor.mipCount; ++level) { + for (std::uint32_t level = 0; level < geometry.imageLevels; ++level) { if (!geometry.HasLayer(level, layer)) continue; const auto& mip = mips[level]; VkBufferImageCopy region{}; @@ -476,7 +498,7 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex toBlit[1] = toTransferDst; toBlit[1].image = image; context.Function<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(commands, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 2, toBlit.data()); - RecordExpandBlit(context, commands, uploadImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, image, descriptor, geometry.imageDepth, geometry.imageLayers); + RecordExpandBlit(context, commands, uploadImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, image, descriptor, geometry.imageDepth, geometry.imageLevels, geometry.imageLayers); } std::unique_ptr<Buffer> dump; if (dumpWanted) { @@ -531,7 +553,7 @@ Texture::Texture(const Context& context, TextureDetiler& detiler, const GuestTex viewInfo.format = srgbExpand ? VK_FORMAT_R8G8B8A8_SRGB : vkFormat; viewFormat = viewInfo.format; viewInfo.components = depthCompare ? VkComponentMapping{} : components; - viewInfo.subresourceRange = {aspect, descriptor.baseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount}; + viewInfo.subresourceRange = {aspect, viewBaseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount}; VkImageViewMinLodCreateInfoEXT minLod{VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT}; ChainMinLod(context, descriptor, viewInfo, minLod); @@ -777,15 +799,15 @@ Texture::Texture(const Context& context, const std::shared_ptr<StorageTexture>& const auto geometry = DescribeSurface(descriptor); copyWidth = descriptor.width; copyHeight = descriptor.height; - copyLevels = descriptor.mipCount; + copyLevels = geometry.imageLevels; copyLayers = geometry.imageLayers; APS5_LOG_OUT("Texture address=0x%llx %ux%u mips=%u layers=%u sRGB copy of storage image (guest format %u)", static_cast<unsigned long long>(descriptor.baseAddress), descriptor.width, descriptor.height, descriptor.mipCount, copyLayers, descriptor.format); - auto expanded = CreateExpandImage(context, descriptor, 1u, copyLayers); + auto expanded = CreateExpandImage(context, descriptor, 1u, copyLevels, copyLayers); image = expanded.image; owned = std::move(expanded.owned); allocationBytes = expanded.bytes; - const auto viewLevelCount = std::min(descriptor.lastLevel, descriptor.mipCount - 1u) - descriptor.baseLevel + 1u; + const auto [viewBaseLevel, viewLevelCount] = ViewLevels(descriptor, geometry.imageLevels); const auto viewLayerCount = geometry.imageLayers - descriptor.baseArray; if (descriptor.dimension == TextureDimension::kCube) { Require(viewLayerCount % 6u == 0, "guest cube texture view does not contain a multiple of 6 array slices"); @@ -796,7 +818,7 @@ Texture::Texture(const Context& context, const std::shared_ptr<StorageTexture>& viewInfo.format = VK_FORMAT_R8G8B8A8_SRGB; viewFormat = viewInfo.format; viewInfo.components = components; - viewInfo.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, descriptor.baseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount}; + viewInfo.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, viewBaseLevel, viewLevelCount, descriptor.baseArray, viewLayerCount}; VkImageViewMinLodCreateInfoEXT minLod{VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT}; ChainMinLod(context, descriptor, viewInfo, minLod); Check(context.Function<PFN_vkCreateImageView>("vkCreateImageView")(context.device, &viewInfo, nullptr, &view), "vkCreateImageView sRGB copy"); @@ -836,7 +858,7 @@ bool Texture::refreshSrgbExpand() { toTransferDst.image = image; toTransferDst.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, copyLevels, 0, copyLayers}; barrier(commands, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &produced, 0, nullptr, 1, &toTransferDst); - RecordExpandBlit(context, commands, storageSource->Image(), VK_IMAGE_LAYOUT_GENERAL, image, sourceDescriptor, 1u, copyLayers); + RecordExpandBlit(context, commands, storageSource->Image(), VK_IMAGE_LAYOUT_GENERAL, image, sourceDescriptor, 1u, copyLevels, copyLayers); VkImageMemoryBarrier toShaderRead = toTransferDst; toShaderRead.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; toShaderRead.dstAccessMask = VK_ACCESS_SHADER_READ_BIT; ``` </details> AI-assisted: yes
thuanquang commented 2026-10-18 20:40:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-18T20:40:11Z.


Hardware data for the part the description says is not measured on AMD. RX 6700 XT (gfx1031, RDNA 2), run through HIP: image_get_resinfo with dmask:0xf and the T#'s own DIM, one LOD per lane from 0 to 31, 32-bit float format:

T# levels result by LOD
2D 28x1 0-9 LOD 0-9: (max(1, 28 >> LOD), 1, 0, 10), so 28, 14, 7, 3, then 1 for LOD 4-9
2D 28x1, MAX_MIP 0 0-9 the same as with MAX_MIP 9: 10 levels
2D 28x1 5-9 LOD 0-4: (1, 1, 0, 5)
2D 28x1 7-9 LOD 0-2: (1, 1, 0, 3)
2D_ARRAY 28x1, 4 and 256 layers 0-9 as the 2D T#, with the layer count third
2D_ARRAY 28x1, 4 layers 7-9 LOD 0-2: (1, 1, 4, 3)
2D_ARRAY 4x1, 64 layers 0-10 (4, 1, 64, 11), (2, 1, 64, 11), then width 1 up to LOD 10
3D 28x1x4 0-9 (max(1, 28 >> LOD), 1, max(1, 4 >> LOD), 10)
3D 28x1x4 7-9 LOD 0-2: (1, 1, 1, 3)

So the second commit's values hold on RDNA 2: the level count is LAST_LEVEL - BASE_LEVEL + 1 whatever MAX_MIP says, and each extent is max(1, extent >> (BASE_LEVEL + LOD)), so it is 1 at every LOD past the chain. One case the PR's test doesn't cover: at a LOD at or past the level count, every row above returns 0 for width, height and depth, with the level count unchanged ((0, 0, 0, 10) for the 28x1 levels 0-9 T# at LOD 10 to 31).

image_load_mip at (0, 0) through the 28x1 2D T# of levels 0-9, linear and SW_64KB_S, over memory where each dword holds its own index: LODs 0-9 return ten different dwords, and LODs 10 to 15 return 0. So each of the five levels past the chain reads a 1x1 texel at its own address, as the description says, and a read through such a level that the emulator served from another level would return the wrong texel. That matches refusing image_load_mip there.

This is desktop RDNA 2, not a PS5, and it covers only the queries and loads above, not samples or gathers past the chain.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254884569 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6254884569). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-18T20:40:11Z. --- Hardware data for the part the description says is not measured on AMD. RX 6700 XT (gfx1031, RDNA 2), run through HIP: `image_get_resinfo` with `dmask:0xf` and the T#'s own DIM, one LOD per lane from 0 to 31, 32-bit float format: | T# | levels | result by LOD | |---|---|---| | 2D 28x1 | 0-9 | LOD 0-9: `(max(1, 28 >> LOD), 1, 0, 10)`, so 28, 14, 7, 3, then 1 for LOD 4-9 | | 2D 28x1, `MAX_MIP` 0 | 0-9 | the same as with `MAX_MIP` 9: 10 levels | | 2D 28x1 | 5-9 | LOD 0-4: `(1, 1, 0, 5)` | | 2D 28x1 | 7-9 | LOD 0-2: `(1, 1, 0, 3)` | | 2D_ARRAY 28x1, 4 and 256 layers | 0-9 | as the 2D T#, with the layer count third | | 2D_ARRAY 28x1, 4 layers | 7-9 | LOD 0-2: `(1, 1, 4, 3)` | | 2D_ARRAY 4x1, 64 layers | 0-10 | `(4, 1, 64, 11)`, `(2, 1, 64, 11)`, then width 1 up to LOD 10 | | 3D 28x1x4 | 0-9 | `(max(1, 28 >> LOD), 1, max(1, 4 >> LOD), 10)` | | 3D 28x1x4 | 7-9 | LOD 0-2: `(1, 1, 1, 3)` | So the second commit's values hold on RDNA 2: the level count is `LAST_LEVEL - BASE_LEVEL + 1` whatever `MAX_MIP` says, and each extent is `max(1, extent >> (BASE_LEVEL + LOD))`, so it is 1 at every LOD past the chain. One case the PR's test doesn't cover: at a LOD at or past the level count, every row above returns 0 for width, height and depth, with the level count unchanged (`(0, 0, 0, 10)` for the 28x1 levels 0-9 T# at LOD 10 to 31). `image_load_mip` at (0, 0) through the 28x1 2D T# of levels 0-9, linear and `SW_64KB_S`, over memory where each dword holds its own index: LODs 0-9 return ten different dwords, and LODs 10 to 15 return 0. So each of the five levels past the chain reads a 1x1 texel at its own address, as the description says, and a read through such a level that the emulator served from another level would return the wrong texel. That matches refusing `image_load_mip` there. This is desktop RDNA 2, not a PS5, and it covers only the queries and loads above, not samples or gathers past the chain.
fisherjoey commented 2026-10-19 02:30:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-19T02:30:20Z.


Two more conflicts with current main (40393b0f9), beyond the Texture.cpp one in my last comment:

  • ResourceMaterializer.hpp: an add/add next to #5958's ConvertedSampleRequired. Both additions can stay; we kept ViewLevelsPastChain and LevelsPastChain alongside it.
  • Shader disk cache: main is already at 39 ImageResource fields (it added convertedSamples) and FormatVersion 39. With this PR's levelUses, the fieldCount assert has to be 40 and FormatVersion 40, not 37.

With those resolved, the stack (main 40393b0f9 + this PR + #6567 + #6926) builds, and lavapipe passes 1535 of 1536 tests. The only failure is application_heap_lazy, which also failed on our previous stack. No game run on this build yet.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258382934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6258382934). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-19T02:30:20Z. --- Two more conflicts with current `main` (40393b0f9), beyond the Texture.cpp one in my last comment: - `ResourceMaterializer.hpp`: an add/add next to #5958's `ConvertedSampleRequired`. Both additions can stay; we kept `ViewLevelsPastChain` and `LevelsPastChain` alongside it. - Shader disk cache: `main` is already at 39 `ImageResource` fields (it added `convertedSamples`) and `FormatVersion` 39. With this PR's `levelUses`, the `fieldCount` assert has to be 40 and `FormatVersion` 40, not 37. With those resolved, the stack (`main` 40393b0f9 + this PR + #6567 + #6926) builds, and lavapipe passes 1535 of 1536 tests. The only failure is `application_heap_lazy`, which also failed on our previous stack. No game run on this build yet. AI-assisted: yes
fdfawef324 commented 2026-10-19 05:27:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-19T05:27:03Z.


Thanks for the reports. The #6280 recovery preserves #6054's physical allocation/blit/view/refresh bounds, including uploadImage, plus the repacked-copy cap. ConvertedSampleRequired remains beside the level helpers; convertedSamples and levelUses both survive the codec and round-trip fixture. On final base 676d423968a1a8fcc79c6247020ce22090a8e0d4, the image field guard is 40 and cache format is 41, chosen after that base's version rather than copying an earlier suggestion.

The missing LOD>=count case is now covered: a valid physical LOD is selected before the Vulkan query, every extent/layer word is zeroed beyond the decoded count, and the count is retained. Tests include ordinary and shortened views, LOD=count/count+1/31/UINT_MAX and mixed lanes. A single base 7 / last 7 missing level now refuses loads/LOD queries while pure size queries remain valid. Frozen a599 passed four CPU/mock groups and its two selective CPU controls failed as intended. Final rebased/device evidence: 0e1f2ab53b59 passed the final seven-target Release build, CPU4 and actual Vulkan5 without skips; the latter took 4.35 seconds. Removing only the final zero-extent selection reproduced both expected count-boundary failures with exit1 in0.90 seconds. Exact runtime hashes were checked; the positive and negative results remain separate.

The new query fixtures have MAX_MIP=LAST_LEVEL. Raw LAST_LEVEL=9 / MAX_MIP=0 still follows the inherited decoder clamp and remains a discrepancy against thuanquang's report. The debt credits that RX 6700 XT/HIP evidence as desktop RDNA2 queries/loads, not PS5 or sampling/gather proof. Uncharted's eight clean ten-minute composed runs, fisherjoey's driver-commit 1500 s run and later 1535/1536 lavapipe stack remain attributed external results, not our own reruns. Extra-level backing and the composed-title results remain #7085's scope. The shared codec/eligibility order with #7550/#7579 is being coordinated in the linked description; this verified update stays in draft pending agreement, with no invented dependency or composed execution result.

AI-assisted: yes (Codex)
Co-Authored-By: Codex [email protected]

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6260349910 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6260349910). Originally posted by [fdfawef324](https://github.com/fdfawef324) on 2026-10-19T05:27:03Z. --- Thanks for the reports. The #6280 recovery preserves #6054's physical allocation/blit/view/refresh bounds, including uploadImage, plus the repacked-copy cap. `ConvertedSampleRequired` remains beside the level helpers; `convertedSamples` and `levelUses` both survive the codec and round-trip fixture. On final base `676d423968a1a8fcc79c6247020ce22090a8e0d4`, the image field guard is `40` and cache format is `41`, chosen after that base's version rather than copying an earlier suggestion. The missing LOD>=count case is now covered: a valid physical LOD is selected before the Vulkan query, every extent/layer word is zeroed beyond the decoded count, and the count is retained. Tests include ordinary and shortened views, LOD=count/count+1/31/UINT_MAX and mixed lanes. A single base 7 / last 7 missing level now refuses loads/LOD queries while pure size queries remain valid. Frozen a599 passed four CPU/mock groups and its two selective CPU controls failed as intended. Final rebased/device evidence: `0e1f2ab53b59` passed the final seven-target Release build, CPU4 and actual Vulkan5 without skips; the latter took 4.35 seconds. Removing only the final zero-extent selection reproduced both expected count-boundary failures with exit1 in0.90 seconds. Exact runtime hashes were checked; the positive and negative results remain separate. The new query fixtures have MAX_MIP=LAST_LEVEL. Raw LAST_LEVEL=9 / MAX_MIP=0 still follows the inherited decoder clamp and remains a discrepancy against thuanquang's report. The debt credits that RX 6700 XT/HIP evidence as desktop RDNA2 queries/loads, not PS5 or sampling/gather proof. Uncharted's eight clean ten-minute composed runs, fisherjoey's driver-commit 1500 s run and later 1535/1536 lavapipe stack remain attributed external results, not our own reruns. Extra-level backing and the composed-title results remain #7085's scope. The shared codec/eligibility order with #7550/#7579 is being coordinated in the linked description; this verified update stays in draft pending agreement, with no invented dependency or composed execution result. AI-assisted: yes (Codex) Co-Authored-By: Codex <[email protected]>
thuanquang commented 2026-10-19 06:46:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-19T06:46:37Z.


On the remaining MAX_MIP point: I measured what a T# whose LAST_LEVEL lies past MAX_MIP reads, on the same RX 6700 XT (gfx1031), through HIP. 28x1 2D T#, levels 0-9, linear, 32-bit float format, over memory where each dword holds its own index, with MAX_MIP 9, 4 and 0:

MAX_MIP 9 MAX_MIP 4 MAX_MIP 0
image_get_resinfo 10 levels, extents as in my earlier table the same the same
image_load_mip at (0, 0), LOD 0-9 10 different dwords LOD 0-4: 5 different dwords; LOD 5-9: LOD 4's dword the same dword at every LOD
image_sample_l near (0, 0), LOD 0-15 LOD 0-9: those 10 dwords; LOD 10-15: LOD 9's LOD 0-4 as for the load; LOD 5-15: LOD 4's the same dword at every LOD

image_load_mip at LOD 10 to 15 returns 0 in all three.

So MAX_MIP doesn't change what the query reports, but it decides the memory: every level past MAX_MIP reads the texels of level MAX_MIP, and the levels' addresses move with it (LOD 4 reads dword 16576 with MAX_MIP 9 and dword 16256 with MAX_MIP 4). So the decoder's clamp to MAX_MIP matches what loads and samples read on this GPU; only image_get_resinfo answers from LAST_LEVEL.

Desktop RDNA 2 again, not a PS5.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6261401087 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6261401087). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-19T06:46:37Z. --- On the remaining `MAX_MIP` point: I measured what a T# whose `LAST_LEVEL` lies past `MAX_MIP` reads, on the same RX 6700 XT (gfx1031), through HIP. 28x1 2D T#, levels 0-9, linear, 32-bit float format, over memory where each dword holds its own index, with `MAX_MIP` 9, 4 and 0: | | `MAX_MIP` 9 | `MAX_MIP` 4 | `MAX_MIP` 0 | |---|---|---|---| | `image_get_resinfo` | 10 levels, extents as in my earlier table | the same | the same | | `image_load_mip` at (0, 0), LOD 0-9 | 10 different dwords | LOD 0-4: 5 different dwords; LOD 5-9: LOD 4's dword | the same dword at every LOD | | `image_sample_l` near (0, 0), LOD 0-15 | LOD 0-9: those 10 dwords; LOD 10-15: LOD 9's | LOD 0-4 as for the load; LOD 5-15: LOD 4's | the same dword at every LOD | `image_load_mip` at LOD 10 to 15 returns 0 in all three. So `MAX_MIP` doesn't change what the query reports, but it decides the memory: every level past `MAX_MIP` reads the texels of level `MAX_MIP`, and the levels' addresses move with it (LOD 4 reads dword 16576 with `MAX_MIP` 9 and dword 16256 with `MAX_MIP` 4). So the decoder's clamp to `MAX_MIP` matches what loads and samples read on this GPU; only `image_get_resinfo` answers from `LAST_LEVEL`. Desktop RDNA 2 again, not a PS5.
oneandonlydean commented 2026-10-20 14:24:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T14:24:13Z.


Thanks for keeping this current. Before a full review, could you rebase it onto current main? Two things come up:

  1. Texture.cpp conflicts in three places. Two are the imageInfo.mipLevels lines, where main also added a maxImageArrayLayers check that should stay next to geometry.imageLevels. The third is the copy-refusal block: main moved those checks into CopyRefusal(...), so the new "levels past the image" refusal belongs there now.
  2. The disk-cache bump needs to move on. main already raised FormatVersion to 41 and fieldCount<ImageResource>() to 40 for another field (1ed8eb6d8b). With this PR on top, ImageResource has 41 fields and the static_assert in ShaderDiskCache.cpp fails to compile, so the rebase needs fieldCount 41 and FormatVersion 42.

#7085 composes these commits, so once this is rebased it can be restacked on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293139528 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#issuecomment-6293139528). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T14:24:13Z. --- Thanks for keeping this current. Before a full review, could you rebase it onto current `main`? Two things come up: 1. `Texture.cpp` conflicts in three places. Two are the `imageInfo.mipLevels` lines, where `main` also added a `maxImageArrayLayers` check that should stay next to `geometry.imageLevels`. The third is the copy-refusal block: `main` moved those checks into `CopyRefusal(...)`, so the new "levels past the image" refusal belongs there now. 2. The disk-cache bump needs to move on. `main` already raised `FormatVersion` to 41 and `fieldCount<ImageResource>()` to 40 for another field (1ed8eb6d8b). With this PR on top, `ImageResource` has 41 fields and the `static_assert` in `ShaderDiskCache.cpp` fails to compile, so the rebase needs `fieldCount` 41 and `FormatVersion` 42. #7085 composes these commits, so once this is rebased it can be restacked on the new head.
MarcZX10 commented 2026-11-16 18:37:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T18:37:12Z.

Review: COMMENTED


Reviewed — comments

The inspected mip-chain capping and resinfo paths appear consistent, but this review is incomplete because most changed files were not read.

What I ran

Reviewed prepared diff for head 0e1f2ab53b596a4d33ec8426097bda2c05b82068 and inspected targeted source ranges with repo_read.py. No build or tests were run.

Results

Check Result Note
Diff inspection passed Prepared diff reviewed
Build and tests not run No commands executed
Full changed-file review not run Most changed files unread

Findings

Blocking

None identified in the inspected portions.

Non-blocking

None.

Not verified

This review did not read every changed file, so it cannot support approval. Files read: review/description.md, review/commits.md, review/manifest.json, review/diff.patch, core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp (lines 418–480), and core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp (lines 2070–2115). The changed core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was excluded from the review bundle as too large; its changed line is visible in the diff. Most other changed files listed in the manifest were not read. review/files.json was not available through the reader. Author-reported builds, tests, and device checks were not independently verified.

To get this to a good state

Complete the review of the remaining changed files and run the relevant checks before making a formal approval decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5925383537 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6280#pullrequestreview-5925383537). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T18:37:12Z. **Review:** COMMENTED --- # Reviewed — comments The inspected mip-chain capping and resinfo paths appear consistent, but this review is incomplete because most changed files were not read. ## What I ran Reviewed prepared diff for head `0e1f2ab53b596a4d33ec8426097bda2c05b82068` and inspected targeted source ranges with `repo_read.py`. No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff inspection | passed | Prepared diff reviewed | | Build and tests | not run | No commands executed | | Full changed-file review | not run | Most changed files unread | ## Findings ### Blocking None identified in the inspected portions. ### Non-blocking None. ## Not verified This review did not read every changed file, so it cannot support approval. Files read: `review/description.md`, `review/commits.md`, `review/manifest.json`, `review/diff.patch`, `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` (lines 418–480), and `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` (lines 2070–2115). The changed `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` was excluded from the review bundle as too large; its changed line is visible in the diff. Most other changed files listed in the manifest were not read. `review/files.json` was not available through the reader. Author-reported builds, tests, and device checks were not independently verified. ## To get this to a good state Complete the review of the remaining changed files and run the relevant checks before making a formal approval decision.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/6280:upstream-pr/6280'
git switch 'upstream-pr/6280'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/6280'
git switch 'upstream-pr/6280'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/6280'
git switch 'upstream-pr/6280'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/6280'
git switch 'main'
git merge --squash 'upstream-pr/6280'
git switch 'main'
git merge --ff-only 'upstream-pr/6280'
git switch 'main'
git merge 'upstream-pr/6280'
git push origin 'main'
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!6280
No description provided.