test(agc): skip plane-bias reduction cases without min/max sampler reduction #9125

Merged
ryanc2112 merged 1 commit from upstream-pr/9125 into main 2026-11-01 02:12:54 +00:00
ryanc2112 commented 2026-10-21 12:41:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ryanc2112 on 2026-10-21T12:41:52Z.


What

agc_driver_image_plane_bias_on_single_level_volume draws its min and max sampler-reduction cases on every device. On a device without samplerFilterMinmax the driver refuses them, so the test fails instead of skipping those cases:

AGC graphics: guest sampler descriptor uses a min or max reduction which the device does not support

This gates the two reduction cases on VulkanDevice::SamplerFilterMinmax(), the check agc_driver_image_sample_reduction already uses, and prints that they were skipped. The bias, FORCE_DEGAMMA and refusal cases still run on every device. Test-only; no driver or recompiler change.

Tested

SteamOS 3.8.28 (Arch distrobox), GCC 16.2.1, Release, main 2f161d4f3, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (the loader inserts the layer), ctest -R '^agc_driver_image_plane_bias_on_single_level_volume$' -V:

  • main: Failed, with the refusal above.
  • This PR: Passed, printing the device has no min/max sampler reduction with component mapping: the reduction cases are skipped.
  • No VUID- lines in either log.

Devices with samplerFilterMinmax (lavapipe in CI included) take the unchanged branch.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 570 (RADV POLARIS10), Mesa 26.2.5, SteamOS 3.8.28 (Linux 6.18)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4951715778 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9125). Originally posted by [ryanc2112](https://github.com/ryanc2112) on 2026-10-21T12:41:52Z. --- ### What `agc_driver_image_plane_bias_on_single_level_volume` draws its min and max sampler-reduction cases on every device. On a device without `samplerFilterMinmax` the driver refuses them, so the test fails instead of skipping those cases: ``` AGC graphics: guest sampler descriptor uses a min or max reduction which the device does not support ``` This gates the two reduction cases on `VulkanDevice::SamplerFilterMinmax()`, the check `agc_driver_image_sample_reduction` already uses, and prints that they were skipped. The bias, FORCE_DEGAMMA and refusal cases still run on every device. Test-only; no driver or recompiler change. ### Tested SteamOS 3.8.28 (Arch distrobox), GCC 16.2.1, Release, `main` 2f161d4f3, with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (the loader inserts the layer), `ctest -R '^agc_driver_image_plane_bias_on_single_level_volume$' -V`: - `main`: Failed, with the refusal above. - This PR: Passed, printing `the device has no min/max sampler reduction with component mapping: the reduction cases are skipped`. - No `VUID-` lines in either log. Devices with `samplerFilterMinmax` (lavapipe in CI included) take the unchanged branch. ### 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: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 570 (RADV POLARIS10), Mesa 26.2.5, SteamOS 3.8.28 (Linux 6.18) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jotitadev commented 2026-10-21 22:45:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-21T22:45:34Z.

Review: COMMENTED


This gate matches a real device on Apple silicon: MoltenVK does not expose min/max sampler reduction, so the reduction cases are the reason agc_driver_image_plane_bias_on_single_level_volume fails there without this PR.

Machine: Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704. Release, BUILD_TESTING=ON.

Base/method: PR #8658 feat/macos-port @ 4ebe71f2e5 (current main 0c6a5bd593 + the macOS port), not main. This PR applied on top, clean.

Without this PR (base): the test fails on both drivers with the exact message this change guards against:

AGC graphics: guest sampler descriptor uses a min or max reduction which the device does not support

With this PR: agc_driver_image_plane_bias_on_single_level_volume passes 3/3 (--repeat until-fail:3) on both drivers; the reduction cases are skipped and the rest of the test runs:

the device has no min/max sampler reduction with component mapping: the reduction cases are skipped

So on a device without samplerFilterMinmax + component mapping the test now exercises the non-reduction path and passes, instead of aborting on the first reduction draw. device->SamplerFilterMinmax() is the right gate here.

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

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

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5607143728 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9125#pullrequestreview-5607143728). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-21T22:45:34Z. **Review:** COMMENTED --- This gate matches a real device on Apple silicon: MoltenVK does not expose min/max sampler reduction, so the reduction cases are the reason `agc_driver_image_plane_bias_on_single_level_volume` fails there without this PR. **Machine:** Apple M2 Max, macOS 27.2, x86_64 under Rosetta 2. MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), and MoltenVK main + SPIRV-Cross #2704. Release, `BUILD_TESTING=ON`. **Base/method:** PR #8658 `feat/macos-port` @ `4ebe71f2e5` (current `main` `0c6a5bd593` + the macOS port), not `main`. This PR applied on top, clean. **Without this PR (base):** the test fails on both drivers with the exact message this change guards against: ``` AGC graphics: guest sampler descriptor uses a min or max reduction which the device does not support ``` **With this PR:** `agc_driver_image_plane_bias_on_single_level_volume` passes 3/3 (`--repeat until-fail:3`) on both drivers; the reduction cases are skipped and the rest of the test runs: ``` the device has no min/max sampler reduction with component mapping: the reduction cases are skipped ``` So on a device without `samplerFilterMinmax` + component mapping the test now exercises the non-reduction path and passes, instead of aborting on the first reduction draw. `device->SamplerFilterMinmax()` is the right gate here. GPUs tested: Apple M2 Max (MoltenVK 1.4.2; and MoltenVK main + SPIRV-Cross #2704). Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!9125
No description provided.