fix(agc): match measured color comparison formats #8642

Merged
MarcZX10 merged 5 commits from upstream-pr/8642 into main 2026-10-21 19:02:31 +00:00
MarcZX10 commented 2026-10-20 19:54:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T19:54:41Z.


What

image_sample_c* color comparisons currently emulate real comparisons for floating-sampled formats beyond what native GFX10 hardware does. The independent native measurements in #7934 report that, for GFX10 format codes 1–77, only code 7 (16_UNORM) and code 22 (32_FLOAT) perform comparisons; other tested codes return zero for every compare function. This change keeps those two formats on the native comparison path and lowers the other supported floating-sampled formats, including the previously special-cased 8-bit formats, to a constant-zero compare result. Scaled, integer and formats requiring converted sampling remain unsupported.

The regression test updates the existing emulated color-compare cases and adds checks across representative GFX10 formats and compare functions. The PS5's gfx1013 behavior remains unverified. This PR depends on #8625 for the related array-layer, NaN and TRUNC_COORD corrections; the test-file overlap will be rebased after it lands.

Tested

  • git diff --check upstream/main...HEAD: passed.
  • python3 tools/check_conventions.py --base upstream/main: passed.
  • tools/check_compile.py with the existing configured compile database: both changed translation units compile.
  • The native hardware evidence is reported in #7934: RDNA2 gfx1031 and gfx1036 plus RDNA3 gfx1100. These are oracle measurements, not runs of this PR's code.
  • Not run locally: build or agc_driver_emulated_color_compare; no test executable is available in the configured build directories and the shared filesystem has 24 MB free. The hosted PR build jobs were skipped by path filtering, and the manual build dispatch was denied by repository permissions.
  • Not tested: PS5 gfx1013 or a title.

