From 669b6889e4b0ed4e3ca597dee8a1ab6834bac560 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 29 Jun 2021 10:45:44 +0200 Subject: [PATCH] gallium/u_threaded: do not apply start twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already apply start when setting the bits in writable_buffer, so shifting the bits up by start just makes us apply the offset twice. Caught by Coverity. Fixes: 988d0917208 ("gallium/u_threaded: clear valid buffer range only if it's not bound for write") Reviewed-by: Marek Olšák Part-of: --- src/gallium/auxiliary/util/u_threaded_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 5d28bbcf62b..847e7057859 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -1467,7 +1467,7 @@ tc_set_shader_images(struct pipe_context *_pipe, } tc->image_buffers_writeable_mask[shader] &= ~BITFIELD_RANGE(start, count); - tc->image_buffers_writeable_mask[shader] |= writable_buffers << start; + tc->image_buffers_writeable_mask[shader] |= writable_buffers; } struct tc_shader_buffers {