@@ -69,6 +69,10 @@ def get_vulkan_preprocessor_flags(no_volk, is_fbcode):
6969 if debug_mode :
7070 VK_API_PREPROCESSOR_FLAGS += ["-DVULKAN_DEBUG" ]
7171
72+ vma_dep = read_config ("etvk" , "vma_dep" , "xplat" )
73+ if vma_dep == "instantiated" :
74+ VK_API_PREPROCESSOR_FLAGS += ["-DETVK_USE_META_VMA" ]
75+
7276 if force_no_extensions :
7377 VK_API_PREPROCESSOR_FLAGS += ["-DETVK_FORCE_NO_EXTENSIONS" ]
7478
@@ -152,6 +156,7 @@ def vulkan_spv_shader_lib(name, spv_filegroups, is_fbcode = False, no_volk = Fal
152156
153157def define_common_targets (is_fbcode = False ):
154158 debug_mode = read_config ("etvk" , "debug" , "0" ) == "1"
159+ vma_dep = read_config ("etvk" , "vma_dep" , "xplat" )
155160
156161 runtime .python_library (
157162 name = "gen_vulkan_spv_lib" ,
@@ -185,9 +190,14 @@ def define_common_targets(is_fbcode = False):
185190
186191 suffix = "_no_volk" if no_volk else ""
187192
188- VK_API_DEPS = [
189- "fbsource//third-party/VulkanMemoryAllocator/3.2.0:VulkanMemoryAllocator_xplat" ,
190- ]
193+ if vma_dep == "instantiated" :
194+ VK_API_DEPS = [
195+ "fbsource//third-party/VulkanMemoryAllocator/3.0.1:VulkanMemoryAllocatorInstantiated" ,
196+ ]
197+ else :
198+ VK_API_DEPS = [
199+ "fbsource//third-party/VulkanMemoryAllocator/3.2.0:VulkanMemoryAllocator_xplat" ,
200+ ]
191201
192202 default_deps = []
193203 android_deps = ["fbsource//third-party/toolchains:android" ]
0 commit comments