Checklist

  • Based on current main; no other open PR implements this measured format behavior (#8625 is related and listed as a dependency)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no silent stubs added
  • No notes, investigation .md 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: #8625
  • Fixes: #7934
  • Unblocks: none
  • GPUs tested: none for this PR; see the hardware measurements in #7934
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4941609383 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T19:54:41Z. --- ### What `image_sample_c*` color comparisons currently emulate real comparisons for floating-sampled formats beyond what native GFX10 hardware does. The independent native measurements in #7934 report that, for GFX10 format codes 1–77, only code 7 (`16_UNORM`) and code 22 (`32_FLOAT`) perform comparisons; other tested codes return zero for every compare function. This change keeps those two formats on the native comparison path and lowers the other supported floating-sampled formats, including the previously special-cased 8-bit formats, to a constant-zero compare result. Scaled, integer and formats requiring converted sampling remain unsupported. The regression test updates the existing emulated color-compare cases and adds checks across representative GFX10 formats and compare functions. The PS5's gfx1013 behavior remains unverified. This PR depends on #8625 for the related array-layer, NaN and TRUNC_COORD corrections; the test-file overlap will be rebased after it lands. ### Tested - `git diff --check upstream/main...HEAD`: passed. - `python3 tools/check_conventions.py --base upstream/main`: passed. - `tools/check_compile.py` with the existing configured compile database: both changed translation units compile. - The native hardware evidence is reported in #7934: RDNA2 gfx1031 and gfx1036 plus RDNA3 gfx1100. These are oracle measurements, not runs of this PR's code. - Not run locally: build or `agc_driver_emulated_color_compare`; no test executable is available in the configured build directories and the shared filesystem has 24 MB free. The hosted PR build jobs were skipped by path filtering, and the manual build dispatch was denied by repository permissions. - Not tested: PS5 gfx1013 or a title. ### Checklist - [x] Based on current `main`; no other open PR implements this measured format behavior (#8625 is related and listed as a dependency) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` 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: #8625 - [x] Fixes: #7934 - [x] Unblocks: none - [x] GPUs tested: none for this PR; see the hardware measurements in #7934 - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-20 20:15:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T20:15:51Z.


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/libs/prx/libSceAgcDriver/tests/execution/EmulatedColorCompare.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4072 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/shader.md
PR 5371 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 5431 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5441 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6235 docs/dev/debt/shader.md
PR 6280 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 6290 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6412 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 6488 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 6788 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6879 docs/dev/debt/shader.md
PR 6924 docs/dev/debt/shader.md
PR 6947 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6960 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7275 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7484 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/shader.md
PR 7550 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7684 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 7922 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/shader.md
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/shader.md
PR 8014 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8077 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 8105 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8278 core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6300525040 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6300525040). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T20:15:51Z. --- <!-- pr-overlap --> 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/libs/prx/libSceAgcDriver/tests/execution/EmulatedColorCompare.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 4072](https://www.github.com/boykopovar/AnyPS5/pull/4072) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 4472](https://www.github.com/boykopovar/AnyPS5/pull/4472) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 6202](https://www.github.com/boykopovar/AnyPS5/pull/6202) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `docs/dev/debt/shader.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6290](https://www.github.com/boykopovar/AnyPS5/pull/6290) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `docs/dev/debt/shader.md` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `docs/dev/debt/shader.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 6960](https://www.github.com/boykopovar/AnyPS5/pull/6960) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 7275](https://www.github.com/boykopovar/AnyPS5/pull/7275) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 7449](https://www.github.com/boykopovar/AnyPS5/pull/7449) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7550](https://www.github.com/boykopovar/AnyPS5/pull/7550) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7922](https://www.github.com/boykopovar/AnyPS5/pull/7922) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`<br>`docs/dev/debt/shader.md` | | [PR 8004](https://www.github.com/boykopovar/AnyPS5/pull/8004) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`<br>`docs/dev/debt/shader.md` | | [PR 8014](https://www.github.com/boykopovar/AnyPS5/pull/8014) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 8077](https://www.github.com/boykopovar/AnyPS5/pull/8077) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 8105](https://www.github.com/boykopovar/AnyPS5/pull/8105) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 8278](https://www.github.com/boykopovar/AnyPS5/pull/8278) | `core/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` | | [PR 8847](https://www.github.com/boykopovar/AnyPS5/pull/8847) | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` |
DavidAmsellem commented 2026-10-20 20:35:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-20T20:35:54Z.


RADV run of this PR, and one validation finding. Head 092a66773 merged onto main aa1b1bfce (clean merge; it doesn't merge on top of #8625 yet, so this is the PR on its own), built in full.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

  • agc_driver_emulated_color_compare and agc_driver_emulated_color_compare_srgb_decode: pass 3 of 3 each with ANYPS5_NO_SHADER_CACHE=1.
  • Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8) at 98c27d0e7: 1733/1734, failing only agc_driver_guest_memory_lifetime (#7784), which fails on main too. No ctest entry is added, skipped or removed.

Validation: with the Khronos validation layer, main reports no VUID in these two tests, but with this PR each of them reports three, all for the same image:

VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251  vkGetPhysicalDeviceImageFormatProperties2 returned VK_ERROR_FORMAT_NOT_SUPPORTED
VUID-vkCmdCopyBufferToImage-dstImage-01997            VK_FORMAT_A2B10G10R10_SNORM_PACK32, tiling OPTIMAL: format features 0, missing TRANSFER_DST
VUID-VkImageViewCreateInfo-None-02273                 VK_FORMAT_A2B10G10R10_SNORM_PACK32, tiling OPTIMAL: no supported format features

They come from format code 51u in the new loop in EmulatedColorCompare.cpp (the {1u, 2u, 8u, …, 77u} list), which maps to VK_FORMAT_A2B10G10R10_SNORM_PACK32. RADV doesn't support that format as an image at all. A standalone query on this machine gives:

device optimal linear vkGetPhysicalDeviceImageFormatProperties2 (2D, SAMPLED | TRANSFER_DST)
RADV NAVI31 0x0 0x0 VK_ERROR_FORMAT_NOT_SUPPORTED
llvmpipe (LLVM 20.1.2) 0xd081 0xd081 VK_SUCCESS

So CI on lavapipe can't see it. The test still passes because the compare now returns zero without reading the texel, but it creates, uploads to and views an image the driver doesn't support. Skipping a format whose image format properties query fails, or using a different representative code in its place, would keep the case valid on RADV. The other 17 codes in the list produce no VUID here.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6300909415 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6300909415). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-20T20:35:54Z. --- RADV run of this PR, and one validation finding. Head `092a66773` merged onto `main` `aa1b1bfce` (clean merge; it doesn't merge on top of #8625 yet, so this is the PR on its own), built in full. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. - `agc_driver_emulated_color_compare` and `agc_driver_emulated_color_compare_srgb_decode`: pass 3 of 3 each with `ANYPS5_NO_SHADER_CACHE=1`. - Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`) at `98c27d0e7`: **1733/1734**, failing only `agc_driver_guest_memory_lifetime` (#7784), which fails on `main` too. No ctest entry is added, skipped or removed. **Validation:** with the Khronos validation layer, `main` reports no VUID in these two tests, but with this PR each of them reports three, all for the same image: ``` VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251 vkGetPhysicalDeviceImageFormatProperties2 returned VK_ERROR_FORMAT_NOT_SUPPORTED VUID-vkCmdCopyBufferToImage-dstImage-01997 VK_FORMAT_A2B10G10R10_SNORM_PACK32, tiling OPTIMAL: format features 0, missing TRANSFER_DST VUID-VkImageViewCreateInfo-None-02273 VK_FORMAT_A2B10G10R10_SNORM_PACK32, tiling OPTIMAL: no supported format features ``` They come from format code `51u` in the new loop in `EmulatedColorCompare.cpp` (the `{1u, 2u, 8u, …, 77u}` list), which maps to `VK_FORMAT_A2B10G10R10_SNORM_PACK32`. RADV doesn't support that format as an image at all. A standalone query on this machine gives: | device | optimal | linear | `vkGetPhysicalDeviceImageFormatProperties2` (2D, SAMPLED \| TRANSFER_DST) | |---|---|---|---| | RADV NAVI31 | `0x0` | `0x0` | `VK_ERROR_FORMAT_NOT_SUPPORTED` | | llvmpipe (LLVM 20.1.2) | `0xd081` | `0xd081` | `VK_SUCCESS` | So CI on lavapipe can't see it. The test still passes because the compare now returns zero without reading the texel, but it creates, uploads to and views an image the driver doesn't support. Skipping a format whose image format properties query fails, or using a different representative code in its place, would keep the case valid on RADV. The other 17 codes in the list produce no VUID here. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes
MarcZX10 commented 2026-10-20 20:38:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T20:38:32Z.


Thanks for the RADV validation report. I removed format 51 from this execution-test loop because its mapped VK_FORMAT_A2B10G10R10_SNORM_PACK32 image is unsupported on RADV NAVI31; the comment records why. This avoids creating an invalid image on that device, though it means this particular format is no longer exercised by this test on devices that support it. Commit ee2d9a4876 is pushed to the existing PR branch. git diff --check passes; I have not run the Vulkan test locally in this environment. The PR checks are still pending.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6300959625 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6300959625). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T20:38:32Z. --- Thanks for the RADV validation report. I removed format 51 from this execution-test loop because its mapped VK_FORMAT_A2B10G10R10_SNORM_PACK32 image is unsupported on RADV NAVI31; the comment records why. This avoids creating an invalid image on that device, though it means this particular format is no longer exercised by this test on devices that support it. Commit ee2d9a4876 is pushed to the existing PR branch. `git diff --check` passes; I have not run the Vulkan test locally in this environment. The PR checks are still pending.
MarcZX10 commented 2026-10-20 20:40:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T20:40:01Z.


Follow-up: I refined the fix so format 51 is still tested on devices that support its sampled 2D optimal-tiling image. The test now queries the exact image-format/usage combination and skips only that case when unsupported (as on RADV NAVI31). I pushed this as a second focused commit, 745ff15b80; the prior commit removes it unconditionally, and this follow-up restores supported-device coverage. git diff --check and python3 tools/check_conventions.py --base upstream/main --head HEAD pass. I could not build or run the Vulkan test locally because the workspace has only about 900 MB free. Please rerun CI and the RADV validation case on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6300987162 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6300987162). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T20:40:01Z. --- Follow-up: I refined the fix so format 51 is still tested on devices that support its sampled 2D optimal-tiling image. The test now queries the exact image-format/usage combination and skips only that case when unsupported (as on RADV NAVI31). I pushed this as a second focused commit, `745ff15b80`; the prior commit removes it unconditionally, and this follow-up restores supported-device coverage. `git diff --check` and `python3 tools/check_conventions.py --base upstream/main --head HEAD` pass. I could not build or run the Vulkan test locally because the workspace has only about 900 MB free. Please rerun CI and the RADV validation case on the updated head.
MarcZX10 commented 2026-10-20 21:27:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T21:27:13Z.


