Skip to content

feat(shader): combine alpha-to-coverage with a sample-mask export - #14909

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
kallmek3nny:feat/shader-alpha-to-coverage-sample-mask
Nov 3, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
kallmek3nny:feat/shader-alpha-to-coverage-sample-mask

Conversation

@kallmek3nny

Copy link
Copy Markdown
Contributor

What

With alpha-to-coverage and DB_SHADER_CONTROL.MASK_EXPORT_ENABLE, the pixel shader now writes SampleMask as the AND of its MRT0 alpha coverage and its MRTZ sample-mask export instead of throwing. A mask the invocation does not write counts as all ones, so only the alpha coverage applies. Alpha-to-coverage without a mask export and the other alpha-to-coverage refusals are unchanged.

Semantics source:

  • Vulkan multisample coverage ANDs the shader's SampleMask and the alpha-to-coverage mask into the coverage.
  • RADV sets MASK_EXPORT_ENABLE from the pixel shader's sample-mask output, independently of the alpha-to-coverage state (radv_shader.c L2108-L2112, Mesa ae9e17fc684b).

DB_SHADER_CONTROL.COVERAGE_TO_MASK_ENABLE (bit 7) is still not decoded, as on main, so the alpha always comes from MRT0. RADV sets that bit below GFX11 only for alpha-to-one (radv_cmd_buffer.c L13211-L13215). The combined rule is not measured on hardware, so it gets a new entry in docs/dev/debt/shader.md, and a sample-mask export is removed from the alpha-to-coverage refusals in docs/dev/debt/libSceAgcDriver.md.

Changes:

  • Recompiler: SpirvEmitterState.hpp, SpirvEmitterHelpers.cpp and SpirvModuleEmitter.cpp.
  • Tests: eight- and two-sample cases in AlphaToCoverage.cpp, registered as agc_driver_alpha_to_coverage_sample_mask_export and agc_driver_two_sample_alpha_to_coverage_sample_mask_export in agc_driver_alpha_to_coverage_tests.cmake. Both are also added to the Windows PATH=path_list_prepend test list in core/libs/prx/libSceAgcDriver/CMakeLists.txt. Without that entry the test executable can't load its DLLs and the tests hit the 30 s timeout.

check_conventions.py reports one [debt-length] warning, on the libSceAgcDriver.md:72 alpha-to-coverage entry (2436 characters). On main that entry is already 2458 characters, and this PR only removes a sample-mask export, from it. Shortening the rest would rewrite gaps outside this topic.

Overlap:

Tested

Windows 10.0.26300.9711, Git Bash, NVIDIA GeForce RTX 4060 (driver 32.0.16.1088), VK_LAYER_KHRONOS_validation 1.4.363 from the LunarG Vulkan SDK 1.4.363.0. There's no AMD GPU on this machine, so nothing was measured on AMD hardware or a PS5.

Build: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DBUILD_TESTING=ON, then cmake --build build --parallel 4. It exits 0 on e2f2b44722 and on this PR's commit 0004d35125.

