diff options
Diffstat (limited to 'src/mesa/tnl/t_imm_eval.c')
-rw-r--r-- | src/mesa/tnl/t_imm_eval.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mesa/tnl/t_imm_eval.c b/src/mesa/tnl/t_imm_eval.c index 8411d7da470..560e0c59334 100644 --- a/src/mesa/tnl/t_imm_eval.c +++ b/src/mesa/tnl/t_imm_eval.c @@ -1,4 +1,3 @@ - /* * Mesa 3-D graphics library * Version: 5.1 @@ -120,7 +119,8 @@ static void eval1_4f_ca( struct gl_client_array *dest, { const GLfloat u1 = map->u1; const GLfloat du = map->du; - GLfloat (*to)[4] = (GLfloat (*)[4])dest->Ptr; + GLubyte *destData = ADD_POINTERS(dest->Ptr, dest->BufferObj->Data); + GLfloat (*to)[4] = (GLfloat (*)[4]) destData; GLuint i; ASSERT(dest->Type == GL_FLOAT); @@ -258,7 +258,8 @@ static void eval2_4f_ca( struct gl_client_array *dest, const GLfloat du = map->du; const GLfloat v1 = map->v1; const GLfloat dv = map->dv; - GLfloat (*to)[4] = (GLfloat (*)[4])dest->Ptr; + GLubyte *destData = ADD_POINTERS(dest->Ptr, dest->BufferObj->Data); + GLfloat (*to)[4] = (GLfloat (*)[4]) destData; GLuint i; ASSERT(dest->Type == GL_FLOAT); @@ -540,11 +541,13 @@ void _tnl_eval_immediate( GLcontext *ctx, struct immediate *IM ) if (req & VERT_BIT_COLOR0) { GLuint generated = 0; - if (copycount) - copy_4f_stride( store->Attrib[VERT_ATTRIB_COLOR0] + IM->CopyStart, - (GLfloat *)tmp->Color.Ptr, - tmp->Color.StrideB, - copycount ); + if (copycount) { + GLubyte *destData = ADD_POINTERS(tmp->Color.Ptr, tmp->Color.BufferObj->Data); + copy_4f_stride( store->Attrib[VERT_ATTRIB_COLOR0] + IM->CopyStart, + (GLfloat *) destData, + tmp->Color.StrideB, + copycount ); + } tmp->Color.Ptr = (GLubyte *) (store->Attrib[VERT_ATTRIB_COLOR0] + IM->CopyStart); tmp->Color.StrideB = 4 * sizeof(GLfloat); |