fix(agc): back 1D depth comparison textures with 2D images #7966

Merged
KarthikeyaAnna merged 1 commit from upstream-pr/7966 into main 2026-10-21 01:21:13 +00:00
KarthikeyaAnna commented 2026-10-19 16:23:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-19T16:23:16Z.


What

Back 1D and 1D-array depth comparison textures with 2D Vulkan images and views of height 1. Vulkan drivers such as AMD RADV reject 1D depth images (VK_ERROR_FORMAT_NOT_SUPPORTED / VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251). The shader recompiler maps 1D depth comparison samplers to 2D image descriptors, pins the normalized vertical coordinate to 0.5 to sample the center of row 0 without hitting borders, zeroes vertical offsets for 1D comparison sample offsets, gates cube map candidate modes strictly on !image.remappedDepth1D, and explicitly rejects unsupported 1D depth gather variants keyed on access.image.remappedDepth1D. Adds focused execution tests covering 1D/1D-array comparison sampling (image_sample_c_lz, image_sample_c, image_sample_c_l), 1D/1D-array offsets (image_sample_c_lz_o), and rejection of 1D/1D-array depth gather variants.

Tested

Arch Linux x86_64, NVIDIA GeForce RTX 2050 (driver 610.57.04).
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "^(agc_driver_image_one_dimensional_compare|agc_driver_depth_compare_copy|agc_driver_image_plane_compare_on_line|agc_driver_emulated_color_compare|agc_driver_image_gather_one_dimensional|agc_driver_image_gather_one_dimensional_array|agc_shader_disk_cache)$" -V passes with 0 validation errors.

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 https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md
  • 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
  • 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: none
  • GPUs tested: NVIDIA GeForce RTX 2050, Arch Linux, driver 610.57.04
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4924025678 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-19T16:23:16Z. --- ### What Back 1D and 1D-array depth comparison textures with 2D Vulkan images and views of height 1. Vulkan drivers such as AMD RADV reject 1D depth images (`VK_ERROR_FORMAT_NOT_SUPPORTED` / `VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251`). The shader recompiler maps 1D depth comparison samplers to 2D image descriptors, pins the normalized vertical coordinate to 0.5 to sample the center of row 0 without hitting borders, zeroes vertical offsets for 1D comparison sample offsets, gates cube map candidate modes strictly on `!image.remappedDepth1D`, and explicitly rejects unsupported 1D depth gather variants keyed on `access.image.remappedDepth1D`. Adds focused execution tests covering 1D/1D-array comparison sampling (`image_sample_c_lz`, `image_sample_c`, `image_sample_c_l`), 1D/1D-array offsets (`image_sample_c_lz_o`), and rejection of 1D/1D-array depth gather variants. ### Tested Arch Linux x86_64, NVIDIA GeForce RTX 2050 (driver 610.57.04). `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "^(agc_driver_image_one_dimensional_compare|agc_driver_depth_compare_copy|agc_driver_image_plane_compare_on_line|agc_driver_emulated_color_compare|agc_driver_image_gather_one_dimensional|agc_driver_image_gather_one_dimensional_array|agc_shader_disk_cache)$" -V` passes with 0 validation errors. ### 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: none - [x] GPUs tested: NVIDIA GeForce RTX 2050, Arch Linux, driver 610.57.04 - [x] AI-assisted: yes
MarcZX10 commented 2026-10-19 16:32:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:32:01Z.

Review: COMMENTED


