Browse Source
Merge pull request #11188 from abouvier/vma-fix
vma: enable options everywhere
pull/15/merge
liamwhite
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
32 additions and
19 deletions
-
src/video_core/CMakeLists.txt
-
src/video_core/vulkan_common/vma.cpp
-
src/video_core/vulkan_common/vma.h
-
src/video_core/vulkan_common/vulkan.h
-
src/video_core/vulkan_common/vulkan_device.cpp
-
src/video_core/vulkan_common/vulkan_memory_allocator.cpp
-
src/video_core/vulkan_common/vulkan_wrapper.cpp
-
src/video_core/vulkan_common/vulkan_wrapper.h
|
|
@ -275,6 +275,8 @@ add_library(video_core STATIC |
|
|
vulkan_common/nsight_aftermath_tracker.cpp |
|
|
vulkan_common/nsight_aftermath_tracker.cpp |
|
|
vulkan_common/nsight_aftermath_tracker.h |
|
|
vulkan_common/nsight_aftermath_tracker.h |
|
|
vulkan_common/vma.cpp |
|
|
vulkan_common/vma.cpp |
|
|
|
|
|
vulkan_common/vma.h |
|
|
|
|
|
vulkan_common/vulkan.h |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
create_target_directory_groups(video_core) |
|
|
create_target_directory_groups(video_core) |
|
|
|
|
|
@ -2,7 +2,5 @@ |
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
|
#define VMA_IMPLEMENTATION
|
|
|
#define VMA_IMPLEMENTATION
|
|
|
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
|
|
|
|
|
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
|
|
|
|
|
|
|
|
|
|
|
|
#include <vk_mem_alloc.h>
|
|
|
|
|
|
|
|
|
#include "video_core/vulkan_common/vma.h"
|
|
|
@ -0,0 +1,11 @@ |
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project |
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later |
|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#include "video_core/vulkan_common/vulkan.h" |
|
|
|
|
|
|
|
|
|
|
|
#define VMA_STATIC_VULKAN_FUNCTIONS 0 |
|
|
|
|
|
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 |
|
|
|
|
|
|
|
|
|
|
|
#include <vk_mem_alloc.h> |
|
|
@ -0,0 +1,13 @@ |
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project |
|
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later |
|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#define VK_NO_PROTOTYPES |
|
|
|
|
|
#ifdef _WIN32 |
|
|
|
|
|
#define VK_USE_PLATFORM_WIN32_KHR |
|
|
|
|
|
#elif defined(__APPLE__) |
|
|
|
|
|
#define VK_USE_PLATFORM_METAL_EXT |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#include <vulkan/vulkan.h> |
|
|
@ -15,6 +15,7 @@ |
|
|
#include "common/polyfill_ranges.h"
|
|
|
#include "common/polyfill_ranges.h"
|
|
|
#include "common/settings.h"
|
|
|
#include "common/settings.h"
|
|
|
#include "video_core/vulkan_common/nsight_aftermath_tracker.h"
|
|
|
#include "video_core/vulkan_common/nsight_aftermath_tracker.h"
|
|
|
|
|
|
#include "video_core/vulkan_common/vma.h"
|
|
|
#include "video_core/vulkan_common/vulkan_device.h"
|
|
|
#include "video_core/vulkan_common/vulkan_device.h"
|
|
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
|
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
|
|
|
|
|
|
|
|
@ -22,8 +23,6 @@ |
|
|
#include <adrenotools/bcenabler.h>
|
|
|
#include <adrenotools/bcenabler.h>
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#include <vk_mem_alloc.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Vulkan { |
|
|
namespace Vulkan { |
|
|
using namespace Common::Literals; |
|
|
using namespace Common::Literals; |
|
|
namespace { |
|
|
namespace { |
|
|
|
|
|
@ -11,12 +11,11 @@ |
|
|
#include "common/common_types.h"
|
|
|
#include "common/common_types.h"
|
|
|
#include "common/logging/log.h"
|
|
|
#include "common/logging/log.h"
|
|
|
#include "common/polyfill_ranges.h"
|
|
|
#include "common/polyfill_ranges.h"
|
|
|
|
|
|
#include "video_core/vulkan_common/vma.h"
|
|
|
#include "video_core/vulkan_common/vulkan_device.h"
|
|
|
#include "video_core/vulkan_common/vulkan_device.h"
|
|
|
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
|
|
#include "video_core/vulkan_common/vulkan_memory_allocator.h"
|
|
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
|
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
|
|
|
|
|
|
|
|
#include <vk_mem_alloc.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Vulkan { |
|
|
namespace Vulkan { |
|
|
namespace { |
|
|
namespace { |
|
|
struct Range { |
|
|
struct Range { |
|
|
|
|
|
@ -9,11 +9,9 @@ |
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
#include "common/common_types.h"
|
|
|
#include "common/logging/log.h"
|
|
|
#include "common/logging/log.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "video_core/vulkan_common/vma.h"
|
|
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
|
|
#include "video_core/vulkan_common/vulkan_wrapper.h"
|
|
|
|
|
|
|
|
|
#include <vk_mem_alloc.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Vulkan::vk { |
|
|
namespace Vulkan::vk { |
|
|
|
|
|
|
|
|
namespace { |
|
|
namespace { |
|
|
|
|
|
@ -12,13 +12,8 @@ |
|
|
#include <utility> |
|
|
#include <utility> |
|
|
#include <vector> |
|
|
#include <vector> |
|
|
|
|
|
|
|
|
#define VK_NO_PROTOTYPES |
|
|
|
|
|
#ifdef _WIN32 |
|
|
|
|
|
#define VK_USE_PLATFORM_WIN32_KHR |
|
|
|
|
|
#elif defined(__APPLE__) |
|
|
|
|
|
#define VK_USE_PLATFORM_METAL_EXT |
|
|
|
|
|
#endif |
|
|
|
|
|
#include <vulkan/vulkan.h> |
|
|
|
|
|
|
|
|
#include "common/common_types.h" |
|
|
|
|
|
#include "video_core/vulkan_common/vulkan.h" |
|
|
|
|
|
|
|
|
// Sanitize macros |
|
|
// Sanitize macros |
|
|
#ifdef CreateEvent |
|
|
#ifdef CreateEvent |
|
|
@ -28,8 +23,6 @@ |
|
|
#undef CreateSemaphore |
|
|
#undef CreateSemaphore |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#include "common/common_types.h" |
|
|
|
|
|
|
|
|
|
|
|
#ifdef _MSC_VER |
|
|
#ifdef _MSC_VER |
|
|
#pragma warning(disable : 26812) // Disable prefer enum class over enum |
|
|
#pragma warning(disable : 26812) // Disable prefer enum class over enum |
|
|
#endif |
|
|
#endif |
|
|
|