macos: start on conformant Vulkan drivers (KosmicKrisp) without portability_subset and fillModeNonSolid #1669
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!1669
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1669/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?
@wuboo on GitHub · 2026-10-18 18:43 UTC · original
wuboo:pr/kk-device→main· +128 −27 · 6 files · 2 commits · closed without mergingWhat
Two small device-selection/creation fixes so the emulator can create a device on KosmicKrisp (Mesa's Vulkan 1.3-conformant driver for Apple GPUs), which is the driver the maintainers suggested for macOS:
macos: enable VK_KHR_portability_subset only when the selected device exposes it- the extension was pushed unconditionally on__APPLE__. MoltenVK needs it, but a conformant driver does not expose it andvkCreateDevicefails withERROR_EXTENSION_NOT_PRESENT. It is now appended after device selection, next to the other optional extensions, when the chosen device reports it. MoltenVK behaviour is unchanged.graphics: make fillModeNonSolid optional and fall back to filled polygons- KosmicKrisp does not exposefillModeNonSolid. On Apple the missing feature is now a warning at selection instead of a rejection, the feature is enabled only when the device reports it (GraphicContext::fill_mode_non_solid_enabled), and line/point polygon modes resolve toeFillwithout it. Other platforms still require the feature.ResolvePolygonModemoved topipeline/polygonMode.hso it can be unit tested.How tested
polygon_mode(tests/PolygonModeTests.cpp): point/line preserved with the feature, fall back to fill without it, disabled/culled cases stay fill. Reverting the fallback (if (false)) makes it abort (rc 134).cteston this branch vs. origin/main (099de8de) on an M3 Max, macOS 26: identical results (39 pass; the same 19 GPU tests fail on both because no Vulkan loader is available in the test environment) plus the newpolygon_modepassing. No new failures.SDL_VULKAN_LIBRARY/VK_DRIVER_FILES) device selection andvkCreateDevicenow succeed,VK_KHR_portability_subsetis not requested, and the fill-mode fallback is taken ("fillModeNonSolid is not supported" warning). 2/2 starts identical. The emulator then stops a few seconds later on an unrelated issue (agc.cpp:4150 address != DriverDmemBase, the fixed direct-memory base cannot be mapped), so no frames yet.nullDescriptor, before any of the code touched here. The portability-subset path for MoltenVK is therefore only covered by review (the extension is still appended whenever the selected device reports it).What is still needed on KosmicKrisp
This PR does not make
mainstart on macOS drivers by itself. Today device selection also rejects both MoltenVK and KosmicKrisp forVK_EXT_image_view_min_lodandshaderBufferInt64Atomics(neither driver exposes them). That is covered by #1547 (demotes both to warnings, minLod remap fallback) and #1314 (full min-LOD remap with shader-side handling). This PR is independent of both (no textual conflicts with #1547; checked withgit merge-tree) and complements them. #1590 already madefragmentShaderBarycentricoptional, which KosmicKrisp also lacks.@coderabbitai[bot] on GitHub · 2026-10-18 18:45 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
1dce02ee-be47-42e4-ad1b-94e4113cd656📥 Commits
Reviewing files that changed from the base of the PR and between
099de8dea6andc473839942.📒 Files selected for processing: 6
CMakeLists.txtsrc/graphics/host_gpu/graphicContext.hsrc/graphics/host_gpu/renderer/pipeline/pipelineCache.cppsrc/graphics/host_gpu/renderer/pipeline/polygonMode.hsrc/graphics/presentation/window/vulkanWindow.cpptests/PolygonModeTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
The change records whether the host supports non-solid fill modes and uses that capability when resolving polygon modes. On macOS, device selection no longer rejects devices without non-solid fill support, and the portability subset extension is added only when advertised. Other platforms still require non-solid fill support. New tests cover polygon-mode resolution and are registered with CTest.
Suggested reviewers:
nmzik,m1abdullahhPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
c4738No concrete issue remains that should delay merging after normal checks.
Pre-merge checks:
4 ·
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 13.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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.Pull request closed