aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
diff options
context:
space:
mode:
authorDave Airlie <airliedfreedesktop.org>2004-02-12 11:52:38 +0000
committerDave Airlie <airliedfreedesktop.org>2004-02-12 11:52:38 +0000
commit7b6ceb5b124673df2d94c2fe7dd2e779629f0354 (patch)
treef90794b9a7362d1bf4a1a7922cdc743e820a205d /src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
parentda8337ed5e52741321ee5171ce0b0c43f09036c9 (diff)
remove vertex_stride_shift, fix up code to not need it
Diffstat (limited to 'src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h')
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h b/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
index b924bcc86d5..623e1eae3b4 100644
--- a/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
+++ b/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
@@ -355,7 +355,6 @@ static void TAG(interp)( GLcontext *ctx,
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte *ddverts = GET_VERTEX_STORE();
- /* GLuint shift = GET_VERTEX_STRIDE_SHIFT();*/
GLuint size = GET_VERTEX_SIZE();
const GLfloat *dstclip = VB->ClipPtr->data[edst];
GLfloat w;
@@ -540,9 +539,9 @@ static void TAG(copy_pv)( GLcontext *ctx, GLuint edst, GLuint esrc )
#if DO_SPEC || DO_FOG || DO_RGBA
LOCALVARS
GLubyte *verts = GET_VERTEX_STORE();
- GLuint shift = GET_VERTEX_STRIDE_SHIFT();
- GLuint *dst = (GLuint *)(verts + (edst << shift));
- GLuint *src = (GLuint *)(verts + (esrc << shift));
+ GLuint size = GET_VERTEX_SIZE();
+ GLuint *dst = (GLuint *)(verts + (edst * size));
+ GLuint *src = (GLuint *)(verts + (esrc * size));
#endif
#if DO_SPEC || DO_FOG
@@ -565,30 +564,20 @@ static void TAG(init)( void )
setup_tab[IND].copy_pv = TAG(copy_pv);
- /* vertex_stride_shift must be the same because each
- * vertex is aligned with the end of the structure and
- * not the beginning
- */
#if DO_TEX1
setup_tab[IND].vertex_format = TEX1_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 10;
- setup_tab[IND].vertex_stride_shift = 6;
#elif DO_TEX0
setup_tab[IND].vertex_format = TEX0_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 7;
- setup_tab[IND].vertex_stride_shift = 6;
#elif DO_SPEC || DO_FOG
setup_tab[IND].vertex_format = NOTEX_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 4;
- setup_tab[IND].vertex_stride_shift = 6;
#else
setup_tab[IND].vertex_format = TINY_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 3;
- setup_tab[IND].vertex_stride_shift = 6;
#endif
- assert(setup_tab[IND].vertex_size * 4 <=
- 1 << setup_tab[IND].vertex_stride_shift);
}