One test-coverage gap: this diff changes descriptor dimension handling, emitted coordinates, image creation, and image views for both 1D and 1D-array comparison textures, but adds no regression test. The issue report notes that the existing agc_driver_image_plane_compare_on_line path appears to work on RADV even though the driver reports the 1D depth image format as unsupported, so that test may not catch a regression in the new remapping. Could you add a focused check for both 1D and 1D-array comparison sampling, or report a validation-layer run showing the old path emits the unsupported-image VUID and the new path does not?

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5574626518 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#pullrequestreview-5574626518). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T16:32:01Z. **Review:** COMMENTED --- One test-coverage gap: this diff changes descriptor dimension handling, emitted coordinates, image creation, and image views for both 1D and 1D-array comparison textures, but adds no regression test. The issue report notes that the existing `agc_driver_image_plane_compare_on_line` path appears to work on RADV even though the driver reports the 1D depth image format as unsupported, so that test may not catch a regression in the new remapping. Could you add a focused check for both 1D and 1D-array comparison sampling, or report a validation-layer run showing the old path emits the unsupported-image VUID and the new path does not?
github-actions[bot] commented 2026-10-19 16:36:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T16:36:22Z.


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 6858 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp L348-349
PR 7803 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L4638-4639
PR 7831 core/shader/recompiler/ShaderDiskCache.hpp L16

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 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5021 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 5371 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 5925 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6187 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6682 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6683 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6718 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6820 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6879 core/shader/recompiler/ShaderDiskCache.cpp
PR 6924 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6960 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 7048 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7395 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7484 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7550 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7622 core/shader/recompiler/ShaderDiskCache.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7888 core/shader/recompiler/ShaderDiskCache.cpp
PR 8077 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 8134 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
PR 8295 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 8484 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8489 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
PR 8564 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 8612 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 8658 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6272159485 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6272159485). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T16:36:22Z. --- <!-- 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 6858](https://www.github.com/boykopovar/AnyPS5/pull/6858) | `core/shader/recompiler/ShaderDiskCache.hpp` [L16](https://github.com/boykopovar/AnyPS5/blob/76974432812498c97d3536ab2567d091a5d3d2b4/core/shader/recompiler/ShaderDiskCache.hpp#L16) | | | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` [L348-349](https://github.com/boykopovar/AnyPS5/blob/76974432812498c97d3536ab2567d091a5d3d2b4/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp#L348-L349) | | | | [PR 7803](https://www.github.com/boykopovar/AnyPS5/pull/7803) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` [L4638-4639](https://github.com/boykopovar/AnyPS5/blob/76974432812498c97d3536ab2567d091a5d3d2b4/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp#L4638-L4639) | | | | [PR 7831](https://www.github.com/boykopovar/AnyPS5/pull/7831) | `core/shader/recompiler/ShaderDiskCache.hpp` [L16](https://github.com/boykopovar/AnyPS5/blob/76974432812498c97d3536ab2567d091a5d3d2b4/core/shader/recompiler/ShaderDiskCache.hpp#L16) | | | 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 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 6187](https://www.github.com/boykopovar/AnyPS5/pull/6187) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6202](https://www.github.com/boykopovar/AnyPS5/pull/6202) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6209](https://www.github.com/boykopovar/AnyPS5/pull/6209) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6682](https://www.github.com/boykopovar/AnyPS5/pull/6682) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6804](https://www.github.com/boykopovar/AnyPS5/pull/6804) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6924](https://www.github.com/boykopovar/AnyPS5/pull/6924) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 6960](https://www.github.com/boykopovar/AnyPS5/pull/6960) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6970](https://www.github.com/boykopovar/AnyPS5/pull/6970) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 6971](https://www.github.com/boykopovar/AnyPS5/pull/6971) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 7048](https://www.github.com/boykopovar/AnyPS5/pull/7048) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7256](https://www.github.com/boykopovar/AnyPS5/pull/7256) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7395](https://www.github.com/boykopovar/AnyPS5/pull/7395) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7550](https://www.github.com/boykopovar/AnyPS5/pull/7550) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7622](https://www.github.com/boykopovar/AnyPS5/pull/7622) | `core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 7689](https://www.github.com/boykopovar/AnyPS5/pull/7689) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 7888](https://www.github.com/boykopovar/AnyPS5/pull/7888) | `core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 8077](https://www.github.com/boykopovar/AnyPS5/pull/8077) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp` | | [PR 8134](https://www.github.com/boykopovar/AnyPS5/pull/8134) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp` | | [PR 8295](https://www.github.com/boykopovar/AnyPS5/pull/8295) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 8484](https://www.github.com/boykopovar/AnyPS5/pull/8484) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` | | [PR 8489](https://www.github.com/boykopovar/AnyPS5/pull/8489) | `core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp` | | [PR 8564](https://www.github.com/boykopovar/AnyPS5/pull/8564) | `core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp`<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/ShaderDiskCache.cpp`<br>`core/shader/recompiler/ShaderDiskCache.hpp` | | [PR 8612](https://www.github.com/boykopovar/AnyPS5/pull/8612) | `core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp` | | [PR 8658](https://www.github.com/boykopovar/AnyPS5/pull/8658) | `core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp` |
MarcZX10 commented 2026-10-19 16:37:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:37:31Z.

Review: COMMENTED


Manual overlap check on the bot warning:

  • #7803 also changes the direct-image dimension guard in resolveImageBinding, adding a firstSample exception for a 2D view of a 2D MSAA T#. This head exempts firstLayer and depth1D, but not firstSample. If both changes are still needed, the merged guard needs to preserve all three cases; otherwise one PR's behavior will be lost when the other is rebased/merged.
  • #6481 changes table-entry memory/device-limit validation and error handling after the table dimension check. I found no semantic overlap with this PR's depth1D exception in that path.

I haven't run a combined build; this is a source-level overlap check.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5574685579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#pullrequestreview-5574685579). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T16:37:31Z. **Review:** COMMENTED --- Manual overlap check on the bot warning: - #7803 also changes the direct-image dimension guard in `resolveImageBinding`, adding a `firstSample` exception for a 2D view of a 2D MSAA T#. This head exempts `firstLayer` and `depth1D`, but not `firstSample`. If both changes are still needed, the merged guard needs to preserve all three cases; otherwise one PR's behavior will be lost when the other is rebased/merged. - #6481 changes table-entry memory/device-limit validation and error handling after the table dimension check. I found no semantic overlap with this PR's `depth1D` exception in that path. I haven't run a combined build; this is a source-level overlap check.
KarthikeyaAnna commented 2026-10-19 16:59:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-19T16:59:49Z.


Added a focused execution test in ImageOneDimensionalCompare.cpp (agc_driver_image_one_dimensional_compare_tests) verifying both 1D and 1D-array comparison sampling (image_sample_c_lz and image_sample_c).

Also updated ResourceMaterializer::RuntimeImageModes to guard against adding candidate cube map permutations for 2D-array depth comparisons (which have 2 coordinate components and cannot sample a cube).

Tested on Arch Linux x86_64, NVIDIA GeForce RTX 2050 (driver 610.57.04):

  • ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -R "agc_driver_image_(plane_compare_on_line|one_dimensional_compare)" -V passes.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6272621131 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6272621131). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-19T16:59:49Z. --- Added a focused execution test in [ImageOneDimensionalCompare.cpp](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceAgcDriver/tests/execution/ImageOneDimensionalCompare.cpp) (`agc_driver_image_one_dimensional_compare_tests`) verifying both 1D and 1D-array comparison sampling (`image_sample_c_lz` and `image_sample_c`). Also updated `ResourceMaterializer::RuntimeImageModes` to guard against adding candidate cube map permutations for 2D-array depth comparisons (which have 2 coordinate components and cannot sample a cube). Tested on Arch Linux x86_64, NVIDIA GeForce RTX 2050 (driver 610.57.04): - `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ctest --test-dir build -R "agc_driver_image_(plane_compare_on_line|one_dimensional_compare)" -V` passes.
KarthikeyaAnna commented 2026-10-19 17:05:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-19T17:05:18Z.


Thanks for the overlap check @MarcZX10. Acknowledged: if #7803 lands first, I will ensure the rebase preserves both firstSample and depth1D in resolveImageBinding (and vice versa if this merges first).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6272729160 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6272729160). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-19T17:05:18Z. --- Thanks for the overlap check @MarcZX10. Acknowledged: if #7803 lands first, I will ensure the rebase preserves both `firstSample` and `depth1D` in `resolveImageBinding` (and vice versa if this merges first).
oneandonlydean commented 2026-10-20 03:21:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T03:21:59Z.


Thanks, backing 1D compare textures with height-1 2D images looks like the right way to get RADV working. One problem: two of the RuntimeImageModes changes apply to every 2D-array comparison image, not only the remapped 1D ones. && !image.depthCompare on the cube mode and && image.cubeFaceCompatible on the emulated-compare plain/cube modes (which is never true for a compare sample) remove the cube mode that cube shadow maps need, since DIM_CUBE decodes as Dim2DArray. With this PR on main, agc_driver_emulated_color_compare fails its first case ("point cube, clamp to edge": "image descriptor is incompatible with the static runtime image interface ... cube 1 ... modes ... cube 0"). Could you gate those two changes on images that were actually rewritten from 1D (a flag set where ResourceTracker remaps the dimension) and check that the test passes?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282571688 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6282571688). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T03:21:59Z. --- Thanks, backing 1D compare textures with height-1 2D images looks like the right way to get RADV working. One problem: two of the `RuntimeImageModes` changes apply to every 2D-array comparison image, not only the remapped 1D ones. `&& !image.depthCompare` on the cube mode and `&& image.cubeFaceCompatible` on the emulated-compare plain/cube modes (which is never true for a compare sample) remove the cube mode that cube shadow maps need, since DIM_CUBE decodes as Dim2DArray. With this PR on main, `agc_driver_emulated_color_compare` fails its first case ("point cube, clamp to edge": "image descriptor is incompatible with the static runtime image interface ... cube 1 ... modes ... cube 0"). Could you gate those two changes on images that were actually rewritten from 1D (a flag set where ResourceTracker remaps the dimension) and check that the test passes?
KarthikeyaAnna commented 2026-10-20 04:59:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T04:59:50Z.


Thanks @oneandonlydean, great catch!

I added remappedDepth1D to ImageResource (set in ResourceTracker::ImageKey specifically when 1D or 1D-array comparison textures are remapped to 2D / 2D-array), and gated both cube modes in RuntimeImageModes on !image.remappedDepth1D. This preserves the cube mode for actual 2D-array and cube comparison textures (including cube shadow maps and emulated color compare).

Also plumbed remappedDepth1D through ShaderDiskCache (updating fieldCount<ImageResource>() to 40 and adding test coverage in tests/ShaderDiskCache.cpp).

Tested on Arch Linux x86_64, NVIDIA GeForce RTX 2050 with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1:

  • agc_driver_emulated_color_compare passes
  • agc_driver_emulated_color_compare_srgb_decode passes
  • agc_driver_image_one_dimensional_compare passes
  • agc_driver_image_plane_compare_on_line passes
  • agc_shader_disk_cache passes
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6283757944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6283757944). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T04:59:50Z. --- Thanks @oneandonlydean, great catch! I added `remappedDepth1D` to `ImageResource` (set in `ResourceTracker::ImageKey` specifically when 1D or 1D-array comparison textures are remapped to 2D / 2D-array), and gated both cube modes in `RuntimeImageModes` on `!image.remappedDepth1D`. This preserves the cube mode for actual 2D-array and cube comparison textures (including cube shadow maps and emulated color compare). Also plumbed `remappedDepth1D` through `ShaderDiskCache` (updating `fieldCount<ImageResource>()` to 40 and adding test coverage in `tests/ShaderDiskCache.cpp`). Tested on Arch Linux x86_64, NVIDIA GeForce RTX 2050 with `VK_LAYER_KHRONOS_validation` and `ANYPS5_NO_SHADER_CACHE=1`: - `agc_driver_emulated_color_compare` passes - `agc_driver_emulated_color_compare_srgb_decode` passes - `agc_driver_image_one_dimensional_compare` passes - `agc_driver_image_plane_compare_on_line` passes - `agc_shader_disk_cache` passes
oneandonlydean commented 2026-10-20 05:09:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T05:09:16Z.


Thanks, remappedDepth1D answers the cube question: with it, the cube and 2D-array comparison modes are the same as main's for every image that wasn't rewritten from 1D.

One thing before this can merge: main's 1ed8eb6d8b already added a field to ImageResource (volumeArraySampleCompatible) and moved the fieldCount<ImageResource>() assert in ShaderDiskCache.cpp from 39 to 40. Your branch makes the same 39 → 40 edit, so git merges it without a conflict, but the merged struct has 41 fields and ShaderDiskCache.cpp fails its static assert ("ImageResource changed: update the info encoder"). Could you rebase on current main and set it to 41? Main has also been bumping FormatVersion with these field additions (it's 41 now), so you may want 42 for consistency, though the source hash already invalidates old entries.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6283869835 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6283869835). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T05:09:16Z. --- Thanks, `remappedDepth1D` answers the cube question: with it, the cube and 2D-array comparison modes are the same as main's for every image that wasn't rewritten from 1D. One thing before this can merge: main's 1ed8eb6d8b3 already added a field to `ImageResource` (`volumeArraySampleCompatible`) and moved the `fieldCount<ImageResource>()` assert in `ShaderDiskCache.cpp` from 39 to 40. Your branch makes the same 39 → 40 edit, so git merges it without a conflict, but the merged struct has 41 fields and `ShaderDiskCache.cpp` fails its static assert ("ImageResource changed: update the info encoder"). Could you rebase on current main and set it to 41? Main has also been bumping `FormatVersion` with these field additions (it's 41 now), so you may want 42 for consistency, though the source hash already invalidates old entries.
KarthikeyaAnna commented 2026-10-20 06:14:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T06:14:55Z.


Rebased onto latest main (1ed63f6), updated the ImageResource fieldCount static assert to 41, and bumped FormatVersion to 42 in ShaderDiskCache.hpp.