Thanks for the RADV report and the validation-layer details. The unsupported format finding prompted a follow-up on the PR head (745ff15b80): it now queries the exact sampled 2D optimal image/usage combination and skips format 51 only when that query reports unsupported, preserving coverage where supported. The current hosted workflow skipped the AGC runtime tests, so the RADV validation result on this updated head is still outstanding.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301855808 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6301855808). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T21:27:13Z. --- Thanks for the RADV report and the validation-layer details. The unsupported format finding prompted a follow-up on the PR head (`745ff15b80`): it now queries the exact sampled 2D optimal image/usage combination and skips format 51 only when that query reports unsupported, preserving coverage where supported. The current hosted workflow skipped the AGC runtime tests, so the RADV validation result on this updated head is still outstanding.
MarcZX10 commented 2026-10-20 21:56:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T21:56:37Z.


Overlap clarification for #8014: the shared VulkanDevice.hpp hunk is adjacent declarations only. This PR adds SupportsImageFormat(VkFormat, VkImageUsageFlags) for the format-51 test guard; #8014 adds BdaAtomicsUsable() and RasterOrderGroupUsable() for the pixel-interlock test. They have separate implementations and no dependency or duplicate behavior. If both land, the declarations in this header should simply be retained together.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302585334 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6302585334). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T21:56:37Z. --- Overlap clarification for #8014: the shared `VulkanDevice.hpp` hunk is adjacent declarations only. This PR adds `SupportsImageFormat(VkFormat, VkImageUsageFlags)` for the format-51 test guard; #8014 adds `BdaAtomicsUsable()` and `RasterOrderGroupUsable()` for the pixel-interlock test. They have separate implementations and no dependency or duplicate behavior. If both land, the declarations in this header should simply be retained together.
MarcZX10 commented 2026-10-20 22:36:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T22:36:59Z.


