mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-29 11:06:12 +00:00
vk_platform: Check if vkEnumerateInstanceVersion exists before calling it (#6982)
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
This commit is contained in:
parent
43cedf59af
commit
d2d37411bc
|
@ -288,12 +288,17 @@ vk::UniqueInstance CreateInstance(const Common::DynamicLibrary& library,
|
||||||
}
|
}
|
||||||
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
|
||||||
|
|
||||||
const auto extensions = GetInstanceExtensions(window_type, enable_validation);
|
if (!VULKAN_HPP_DEFAULT_DISPATCHER.vkEnumerateInstanceVersion) {
|
||||||
|
throw std::runtime_error("Vulkan 1.0 is not supported, 1.1 is required!");
|
||||||
|
}
|
||||||
|
|
||||||
const u32 available_version = vk::enumerateInstanceVersion();
|
const u32 available_version = vk::enumerateInstanceVersion();
|
||||||
if (available_version < VK_API_VERSION_1_1) {
|
if (available_version < VK_API_VERSION_1_1) {
|
||||||
throw std::runtime_error("Vulkan 1.0 is not supported, 1.1 is required!");
|
throw std::runtime_error("Vulkan 1.0 is not supported, 1.1 is required!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto extensions = GetInstanceExtensions(window_type, enable_validation);
|
||||||
|
|
||||||
const vk::ApplicationInfo application_info = {
|
const vk::ApplicationInfo application_info = {
|
||||||
.pApplicationName = "Citra",
|
.pApplicationName = "Citra",
|
||||||
.applicationVersion = VK_MAKE_VERSION(1, 0, 0),
|
.applicationVersion = VK_MAKE_VERSION(1, 0, 0),
|
||||||
|
|
Loading…
Reference in a new issue