zink: disable mutable formats for zs formats and scanout images

swapchain images are never going to be used as texture views, and zs formats
aren't compatible with any other formats

this enables implicit modifiers in some cases, and more work can be done in the future
to eliminate mutable format usage to further improve performance

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10180>
This commit is contained in:
Mike Blumenkrantz 2021-04-09 16:39:57 -04:00 committed by Marge Bot
parent 3622df7ab2
commit e52712a653

View file

@ -292,7 +292,7 @@ create_ici(struct zink_screen *screen, const struct pipe_resource *templ, unsign
{
VkImageCreateInfo ici = {};
ici.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
ici.flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
ici.flags = bind & (PIPE_BIND_SCANOUT | PIPE_BIND_DEPTH_STENCIL) ? 0 : VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
switch (templ->target) {
case PIPE_TEXTURE_1D: