Autodesk: Lavapipe support on macOS #3121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
⚠ Note: This PR is for feature-hgi-vulkan branch.
The main goal is to enable Lavapipe (Vulkan driver) as a software rasterizer on all supported platforms, for testing purposes. This PR addresses macOS support by fixing some Vulkan instance and device creation issues/bugs.
Enabling MoltenVK support could be useful for testing, but it's not a priority, and there are issues with geometry shaders support preventing that, which this PR does not address.
HgiVulkan
currently assumes that geometry shaders are always supported, although it is actually an optional feature. If a feature check is added, then this could be fixed.Lavapipe doesn't support Metal surfaces (
VK_EXT_metal_surface
), but display still works thanks to theHgiInterop
Vulkan path:VK_EXT_metal_surface
extension when using Lavapipe, since it doesn't support it.VK_KHR_swapchain
device extension optional. It is not available if Lavapipe is built without any selected platforms, as it won't support any surface output.Update Vulkan support to the latest recommendations for macOS, based on this document from LunarG:
VK_MVK_macos_surface
instance extension withVK_EXT_metal_surface
.VK_KHR_portability_enumeration
instance extension on macOS. This is required for MoltenVK, but not for Lavapipe (it's a Vulkan 1.3 conformant implementation).VK_EXT_descriptor_indexing
is available on Lavapipe and MoltenVK (partial support), remove the conditional compilation for macOS.With these changes, using Lavapipe, USDView launches and can display some test scenes, although more testing is required to identify remaining issues. Unit tests also all pass, although many graphics tests are skipped on macOS.
Fixes Issue(s)