Mesa (main): zink: remove atomic from batch usage setting

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 02:58:41 UTC 2021


Module: Mesa
Branch: main
Commit: 50cfe0dbd1ca6578ab8b307cb6d9dca56509e3e6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=50cfe0dbd1ca6578ab8b307cb6d9dca56509e3e6

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May  7 08:15:43 2021 -0400

zink: remove atomic from batch usage setting

this shouldn't be necessary since usage can only be set from the context thread
and only needs to be accessed atomically for the cmpxchg when unsetting

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11399>

---

 src/gallium/drivers/zink/zink_batch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_batch.h b/src/gallium/drivers/zink/zink_batch.h
index 1314db68b66..b1e913c67eb 100644
--- a/src/gallium/drivers/zink/zink_batch.h
+++ b/src/gallium/drivers/zink/zink_batch.h
@@ -183,7 +183,7 @@ zink_batch_usage_unset(struct zink_batch_usage *u, uint32_t batch_id)
 static inline void
 zink_batch_usage_set(struct zink_batch_usage *u, uint32_t batch_id)
 {
-   p_atomic_set(&u->usage, batch_id);
+   u->usage = batch_id;
 }
 
 static inline bool



More information about the mesa-commit mailing list