From 9d1f1fcf136e8f5f427ae203128ff641cc9e7197 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Fri, 29 Oct 2010 21:29:15 +0200 Subject: dri/nouveau: Use a macro to iterate over the bound vertex attributes. --- src/mesa/drivers/dri/nouveau/nouveau_render.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/drivers/dri/nouveau/nouveau_render.h') 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 -- cgit v1.2.3