test(agc): skip the plane offset on line test without VK_KHR_maintenance8 #28744

Open
GiannisG1 wants to merge 1 commit from upstream-pr/28744 into main
GiannisG1 commented 2026-12-03 09:02:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-12-03T09:02:22Z.


What

agc_driver_image_plane_offset_on_line (from #23701) fails on a device without VK_KHR_maintenance8:

ShaderRecompiler::Recompile: DescriptorBindingBuilder::Populate normalized guest sampler is used with a texel offset that is not a constant, which image sampling takes only with VK_KHR_maintenance8 and shaderImageGatherExtended

Its shader samples a 1D texture with image_sample_lz_o and image_sample_l_o and a different texel offset in each thread through a normalized sampler. The recompiler accepts that only with VK_KHR_maintenance8 (Target().nonConstantImageOffsets). The test now skips on such a device with skipped, the device lacks VK_KHR_maintenance8, …, as ImageSampleDerivatives.cpp already does for its _o cases. The image_load_mip checks share the same shader, so they are skipped there too. On a device with VK_KHR_maintenance8 nothing changes.

The Linux CI job's llvmpipe has VK_KHR_maintenance8, so it never takes this path. Mesa 25.2.8's ANV (Ubuntu 24.04) on an Intel HD Graphics 630 does not have it, and the test fails there on main.

Tested

Linux Mint 22.3, kernel 7.0.0, main cde48b5800 with this change.

  • RED on main's binary: the test fails 3/3 on the HD 630 with the message above.
  • With the change, the test skips 3/3 on the HD 630 and check_skips.py counts the skip as expected. It passes 3/3 on the GTX 1050 Ti, on llvmpipe (Mesa 25.2.8, LLVM 20.1.2) and on lavapipe 26.0.8. vulkaninfo lists VK_KHR_maintenance8 for the GTX and llvmpipe and not for the HD 630.
  • The source-scanning tests (conventions, public_headers, tools_): 162/162. check_conventions.py, check_test_registration.py, check_compile.py (1 translation unit) and check_main_sync.py are clean.
  • pr_overlap.py --branch: no overlap with open pull requests.

agc_driver_image_sample_cube_offset (from #23498) also fails on the HD 630, with SPIR-V emission failed … ImageSampleRaw … has a texel offset that is not a constant. That one needs no VK_KHR_maintenance8, because a cube T# ignores texel offsets, so a skip would be wrong. It is left for a separate change.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: NVIDIA GeForce GTX 1050 Ti (580.178.04), Intel HD Graphics 630 (Mesa 25.2.8 ANV), llvmpipe (Mesa 25.2.8, LLVM 20.1.2), lavapipe 26.0.8; Linux Mint 22.3
  • AI-assisted: yes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • The image-plane offset test now skips with a clear message on devices that do not support the required feature.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5623292349 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28744). Originally posted by [GiannisG1](https://github.com/GiannisG1) on 2026-12-03T09:02:22Z. --- ### What `agc_driver_image_plane_offset_on_line` (from #23701) fails on a device without `VK_KHR_maintenance8`: ``` ShaderRecompiler::Recompile: DescriptorBindingBuilder::Populate normalized guest sampler is used with a texel offset that is not a constant, which image sampling takes only with VK_KHR_maintenance8 and shaderImageGatherExtended ``` Its shader samples a 1D texture with `image_sample_lz_o` and `image_sample_l_o` and a different texel offset in each thread through a normalized sampler. The recompiler accepts that only with `VK_KHR_maintenance8` (`Target().nonConstantImageOffsets`). The test now skips on such a device with `skipped, the device lacks VK_KHR_maintenance8, …`, as `ImageSampleDerivatives.cpp` already does for its `_o` cases. The `image_load_mip` checks share the same shader, so they are skipped there too. On a device with `VK_KHR_maintenance8` nothing changes. The Linux CI job's llvmpipe has `VK_KHR_maintenance8`, so it never takes this path. Mesa 25.2.8's ANV (Ubuntu 24.04) on an Intel HD Graphics 630 does not have it, and the test fails there on `main`. ### Tested Linux Mint 22.3, kernel 7.0.0, `main` `cde48b5800` with this change. - RED on `main`'s binary: the test fails 3/3 on the HD 630 with the message above. - With the change, the test skips 3/3 on the HD 630 and `check_skips.py` counts the skip as expected. It passes 3/3 on the GTX 1050 Ti, on llvmpipe (Mesa 25.2.8, LLVM 20.1.2) and on lavapipe 26.0.8. `vulkaninfo` lists `VK_KHR_maintenance8` for the GTX and llvmpipe and not for the HD 630. - The source-scanning tests (`conventions`, `public_headers`, `tools_`): 162/162. `check_conventions.py`, `check_test_registration.py`, `check_compile.py` (1 translation unit) and `check_main_sync.py` are clean. - `pr_overlap.py --branch`: no overlap with open pull requests. `agc_driver_image_sample_cube_offset` (from #23498) also fails on the HD 630, with `SPIR-V emission failed … ImageSampleRaw … has a texel offset that is not a constant`. That one needs no `VK_KHR_maintenance8`, because a cube T# ignores texel offsets, so a skip would be wrong. It is left for a separate change. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 GTX 1050 Ti (580.178.04), Intel HD Graphics 630 (Mesa 25.2.8 ANV), llvmpipe (Mesa 25.2.8, LLVM 20.1.2), lavapipe 26.0.8; Linux Mint 22.3 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * The image-plane offset test now skips with a clear message on devices that do not support the required feature. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
ligmaSec commented 2026-12-03 09:07:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T09:07:33Z.

Review: COMMENTED


Paired Linux CTest runs of agc_driver_image_plane_offset_on_line and agc_driver_gcn_scalar_buffer_base passed on b97867d3ce6b and this patch. Both Mesa lavapipe logs show Khronos validation 1.4.369 inserted and zero VUID- errors. The test device supported nonconstant image offsets and ran the sampling cases in both phases. I checked the unsupported-device early return in source.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6166653029 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28744#pullrequestreview-6166653029). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T09:07:33Z. **Review:** COMMENTED --- Paired Linux CTest runs of `agc_driver_image_plane_offset_on_line` and `agc_driver_gcn_scalar_buffer_base` passed on `b97867d3ce6b` and this patch. Both Mesa lavapipe logs show Khronos validation 1.4.369 inserted and zero `VUID-` errors. The test device supported nonconstant image offsets and ran the sampling cases in both phases. I checked the unsupported-device early return in source. AI-assisted: yes.
MarcZX10 commented 2026-12-03 09:26:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T09:26:49Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head 2a896f98a90dc23e302961640d434e848a4fcc51 against base main; no merged-preview check was run. I inspected the prepared diff and the changed file plus relevant pinned source context with repo_read.py. No test or build ran; no runtime environment or toolchain was used.

python3 repo_read.py cat core/libs/prx/libSceAgcDriver/tests/execution/ImagePlaneOffsetOnLine.cpp 1 196
python3 repo_read.py search nonConstantImageOffsets
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleDerivatives.cpp 350 390
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp 5080 5105
python3 repo_read.py cat core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp 315 337

Results

Check Result Note
Changed code and relevant source passed Gate matches the device target flag
Tests and build not run No execution checks performed

Negative control

Not run; no test was run.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

The author's reported GPU runs and CI results were not independently verified. No tests or runtime behavior were run. The only changed file listed in the manifest was read; no files were excluded by the review rules.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6166921715 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28744#pullrequestreview-6166921715). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-12-03T09:26:49Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `2a896f98a90dc23e302961640d434e848a4fcc51` against base `main`; no merged-preview check was run. I inspected the prepared diff and the changed file plus relevant pinned source context with `repo_read.py`. No test or build ran; no runtime environment or toolchain was used. ```text python3 repo_read.py cat core/libs/prx/libSceAgcDriver/tests/execution/ImagePlaneOffsetOnLine.cpp 1 196 python3 repo_read.py search nonConstantImageOffsets python3 repo_read.py cat core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleDerivatives.cpp 350 390 python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp 5080 5105 python3 repo_read.py cat core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp 315 337 ``` ## Results | Check | Result | Note | |---|---|---| | Changed code and relevant source | passed | Gate matches the device target flag | | Tests and build | not run | No execution checks performed | ## Negative control Not run; no test was run. ## Findings ### Blocking None. ### Non-blocking None. ## Sources - The changed test returns the standard skipped result when the device target lacks non-constant image offsets: [ImagePlaneOffsetOnLine.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/2a896f98a90dc23e302961640d434e848a4fcc51/core/libs/prx/libSceAgcDriver/tests/execution/ImagePlaneOffsetOnLine.cpp#L174-L184). - The Vulkan device target sets that flag from its maintenance8 feature state: [VulkanDevice.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/2a896f98a90dc23e302961640d434e848a4fcc51/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp#L5091-L5097). - The recompiler rejects normalized guest samplers with nonconstant texel offsets without the required support: [DescriptorBindingBuilder.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/2a896f98a90dc23e302961640d434e848a4fcc51/core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp#L327-L330). The neighboring image-sampling test also gates its offset cases on the same target flag: [ImageSampleDerivatives.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/2a896f98a90dc23e302961640d434e848a4fcc51/core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleDerivatives.cpp#L355-L373). ## Not verified The author's reported GPU runs and CI results were not independently verified. No tests or runtime behavior were run. The only changed file listed in the manifest was read; no files were excluded by the review rules. ## To get this to a good state Nothing is required.
Plyxen commented 2026-12-03 14:03:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T14:03:53Z.

Review: APPROVED


I read the diff at 2a896f98a9. Windows 11, GCC 15.2, merged into main at 6c6b29320fe together with other open PRs (so not an isolated build), with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).

  • agc_driver_image_plane_offset_on_line: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has a VUID- or SYNC-HAZARD line.
  • No control: both GPUs have VK_KHR_maintenance8, so the new skip is not taken here and the test runs as before.

Not checked: a device without VK_KHR_maintenance8.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6171304516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/28744#pullrequestreview-6171304516). Originally posted by [Plyxen](https://github.com/Plyxen) on 2026-12-03T14:03:53Z. **Review:** APPROVED --- I read the diff at `2a896f98a9`. Windows 11, GCC 15.2, merged into `main` at `6c6b29320fe` together with other open PRs (so not an isolated build), with `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1` and `VK_LAYER_KHRONOS_validation` on an RTX 5080 (621.24) and a Radeon iGPU (26.11.2). - `agc_driver_image_plane_offset_on_line`: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has a `VUID-` or `SYNC-HAZARD` line. - No control: both GPUs have `VK_KHR_maintenance8`, so the new skip is not taken here and the test runs as before. Not checked: a device without `VK_KHR_maintenance8`. AI-assisted: yes (Claude Code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/28744:upstream-pr/28744'
git switch 'upstream-pr/28744'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/28744'
git switch 'upstream-pr/28744'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/28744'
git switch 'upstream-pr/28744'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/28744'
git switch 'main'
git merge --squash 'upstream-pr/28744'
git switch 'main'
git merge --ff-only 'upstream-pr/28744'
git switch 'main'
git merge 'upstream-pr/28744'
git push origin 'main'
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!28744
No description provided.