Thanks for catching this with the Khronos layer. The current head 745ff15b80e897accd9ee18c563822dde00036c9 now checks vkGetPhysicalDeviceImageFormatProperties for the exact image usage before exercising format 51 and prints an explicit skip when unsupported, so this does not rely on the compare path returning zero to conceal an invalid image. The focused follow-up hosted run only ran policy checks; could you rerun agc_driver_emulated_color_compare with validation on the new head to confirm the VUIDs are gone?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303330287 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6303330287). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T22:36:59Z. --- Thanks for catching this with the Khronos layer. The current head `745ff15b80e897accd9ee18c563822dde00036c9` now checks `vkGetPhysicalDeviceImageFormatProperties` for the exact image usage before exercising format 51 and prints an explicit skip when unsupported, so this does not rely on the compare path returning zero to conceal an invalid image. The focused follow-up hosted run only ran policy checks; could you rerun `agc_driver_emulated_color_compare` with validation on the new head to confirm the VUIDs are gone?
janzezno commented 2026-10-20 23:04:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by janzezno on 2026-10-20T23:04:31Z.


Run on AMD hardware, tested alone on main (not stacked on #8625; the two conflict in EmulatedColorCompare.cpp).

Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, BUILD_TESTING=ON.
main e25333e39; PR head 745ff15b80 merged on top (clean merge).

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'compare|denorm|f32|f16|f64|agc_shader_memory|agc_shader_disk_cache|request_serializer|dcc|storage|pm4|indirect' -V

  • main: 137 of 137 pass. PR: 137 of 137 pass, including agc_driver_emulated_color_compare and agc_driver_emulated_color_compare_srgb_decode.
  • The same VUID- set and counts on both; none is new. The validation layer loaded in both runs.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303754321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6303754321). Originally posted by [janzezno](https://github.com/janzezno) on 2026-10-20T23:04:31Z. --- Run on AMD hardware, tested alone on `main` (not stacked on #8625; the two conflict in `EmulatedColorCompare.cpp`). Host: Arch Linux, kernel 7.2.11, AMD Radeon RX 7900 GRE (RADV NAVI31), Mesa 26.2.5, GCC 16.2.1, Release, `BUILD_TESTING=ON`. `main` `e25333e39`; PR head `745ff15b80` merged on top (clean merge). `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'compare|denorm|f32|f16|f64|agc_shader_memory|agc_shader_disk_cache|request_serializer|dcc|storage|pm4|indirect' -V` - `main`: 137 of 137 pass. PR: 137 of 137 pass, including `agc_driver_emulated_color_compare` and `agc_driver_emulated_color_compare_srgb_decode`. - The same `VUID-` set and counts on both; none is new. The validation layer loaded in both runs.
MarcZX10 commented 2026-10-20 23:04:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T23:04:50Z.


Thanks for running the exact updated head on RADV with the validation layer and a main control. The 137/137 result on both sides, including both color-compare tests, and the unchanged VUID set/counts confirm that format 51 is skipped safely where unsupported without adding validation findings. This resolves my outstanding validation request for the current head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303758916 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6303758916). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T23:04:50Z. --- Thanks for running the exact updated head on RADV with the validation layer and a main control. The 137/137 result on both sides, including both color-compare tests, and the unchanged VUID set/counts confirm that format 51 is skipped safely where unsupported without adding validation findings. This resolves my outstanding validation request for the current head.
xXPBSXx commented 2026-10-21 00:18:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T00:18:04Z.


