From e52712a65335c4b9bfa9cc43569b90f79610fc58 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 9 Apr 2021 16:39:57 -0400 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/zink/zink_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index b383ecf4c11..57434a8a4d3 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -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: