test(agc): skip packed float blend and sparse levels without the features they need #16984

Merged
peacocksir merged 1 commit from upstream-pr/16984 into main 2026-11-12 23:17:16 +00:00
peacocksir commented 2026-11-08 04:06:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by peacocksir on 2026-11-08T04:06:19Z.


What

agc_driver_packed_float_blend and agc_driver_texture_sparse_levels failed instead of skipping on a device without shaderStorageImageReadWithoutFormat or shaderResourceMinLod (#16968, Intel UHD 770). The 11_11_10 float blend reads its color target in the pixel shader without a format, and the sparse levels test samples with a LOD clamp, so the recompiler refuses their shaders on such a device (SpirvDescriptors.cpp:241, SpirvImageEmitter.cpp:1856). The refusals are right; the tests just didn't check for the features first.

Now:

  • PackedFloatBlend.cpp returns VulkanTestSkipped when the device target lacks CapabilityStorageImageReadWithoutFormat, in main and in the --benchmark-overdraw path, after the existing pixel interlock check.
  • TextureSparseLevels.cpp returns VulkanTestSkipped when the target lacks CapabilityMinLod, after the existing BC / VK_EXT_image_view_min_lod check. VK_EXT_image_view_min_lod alone isn't enough: the device in #16968 passes that check and is then refused because the sampling shader clamps its LOD.

The checks and messages are the ones UnclampedNormalizedBlend.cpp, PackedUnorm4444PartialWrite.cpp and ImageSampleLodClamp.cpp already use. On a device that skips, the parts of these two tests that don't need the feature (the packed-format assertions, the sparse cleared-texture check) no longer run either; CheckPlans() in the sparse test still runs before the device is opened.

Tested

Head 3c6c68bf5b on main 13b19a1dca. The Windows runs used the same commit on the earlier base 3aa0ac20df (62ecb3da30); neither test file, VulkanTestDevice.hpp, the two recompiler refusals nor VulkanDevice.cpp changed between the two bases. Both sides of every run used ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer and ctest --test-dir build -R '^agc_driver_(packed_float_blend|texture_sparse_levels)$' -V. Every log shows the loader inserting VK_LAYER_KHRONOS_validation, none contains was not found but was requested by env var VK_INSTANCE_LAYERS, and none contains VUID-.

Windows 10 22H2 (19045.6466), WinLibs GCC 15.2.0 r7 UCRT, Release, Vulkan SDK 1.4.363.1 validation layer, implicit layers disabled (VK_LOADER_LAYERS_DISABLE=~implicit~). One PC with both GPUs, selected with ANYPS5_GPU, 3 runs per GPU and side:

GPU main branch
Intel UHD Graphics 770 (8086:4680), driver 101.7088, no shaderStorageImageReadWithoutFormat / shaderResourceMinLod both fail, 3/3: storage image reads without a format are unavailable on the target device and opcode=ImageSampleRaw reason=clamps its LOD, which needs the device's shaderResourceMinLod both skip, 3/3: skipped, the device lacks shaderStorageImageReadWithoutFormat and skipped, the device has no shaderResourceMinLod
NVIDIA GeForce RTX 4060 (10de:2882), driver 610.74 both pass, 3/3 (11_11_10 float blend tests passed: ..., sparse texture levels tests passed) both pass, 3/3, same output

The Intel GPU and driver are the ones in #16968.

Ubuntu 24.04, GCC 13.3.0, Release, lavapipe (Mesa 25.2.8, LLVM 20.1.2), Khronos validation layer 1.4.335 built from source. main 13b19a1dca and 3c6c68bf5b identical (also at 3aa0ac20df / 62ecb3da30): packed_float_blend passes, texture_sparse_levels skips (the device has no BC texture compression or VK_EXT_image_view_min_lod, as on main), 2/2.

agc_driver_packed_float_blend_tests.exe --benchmark-overdraw (not a ctest test) on the Intel UHD 770, same PC and environment, with ctest's PATH and WORKING_DIRECTORY: main exits 1 with SPIR-V module emission failed: storage image reads without a format are unavailable on the target device; the branch exits 77 with skipped, the device lacks shaderStorageImageReadWithoutFormat. Not run on the RTX 4060.

python3 tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py couldn't compare only #9748, which conflicts with main and also carries PackedFloatBlend.cpp; its copy of that file is byte-identical to main's (it includes #9020's commit), so it doesn't touch these lines. #9335 also lists the file for the same reason, and its copy at 65ad383ca0 is identical to main's too.

Not tested: macOS / MoltenVK, AMD, Linux on a hardware GPU. No full ctest run; only these two tests are affected.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: Fixes #16968
  • Unblocks: none
  • GPUs tested: Intel UHD Graphics 770, driver 101.7088, Windows 10 22H2; NVIDIA GeForce RTX 4060, driver 610.74, Windows 10 22H2; lavapipe (Mesa 25.2.8), Ubuntu 24.04
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5208517313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16984). Originally posted by [peacocksir](https://github.com/peacocksir) on 2026-11-08T04:06:19Z. --- ### What `agc_driver_packed_float_blend` and `agc_driver_texture_sparse_levels` failed instead of skipping on a device without `shaderStorageImageReadWithoutFormat` or `shaderResourceMinLod` (#16968, Intel UHD 770). The 11_11_10 float blend reads its color target in the pixel shader without a format, and the sparse levels test samples with a LOD clamp, so the recompiler refuses their shaders on such a device (`SpirvDescriptors.cpp:241`, `SpirvImageEmitter.cpp:1856`). The refusals are right; the tests just didn't check for the features first. Now: - `PackedFloatBlend.cpp` returns `VulkanTestSkipped` when the device target lacks `CapabilityStorageImageReadWithoutFormat`, in `main` and in the `--benchmark-overdraw` path, after the existing pixel interlock check. - `TextureSparseLevels.cpp` returns `VulkanTestSkipped` when the target lacks `CapabilityMinLod`, after the existing BC / `VK_EXT_image_view_min_lod` check. `VK_EXT_image_view_min_lod` alone isn't enough: the device in #16968 passes that check and is then refused because the sampling shader clamps its LOD. The checks and messages are the ones `UnclampedNormalizedBlend.cpp`, `PackedUnorm4444PartialWrite.cpp` and `ImageSampleLodClamp.cpp` already use. On a device that skips, the parts of these two tests that don't need the feature (the packed-format assertions, the sparse cleared-texture check) no longer run either; `CheckPlans()` in the sparse test still runs before the device is opened. ### Tested Head 3c6c68bf5b on `main` 13b19a1dca. The Windows runs used the same commit on the earlier base 3aa0ac20df (62ecb3da30); neither test file, `VulkanTestDevice.hpp`, the two recompiler refusals nor `VulkanDevice.cpp` changed between the two bases. Both sides of every run used `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer` and `ctest --test-dir build -R '^agc_driver_(packed_float_blend|texture_sparse_levels)$' -V`. Every log shows the loader inserting `VK_LAYER_KHRONOS_validation`, none contains `was not found but was requested by env var VK_INSTANCE_LAYERS`, and none contains `VUID-`. **Windows 10 22H2 (19045.6466), WinLibs GCC 15.2.0 r7 UCRT, Release, Vulkan SDK 1.4.363.1 validation layer, implicit layers disabled (`VK_LOADER_LAYERS_DISABLE=~implicit~`).** One PC with both GPUs, selected with `ANYPS5_GPU`, 3 runs per GPU and side: | GPU | `main` | branch | |---|---|---| | Intel UHD Graphics 770 (8086:4680), driver 101.7088, no `shaderStorageImageReadWithoutFormat` / `shaderResourceMinLod` | both fail, 3/3: `storage image reads without a format are unavailable on the target device` and `opcode=ImageSampleRaw reason=clamps its LOD, which needs the device's shaderResourceMinLod` | both skip, 3/3: `skipped, the device lacks shaderStorageImageReadWithoutFormat` and `skipped, the device has no shaderResourceMinLod` | | NVIDIA GeForce RTX 4060 (10de:2882), driver 610.74 | both pass, 3/3 (`11_11_10 float blend tests passed: ...`, `sparse texture levels tests passed`) | both pass, 3/3, same output | The Intel GPU and driver are the ones in #16968. **Ubuntu 24.04, GCC 13.3.0, Release, lavapipe (Mesa 25.2.8, LLVM 20.1.2), Khronos validation layer 1.4.335 built from source.** `main` 13b19a1dca and 3c6c68bf5b identical (also at 3aa0ac20df / 62ecb3da30): `packed_float_blend` passes, `texture_sparse_levels` skips (`the device has no BC texture compression or VK_EXT_image_view_min_lod`, as on `main`), 2/2. `agc_driver_packed_float_blend_tests.exe --benchmark-overdraw` (not a ctest test) on the Intel UHD 770, same PC and environment, with ctest's `PATH` and `WORKING_DIRECTORY`: `main` exits 1 with `SPIR-V module emission failed: storage image reads without a format are unavailable on the target device`; the branch exits 77 with `skipped, the device lacks shaderStorageImageReadWithoutFormat`. Not run on the RTX 4060. `python3 tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` couldn't compare only #9748, which conflicts with `main` and also carries `PackedFloatBlend.cpp`; its copy of that file is byte-identical to `main`'s (it includes #9020's commit), so it doesn't touch these lines. #9335 also lists the file for the same reason, and its copy at 65ad383ca0 is identical to `main`'s too. Not tested: macOS / MoltenVK, AMD, Linux on a hardware GPU. No full `ctest` run; only these two tests are affected. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: Fixes #16968 - [x] Unblocks: none - [x] GPUs tested: Intel UHD Graphics 770, driver 101.7088, Windows 10 22H2; NVIDIA GeForce RTX 4060, driver 610.74, Windows 10 22H2; lavapipe (Mesa 25.2.8), Ubuntu 24.04 - [x] AI-assisted: yes
mashingaan commented 2026-11-08 08:57:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mashingaan on 2026-11-08T08:57:09Z.

Review: APPROVED


The two capability checks match the Vulkan features the tests need (shaderStorageImageReadWithoutFormat and shaderResourceMinLod), and TargetHasCapability reads the target's supported SPIR-V capabilities. No findings.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5817276962 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16984#pullrequestreview-5817276962). Originally posted by [mashingaan](https://github.com/mashingaan) on 2026-11-08T08:57:09Z. **Review:** APPROVED --- The two capability checks match the Vulkan features the tests need (shaderStorageImageReadWithoutFormat and shaderResourceMinLod), and TargetHasCapability reads the target's supported SPIR-V capabilities. No findings.
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!16984
No description provided.