Skip to content

test(agc): load the Vulkan loader with portability enumeration in four more fixtures on macOS - #12927

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
tkcm01:test/agc-four-fixtures-macos-loader
Oct 30, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
tkcm01:test/agc-four-fixtures-macos-loader

Conversation

@tkcm01

@tkcm01 tkcm01 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What

Four AGC test fixtures open their own Vulkan instance: tests/BdaDevice.cpp, tests/Recorder.cpp, tests/execution/OversizedDescriptorSets.cpp and tests/execution/SampledCacheBudget.cpp. Outside Windows they load only libvulkan.so.1, and they create the instance without portability enumeration. So on macOS they cannot load Vulkan. 87 of the 96 tests their four executables run skip with cannot load Vulkan, and they fail under ANYPS5_REQUIRE_VULKAN=1.

On macOS each fixture now loads libvulkan.1.dylib and creates the instance with VK_KHR_portability_enumeration and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR. This is the same eight lines #7886 added to the nine other fixtures that open their own device. Device creation is unchanged: enabling VK_KHR_portability_subset there is #10920. Test-only; Linux and Windows compile the same code as before.

@mugurc's ci/macos-series-2 has this for Recorder.cpp. @jermainee found it for OversizedDescriptorSets and SampledCacheBudget on #1 (9 October). Both are credited as co-authors. Announced on #1.

Tested

macOS 27.2 (26B123), Apple M4 (10-core GPU), Apple clang 21.0.0, x86-64 Release under Rosetta 2, MoltenVK 1.4.2 from the Vulkan SDK 1.4.363.0.

libSceAgcDriver doesn't link on macOS from main alone. So the tree is main 2960e9a6e7 plus #7631, #7804, #10552, #11249, #11447, #10669, #11554 and #12076, the list from #1. The four files are the same there as on current main.

The 96 tests of agc_driver_bda_device_tests, agc_driver_recorder_tests, agc_driver_oversized_descriptor_sets_tests and agc_driver_sampled_cache_budget_tests, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:

passed skipped failed
without this change 9 0 87, all cannot load Vulkan
with it (2 runs, the same each time) 92 2 2
  • Plain ctest without ANYPS5_REQUIRE_VULKAN:
    • Without the change: 9 passed and 87 skipped.
    • With it: 92 passed, 2 skipped and the same 2 failed.
  • The 2 skips:
    • agc_driver_oversized_descriptor_sets: the M4 binds fewer than 4097 storage buffers per stage.
    • agc_import_settle_initial_dcc: imports under 1 MiB wait for a deferred settle only on Windows.
  • The 2 failures are existing macOS gaps that these tests now reach:
    • agc_driver_recover_srgb_allocation: "the storage surface cannot serve an sRGB expansion copy". This is the failure fix(agc): keep sRGB storage images in their UNORM twin on every driver #10859 describes and fixes.
    • agc_recorder_failed_check: the test's deliberate uncaught throw ends in libc++abi's terminate, so ctest sees an abort. This is the "Exception runtime on macOS" entry in docs/dev/debt/libc.md. The expected message is printed.
  • Validation:
  • Windows, through the fork's Build workflow on this change merged with main: the 3027 selected tests passed. The four executables build. Of their tests that were selected, 4 CPU-only ones passed and 30 skipped, because the runner has no GPU.
  • python3 tools/check_conventions.py --base upstream/main: passed.
  • tools/pr_overlap.py: test(agc): enable VK_KHR_portability_subset in the tests that create their own device #10920 touches the same four files, in device creation. The two merge cleanly.

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: Apple M4 (10-core GPU), MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2
  • AI-assisted: yes

🤖 Generated with Claude Code

…r more fixtures on macOS

BdaDevice, Recorder, OversizedDescriptorSets and SampledCacheBudget open
their own Vulkan instance but load only libvulkan.so.1 outside Windows and
create it without portability enumeration, so on macOS they cannot load
Vulkan and skip, or fail under ANYPS5_REQUIRE_VULKAN=1. They now load
libvulkan.1.dylib and enumerate portability drivers on macOS, as the nine
fixtures boykopovar#7886 changed already do.

Co-authored-by: mugurc <20699965+mugurc@users.noreply.github.com>
Co-authored-by: jermainee <34961982+jermainee@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tkcm01 tkcm01 mentioned this pull request Oct 29, 2026
@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 1368 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5021 core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/OversizedDescriptorSets.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6185 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6905 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6971 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6987 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6989 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6995 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7002 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7048 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7604 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 8484 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9012 core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 9712 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9884 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp
PR 9898 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10026 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10442 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10472 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10920 core/libs/prx/libSceAgcDriver/tests/BdaDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/execution/OversizedDescriptorSets.cpp
core/libs/prx/libSceAgcDriver/tests/execution/SampledCacheBudget.cpp

@adriadam10 adriadam10 self-assigned this Oct 29, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 0920dfb merged onto main bb04a4f · tested 2026-10-29 22:53 UTC · 15 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 ✅ 919 passed · 3 failed (0 new, 2 also fail on main, 1 unstable 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 930 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 (446 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) none
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_submit_progress: failed in 4 of the last 6 main runs
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 182 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (182 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 174 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 0920dfbd76fb67bbf1b2091494cb7395afe711ab bb04a4f1ea0175e9e4f149f0359a764d62ff3296
git checkout bb04a4f1ea0175e9e4f149f0359a764d62ff3296 && git merge --no-ff 0920dfbd76fb67bbf1b2091494cb7395afe711ab
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 the agc libSceAgc* label Oct 30, 2026
@adriadam10
adriadam10 merged commit c652882 into boykopovar:main Oct 30, 2026
11 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the four fixtures against the already-merged #7886 pattern (identical eight lines, confined to __APPLE__, so Linux and Windows compile the same code), the PR body's results and the Windows job; merged.

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

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants