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

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed May  5 09:43:46 2021 -0400

gallium/inlines: remove atomic set from pipe_reference_init()

when an object is initialized with this, it should not be visible to any
other threads or contexts, so there should be no need to use an atomic set here

at the time of this commit, there are only two callers in the tree which pass
values != 1:
* zink uses a calculated number for framebuffer refcount on init (this is fine)
* aux/pb passes 0 on init (this is fine)

Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10650>

---

 src/gallium/auxiliary/util/u_inlines.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_inlines.h 
b/src/gallium/auxiliary/util/u_inlines.h
index 68606b99502..30b1328480d 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -55,7 +55,7 @@ extern "C" {
 static inline void
 pipe_reference_init(struct pipe_reference *dst, unsigned count)
 {
-   p_atomic_set(&dst->count, count);
+   dst->count = count;
 }
 
 static inline boolean

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to