Windows data point for 745ff15b80, merge-tree against main 5b59fbc55 clean: Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release. ctest -N -R '^agc_driver_emulated_color_compare$' lists exactly that one test; ctest --no-tests=error -R '^agc_driver_emulated_color_compare$' was run three times per tree. The test selected the NVIDIA GeForce RTX 4080 SUPER (an RX 6400 is also present, driver versions not recorded).

  • With the PR: passes 3 of 3 (8-16 s).
  • Same tree with core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp restored to main (the new test cases and the VulkanDevice::SupportsImageFormat helper kept, because the test needs it to build): fails 3 of 3 (ordinary test failure, not a crash).
    This is a run of the PR's code on an NVIDIA device, not gfx1013 data; the comparison semantics under test are the PR's own rules.
    Not tested: PS5 gfx1013, other platforms, a title run, agc_driver_emulated_color_compare_srgb_decode.
    AI-assisted (Claude Code).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304788202 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6304788202). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T00:18:04Z. --- Windows data point for `745ff15b80`, merge-tree against `main` `5b59fbc55` clean: Windows 10.0.19045, MinGW-w64 GCC 15.2.0, Release. `ctest -N -R '^agc_driver_emulated_color_compare$'` lists exactly that one test; `ctest --no-tests=error -R '^agc_driver_emulated_color_compare$'` was run three times per tree. The test selected the NVIDIA GeForce RTX 4080 SUPER (an RX 6400 is also present, driver versions not recorded). - With the PR: passes 3 of 3 (8-16 s). - Same tree with `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` restored to `main` (the new test cases and the `VulkanDevice::SupportsImageFormat` helper kept, because the test needs it to build): fails 3 of 3 (ordinary test failure, not a crash). This is a run of the PR's code on an NVIDIA device, not gfx1013 data; the comparison semantics under test are the PR's own rules. Not tested: PS5 gfx1013, other platforms, a title run, `agc_driver_emulated_color_compare_srgb_decode`. AI-assisted (Claude Code).
