freedreno: Fix tracking of enabled SSBOs

Clearing all of the modified bits an relying on OR'ing the needed bits
back in the loop below doesn't quite work out, Because of early continue
if the SSBO has not changed.

Fixes: 0ed053f03d ("freedreno: simplify fd_set_shader_buffers(..)")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20575>
This commit is contained in:
Rob Clark 2023-01-03 14:23:28 -08:00 committed by Marge Bot
parent ca2011d11c
commit e41d19a711

View file

@ -164,7 +164,6 @@ fd_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader,
struct fd_shaderbuf_stateobj *so = &ctx->shaderbuf[shader];
const unsigned modified_bits = u_bit_consecutive(start, count);
so->enabled_mask &= ~modified_bits;
so->writable_mask &= ~modified_bits;
so->writable_mask |= writable_bitmask << start;
@ -194,6 +193,8 @@ fd_set_shader_buffers(struct pipe_context *pctx, enum pipe_shader_type shader,
}
} else {
pipe_resource_reference(&buf->buffer, NULL);
so->enabled_mask &= ~BIT(n);
}
}