zink: set HOST_COHERENT bit for coherent resource creation
this allows memory to be mapped during draws without requiring a flush Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942>
This commit is contained in:
parent
152916b2bb
commit
4a7a226e49
|
@ -290,6 +290,9 @@ resource_create(struct pipe_screen *pscreen,
|
|||
flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
}
|
||||
|
||||
if (templ->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT)
|
||||
flags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
|
||||
VkMemoryAllocateInfo mai = {};
|
||||
mai.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
|
||||
mai.allocationSize = reqs.size;
|
||||
|
|
Loading…
Reference in New Issue