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>
bb10
Laszlo Agocs 2022-04-11 12:23:06 +02:00
parent 80a8ead08d
commit 2d6007fa1c
1 changed files with 2 additions and 0 deletions

View File

@ -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);