Module: Mesa Branch: master Commit: 152916b2bb9adcda39818822770ed8be39f3a887 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=152916b2bb9adcda39818822770ed8be39f3a887
Author: Mike Blumenkrantz <[email protected]> Date: Thu Aug 13 10:23:24 2020 -0400 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942> --- src/gallium/drivers/zink/zink_resource.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 50c59775359..94a8beb0efa 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -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 = {}; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
