summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2022-04-11 12:23:06 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2022-04-21 21:27:28 +0200
commit2d6007fa1ce667bb4368f8a81ed435bfb4ba42ba (patch)
tree443b3be9d4d03f94c5c045e85cec99c9b6cee500 /src/gui/rhi
parent80a8ead08d1fea926850d1da61f693dfe26ed5b0 (diff)
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 <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r--src/gui/rhi/qrhivulkan.cpp2
1 files changed, 2 insertions, 0 deletions
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);