[Bf-blender-cvs] [fc0b8cb0859] temp-vulkan-shader: Fix compilation vk_mem_alloc on Apple.

Jeroen Bakker noreply at git.blender.org
Tue Nov 22 17:01:39 CET 2022


Commit: fc0b8cb08590ec8f4b5a13488c91f5bfd1db51ab
Author: Jeroen Bakker
Date:   Tue Nov 22 12:32:06 2022 +0100
Branches: temp-vulkan-shader
https://developer.blender.org/rBfc0b8cb08590ec8f4b5a13488c91f5bfd1db51ab

Fix compilation vk_mem_alloc on Apple.

===================================================================

M	extern/vulkan_memory_allocator/CMakeLists.txt
M	extern/vulkan_memory_allocator/vk_mem_alloc_impl.cc

===================================================================

diff --git a/extern/vulkan_memory_allocator/CMakeLists.txt b/extern/vulkan_memory_allocator/CMakeLists.txt
index ccfe0375f52..c90c66ea48d 100644
--- a/extern/vulkan_memory_allocator/CMakeLists.txt
+++ b/extern/vulkan_memory_allocator/CMakeLists.txt
@@ -25,6 +25,7 @@ set(INC
 
 set(INC_SYS
   ${VULKAN_INCLUDE_DIRS}
+  ${MOLTENVK_INCLUDE_DIRS}
 )
 
 set(SRC
diff --git a/extern/vulkan_memory_allocator/vk_mem_alloc_impl.cc b/extern/vulkan_memory_allocator/vk_mem_alloc_impl.cc
index eafa99738e6..6e517ba9db2 100644
--- a/extern/vulkan_memory_allocator/vk_mem_alloc_impl.cc
+++ b/extern/vulkan_memory_allocator/vk_mem_alloc_impl.cc
@@ -1,6 +1,12 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later
  * Copyright 2022 Blender Foundation. All rights reserved. */
 
+#ifdef __APPLE__
+#  include <MoltenVK/vk_mvk_moltenvk.h>
+#else
+#  include <vulkan/vulkan.h>
+#endif
+
 #define VMA_IMPLEMENTATION
 
 #include "vk_mem_alloc.h"



More information about the Bf-blender-cvs mailing list