From 2d6007fa1ce667bb4368f8a81ed435bfb4ba42ba Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 11 Apr 2022 12:23:06 +0200 Subject: [PATCH] rhi: vulkan: Enable feature for line polygon mode Turns out there is a fillModeNonSolid in VkPhysicalDeviceFeatures, so to be true to the spec we need to enable that when setting the polygonMode in a QRhiGraphicsPipeline to something other than the default Fill. This way the validation layer won't bark at us. Change-Id: I41f561a1796ba1d45229dc20bf1fb7bae3c43f48 Reviewed-by: Andy Nichols --- src/gui/rhi/qrhivulkan.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index 851b225a56..108f43b4c6 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -635,6 +635,8 @@ bool QRhiVulkan::create(QRhi::Flags flags) features.textureCompressionBC = VK_TRUE; if (physDevFeatures.geometryShader) features.geometryShader = VK_TRUE; + if (physDevFeatures.fillModeNonSolid) + features.fillModeNonSolid = VK_TRUE; devInfo.pEnabledFeatures = &features; VkResult err = f->vkCreateDevice(physDev, &devInfo, nullptr, &dev);