All tests pass cleanly:

  • agc_shader_disk_cache
  • agc_driver_emulated_color_compare
  • agc_driver_emulated_color_compare_srgb_decode
  • agc_driver_image_one_dimensional_compare
  • agc_driver_image_plane_compare_on_line
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6284697328 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6284697328). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T06:14:55Z. --- Rebased onto latest main (`1ed63f6`), updated the `ImageResource` fieldCount static assert to 41, and bumped `FormatVersion` to 42 in `ShaderDiskCache.hpp`. All tests pass cleanly: - `agc_shader_disk_cache` - `agc_driver_emulated_color_compare` - `agc_driver_emulated_color_compare_srgb_decode` - `agc_driver_image_one_dimensional_compare` - `agc_driver_image_plane_compare_on_line`
oneandonlydean commented 2026-10-20 07:07:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T07:07:44Z.


Thanks for the rebase. Full CI fails one test on Linux, deterministically (the rerun fails the same way, and the test passes on main):

agc_driver_depth_compare_copy
[gpu] storage image 0x... destroyed with GPU results pending
AGC graphics: R32F 512x512: comparison sample of pending results: thread 1 compared to 0.000000, expected 1.000000

The cause is the new line in CoordF32 (SpirvImageEmitter.cpp):

if (access.image.depthCompare && (access.image.flatLineCompatible || access.image.remappedDepth1D || ...Dim1D || ...Dim1DArray)) {
    y = ConstantF32(ctx.state, 0x3f000000u);
}

flatLineCompatible isn't specific to 1D images. It defaults to true (Resources.hpp), and the tracker keeps it for any 2D image_sample with no flags or LZ, because lineSampleFlags masks out the compare bit (ResourceTracker.cpp, lineSampleFlags = memory.imageSampleFlags & ~RdnaImageSampleFlagCompare). So every plain 2D depth-comparison sample now has its y replaced by 0.5 and reads the centre row of the texture. This test samples row 0 of a 512x512 surface, so it reads row 256's older data, but the same thing would happen to any 2D shadow map.

Could you pin y only for images that were actually rewritten from 1D (remappedDepth1D, or a 1D / 1D-array instruction dimension) and drop flatLineCompatible from that condition? agc_driver_depth_compare_copy already covers the 2D case. A 2D comparison case in your test that samples a row other than the centre would keep this from coming back.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285423092 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6285423092). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T07:07:44Z. --- Thanks for the rebase. Full CI fails one test on Linux, deterministically (the rerun fails the same way, and the test passes on main): ``` agc_driver_depth_compare_copy [gpu] storage image 0x... destroyed with GPU results pending AGC graphics: R32F 512x512: comparison sample of pending results: thread 1 compared to 0.000000, expected 1.000000 ``` The cause is the new line in `CoordF32` (`SpirvImageEmitter.cpp`): ```cpp if (access.image.depthCompare && (access.image.flatLineCompatible || access.image.remappedDepth1D || ...Dim1D || ...Dim1DArray)) { y = ConstantF32(ctx.state, 0x3f000000u); } ``` `flatLineCompatible` isn't specific to 1D images. It defaults to `true` (`Resources.hpp`), and the tracker keeps it for any 2D `image_sample` with no flags or LZ, because `lineSampleFlags` masks out the compare bit (`ResourceTracker.cpp`, `lineSampleFlags = memory.imageSampleFlags & ~RdnaImageSampleFlagCompare`). So every plain 2D depth-comparison sample now has its y replaced by 0.5 and reads the centre row of the texture. This test samples row 0 of a 512x512 surface, so it reads row 256's older data, but the same thing would happen to any 2D shadow map. Could you pin y only for images that were actually rewritten from 1D (`remappedDepth1D`, or a 1D / 1D-array instruction dimension) and drop `flatLineCompatible` from that condition? `agc_driver_depth_compare_copy` already covers the 2D case. A 2D comparison case in your test that samples a row other than the centre would keep this from coming back.
KarthikeyaAnna commented 2026-10-20 07:25:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T07:25:49Z.


Dropped flatLineCompatible from the CoordF32 condition so y is only pinned for images rewritten from 1D (remappedDepth1D or 1D/1D-array instruction dimensions) and guarded it against gradient coordinate emission.

Also added 2D depth comparison test cases (image_sample_c_lz and image_sample_c) to ImageOneDimensionalCompare.cpp sampling row 2 of a 16x16 depth surface (off-centre) to guard against any regression for 2D comparisons.

Both agc_driver_depth_compare_copy and agc_driver_image_one_dimensional_compare (along with agc_driver_image_plane_compare_on_line and agc_driver_emulated_color_compare) now pass with 0 Vulkan validation errors.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285705311 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6285705311). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T07:25:49Z. --- Dropped `flatLineCompatible` from the `CoordF32` condition so `y` is only pinned for images rewritten from 1D (`remappedDepth1D` or 1D/1D-array instruction dimensions) and guarded it against gradient coordinate emission. Also added 2D depth comparison test cases (`image_sample_c_lz` and `image_sample_c`) to `ImageOneDimensionalCompare.cpp` sampling row 2 of a 16x16 depth surface (off-centre) to guard against any regression for 2D comparisons. Both `agc_driver_depth_compare_copy` and `agc_driver_image_one_dimensional_compare` (along with `agc_driver_image_plane_compare_on_line` and `agc_driver_emulated_color_compare`) now pass with 0 Vulkan validation errors.
KarthikeyaAnna commented 2026-10-20 07:46:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T07:46:40Z.


