fix(agc): give a block-copied BC texture an sRGB view for FORCE_DEGAMMA samplers #7799

Merged
thuanquang merged 1 commit from upstream-pr/7799 into main 2026-10-23 14:27:01 +00:00
thuanquang commented 2026-10-19 08:04:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-19T08:04:20Z.


What

A sampler with FORCE_DEGAMMA samples a BC1, BC2, BC3 or BC7 UNORM texture through an sRGB view of the same image (#4487). That works when the texture is read from guest memory. It does not work while the texture is a block copy of a storage image a shader wrote, before those blocks are stored back. Then the draw is skipped, or the dispatch refused:

a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented

The block-copy constructor in Texture.cpp creates its image without VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and never prepares the sRGB view. So the same texture and sampler are refused or served depending only on whether the blocks have been stored back yet. It now does what the upload path does:

  • it sets the mutable flag when SrgbTwinFormat has a twin for the block format (BC4, BC5 and BC6H have none and stay as they are);
  • it calls prepareSrgbView.

The view is still made on first use, and a plain sampler uses the block copy as before. The technical debt is unchanged: its FORCE_DEGAMMA entry never listed block copies.

I found this while checking Ghost of Tsushima's report on #5166. Its format-56 case (8_8_8_8 UNORM) already gets an sRGB view on main; the block-copy path is the one left out. On main, only BC textures whose blocks are still pending in a 32x2 or 32x4 uint storage image take this path. @savvaniss reports in #8159 (closed as a duplicate of this PR, with the same two Texture.cpp lines) that the PS4 path of #6977 also block-copies a smaller view of a render target, and that Trivial Pursuit Live! (CUSA03312, #7198) samples such an 8_8_8_8_UNORM view with FORCE_DEGAMMA before its language menu and stops at the error above.

Tested

Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, on main 1e774a3b2. Runs below use VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Vulkan-ValidationLayers vulkan-sdk-1.4.363.0, built locally), ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V, with the implicit overlay layers on this PC switched off (VK_LOADER_LAYERS_DISABLE=~implicit~); no log reports the layer as not found.

  • agc_driver_bc_block_copy has a FORCE_DEGAMMA case for both of its formats, BC7 through 32x4 uint blocks and BC1 through 32x2 uint blocks:
    • the forced samples of two stored block patterns must differ from the plain samples and from each other;
    • after the shader writes the second pattern again while guest memory holds the first, a forced sample, with no plain sample before it, must equal the forced sample of the stored second pattern word for word, and the blocks must still be pending afterwards.
  • With this change it passes 3 of 3, with no VUID- errors.
  • With main's Texture.cpp and this test it fails with the message above (guest format 181, BC7), with no VUID- errors.
  • With only the mutable flag removed, the test still passes on this driver, but the layer reports VUID-VkImageViewCreateInfo-image-12397 four times (an sRGB view of an image created without VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT). So the validation run covers that line.
  • agc_driver_image_sample_force_degamma passes, with no VUID- errors.
  • Full ctest --parallel 4 --timeout 120 of this head (3c905ee2d, ANYPS5_REQUIRE_VULKAN=1, no validation layer): 1685 tests, 6 fail, none from this change:
    • log_macros and log_macros_timestamps, because this local build passes ccache a relative __FILE__;
    • agc_trimmed_import, which fails on unmodified main here (reported on #6499; #7849 replaces it);
    • agc_driver_layered_volume_vertex_no_gpl (#4768), agc_driver_draw_cache_reuse_off and agc_driver_stencil_replay_no_gpl, which hit VK_ERROR_DEVICE_LOST from AMD's per-executable pipeline cache here and pass from renamed copies of their executables.
  • python tools/check_conventions.py --base origin/main with this title and body passes.
  • @savvaniss ran the earlier head 12c62ebc6 merged into main 85029a00f on an AMD Radeon RX 9070 XT (driver 32.0.31041.1004) and an Intel UHD Graphics 770 (driver 32.0.101.7088), Windows 11 Pro 26300, ANYPS5_NO_SHADER_CACHE=1, serial CTest: agc_driver_bc_block_copy passes 3 of 3 with the PR and fails with only its test change on main, with the message above.
  • @savvaniss reran this head (3c905ee2d merged into main 56b299c3a) on the RX 9070 XT with the Khronos validation layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1: agc_driver_bc_block_copy and agc_driver_image_sample_force_degamma pass 3 of 3 on main and with the PR, with no VUID- line and no layer-not-found line; this PR's test with main's Texture.cpp fails with the message above. With #8159's change on #6977's branch, Trivial Pursuit Live! reaches its language menu and title screen at 60 fps on the RX 9070 XT; without it, the title stops at the error above.
  • @jotitadev ran the first head d1300927c on an Apple M2 Max, macOS 27.2, through MoltenVK 1.4.2 and through MoltenVK main with SPIRV-Cross #2704. The tree was main a373e85e5 with the macOS series, the PRs needed to build on macOS, #7666, #7811 and #7803, and a test-only Vulkan loader patch, not plain main. With this change, agc_driver_bc_block_copy and agc_driver_image_sample_force_degamma pass 3 of 3 on both drivers; with only Texture.cpp reverted, agc_driver_bc_block_copy fails with the message above.
  • Measured on the RX 6700 XT through the hardware oracle's HIP path (scripts and tables): BC1, BC2, BC3 and BC7 UNORM sampled with FORCE_DEGAMMA (S# word 0 bit 20) return bit for bit what the BC1/2/3/7 sRGB formats return without it, point and bilinear, so the sRGB view this change uses matches the hardware for these formats. BC4 and BC5 return the same with and without the bit.
  • Not tested by me: titles (the Trivial Pursuit Live! run is @savvaniss's, on #6977's branch with #8159's identical change); the console's gfx1013.

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: CUSA03312 #7198 (Trivial Pursuit Live!, on the PS4 path of #6977)
  • GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200; by others: AMD Radeon RX 9070 XT, driver 32.0.31041.1004 (this head and an earlier one), and Intel UHD Graphics 770, driver 32.0.101.7088 (an earlier head), Windows 11 Pro 26300 (@savvaniss); Apple M2 Max through MoltenVK 1.4.2 and MoltenVK main with SPIRV-Cross #2704, macOS 27.2 (@jotitadev, first head)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4917806580 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-19T08:04:20Z. --- ### What A sampler with FORCE_DEGAMMA samples a BC1, BC2, BC3 or BC7 UNORM texture through an sRGB view of the same image (#4487). That works when the texture is read from guest memory. It does not work while the texture is a block copy of a storage image a shader wrote, before those blocks are stored back. Then the draw is skipped, or the dispatch refused: ``` a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented ``` The block-copy constructor in `Texture.cpp` creates its image without `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT` and never prepares the sRGB view. So the same texture and sampler are refused or served depending only on whether the blocks have been stored back yet. It now does what the upload path does: - it sets the mutable flag when `SrgbTwinFormat` has a twin for the block format (BC4, BC5 and BC6H have none and stay as they are); - it calls `prepareSrgbView`. The view is still made on first use, and a plain sampler uses the block copy as before. The technical debt is unchanged: its FORCE_DEGAMMA entry never listed block copies. I found this while checking Ghost of Tsushima's report on #5166. Its format-56 case (8_8_8_8 UNORM) already gets an sRGB view on `main`; the block-copy path is the one left out. On `main`, only BC textures whose blocks are still pending in a 32x2 or 32x4 uint storage image take this path. @savvaniss reports in #8159 (closed as a duplicate of this PR, with the same two `Texture.cpp` lines) that the PS4 path of #6977 also block-copies a smaller view of a render target, and that Trivial Pursuit Live! (CUSA03312, [#7198](https://github.com/boykopovar/AnyPS5/discussions/7198)) samples such an `8_8_8_8_UNORM` view with FORCE_DEGAMMA before its language menu and stops at the error above. ### Tested Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, on `main` `1e774a3b2`. Runs below use `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (Vulkan-ValidationLayers `vulkan-sdk-1.4.363.0`, built locally), `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`, with the implicit overlay layers on this PC switched off (`VK_LOADER_LAYERS_DISABLE=~implicit~`); no log reports the layer as not found. - `agc_driver_bc_block_copy` has a FORCE_DEGAMMA case for both of its formats, BC7 through 32x4 uint blocks and BC1 through 32x2 uint blocks: - the forced samples of two stored block patterns must differ from the plain samples and from each other; - after the shader writes the second pattern again while guest memory holds the first, a forced sample, with no plain sample before it, must equal the forced sample of the stored second pattern word for word, and the blocks must still be pending afterwards. - With this change it passes 3 of 3, with no `VUID-` errors. - With `main`'s `Texture.cpp` and this test it fails with the message above (guest format 181, BC7), with no `VUID-` errors. - With only the mutable flag removed, the test still passes on this driver, but the layer reports `VUID-VkImageViewCreateInfo-image-12397` four times (an sRGB view of an image created without `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT`). So the validation run covers that line. - `agc_driver_image_sample_force_degamma` passes, with no `VUID-` errors. - Full `ctest --parallel 4 --timeout 120` of this head (`3c905ee2d`, `ANYPS5_REQUIRE_VULKAN=1`, no validation layer): 1685 tests, 6 fail, none from this change: - `log_macros` and `log_macros_timestamps`, because this local build passes ccache a relative `__FILE__`; - `agc_trimmed_import`, which fails on unmodified `main` here (reported on #6499; #7849 replaces it); - `agc_driver_layered_volume_vertex_no_gpl` (#4768), `agc_driver_draw_cache_reuse_off` and `agc_driver_stencil_replay_no_gpl`, which hit `VK_ERROR_DEVICE_LOST` from AMD's per-executable pipeline cache here and pass from renamed copies of their executables. - `python tools/check_conventions.py --base origin/main` with this title and body passes. - @savvaniss ran the earlier head `12c62ebc6` merged into `main` `85029a00f` on an AMD Radeon RX 9070 XT (driver 32.0.31041.1004) and an Intel UHD Graphics 770 (driver 32.0.101.7088), Windows 11 Pro 26300, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest: `agc_driver_bc_block_copy` passes 3 of 3 with the PR and fails with only its test change on `main`, with the message above. - @savvaniss [reran this head](https://github.com/boykopovar/AnyPS5/pull/7799#issuecomment-6290825850) (`3c905ee2d` merged into `main` `56b299c3a`) on the RX 9070 XT with the Khronos validation layer, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`: `agc_driver_bc_block_copy` and `agc_driver_image_sample_force_degamma` pass 3 of 3 on `main` and with the PR, with no `VUID-` line and no layer-not-found line; this PR's test with `main`'s `Texture.cpp` fails with the message above. With #8159's change on #6977's branch, Trivial Pursuit Live! reaches its language menu and title screen at 60 fps on the RX 9070 XT; without it, the title stops at the error above. - @jotitadev ran the first head `d1300927c` on an Apple M2 Max, macOS 27.2, through MoltenVK 1.4.2 and through MoltenVK main with SPIRV-Cross #2704. The tree was `main` `a373e85e5` with the macOS series, the PRs needed to build on macOS, #7666, #7811 and #7803, and a test-only Vulkan loader patch, not plain `main`. With this change, `agc_driver_bc_block_copy` and `agc_driver_image_sample_force_degamma` pass 3 of 3 on both drivers; with only `Texture.cpp` reverted, `agc_driver_bc_block_copy` fails with the message above. - Measured on the RX 6700 XT through the hardware oracle's HIP path ([scripts and tables](https://gist.github.com/thuanquang/fcbb52315610708fac51784635214734)): BC1, BC2, BC3 and BC7 UNORM sampled with FORCE_DEGAMMA (S# word 0 bit 20) return bit for bit what the BC1/2/3/7 sRGB formats return without it, point and bilinear, so the sRGB view this change uses matches the hardware for these formats. BC4 and BC5 return the same with and without the bit. - Not tested by me: titles (the Trivial Pursuit Live! run is @savvaniss's, on #6977's branch with #8159's identical change); the console's gfx1013. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: CUSA03312 #7198 (Trivial Pursuit Live!, on the PS4 path of #6977) - [x] GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, Windows 11 26200; by others: AMD Radeon RX 9070 XT, driver 32.0.31041.1004 (this head and an earlier one), and Intel UHD Graphics 770, driver 32.0.101.7088 (an earlier head), Windows 11 Pro 26300 (@savvaniss); Apple M2 Max through MoltenVK 1.4.2 and MoltenVK main with SPIRV-Cross #2704, macOS 27.2 (@jotitadev, first head) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jotitadev commented 2026-10-19 09:39:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-19T09:39:37Z.

Review: COMMENTED


Apple GPU / MoltenVK run, as a second vendor. The block-copy sRGB view works on Metal. agc_driver_bc_block_copy passes with the new FORCE_DEGAMMA cases, and with Texture.cpp reverted it fails with the message from the description.

Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704. Head d1300927c, PR diff applied cleanly.

Tested: the tree is main a373e85e5 + mugurc's macOS series (ci/macos-series-2) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain main (it doesn't build on macOS yet). Applied together in the same build: #7666, #7811, #7799 and #7803, plus a test-only patch that lets nine AGC fixtures load the Vulkan loader on macOS (branch jotitadev:fix/agc-tests-vulkan-loader-macos). Base on that tree: 40 ^agc failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, plus agc_driver_pooled_buffer_range and agc_performance_overlay, which only run because of the loader patch.

  • With the PR: agc_driver_bc_block_copy (BC7 through 32x4 uint blocks, BC1 through 32x2 uint blocks) and agc_driver_image_sample_force_degamma pass 3 of 3 on both drivers. The log shows the block copy of the storage image (guest format 75 -> vk 145, 62 -> vk 133).
  • With only Texture.cpp reverted (test kept), agc_driver_bc_block_copy fails on both drivers: a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented.
  • Full ^agc suite with the stack: the base failures on each driver, nothing new and nothing gone.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704)

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5569595785 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799#pullrequestreview-5569595785). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-19T09:39:37Z. **Review:** COMMENTED --- <!-- head: d1300927c --> Apple GPU / MoltenVK run, as a second vendor. The block-copy sRGB view works on Metal. `agc_driver_bc_block_copy` passes with the new FORCE_DEGAMMA cases, and with `Texture.cpp` reverted it fails with the message from the description. Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Drivers: MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0) and MoltenVK main + SPIRV-Cross #2704. Head d1300927c, PR diff applied cleanly. **Tested:** the tree is `main` a373e85e5 + mugurc's macOS series (`ci/macos-series-2`) + the PRs needed to build on macOS (#6667, #6668, #7524, #6969, and two files of #7332), not plain `main` (it doesn't build on macOS yet). Applied together in the same build: #7666, #7811, #7799 and #7803, plus a test-only patch that lets nine AGC fixtures load the Vulkan loader on macOS (branch `jotitadev:fix/agc-tests-vulkan-loader-macos`). Base on that tree: 40 `^agc` failures with MoltenVK 1.4.2 and 26 with MoltenVK main + #2704, plus `agc_driver_pooled_buffer_range` and `agc_performance_overlay`, which only run because of the loader patch. - With the PR: `agc_driver_bc_block_copy` (BC7 through 32x4 uint blocks, BC1 through 32x2 uint blocks) and `agc_driver_image_sample_force_degamma` pass 3 of 3 on both drivers. The log shows the block copy of the storage image (`guest format 75 -> vk 145`, `62 -> vk 133`). - With only `Texture.cpp` reverted (test kept), `agc_driver_bc_block_copy` fails on both drivers: `a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented`. - Full `^agc` suite with the stack: the base failures on each driver, nothing new and nothing gone. GPUs tested: Apple M2 Max (MoltenVK 1.4.2; MoltenVK main + SPIRV-Cross #2704) Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
fogydes commented 2026-10-19 12:38:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:38:57Z.

Review: COMMENTED


Verified the diff, conventions, and test coverage in PR #7799:

  • Logic: In core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp, setting VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT when SrgbTwinFormat exists and calling prepareSrgbView for block-copied compressed textures aligns the block-copy constructor with the upload path, allowing samplers configured with FORCE_DEGAMMA to sample BC1/BC2/BC3/BC7 formats without rejection.
  • Unit Testing & Debt: Updated test fixtures in tests/execution/BcBlockCopy.cpp verify that pending block copies match stored blocks under forced degamma and remain pending afterwards. Debt entry in docs/dev/debt/libSceAgcDriver.md updated cleanly.
  • Conventions & CI: Zero code comments introduced. All CI checks pass 100% green (conventions, eligibility, labels, report).
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5571647477 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799#pullrequestreview-5571647477). Originally posted by [fogydes](https://github.com/fogydes) on 2026-10-19T12:38:57Z. **Review:** COMMENTED --- Verified the diff, conventions, and test coverage in PR #7799: - **Logic**: In `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`, setting `VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT` when `SrgbTwinFormat` exists and calling `prepareSrgbView` for block-copied compressed textures aligns the block-copy constructor with the upload path, allowing samplers configured with `FORCE_DEGAMMA` to sample BC1/BC2/BC3/BC7 formats without rejection. - **Unit Testing & Debt**: Updated test fixtures in `tests/execution/BcBlockCopy.cpp` verify that pending block copies match stored blocks under forced degamma and remain pending afterwards. Debt entry in `docs/dev/debt/libSceAgcDriver.md` updated cleanly. - **Conventions & CI**: Zero code comments introduced. All CI checks pass 100% green (`conventions`, `eligibility`, `labels`, `report`).
savvaniss commented 2026-10-19 14:40:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T14:40:04Z.


AMD and Intel Windows data: with this PR's test change, agc_driver_bc_block_copy fails on main and passes with the PR, on an AMD RX 9070 XT and an Intel UHD 770.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. This head 12c62ebc6 merged into main 85029a00f. "Without" means only this PR's diff to tests/execution/BcBlockCopy.cpp, applied to main 85029a00f.

Tests, ×3 UHD 770 RX 9070 XT
This head: agc_driver_bc_block_copy passes passes
Without fails: a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented same

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6269888295 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799#issuecomment-6269888295). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-19T14:40:04Z. --- AMD and Intel Windows data: with this PR's test change, `agc_driver_bc_block_copy` fails on `main` and passes with the PR, on an AMD RX 9070 XT and an Intel UHD 770. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest. Intel UHD Graphics 770 (`8086:a780`), driver 32.0.101.7088. AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.31041.1004, with `VkCache` emptied first. This head `12c62ebc6` merged into `main` `85029a00f`. "Without" means only this PR's diff to `tests/execution/BcBlockCopy.cpp`, applied to `main` `85029a00f`. | Tests, ×3 | UHD 770 | RX 9070 XT | |---|---|---| | This head: `agc_driver_bc_block_copy` | passes | passes | | Without | fails: `a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented` | same | AI-assisted: yes (Claude Code)
savvaniss commented 2026-10-20 12:27:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-20T12:27:36Z.


@oneandonlydean asked me to bring my results from #8159 (closed as a duplicate of this PR) here, so here they are. I reran them on this PR's current head 3c905ee2d, since my earlier comment tested 12c62ebc6.

Setup: Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, AMD Radeon RX 9070 XT (1002:7550, driver 32.0.31041.1004). Every run used ANYPS5_GPU=AMD, ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1, and the validation runs added VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. "With the PR" is 3c905ee2d merged into main 56b299c3a.

agc_driver_bc_block_copy and agc_driver_image_sample_force_degamma, ×3 Result
main 56b299c3a, validation layer both pass, 3 of 3
With the PR, validation layer both pass, 3 of 3
This PR's test with main's Texture.cpp agc_driver_bc_block_copy fails: a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented

None of the validation logs contains a VUID- line, and none contains was not found but was requested by env var VK_INSTANCE_LAYERS. Each log's Selected GPU line names the RX 9070 XT.

A title: #8159's code change was the same two lines in Texture.cpp as this PR's: the MUTABLE_FORMAT flag when the block format has an sRGB twin, and prepareSrgbView. Ported onto #6977's branch, it let Trivial Pursuit Live! (CUSA03312, a PS4 title) get past this error to its language menu and title screen, at 60 fps on the RX 9070 XT. Without the change, the title stopped at the error above.

I did not rerun the UHD 770 on this head.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6290825850 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799#issuecomment-6290825850). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-20T12:27:36Z. --- @oneandonlydean asked me to bring my results from #8159 (closed as a duplicate of this PR) here, so here they are. I reran them on this PR's current head `3c905ee2d`, since my earlier comment tested `12c62ebc6`. Setup: Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, AMD Radeon RX 9070 XT (`1002:7550`, driver 32.0.31041.1004). Every run used `ANYPS5_GPU=AMD`, `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`, and the validation runs added `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. "With the PR" is `3c905ee2d` merged into `main` `56b299c3a`. | `agc_driver_bc_block_copy` and `agc_driver_image_sample_force_degamma`, ×3 | Result | |---|---| | `main` `56b299c3a`, validation layer | both pass, 3 of 3 | | With the PR, validation layer | both pass, 3 of 3 | | This PR's test with `main`'s `Texture.cpp` | `agc_driver_bc_block_copy` fails: `a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented` | None of the validation logs contains a `VUID-` line, and none contains `was not found but was requested by env var VK_INSTANCE_LAYERS`. Each log's `Selected GPU` line names the RX 9070 XT. **A title:** #8159's code change was the same two lines in `Texture.cpp` as this PR's: the `MUTABLE_FORMAT` flag when the block format has an sRGB twin, and `prepareSrgbView`. Ported onto #6977's branch, it let Trivial Pursuit Live! (CUSA03312, a PS4 title) get past this error to its language menu and title screen, at 60 fps on the RX 9070 XT. Without the change, the title stopped at the error above. I did not rerun the UHD 770 on this head. AI-assisted: yes (Claude Code)
thuanquang commented 2026-10-20 16:53:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-20T16:53:38Z.


@savvaniss thanks for bringing these over and rerunning them on this head. I've added your RX 9070 XT runs and the Trivial Pursuit Live! result to the description, with Unblocks: CUSA03312 #7198.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6296312567 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799#issuecomment-6296312567). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-20T16:53:38Z. --- @savvaniss thanks for bringing these over and rerunning them on this head. I've added your RX 9070 XT runs and the Trivial Pursuit Live! result to the description, with `Unblocks: CUSA03312 #7198`.
jotitadev commented 2026-10-22 01:30:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-22T01:30:45Z.

Review: COMMENTED


Adds NVIDIA and lavapipe (native Linux) to the devices here: the existing runs are AMD RX 6700 XT / RX 9070 XT and Intel UHD 770 on Windows, plus an Apple M2 Max MoltenVK run. red→green holds on both of mine too.

Tested

Ubuntu 26.04, GCC 15.2.0, Release, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, device selected with VK_ICD_FILENAMES, serial CTest, on main a6dcea927 (this PR applies cleanly on it; head 3c905ee2d).

agc_driver_bc_block_copy NVIDIA RTX 3070 (595.99.02) lavapipe (Mesa 26.0.3, LLVM 21.1.8)
main a6dcea927 + the PR's test only (Texture.cpp reverted) fail fail
this PR pass pass

With Texture.cpp reverted and the PR's BcBlockCopy.cpp change kept, both devices exit non-zero with the message this PR removes:

AGC graphics: a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented

The log shows the block copy landing as a storage image (block copy of storage image (guest format 75 -> vk 145)) and the sample then reaching Texture with guest format 181 and no sRGB view. With the full PR both devices pass. agc_driver_image_sample_force_degamma (the pre-existing force-degamma test) passes with and without the change, so the new path is specific to the block-copied BC case.

The rest of the guarded ^agc suite is unchanged from main on both devices (NVIDIA 858/861, lavapipe 860/861; the deltas are the same pre-existing sample_order / multisample_retirement failures main already has here).

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

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5608236351 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7799#pullrequestreview-5608236351). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-22T01:30:45Z. **Review:** COMMENTED --- Adds NVIDIA and lavapipe (native Linux) to the devices here: the existing runs are AMD RX 6700 XT / RX 9070 XT and Intel UHD 770 on Windows, plus an Apple M2 Max MoltenVK run. `red→green` holds on both of mine too. ### Tested Ubuntu 26.04, GCC 15.2.0, Release, `BUILD_TESTING=ON`, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, device selected with `VK_ICD_FILENAMES`, serial CTest, on `main` `a6dcea927` (this PR applies cleanly on it; head `3c905ee2d`). | `agc_driver_bc_block_copy` | NVIDIA RTX 3070 (595.99.02) | lavapipe (Mesa 26.0.3, LLVM 21.1.8) | |---|---|---| | `main` `a6dcea927` + the PR's test only (`Texture.cpp` reverted) | **fail** | **fail** | | this PR | pass | pass | With `Texture.cpp` reverted and the PR's `BcBlockCopy.cpp` change kept, both devices exit non-zero with the message this PR removes: ``` AGC graphics: a texture of guest format 181, which is not sRGB and has no sRGB view, is sampled through a sampler that forces sRGB decoding, which is not implemented ``` The log shows the block copy landing as a storage image (`block copy of storage image (guest format 75 -> vk 145)`) and the sample then reaching `Texture` with guest format 181 and no sRGB view. With the full PR both devices pass. `agc_driver_image_sample_force_degamma` (the pre-existing force-degamma test) passes with and without the change, so the new path is specific to the block-copied BC case. The rest of the guarded `^agc` suite is unchanged from `main` on both devices (NVIDIA 858/861, lavapipe 860/861; the deltas are the same pre-existing `sample_order` / `multisample_retirement` failures `main` already has here). GPUs tested: NVIDIA GeForce RTX 3070 (595.99.02, Linux) and lavapipe (Mesa 26.0.3, LLVM 21.1.8), Ubuntu 26.04. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7799
No description provided.