summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-12-26 05:32:46 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2021-01-04 06:22:22 +0100
commitac1e4734c2998e764e4116592510690ee2e8af11 (patch)
tree53c1b65212a78637c3a1dcbf27d04ee8315d39c9
parentrenderer_vulkan/nsight_aftermath_tracker: Move to vulkan_common (diff)
downloadyuzu-ac1e4734c2998e764e4116592510690ee2e8af11.tar
yuzu-ac1e4734c2998e764e4116592510690ee2e8af11.tar.gz
yuzu-ac1e4734c2998e764e4116592510690ee2e8af11.tar.bz2
yuzu-ac1e4734c2998e764e4116592510690ee2e8af11.tar.lz
yuzu-ac1e4734c2998e764e4116592510690ee2e8af11.tar.xz
yuzu-ac1e4734c2998e764e4116592510690ee2e8af11.tar.zst
yuzu-ac1e4734c2998e764e4116592510690ee2e8af11.zip
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index f300f22c9..75173324e 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -775,7 +775,7 @@ void Device::SetupFamilies(VkSurfaceKHR surface) {
std::optional<u32> graphics;
std::optional<u32> present;
for (u32 index = 0; index < static_cast<u32>(queue_family_properties.size()); ++index) {
- if (graphics && present) {
+ if (graphics && (present || !surface)) {
break;
}
const VkQueueFamilyProperties& queue_family = queue_family_properties[index];
@@ -785,7 +785,7 @@ void Device::SetupFamilies(VkSurfaceKHR surface) {
if (queue_family.queueFlags & VK_QUEUE_GRAPHICS_BIT) {
graphics = index;
}
- if (physical.GetSurfaceSupportKHR(index, surface)) {
+ if (surface && physical.GetSurfaceSupportKHR(index, surface)) {
present = index;
}
}
@@ -793,7 +793,7 @@ void Device::SetupFamilies(VkSurfaceKHR surface) {
LOG_ERROR(Render_Vulkan, "Device lacks a graphics queue");
throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT);
}
- if (!present) {
+ if (surface && !present) {
LOG_ERROR(Render_Vulkan, "Device lacks a present queue");
throw vk::Exception(VK_ERROR_FEATURE_NOT_PRESENT);
}