From: Erik Faye-Lund Date: Fri, 8 Nov 2019 11:54:09 +0000 (+0100) Subject: zink: always allow transfer to/from buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=935299188086c87e1ccb159cf9cf205a31c57468;p=mesa.git zink: always allow transfer to/from buffers --- diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 2785b986b30..b8af12ed5f4 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -104,7 +104,8 @@ resource_create(struct pipe_screen *pscreen, bci.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; bci.size = templ->width0; - bci.usage = 0; + bci.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | + VK_BUFFER_USAGE_TRANSFER_DST_BIT; if (templ->bind & PIPE_BIND_VERTEX_BUFFER) bci.usage |= VK_BUFFER_USAGE_VERTEX_BUFFER_BIT; @@ -121,9 +122,6 @@ resource_create(struct pipe_screen *pscreen, if (templ->bind & PIPE_BIND_COMMAND_ARGS_BUFFER) bci.usage |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT; - if (templ->usage == PIPE_USAGE_STAGING) - bci.usage |= VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; - if (vkCreateBuffer(screen->dev, &bci, NULL, &res->buffer) != VK_SUCCESS) { FREE(res);