vulkan: accept MoltenVK devices without minLod, buffer int64 atomics, and cull distance (#1068) #2402
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2402
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2402/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mitsa-ng on GitHub · 2026-11-19 01:34 UTC · original
vulkan-moltenvk-features→main· +36 −8 · 2 files · 1 commits · closed without mergingFixes #1068.
Problem
The official macOS build rejects the only GPU on every Mac and exits with "Could not find suitable device" before a game loads. Stock MoltenVK (the v1.4.2 the release workflow bundles) never reports image view minLod, shaderBufferInt64Atomics, or shaderCullDistance, and all three are unconditional selection requirements:
check_feature(min_lod.minLod, ...)check_feature(features12.shaderBufferInt64Atomics, ...)check_feature(device_features2.features.shaderCullDistance, ...)Change
On
__APPLE__, treat the three exactly like depthClipEnable/depthBounds today: log them at selection, request only what the device supports at creation (features12.shaderBufferInt64Atomics,shaderCullDistance), dropVK_EXT_image_view_min_lodfrom the required device extensions, unlink its feature struct from the creation chain, and skip theVkImageViewMinLodCreateInfoEXTchain inimageView.cpp(sampling clamps at the base level instead). Non-Apple paths are unchanged: selection still requires all three, so the assignments are no-ops there.Evidence
On an Apple M2 (macOS 27.2, Rosetta 2) with the same MoltenVK v1.4.2 release tarball the workflow bundles (SHA-256 verified): instance creation, device enumeration, and selection now pass all three checks; the
device_creationmode ofshader_recompiler_compute_testsadvances past them to the next MoltenVK gap (nullDescriptor, a separate limitation outside this issue's scope). macOS x86_64 and Windows builds are green on my fork's CI (same change set).Note: shaders that actually emit CullDistance outputs or 64-bit buffer atomics may still fail per-pipeline on MoltenVK; per the issue, capability fallbacks in the recompiler are follow-up work. Most titles do not use them.
Written with AI assistance (ZCode); the change was built and tested by the author on real hardware.
@coderabbitai[bot] on GitHub · 2026-11-19 01:39 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
On macOS, device selection logs missing support for image-view minimum LOD, shader buffer 64-bit atomics, and shader cull distance without rejecting the device. Device creation uses the queried support values for the two shader features. The image-view minimum-LOD extension is required only on non-macOS platforms, and Apple builds omit minimum-LOD view setup. Non-macOS feature checks and minimum-LOD setup remain in place.
Suggested reviewers:
nmzik,senaxxChange: Bug fix · Severity of issue fixed: High
Merge Risk:
Minimal · up to
9ea0dThis change lets Apple devices running MoltenVK pass Vulkan device selection when they lack min-LOD, 64-bit buffer atomics, or cull distance support. Non-Apple platforms keep their current requirements. Some shaders may still fail per pipeline, which the PR documents as follow-up work. No merge-blocking risk was identified.
Pre-merge checks:
4
#1068] Requirements: on APPLE, stop rejecting devices for image view minLod, shaderBufferInt64Atomics, and shaderCullDistance; request only supported shader features; drop VK_EXT_image_view_min_l…#1068. Each change is either a Apple-only logging change, an Apple-only creation c…Full details: Title check
Explanation
The title names the main change: accepting MoltenVK devices that lack minLod, buffer int64 atomics, and cull distance support. It also matches the changeset, which relaxes these three selection checks on macOS and drops the related extension and chain. The issue reference (
#1068) is included and is accurate.Full details: Description check
Explanation
The description states the problem (the macOS build rejects MoltenVK GPUs over three unsupported features), the change (Apple-only relaxation of the three checks, extension removal, chain changes, and skipping the minLod image-view chain), and the testing evidence. It matches the raw summary of file changes.
Full details: Linked Issues check
Explanation
[
#1068] Requirements: on APPLE, stop rejecting devices for image view minLod, shaderBufferInt64Atomics, and shaderCullDistance; request only supported shader features; drop VK_EXT_image_view_min_lod from required extensions and the creation chain; skip the minLod image-view chain. Evidence: the reviewed vulkanWindow.cpp selection code (read directly) wraps check_feature for minLod, shaderBufferInt64Atomics, and shaderCullDistance in#ifdefined(APPLE) blocks that only log the missing feature. The#elsebranches keep the original check_feature calls, so non-Apple selection is unchanged. The creation-path changes (conditional shaderBufferInt64Atomics, reported shaderCullDistance value, macOS extension removal, unlinked min-LOD feature struct) and the imageView.cpp chain skip were read only from the supplied change summary. The file read was truncated before the creation section, so those parts were not verified against source. The subgroup vertex-stage failure and shader fallbacks for CullDistance/Int64Atomics are excluded by the PR objectives and are not required here.Full details: Out of Scope Changes check
Explanation
All changes in the reviewed diff apply to the device selection, device creation, and minLod image-view paths named in
#1068. Each change is either a Apple-only logging change, an Apple-only creation change, or the Apple-only skip of the minLod chain in imageView.cpp. Non-Apple behavior is unchanged per the selection code. No unrelated change was identified in the verified selection hunks. The creation and imageView.cpp hunks were assessed from the change summary only, because the source read was truncated.Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
cd0fd18d-b28f-46dd-b538-27ec45805b46Reviewing files that changed from the base of the PR and between
a90be8dd73and9ea0de5cdd.src/graphics/host_gpu/renderer/image/imageView.cppsrc/graphics/presentation/window/vulkanWindow.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@mitsa-ng on GitHub · 2026-11-19 09:08 UTC · original
CI evidence: this exact branch is green on all three platforms on my fork (same workflow): run 44490155357 — Windows, Linux, macOS all success. Also verified on real hardware (Apple M2, Rosetta 2, MoltenVK v1.4.2 release tarball with the workflow's SHA-256) that selection passes the three relaxed checks; the
device_creationmode ofshader_recompiler_compute_testsnow advances past them.Pull request closed