From 421fbb5f5e9fd95dbf48a6ca5e739a1b5f65aa96 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 9 Feb 2021 14:11:12 -0500 Subject: [PATCH] zink: flag DYNAMIC resources as coherent the contents of these may change frequently, so we should skip all the flush/invalidate 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 ef817183425..fa528812ea7 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -435,7 +435,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; } - if (templ->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT) + if (templ->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT || templ->usage == PIPE_USAGE_DYNAMIC) flags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; else if (!(flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) && templ->usage != PIPE_USAGE_STAGING)