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 <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10650>
This commit is contained in:
Mike Blumenkrantz
2021-05-05 09:43:46 -04:00
committed by Marge Bot
parent 6cac9c748e
commit 6db24986ca
+1 -1
View File
@@ -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