summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/VKMain.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-03-10 15:06:19 -0400
committerGitHub <noreply@github.com>2025-03-10 15:06:19 -0400
commit5ed8b7bc9d8f70d5dae4f009939ac9715adf83b4 (patch)
tree946de379d9606f4ba12e76f8bec7483fc282833c /Source/Core/VideoBackends/Vulkan/VKMain.cpp
parentd45e6c67293f10be4159d4e222ad3e903d7a835b (diff)
parentc18c039089bdc27cbccf92a9053ed80bb161a9b9 (diff)
Merge pull request #13403 from jordan-woyak/backend_info
VideoCommon: Move backend_info out of VideoConfig struct.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKMain.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VKMain.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKMain.cpp b/Source/Core/VideoBackends/Vulkan/VKMain.cpp
index ee49796daf..e5ecd5a4de 100644
--- a/Source/Core/VideoBackends/Vulkan/VKMain.cpp
+++ b/Source/Core/VideoBackends/Vulkan/VKMain.cpp
@@ -3,13 +3,10 @@
#include "VideoBackends/Vulkan/VideoBackend.h"
-#include <vector>
-
#include "Common/Logging/LogManager.h"
#include "Common/MsgHandler.h"
#include "VideoBackends/Vulkan/CommandBufferManager.h"
-#include "VideoBackends/Vulkan/Constants.h"
#include "VideoBackends/Vulkan/ObjectCache.h"
#include "VideoBackends/Vulkan/StateTracker.h"
#include "VideoBackends/Vulkan/VKBoundingBox.h"
@@ -19,9 +16,7 @@
#include "VideoBackends/Vulkan/VKVertexManager.h"
#include "VideoBackends/Vulkan/VulkanContext.h"
-#include "VideoCommon/FramebufferManager.h"
#include "VideoCommon/TextureCacheBase.h"
-#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoConfig.h"
#if defined(VK_USE_PLATFORM_METAL_EXT)
@@ -32,7 +27,7 @@ namespace Vulkan
{
void VideoBackend::InitBackendInfo(const WindowSystemInfo& wsi)
{
- VulkanContext::PopulateBackendInfo(&g_Config);
+ VulkanContext::PopulateBackendInfo(&g_backend_info);
if (LoadVulkanLibrary())
{
@@ -44,7 +39,7 @@ void VideoBackend::InitBackendInfo(const WindowSystemInfo& wsi)
if (LoadVulkanInstanceFunctions(temp_instance))
{
VulkanContext::GPUList gpu_list = VulkanContext::EnumerateGPUs(temp_instance);
- VulkanContext::PopulateBackendInfoAdapters(&g_Config, gpu_list);
+ VulkanContext::PopulateBackendInfoAdapters(&g_backend_info, gpu_list);
if (!gpu_list.empty())
{
@@ -55,8 +50,8 @@ void VideoBackend::InitBackendInfo(const WindowSystemInfo& wsi)
VkPhysicalDevice gpu = gpu_list[device_index];
VulkanContext::PhysicalDeviceInfo properties(gpu);
- VulkanContext::PopulateBackendInfoFeatures(&g_Config, gpu, properties);
- VulkanContext::PopulateBackendInfoMultisampleModes(&g_Config, gpu, properties);
+ VulkanContext::PopulateBackendInfoFeatures(&g_backend_info, gpu, properties);
+ VulkanContext::PopulateBackendInfoMultisampleModes(&g_backend_info, gpu, properties);
}
}
@@ -144,8 +139,8 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
}
// Populate BackendInfo with as much information as we can at this point.
- VulkanContext::PopulateBackendInfo(&g_Config);
- VulkanContext::PopulateBackendInfoAdapters(&g_Config, gpu_list);
+ VulkanContext::PopulateBackendInfo(&g_backend_info);
+ VulkanContext::PopulateBackendInfoAdapters(&g_backend_info, gpu_list);
// We need the surface before we can create a device, as some parameters depend on it.
VkSurfaceKHR surface = VK_NULL_HANDLE;
@@ -183,11 +178,11 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
// Since VulkanContext maintains a copy of the device features and properties, we can use this
// to initialize the backend information, so that we don't need to enumerate everything again.
- VulkanContext::PopulateBackendInfoFeatures(&g_Config, g_vulkan_context->GetPhysicalDevice(),
+ VulkanContext::PopulateBackendInfoFeatures(&g_backend_info, g_vulkan_context->GetPhysicalDevice(),
g_vulkan_context->GetDeviceInfo());
VulkanContext::PopulateBackendInfoMultisampleModes(
- &g_Config, g_vulkan_context->GetPhysicalDevice(), g_vulkan_context->GetDeviceInfo());
- g_Config.backend_info.bSupportsExclusiveFullscreen =
+ &g_backend_info, g_vulkan_context->GetPhysicalDevice(), g_vulkan_context->GetDeviceInfo());
+ g_backend_info.bSupportsExclusiveFullscreen =
enable_surface && g_vulkan_context->SupportsExclusiveFullscreen(wsi, surface);
UpdateActiveConfig();