diff options
author | Francisco Jerez <[email protected]> | 2010-10-29 21:29:15 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2010-10-31 02:45:38 +0200 |
commit | 9d1f1fcf136e8f5f427ae203128ff641cc9e7197 (patch) | |
tree | fb06f3528ad40c358413b25644b09ef1b7baf035 /src/mesa/drivers/dri/nouveau/nouveau_render.h | |
parent | dbe1eae785e8a98eb3d515b572c8e5e28b234edd (diff) |
dri/nouveau: Use a macro to iterate over the bound vertex attributes.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_render.h')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_render.h | 7 |
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 |