diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2005-03-03 08:22:48 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2005-03-03 08:22:48 +0000 |
commit | bc81d7451099270ea4847d9e92f31e64cfbf5eba (patch) | |
tree | 5164f3a2ea1d199472266590953436efe0ecfd41 | |
parent | 1b5d082c3d65d7cbab1b862fc6ed6aa824938641 (diff) |
merge from trunk
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index cd5792e458..5bfa15998c 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -50,6 +50,7 @@ struct material_cursor { const GLfloat *ptr; GLuint stride; GLfloat *current; + GLuint size; /* 1, 2, 3 or 4 */ }; struct light_stage_data { @@ -79,7 +80,7 @@ static void update_materials( GLcontext *ctx, GLuint i; for (i = 0 ; i < store->mat_count ; i++) { - COPY_4V(store->mat[i].current, store->mat[i].ptr); + COPY_CLEAN_4V(store->mat[i].current, store->mat[i].size, store->mat[i].ptr); STRIDE_F(store->mat[i].ptr, store->mat[i].stride); } @@ -110,8 +111,9 @@ static GLuint prepare_materials( GLcontext *ctx, if (VB->AttribPtr[i]->stride) { GLuint j = store->mat_count++; GLuint attr = i - _TNL_ATTRIB_MAT_FRONT_AMBIENT; - store->mat[j].ptr = VB->AttribPtr[i]->start; + store->mat[j].ptr = VB->AttribPtr[i]->start; store->mat[j].stride = VB->AttribPtr[i]->stride; + store->mat[j].size = VB->AttribPtr[i]->size; store->mat[j].current = ctx->Light.Material.Attrib[attr]; store->mat_bitmask |= (1<<attr); } |