summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2003-11-26 08:32:35 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2003-11-26 08:32:35 +0000
commit854b4a3b5456e0a381df49de854fdb315899dfc2 (patch)
tree14c3e1f4f5e478c700737ebfffd006886ef8a74a
parent0f3cd3f894612d156de454178effa4c732f96da7 (diff)
accomodate vtx-0-2-branch
-rw-r--r--src/mesa/Makefile.DJ21
-rw-r--r--src/mesa/Makefile.mgw21
-rw-r--r--src/mesa/Makefile.wfx17
-rw-r--r--src/mesa/drivers/glide/fxglidew.h4
-rw-r--r--src/mesa/drivers/glide/fxtris.c84
-rw-r--r--src/mesa/drivers/glide/fxvb.c49
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h21
-rw-r--r--src/mesa/tnl_dd/t_dd_rendertmp.h3
-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
12 files changed, 140 insertions, 218 deletions
diff --git a/src/mesa/Makefile.DJ b/src/mesa/Makefile.DJ
index af2bb36ccc..cd336fc50e 100644
--- a/src/mesa/Makefile.DJ
+++ b/src/mesa/Makefile.DJ
@@ -216,16 +216,10 @@ TNL_SOURCES = \
tnl/t_array_api.c \
tnl/t_array_import.c \
tnl/t_context.c \
- tnl/t_eval_api.c \
- tnl/t_imm_alloc.c \
- tnl/t_imm_api.c \
- tnl/t_imm_debug.c \
- tnl/t_imm_dlist.c \
- tnl/t_imm_elt.c \
- tnl/t_imm_eval.c \
- tnl/t_imm_exec.c \
- tnl/t_imm_fixup.c \
tnl/t_pipeline.c \
+ tnl/t_save_api.c \
+ tnl/t_save_loopback.c \
+ tnl/t_save_playback.c \
tnl/t_vb_fog.c \
tnl/t_vb_light.c \
tnl/t_vb_normals.c \
@@ -234,7 +228,10 @@ TNL_SOURCES = \
tnl/t_vb_render.c \
tnl/t_vb_texgen.c \
tnl/t_vb_texmat.c \
- tnl/t_vb_vertex.c
+ tnl/t_vb_vertex.c \
+ tnl/t_vtx_api.c \
+ tnl/t_vtx_eval.c \
+ tnl/t_vtx_exec.c
X86_SOURCES = \
x86/x86.c \
@@ -268,9 +265,9 @@ CORE_SOURCES = \
$(GLAPI_SOURCES) \
$(MATH_SOURCES) \
$(ARRAY_CACHE_SOURCES) \
+ $(TNL_SOURCES) \
$(SWRAST_SOURCES) \
- $(SWRAST_SETUP_SOURCES) \
- $(TNL_SOURCES)
+ $(SWRAST_SETUP_SOURCES)
ifeq ($(HAVE_MMX),1)
X86_SOURCES += $(MMX_SOURCES)
diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw
index 9f49e0e9b6..3f9ddaa504 100644
--- a/src/mesa/Makefile.mgw
+++ b/src/mesa/Makefile.mgw
@@ -209,16 +209,10 @@ TNL_SOURCES = \
tnl/t_array_api.c \
tnl/t_array_import.c \
tnl/t_context.c \
- tnl/t_eval_api.c \
- tnl/t_imm_alloc.c \
- tnl/t_imm_api.c \
- tnl/t_imm_debug.c \
- tnl/t_imm_dlist.c \
- tnl/t_imm_elt.c \
- tnl/t_imm_eval.c \
- tnl/t_imm_exec.c \
- tnl/t_imm_fixup.c \
tnl/t_pipeline.c \
+ tnl/t_save_api.c \
+ tnl/t_save_loopback.c \
+ tnl/t_save_playback.c \
tnl/t_vb_fog.c \
tnl/t_vb_light.c \
tnl/t_vb_normals.c \
@@ -227,7 +221,10 @@ TNL_SOURCES = \
tnl/t_vb_render.c \
tnl/t_vb_texgen.c \
tnl/t_vb_texmat.c \
- tnl/t_vb_vertex.c
+ tnl/t_vb_vertex.c \
+ tnl/t_vtx_api.c \
+ tnl/t_vtx_eval.c \
+ tnl/t_vtx_exec.c
X86_SOURCES = \
x86/x86.c \
@@ -261,9 +258,9 @@ CORE_SOURCES = \
$(GLAPI_SOURCES) \
$(MATH_SOURCES) \
$(ARRAY_CACHE_SOURCES) \
+ $(TNL_SOURCES) \
$(SWRAST_SOURCES) \
- $(SWRAST_SETUP_SOURCES) \
- $(TNL_SOURCES)
+ $(SWRAST_SETUP_SOURCES)
ifeq ($(HAVE_MMX),1)
X86_SOURCES += $(MMX_SOURCES)
diff --git a/src/mesa/Makefile.wfx b/src/mesa/Makefile.wfx
index 0561f6da46..0886c2c152 100644
--- a/src/mesa/Makefile.wfx
+++ b/src/mesa/Makefile.wfx
@@ -231,16 +231,10 @@ TNL_SOURCES =\
tnl\t_array_api.c\
tnl\t_array_import.c\
tnl\t_context.c\
- tnl\t_eval_api.c\
- tnl\t_imm_alloc.c\
- tnl\t_imm_api.c\
- tnl\t_imm_debug.c\
- tnl\t_imm_dlist.c\
- tnl\t_imm_elt.c\
- tnl\t_imm_eval.c\
- tnl\t_imm_exec.c\
- tnl\t_imm_fixup.c\
tnl\t_pipeline.c\
+ tnl\t_save_api.c\
+ tnl\t_save_loopback.c\
+ tnl\t_save_playback.c\
tnl\t_vb_fog.c\
tnl\t_vb_light.c\
tnl\t_vb_normals.c\
@@ -249,7 +243,10 @@ TNL_SOURCES =\
tnl\t_vb_render.c\
tnl\t_vb_texgen.c\
tnl\t_vb_texmat.c\
- tnl\t_vb_vertex.c
+ tnl\t_vb_vertex.c\
+ tnl\t_vtx_api.c\
+ tnl\t_vtx_eval.c\
+ tnl\t_vtx_exec.c
DRIVER_SOURCES =\
drivers\glide\fxapi.c\
diff --git a/src/mesa/drivers/glide/fxglidew.h b/src/mesa/drivers/glide/fxglidew.h
index 31a8fa3b02..feacde8418 100644
--- a/src/mesa/drivers/glide/fxglidew.h
+++ b/src/mesa/drivers/glide/fxglidew.h
@@ -119,7 +119,8 @@ typedef struct {
float oow; /* 1/W (used for W-buffering, texturing) */
unsigned char pargb[4]; /* B, G, R, A [0..255] */
GrTmuVertex tmuvtx[GLIDE_NUM_TMU];
- long pad[16 - 11]; /* future use; also ensure 64b structure */
+ float fog; /* fog coordinate */
+ long pad[16 - 12]; /* ensure 64b structure */
} GrVertex;
#define GR_VERTEX_X_OFFSET 0
@@ -133,6 +134,7 @@ typedef struct {
#define GR_VERTEX_SOW_TMU1_OFFSET 8
#define GR_VERTEX_TOW_TMU1_OFFSET 9
#define GR_VERTEX_OOW_TMU1_OFFSET 10
+#define GR_VERTEX_FOG_OFFSET 11
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 08ecc6dd81..209a29e766 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -24,6 +24,7 @@
/* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
+ * Daniel Borca <dborca@users.sourceforge.net>
*/
#include "glheader.h"
@@ -310,10 +311,10 @@ static struct {
#define VERT_SET_RGBA( dst, f ) \
do { \
- dst->pargb[2] = f[0]; \
- dst->pargb[1] = f[1]; \
- dst->pargb[0] = f[2]; \
- dst->pargb[3] = f[3]; \
+ dst->pargb[2] = f[0] * 255.; \
+ dst->pargb[1] = f[1] * 255.; \
+ dst->pargb[0] = f[2] * 255.; \
+ dst->pargb[3] = f[3] * 255.; \
} while (0)
#define VERT_COPY_RGBA( v0, v1 ) \
@@ -343,7 +344,7 @@ do { \
#define RENDER_PRIMITIVE fxMesa->render_primitive
#define IND FX_FALLBACK_BIT
#define TAG(x) x
-#include "../common/t_dd_unfilled.h"
+#include "../../tnl_dd/t_dd_unfilled.h"
#undef IND
/***********************************************************************
@@ -352,136 +353,136 @@ do { \
#define IND (0)
#define TAG(x) x
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT)
#define TAG(x) x##_offset
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT)
#define TAG(x) x##_twoside
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT)
#define TAG(x) x##_twoside_offset
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_UNFILLED_BIT)
#define TAG(x) x##_unfilled
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_UNFILLED_BIT)
#define TAG(x) x##_offset_unfilled
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_UNFILLED_BIT)
#define TAG(x) x##_twoside_unfilled
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_UNFILLED_BIT)
#define TAG(x) x##_twoside_offset_unfilled
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_FALLBACK_BIT)
#define TAG(x) x##_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_FALLBACK_BIT)
#define TAG(x) x##_offset_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_FALLBACK_BIT)
#define TAG(x) x##_twoside_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_FALLBACK_BIT)
#define TAG(x) x##_twoside_offset_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_UNFILLED_BIT|FX_FALLBACK_BIT)
#define TAG(x) x##_unfilled_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_UNFILLED_BIT|FX_FALLBACK_BIT)
#define TAG(x) x##_offset_unfilled_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_UNFILLED_BIT|FX_FALLBACK_BIT)
#define TAG(x) x##_twoside_unfilled_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_UNFILLED_BIT| \
FX_FALLBACK_BIT)
#define TAG(x) x##_twoside_offset_unfilled_fallback
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
/* Fx doesn't support provoking-vertex flat-shading?
*/
#define IND (FX_FLAT_BIT)
#define TAG(x) x##_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_FLAT_BIT)
#define TAG(x) x##_offset_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_offset_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_UNFILLED_BIT|FX_FLAT_BIT)
#define TAG(x) x##_unfilled_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_UNFILLED_BIT|FX_FLAT_BIT)
#define TAG(x) x##_offset_unfilled_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_UNFILLED_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_unfilled_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_UNFILLED_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_offset_unfilled_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_offset_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_offset_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_UNFILLED_BIT|FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_unfilled_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_OFFSET_BIT|FX_UNFILLED_BIT|FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_offset_unfilled_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_UNFILLED_BIT|FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_unfilled_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
#define IND (FX_TWOSIDE_BIT|FX_OFFSET_BIT|FX_UNFILLED_BIT| \
FX_FALLBACK_BIT|FX_FLAT_BIT)
#define TAG(x) x##_twoside_offset_unfilled_fallback_flat
-#include "../common/t_dd_tritmp.h"
+#include "../../tnl_dd/t_dd_tritmp.h"
static void init_rast_tab( void )
@@ -719,9 +720,10 @@ static void fx_render_vb_tri_strip( GLcontext *ctx,
INIT(GL_TRIANGLE_STRIP);
+ /* [dBorca] WTF?!?
if (flags & PRIM_PARITY)
mode = GR_TRIANGLE_STRIP_CONTINUE;
- else
+ else*/
mode = GR_TRIANGLE_STRIP;
grDrawVertexArrayContiguous( mode, count-start,
@@ -837,7 +839,7 @@ static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
fx_render_vb_poly,
fx_render_vb_noop,
};
-#undef INIT(x)
+#undef INIT
/**********************************************************************/
@@ -879,7 +881,7 @@ static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
#undef TAG
#define TAG(x) fx_##x##_elts
#define ELT(x) elt[x]
-#include "../common/t_dd_rendertmp.h"
+#include "../../tnl_dd/t_dd_rendertmp.h"
/* Verts, no clipping.
*/
@@ -887,7 +889,7 @@ static void (*fx_render_tab_verts[GL_POLYGON+2])(GLcontext *,
#undef TAG
#define TAG(x) fx_##x##_verts
#define ELT(x) x
-/*#include "../common/t_dd_rendertmp.h"*/ /* we have fx_render_vb_* now */
+/*#include "../../tnl_dd/t_dd_rendertmp.h"*/ /* we have fx_render_vb_* now */
diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c
index 8d3647ad60..03cefef082 100644
--- a/src/mesa/drivers/glide/fxvb.c
+++ b/src/mesa/drivers/glide/fxvb.c
@@ -24,7 +24,8 @@
*/
/* Authors:
- * Keith Whitwell
+ * Keith Whitwell <keith@tungstengraphics.com>
+ * Daniel Borca <dborca@users.sourceforge.net>
*/
#ifdef HAVE_CONFIG_H
@@ -67,41 +68,7 @@ static struct {
} setup_tab[MAX_SETUP];
-static void import_float_colors( GLcontext *ctx )
-{
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- struct gl_client_array *from = VB->ColorPtr[0];
- struct gl_client_array *to = &FX_CONTEXT(ctx)->UbyteColor;
- GLuint count = VB->Count;
-
- if (!to->Ptr) {
- to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLubyte), 32 );
- to->Type = GL_UNSIGNED_BYTE;
- }
-
- /* No need to transform the same value 3000 times.
- */
- if (!from->StrideB) {
- to->StrideB = 0;
- count = 1;
- }
- else
- to->StrideB = 4 * sizeof(GLubyte);
-
- _math_trans_4ub( (GLubyte (*)[4]) to->Ptr,
- from->Ptr,
- from->StrideB,
- from->Type,
- from->Size,
- 0,
- count);
-
- VB->ColorPtr[0] = to;
-}
-
-
-/* Hack alert: assume chan is 8 bits */
-#define GET_COLOR(ptr, idx) (((GLchan (*)[4])((ptr)->Ptr))[idx])
+#define GET_COLOR(ptr, idx) ((ptr)->data[idx])
static void interp_extras( GLcontext *ctx,
@@ -112,13 +79,15 @@ static void interp_extras( GLcontext *ctx,
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
if (VB->ColorPtr[1]) {
- INTERP_4CHAN( t,
+ assert(VB->ColorPtr[1]->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) );
#if 1 /* [dBorca] GL_EXT_separate_specular_color */
if (VB->SecondaryColorPtr[1]) {
- INTERP_3CHAN( t,
+ INTERP_3F( t,
GET_COLOR(VB->SecondaryColorPtr[1], dst),
GET_COLOR(VB->SecondaryColorPtr[1], out),
GET_COLOR(VB->SecondaryColorPtr[1], in) );
@@ -139,11 +108,11 @@ static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src )
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
if (VB->ColorPtr[1]) {
- COPY_CHAN4( GET_COLOR(VB->ColorPtr[1], dst),
+ COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst),
GET_COLOR(VB->ColorPtr[1], src) );
#if 1 /* [dBorca] GL_EXT_separate_specular_color */
if (VB->SecondaryColorPtr[1]) {
- COPY_CHAN4( GET_COLOR(VB->SecondaryColorPtr[1], dst),
+ COPY_4FV( GET_COLOR(VB->SecondaryColorPtr[1], dst),
GET_COLOR(VB->SecondaryColorPtr[1], src) );
}
#endif
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index 7d5741cd75..e0af9bdb4f 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -24,6 +24,7 @@
/* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
+ * Daniel Borca <dborca@users.sourceforge.net>
*/
@@ -40,7 +41,7 @@ static void TAG(emit)( GLcontext *ctx,
GLuint tmu0_source = fxMesa->tmu_source[0];
GLuint tmu1_source = fxMesa->tmu_source[1];
GLfloat (*tc0)[4], (*tc1)[4];
- GLubyte (*col)[4];
+ GLfloat (*col)[4];
GLuint tc0_stride, tc1_stride, col_stride;
GLuint tc0_size, tc1_size;
GLfloat (*proj)[4] = VB->NdcPtr->data;
@@ -71,10 +72,8 @@ static void TAG(emit)( GLcontext *ctx,
}
if (IND & SETUP_RGBA) {
- if (VB->ColorPtr[0]->Type != GL_UNSIGNED_BYTE)
- import_float_colors( ctx );
- col = VB->ColorPtr[0]->Ptr;
- col_stride = VB->ColorPtr[0]->StrideB;
+ col = VB->ColorPtr[0]->data;
+ col_stride = VB->ColorPtr[0]->stride;
}
if (start) {
@@ -84,7 +83,7 @@ static void TAG(emit)( GLcontext *ctx,
if (IND & SETUP_TMU1)
tc1 = (GLfloat (*)[4])((GLubyte *)tc1 + start * tc1_stride);
if (IND & SETUP_RGBA)
- STRIDE_4UB(col, start * col_stride);
+ STRIDE_4F(col, start * col_stride);
}
for (i=start; i < end; i++, v++) {
@@ -116,11 +115,11 @@ static void TAG(emit)( GLcontext *ctx,
proj = (GLfloat (*)[4])((GLubyte *)proj + proj_stride);
}
if (IND & SETUP_RGBA) {
- v->pargb[2] = col[0][0];
- v->pargb[1] = col[0][1];
- v->pargb[0] = col[0][2];
- v->pargb[3] = col[0][3];
- STRIDE_4UB(col, col_stride);
+ v->pargb[2] = col[0][0] * 255.;
+ v->pargb[1] = col[0][1] * 255.;
+ v->pargb[0] = col[0][2] * 255.;
+ v->pargb[3] = col[0][3] * 255.;
+ STRIDE_4F(col, col_stride);
}
if (IND & SETUP_TMU0) {
GLfloat w = v->oow;
diff --git a/src/mesa/tnl_dd/t_dd_rendertmp.h b/src/mesa/tnl_dd/t_dd_rendertmp.h
index fc00e76934..b9f030195d 100644
--- a/src/mesa/tnl_dd/t_dd_rendertmp.h
+++ b/src/mesa/tnl_dd/t_dd_rendertmp.h
@@ -186,9 +186,6 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
GLuint parity = 0;
LOCAL_VARS;
- if (TEST_PRIM_PARITY(flags))
- parity = 1;
-
INIT(GL_TRIANGLE_STRIP);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+2;j<count;j++,parity^=1) {
diff --git a/src/mesa/x86/3dnow_normal.S b/src/mesa/x86/3dnow_normal.S
index 2855f608c3..07755b2516 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 e57c7326e3..30642e4b12 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 32bcf3def9..1b43d57a20 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 91260a2085..64bd38486c 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