dzn: Set bufferFeatures to zero on depth/stencil formats

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>
This commit is contained in:
Boris Brezillon 2022-04-05 03:01:05 -07:00 committed by Marge Bot
parent 8dfab9b382
commit ad0ac592be
1 changed files with 4 additions and 0 deletions

View 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