summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/glide/fxdd.c36
-rw-r--r--src/mesa/drivers/glide/fxdrv.h1
-rw-r--r--src/mesa/drivers/x11/xm_dd.c21
3 files changed, 45 insertions, 13 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 08285f67e8c..fe918a7eac3 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -1028,10 +1028,40 @@ static void fxDDUpdateDDPointers(GLcontext *ctx, GLuint new_state)
static void fxDDRenderPrimitive( GLcontext *ctx, GLenum mode )
{
- (void) ctx; (void) mode;
+ fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
+
+ if (!fxMesa->is_in_hardware) {
+ _swsetup_RenderPrimitive( ctx, mode );
+ }
+ else {
+ fxMesa->render_prim = mode;
+ }
+}
+
+
+static void fxDDRenderStart( GLcontext *ctx )
+{
+ fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
+
+ if (!fxMesa->is_in_hardware) {
+ _swsetup_RenderStart( ctx );
+ }
+ else if (fxMesa->new_state) {
+ fxSetupFXUnits( ctx );
+ }
+}
+
+static void fxDDRenderFinish( GLcontext *ctx )
+{
+ fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
+
+ if (!fxMesa->is_in_hardware) {
+ _swsetup_RenderFinish( ctx );
+ }
}
+
void fxSetupDDPointers(GLcontext *ctx)
{
if (MESA_VERBOSE&VERBOSE_DRIVER) {
@@ -1062,8 +1092,8 @@ void fxSetupDDPointers(GLcontext *ctx)
ctx->Driver.Finish=fxDDFinish;
ctx->Driver.Flush=NULL;
- ctx->Driver.RenderStart=fxSetupFXUnits;
- ctx->Driver.RenderFinish=_swrast_flush;
+ ctx->Driver.RenderStart=fxDDRenderStart;
+ ctx->Driver.RenderFinish=fxDDRenderFinish;
ctx->Driver.ResetLineStipple=_swrast_ResetLineStipple;
ctx->Driver.RenderPrimitive=fxDDRenderPrimitive;
diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h
index cefd6d0e1a9..6861160c1a6 100644
--- a/src/mesa/drivers/glide/fxdrv.h
+++ b/src/mesa/drivers/glide/fxdrv.h
@@ -424,6 +424,7 @@ struct tfxMesaContext {
GLuint render_index;
GLuint passes, multipass;
GLuint is_in_hardware;
+ GLenum render_prim;
/* Current rasterization functions
*/
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 21fe98cb493..77e4ab58c4c 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.9 2001/01/08 04:06:20 keithw Exp $ */
+/* $Id: xm_dd.c,v 1.10 2001/01/16 05:29:43 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -922,9 +922,16 @@ void xmesa_init_pointers( GLcontext *ctx )
ctx->Driver.Flush = flush;
ctx->Driver.Finish = finish;
- ctx->Driver.RenderStart = 0;
- ctx->Driver.RenderPrimitive = _swsetup_RenderPrimNoop;
- ctx->Driver.RenderFinish = _swrast_flush;
+ ctx->Driver.RenderStart = _swsetup_RenderStart;
+ ctx->Driver.BuildProjectedVertices = _swsetup_BuildProjectedVertices;
+ ctx->Driver.RenderPrimitive = _swsetup_RenderPrimitive;
+ ctx->Driver.PointsFunc = _swsetup_Points;
+ ctx->Driver.LineFunc = _swsetup_Line;
+ ctx->Driver.TriangleFunc = _swsetup_Triangle;
+ ctx->Driver.QuadFunc = _swsetup_Quad;
+ ctx->Driver.ResetLineStipple = _swrast_ResetLineStipple;
+ ctx->Driver.RenderFinish = _swsetup_RenderFinish;
+
ctx->Driver.SetDrawBuffer = set_draw_buffer;
ctx->Driver.SetReadBuffer = set_read_buffer;
@@ -936,11 +943,5 @@ void xmesa_init_pointers( GLcontext *ctx )
ctx->Driver.ColorMask = color_mask;
ctx->Driver.Enable = enable;
- ctx->Driver.PointsFunc = _swsetup_Points;
- ctx->Driver.LineFunc = _swsetup_Line;
- ctx->Driver.TriangleFunc = _swsetup_Triangle;
- ctx->Driver.QuadFunc = _swsetup_Quad;
- ctx->Driver.BuildProjectedVertices = _swsetup_BuildProjectedVertices;
- ctx->Driver.ResetLineStipple = _swrast_ResetLineStipple;
(void) DitherValues; /* silenced unused var warning */
}