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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9983>
This commit is contained in:
Mike Blumenkrantz 2021-02-09 14:11:12 -05:00 committed by Marge Bot
parent 6ff6d01c37
commit 421fbb5f5e
1 changed files with 1 additions and 1 deletions

View File

@ -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)