diff --git a/.gitmodules b/.gitmodules index 0e4365649b..b46286b7f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -88,6 +88,3 @@ [submodule "ui/thirdparty/httplib"] path = ui/thirdparty/httplib url = https://github.com/yhirose/cpp-httplib -[submodule "hw/xbox/nv2a/pgraph/vk/thirdparty/VulkanMemoryAllocator"] - path = thirdparty/VulkanMemoryAllocator - url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator diff --git a/configure b/configure index b76dade5cb..90744ca8ce 100755 --- a/configure +++ b/configure @@ -237,7 +237,7 @@ else git_submodules_action="ignore" fi -git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu thirdparty/VulkanMemoryAllocator" +git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu" git="git" # Don't accept a target_list environment variable. diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index e26266c0d4..cd12ea384f 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -32,7 +32,6 @@ submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloa # xemu extras submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig" submodules="$submodules hw/xbox/nv2a/pgraph/thirdparty/nv2a_vsh_cpu" -submodules="$submodules thirdparty/VulkanMemoryAllocator" sub_deinit="" diff --git a/scripts/gen-license.py b/scripts/gen-license.py index 3389e68a87..1eb2f49945 100755 --- a/scripts/gen-license.py +++ b/scripts/gen-license.py @@ -248,7 +248,7 @@ Lib('volk', 'https://github.com/zeux/volk', Lib('VulkanMemoryAllocator', 'https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator', mit, 'https://raw.githubusercontent.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/master/LICENSE.txt', ships_static=all_platforms, - submodule=Submodule('thirdparty/VulkanMemoryAllocator') + submodule=Submodule('subprojects/VulkanMemoryAllocator.wrap') ), Lib('SPIRV-Reflect', 'https://github.com/KhronosGroup/SPIRV-Reflect', diff --git a/subprojects/VulkanMemoryAllocator.wrap b/subprojects/VulkanMemoryAllocator.wrap new file mode 100644 index 0000000000..26f6a0c8cd --- /dev/null +++ b/subprojects/VulkanMemoryAllocator.wrap @@ -0,0 +1,4 @@ +[wrap-git] +url=https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator +revision=v3.2.0 +depth=1 diff --git a/thirdparty/VulkanMemoryAllocator b/thirdparty/VulkanMemoryAllocator deleted file mode 160000 index 3bab692498..0000000000 --- a/thirdparty/VulkanMemoryAllocator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3bab6924988e5f19bf36586a496156cf72f70d9f diff --git a/thirdparty/meson.build b/thirdparty/meson.build index 09cb9311a8..56ef6443ea 100644 --- a/thirdparty/meson.build +++ b/thirdparty/meson.build @@ -11,19 +11,27 @@ volk = declare_dependency(compile_args: ['-DVK_NO_PROTOTYPES'], debug_vma = false vma_defns = [ - '-DVMA_STATIC_VULKAN_FUNCTIONS=0', - '-DVMA_DYNAMIC_VULKAN_FUNCTIONS=0', - ] + '-DVMA_STATIC_VULKAN_FUNCTIONS=0', + '-DVMA_DYNAMIC_VULKAN_FUNCTIONS=0', + ] if debug_vma - vma_defns += [ - '-DVMA_DEBUG_MARGIN=16', - '-DVMA_DEBUG_DETECT_CORRUPTION=1', - '-DVMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY=256', - ] + vma_defns += [ + '-DVMA_DEBUG_MARGIN=16', + '-DVMA_DEBUG_DETECT_CORRUPTION=1', + '-DVMA_DEBUG_MIN_BUFFER_IMAGE_GRANULARITY=256', + ] endif -libvma = static_library('vma', sources: 'vma.cc', cpp_args: vma_defns, include_directories: 'VulkanMemoryAllocator/include', dependencies: [vulkan, volk]) -vma = declare_dependency(compile_args: vma_defns, include_directories: 'VulkanMemoryAllocator/include', link_with: libvma) + +vma_subproj = cmake.subproject('VulkanMemoryAllocator') +libvma = static_library('vma', + sources: 'vma.cc', + cpp_args: vma_defns, + include_directories: vma_subproj.include_directories('VulkanMemoryAllocator'), + dependencies: [vulkan, volk]) +vma = declare_dependency(include_directories: vma_subproj.include_directories('VulkanMemoryAllocator'), + link_with: libvma, + dependencies: vulkan) spirv_reflect_opts = cmake.subproject_options() spirv_reflect_opts.add_cmake_defines({'SPIRV_REFLECT_STATIC_LIB': 'ON'})