Skip to content

test(agc): run the present upscale test on macOS - #19461

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
imellag:test/agc-present-upscale-macos-loader
Nov 21, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
imellag:test/agc-present-upscale-macos-loader

Conversation

@imellag

@imellag imellag commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What

agc_driver_present_upscale never ran on macOS: it loaded libvulkan.so.1 on every host that is not Windows, so on macOS it printed skipped, no usable Vulkan device even with ANYPS5_REQUIRE_VULKAN=1. It is the only test under core that names the Windows loader without naming the macOS one. The test already lists MoltenVK among the drivers with headless surfaces, so it was meant to run there.

Two changes, both in the test:

  • load libvulkan.1.dylib on macOS, as VulkanDevice.cpp and the other AGC tests do;
  • create the device-listing instance with VK_KHR_portability_enumeration and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR on macOS, as the other AGC tests do. Without it the loader hides MoltenVK and vkCreateInstance fails.

Tested

macOS 27.2, Apple M4 Pro, x86-64 build under Rosetta 2, MoltenVK 1.4.2 and the validation layer of Vulkan SDK 1.4.363.0, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest --test-dir build -R present_upscale -V:

  • main (d4556df): skipped, no usable Vulkan device, reported by CTest as Skipped.
  • with the loader name only: AGC graphics: vkCreateInstance failed, Failed.
  • this PR: Passed. The log shows Insert instance layer "VK_LAYER_KHRONOS_validation", no was not found but was requested by env var VK_INSTANCE_LAYERS and no VUID- line.

Linux and Windows are untouched: both additions are inside __APPLE__ branches.

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 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2 (x86-64 under Rosetta 2)
  • AI-assisted: yes

@JJenkx

JJenkx commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 60769468a0, merged onto main 0294cba8dc. Setup: Windows 11 Enterprise 22621, AMD RX 6700 XT, AMD driver 26.10.1, MinGW-w64 GCC 15.2 UCRT, Release.

The merge builds, but agc_driver_present_upscale skips on this machine:

  • in all 3 runs through the shared Windows GPU FIFO with ANYPS5_REQUIRE_VULKAN=1 (merge 11c359f52e);
  • in the CPU runs.

It prints skipped, the device lacks VK_EXT_headless_surface; the AMD Windows driver does not expose that extension. The PR's changes are inside #ifdef __APPLE__ and #elif defined(__APPLE__), so a Windows run cannot exercise them anyway. This only confirms the merge still builds and skips cleanly on Windows.

AI-assisted: yes.

@domx4q

domx4q commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Checked that Linux is unchanged, as the description says, with the Khronos validation layer on a Linux machine with an NVIDIA GPU and a real Wayland display.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, plus Mesa 26.2.7 llvmpipe, Vulkan 1.4.357, Khronos validation layer 1.4.363.1, Hyprland (Wayland) display. Head 60769468a0 merged onto main e4caa07950 with --no-ff, clean merge. Main baseline is a Release build of e4caa07950 on the same machine.

WAYLAND_DISPLAY=wayland-1 DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 ANYPS5_REQUIRE_DISPLAY=1 \
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R 'present_upscale' -V
main e4caa07950 this PR
Result 1/1 passed (0.98 s) 1/1 passed (0.96 s)
Insert instance layer "VK_LAYER_KHRONOS_validation" 8 8
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

agc_driver_present_upscale picks the best device with VK_EXT_headless_surface; the NVIDIA proprietary driver does not expose it, so on both sides every presentation in the test runs on llvmpipe (Selected GPU name=llvmpipe (LLVM 23.1.4, 256 bits), 7 times per log), with the RTX 4090 only listed as a candidate. The RTX 4090 itself is therefore not exercised by this test on either side.

No new VUID- errors; agc_driver_present_upscale passes on Linux as on main, so the __APPLE__-only additions leave Linux unchanged.

AI-assisted: yes (Claude Code)

@kurexw kurexw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested on an Apple M4 (MacBook Air, macOS 27.2, MoltenVK 1.4.2 and the validation layer from the LunarG SDK 1.4.363.1, x86-64 build under Rosetta).

Base: main at a72186d plus #22056 and #22074, two build fixes that main currently needs on macOS.

I ran ctest -R 'present_upscale|linear_target|frame_(replay|capture)|label' (65 tests) 3 times on each side with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer:

  • agc_driver_present_upscale: Skipped 3/3 on the base, Passed 3/3 with this PR. The loader inserts the layer, and there is no VUID- and no was not found but was requested.
  • The other 64 tests have the same results on both sides. The only difference is agc_driver_label_after_import_copy, which is a known timing flake on this machine and fails on both sides. VUID totals are identical (18 on each side, all from tests this PR doesn't touch).

This confirms the author's M4 Pro result on a second Apple machine.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 60769468a0, applied with git apply on main fd4aeed483 together with the other 28 PRs of one batch (#22683, #23796, #23923, #24367, #24370, #24409, #24486, #24587, #10623, #18903, #18941, #21018, #21303, #21451, #21965, #23477, #23478, #23726, #24463, #12827, #14127, #14991, #20063, #24103, #24331, #24508, #24565, #15838). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
agc_driver_present_upscale (1 test, matched by name to the test file this PR changes) 0 pass, 1 Skipped 0 pass, 1 Skipped

Not run here: agc_driver_present_upscale reports Skipped on this Windows setup, so I could not confirm the new case. This run shows no regression elsewhere.

Whole batch: the full ctest -j 12 (6523 tests) on the RTX 3080 has 5 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Intermittent in this run (pass when rerun alone, or known flaky): agc_driver_store_over_untracked. Traced to other PRs of the batch, each by reverting it and testing again: #24409 (guest_usbd); none is in this PR's area. Failing tests I could not trace to a single PR (reverting the likely candidates did not clear them): guest_net_dns_info, test_script_registration. The 2126 agc_/video tests on the iGPU have 2 failing: agc_driver_stencil_plane_memory, agc_driver_store_over_untracked (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@oneandonlydean
oneandonlydean merged commit 9de4248 into boykopovar:main Nov 21, 2026
14 checks passed
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.

6 participants