aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_draw.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-25 07:31:13 +0000
committermarha <marha@users.sourceforge.net>2011-02-25 07:31:13 +0000
commita7971771a8ab6f6f76a2a8e482dbb3a30901af1c (patch)
tree97daee18ddace6f04744d7f4fa6b00aa5a59f4b7 /mesalib/src/mesa/state_tracker/st_draw.c
parentfbb8c9a149047ccb27e749053c83acf94dedcbf9 (diff)
downloadvcxsrv-a7971771a8ab6f6f76a2a8e482dbb3a30901af1c.tar.gz
vcxsrv-a7971771a8ab6f6f76a2a8e482dbb3a30901af1c.tar.bz2
vcxsrv-a7971771a8ab6f6f76a2a8e482dbb3a30901af1c.zip
xserver randrproto mesa xkeyboard-config git update 25 Feb 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_draw.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c
index 11ebd067e..6530a06ad 100644
--- a/mesalib/src/mesa/state_tracker/st_draw.c
+++ b/mesalib/src/mesa/state_tracker/st_draw.c
@@ -315,10 +315,13 @@ setup_interleaved_attribs(struct gl_context *ctx,
const GLubyte *low_addr = NULL;
/* Find the lowest address. */
- for (attr = 0; attr < vpv->num_inputs; attr++) {
- const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
+ if(vpv->num_inputs) {
+ low_addr = arrays[vp->index_to_input[0]]->Ptr;
- low_addr = !low_addr ? start : MIN2(low_addr, start);
+ for (attr = 1; attr < vpv->num_inputs; attr++) {
+ const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
+ low_addr = MIN2(low_addr, start);
+ }
}
for (attr = 0; attr < vpv->num_inputs; attr++) {