Also completed a comprehensive edge-case audit across coordinate generation, descriptors, bindings, views, offsets, and layers, adding the following fixes:

  1. Texel Offsets for Remapped 1D Depth Images (SpirvImageEmitter.cpp): Zeroed out the vertical offset component (values[1] = ConstantI32(state, 0)) in both PackedOffset and the constant offset path in EmitSampleOp. Because 1D instruction encodings only supply an X offset, this prevents upper bits from shifting vertical sampling off row 0.
  2. 1D Gather Opcode Guard (SpirvImageEmitter.cpp): In EmitGatherOp, added access.mem.imageDimension checks alongside dimension to ensure unsupported 1D gather variants cannot bypass the 1D check due to dimension remapping.
  3. 1D-Array Depth Texture Bound to 1D Sample Instructions (ShaderResources.cpp): Allowed firstLayer for depthCompare && resource.dimension == TextureDimension::k1DArray in both direct bindings and image table lookups. This selects FirstLayerView() (layer 0) as VK_IMAGE_VIEW_TYPE_2D to match the recompiled Image2D interface.
  4. Base-Level & View Range Handling (Texture.cpp): Permitted 1D-array depth textures to prepare base-level views in prepareBaseLevelView without early-returning, and ensured viewRange is recorded in the depth copy constructor.
  5. Test Coverage (ImageOneDimensionalCompare.cpp): Added test cases for sampling layer 0 of a 1D-array depth comparison texture using 1D comparison samplers (image_sample_c_lz and image_sample_c).

All tests pass cleanly with Vulkan validation enabled (0 VUID errors).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286047158 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6286047158). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T07:46:40Z. --- Also completed a comprehensive edge-case audit across coordinate generation, descriptors, bindings, views, offsets, and layers, adding the following fixes: 1. **Texel Offsets for Remapped 1D Depth Images (`SpirvImageEmitter.cpp`)**: Zeroed out the vertical offset component (`values[1] = ConstantI32(state, 0)`) in both `PackedOffset` and the constant offset path in `EmitSampleOp`. Because 1D instruction encodings only supply an X offset, this prevents upper bits from shifting vertical sampling off row 0. 2. **1D Gather Opcode Guard (`SpirvImageEmitter.cpp`)**: In `EmitGatherOp`, added `access.mem.imageDimension` checks alongside `dimension` to ensure unsupported 1D gather variants cannot bypass the 1D check due to dimension remapping. 3. **1D-Array Depth Texture Bound to 1D Sample Instructions (`ShaderResources.cpp`)**: Allowed `firstLayer` for `depthCompare && resource.dimension == TextureDimension::k1DArray` in both direct bindings and image table lookups. This selects `FirstLayerView()` (layer 0) as `VK_IMAGE_VIEW_TYPE_2D` to match the recompiled `Image2D` interface. 4. **Base-Level & View Range Handling (`Texture.cpp`)**: Permitted 1D-array depth textures to prepare base-level views in `prepareBaseLevelView` without early-returning, and ensured `viewRange` is recorded in the depth copy constructor. 5. **Test Coverage (`ImageOneDimensionalCompare.cpp`)**: Added test cases for sampling layer 0 of a 1D-array depth comparison texture using 1D comparison samplers (`image_sample_c_lz` and `image_sample_c`). All tests pass cleanly with Vulkan validation enabled (0 VUID errors).
oneandonlydean commented 2026-10-20 08:03:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T08:03:27Z.


Thanks, the shadow-compare fix in f010833a69 works. agc_driver_depth_compare_copy and agc_driver_image_one_dimensional_compare, including the new 2D cases, pass locally on an RTX 4090 and on llvmpipe (Mesa 25.2.8, as on Linux CI). With flatLineCompatible put back into the CoordF32 condition, the new 2D case fails, so it guards the bug.

One of the new edge-case changes breaks an existing test, though. With the extra condition in EmitGatherOp:

