yuzu-qt: Load Vulkan device info at startup

Loading it when the configuration opens now incurs a noticeable delay.
We also don't need to rediscover the same data repeatedly each time the
configuration opens.

Moves vulkan device info discovery to yuzu's startup as opposed to the
configure_graphics constructor.
This commit is contained in:
lat9nq
2023-05-28 21:46:02 +00:00
parent 069d7e6be4
commit fc0c4db20d
11 changed files with 123 additions and 49 deletions

View File

@ -12,6 +12,7 @@
#include <qobjectdefs.h>
#include <vulkan/vulkan_core.h>
#include "common/common_types.h"
#include "vk_device_info.h"
class QEvent;
class QObject;
@ -39,6 +40,7 @@ class ConfigureGraphics : public QWidget {
public:
explicit ConfigureGraphics(const Core::System& system_,
std::vector<VkDeviceInfo::Record>& records,
const std::function<void()>& expose_compute_option_,
QWidget* parent = nullptr);
~ConfigureGraphics() override;
@ -77,6 +79,7 @@ private:
ConfigurationShared::CheckState use_disk_shader_cache;
ConfigurationShared::CheckState use_asynchronous_gpu_emulation;
std::vector<VkDeviceInfo::Record>& records;
std::vector<QString> vulkan_devices;
std::vector<std::vector<VkPresentModeKHR>> device_present_modes;
std::vector<VkPresentModeKHR>