aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nouveau_render.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_render.h')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_render.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_render.h b/src/mesa/drivers/dri/nouveau/nouveau_render.h
index a9e8e90faf7..498c7e4acff 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_render.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_render.h
@@ -84,4 +84,11 @@ struct nouveau_render_state {
#define to_render_state(ctx) (&to_nouveau_context(ctx)->render)
+#define FOR_EACH_ATTR(render, i, attr) \
+ for (i = 0; attr = (render)->map[i], i < NUM_VERTEX_ATTRS; i++)
+
+#define FOR_EACH_BOUND_ATTR(render, i, attr) \
+ for (i = 0; attr = (render)->map[i], i < render->attr_count; i++) \
+ if (attr >= 0)
+
#endif