From cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 26 Dec 2000 05:09:27 +0000 Subject: Major rework of tnl module New array_cache module Support 8 texture units in core mesa (now support 8 everywhere) Rework core mesa statechange operations to avoid flushing on many noop statechanges. --- src/mesa/drivers/x11/xm_api.c | 6 ++++-- src/mesa/drivers/x11/xm_dd.c | 18 +++++++++--------- src/mesa/drivers/x11/xmesaP.h | 4 ++-- 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'src/mesa/drivers/x11') diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 091e077009..bff35d59dd 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,4 +1,4 @@ -/* $Id: xm_api.c,v 1.12 2000/12/13 00:47:10 brianp Exp $ */ +/* $Id: xm_api.c,v 1.13 2000/12/26 05:09:31 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -78,6 +78,7 @@ #include "macros.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" +#include "array_cache/acache.h" #include "tnl/tnl.h" #ifndef GLX_NONE_EXT @@ -1665,8 +1666,9 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext( ctx ); - _swsetup_CreateContext( ctx ); + _ac_CreateContext( ctx ); _tnl_CreateContext( ctx ); + _swsetup_CreateContext( ctx ); xmesa_register_swrast_functions( ctx ); diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index d03790be0b..50700c6628 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.7 2000/11/22 07:32:18 joukj Exp $ */ +/* $Id: xm_dd.c,v 1.8 2000/12/26 05:09:31 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -38,6 +38,7 @@ #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" #include "tnl/tnl.h" +#include "array_cache/acache.h" /* * Return the size (width,height of the current color buffer. @@ -862,16 +863,17 @@ enable( GLcontext *ctx, GLenum pname, GLboolean state ) } -void xmesa_update_state( GLcontext *ctx ) +void xmesa_update_state( GLcontext *ctx, GLuint new_state ) { const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; /* Propogate statechange information to swrast and swrast_setup * modules. The X11 driver has no internal GL-dependent state. */ - _swrast_InvalidateState( ctx, ctx->NewState ); - _swsetup_InvalidateState( ctx, ctx->NewState ); - _tnl_InvalidateState( ctx, ctx->NewState ); + _swrast_InvalidateState( ctx, new_state ); + _ac_InvalidateState( ctx, new_state ); + _tnl_InvalidateState( ctx, new_state ); + _swsetup_InvalidateState( ctx, new_state ); /* setup pointers to front and back buffer clear functions */ @@ -937,9 +939,7 @@ void xmesa_init_pointers( GLcontext *ctx ) ctx->Driver.LineFunc = _swsetup_Line; ctx->Driver.TriangleFunc = _swsetup_Triangle; ctx->Driver.QuadFunc = _swsetup_Quad; - ctx->Driver.RasterSetup = _swsetup_RasterSetup; - ctx->Driver.RegisterVB = _swsetup_RegisterVB; - ctx->Driver.UnregisterVB = _swsetup_UnregisterVB; - + ctx->Driver.BuildProjectedVertices = _swsetup_BuildProjectedVertices; + ctx->Driver.ResetLineStipple = _swrast_ResetLineStipple; (void) DitherValues; /* silenced unused var warning */ } diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h index 401fc7dda1..a8f953963d 100644 --- a/src/mesa/drivers/x11/xmesaP.h +++ b/src/mesa/drivers/x11/xmesaP.h @@ -1,4 +1,4 @@ -/* $Id: xmesaP.h,v 1.17 2000/11/22 08:55:53 joukj Exp $ */ +/* $Id: xmesaP.h,v 1.18 2000/12/26 05:09:31 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -519,7 +519,7 @@ xmesa_color_to_pixel( XMesaContext xmesa, extern void xmesa_alloc_back_buffer( XMesaBuffer b ); extern void xmesa_init_pointers( GLcontext *ctx ); -extern void xmesa_update_state( GLcontext *ctx ); +extern void xmesa_update_state( GLcontext *ctx, GLuint new_state ); extern void xmesa_update_span_funcs( GLcontext *ctx ); -- cgit v1.2.3