summaryrefslogtreecommitdiffstats
path: root/src/mesa/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/x86')
-rw-r--r--src/mesa/x86/3dnow_normal.S68
-rw-r--r--src/mesa/x86/gen_matypes.c38
-rw-r--r--src/mesa/x86/norm_args.h6
-rw-r--r--src/mesa/x86/sse_normal.S26
4 files changed, 50 insertions, 88 deletions
diff --git a/src/mesa/x86/3dnow_normal.S b/src/mesa/x86/3dnow_normal.S
index 2855f608c39..07755b2516d 100644
--- a/src/mesa/x86/3dnow_normal.S
+++ b/src/mesa/x86/3dnow_normal.S
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_normal.S,v 1.5 2003/01/30 14:30:24 brianp Exp $ */
+/* $Id: 3dnow_normal.S,v 1.6 2003/11/26 08:32:35 dborca Exp $ */
/*
* Mesa 3-D graphics library
@@ -50,17 +50,17 @@ GLNAME(_mesa_3dnow_transform_normalize_normals):
MOV_L ( ARG_LENGTHS, EDI )
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EBP ) /* dest->count = in->count */
- MOV_L ( EBP, REGOFF(V3F_COUNT, EAX) )
- MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EBP ) /* dest->count = in->count */
+ MOV_L ( EBP, REGOFF(V4F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_START, ESI), EDX ) /* in->start */
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
MOV_L ( ARG_MAT, ECX )
MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */
CMP_L ( CONST(0), EBP ) /* count > 0 ?? */
JE ( LLBL (G3TN_end) )
- MOV_L ( REGOFF (V3F_COUNT, ESI), EBP )
+ MOV_L ( REGOFF (V4F_COUNT, ESI), EBP )
FEMMS
PUSH_L ( EBP )
@@ -228,12 +228,12 @@ GLNAME(_mesa_3dnow_transform_normalize_normals_no_rot):
MOV_L ( ARG_LENGTHS, EDI )
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EBP ) /* dest->count = in->count */
- MOV_L ( EBP, REGOFF(V3F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EBP ) /* dest->count = in->count */
+ MOV_L ( EBP, REGOFF(V4F_COUNT, EAX) )
MOV_L ( ARG_MAT, ECX )
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */
- MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */
+ MOV_L ( REGOFF(V4F_START, ESI), EDX ) /* in->start */
CMP_L ( CONST(0), EBP ) /* count > 0 ?? */
JE ( LLBL (G3TNNR_end) )
@@ -366,13 +366,13 @@ GLNAME(_mesa_3dnow_transform_rescale_normals_no_rot):
MOV_L ( ARG_IN, EAX )
MOV_L ( ARG_DEST, EDX )
- MOV_L ( REGOFF(V3F_COUNT, EAX), EBP ) /* dest->count = in->count */
- MOV_L ( EBP, REGOFF(V3F_COUNT, EDX) )
+ MOV_L ( REGOFF(V4F_COUNT, EAX), EBP ) /* dest->count = in->count */
+ MOV_L ( EBP, REGOFF(V4F_COUNT, EDX) )
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_MAT, ECX )
MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */
- MOV_L ( REGOFF(V3F_START, EDX), EAX ) /* dest->start */
- MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */
+ MOV_L ( REGOFF(V4F_START, EDX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, ESI), EDX ) /* in->start */
CMP_L ( CONST(0), EBP )
JE ( LLBL (G3TRNR_end) )
@@ -437,10 +437,10 @@ GLNAME(_mesa_3dnow_transform_rescale_normals):
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
MOV_L ( ARG_MAT, ECX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EDI ) /* dest->count = in->count */
- MOV_L ( EDI, REGOFF(V3F_COUNT, EAX) )
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
- MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EDI ) /* dest->count = in->count */
+ MOV_L ( EDI, REGOFF(V4F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, ESI), EDX ) /* in->start */
MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */
CMP_L ( CONST(0), EDI )
@@ -534,10 +534,10 @@ GLNAME(_mesa_3dnow_transform_normals_no_rot):
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
MOV_L ( ARG_MAT, ECX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EDI ) /* dest->count = in->count */
- MOV_L ( EDI, REGOFF(V3F_COUNT, EAX) )
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
- MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EDI ) /* dest->count = in->count */
+ MOV_L ( EDI, REGOFF(V4F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, ESI), EDX ) /* in->start */
MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */
CMP_L ( CONST(0), EDI )
@@ -600,10 +600,10 @@ GLNAME(_mesa_3dnow_transform_normals):
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
MOV_L ( ARG_MAT, ECX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EDI ) /* dest->count = in->count */
- MOV_L ( EDI, REGOFF(V3F_COUNT, EAX) )
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
- MOV_L ( REGOFF(V3F_START, ESI), EDX ) /* in->start */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EDI ) /* dest->count = in->count */
+ MOV_L ( EDI, REGOFF(V4F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, ESI), EDX ) /* in->start */
MOV_L ( REGOFF(MATRIX_INV, ECX), ECX ) /* mat->inv */
CMP_L ( CONST(0), EDI ) /* count > 0 ?? */
@@ -684,10 +684,10 @@ GLNAME(_mesa_3dnow_normalize_normals):
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EBP ) /* dest->count = in->count */
- MOV_L ( EBP, REGOFF(V3F_COUNT, EAX) )
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
- MOV_L ( REGOFF(V3F_START, ESI), ECX ) /* in->start */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EBP ) /* dest->count = in->count */
+ MOV_L ( EBP, REGOFF(V4F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, ESI), ECX ) /* in->start */
MOV_L ( ARG_LENGTHS, EDX )
CMP_L ( CONST(0), EBP ) /* count > 0 ?? */
@@ -793,10 +793,10 @@ GLNAME(_mesa_3dnow_rescale_normals):
MOV_L ( ARG_IN, ESI )
MOV_L ( ARG_DEST, EAX )
- MOV_L ( REGOFF(V3F_COUNT, ESI), EDX ) /* dest->count = in->count */
- MOV_L ( EDX, REGOFF(V3F_COUNT, EAX) )
- MOV_L ( REGOFF(V3F_START, EAX), EAX ) /* dest->start */
- MOV_L ( REGOFF(V3F_START, ESI), ECX ) /* in->start */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), EDX ) /* dest->count = in->count */
+ MOV_L ( EDX, REGOFF(V4F_COUNT, EAX) )
+ MOV_L ( REGOFF(V4F_START, EAX), EAX ) /* dest->start */
+ MOV_L ( REGOFF(V4F_START, ESI), ECX ) /* in->start */
CMP_L ( CONST(0), EDX )
JE ( LLBL (G3R_end) )
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index e57c7326e3a..30642e4b12d 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -120,9 +120,6 @@ int main( int argc, char **argv )
OFFSET( "VB_SIZE ", struct vertex_buffer, Size );
OFFSET( "VB_COUNT ", struct vertex_buffer, Count );
printf( "\n" );
- OFFSET( "VB_FIRST_CLIPPED ", struct vertex_buffer, FirstClipped );
- OFFSET( "VB_FIRST_PRIMITIVE ", struct vertex_buffer, FirstPrimitive );
- printf( "\n" );
OFFSET( "VB_ELTS ", struct vertex_buffer, Elts );
OFFSET( "VB_OBJ_PTR ", struct vertex_buffer, ObjPtr );
OFFSET( "VB_EYE_PTR ", struct vertex_buffer, EyePtr );
@@ -141,13 +138,7 @@ int main( int argc, char **argv )
OFFSET( "VB_SECONDARY_COLOR_PTR ", struct vertex_buffer, SecondaryColorPtr );
OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, FogCoordPtr );
OFFSET( "VB_POINT_SIZE_PTR ", struct vertex_buffer, PointSizePtr );
- OFFSET( "VB_MATERIAL ", struct vertex_buffer, Material );
- OFFSET( "VB_MATERIAL_MASK ", struct vertex_buffer, MaterialMask );
- OFFSET( "VB_FLAG ", struct vertex_buffer, Flag );
OFFSET( "VB_PRIMITIVE ", struct vertex_buffer, Primitive );
- OFFSET( "VB_PRIMITIVE_LENGTH ", struct vertex_buffer, PrimitiveLength );
- printf( "\n" );
- OFFSET( "VB_IMPORTABLE_DATA ", struct vertex_buffer, importable_data );
printf( "\n" );
OFFSET( "VB_LAST_CLIPPED ", struct vertex_buffer, LastClipped );
@@ -159,39 +150,10 @@ int main( int argc, char **argv )
DEFINE( "VERT_BIT_RGBA ", VERT_BIT_COLOR0 );
DEFINE( "VERT_BIT_SPEC_RGB ", VERT_BIT_COLOR1 );
DEFINE( "VERT_BIT_FOG_COORD ", VERT_BIT_FOG );
- DEFINE( "VERT_BIT_INDEX ", VERT_BIT_INDEX );
- DEFINE( "VERT_BIT_EDGE ", VERT_BIT_EDGEFLAG );
DEFINE( "VERT_BIT_TEX0 ", VERT_BIT_TEX0 );
DEFINE( "VERT_BIT_TEX1 ", VERT_BIT_TEX1 );
DEFINE( "VERT_BIT_TEX2 ", VERT_BIT_TEX2 );
DEFINE( "VERT_BIT_TEX3 ", VERT_BIT_TEX3 );
- DEFINE( "VERT_BIT_EVAL_C1 ", VERT_BIT_EVAL_C1 );
- DEFINE( "VERT_BIT_EVAL_C2 ", VERT_BIT_EVAL_C2 );
- DEFINE( "VERT_BIT_EVAL_P1 ", VERT_BIT_EVAL_P1 );
- DEFINE( "VERT_BIT_EVAL_P2 ", VERT_BIT_EVAL_P2 );
- DEFINE( "VERT_BIT_OBJ_3 ", VERT_BIT_OBJ_3 );
- DEFINE( "VERT_BIT_OBJ_4 ", VERT_BIT_OBJ_4 );
- DEFINE( "VERT_BIT_MATERIAL ", VERT_BIT_MATERIAL );
- DEFINE( "VERT_BIT_ELT ", VERT_BIT_ELT );
- DEFINE( "VERT_BIT_BEGIN ", VERT_BIT_BEGIN );
- DEFINE( "VERT_BIT_END ", VERT_BIT_END );
- DEFINE( "VERT_BIT_END_VB ", VERT_BIT_END_VB );
- DEFINE( "VERT_BIT_POINT_SIZE ", VERT_BIT_POINT_SIZE );
- DEFINE( "VERT_BIT_EYE ", VERT_BIT_EYE );
- printf( "\n" );
- DEFINE( "VERT_BIT_OBJ_23 ", VERT_BIT_OBJ_3 );
- DEFINE( "VERT_BIT_OBJ_234 ", VERT_BIT_OBJ_4 );
-
-
- /* GLvector3f offsets:
- */
- OFFSET_HEADER( "GLvector3f" );
-
- OFFSET( "V3F_DATA ", GLvector3f, data );
- OFFSET( "V3F_START ", GLvector3f, start );
- OFFSET( "V3F_COUNT ", GLvector3f, count );
- OFFSET( "V3F_STRIDE ", GLvector3f, stride );
- OFFSET( "V3F_FLAGS ", GLvector3f, flags );
/* GLvector4f offsets:
diff --git a/src/mesa/x86/norm_args.h b/src/mesa/x86/norm_args.h
index 32bcf3def97..1b43d57a202 100644
--- a/src/mesa/x86/norm_args.h
+++ b/src/mesa/x86/norm_args.h
@@ -1,4 +1,4 @@
-/* $Id: norm_args.h,v 1.3 2002/10/29 20:28:58 brianp Exp $ */
+/* $Id: norm_args.h,v 1.4 2003/11/26 08:32:36 dborca Exp $ */
/*
* Mesa 3-D graphics library
@@ -39,9 +39,9 @@
*
* typedef void (*normal_func)( CONST GLmatrix *mat,
* GLfloat scale,
- * CONST GLvector3f *in,
+ * CONST GLvector4f *in,
* CONST GLfloat lengths[],
- * GLvector3f *dest );
+ * GLvector4f *dest );
*/
#define OFFSET_MAT 4
#define OFFSET_SCALE 8
diff --git a/src/mesa/x86/sse_normal.S b/src/mesa/x86/sse_normal.S
index 91260a20853..64bd38486c8 100644
--- a/src/mesa/x86/sse_normal.S
+++ b/src/mesa/x86/sse_normal.S
@@ -1,4 +1,4 @@
-/* $Id: sse_normal.S,v 1.2 2002/08/07 16:40:18 brianp Exp $ */
+/* $Id: sse_normal.S,v 1.3 2003/11/26 08:32:36 dborca Exp $ */
/*
* Mesa 3-D graphics library
@@ -56,18 +56,18 @@ GLNAME(_mesa_sse_transform_rescale_normals_no_rot):
MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */
MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */
- MOV_L ( REGOFF(V3F_COUNT, ESI), ECX ) /* source count */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */
TEST_L ( ECX, ECX )
JZ( LLBL(K_G3TRNNRR_finish) ) /* count was zero; go to finish */
MOV_L ( STRIDE, EAX ) /* stride */
- MOV_L ( ECX, REGOFF(V3F_COUNT, EDI) ) /* set dest-count */
+ MOV_L ( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest-count */
IMUL_L( CONST(16), ECX ) /* count *= 16 */
- MOV_L( REGOFF(V3F_START, ESI), ESI ) /* ptr to first source vertex */
+ MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */
- MOV_L( REGOFF(V3F_START, EDI), EDI ) /* ptr to first dest vertex */
+ MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */
ADD_L( EDI, ECX ) /* count += dest ptr */
ALIGNTEXT32
@@ -117,18 +117,18 @@ GLNAME(_mesa_sse_transform_rescale_normals):
MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */
MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */
- MOV_L ( REGOFF(V3F_COUNT, ESI), ECX ) /* source count */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */
TEST_L ( ECX, ECX )
JZ( LLBL(K_G3TRNR_finish) ) /* count was zero; go to finish */
MOV_L ( STRIDE, EAX ) /* stride */
- MOV_L ( ECX, REGOFF(V3F_COUNT, EDI) ) /* set dest-count */
+ MOV_L ( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest-count */
IMUL_L( CONST(16), ECX ) /* count *= 16 */
- MOV_L( REGOFF(V3F_START, ESI), ESI ) /* ptr to first source vertex */
+ MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */
- MOV_L( REGOFF(V3F_START, EDI), EDI ) /* ptr to first dest vertex */
+ MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */
ADD_L( EDI, ECX ) /* count += dest ptr */
ALIGNTEXT32
@@ -209,18 +209,18 @@ GLNAME(_mesa_sse_transform_normals_no_rot):
MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */
MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */
- MOV_L ( REGOFF(V3F_COUNT, ESI), ECX ) /* source count */
+ MOV_L ( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */
TEST_L ( ECX, ECX )
JZ( LLBL(K_G3TNNRR_finish) ) /* count was zero; go to finish */
MOV_L ( STRIDE, EAX ) /* stride */
- MOV_L ( ECX, REGOFF(V3F_COUNT, EDI) ) /* set dest-count */
+ MOV_L ( ECX, REGOFF(V4F_COUNT, EDI) ) /* set dest-count */
IMUL_L( CONST(16), ECX ) /* count *= 16 */
- MOV_L( REGOFF(V3F_START, ESI), ESI ) /* ptr to first source vertex */
+ MOV_L( REGOFF(V4F_START, ESI), ESI ) /* ptr to first source vertex */
- MOV_L( REGOFF(V3F_START, EDI), EDI ) /* ptr to first dest vertex */
+ MOV_L( REGOFF(V4F_START, EDI), EDI ) /* ptr to first dest vertex */
ADD_L( EDI, ECX ) /* count += dest ptr */
ALIGNTEXT32