diff options
Diffstat (limited to 'src/mesa/tnl_dd')
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp.h | 13 | ||||
-rw-r--r-- | src/mesa/tnl_dd/t_dd_dmatmp2.h | 11 | ||||
-rw-r--r-- | src/mesa/tnl_dd/t_dd_tritmp.h | 42 | ||||
-rw-r--r-- | src/mesa/tnl_dd/t_dd_vb.c | 30 | ||||
-rw-r--r-- | src/mesa/tnl_dd/t_dd_vbtmp.h | 88 |
5 files changed, 102 insertions, 82 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index e4b535fb68..2424204b88 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp.h @@ -241,6 +241,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, tmp = ALLOC_VERTS(nr+1); tmp = TAG(emit_verts)( ctx, j, nr, tmp ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); + (void) tmp; } else { TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) ); @@ -254,6 +255,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, tmp = ALLOC_VERTS(2); tmp = TAG(emit_verts)( ctx, start+1, 1, tmp ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); + (void) tmp; } FLUSH(); @@ -358,6 +360,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx, tmp = ALLOC_VERTS( nr ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp ); + (void) tmp; currentsz = dmasz; } @@ -397,6 +400,7 @@ static void TAG(render_poly_verts)( GLcontext *ctx, tmp = ALLOC_VERTS( nr ); tmp = TAG(emit_verts)( ctx, start, 1, tmp ); tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp ); + (void) tmp; currentsz = dmasz; } @@ -443,7 +447,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx, } else if (HAVE_TRI_STRIPS && ctx->Light.ShadeModel == GL_FLAT && - TNL_CONTEXT(ctx)->vb.ColorPtr[0]->stride) { + TNL_CONTEXT(ctx)->vb.AttribPtr[_TNL_ATTRIB_COLOR0]->stride) { if (HAVE_ELTS) { LOCAL_VARS; int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS(); @@ -634,6 +638,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx, /* Send v1, v2, v3 */ tmp = EMIT_VERTS(ctx, j + 1, 3, tmp); + (void) tmp; } } else { @@ -820,6 +825,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx, tmp = ALLOC_ELTS(nr+1); tmp = TAG(emit_elts)( ctx, elts+j, nr, tmp ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); + (void) tmp; } else { TAG(emit_elts)( ctx, elts+j, nr, ALLOC_ELTS(nr) ); @@ -833,6 +839,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx, tmp = ALLOC_ELTS(2); tmp = TAG(emit_elts)( ctx, elts+start+1, 1, tmp ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); + (void) tmp; } FLUSH(); @@ -946,6 +953,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx, tmp = ALLOC_ELTS( nr ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp ); + (void) tmp; FLUSH(); currentsz = dmasz; } @@ -983,6 +991,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx, tmp = ALLOC_ELTS( nr ); tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp ); tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp ); + (void) tmp; FLUSH(); currentsz = dmasz; } @@ -1221,7 +1230,7 @@ static GLboolean TAG(validate_render)( GLcontext *ctx, ok = GL_TRUE; } else if (HAVE_TRI_STRIPS && ctx->Light.ShadeModel == GL_FLAT && - VB->ColorPtr[0]->stride != 0) { + VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride != 0) { if (HAVE_ELTS) { ok = (GLint) count < GET_SUBSEQUENT_VB_MAX_ELTS(); } diff --git a/src/mesa/tnl_dd/t_dd_dmatmp2.h b/src/mesa/tnl_dd/t_dd_dmatmp2.h index 2380c49fdf..cd225b6343 100644 --- a/src/mesa/tnl_dd/t_dd_dmatmp2.h +++ b/src/mesa/tnl_dd/t_dd_dmatmp2.h @@ -266,6 +266,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, if (j + nr < count) { ELT_TYPE *dest = ALLOC_ELTS( nr ); dest = TAG(emit_consecutive_elts)( ctx, dest, j, nr ); + (void) dest; j += nr - 1; CLOSE_ELTS(); } @@ -273,6 +274,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx, ELT_TYPE *dest = ALLOC_ELTS( nr + 1 ); dest = TAG(emit_consecutive_elts)( ctx, dest, j, nr ); dest = TAG(emit_consecutive_elts)( ctx, dest, start, 1 ); + (void) dest; j += nr; CLOSE_ELTS(); } @@ -554,6 +556,7 @@ static void TAG(render_points_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -590,6 +593,7 @@ static void TAG(render_lines_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } @@ -621,6 +625,7 @@ static void TAG(render_line_strip_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -671,6 +676,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx, j += nr - 1; if (j + 1 >= count && (flags & PRIM_END)) { dest = TAG(emit_elts)( ctx, dest, elts+start, 1 ); + (void) dest; } CLOSE_ELTS(); } @@ -703,6 +709,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -734,6 +741,7 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx, dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } @@ -759,6 +767,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx, dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+start, 1 ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr - 1 ); + (void) dest; CLOSE_ELTS(); } } @@ -785,6 +794,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx, dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+start, 1 ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr - 1 ); + (void) dest; CLOSE_ELTS(); } } @@ -843,6 +853,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx, nr = MIN2( dmasz, count - j ); dest = ALLOC_ELTS( nr ); dest = TAG(emit_elts)( ctx, dest, elts+j, nr ); + (void) dest; CLOSE_ELTS(); } } diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h index 1ae70f4059..6acd837317 100644 --- a/src/mesa/tnl_dd/t_dd_tritmp.h +++ b/src/mesa/tnl_dd/t_dd_tritmp.h @@ -132,7 +132,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb; VERTEX *v[3]; GLfloat offset = 0; - GLfloat z[3]; + GLfloat z[3] = { 0 }; GLenum mode = GL_FILL; GLuint facing = 0; LOCAL_VARS(3); @@ -195,7 +195,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) } } else { - GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data; + GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data; (void) vbcolor; if (!DO_FLAT) { @@ -204,8 +204,8 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) } VERT_SAVE_RGBA( 2 ); - if (VB->ColorPtr[1]->stride) { - ASSERT(VB->ColorPtr[1]->stride == 4*sizeof(GLfloat)); + if (VB->BackfaceColorPtr->stride) { + ASSERT(VB->BackfaceColorPtr->stride == 4*sizeof(GLfloat)); if (!DO_FLAT) { VERT_SET_RGBA( v[0], vbcolor[e0] ); @@ -221,9 +221,9 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) VERT_SET_RGBA( v[2], vbcolor[0] ); } - if (HAVE_SPEC && VB->SecondaryColorPtr[1]) { - GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data; - ASSERT(VB->SecondaryColorPtr[1]->stride == 4*sizeof(GLfloat)); + if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) { + GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data; + ASSERT(VB->BackfaceSecondaryColorPtr->stride == 4*sizeof(GLfloat)); if (!DO_FLAT) { VERT_SAVE_SPEC( 0 ); @@ -237,7 +237,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) } } else { - GLfloat (*vbindex) = (GLfloat *)VB->IndexPtr[1]->data; + GLfloat (*vbindex) = (GLfloat *)VB->BackfaceIndexPtr->data; if (!DO_FLAT) { VERT_SAVE_IND( 0 ); VERT_SAVE_IND( 1 ); @@ -279,7 +279,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) VERT_SAVE_RGBA( 1 ); VERT_COPY_RGBA( v[0], v[2] ); VERT_COPY_RGBA( v[1], v[2] ); - if (HAVE_SPEC && VB->SecondaryColorPtr[0]) { + if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { VERT_SAVE_SPEC( 0 ); VERT_SAVE_SPEC( 1 ); VERT_COPY_SPEC( v[0], v[2] ); @@ -374,7 +374,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) if (HAVE_RGBA) { VERT_RESTORE_RGBA( 0 ); VERT_RESTORE_RGBA( 1 ); - if (HAVE_SPEC && VB->SecondaryColorPtr[0]) { + if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { VERT_RESTORE_SPEC( 0 ); VERT_RESTORE_SPEC( 1 ); } @@ -395,7 +395,7 @@ static void TAG(quadr)( GLcontext *ctx, struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb; VERTEX *v[4]; GLfloat offset = 0; - GLfloat z[4]; + GLfloat z[4] = { 0 }; GLenum mode = GL_FILL; GLuint facing = 0; LOCAL_VARS(4); @@ -436,7 +436,7 @@ static void TAG(quadr)( GLcontext *ctx, if (DO_TWOSIDE && facing == 1) { if (HAVE_RGBA) { - GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data; + GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data; (void)vbcolor; if (HAVE_BACK_COLORS) { @@ -471,7 +471,7 @@ static void TAG(quadr)( GLcontext *ctx, } VERT_SAVE_RGBA( 3 ); - if (VB->ColorPtr[1]->stride) { + if (VB->BackfaceColorPtr->stride) { if (!DO_FLAT) { VERT_SET_RGBA( v[0], vbcolor[e0] ); VERT_SET_RGBA( v[1], vbcolor[e1] ); @@ -488,9 +488,9 @@ static void TAG(quadr)( GLcontext *ctx, VERT_SET_RGBA( v[3], vbcolor[0] ); } - if (HAVE_SPEC && VB->SecondaryColorPtr[1]) { - GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data; - ASSERT(VB->SecondaryColorPtr[1]->stride==4*sizeof(GLfloat)); + if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) { + GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data; + ASSERT(VB->BackfaceSecondaryColorPtr->stride==4*sizeof(GLfloat)); if (!DO_FLAT) { VERT_SAVE_SPEC( 0 ); @@ -506,7 +506,7 @@ static void TAG(quadr)( GLcontext *ctx, } } else { - GLfloat *vbindex = (GLfloat *)VB->IndexPtr[1]->data; + GLfloat *vbindex = (GLfloat *)VB->BackfaceIndexPtr->data; if (!DO_FLAT) { VERT_SAVE_IND( 0 ); VERT_SAVE_IND( 1 ); @@ -553,7 +553,7 @@ static void TAG(quadr)( GLcontext *ctx, VERT_COPY_RGBA( v[0], v[3] ); VERT_COPY_RGBA( v[1], v[3] ); VERT_COPY_RGBA( v[2], v[3] ); - if (HAVE_SPEC && VB->SecondaryColorPtr[0]) { + if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { VERT_SAVE_SPEC( 0 ); VERT_SAVE_SPEC( 1 ); VERT_SAVE_SPEC( 2 ); @@ -659,7 +659,7 @@ static void TAG(quadr)( GLcontext *ctx, VERT_RESTORE_RGBA( 0 ); VERT_RESTORE_RGBA( 1 ); VERT_RESTORE_RGBA( 2 ); - if (HAVE_SPEC && VB->SecondaryColorPtr[0]) { + if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { VERT_RESTORE_SPEC( 0 ); VERT_RESTORE_SPEC( 1 ); VERT_RESTORE_SPEC( 2 ); @@ -708,7 +708,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 ) if (HAVE_RGBA) { VERT_SAVE_RGBA( 0 ); VERT_COPY_RGBA( v[0], v[1] ); - if (HAVE_SPEC && VB->SecondaryColorPtr[0]) { + if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { VERT_SAVE_SPEC( 0 ); VERT_COPY_SPEC( v[0], v[1] ); } @@ -725,7 +725,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 ) if (HAVE_RGBA) { VERT_RESTORE_RGBA( 0 ); - if (HAVE_SPEC && VB->SecondaryColorPtr[0]) { + if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { VERT_RESTORE_SPEC( 0 ); } } diff --git a/src/mesa/tnl_dd/t_dd_vb.c b/src/mesa/tnl_dd/t_dd_vb.c index b3937c29a0..a8a0a69768 100644 --- a/src/mesa/tnl_dd/t_dd_vb.c +++ b/src/mesa/tnl_dd/t_dd_vb.c @@ -297,19 +297,19 @@ INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx, LOCALVARS struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - if (VB->ColorPtr[1]) { - assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat)); + if (VB->BackfaceColorPtr) { + assert(VB->BackfaceColorPtr->stride == 4 * sizeof(GLfloat)); INTERP_4F( t, - GET_COLOR(VB->ColorPtr[1], dst), - GET_COLOR(VB->ColorPtr[1], out), - GET_COLOR(VB->ColorPtr[1], in) ); + GET_COLOR(VB->BackfaceColorPtr, dst), + GET_COLOR(VB->BackfaceColorPtr, out), + GET_COLOR(VB->BackfaceColorPtr, in) ); - if (VB->SecondaryColorPtr[1]) { + if (VB->BackfaceSecondaryColorPtr) { INTERP_3F( t, - GET_COLOR(VB->SecondaryColorPtr[1], dst), - GET_COLOR(VB->SecondaryColorPtr[1], out), - GET_COLOR(VB->SecondaryColorPtr[1], in) ); + GET_COLOR(VB->BackfaceSecondaryColorPtr, dst), + GET_COLOR(VB->BackfaceSecondaryColorPtr, out), + GET_COLOR(VB->BackfaceSecondaryColorPtr, in) ); } } @@ -326,13 +326,13 @@ INTERP_QUALIFIER void TAG(copy_pv_extras)( GLcontext *ctx, LOCALVARS struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - if (VB->ColorPtr[1]) { - COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst), - GET_COLOR(VB->ColorPtr[1], src) ); + if (VB->BackfaceColorPtr) { + COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst), + GET_COLOR(VB->BackfaceColorPtr, src) ); - if (VB->SecondaryColorPtr[1]) { - COPY_4FV( GET_COLOR(VB->SecondaryColorPtr[1], dst), - GET_COLOR(VB->SecondaryColorPtr[1], src) ); + if (VB->BackfaceSecondaryColorPtr) { + COPY_4FV( GET_COLOR(VB->BackfaceSecondaryColorPtr, dst), + GET_COLOR(VB->BackfaceSecondaryColorPtr, src) ); } } diff --git a/src/mesa/tnl_dd/t_dd_vbtmp.h b/src/mesa/tnl_dd/t_dd_vbtmp.h index 92dd8931c3..85101b9ceb 100644 --- a/src/mesa/tnl_dd/t_dd_vbtmp.h +++ b/src/mesa/tnl_dd/t_dd_vbtmp.h @@ -153,46 +153,46 @@ static void TAG(emit)( GLcontext *ctx, if (DO_TEX3) { const GLuint t3 = GET_TEXSOURCE(3); - tc3 = VB->TexCoordPtr[t3]->data; - tc3_stride = VB->TexCoordPtr[t3]->stride; + tc3 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->data; + tc3_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->stride; if (DO_PTEX) - tc3_size = VB->TexCoordPtr[t3]->size; + tc3_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->size; } if (DO_TEX2) { const GLuint t2 = GET_TEXSOURCE(2); - tc2 = VB->TexCoordPtr[t2]->data; - tc2_stride = VB->TexCoordPtr[t2]->stride; + tc2 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->data; + tc2_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->stride; if (DO_PTEX) - tc2_size = VB->TexCoordPtr[t2]->size; + tc2_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->size; } if (DO_TEX1) { const GLuint t1 = GET_TEXSOURCE(1); - tc1 = VB->TexCoordPtr[t1]->data; - tc1_stride = VB->TexCoordPtr[t1]->stride; + tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->data; + tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->stride; if (DO_PTEX) - tc1_size = VB->TexCoordPtr[t1]->size; + tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->size; } if (DO_TEX0) { const GLuint t0 = GET_TEXSOURCE(0); - tc0_stride = VB->TexCoordPtr[t0]->stride; - tc0 = VB->TexCoordPtr[t0]->data; + tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->stride; + tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->data; if (DO_PTEX) - tc0_size = VB->TexCoordPtr[t0]->size; + tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->size; } if (DO_RGBA) { - col_stride = VB->ColorPtr[0]->stride; - col = VB->ColorPtr[0]->data; - col_size = VB->ColorPtr[0]->size; + col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride; + col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; + col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size; } if (DO_SPEC) { - if (VB->SecondaryColorPtr[0]) { - spec_stride = VB->SecondaryColorPtr[0]->stride; - spec = VB->SecondaryColorPtr[0]->data; + if (VB->AttribPtr[_TNL_ATTRIB_COLOR1]) { + spec_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride; + spec = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data; } else { spec = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_COLOR1]; spec_stride = 0; @@ -200,9 +200,9 @@ static void TAG(emit)( GLcontext *ctx, } if (DO_FOG) { - if (VB->FogCoordPtr) { - fog = VB->FogCoordPtr->data; - fog_stride = VB->FogCoordPtr->stride; + if (VB->AttribPtr[_TNL_ATTRIB_FOG]) { + fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data; + fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride; } else { static GLfloat tmp[4] = {0, 0, 0, 0}; @@ -356,9 +356,9 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end, ASSERT(stride == 4); - col = VB->ColorPtr[0]->data; - col_stride = VB->ColorPtr[0]->stride; - col_size = VB->ColorPtr[0]->size; + col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; + col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride; + col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size; /* fprintf(stderr, "%s(small) importable %x\n", */ /* __FUNCTION__, VB->importable_data); */ @@ -410,22 +410,22 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx ) /* Force 'missing' texcoords to something valid. */ - if (DO_TEX3 && VB->TexCoordPtr[2] == 0) - VB->TexCoordPtr[2] = VB->TexCoordPtr[3]; + if (DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] == 0) + VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 3]; - if (DO_TEX2 && VB->TexCoordPtr[1] == 0) - VB->TexCoordPtr[1] = VB->TexCoordPtr[2]; + if (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] == 0) + VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2]; - if (DO_TEX1 && VB->TexCoordPtr[0] == 0) - VB->TexCoordPtr[0] = VB->TexCoordPtr[1]; + if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] == 0) + VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1]; if (DO_PTEX) return GL_TRUE; - if ((DO_TEX3 && VB->TexCoordPtr[GET_TEXSOURCE(3)]->size == 4) || - (DO_TEX2 && VB->TexCoordPtr[GET_TEXSOURCE(2)]->size == 4) || - (DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4) || - (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4)) + if ((DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(3)]->size == 4) || + (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(2)]->size == 4) || + (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4) || + (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4)) return GL_FALSE; return GL_TRUE; @@ -438,14 +438,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx ) /* Force 'missing' texcoords to something valid. */ - if (DO_TEX3 && VB->TexCoordPtr[2] == 0) - VB->TexCoordPtr[2] = VB->TexCoordPtr[3]; + if (DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] == 0) + VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 3]; - if (DO_TEX2 && VB->TexCoordPtr[1] == 0) - VB->TexCoordPtr[1] = VB->TexCoordPtr[2]; + if (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] == 0) + VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2]; - if (DO_TEX1 && VB->TexCoordPtr[0] == 0) - VB->TexCoordPtr[0] = VB->TexCoordPtr[1]; + if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] == 0) + VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1]; if (DO_PTEX) return GL_TRUE; @@ -453,14 +453,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx ) /* No hardware support for projective texture. Can fake it for * TEX0 only. */ - if ((DO_TEX3 && VB->TexCoordPtr[GET_TEXSOURCE(3)]->size == 4) || - (DO_TEX2 && VB->TexCoordPtr[GET_TEXSOURCE(2)]->size == 4) || - (DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4)) { + if ((DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(3)]->size == 4) || + (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(2)]->size == 4) || + (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4)) { PTEX_FALLBACK(); return GL_FALSE; } - if (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4) { + if (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4) { if (DO_TEX1 || DO_TEX2 || DO_TEX3) { PTEX_FALLBACK(); } |