Skip to content

fix(agc): decode MoltenVK's driver version in the host report - #19462

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
imellag:fix/agc-host-report-moltenvk-version
Dec 4, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
imellag:fix/agc-host-report-moltenvk-version

Conversation

@imellag

@imellag imellag commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What

The host report (ANYPS5_HOST_REPORT=1) printed driver_version: unknown on MoltenVK, because its driverVersion encoding had not been read. MoltenVK sets driverVersion to MVK_VERSION, which is MVK_MAKE_VERSION(major, minor, patch) = major × 10000 + minor × 100 + patch (mvk_private_api.h, MVKDevice.mm: _properties.driverVersion = MVK_VERSION), not the Vulkan version macros.

  • HostDriverVersionScheme::MoltenVk decodes that encoding, and VK_DRIVER_ID_MOLTENVK selects it.
  • agc_host_report checks 10402 → 1.4.2 and a version with two-digit fields; agc_host_report_vulkan checks that MoltenVK gets the scheme.
  • The debt entry said the report's macOS branches were never run and closed "when the report is read on macOS". It was read here (below), so the entry now records that reading and keeps only the remaining gap (the hand-mirrored requirement list). USAGE.md no longer says MoltenVK prints unknown.

Tested

macOS 27.2, Apple M4 Pro, x86-64 build under Rosetta 2, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), on main d4556df plus this change.

  • ctest -R "^agc_host_report": 2/2 passed.
  • The report itself, printed by agc_driver_present_upscale (the test that builds a presenting VulkanDevice; it needs test(agc): run the present upscale test on macOS #19461 to run on macOS) with ANYPS5_HOST_REPORT=1, validation layer inserted, no VUID- line:
AnyPS5 host report (format 1)
commit: d4556df8a84c
[system]
os: Darwin 27.2.0 x86_64
cpu: VirtualApple @ 2.50GHz
cpu_threads: 12
memory_mib: 24576
cpu_gate: unavailable
[sdl]
linked: 2.33.0
compiled: 2.33.0
[gpu]
device: Apple M4 Pro
type: integrated
vendor_id: 0x106b
device_id: 0x1b020209
vulkan_api: 1.1.357
driver: MoltenVK
driver_info: 1.4.2
driver_version: 1.4.2
driver_version_raw: 0x000028a2
subgroup_size: 32
device_local_mib: 24576
candidates: Apple M4 Pro
present_modes: fifo, immediate
present_mode_requested: default

driver_version now equals the driver_info MoltenVK reports (0x28a2 = 10402). OS release, thread count and memory match uname -r, sysctl hw.ncpu and sysctl hw.memsize on this machine. Under Rosetta 2 the CPU brand string is the translated one, which the debt entry now says.

Not tested on Linux or Windows: the other schemes and their tests are unchanged.

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

@github-actions github-actions Bot added docs agc libSceAgc* labels Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 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 4448 docs/dev/debt/libSceAgcDriver.md
PR 4847 docs/user/USAGE.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6924 docs/user/USAGE.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 9289 docs/dev/debt/libSceAgcDriver.md
PR 9345 docs/user/USAGE.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9508 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 10193 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 10861 docs/user/USAGE.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 12678 docs/user/USAGE.md
PR 12792 docs/dev/debt/libSceAgcDriver.md
PR 13809 docs/dev/debt/libSceAgcDriver.md
PR 13863 docs/dev/debt/libSceAgcDriver.md
PR 13920 docs/dev/debt/libSceAgcDriver.md
PR 13928 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 13929 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 15136 docs/dev/debt/libSceAgcDriver.md
PR 15456 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 15973 docs/user/USAGE.md
PR 16571 core/libs/prx/libSceAgcDriver/Execution/src/HostReportVulkan.cpp
core/libs/prx/libSceAgcDriver/tests/HostReportVulkan.cpp
docs/user/USAGE.md
PR 18082 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 20153 docs/dev/debt/libSceAgcDriver.md
PR 21211 docs/user/USAGE.md
PR 21420 docs/user/USAGE.md
PR 22062 docs/dev/debt/libSceAgcDriver.md
PR 22434 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 22647 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 23636 docs/user/USAGE.md
PR 23781 docs/user/USAGE.md
PR 23842 docs/user/USAGE.md
PR 23975 docs/user/USAGE.md
PR 24915 docs/user/USAGE.md
PR 27133 docs/dev/debt/libSceAgcDriver.md
docs/user/USAGE.md
PR 28372 docs/user/USAGE.md
PR 28384 docs/user/USAGE.md
PR 28488 docs/user/USAGE.md

@JJenkx

JJenkx commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Windows check of head 6d5083ae85. Setup: Windows 11 Enterprise 22621, AMD RX 6700 XT, AMD driver 26.10.1, MinGW-w64 GCC 15.2 UCRT, Release.

agc_host_report and agc_host_report_vulkan passed in 3 of 3 runs in both setups:

  • GPU, through the shared Windows GPU FIFO with ANYPS5_REQUIRE_VULKAN=1, merged onto main 30f726f467 (merge 603a71a815): 6 of 6 outcomes. The binaries matched the hashes recorded at preparation, and the receipt shows exit 0 and app_count=0.
  • CPU, Vulkan hidden, merged onto main 269242f6e4 (merge 427c5b3fa5).

On Windows this confirms that the AMD driver version decoding is unchanged. The MoltenVK branch itself only runs on macOS.

AI-assisted: yes.

@MarcZX10 MarcZX10 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.

Reviewed — looks good

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 6d5083ae8506ef08ca560eb3287128c422f2a45d. I read the prepared description, commits, manifest and diff, and all seven changed files listed in the manifest. No tests or build commands were run; repo_read.py was unavailable as a command in this environment.

Results

Check Result Note
Diff and changed code review passed All seven changed files read
Tests and build not run Author reports macOS test results

Findings

Blocking

None.

Non-blocking

None.

Not verified

The test runs described in the PR body were not independently run. No files were excluded according to the manifest; the review folder did not expose files.json through the reader, so excluded-by-rule files could not be checked.

To get this to a good state

Nothing is required.

This was referenced Nov 21, 2026
@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head 6d5083ae85, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#16191, #16207, #17573, #18945, #20978, #21054, #22002, #22003, #22042, #22078, #22822, #24354, #24484, #12860, #18915, #19999, #22160, #22890, #22891, #23488, #23751, #24051, #24578, #14506, #22206, #22291, #22627, #24048, #24424). 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_host_report, agc_host_report_vulkan (2 tests, matched by name to the test file this PR changes) all pass all pass

Whole batch: the full ctest -j 12 (6526 tests) on the RTX 3080 has 15 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: #12860 (guest_user_service_account_name_limits, guest_user_service_age_level_guest_bounds, guest_user_service_initial_user_bounds, guest_user_service_kratos), #22891 (nkwebkit_securityorigin), #18915 (public_headers); 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_apr_read_longeof, guest_filesystem, guest_kernel_rename, guest_windows_directory_link_types, tools_patch_advisor_json, tools_suggest_patches. The 2125 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)

@ycbuzi

ycbuzi commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Tested 6d5083ae85 merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Windows Server 2022 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 99% tests passed, 3 tests failed out of 7492; 99% tests passed, 2 tests failed out of 7492. 3 of the failing tests fail on main too. run
  • Windows Server 2025 (GitHub-hosted runner), full build, WinLibs GCC 15.2.0: 100% tests passed, 0 tests failed out of 7492; 100% tests passed, 0 tests failed out of 7492. run

GPU (software Vulkan): 4 GPU tests (AGC, Vulkan) passed twice on Mesa lavapipe (Mesa 25.2.8-0ubuntu0.24.04.5 (LLVM 20.1.2)) on a GitHub-hosted Ubuntu 24.04 runner, with the Khronos validation layer on and the shader cache off, alongside main 76d0a4a7dc: no Vulkan validation message appears that main does not also produce. run

Not covered: GPU hardware. lavapipe runs Vulkan on the CPU, so this says nothing about how real GPU drivers handle the changed paths.

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@ligmaSec ligmaSec 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.

I compiled and ran the exact HostReport and HostReportVulkan fixtures on Linux. Both passed, including the decimal MoltenVK version and driver-ID routing checks. The Vulkan facts fixture uses mock properties. The trial merge onto c1601e56d5 was clean. Please put the update to docs/dev/debt/libSceAgcDriver.md in a debt fragment. The native MoltenVK report in the PR is from the author.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit 8371a65 into boykopovar:main Dec 4, 2026
14 of 15 checks passed
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.

7 participants