From a565ead64a218de1083afc20cee962ef53e25398 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 3 Feb 2021 17:29:24 -0500 Subject: [PATCH] zink: only use host mem for staging resources with linear tiling VK_EXT_4444_formats strikes again Reviewed-by: Dave Airlie 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 82ef081e3d8..b2eaaedee15 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -429,7 +429,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t } vkGetImageMemoryRequirements(screen->dev, obj->image, &reqs); - if (templ->usage == PIPE_USAGE_STAGING) + if (templ->usage == PIPE_USAGE_STAGING && ici.tiling == VK_IMAGE_TILING_LINEAR) flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; else flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;