macOS: allow startup without optional Vulkan shader features #633
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!633
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/633/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?
@carbonimax on GitHub · 2026-09-16 11:33 UTC · original
carbonimax:fix/macos-optional-vulkan-features→main· +553 −385 · 10 files · 2 commits · closed without mergingOn Apple M4 Pro with MoltenVK 1.4.2, Kyty rejects the GPU with
“Could not find suitable device” because
shaderBufferInt64AtomicsandshaderCullDistanceare required unconditionally.Make these features optional during macOS device selection and enable
them only when supported. Pass the enabled features to the shader
compiler, which explicitly rejects shaders requiring an unavailable
feature rather than emitting unsupported SPIR-V.
Windows/Linux device-selection requirements remain unchanged.
Related to #398.
Validation
kyty_emulatorandshader_cfg_testsfor macOS x86_64.covering supported and unsupported feature combinations.
normalized existing formatting in the touched source files.
VkDevicecreation and swapchaininitialization now succeed.
Limitations
This does not emulate either feature or establish compatibility with
the game. The game proceeds past graphics initialization, then encounters
a separate CPU exception at an SSE4a instruction.
Windows/Linux builds have not been tested. The additional GPU test target
could not be built because of an existing
uintptr_t/uint64_tinitializerlist mismatch in
ShaderRecompilerComputeTests.cpp.AI assistance
AI assistance was used for implementation, tests and this description.
Human code review is pending.
@coderabbitai[bot] on GitHub · 2026-09-16 11:33 UTC · original · edited 2026-10-13 22:44 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
29e6beab-3184-4083-893d-d49df537ad07📥 Commits
Reviewing files that changed from the base of the PR and between d584eb78076b94edba79ea9240bb7a36b8fbf93d and bd71c6f5719e6bd9e3cd1cc1cef6fbecb25eacca.
📒 Files selected for processing (4)
src/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/shader/recompiler/backend/spirv/SpirvEmitter.cppsrc/graphics/shader/shader.htests/shaderCfgTests.cpp🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough
The change adds Vulkan capability flags for shader buffer 64-bit atomics and cull distance. Device creation queries and records feature support.
ProgramCachepasses these capabilities into shader compilation. SPIR-V emission rejects unsupported shader requirements. Image-view minimum-LOD requests now require recorded support. Tests cover supported and unsupported shader features.Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
bd71cThe change allows supported macOS devices to start while rejecting shaders that require unavailable Vulkan features. Current evidence supports merge readiness.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 15.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 9 files. (1 skipped: 1 too large.)
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
Comment
@coderabbitai helpto get the list of available commands.@carbonimax on GitHub · 2026-10-01 17:39 UTC · original
CI update: Windows and Linux builds pass. The macOS job builds successfully, then fails in the unchanged
memory_trackertest (fixed VirtualAlloc failed), with 12/13 tests passing. Local x86_64 Release build and shader_cfg_tests pass for this head. The macOS job on main44798085also fails inpage_manageron fixed low mach_vm_allocate. These PRs do not modify the reservation tests or their implementation.I tried rerunning the failed job, but GitHub requires repository admin rights. Could a maintainer rerun the failed macOS job? No reservation-code workaround is included in this PR.
@carbonimax on GitHub · 2026-10-01 19:58 UTC · original
The macOS CI reservation failure is now addressed by a test-only fix. The tests no longer assume that the low address 0x200010000 is free: Mach chooses available memory while preserving the offset within the 4 MiB tracker region and checking that the allocation remains in the valid low guest range. The extended-range test keeps its fixed address.
A regression case deliberately occupies the preferred address, verifies relocation without overwriting that mapping, and retains the existing protection and region-boundary assertions. Both memory_tracker and page_manager fail with the fixed-address allocator and pass with the corrected allocator (2/2), on the same tests. The tested memory sources and helper are identical across #633, #643 and #741. No emulator runtime or submission protocol change is included.
The updated head triggers a fresh CI run; local success is not being reported as a GitHub CI result.
@Nmzik on GitHub · 2026-10-21 19:42 UTC · original
Duplicate of #1547.
Pull request closed