X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmesa%2Fmain%2Fstate.c;fp=src%2Fmesa%2Fmain%2Fstate.c;h=d5bdb63a97bc342ec7630c91f1958cc69765aed0;hb=fac334e6d33b0c9ffa2c5147079d728b647d0d2a;hp=bfbefa55d44483d4764e352c5be353200125c834;hpb=4b55e3695279daef221669ff063631cf3675da0c;p=mesa.git diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index bfbefa55d44..d5bdb63a97b 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -194,9 +194,9 @@ update_arrays( GLcontext *ctx ) /* 16..31 */ if (ctx->VertexProgram._Current) { - for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) { + for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) { if (arrayObj->VertexAttrib[i].Enabled) { - min = update_min(min, &arrayObj->VertexAttrib[i]); + min = MIN2(min, arrayObj->VertexAttrib[i]._MaxElement); } } }