File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ if (PATHFINDER_BACKEND_VULKAN)
4848
4949 # Don't use add_compile_definitions, which doesn't propagate to parent projects.
5050 target_compile_definitions (pathfinder PRIVATE PATHFINDER_USE_VULKAN)
51+
52+ # Enable this for Vulkan 1.3 and higher on macOS.
53+ if (APPLE )
54+ target_compile_definitions (pathfinder PRIVATE PATHFINDER_VKB_ENABLE_PORTABILITY)
55+ endif ()
5156else ()
5257 message ("[Pathfinder] Disabled Vulkan backend" )
5358endif ()
Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ void WindowBuilderVk::create_instance() {
189189 const auto extensions = get_required_instance_extensions ();
190190 instance_info.enabledExtensionCount = static_cast <uint32_t >(extensions.size ());
191191 instance_info.ppEnabledExtensionNames = extensions.data ();
192+ #ifdef PATHFINDER_VKB_ENABLE_PORTABILITY
193+ instance_info.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
194+ #endif
192195
193196 VkDebugUtilsMessengerCreateInfoEXT debug_create_info;
194197 if (enable_validation_layers_) {
@@ -390,6 +393,10 @@ std::vector<const char *> WindowBuilderVk::get_required_instance_extensions() {
390393 extensions.push_back (VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
391394 }
392395
396+ #ifdef PATHFINDER_VKB_ENABLE_PORTABILITY
397+ extensions.push_back (VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
398+ #endif
399+
393400 return extensions;
394401}
395402
You can’t perform that action at this time.
0 commit comments