Vulkan: Fix compilation issue macOs due to renamed variable

Pull Request: https://projects.blender.org/blender/blender/pulls/123503
This commit is contained in:
Jeroen Bakker
2024-06-20 19:21:47 +02:00
committed by Jeroen Bakker
parent 9c4e56e307
commit a7a554479f
2 changed files with 4 additions and 4 deletions

View File

@@ -90,8 +90,7 @@ if(WITH_OPENGL_BACKEND)
endif()
if(WITH_VULKAN_BACKEND)
if(APPLE)
if (WITH_VULKAN_MOLTENVK)
list(APPEND INC_SYS
PUBLIC ${MOLTENVK_INCLUDE_DIRS}
)
@@ -99,6 +98,7 @@ if(WITH_VULKAN_BACKEND)
list(APPEND LIB
${MOLTENVK_LIBRARIES}
)
add_definitions(-DWITH_VULKAN_MOLTENVK)
endif()
list(APPEND SRC

View File

@@ -1054,12 +1054,12 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
if (vulkan_device->has_extensions({VK_KHR_MAINTENANCE_4_EXTENSION_NAME})) {
required_device_extensions.push_back(VK_KHR_MAINTENANCE_4_EXTENSION_NAME);
}
#ifdef VK_MVK_MOLTENVK_EXTENSION_NAME
#ifdef WITH_VULKAN_MOLTENVK
/* According to the Vulkan specs, when `VK_KHR_portability_subset` is available it should be
* enabled. See
* https://vulkan.lunarg.com/doc/view/1.2.198.1/mac/1.2-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pProperties-04451*/
if (vulkan_device->has_extensions({VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME})) {
extensions_device.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
required_device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
}
#endif
vulkan_device->ensure_device(required_device_extensions, optional_device_extensions);