From 6db24986ca58cea243e47145482109c4d1199403 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 5 May 2021 09:43:46 -0400 Subject: [PATCH] gallium/inlines: remove atomic set from pipe_reference_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Kenneth Graunke Part-of: --- 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