summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3d_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_context.h')
-rw-r--r--src/gallium/drivers/v3d/v3d_context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h
index d62dd229ef2..4db422b5755 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -459,6 +459,9 @@ struct v3d_blend_state {
fprintf(stderr, __VA_ARGS__); \
} while (0)
+#define foreach_bit(b, mask) \
+ for (uint32_t _m = (mask), b; _m && ({(b) = u_bit_scan(&_m); 1;});)
+
static inline struct v3d_context *
v3d_context(struct pipe_context *pcontext)
{