summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-05-31 19:10:07 -0700
committerKeith Whitwell <keithw@vmware.com>2009-06-30 14:20:25 +0100
commit292ec86ed0254d8c9e5bb4205be9e18e905d7235 (patch)
treec67866a8b56e2bd9acacfddcbe951ac720550274
parent87264b5b29f41d61ea37047bcf176efd97cdac58 (diff)
st_vbo: cleaner initialization for map_vp_none
Avoid having non-empty attribs such as position being used as fillers past the end of material attributes.
-rw-r--r--src/mesa/state_tracker/st_vbo/st_vbo_context.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_vbo/st_vbo_context.c b/src/mesa/state_tracker/st_vbo/st_vbo_context.c
index 22aac21eaf..4068bb71b2 100644
--- a/src/mesa/state_tracker/st_vbo/st_vbo_context.c
+++ b/src/mesa/state_tracker/st_vbo/st_vbo_context.c
@@ -205,12 +205,11 @@ GLboolean _st_vbo_CreateContext( GLcontext *ctx )
/* When no vertex program, pull in the material attributes in
* the 16..32 generic range.
*/
- for (i = 0; i < 16; i++)
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
st_vbo->map_vp_none[i] = i;
for (i = 0; i < 12; i++)
st_vbo->map_vp_none[16+i] = ST_VBO_ATTRIB_MAT_FRONT_AMBIENT + i;
- for (i = 0; i < 4; i++)
- st_vbo->map_vp_none[28+i] = i;
+
for (i = 0; i < VERT_ATTRIB_MAX; i++)
st_vbo->map_vp_arb[i] = i;