Add macOS runtime support (skip unavailable mesh shaders and ray tracing)#22
Open
ca1773130n wants to merge 1 commit intonvpro-samples:mainfrom
Open
Add macOS runtime support (skip unavailable mesh shaders and ray tracing)#22ca1773130n wants to merge 1 commit intonvpro-samples:mainfrom
ca1773130n wants to merge 1 commit intonvpro-samples:mainfrom
Conversation
…navailable - Guard mesh shader pipeline creation with #ifndef __APPLE__ - Guard all RTX acceleration structure initialization/deinitialization - Skip initRtDescriptorSet and initRtPipeline on macOS - Use VK_API_VERSION_1_2 for VMA on macOS (MoltenVK compatibility) - Default to PIPELINE_VERT on macOS since mesh shaders unavailable - Add parallel execution fallbacks for Apple clang (std::execution::par_unseq) - Guard mesh shader stage flags in pipeline barriers and push constants Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Cameleon X <ca1773130n@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds macOS runtime support for vk_gaussian_splatting by gracefully handling unavailable Vulkan extensions (mesh shaders, ray tracing) on MoltenVK.
Changes
src/gaussian_splatting.cpp): Skip mesh shader pipeline creation on macOS with#ifndef __APPLE__src/gaussian_splatting.cpp): Skip ray tracing initialization/deinitialization on macOSsrc/gaussian_splatting.cpp,src/splat_set_vk.cpp): Conditionally includeVK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXTsrc/gaussian_splatting.cpp): Conditionally includeVK_SHADER_STAGE_MESH_BIT_EXTsrc/main.cpp): Make mesh shader, ray tracing, and other unavailable extensions optional on macOSsrc/parameters.cpp): Default toPIPELINE_VERTon macOS since mesh shaders unavailablesrc/splat_sorter_async.cpp): Fallback for Apple clang lackingstd::execution::par_unseqsrc/gaussian_splatting.cpp): UseVK_API_VERSION_1_2for VMA on macOSTesting
Tested on:
Successfully built and ran with the vertex shader rendering pipeline.
Notes
#ifdef __APPLE__or#ifndef __APPLE__to avoid affecting other platformsRelated
This PR depends on nvpro_core2 macOS support: nvpro-samples/nvpro_core2#12