mirror of
https://github.com/libretro/RetroArch
synced 2025-01-17 01:16:25 +00:00
Move vulkan gpu_list to struct data
This commit is contained in:
parent
f3c4b4fcf7
commit
89461eb6a5
@ -39,8 +39,8 @@
|
||||
#include <xgraphics.h>
|
||||
#endif
|
||||
|
||||
static UINT SDKVersion = 0;
|
||||
|
||||
/* TODO/FIXME - static globals */
|
||||
static UINT SDKVersion = 0;
|
||||
#ifdef HAVE_DYNAMIC_D3D
|
||||
static dylib_t g_d3d8_dll;
|
||||
#ifdef HAVE_D3DX
|
||||
|
@ -39,8 +39,8 @@
|
||||
#include <xgraphics.h>
|
||||
#endif
|
||||
|
||||
/* TODO/FIXME - static globals */
|
||||
static UINT d3d9_SDKVersion = 0;
|
||||
|
||||
#ifdef HAVE_DYNAMIC_D3D
|
||||
static dylib_t g_d3d9_dll;
|
||||
#ifdef HAVE_D3DX
|
||||
|
@ -51,7 +51,6 @@ static dylib_t vulkan_library;
|
||||
static VkInstance cached_instance_vk;
|
||||
static VkDevice cached_device_vk;
|
||||
static retro_vulkan_destroy_device_t cached_destroy_device_vk;
|
||||
static struct string_list *vulkan_gpu_list = NULL;
|
||||
|
||||
#if 0
|
||||
#define WSI_HARDENING_TEST
|
||||
@ -1576,10 +1575,10 @@ static bool vulkan_context_init_gpu(gfx_ctx_vulkan_data_t *vk)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (vulkan_gpu_list)
|
||||
string_list_free(vulkan_gpu_list);
|
||||
if (vk->gpu_list)
|
||||
string_list_free(vk->gpu_list);
|
||||
|
||||
vulkan_gpu_list = string_list_new();
|
||||
vk->gpu_list = string_list_new();
|
||||
|
||||
for (i = 0; i < gpu_count; i++)
|
||||
{
|
||||
@ -1590,10 +1589,10 @@ static bool vulkan_context_init_gpu(gfx_ctx_vulkan_data_t *vk)
|
||||
|
||||
RARCH_LOG("[Vulkan]: Found GPU at index %d: %s\n", i, gpu_properties.deviceName);
|
||||
|
||||
string_list_append(vulkan_gpu_list, gpu_properties.deviceName, attr);
|
||||
string_list_append(vk->gpu_list, gpu_properties.deviceName, attr);
|
||||
}
|
||||
|
||||
video_driver_set_gpu_api_devices(GFX_CTX_VULKAN_API, vulkan_gpu_list);
|
||||
video_driver_set_gpu_api_devices(GFX_CTX_VULKAN_API, vk->gpu_list);
|
||||
|
||||
if (0 <= gpu_index && gpu_index < (int)gpu_count)
|
||||
{
|
||||
@ -2651,10 +2650,10 @@ void vulkan_context_destroy(gfx_ctx_vulkan_data_t *vk,
|
||||
}
|
||||
|
||||
video_driver_set_gpu_api_devices(GFX_CTX_VULKAN_API, NULL);
|
||||
if (vulkan_gpu_list)
|
||||
if (vk->gpu_list)
|
||||
{
|
||||
string_list_free(vulkan_gpu_list);
|
||||
vulkan_gpu_list = NULL;
|
||||
string_list_free(vk->gpu_list);
|
||||
vk->gpu_list = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include <lists/string_list.h>
|
||||
|
||||
|
||||
#define VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS 16
|
||||
#define VULKAN_MAX_DESCRIPTOR_POOL_SIZES 16
|
||||
#define VULKAN_BUFFER_BLOCK_SIZE (64 * 1024)
|
||||
@ -165,6 +168,8 @@ typedef struct gfx_ctx_vulkan_data
|
||||
/* Used to check if we need to use mailbox emulation or not.
|
||||
* Only relevant on Windows for now. */
|
||||
bool fullscreen;
|
||||
|
||||
struct string_list *gpu_list;
|
||||
} gfx_ctx_vulkan_data_t;
|
||||
|
||||
struct vulkan_display_surface_info
|
||||
|
Loading…
Reference in New Issue
Block a user