MarcZX10 commented 2026-10-21 00:23:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T00:23:41Z.


Thanks for the Windows exact-head run. The RTX 4080 SUPER test passes 3/3 and the restored-main materializer control fails 3/3, so this adds useful independent evidence that the materializer change is necessary on that NVIDIA path. I am keeping the limits explicit: it does not establish gfx1013 behavior, PS5 behavior, or the separate sRGB-decode test, and no validation-layer result was included.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304861917 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6304861917). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T00:23:41Z. --- Thanks for the Windows exact-head run. The RTX 4080 SUPER test passes 3/3 and the restored-main materializer control fails 3/3, so this adds useful independent evidence that the materializer change is necessary on that NVIDIA path. I am keeping the limits explicit: it does not establish gfx1013 behavior, PS5 behavior, or the separate sRGB-decode test, and no validation-layer result was included.
MarcZX10 commented 2026-10-21 00:51:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T00:51:57Z.


Thanks for the RADV validation and for identifying the unsupported format. The current head 745ff15b80 now queries support for format 51 before creating the image and skips that case when the device does not support the required sampled/transfer-destination usage. I also checked the follow-up report on that head: 137/137 tests pass, and the validation VUID set is unchanged from main. The PR does not claim PS5 gfx1013 validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305238045 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6305238045). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T00:51:57Z. --- Thanks for the RADV validation and for identifying the unsupported format. The current head `745ff15b80` now queries support for format 51 before creating the image and skips that case when the device does not support the required sampled/transfer-destination usage. I also checked the follow-up report on that head: 137/137 tests pass, and the validation VUID set is unchanged from `main`. The PR does not claim PS5 gfx1013 validation.
MarcZX10 commented 2026-10-21 00:55:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T00:55:59Z.


Thanks for the exact-head runs on RADV and Windows/NVIDIA. I added the unsupported-format capability guard after the initial RADV report. The follow-up reports show 137/137 selected Linux tests passing with the validation VUID set unchanged from main, and three Windows runs passing with a main-code negative control. The PR still does not claim PS5 gfx1013 validation.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305289948 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6305289948). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T00:55:59Z. --- Thanks for the exact-head runs on RADV and Windows/NVIDIA. I added the unsupported-format capability guard after the initial RADV report. The follow-up reports show 137/137 selected Linux tests passing with the validation VUID set unchanged from `main`, and three Windows runs passing with a main-code negative control. The PR still does not claim PS5 gfx1013 validation.
thuanquang commented 2026-10-21 04:39:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-21T04:39:42Z.


An AMD proprietary-driver run: RX 6700 XT (gfx1031), AMD Windows driver 32.0.21045.5002, Windows 11 26200, MinGW GCC 15.2.0 Release. I tested main 7ab4b2e56 merged with this head 745ff15b8 (clean merge), without #8625.

  • Tests: 5 pass 3 of 3: agc_driver_emulated_color_compare and _srgb_decode, agc_driver_depth_compare_copy, agc_driver_image_plane_compare_on_line and agc_driver_image_one_dimensional_compare.
  • Khronos validation layer, ctest -V on the same 5: 0 VUID- lines, the same as on main. The layer was inserted in all 5 test processes.

