vulkan: Add Vulkan memory allocator

This commit is contained in:
GPUCode
2022-05-05 14:56:34 +03:00
parent bc440ce6a3
commit f6988d4a8e
4 changed files with 14 additions and 7 deletions

3
.gitmodules vendored
View File

@@ -55,3 +55,6 @@
[submodule "libyuv"]
path = externals/libyuv
url = https://github.com/lemenkov/libyuv.git
[submodule "externals/vma"]
path = externals/vma
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator

View File

@@ -264,6 +264,15 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU|SunOS)$")
set(PLATFORM_LIBRARIES rt)
endif()
if (ENABLE_VULKAN)
# Find the VulkanSDK
find_package(Vulkan REQUIRED)
find_library(SHADERC_LIB shaderc shaderc_shared)
# Include Vulkan Memory Allocator
add_subdirectory(externals/vma)
endif()
# Setup a custom clang-format target (if clang-format can be found) that will run
# against all the src files. This should be used before making a pull request.
# =======================================================================

1
externals/vma vendored Submodule

Submodule externals/vma added at 5ab8c1752a

View File

@@ -166,12 +166,6 @@ if(ARCHITECTURE_x86_64)
)
endif()
if (ENABLE_VULKAN)
# Find the VulkanSDK
find_package(Vulkan REQUIRED)
find_library(SHADERC_LIB shaderc shaderc_shared)
endif()
create_target_directory_groups(video_core)
target_link_libraries(video_core PUBLIC common core)
@@ -183,5 +177,5 @@ endif()
if (ENABLE_VULKAN)
target_include_directories(video_core PRIVATE ${Vulkan_INCLUDE_DIRS})
target_link_libraries(video_core PRIVATE ${Vulkan_LIBRARIES} ${SHADERC_LIB})
target_link_libraries(video_core PRIVATE ${Vulkan_LIBRARIES} ${SHADERC_LIB} vma)
endif()