fix(agc): read uncompressed FMASK images from guest memory #6674

Merged
veosett merged 5 commits from upstream-pr/6674 into main 2026-10-19 09:05:57 +00:00
veosett commented 2026-10-16 03:52:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by veosett on 2026-10-16T03:52:40Z.


What

A direct FMASK load returns 0x76543210 even when the stored mapping is zero, 0x11111111 or 0x11111100 (#3219). Remove the synthetic FMASK runtime mode and bind supported FMASK reads as ordinary integer sampled images. The existing texture upload, synchronization, cache and channel mapping then supply the stored value.

This supports uncompressed Fmask32_S8_F8, one mip, 2D/2D-array Z_64KB_X surfaces and X/zero/one destination selectors. PAL's FMASK surface conversion uses the format's bit depth with one sample/fragment and an ordinary 2D surface; its 32-bit view selectors select X and zero. Other FMASK formats, CMASK compression, packed accesses and unsupported layouts/selectors throw. These limits and the absence of native RDNA/PS5 measurements are recorded in shader technical debt.

Addresses #3219's fixed-result bug and missing refusal for unsupported compression. Compressed FMASK/color sampling remains unimplemented, so this does not claim to resolve the issue in full or advance PPSA99902 startup. The regression follows Amoenus' public reproducer, with additional nonuniform pixels, array views and cache checks; no unpublished implementation was used.

IsFmaskTextureFormat is a pure classification of its argument in the already-hashed recompiler sources. Its new graphics-side call is listed in the shader-cache dependency review; it introduces no additional cache-key input. The existing source hash invalidates compiled artifacts from the removed runtime mode.

Tested

Base main 9caecfd2d; tested head 9b42649a9, merging main into the existing PR branch without rewriting its original commits. Release, bundled dependencies, SPIRV-Tools enabled.

  • Windows 11, WinLibs MinGW-w64 GCC 15.2.0 r7, AMD Radeon RX 6900 XT, AMD driver 25.10.30.02 / Vulkan 1.4.315: libs and all selected test targets build; 9/9 focused CTests pass in 21.34 s, plus shader_cache_native_paths 1/1 in 1.22 s. No skips.
  • Ubuntu 24.04 WSL2, GCC 13.3, lavapipe/llvmpipe LLVM 20.1.2, Mesa 25.2.8 / Vulkan 1.4.318: the same builds and 9/9 tests pass in 18.89 s, plus the cache check 1/1 in 0.24 s. No skips. /dev/udmabuf is unavailable; the existing copy path is used.
  • The conflict resolution preserves both FMASK's unsigned-integer numeric class and main's native repacked-float class, and retains the updated image-table debt entry alongside the FMASK limits. The original eight focused tests pass together with agc_driver_image_repacked_float, which exercises main's float path.
  • Original negative controls on unchanged main 5d9dcc42d: the new FMASK execution test fails on both hosts with FMASK load did not read its mapping: round 0, lane 0, component 0 (0.85 s Windows / 0.66 s Linux). The public probe also reproduces the incorrect raw and CMASK results on both hosts. These are the pre-refresh controls, not a new run on the refreshed base.
  • The FMASK execution test covers 40 dispatches / 5,120 component comparisons and 8 compression refusals per host: changed data at the same addresses, nonuniform pixels, array views starting at layer 1, pipe XOR 0/0xf00, X/zero/one swizzles, both graphics-registration policy settings (compute modules remain specialized), unchanged compiled artifacts, output sentinels and a valid load after a compressed load is refused.
  • The focused set also covers shader memory/materialization, graphics/texture decoding, image dimensions, pipe XOR, volume swizzles, image-table reuse and runtime image selection. CPU tests reject the other 12 FMASK formats, compression flags, packed accesses, unsupported layouts and selectors.
  • Conventions, test registration (989 Windows / 1001 Linux executables) and whitespace checks pass.

Not run: titles, graphics-stage FMASK execution, the full CTest suite, native RDNA/PS5 instruction measurements. No game-unblock or performance 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; silent stubs are listed in technical debt
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source: none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6900 XT, AMD 25.10.30.02, Windows 11; lavapipe/llvmpipe LLVM 20.1.2, Mesa 25.2.8, Ubuntu 24.04 WSL2
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4883227160 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6674). Originally posted by [veosett](https://github.com/veosett) on 2026-10-16T03:52:40Z. --- ### What A direct FMASK load returns `0x76543210` even when the stored mapping is zero, `0x11111111` or `0x11111100` (#3219). Remove the synthetic FMASK runtime mode and bind supported FMASK reads as ordinary integer sampled images. The existing texture upload, synchronization, cache and channel mapping then supply the stored value. This supports uncompressed `Fmask32_S8_F8`, one mip, 2D/2D-array `Z_64KB_X` surfaces and X/zero/one destination selectors. PAL's [FMASK surface conversion](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/imported/addrlib/src/core/addrlib2.cpp#L877-L928) uses the format's bit depth with one sample/fragment and an ordinary 2D surface; its [32-bit view selectors](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/src/core/hw/gfxip/gfx9/gfx9Device.cpp#L4973-L4987) select X and zero. Other FMASK formats, CMASK compression, packed accesses and unsupported layouts/selectors throw. These limits and the absence of native RDNA/PS5 measurements are recorded in shader technical debt. Addresses #3219's fixed-result bug and missing refusal for unsupported compression. Compressed FMASK/color sampling remains unimplemented, so this does not claim to resolve the issue in full or advance PPSA99902 startup. The regression follows [Amoenus' public reproducer](https://github.com/boykopovar/AnyPS5/issues/3219#issuecomment-6104473247), with additional nonuniform pixels, array views and cache checks; no unpublished implementation was used. `IsFmaskTextureFormat` is a pure classification of its argument in the already-hashed recompiler sources. Its new graphics-side call is listed in the shader-cache dependency review; it introduces no additional cache-key input. The existing source hash invalidates compiled artifacts from the removed runtime mode. ### Tested Base `main` `9caecfd2d`; tested head `9b42649a9`, merging main into the existing PR branch without rewriting its original commits. Release, bundled dependencies, SPIRV-Tools enabled. - Windows 11, WinLibs MinGW-w64 GCC 15.2.0 r7, AMD Radeon RX 6900 XT, AMD driver 25.10.30.02 / Vulkan 1.4.315: `libs` and all selected test targets build; 9/9 focused CTests pass in 21.34 s, plus `shader_cache_native_paths` 1/1 in 1.22 s. No skips. - Ubuntu 24.04 WSL2, GCC 13.3, lavapipe/llvmpipe LLVM 20.1.2, Mesa 25.2.8 / Vulkan 1.4.318: the same builds and 9/9 tests pass in 18.89 s, plus the cache check 1/1 in 0.24 s. No skips. `/dev/udmabuf` is unavailable; the existing copy path is used. - The conflict resolution preserves both FMASK's unsigned-integer numeric class and main's native repacked-float class, and retains the updated image-table debt entry alongside the FMASK limits. The original eight focused tests pass together with `agc_driver_image_repacked_float`, which exercises main's float path. - Original negative controls on unchanged `main` `5d9dcc42d`: the new FMASK execution test fails on both hosts with `FMASK load did not read its mapping: round 0, lane 0, component 0` (0.85 s Windows / 0.66 s Linux). The public probe also reproduces the incorrect raw and CMASK results on both hosts. These are the pre-refresh controls, not a new run on the refreshed base. - The FMASK execution test covers 40 dispatches / 5,120 component comparisons and 8 compression refusals per host: changed data at the same addresses, nonuniform pixels, array views starting at layer 1, pipe XOR 0/0xf00, X/zero/one swizzles, both graphics-registration policy settings (compute modules remain specialized), unchanged compiled artifacts, output sentinels and a valid load after a compressed load is refused. - The focused set also covers shader memory/materialization, graphics/texture decoding, image dimensions, pipe XOR, volume swizzles, image-table reuse and runtime image selection. CPU tests reject the other 12 FMASK formats, compression flags, packed accesses, unsupported layouts and selectors. - Conventions, test registration (989 Windows / 1001 Linux executables) and whitespace checks pass. Not run: titles, graphics-stage FMASK execution, the full CTest suite, native RDNA/PS5 instruction measurements. No game-unblock or performance claim. ### 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 - [x] Unimplemented paths throw; silent stubs are listed in technical debt - [x] No notes, investigation files or images added to the repository - [x] New third-party code is a submodule built from source: none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6900 XT, AMD 25.10.30.02, Windows 11; lavapipe/llvmpipe LLVM 20.1.2, Mesa 25.2.8, Ubuntu 24.04 WSL2 - [x] AI-assisted: yes (Codex)
github-actions[bot] commented 2026-10-16 04:34:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T04:34:55Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6218 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L255
PR 6290 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp L7033
PR 7803 docs/dev/debt/shader.md L38

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 1341 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 5021 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5426 docs/dev/debt/shader.md
PR 5500 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 5609 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
PR 5925 core/shader/recompiler/CMakeLists.txt
PR 5941 docs/dev/debt/shader.md
PR 6009 docs/dev/debt/shader.md
PR 6177 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6539 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
PR 6612 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CMakeLists.txt
docs/dev/debt/shader.md
PR 6645 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6683 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6762 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6879 core/shader/recompiler/CMakeLists.txt
PR 6924 docs/dev/debt/shader.md
PR 6941 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CMakeLists.txt
PR 6946 core/shader/recompiler/CMakeLists.txt
PR 6947 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 7085 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7201 core/shader/recompiler/CMakeLists.txt
PR 7223 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7258 core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp
core/libs/prx/libSceAgcDriver/tests/GuestTextureResource.cpp
PR 7332 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7392 docs/dev/debt/shader.md
PR 7395 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7429 docs/dev/debt/shader.md
PR 7484 docs/dev/debt/shader.md
PR 7550 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7622 core/shader/recompiler/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/CMakeLists.txt
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cpp
PR 7689 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6208162409 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6674#issuecomment-6208162409). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T04:34:55Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6218](https://www.github.com/boykopovar/AnyPS5/pull/6218) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` [L255](https://github.com/boykopovar/AnyPS5/blob/408455bdacc4d991abe9668746fc7aac459274b3/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L255) | | | | [PR 6290](https://www.github.com/boykopovar/AnyPS5/pull/6290) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` [L7033](https://github.com/boykopovar/AnyPS5/blob/408455bdacc4d991abe9668746fc7aac459274b3/core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp#L7033) | | | | [PR 7803](https://www.github.com/boykopovar/AnyPS5/pull/7803) | `docs/dev/debt/shader.md` [L38](https://github.com/boykopovar/AnyPS5/blob/408455bdacc4d991abe9668746fc7aac459274b3/docs/dev/debt/shader.md#L38) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 907](https://www.github.com/boykopovar/AnyPS5/pull/907) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/CMakeLists.txt`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `docs/dev/debt/shader.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/shader/recompiler/CMakeLists.txt` | | [PR 5941](https://www.github.com/boykopovar/AnyPS5/pull/5941) | `docs/dev/debt/shader.md` | | [PR 6009](https://www.github.com/boykopovar/AnyPS5/pull/6009) | `docs/dev/debt/shader.md` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/CMakeLists.txt`<br>`docs/dev/debt/shader.md` | | [PR 6645](https://www.github.com/boykopovar/AnyPS5/pull/6645) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6762](https://www.github.com/boykopovar/AnyPS5/pull/6762) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/shader/recompiler/CMakeLists.txt` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/debt/shader.md` | | [PR 6941](https://www.github.com/boykopovar/AnyPS5/pull/6941) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/CMakeLists.txt` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/shader/recompiler/CMakeLists.txt` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/CMakeLists.txt`<br>`core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp`<br>`core/shader/recompiler/CMakeLists.txt`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/shader/recompiler/CMakeLists.txt` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7258](https://www.github.com/boykopovar/AnyPS5/pull/7258) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/GuestTextureResource.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/CMakeLists.txt`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7392](https://www.github.com/boykopovar/AnyPS5/pull/7392) | `docs/dev/debt/shader.md` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7429](https://www.github.com/boykopovar/AnyPS5/pull/7429) | `docs/dev/debt/shader.md` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `docs/dev/debt/shader.md` | | [PR 7550](https://www.github.com/boykopovar/AnyPS5/pull/7550) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 7622](https://www.github.com/boykopovar/AnyPS5/pull/7622) | `core/shader/recompiler/CMakeLists.txt` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/CMakeLists.txt`<br>`core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cpp` | | [PR 7689](https://www.github.com/boykopovar/AnyPS5/pull/7689) | `core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` |
jotitadev commented 2026-10-16 15:30:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-16T15:30:10Z.

Review: COMMENTED


NVIDIA run, since the PR was tested on AMD and lavapipe.

Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, plus lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same machine. Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, BUILD_TESTING=ON. Head d2e09ede6 merged onto main 0615cd2b8, clean merge (main did not build at the time, #6784).

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

RTX 3070:

  • Test only (the PR's tests and CMake on main's sources): agc_driver_fmask_image_reads, agc_shader_memory and agc_driver_graphics all fail. The execution test stops with FMASK load did not read its mapping: round 0, lane 0, component 0, the same message as on your hosts; the other two with FMASK did not select a bound integer image mode and uncompressed 32-bit FMASK did not use an integer Z surface.
  • With the change: the same three pass 3/3 (agc_driver_fmask_image_reads 0.31-0.38 s).
  • ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60: 614 tests, only agc_driver_store_over_untracked fails, which also fails on unchanged main here (#6347). agc_driver_stencil_ref_export skips (no VK_EXT_shader_stencil_export on this GPU).

lavapipe (VK_DRIVER_FILES=.../lvp_icd.json ANYPS5_GPU=llvmpipe): agc_driver_fmask_image_reads passes 3/3, newer Mesa than the 25.2.8 in the description.

Not checked: the other five tests in your focused set by name (they are inside the suite above on the 3070, not run on lavapipe), Windows, titles.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5549986553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6674#pullrequestreview-5549986553). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-16T15:30:10Z. **Review:** COMMENTED --- NVIDIA run, since the PR was tested on AMD and lavapipe. **Machine:** NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, plus lavapipe (Mesa 26.0.3, LLVM 21.1.8) on the same machine. Ubuntu 26.04 (kernel 7.0.0-38), i7-8700, GCC 15.2, Release, `BUILD_TESTING=ON`. Head `d2e09ede6` merged onto `main` `0615cd2b8`, clean merge (`main` did not build at the time, #6784). GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02), lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04 **RTX 3070:** - Test only (the PR's tests and CMake on `main`'s sources): `agc_driver_fmask_image_reads`, `agc_shader_memory` and `agc_driver_graphics` all fail. The execution test stops with `FMASK load did not read its mapping: round 0, lane 0, component 0`, the same message as on your hosts; the other two with `FMASK did not select a bound integer image mode` and `uncompressed 32-bit FMASK did not use an integer Z surface`. - With the change: the same three pass 3/3 (`agc_driver_fmask_image_reads` 0.31-0.38 s). - `ctest -R "^agc|shader|recompiler" -E "agc_display_buffer_dcc|agc_driver_flip|agc_driver_lds_atomics64|display|flip" -j1 --timeout 60`: 614 tests, only `agc_driver_store_over_untracked` fails, which also fails on unchanged `main` here (#6347). `agc_driver_stencil_ref_export` skips (no `VK_EXT_shader_stencil_export` on this GPU). **lavapipe (`VK_DRIVER_FILES=.../lvp_icd.json ANYPS5_GPU=llvmpipe`):** `agc_driver_fmask_image_reads` passes 3/3, newer Mesa than the 25.2.8 in the description. Not checked: the other five tests in your focused set by name (they are inside the suite above on the 3070, not run on lavapipe), Windows, titles. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
TheSovietWaffle commented 2026-10-17 11:30:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-17T11:30:39Z.


Windows data point: head d2e09ede6 as-is, Release, Windows 10 Pro 22H2 (19045), WinLibs GCC 15.2.0 r7. agc_driver_fmask_image_reads passes on both devices of this host, chosen with ANYPS5_GPU:

  • NVIDIA RTX 3080 (617.42): 5 of 5.
  • AMD Radeon Graphics (Raphael iGPU, 1002:164e, AMD Windows driver): 3 of 3.

Not checked: other tests, titles.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233370810 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6674#issuecomment-6233370810). Originally posted by [TheSovietWaffle](https://github.com/TheSovietWaffle) on 2026-10-17T11:30:39Z. --- Windows data point: head `d2e09ede6` as-is, Release, Windows 10 Pro 22H2 (19045), WinLibs GCC 15.2.0 r7. `agc_driver_fmask_image_reads` passes on both devices of this host, chosen with `ANYPS5_GPU`: - NVIDIA RTX 3080 (617.42): 5 of 5. - AMD Radeon Graphics (Raphael iGPU, `1002:164e`, AMD Windows driver): 3 of 3. Not checked: other tests, titles. AI-assisted: yes (Claude Code).
adriadam10 commented 2026-10-19 09:06:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T09:06:43Z.


Checked the diff against the description: the synthetic FMASK mode is removed, uncompressed Fmask32_S8_F8 reads go through the normal integer image path, and every other format, CMASK compression, packed access and layout/selector throws. The new driver-side call is in shaderCacheReviewedNames and the limits are in docs/dev/debt/shader.md.

The only conflict with main was the shaderCacheReviewedNames list (next to the new PipelineSpecialization::* entries); I merged main into the branch and kept both. The merge queue's full Build runs on the result. The NVIDIA/Windows runs in the thread also pass agc_driver_fmask_image_reads.

Not verified here: native RDNA/PS5 results of FMASK loads, and titles.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263656980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6674#issuecomment-6263656980). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T09:06:43Z. --- Checked the diff against the description: the synthetic FMASK mode is removed, uncompressed `Fmask32_S8_F8` reads go through the normal integer image path, and every other format, CMASK compression, packed access and layout/selector throws. The new driver-side call is in `shaderCacheReviewedNames` and the limits are in `docs/dev/debt/shader.md`. The only conflict with `main` was the `shaderCacheReviewedNames` list (next to the new `PipelineSpecialization::*` entries); I merged `main` into the branch and kept both. The merge queue's full Build runs on the result. The NVIDIA/Windows runs in the thread also pass `agc_driver_fmask_image_reads`. Not verified here: native RDNA/PS5 results of FMASK loads, and titles.
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!6674
No description provided.