Jamie Madill | dac952e | 2020-05-05 12:17:44 -0400 | [diff] [blame] | 1 | # Copyright 2020 The ANGLE Project Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | # |
| 5 | # Custom GN integration for VulkanMemoryAllocator. |
| 6 | |
| 7 | config("vulkan_memory_allocator_config") { |
| 8 | include_dirs = [ "src" ] |
| 9 | if (is_clang) { |
| 10 | cflags_cc = [ |
| 11 | "-Wno-implicit-fallthrough", |
| 12 | "-Wno-nullability-completeness", |
Jamie Madill | 67dd6ca | 2020-08-26 00:58:13 -0400 | [diff] [blame] | 13 | "-Wno-suggest-destructor-override", |
| 14 | "-Wno-suggest-override", |
Jamie Madill | dac952e | 2020-05-05 12:17:44 -0400 | [diff] [blame] | 15 | "-Wno-unused-private-field", |
| 16 | "-Wno-unused-variable", |
| 17 | ] |
| 18 | } |
| 19 | if (is_win && !is_clang) { |
| 20 | cflags_cc = [ |
| 21 | "/wd4189", # local variable is initialized but not referenced |
| 22 | ] |
| 23 | } |
Peng Huang | c039c22 | 2021-01-27 15:23:45 -0500 | [diff] [blame] | 24 | defines = [ |
| 25 | "VMA_DYNAMIC_VULKAN_FUNCTIONS=0", |
| 26 | "VMA_STATIC_VULKAN_FUNCTIONS=0", |
| 27 | ] |
Jamie Madill | dac952e | 2020-05-05 12:17:44 -0400 | [diff] [blame] | 28 | } |
| 29 | |
Peng Huang | c039c22 | 2021-01-27 15:23:45 -0500 | [diff] [blame] | 30 | # TODO: remove this target when chrome and ANGLE are updated to use |
| 31 | # vulkan_memory_allocator_with_usage |
Jamie Madill | dac952e | 2020-05-05 12:17:44 -0400 | [diff] [blame] | 32 | source_set("vulkan_memory_allocator") { |
Jamie Madill | 67dd6ca | 2020-08-26 00:58:13 -0400 | [diff] [blame] | 33 | sources = [ "src/vk_mem_alloc.h" ] |
Jamie Madill | dac952e | 2020-05-05 12:17:44 -0400 | [diff] [blame] | 34 | public_configs = [ ":vulkan_memory_allocator_config" ] |
| 35 | } |
Peng Huang | c039c22 | 2021-01-27 15:23:45 -0500 | [diff] [blame] | 36 | |
| 37 | source_set("vulkan_memory_allocator_with_usage") { |
| 38 | sources = [ |
Peng Huang | c039c22 | 2021-01-27 15:23:45 -0500 | [diff] [blame] | 39 | "src/vk_mem_alloc.h", |
Peng Huang | b1d65a2 | 2021-01-27 20:00:45 -0500 | [diff] [blame] | 40 | "vma.cpp", |
Peng Huang | c039c22 | 2021-01-27 15:23:45 -0500 | [diff] [blame] | 41 | ] |
Peng Huang | b1d65a2 | 2021-01-27 20:00:45 -0500 | [diff] [blame] | 42 | deps = [ "//third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ] |
Peng Huang | c039c22 | 2021-01-27 15:23:45 -0500 | [diff] [blame] | 43 | public_configs = [ ":vulkan_memory_allocator_config" ] |
| 44 | } |