etnaviv: Drop foreach_bit() macro

Now that we have a global one.

Signed-off-by: Rob Clark <robdclark@chromium.org>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>
This commit is contained in:
Rob Clark
2021-02-22 07:57:21 -08:00
committed by Marge Bot
parent 2b020e84e7
commit 0ca5b1a6b9
2 changed files with 3 additions and 6 deletions

View File

@@ -344,14 +344,14 @@ etna_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
}
/* Mark constant buffers as being read */
foreach_bit(i, ctx->constant_buffer[PIPE_SHADER_VERTEX].enabled_mask)
u_foreach_bit(i, ctx->constant_buffer[PIPE_SHADER_VERTEX].enabled_mask)
resource_read(ctx, ctx->constant_buffer[PIPE_SHADER_VERTEX].cb[i].buffer);
foreach_bit(i, ctx->constant_buffer[PIPE_SHADER_FRAGMENT].enabled_mask)
u_foreach_bit(i, ctx->constant_buffer[PIPE_SHADER_FRAGMENT].enabled_mask)
resource_read(ctx, ctx->constant_buffer[PIPE_SHADER_FRAGMENT].cb[i].buffer);
/* Mark VBOs as being read */
foreach_bit(i, ctx->vertex_buffer.enabled_mask) {
u_foreach_bit(i, ctx->vertex_buffer.enabled_mask) {
assert(!ctx->vertex_buffer.vb[i].is_user_buffer);
resource_read(ctx, ctx->vertex_buffer.vb[i].buffer.resource);
}

View File

@@ -30,9 +30,6 @@
/* for conditionally setting boolean flag(s): */
#define COND(bool, val) ((bool) ? (val) : 0)
#define foreach_bit(b, mask) \
for (uint32_t _m = (mask); _m && ({(b) = u_bit_scan(&_m); 1;});)
/* align to a value divisable by granularity >= value, works only for powers of two */
static inline uint32_t
etna_align_up(uint32_t value, uint32_t granularity)