Focused GPU tests, run for main and for the change on the same machine and GPU:

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'alpha_to_coverage|sample_mask|pixel_sample_coverage' -V
  • main at 0d5e03be8c (the branch's original base): 9/9 passed.
  • The change on 0d5e03be8c, before the rebase: 11/11 passed.
  • The change rebased onto main 4ac683fe02 (e2f2b44722): 11/11 passed, including the new agc_driver_alpha_to_coverage_sample_mask_export (1.65 s) and agc_driver_two_sample_alpha_to_coverage_sample_mask_export (1.73 s). Every test took under 3 s with no shader cache.
  • This PR's commit 0004d35125, the same change rebased onto main 66e1f7f993: 11/11 passed, including the two new tests (1.83 s and 1.84 s). Every test took under 3 s with no shader cache.
  • Each of the four logs has 0 VUID- lines and 0 was not found but was requested by env var VK_INSTANCE_LAYERS lines.

1dde962ec3 differs from e2f2b44722 only in shorter wording of the new docs/dev/debt/shader.md entry. 0004d35125 is 1dde962ec3 rebased onto 66e1f7f993 with no conflicts and an unchanged patch.

  • git diff --check origin/main HEAD on 0004d35125: clean.
  • python tools/check_conventions.py --base origin/main on 0004d35125: exit 0, with 1 finding and 0 errors. The finding is the [debt-length] warning described under What.
  • python tools/pr_overlap.py --branch feat/shader-alpha-to-coverage-sample-mask on 0004d35125: exit 2 (overlap check failed closed). It confirms the feat(agc): implement measured single-sample dithered alpha coverage #14561 conflict described under What, and I compared the 81 PRs it couldn't check by hand against 0004d35125.

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: NVIDIA GeForce RTX 4060, driver 32.0.16.1088, Windows 10.0.26300.9711
  • AI-assisted: yes

With alpha-to-coverage and DB_SHADER_CONTROL.MASK_EXPORT_ENABLE the pixel shader now writes SampleMask as the AND of its MRT0 alpha coverage and its MRTZ mask export instead of throwing, as Vulkan multisample coverage ANDs the shader sample mask with the alpha-to-coverage mask. Adds eight- and two-sample GPU tests and a shader debt entry for the rule, which is not measured on hardware.
@github-actions github-actions Bot added build shader core/shader docs agc libSceAgc* labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 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 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1896 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/shader.md
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/shader.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6488 docs/dev/debt/shader.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6751 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
PR 6804 docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6924 docs/dev/debt/shader.md
PR 6987 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/shader.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7392 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 7410 docs/dev/debt/shader.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7457 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7668 docs/dev/debt/libSceAgcDriver.md
PR 7684 docs/dev/debt/shader.md
PR 7689 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8004 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8484 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 8707 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 9020 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 9183 docs/dev/debt/shader.md
PR 9318 docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 9356 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9672 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9748 core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 9852 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9884 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9889 docs/dev/debt/shader.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9898 docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10233 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 10757 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10867 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 10920 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 11351 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
PR 11483 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/shader.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 11998 docs/dev/debt/libSceAgcDriver.md
PR 12120 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 12323 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12324 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12548 docs/dev/debt/shader.md
PR 12565 docs/dev/debt/libSceAgcDriver.md
PR 12567 docs/dev/debt/libSceAgcDriver.md
PR 12619 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12790 docs/dev/debt/shader.md
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12944 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
docs/dev/debt/shader.md
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13262 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13707 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 13863 docs/dev/debt/libSceAgcDriver.md
PR 13920 docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13963 docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
PR 14005 docs/dev/debt/libSceAgcDriver.md
PR 14212 docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/shader.md
PR 14217 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 14218 core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitterState.hpp
docs/dev/debt/shader.md
PR 14302 docs/dev/debt/libSceAgcDriver.md
PR 14311 docs/dev/debt/libSceAgcDriver.md
PR 14344 docs/dev/debt/libSceAgcDriver.md
PR 14561 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp
core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14621 docs/dev/debt/libSceAgcDriver.md
PR 14853 docs/dev/debt/shader.md
PR 14943 docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14976 docs/dev/debt/libSceAgcDriver.md

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 0004d35 merged onto main 93dbd0f · tested 2026-11-02 02:24 UTC · 22 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 ✅ 2,499 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 45 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 2,550 of 3,165 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 (934 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_lookup_log_fits_build 53.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.6 s
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)
agc_driver_depth_clear_hle: VUID-vkCmdCopyBuffer-commonparent (6x)
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 10 main runs
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 7 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (5 IDs in 484 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (484 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 476 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
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_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
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
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin 0004d35125d30429b42085f4df1cc80fdc0b9574 93dbd0f82aea684e95f15f06e7d42c0064af18cf
git checkout 93dbd0f82aea684e95f15f06e7d42c0064af18cf && git merge --no-ff 0004d35125d30429b42085f4df1cc80fdc0b9574
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.

@BunnyFl BunnyFl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the AMD run you didn't have, and it looks right to me.

ANDing the alpha coverage with the exported SampleMask follows the Vulkan coverage rule you cite. Treating an unwritten mask as all ones keeps the alpha-only result for invocations that don't export one.

Tested on Windows 11, WinLibs GCC 15.2.0, Release, AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.7029), Vulkan SDK 1.4.363 validation layer, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, head 0004d35125 merged onto main:

  • ctest -R 'alpha_to_coverage|sample_mask|pixel_sample_coverage': 11 of 11 pass. That includes both new *_alpha_to_coverage_sample_mask_export cases, the dithered and state tests, agc_driver_pixel_sample_coverage and the three agc_driver_sample_mask_* tests. No log has a VUID- or SYNC-HAZARD line.
  • With SpirvEmitterState.hpp, SpirvEmitterHelpers.cpp and SpirvModuleEmitter.cpp put back to main's versions, the two new cases fail and the other existing tests still pass.

So with your RTX 4060 results, the combined rule now passes on both vendors. It still isn't measured against gfx1013 or a console, which your new shader.md entry already says.

@JJenkx

JJenkx commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

AMD check, since the description notes no AMD GPU was available: Radeon RX 6700 XT (RDNA 2), AMD proprietary driver 26.10.1, Windows 11 Enterprise 10.0.22621, WinLibs GCC 15.2.0 UCRT r7, Release.

Exact head 0004d35125 against its merge base 66e1f7f993, each built in its own tree. Runs went through the shared GPU queue with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1.

ctest -R '(alpha_to_coverage|sample_mask)' --repeat until-fail:5:

Arm Tests Result VUIDs
base 66e1f7f993 8 40/40 pass none
this PR 10 50/50 pass none
  • The two new tests run their checks here rather than skipping. agc_driver_alpha_to_coverage_sample_mask_export prints eight-sample alpha-to-coverage with sample-mask export tests passed. agc_driver_two_sample_alpha_to_coverage_sample_mask_export prints two-sample alpha-to-coverage with sample-mask export tests passed.
  • The 8 existing alpha-to-coverage and sample-mask tests still pass on this driver with the change.
  • Full suite on this PR: 3,283 tests: 3,236 pass and 19 skip; the validation layer was inserted 1,098 times. The 28 failures are exactly the set main fails on this machine: 26 video_out_flip_* that need a display (it was off), agc_driver_sample_order_grid_reference (fix(agc): bind the sample order depth set after its pipeline #9503) and ngs2_pitchshift (fix(libSceNgs2): compute the PitchShift ratio with libc's msun exp2f #12864). The VUIDs are the same three main reports here. The PR adds no failure.

This is the AMD proprietary driver on RDNA 2. It is not RADV, and not a PS5.

🤖 Generated with Claude Code

@oneandonlydean oneandonlydean self-assigned this Nov 3, 2026
@oneandonlydean
oneandonlydean merged commit a9e723b into boykopovar:main Nov 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants