dzn: Set bufferFeatures to zero on depth/stencil formats
authorBoris Brezillon <boris.brezillon@collabora.com>
Tue, 5 Apr 2022 10:01:05 +0000 (03:01 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 8 Apr 2022 11:54:43 +0000 (11:54 +0000)
Those are not supposed to advertise buffer features.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15698>

src/microsoft/vulkan/dzn_device.cpp

index 6227a7bb681277826b6c16d35b5a8fe6bdcba125..ac6446c4ca66fe6e12e1966626eef83cd6565afe 100644 (file)
@@ -635,6 +635,10 @@ dzn_physical_device_get_format_properties(dzn_physical_device *pdev,
       base_props->bufferFeatures =
          VK_FORMAT_FEATURE_TRANSFER_SRC_BIT | VK_FORMAT_FEATURE_TRANSFER_DST_BIT;
    }
+
+   /* depth/stencil format shouldn't advertise buffer features */
+   if (vk_format_is_depth_or_stencil(format))
+      base_props->bufferFeatures = 0;
 }
 
 static VkResult