if (dimension == RdnaImageDimension::Dim1D || dimension == RdnaImageDimension::Dim1DArray || access.mem.imageDimension == RdnaImageDimension::Dim1D || access.mem.imageDimension == RdnaImageDimension::Dim1DArray) {

agc_driver_image_gather_one_dimensional fails SPIR-V validation on both devices:

ShaderRecompiler::Recompile: SPIR-V validation before optimization failed:
level=2 word=673: Result Type has 1 components, but 2 expected
  %574 = OpImageQuerySizeLod %uint %573 %uint_0

It passes on main and on your earlier heads. It also passes on f010833a69 with only that condition reverted (both devices, and agc_driver_image_gather_one_dimensional_array passes on both arms). The guest instruction dimension is 1D there while the image the shader binds is 2D, so the 1D branch queries a 2D image as 1D.

If the goal is to apply the 1D gather rules to depth images you now back with 2D images, keying it on the remap instead should keep the existing case working:

if (dimension == RdnaImageDimension::Dim1D || dimension == RdnaImageDimension::Dim1DArray || access.image.remappedDepth1D) {

That leaves every non-remapped gather exactly as on main. If that branch can't handle a remapped image's 2D query either, refusing the remapped 1D gather explicitly (as the dref case already does) would be the safe option. A test for a remapped 1D depth gather would show which.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286361013 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6286361013). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T08:03:27Z. --- Thanks, the shadow-compare fix in f010833a69 works. `agc_driver_depth_compare_copy` and `agc_driver_image_one_dimensional_compare`, including the new 2D cases, pass locally on an RTX 4090 and on llvmpipe (Mesa 25.2.8, as on Linux CI). With `flatLineCompatible` put back into the `CoordF32` condition, the new 2D case fails, so it guards the bug. One of the new edge-case changes breaks an existing test, though. With the extra condition in `EmitGatherOp`: ```cpp if (dimension == RdnaImageDimension::Dim1D || dimension == RdnaImageDimension::Dim1DArray || access.mem.imageDimension == RdnaImageDimension::Dim1D || access.mem.imageDimension == RdnaImageDimension::Dim1DArray) { ``` `agc_driver_image_gather_one_dimensional` fails SPIR-V validation on both devices: ``` ShaderRecompiler::Recompile: SPIR-V validation before optimization failed: level=2 word=673: Result Type has 1 components, but 2 expected %574 = OpImageQuerySizeLod %uint %573 %uint_0 ``` It passes on main and on your earlier heads. It also passes on f010833a69 with only that condition reverted (both devices, and `agc_driver_image_gather_one_dimensional_array` passes on both arms). The guest instruction dimension is 1D there while the image the shader binds is 2D, so the 1D branch queries a 2D image as 1D. If the goal is to apply the 1D gather rules to depth images you now back with 2D images, keying it on the remap instead should keep the existing case working: ```cpp if (dimension == RdnaImageDimension::Dim1D || dimension == RdnaImageDimension::Dim1DArray || access.image.remappedDepth1D) { ``` That leaves every non-remapped gather exactly as on main. If that branch can't handle a remapped image's 2D query either, refusing the remapped 1D gather explicitly (as the dref case already does) would be the safe option. A test for a remapped 1D depth gather would show which.
KarthikeyaAnna commented 2026-10-20 08:20:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T08:20:36Z.


Follow-up audit on edge cases:

  1. Texel Offsets (image_sample_c_lz_o):
    Added execution tests for 1D and 1D-array comparison samples with texel offsets (image_sample_c_lz_o), including cases with non-zero Y offset values in the RDNA instruction dwords. Verified that the recompiler correctly zeroes the vertical offset for 2D height-1 sampling while preserving horizontal offsets.

  2. Explicit LOD (image_sample_c_l):
    Added execution test coverage for 1D depth comparison sampling with explicit LOD (image_sample_c_l), confirming correct compilation and sampling at LOD 0.

  3. Storage View Sub-ranges (ArrayLayersServeView):
    Updated ArrayLayersServeView to support 1D array textures serving 1D (first slice) and smaller 1D array views, matching 2D array behavior.

  4. Depth Copy Base-Level Views:
    Ensured prepareBaseLevelView is invoked for depth-copy texture instances in Texture(DepthCopyTag) to prepare single-level views when mipmapped.

All focused tests (agc_driver_image_one_dimensional_compare, agc_driver_depth_compare_copy, agc_driver_emulated_color_compare, agc_driver_image_plane_compare_on_line, agc_shader_disk_cache) pass with Vulkan validation layers enabled and 0 VUID errors. Conventions and PR overlap checks pass cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286665860 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6286665860). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T08:20:36Z. --- Follow-up audit on edge cases: 1. **Texel Offsets (`image_sample_c_lz_o`)**: Added execution tests for 1D and 1D-array comparison samples with texel offsets (`image_sample_c_lz_o`), including cases with non-zero Y offset values in the RDNA instruction dwords. Verified that the recompiler correctly zeroes the vertical offset for 2D height-1 sampling while preserving horizontal offsets. 2. **Explicit LOD (`image_sample_c_l`)**: Added execution test coverage for 1D depth comparison sampling with explicit LOD (`image_sample_c_l`), confirming correct compilation and sampling at LOD 0. 3. **Storage View Sub-ranges (`ArrayLayersServeView`)**: Updated `ArrayLayersServeView` to support 1D array textures serving 1D (first slice) and smaller 1D array views, matching 2D array behavior. 4. **Depth Copy Base-Level Views**: Ensured `prepareBaseLevelView` is invoked for depth-copy texture instances in `Texture(DepthCopyTag)` to prepare single-level views when mipmapped. All focused tests (`agc_driver_image_one_dimensional_compare`, `agc_driver_depth_compare_copy`, `agc_driver_emulated_color_compare`, `agc_driver_image_plane_compare_on_line`, `agc_shader_disk_cache`) pass with Vulkan validation layers enabled and 0 VUID errors. Conventions and PR overlap checks pass cleanly.
oneandonlydean commented 2026-10-20 08:39:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T08:39:46Z.


Thanks for the extra cases; the new image_sample_c_lz_o and image_sample_c_l checks pass locally on an RTX 4090 and on llvmpipe (Mesa 25.2.8).

The gather condition from the earlier comment is still in this head, though, at SpirvImageEmitter.cpp:1206:

