mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
zink: use = and not |= for VkMemoryPropertyFlags during resource creation
the previous value of this isn't used, so be explicit here 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
bd0ef080d0
commit
152916b2bb
1 changed files with 4 additions and 4 deletions
|
|
@ -109,7 +109,7 @@ resource_create(struct pipe_screen *pscreen,
|
|||
res->base.screen = pscreen;
|
||||
|
||||
VkMemoryRequirements reqs = {};
|
||||
VkMemoryPropertyFlags flags = 0;
|
||||
VkMemoryPropertyFlags flags;
|
||||
|
||||
res->internal_format = templ->format;
|
||||
if (templ->target == PIPE_BUFFER) {
|
||||
|
|
@ -166,7 +166,7 @@ resource_create(struct pipe_screen *pscreen,
|
|||
}
|
||||
|
||||
vkGetBufferMemoryRequirements(screen->dev, res->buffer, &reqs);
|
||||
flags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
} else {
|
||||
res->format = zink_get_format(screen, templ->format);
|
||||
|
||||
|
|
@ -285,9 +285,9 @@ resource_create(struct pipe_screen *pscreen,
|
|||
|
||||
vkGetImageMemoryRequirements(screen->dev, res->image, &reqs);
|
||||
if (templ->usage == PIPE_USAGE_STAGING || (screen->winsys && (templ->bind & (PIPE_BIND_SCANOUT|PIPE_BIND_DISPLAY_TARGET|PIPE_BIND_SHARED))))
|
||||
flags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
else
|
||||
flags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
}
|
||||
|
||||
VkMemoryAllocateInfo mai = {};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue