aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/vk_device.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-12-26 01:50:25 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-12-31 02:07:33 -0300
commitf687392e6f29d1b65cd80a18f86a55122bde417c (patch)
treeaca4dd89e0e67d7055bb844cf9ceaf2e8c6c8cf2 /src/video_core/renderer_vulkan/vk_device.h
parent53ea06dc17ccf9232aa3326a4621500058f9d253 (diff)
vk_device: Stop initialization when device is not suitable
VKDevice::IsSuitable was not being called. To address this issue, check suitability before initialization and throw an exception if it fails. By doing this, we can deduplicate some code on queue searches. Previosuly we would first search if a present and graphics queue existed, then on initialization we would search again to find the index.
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_device.h')
-rw-r--r--src/video_core/renderer_vulkan/vk_device.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_device.h b/src/video_core/renderer_vulkan/vk_device.h
index 67617f86d..63e123d02 100644
--- a/src/video_core/renderer_vulkan/vk_device.h
+++ b/src/video_core/renderer_vulkan/vk_device.h
@@ -229,10 +229,10 @@ public:
return use_asynchronous_shaders;
}
+private:
/// Checks if the physical device is suitable.
- static bool IsSuitable(vk::PhysicalDevice physical, VkSurfaceKHR surface);
+ void CheckSuitability() const;
-private:
/// Loads extensions into a vector and stores available ones in this object.
std::vector<const char*> LoadExtensions();