aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-11-08 12:54:09 +0100
committerErik Faye-Lund <[email protected]>2019-11-12 12:40:49 +0000
commit935299188086c87e1ccb159cf9cf205a31c57468 (patch)
tree224c4b958455821193d136e91202f89db58a627b /src/gallium
parentd4c81820183ba08717fc8845484dc298bdee66a8 (diff)
zink: always allow transfer to/from buffers
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/zink/zink_resource.c6
1 files changed, 2 insertions, 4 deletions
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);