diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-04 11:31:51 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-04 11:31:51 +0200 |
commit | 643da5dfad6158a1c63cae14fb2ecf7769337df8 (patch) | |
tree | 1d828f7e5ca53f67db2703a52013ad4a9a752a79 /drivers/vulkan/rendering_context_driver_vulkan.cpp | |
parent | 6a13fdcae3662975c101213d47a1eb3a7db63cb3 (diff) | |
parent | e018eabe1ebc6c7519409d19e7028bb91965df5b (diff) | |
download | redot-engine-643da5dfad6158a1c63cae14fb2ecf7769337df8.tar.gz |
Merge pull request #93331 from dsnopek/macos-fix-use-volk
Fix building with `use_volk=yes` on MacOS
Diffstat (limited to 'drivers/vulkan/rendering_context_driver_vulkan.cpp')
-rw-r--r-- | drivers/vulkan/rendering_context_driver_vulkan.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_context_driver_vulkan.cpp b/drivers/vulkan/rendering_context_driver_vulkan.cpp index 7cba820978..fe2ff5e0da 100644 --- a/drivers/vulkan/rendering_context_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_context_driver_vulkan.cpp @@ -102,6 +102,10 @@ Error RenderingContextDriverVulkan::_initialize_instance_extensions() { // This extension allows us to use the properties2 features to query additional device capabilities. _register_requested_instance_extension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, false); +#if defined(USE_VOLK) && (defined(MACOS_ENABLED) || defined(IOS_ENABLED)) + _register_requested_instance_extension(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, true); +#endif + // Only enable debug utils in verbose mode or DEV_ENABLED. // End users would get spammed with messages of varying verbosity due to the // mess that thirdparty layers/extensions and drivers seem to leave in their @@ -360,6 +364,11 @@ Error RenderingContextDriverVulkan::_initialize_instance() { VkInstanceCreateInfo instance_info = {}; instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + +#if defined(USE_VOLK) && (defined(MACOS_ENABLED) || defined(IOS_ENABLED)) + instance_info.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; +#endif + instance_info.pApplicationInfo = &app_info; instance_info.enabledExtensionCount = enabled_extension_names.size(); instance_info.ppEnabledExtensionNames = enabled_extension_names.ptr(); |