Macos ios fixes (#1192)
* Configure MoltenVK to use a dedicated compute queue for compute[*] examples with sync barriers * Modify descriptorindexing example for iOS and variable descriptor count limitations on MoltenVK * Remove obsolete macOS #ifdefs no longer needed for modern MoltenVK versions * Update iOS project to fix missing vkloader.c reference and revise example list * Set required features and API version for VVL in debugprintf example * Remove unnecessary Apple-specific code from descriptorindexing example * Add Layer Settings capability to VulkanExampleBase::createInstance() * Replace setenv() in examples with Layer Settings configuration for macOS/iOS * Update comments in examples.h and fix missing initializer in computeraytracing example * Update imgui overlay and example to support iOS Simulator * Update more comments in examples.h and remove redundant initializers in deferred* examples * Separate variable descriptor count declarations for apple and non-apple platforms * Consolidate variable descriptor count declarations for apple vs. non-apple platforms * Configure MoltenVK with a dedicated compute queue in VulkanExampleBase() and remove from samples
This commit is contained in:
parent
e1c962289f
commit
9a562a5426
17 changed files with 221 additions and 83 deletions
111
apple/examples.h
111
apple/examples.h
|
|
@ -40,6 +40,11 @@
|
|||
# include "../examples/triangle/triangle.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. MoltenVK does not yet support Vulkan 1.3
|
||||
#ifdef MVK_trianglevulkan13
|
||||
# include "../examples/trianglevulkan13/trianglevulkan13.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_pipelines
|
||||
# include "../examples/pipelines/pipelines.cpp"
|
||||
#endif
|
||||
|
|
@ -72,6 +77,7 @@
|
|||
# include "../examples/texturecubemap/texturecubemap.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support cube map arrays.
|
||||
#ifdef MVK_texturecubemaparray
|
||||
# include "../examples/texturecubemaparray/texturecubemaparray.cpp"
|
||||
#endif
|
||||
|
|
@ -134,32 +140,31 @@
|
|||
# include "../examples/shadowmapping/shadowmapping.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support rendering to array (layered) attachments.
|
||||
#ifdef MVK_shadowmappingcascade
|
||||
# include "../examples/shadowmappingcascade/shadowmappingcascade.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support rendering to array (layered) attachments.
|
||||
#ifdef MVK_shadowmappingomni
|
||||
# include "../examples/shadowmappingomni/shadowmappingomni.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support arrays of samplers.
|
||||
#ifdef MVK_texturemipmapgen
|
||||
# include "../examples/texturemipmapgen/texturemipmapgen.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support blitting to linear tiled images.
|
||||
#ifdef MVK_screenshot
|
||||
# include "../examples/screenshot/screenshot.cpp"
|
||||
#endif
|
||||
|
||||
// Runs, but some Apple GPUs may not support stores and atomic operations in the fragment stage.
|
||||
// Not supported on iOS Simulator due to VkDeviceMemory resource limitations.
|
||||
#ifdef MVK_oit
|
||||
# include "../examples/oit/oit.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Sparse image binding and residency not supported by MoltenVK/Metal.
|
||||
#ifdef MVK_texturesparseresidency
|
||||
# include "../examples/texturesparseresidency/texturesparseresidency.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
// PERFORMANCE
|
||||
|
||||
|
|
@ -171,6 +176,7 @@
|
|||
# include "../examples/instancing/instancing.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support indirect drawing.
|
||||
#ifdef MVK_indirectdraw
|
||||
# include "../examples/indirectdraw/indirectdraw.cpp"
|
||||
#endif
|
||||
|
|
@ -179,11 +185,16 @@
|
|||
# include "../examples/occlusionquery/occlusionquery.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. MoltenVK/Metal does not support pipeline statistics.
|
||||
// Does not run. MoltenVK/Metal does not support pipeline statistics.
|
||||
#ifdef MVK_pipelinestatistics
|
||||
# include "../examples/pipelinestatistics/pipelinestatistics.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Sparse image binding and residency not supported by MoltenVK/Metal.
|
||||
#ifdef MVK_texturesparseresidency
|
||||
# include "../examples/texturesparseresidency/texturesparseresidency.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
// PHYSICALLY BASED RENDERING
|
||||
|
||||
|
|
@ -242,6 +253,7 @@
|
|||
# include "../examples/computecloth/computecloth.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support indirect drawing.
|
||||
#ifdef MVK_computecullandlod
|
||||
# include "../examples/computecullandlod/computecullandlod.cpp"
|
||||
#endif
|
||||
|
|
@ -262,14 +274,17 @@
|
|||
|
||||
// TESSELLATION
|
||||
|
||||
// Not supported on iOS Simulator which does not support tessellation shaders.
|
||||
#ifdef MVK_displacement
|
||||
# include "../examples/displacement/displacement.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support tessellation shaders.
|
||||
#ifdef MVK_terraintessellation
|
||||
# include "../examples/terraintessellation/terraintessellation.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support tessellation shaders.
|
||||
#ifdef MVK_tessellation
|
||||
# include "../examples/tessellation/tessellation.cpp"
|
||||
#endif
|
||||
|
|
@ -277,52 +292,52 @@
|
|||
|
||||
// RAY TRACING - Currently unsupported by MoltenVK/Metal
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingbasic
|
||||
# include "../examples/raytracingbasic/raytracingbasic.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingshadows
|
||||
# include "../examples/raytracingshadows/raytracingshadows.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingreflections
|
||||
# include "../examples/raytracingreflections/raytracingreflections.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingtextures
|
||||
# include "../examples/raytracingtextures/raytracingtextures.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingcallable
|
||||
# include "../examples/raytracingcallable/raytracingcallable.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingintersection
|
||||
# include "../examples/raytracingintersection/raytracingintersection.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracinggltf
|
||||
# include "../examples/raytracinggltf/raytracinggltf.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_rayquery
|
||||
# include "../examples/rayquery/rayquery.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingpositionfetch
|
||||
# include "../examples/raytracingpositionfetch/raytracingpositionfetch.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Missing Vulkan extensions for ray tracing
|
||||
// Does not run. Missing Vulkan extensions for ray tracing.
|
||||
#ifdef MVK_raytracingsbtdata
|
||||
# include "../examples/raytracingsbtdata/raytracingsbtdata.cpp"
|
||||
#endif
|
||||
|
|
@ -356,25 +371,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
// EFFECTS
|
||||
|
||||
#ifdef MVK_radialblur
|
||||
# include "../examples/radialblur/radialblur.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_bloom
|
||||
# include "../examples/bloom/bloom.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_parallaxmapping
|
||||
# include "../examples/parallaxmapping/parallaxmapping.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_sphericalenvmapping
|
||||
# include "../examples/sphericalenvmapping/sphericalenvmapping.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
// EXTENSIONS
|
||||
|
||||
// Does not run. Requires VK_EXT_conservative_rasterization.
|
||||
|
|
@ -390,6 +386,7 @@
|
|||
# include "../examples/inlineuniformblocks/inlineuniformblocks.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator which does not support rendering to array (layered) attachments.
|
||||
#ifdef MVK_multiview
|
||||
# include "../examples/multiview/multiview.cpp"
|
||||
#endif
|
||||
|
|
@ -401,7 +398,6 @@
|
|||
|
||||
// Runs on MoltenVK 1.2.5 or later with VK_KHR_shader_non_semantic_info extension and VK_LAYER_KHRONOS_validation enabled.
|
||||
// No VK_LAYER_KHRONOS_validation layer when using MoltenVK examples project, builds/runs fine using vulkanExamples project.
|
||||
// Enable VK_LAYER_KHRONOS_validation layer with khronos_validation.enables = VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT
|
||||
//#ifdef MVK_debugprintf
|
||||
//# include "../examples/debugprintf/debugprintf.cpp"
|
||||
//#endif
|
||||
|
|
@ -419,7 +415,8 @@
|
|||
# include "../examples/variablerateshading/variablerateshading.cpp"
|
||||
#endif
|
||||
|
||||
// Runs on macOS 11.0 or later with Metal argument buffers enabled. Not yet supported on iOS.
|
||||
// Runs on macOS 11.0 or later with Metal argument buffers enabled.
|
||||
// Supported on iOS (not Simulator) as of MoltenVK version 1.2.10 / Vulkan SDK 1.3.290
|
||||
#ifdef MVK_descriptorindexing
|
||||
# include "../examples/descriptorindexing/descriptorindexing.cpp"
|
||||
#endif
|
||||
|
|
@ -428,6 +425,10 @@
|
|||
# include "../examples/dynamicrendering/dynamicrendering.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_dynamicrenderingmultisampling
|
||||
# include "../examples/dynamicrenderingmultisampling/dynamicrenderingmultisampling.cpp"
|
||||
#endif
|
||||
|
||||
// Does not run. Requires VK_KHR_pipeline_library and VK_EXT_graphics_pipeline_library.
|
||||
#ifdef MVK_graphicspipelinelibrary
|
||||
# include "../examples/graphicspipelinelibrary/graphicspipelinelibrary.cpp"
|
||||
|
|
@ -448,17 +449,49 @@
|
|||
# include "../examples/shaderobjects/shaderobjects.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_hostimagecopy
|
||||
# include "../examples/hostimagecopy/hostimagecopy.cpp"
|
||||
#endif
|
||||
|
||||
// Not supported on iOS Simulator.
|
||||
#ifdef MVK_bufferdeviceaddress
|
||||
# include "../examples/bufferdeviceaddress/bufferdeviceaddress.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_timelinesemaphore
|
||||
# include "../examples/timelinesemaphore/timelinesemaphore.cpp"
|
||||
#endif
|
||||
|
||||
// Runs, but most VK_EXT_extended_dynamic_state3 features not supported on MoltenVK.
|
||||
#ifdef MVK_dynamicstate
|
||||
# include "../examples/dynamicstate/dynamicstate.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
// EFFECTS
|
||||
|
||||
#ifdef MVK_radialblur
|
||||
# include "../examples/radialblur/radialblur.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_bloom
|
||||
# include "../examples/bloom/bloom.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_parallaxmapping
|
||||
# include "../examples/parallaxmapping/parallaxmapping.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_sphericalenvmapping
|
||||
# include "../examples/sphericalenvmapping/sphericalenvmapping.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
// MISC
|
||||
|
||||
// Not supported on iOS Simulator which does not support indexed drawing with a non-zero base instance.
|
||||
#ifdef MVK_gears
|
||||
# include "../examples/gears/gears.cpp"
|
||||
# include "../examples/gears/vulkangear.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef MVK_vulkanscene
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue