zink: use cached memory for staging resources

I think at one point before staging resource flagging was less reliable
this method made sense, but now it's worse

Fixes: 6ff6d01c37 ("zink: don't use cached mem for staging resources")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10363>
(cherry picked from commit e34dc0840b)
This commit is contained in:
Mike Blumenkrantz 2021-04-19 18:28:13 -04:00 committed by Eric Engestrom
parent 246c6ec7ab
commit 95994bc0b1
2 changed files with 2 additions and 2 deletions

View file

@ -409,7 +409,7 @@
"description": "zink: use cached memory for staging resources",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "6ff6d01c3777ed2bed7b80029f946425835d918e"
},

View file

@ -454,7 +454,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
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)
templ->usage == PIPE_USAGE_STAGING)
flags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
VkMemoryAllocateInfo mai = {};