if (dimension == RdnaImageDimension::Dim1D || dimension == RdnaImageDimension::Dim1DArray || access.mem.imageDimension == RdnaImageDimension::Dim1D || access.mem.imageDimension == RdnaImageDimension::Dim1DArray) {

agc_driver_image_gather_one_dimensional still fails SPIR-V validation on bdacbe03ba on both devices (OpImageQuerySizeLod: "Result Type has 1 components, but 2 expected"), and passes with only that condition put back to main's form (the other gather, compare and depth-copy tests pass either way). It's not in the focused test list you ran, so it's easy to miss. Could you key it on access.image.remappedDepth1D as suggested, or drop it?

One question on the new ArrayLayersServeView change: letting 1D-array surfaces serve 1D and smaller 1D-array views applies to every 1D-array texture, colour ones included, not only the depth images this PR remaps. If it's needed for this fix, could you say which case needs it and add cases for it next to the 2D-array ones in tests/GuestTextureResource.cpp? Otherwise it would be easier to review as its own PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6286988148 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6286988148). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T08:39:46Z. --- Thanks for the extra cases; the new `image_sample_c_lz_o` and `image_sample_c_l` checks pass locally on an RTX 4090 and on llvmpipe (Mesa 25.2.8). The gather condition from the earlier comment is still in this head, though, at `SpirvImageEmitter.cpp:1206`: ```cpp if (dimension == RdnaImageDimension::Dim1D || dimension == RdnaImageDimension::Dim1DArray || access.mem.imageDimension == RdnaImageDimension::Dim1D || access.mem.imageDimension == RdnaImageDimension::Dim1DArray) { ``` `agc_driver_image_gather_one_dimensional` still fails SPIR-V validation on bdacbe03ba on both devices (`OpImageQuerySizeLod`: "Result Type has 1 components, but 2 expected"), and passes with only that condition put back to main's form (the other gather, compare and depth-copy tests pass either way). It's not in the focused test list you ran, so it's easy to miss. Could you key it on `access.image.remappedDepth1D` as suggested, or drop it? One question on the new `ArrayLayersServeView` change: letting 1D-array surfaces serve 1D and smaller 1D-array views applies to every 1D-array texture, colour ones included, not only the depth images this PR remaps. If it's needed for this fix, could you say which case needs it and add cases for it next to the 2D-array ones in `tests/GuestTextureResource.cpp`? Otherwise it would be easier to review as its own PR.
KarthikeyaAnna commented 2026-10-20 08:53:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T08:53:25Z.


Keyed the 1D gather condition strictly on access.image.remappedDepth1D in SpirvImageEmitter.cpp and explicitly refuse remapped 1D depth gathers (ctx.Fail(access.inst, "has an unsupported 1D gather variant")). Non-remapped gathers are left untouched, and agc_driver_image_gather_one_dimensional and agc_driver_image_gather_one_dimensional_array compile and pass without SPIR-V validation errors.

Also added tests in ImageOneDimensionalCompare.cpp (Code1D_Gather_C_Lz and Code1DArray_Gather_C_Lz) verifying that 1D and 1D-array depth gathers are cleanly rejected with "has an unsupported 1D gather variant".

Dropped the ArrayLayersServeView change from GuestTextureResource.cpp so it can be reviewed independently in a separate PR, keeping this PR strictly focused on 1D depth comparison textures.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287239680 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6287239680). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T08:53:25Z. --- Keyed the 1D gather condition strictly on `access.image.remappedDepth1D` in `SpirvImageEmitter.cpp` and explicitly refuse remapped 1D depth gathers (`ctx.Fail(access.inst, "has an unsupported 1D gather variant")`). Non-remapped gathers are left untouched, and `agc_driver_image_gather_one_dimensional` and `agc_driver_image_gather_one_dimensional_array` compile and pass without SPIR-V validation errors. Also added tests in `ImageOneDimensionalCompare.cpp` (`Code1D_Gather_C_Lz` and `Code1DArray_Gather_C_Lz`) verifying that 1D and 1D-array depth gathers are cleanly rejected with `"has an unsupported 1D gather variant"`. Dropped the `ArrayLayersServeView` change from `GuestTextureResource.cpp` so it can be reviewed independently in a separate PR, keeping this PR strictly focused on 1D depth comparison textures.
thuanquang commented 2026-10-20 09:12:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-20T09:12:56Z.


A first AMD run, on a discrete RDNA 2 card: RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, MinGW GCC Release. It compares main e9a5a0c84 plus only this PR's new ImageOneDimensionalCompare.cpp with main merged with this head, c97e5e033 (the merge is clean).

There are 17 tests:

  • the new agc_driver_image_one_dimensional_compare
  • agc_driver_image_gather_one_dimensional and _array, and agc_driver_image_one_dimensional_array
  • agc_driver_depth_compare_copy
  • agc_driver_emulated_color_compare and _srgb_decode
  • agc_driver_image_plane_compare_on_line, and agc_driver_image_plane_address_on_line with _implicit_lod
  • agc_driver_image_address_dimension, agc_driver_image_sample_derivatives and agc_driver_image_sample_lod_clamp
  • agc_driver_depth_plane_sampling, agc_driver_native_multisample_depth and agc_driver_image_array_sample_on_volume
  • agc_shader_disk_cache
main + new test this PR
--repeat until-fail:3 16/17: agc_driver_image_one_dimensional_compare fails 17/17, all 3 rounds
Khronos validation layer, -V the same single failure, 0 VUID- lines 17/17, 0 VUID- lines

The layer loaded in all 17 test processes on both sides. VK_LOADER_DEBUG=layer printed Insert instance layer "VK_LAYER_KHRONOS_validation" 17 times per side, and no "was not found but was requested" line appeared.

This driver is unlike RADV: on main it creates the test's 1D D16_UNORM image with no validation error, and the four 1D and three 1D-array comparison cases pass. main fails at the next case, 1D image_sample_c_lz on 1D array first layer, with:

AGC graphics: guest texture dimension disagrees with the shader's declared image shape (shape 0, dimension 5)

Shape 0 is Image1D and dimension 5 is k1DArray. So on AMD's Windows driver, the failure on main is the 1D read of a 1D-array T#'s first layer, which this PR's firstLayer change in ShaderResources.cpp accepts. It is not the creation of the 1D depth image.

Not tested: RADV, the driver that rejects 1D depth images, and the full CTest suite.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6287581975 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6287581975). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-20T09:12:56Z. --- A first AMD run, on a discrete RDNA 2 card: RX 6700 XT (gfx1031), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, MinGW GCC Release. It compares `main` `e9a5a0c84` plus only this PR's new `ImageOneDimensionalCompare.cpp` with `main` merged with this head, `c97e5e033` (the merge is clean). There are 17 tests: - the new `agc_driver_image_one_dimensional_compare` - `agc_driver_image_gather_one_dimensional` and `_array`, and `agc_driver_image_one_dimensional_array` - `agc_driver_depth_compare_copy` - `agc_driver_emulated_color_compare` and `_srgb_decode` - `agc_driver_image_plane_compare_on_line`, and `agc_driver_image_plane_address_on_line` with `_implicit_lod` - `agc_driver_image_address_dimension`, `agc_driver_image_sample_derivatives` and `agc_driver_image_sample_lod_clamp` - `agc_driver_depth_plane_sampling`, `agc_driver_native_multisample_depth` and `agc_driver_image_array_sample_on_volume` - `agc_shader_disk_cache` | | `main` + new test | this PR | |---|---|---| | `--repeat until-fail:3` | 16/17: `agc_driver_image_one_dimensional_compare` fails | 17/17, all 3 rounds | | Khronos validation layer, `-V` | the same single failure, 0 `VUID-` lines | 17/17, 0 `VUID-` lines | The layer loaded in all 17 test processes on both sides. `VK_LOADER_DEBUG=layer` printed `Insert instance layer "VK_LAYER_KHRONOS_validation"` 17 times per side, and no "was not found but was requested" line appeared. This driver is unlike RADV: on `main` it creates the test's 1D D16_UNORM image with no validation error, and the four 1D and three 1D-array comparison cases pass. `main` fails at the next case, `1D image_sample_c_lz on 1D array first layer`, with: ``` AGC graphics: guest texture dimension disagrees with the shader's declared image shape (shape 0, dimension 5) ``` Shape 0 is `Image1D` and dimension 5 is `k1DArray`. So on AMD's Windows driver, the failure on `main` is the 1D read of a 1D-array T#'s first layer, which this PR's `firstLayer` change in `ShaderResources.cpp` accepts. It is not the creation of the 1D depth image. Not tested: RADV, the driver that rejects 1D depth images, and the full CTest suite.
KarthikeyaAnna commented 2026-10-20 13:59:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by KarthikeyaAnna on 2026-10-20T13:59:39Z.


