From 1d4b5e22cb6636117bdb6095fcd8f9545b0768a4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 7 Jul 2020 00:59:35 +1000 Subject: [PATCH] Vulkan: Fall back to geometryShader when fillModeNonSolid unsupported --- src/common/vulkan/context.cpp | 4 ++-- src/core/gpu_hw_vulkan.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/vulkan/context.cpp b/src/common/vulkan/context.cpp index 19af7c078..3b0a6f101 100644 --- a/src/common/vulkan/context.cpp +++ b/src/common/vulkan/context.cpp @@ -460,9 +460,9 @@ bool Context::SelectDeviceFeatures(const VkPhysicalDeviceFeatures* required_feat VkPhysicalDeviceFeatures available_features; vkGetPhysicalDeviceFeatures(m_physical_device, &available_features); - if (!available_features.fillModeNonSolid) + if (!available_features.fillModeNonSolid && !available_features.geometryShader) { - Log_ErrorPrintf("fillModeNonSolid feature is required for line drawing."); + Log_ErrorPrintf("fillModeNonSolid or geometryShader feature is required for line drawing."); return false; } diff --git a/src/core/gpu_hw_vulkan.cpp b/src/core/gpu_hw_vulkan.cpp index ddf635e50..7ba19a6ec 100644 --- a/src/core/gpu_hw_vulkan.cpp +++ b/src/core/gpu_hw_vulkan.cpp @@ -620,7 +620,7 @@ bool GPU_HW_Vulkan::CompilePipelines() } } - if (m_resolution_scale > 1) + if (m_resolution_scale > 1 || !g_vulkan_context->GetDeviceFeatures().fillModeNonSolid) { if (g_vulkan_context->GetDeviceFeatures().geometryShader) {