freedreno: make foreach_bit() declare it's cursor
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5634>
This commit is contained in:
@@ -184,7 +184,7 @@ fd5_launch_grid(struct fd_context *ctx, const struct pipe_grid_info *info)
|
||||
struct ir3_shader_key key = {};
|
||||
struct ir3_shader_variant *v;
|
||||
struct fd_ringbuffer *ring = ctx->batch->draw;
|
||||
unsigned i, nglobal = 0;
|
||||
unsigned nglobal = 0;
|
||||
|
||||
emit_setup(ctx);
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ fd6_launch_grid(struct fd_context *ctx, const struct pipe_grid_info *info)
|
||||
struct ir3_shader_key key = {};
|
||||
struct ir3_shader_variant *v;
|
||||
struct fd_ringbuffer *ring = ctx->batch->draw;
|
||||
unsigned i, nglobal = 0;
|
||||
unsigned nglobal = 0;
|
||||
|
||||
fd6_emit_restore(ctx->batch, ring);
|
||||
|
||||
|
||||
@@ -466,7 +466,6 @@ fd6_clear(struct fd_context *ctx, unsigned buffers,
|
||||
struct pipe_framebuffer_state *pfb = &ctx->batch->framebuffer;
|
||||
const bool has_depth = pfb->zsbuf;
|
||||
unsigned color_buffers = buffers >> 2;
|
||||
unsigned i;
|
||||
|
||||
/* If we're clearing after draws, fallback to 3D pipe clears. We could
|
||||
* use blitter clears in the draw batch but then we'd have to patch up the
|
||||
|
||||
@@ -430,7 +430,6 @@ fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
|
||||
struct fd_context *ctx = fd_context(pctx);
|
||||
const struct fd_shaderbuf_stateobj *so = &ctx->shaderbuf[PIPE_SHADER_COMPUTE];
|
||||
struct fd_batch *batch, *save_batch = NULL;
|
||||
unsigned i;
|
||||
|
||||
batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true);
|
||||
fd_batch_reference(&save_batch, ctx->batch);
|
||||
|
||||
@@ -310,7 +310,7 @@ pack_rgba(enum pipe_format format, const float *rgba)
|
||||
do { __typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
|
||||
|
||||
#define foreach_bit(b, mask) \
|
||||
for (uint32_t _m = (mask); _m && ({(b) = u_bit_scan(&_m); 1;});)
|
||||
for (uint32_t _m = (mask), b; _m && ({(b) = u_bit_scan(&_m); (void)(b); 1;});)
|
||||
|
||||
|
||||
#define BIT(bit) (1u << bit)
|
||||
|
||||
Reference in New Issue
Block a user