diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-05-28 21:46:02 +0000 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-06 01:54:44 -0400 |
commit | fc0c4db20d4161984a960a689afa0a08a5a4b401 (patch) | |
tree | 9271e436b5bbb08ea4d642a44aa50f788b6789e8 /src/yuzu/vk_device_info.h | |
parent | 069d7e6be4faa6d10f7e2dd3765d93f925aa2f25 (diff) |
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.
Diffstat (limited to 'src/yuzu/vk_device_info.h')
-rw-r--r-- | src/yuzu/vk_device_info.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/yuzu/vk_device_info.h b/src/yuzu/vk_device_info.h new file mode 100644 index 000000000..0b65705e2 --- /dev/null +++ b/src/yuzu/vk_device_info.h @@ -0,0 +1,27 @@ +#pragma once + +#include <string> +#include <string_view> +#include <vector> +#include "vulkan/vulkan_core.h" + +namespace Settings { +enum class VSyncMode : u32; +} +// #include "common/settings.h" + +namespace VkDeviceInfo { +// Short class to record Vulkan driver information for configuration purposes +class Record { +public: + explicit Record(std::string_view name, const std::vector<VkPresentModeKHR>& vsync_modes, + bool is_intel_proprietary); + ~Record(); + + const std::string name; + const std::vector<VkPresentModeKHR> vsync_support; + const bool is_intel_proprietary; +}; + +void PopulateRecords(std::vector<Record>& records, QWindow* window); +} // namespace VkDeviceInfo
\ No newline at end of file |