zink: fix zink_resource_access_is_write()
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Sun, 26 Feb 2023 15:47:02 +0000 (10:47 -0500)
committerMarge Bot <emma+marge@anholt.net>
Mon, 6 Mar 2023 14:22:01 +0000 (14:22 +0000)
this was accurately returning whether the access had only write flags,
but it was incorrectly returning false for READ|WRITE

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21583>

src/gallium/drivers/zink/zink_context.c

index a677714..37c4843 100644 (file)
@@ -3559,7 +3559,7 @@ pipeline_dst_stage(VkImageLayout layout)
 bool
 zink_resource_access_is_write(VkAccessFlags flags)
 {
-   return (flags & ALL_READ_ACCESS_FLAGS) != flags;
+   return (flags & ~ALL_READ_ACCESS_FLAGS) > 0;
 }
 
 bool