Not run: a red control. This PR's test file alone did not build on main here, so this is the PR side only.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6308191934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6308191934). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-21T04:39:42Z. --- An AMD proprietary-driver run: RX 6700 XT (gfx1031), AMD Windows driver 32.0.21045.5002, Windows 11 26200, MinGW GCC 15.2.0 Release. I tested `main` `7ab4b2e56` merged with this head `745ff15b8` (clean merge), without #8625. - **Tests:** 5 pass 3 of 3: `agc_driver_emulated_color_compare` and `_srgb_decode`, `agc_driver_depth_compare_copy`, `agc_driver_image_plane_compare_on_line` and `agc_driver_image_one_dimensional_compare`. - **Khronos validation layer, `ctest -V` on the same 5:** 0 `VUID-` lines, the same as on `main`. The layer was inserted in all 5 test processes. Not run: a red control. This PR's test file alone did not build on `main` here, so this is the PR side only.
MarcZX10 commented 2026-10-21 04:42:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T04:42:54Z.


Thanks for the exact-head AMD proprietary-driver run. The 5 focused tests pass 3/3 with the validation layer loaded and no new VUIDs, which adds the Windows AMD coverage missing from the RADV and NVIDIA reports. The limitation is clear: there is no red control in this run, and it does not measure gfx1013/PS5 behavior.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6308231134 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6308231134). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T04:42:54Z. --- Thanks for the exact-head AMD proprietary-driver run. The 5 focused tests pass 3/3 with the validation layer loaded and no new VUIDs, which adds the Windows AMD coverage missing from the RADV and NVIDIA reports. The limitation is clear: there is no red control in this run, and it does not measure gfx1013/PS5 behavior.
MarcZX10 commented 2026-10-21 05:34:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:34:08Z.


Thanks for the AMD proprietary-driver run and the validation-layer check. The five targeted tests pass, with no new VUIDs on that setup; the missing red control means this is additional pass evidence rather than a direct before/after result.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6308874313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6308874313). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T05:34:08Z. --- Thanks for the AMD proprietary-driver run and the validation-layer check. The five targeted tests pass, with no new VUIDs on that setup; the missing red control means this is additional pass evidence rather than a direct before/after result.
adriadam10 commented 2026-10-21 19:03:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T19:03:23Z.


Checked the format split against our earlier gfx1035 measurement (only 16_UNORM and 32_FLOAT compare; 8-bit UNORM/sRGB and 16_FLOAT return 0 for every function) and the gfx1031/gfx1036/gfx1100 sweeps in #7934, the zero-result tests against main's materializer (red there, per @xXPBSXx's control), and the RADV, NVIDIA and AMD Windows runs above; merged.

  • Follow-up, not blocking: with every non-converted format now constant 0, the per-texel compare emulation in SpirvImageEmitter.cpp (UNORM/SNORM reference clamp, the compare chain) and the bilinear-cube DISABLE_CUBE_WRAP throw in ResourceMaterializer.cpp are unreachable and can be removed; #8625 edits that same code.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324169223 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8642#issuecomment-6324169223). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T19:03:23Z. --- Checked the format split against our earlier gfx1035 measurement (only 16_UNORM and 32_FLOAT compare; 8-bit UNORM/sRGB and 16_FLOAT return 0 for every function) and the gfx1031/gfx1036/gfx1100 sweeps in #7934, the zero-result tests against main's materializer (red there, per @xXPBSXx's control), and the RADV, NVIDIA and AMD Windows runs above; merged. - Follow-up, not blocking: with every non-converted format now constant 0, the per-texel compare emulation in `SpirvImageEmitter.cpp` (UNORM/SNORM reference clamp, the compare chain) and the bilinear-cube `DISABLE_CUBE_WRAP` throw in `ResourceMaterializer.cpp` are unreachable and can be removed; #8625 edits that same code.
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!8642
No description provided.