@oneandonlydean what do you think?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292626725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6292626725). Originally posted by [KarthikeyaAnna](https://github.com/KarthikeyaAnna) on 2026-10-20T13:59:39Z. --- @oneandonlydean what do you think?
oneandonlydean commented 2026-10-20 14:24:07 +00:00 (Migrated from github.com)

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


Thanks. Nothing is needed from you right now. Full CI is green on c97e5e033 (Linux and Windows), and the AMD results above line up with that. Because this changes how depth comparison textures are backed, it also gets a GPU test run against main on real titles. That run is queued behind the current test queue, and a final review follows it. If the run turns up a problem, we'll post the details here.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293138203 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6293138203). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T14:24:07Z. --- Thanks. Nothing is needed from you right now. Full CI is green on `c97e5e033` (Linux and Windows), and the AMD results above line up with that. Because this changes how depth comparison textures are backed, it also gets a GPU test run against main on real titles. That run is queued behind the current test queue, and a final review follows it. If the run turns up a problem, we'll post the details here.
DavidAmsellem commented 2026-10-20 20:59:33 +00:00 (Migrated from github.com)

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


RADV run, the driver #7923 was reported on. Head c97e5e033 merged onto main c6145997e (clean merge), built in full and compared with the same main, on the same machine.

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.

With the Khronos validation layer (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1) over agc_driver_image_one_dimensional_compare, agc_driver_image_plane_compare_on_line, agc_driver_depth_compare_copy, agc_driver_image_gather_one_dimensional, agc_driver_image_gather_one_dimensional_array and agc_shader_disk_cache:

main main + this PR
VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251 (the 1D D16_UNORM image from #7923) 1 0
tests passing 5 of 5 (the new test isn't on main) 6 of 6

So on RADV the 1D depth comparison texture is no longer created as an image the device rejects. The only other message is VkDeviceCreateInfo-pNext-pNext, which my older 1.3.275 layer prints for every device because it doesn't know maintenance8.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8) at d13e1a29a: 1736/1737 with this PR, against 1735/1736 on main. The one failure is the same on both, so this PR adds none: agc_driver_guest_memory_lifetime (#7784). Comparing the JUnit output with main, the only difference is the new agc_driver_image_one_dimensional_compare, which runs and passes; nothing is skipped or removed.

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:6301360505 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6301360505). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-20T20:59:33Z. --- RADV run, the driver #7923 was reported on. Head `c97e5e033` merged onto `main` `c6145997e` (clean merge), built in full and compared with the same `main`, on the same machine. 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. With the Khronos validation layer (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`) over `agc_driver_image_one_dimensional_compare`, `agc_driver_image_plane_compare_on_line`, `agc_driver_depth_compare_copy`, `agc_driver_image_gather_one_dimensional`, `agc_driver_image_gather_one_dimensional_array` and `agc_shader_disk_cache`: | | `main` | `main` + this PR | |---|---|---| | `VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251` (the 1D `D16_UNORM` image from #7923) | 1 | **0** | | tests passing | 5 of 5 (the new test isn't on `main`) | 6 of 6 | So on RADV the 1D depth comparison texture is no longer created as an image the device rejects. The only other message is `VkDeviceCreateInfo-pNext-pNext`, which my older 1.3.275 layer prints for every device because it doesn't know `maintenance8`. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`) at `d13e1a29a`: **1736/1737 with this PR**, against 1735/1736 on `main`. The one failure is the same on both, so this PR adds none: `agc_driver_guest_memory_lifetime` (#7784). Comparing the JUnit output with `main`, the only difference is the new `agc_driver_image_one_dimensional_compare`, which runs and passes; nothing is skipped or removed. 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
janzezno commented 2026-10-20 23:04:26 +00:00 (Migrated from github.com)

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


Run on RADV, where #7923 reproduces.

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 c97e5e0338 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; agc_driver_image_plane_compare_on_line logs VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251 (D16_UNORM, VK_IMAGE_TYPE_1D, VK_ERROR_FORMAT_NOT_SUPPORTED).
  • PR: 138 of 138 pass, including the new agc_driver_image_one_dimensional_compare; the 02251 errors are gone and no VUID- is new.
  • The validation layer loaded in both runs (no was not found but was requested).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6303753041 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7966#issuecomment-6303753041). Originally posted by [janzezno](https://github.com/janzezno) on 2026-10-20T23:04:26Z. --- Run on RADV, where #7923 reproduces. 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 `c97e5e0338` 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; `agc_driver_image_plane_compare_on_line` logs `VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251` (`D16_UNORM`, `VK_IMAGE_TYPE_1D`, `VK_ERROR_FORMAT_NOT_SUPPORTED`). - PR: 138 of 138 pass, including the new `agc_driver_image_one_dimensional_compare`; the `02251` errors are gone and no `VUID-` is new. - The validation layer loaded in both runs (no `was not found but was requested`).
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!7966
No description provided.