Skip to content

test(agc): skip the unclamped normalized blend test without shaderStorageImageReadWithoutFormat - #12968

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
GiannisG1:test/unclamped-blend-skip-without-formatless-reads
Oct 30, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
GiannisG1:test/unclamped-blend-skip-without-formatless-reads

Conversation

@GiannisG1

@GiannisG1 GiannisG1 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What

agc_driver_unclamped_normalized_blend (#11684) fails on a device that has fragmentShaderPixelInterlock but not shaderStorageImageReadWithoutFormat, such as an Intel HD Graphics 630 on Mesa's ANV:

shader 0x… stage 5: ShaderRecompiler::Recompile: SPIR-V module emission failed: storage image reads without a format are unavailable on the target device

The pixel shader merge behind the unclamped blend reads the color target through a storage image without a format (EmitStorageImageRead, SpirvDescriptors.cpp:241), so every draw of the test needs that feature, and the recompiler refuses the shader on such a device. The test only checks for pixel interlock.

This PR adds the same check the 4_4_4_4 partial write test uses for the same merge path (#11943): without shaderStorageImageReadWithoutFormat the test prints skipped, the device lacks shaderStorageImageReadWithoutFormat and returns 77, right after the interlock check. Nothing else changes; on such a device the refusal case without pixel interlock is skipped with the rest.

At @oneandonlydean's request, the "Unclamped normalized color targets" entry in docs/dev/debt/libSceAgcDriver.md now lists shaderStorageImageReadWithoutFormat next to fragmentShaderPixelInterlock and says the shader is refused without either. Its sentence on unblended targets ("Without blending Vulkan's conversion clamps the stored value.") is dropped so the entry stays within check_conventions.py's 1000-character limit (debt-length); it is exactly 1000 now.

Tested

Linux Mint 22.3, kernel 7.0.0-38, GCC 13.3.0, Release, BUILD_TESTING=ON, on main bb04a4f1ea. The PR changes only this test's source, so every other test binary is the same as main's.

agc_driver_unclamped_normalized_blend:

Device main bb04a4f1ea this PR, 3 runs
Intel HD Graphics 630, Mesa 25.2.8 (shaderStorageImageReadWithoutFormat false) fails 3 of 3 alone, and in the full run skipped 3/3; check_skips.py exit 0 on each run's JUnit file
NVIDIA GTX 1050 Ti, 580.178.04 passes passes 3/3: 14 UNORM and 4 SNORM draws, 2 overdraws, 1 refusal
llvmpipe, Mesa 25.2.8 passes passes 3/3: 14 UNORM and 4 SNORM draws, 2 overdraws, 1 refusal
GTX 1050 Ti and llvmpipe with shaderStorageImageReadWithoutFormat masked (Khronos profiles layer, SDK 1.3.275) fails with the same emission error skipped, check_skips.py exit 0

With VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layers 1.3.275), ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V: no was not found but was requested by env var VK_INSTANCE_LAYERS; VUIDs the same on main and this PR (none on the HD 630, VUID-VkDeviceCreateInfo-pNext-pNext on the other two).

Also tested by @JulesB40 on Windows 11 with WinLibs GCC 15.2.0 r7, on main bb04a4f1ea, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1 (from #12973, closed as a duplicate of this one). The Intel UHD (Raptor Lake, 8086:a788, driver 101.7085) fails 3 of 3 on main with storage image reads without a format are unavailable on the target device and skips with this change. The RTX 4070 Laptop (0x2860, driver 616.92) passes 3 of 3 with the full run, with no VUID- lines under VK_LAYER_KHRONOS_validation.

The 206 source-scanning tests (conventions_*, public_headers*, check_compile*, check_main_sync, check_skips) pass, and check_conventions.py, check_test_registration.py and check_main_sync.py are clean. tools/pr_overlap.py --branch: #12916 also changes the test file and merges with it, and since the debt commit it also edits the same entry line (L280): it replaces "a second merged target in one draw", this PR the requirements before it and the unblended sentence, so whichever lands second resolves one line.

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: Intel HD Graphics 630 (Mesa 25.2.8 ANV), NVIDIA GeForce GTX 1050 Ti (580.178.04), llvmpipe (Mesa 25.2.8); Linux Mint 22.3, kernel 7.0.0-38; and by @JulesB40 on Windows 11 26200: Intel UHD Graphics (Raptor Lake-S Mobile, 8086:a788), driver 101.7085; NVIDIA GeForce RTX 4070 Laptop GPU (10de:2860), driver 616.92
  • AI-assisted: yes

🤖 Generated with Claude Code

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@GiannisG1 thanks, the new guard matches the emitter requirement and its skip wording is accepted by check_skips.py. Please also add shaderStorageImageReadWithoutFormat to the existing “Unclamped normalized color targets” requirements in docs/dev/debt/libSceAgcDriver.md, noting that the shader is refused when it is absent. That entry currently lists pixel interlock but omits this second capability, so the limitation should be recorded there as well as in the test skip. No production behavior change is needed for this request.

@GiannisG1

Copy link
Copy Markdown
Contributor Author

@oneandonlydean added in 61319fb947: the "Unclamped normalized color targets" entry now lists shaderStorageImageReadWithoutFormat next to fragmentShaderPixelInterlock and says the shader is refused without either. To keep the entry within check_conventions.py's 1000-character limit (debt-length), I dropped its sentence on unblended targets ("Without blending Vulkan's conversion clamps the stored value."); the entry is exactly 1000 characters now. Tell me if you'd rather keep that sentence and trim something else.

#12916 also edits that line: it replaces "a second merged target in one draw", while this PR changes the requirements before it. Whichever lands second resolves one line.

JulesB40's Windows runs (Intel UHD 8086:a788, RTX 4070 Laptop) are in the description, and #12973 is closed as a duplicate.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

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 2434 docs/dev/debt/libSceAgcDriver.md
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6185 docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6804 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6973 docs/dev/debt/libSceAgcDriver.md
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7048 docs/dev/debt/libSceAgcDriver.md
PR 7085 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
PR 7844 docs/dev/debt/libSceAgcDriver.md
PR 7978 docs/dev/debt/libSceAgcDriver.md
PR 8014 docs/dev/debt/libSceAgcDriver.md
PR 8319 docs/dev/debt/libSceAgcDriver.md
PR 8542 docs/dev/debt/libSceAgcDriver.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 9020 docs/dev/debt/libSceAgcDriver.md
PR 9335 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9432 docs/dev/debt/libSceAgcDriver.md
PR 9533 docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9717 docs/dev/debt/libSceAgcDriver.md
PR 9742 docs/dev/debt/libSceAgcDriver.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 10026 docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10193 docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10472 docs/dev/debt/libSceAgcDriver.md
PR 10492 docs/dev/debt/libSceAgcDriver.md
PR 10497 docs/dev/debt/libSceAgcDriver.md
PR 10906 docs/dev/debt/libSceAgcDriver.md
PR 11126 docs/dev/debt/libSceAgcDriver.md
PR 12120 docs/dev/debt/libSceAgcDriver.md
PR 12246 docs/dev/debt/libSceAgcDriver.md
PR 12840 docs/dev/debt/libSceAgcDriver.md
PR 13021 docs/dev/debt/libSceAgcDriver.md
PR 13023 docs/dev/debt/libSceAgcDriver.md
PR 13146 docs/dev/debt/libSceAgcDriver.md

@Tehshortbus

Copy link
Copy Markdown
Contributor

From #12916: I merged both heads (61319fb947 and c037722384), and the only conflict is the "Unclamped normalized color targets" line, as you describe. Both edits can be kept in one line, but together they come to 1014 characters (debt-length), because #12916 replaces "a second merged target in one draw" with "a packed target's partial write in the same draw".

This wording keeps both and is exactly 1000. Whichever of us lands second can use it:

…, a signed target whose write mask skips a component (the shader rewrites it through a float, so the code -128 would become -127), and a packed partial write in one draw.

The rest of your line stays as it is. The test file merges cleanly. With your skip, the two-target cases #12916 adds are skipped on such devices too.

AI-assisted: yes (Claude Code)

@GiannisG1

Copy link
Copy Markdown
Contributor Author

Thanks, that works. I merged both heads onto main 52f212ec05 with your wording: the only conflict is that line, the entry comes to 1000 characters, and check_conventions.py passes. If #12968 lands second, I'll use it.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 61319fb merged onto main bb04a4f · tested 2026-10-29 22:05 UTC · 18 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 743 passed · 2 failed (0 new, 2 also fail on main) · 8 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 753 of 2,918 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (365 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Failing on main too (2, not counted against this PR)
agc_submit_progress
agc_submit_progress_no_timeline
Validation IDs already present on main (3 IDs in 105 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (105 tests): agc_driver, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_buffer_unaligned_base, agc_driver_bvh64_intersect_ray, agc_driver_cache_control, agc_driver_cached_image_multisample_guard, agc_driver_clamped_global_fill, and 97 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
Skipped (8)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
Reproduce
git fetch origin 61319fb947fc462beddf96d3ba17518ac8d8a5da bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff 61319fb947fc462beddf96d3ba17518ac8d8a5da
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed docs agc libSceAgc* labels Oct 30, 2026
GiannisG1 and others added 2 commits October 30, 2026 12:19
…rageImageReadWithoutFormat

The pixel shader merge behind the unclamped blend reads the color
target through a storage image without a format, so on a device with
fragmentShaderPixelInterlock but without
shaderStorageImageReadWithoutFormat (Intel HD Graphics 630, Mesa ANV)
every draw fails with "storage image reads without a format are
unavailable on the target device". Skip the test there with the device
reason, as the 4_4_4_4 partial write test does for the same merge path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rageImageReadWithoutFormat

The pixel shader reads the color target through a storage image without
a format, so the recompiler refuses the shader on a device without
shaderStorageImageReadWithoutFormat. The sentence on unblended targets
goes, to keep the entry within the 1000-character limit. Asked for by
oneandonlydean in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10
adriadam10 force-pushed the test/unclamped-blend-skip-without-formatless-reads branch from 61319fb to a98d441 Compare October 30, 2026 11:48
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@adriadam10
adriadam10 merged commit 6154580 into boykopovar:main Oct 30, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Rebased on main. The only conflict was the "Unclamped normalized color targets" debt line, which #12916 changed: kept main's text, added shaderStorageImageReadWithoutFormat, and dropped the unblended sentence to stay within 1000 characters. Checked the skip against the 4_4_4_4 partial write test (#11943) and the debt entry against the guard; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants