You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple compatibility fixes for driver optionality (MoltenVK & KosmicKrisp) (#1435)
* Change VKB_ENABLE_PORTABILITY from CMake declaration to option (default ON)
* Protect MoltenVK-specific code with VKB_ENABLE_PORTABILITY guards
* Remove unneeded Apple-specific #ifdefs from descriptor_indexing sample
* Update profiles sample to not assume MoltenVK portability driver on Apple
* Fix [hpp_]hello_triangle samples to check for null objects on error termination
* Improve CMake comments+messages for iOS config and build framework
* Update copyright header date in vulkan_samples CMakeLists
* Update profiles sample: portability subset, update-after-bind pool, clean-up on exit
* Always check for Portability at runtime and update comments to not assume MoltenVK
* Revert VKB_ENABLE_PORTABILITY check in global_options.cmake and add comments for driver optionality
Copy file name to clipboardExpand all lines: bldsys/cmake/global_options.cmake
+16-8Lines changed: 16 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,13 @@ endif()
33
33
34
34
if(APPLE)
35
35
cmake_minimum_required(VERSION3.24)
36
-
set(VKB_ENABLE_PORTABILITY ONCACHEBOOL"Enable portability enumeration and subset features in the framework. This is required to be set when running on Apple platforms."FORCE)
36
+
option(VKB_ENABLE_PORTABILITY"Enable portability enumeration and subset features in the framework. This is default ON for Apple platforms."ON)
37
37
38
+
# the following assumes MoltenVK is used for these cases: a) standalone deployment on macOS (i.e. set USE_MoltenVK=ON), and b) for iOS deployment
39
+
# if this assumption changes (e.g. KosmicKrisp adds standalone or iOS support), then this section will require modification to handle optionality
// For the non-uniform indexing part, we allocate few descriptors, and for the streaming case, we allocate a fairly large ring buffer of descriptors we can play around with.
// On Apple Vulkan API <= 1.2.283 variable descriptor counts don't work, use pool size of max expected count x 2 (for 2 allocations). Fixed in later versions.
267
-
if (get_device().get_gpu().get_properties().apiVersion <= VK_MAKE_API_VERSION(0, 1, 2, 283))
0 commit comments