summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/svga/svgamesa.c11
-rw-r--r--src/mesa/drivers/svga/svgamesa15.c14
-rw-r--r--src/mesa/drivers/svga/svgamesa15.h4
-rw-r--r--src/mesa/drivers/svga/svgamesa16.c17
-rw-r--r--src/mesa/drivers/svga/svgamesa16.h4
-rw-r--r--src/mesa/drivers/svga/svgamesa24.c13
-rw-r--r--src/mesa/drivers/svga/svgamesa24.h4
-rw-r--r--src/mesa/drivers/svga/svgamesa32.c14
-rw-r--r--src/mesa/drivers/svga/svgamesa32.h4
-rw-r--r--src/mesa/drivers/svga/svgamesa8.c14
-rw-r--r--src/mesa/drivers/svga/svgamesa8.h4
11 files changed, 70 insertions, 33 deletions
diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c
index 51c6bdc2d9f..10ddc0d9950 100644
--- a/src/mesa/drivers/svga/svgamesa.c
+++ b/src/mesa/drivers/svga/svgamesa.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa.c,v 1.12 2001/01/23 23:39:36 brianp Exp $ */
+/* $Id: svgamesa.c,v 1.13 2001/02/06 00:03:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -46,6 +46,7 @@
#include "extensions.h"
#include "matrix.h"
#include "mtypes.h"
+#include "swrast/swrast.h"
#endif
#include "svgapix.h"
@@ -285,6 +286,14 @@ static void svgamesa_update_state( GLcontext *ctx, GLuint new_state )
ctx->Driver.SetDrawBuffer = set_draw_buffer;
ctx->Driver.SetReadBuffer = set_read_buffer;
+ /* Software rasterizer pixel paths:
+ */
+ ctx->Driver.Accum = _swrast_Accum;
+ ctx->Driver.Bitmap = _swrast_Bitmap;
+ ctx->Driver.CopyPixels = _swrast_CopyPixels;
+ ctx->Driver.DrawPixels = _swrast_DrawPixels;
+ ctx->Driver.ReadPixels = _swrast_ReadPixels;
+
ctx->Driver.PointsFunc = NULL;
ctx->Driver.LineFunc = NULL;
ctx->Driver.TriangleFunc = NULL;
diff --git a/src/mesa/drivers/svga/svgamesa15.c b/src/mesa/drivers/svga/svgamesa15.c
index 0f8ebd330ba..89ff6445be2 100644
--- a/src/mesa/drivers/svga/svgamesa15.c
+++ b/src/mesa/drivers/svga/svgamesa15.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa15.c,v 1.8 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa15.c,v 1.9 2001/02/06 00:03:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -35,6 +35,8 @@
#include "svgapix.h"
#include "svgamesa15.h"
+#include "swrast/swrast.h"
+
static void __svga_drawpixel15(int x, int y, unsigned long c)
{
@@ -60,8 +62,8 @@ void __clear_color15( GLcontext *ctx, const GLchan color[4] )
/* SVGAMesa->clear_hicolor=(red)<<10 | (green)<<5 | (blue);*/
}
-GLbitfield __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height )
+void __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all,
+ GLint x, GLint y, GLint width, GLint height )
{
int i, j;
@@ -79,6 +81,7 @@ GLbitfield __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel15(i,j,SVGAMesa->clear_hicolor);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_FRONT_LEFT_BIT;
}
if (mask & DD_BACK_LEFT_BIT) {
GLshort *shortBuffer=(void *)SVGABuffer.BackBuffer;
@@ -94,8 +97,11 @@ GLbitfield __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel15(i,j,SVGAMesa->clear_hicolor);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_BACK_LEFT_BIT;
}
- return mask & (~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
+
+ if (mask)
+ _swrast_Clear( ctx, mask, all, x, y, width, height );
}
void __write_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y,
diff --git a/src/mesa/drivers/svga/svgamesa15.h b/src/mesa/drivers/svga/svgamesa15.h
index f2c16d9f833..62e65636c32 100644
--- a/src/mesa/drivers/svga/svgamesa15.h
+++ b/src/mesa/drivers/svga/svgamesa15.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa15.h,v 1.5 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa15.h,v 1.6 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,7 +32,7 @@
#define SVGA_MESA_15_H
extern void __clear_color15( GLcontext *ctx, const GLchan color[4] );
-extern GLbitfield __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+extern void __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
extern void __write_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
extern void __write_mono_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]);
extern void __read_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
diff --git a/src/mesa/drivers/svga/svgamesa16.c b/src/mesa/drivers/svga/svgamesa16.c
index 20d1ed6fecb..ed36beca244 100644
--- a/src/mesa/drivers/svga/svgamesa16.c
+++ b/src/mesa/drivers/svga/svgamesa16.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa16.c,v 1.8 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa16.c,v 1.9 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -35,6 +35,7 @@
#include "svgapix.h"
#include "svgamesa16.h"
+#include "swrast/swrast.h"
static void __svga_drawpixel16(int x, int y, unsigned long c)
@@ -64,8 +65,8 @@ void __clear_color16( GLcontext *ctx, const GLchan color[4] )
/* SVGAMesa->clear_hicolor=(red)<<11 | (green)<<5 | (blue); */
}
-GLbitfield __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height )
+void __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all,
+ GLint x, GLint y, GLint width, GLint height )
{
int i,j;
@@ -83,7 +84,8 @@ GLbitfield __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel16(i,j,SVGAMesa->clear_hicolor);
SVGABuffer.DrawBuffer = tmp;
}
- }
+ mask &= ~DD_FRONT_LEFT_BIT;
+ }
if (mask & DD_BACK_LEFT_BIT) {
if (all) {
GLshort *shortBuffer=(void *)SVGABuffer.BackBuffer;
@@ -98,8 +100,11 @@ GLbitfield __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel16(i,j,SVGAMesa->clear_hicolor);
SVGABuffer.DrawBuffer = tmp;
}
- }
- return mask & (~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
+ mask &= ~DD_BACK_LEFT_BIT;
+ }
+
+ if (mask)
+ _swrast_Clear( ctx, mask, all, x, y, width, height );
}
void __write_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y,
diff --git a/src/mesa/drivers/svga/svgamesa16.h b/src/mesa/drivers/svga/svgamesa16.h
index f18d559cdb2..8e4886c6fbb 100644
--- a/src/mesa/drivers/svga/svgamesa16.h
+++ b/src/mesa/drivers/svga/svgamesa16.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa16.h,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa16.h,v 1.5 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,7 +32,7 @@
#define SVGA_MESA_16_H
extern void __clear_color16( GLcontext *ctx, const GLchan color[4] );
-extern GLbitfield __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+extern void __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
extern void __write_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
extern void __write_mono_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]);
extern void __read_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
diff --git a/src/mesa/drivers/svga/svgamesa24.c b/src/mesa/drivers/svga/svgamesa24.c
index 0d0c8e74c8f..df1c47be3e8 100644
--- a/src/mesa/drivers/svga/svgamesa24.c
+++ b/src/mesa/drivers/svga/svgamesa24.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa24.c,v 1.9 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa24.c,v 1.10 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -35,6 +35,7 @@
#include "svgapix.h"
#include "svgamesa24.h"
+#include "swrast/swrast.h"
#if 0
@@ -86,8 +87,8 @@ void __clear_color24( GLcontext *ctx, const GLchan color[4] )
/* SVGAMesa->clear_truecolor = red<<16 | green<<8 | blue; */
}
-GLbitfield __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height )
+void __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all,
+ GLint x, GLint y, GLint width, GLint height )
{
int i,j;
@@ -110,6 +111,7 @@ GLbitfield __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all,
SVGAMesa->clear_blue);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_FRONT_LEFT_BIT;
}
if (mask & DD_BACK_LEFT_BIT) {
if (all) {
@@ -130,8 +132,11 @@ GLbitfield __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all,
SVGAMesa->clear_blue);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_BACK_LEFT_BIT;
}
- return mask & (~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
+
+ if (mask)
+ _swrast_Clear( ctx, mask, all, x, y, width, height );
}
void __write_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y,
diff --git a/src/mesa/drivers/svga/svgamesa24.h b/src/mesa/drivers/svga/svgamesa24.h
index 9707e993c33..8c5d9518c9b 100644
--- a/src/mesa/drivers/svga/svgamesa24.h
+++ b/src/mesa/drivers/svga/svgamesa24.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa24.h,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa24.h,v 1.5 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,7 +32,7 @@
#define SVGA_MESA_24_H
extern void __clear_color24( GLcontext *ctx, const GLchan color[4] );
-extern GLbitfield __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+extern void __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
extern void __write_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
extern void __write_mono_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]);
extern void __read_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
diff --git a/src/mesa/drivers/svga/svgamesa32.c b/src/mesa/drivers/svga/svgamesa32.c
index 88907c49c8d..49c1812b3de 100644
--- a/src/mesa/drivers/svga/svgamesa32.c
+++ b/src/mesa/drivers/svga/svgamesa32.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa32.c,v 1.9 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa32.c,v 1.10 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -35,6 +35,8 @@
#include "svgapix.h"
#include "svgamesa32.h"
+#include "swrast/swrast.h"
+
#if 0
/* this doesn't compile with GCC on RedHat 6.1 */
@@ -79,8 +81,8 @@ void __clear_color32( GLcontext *ctx, const GLchan color[4] )
SVGAMesa->clear_truecolor = (color[0] << 16) | (color[1] << 8) | color[2];
}
-GLbitfield __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height )
+void __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all,
+ GLint x, GLint y, GLint width, GLint height )
{
int i,j;
@@ -98,6 +100,7 @@ GLbitfield __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel32(i,j,SVGAMesa->clear_truecolor);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_FRONT_LEFT_BIT;
}
if (mask & DD_BACK_LEFT_BIT) {
if (all) {
@@ -113,8 +116,11 @@ GLbitfield __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel32(i,j,SVGAMesa->clear_truecolor);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_BACK_LEFT_BIT;
}
- return mask & (~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
+
+ if (mask)
+ _swrast_Clear( ctx, mask, all, x, y, width, height );
}
void __write_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y,
diff --git a/src/mesa/drivers/svga/svgamesa32.h b/src/mesa/drivers/svga/svgamesa32.h
index d24b95a6cd9..51c1c664bfb 100644
--- a/src/mesa/drivers/svga/svgamesa32.h
+++ b/src/mesa/drivers/svga/svgamesa32.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa32.h,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: svgamesa32.h,v 1.5 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,7 +32,7 @@
#define SVGA_MESA_32_H
extern void __clear_color32( GLcontext *ctx, const GLchan color[4] );
-extern GLbitfield __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+extern void __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
extern void __write_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] );
extern void __write_mono_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]);
extern void __read_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLubyte rgba[][4] );
diff --git a/src/mesa/drivers/svga/svgamesa8.c b/src/mesa/drivers/svga/svgamesa8.c
index a829063520c..29fd4070b37 100644
--- a/src/mesa/drivers/svga/svgamesa8.c
+++ b/src/mesa/drivers/svga/svgamesa8.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa8.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */
+/* $Id: svgamesa8.c,v 1.8 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -36,6 +36,8 @@
#include "svgapix.h"
#include "svgamesa8.h"
+#include "swrast/swrast.h"
+
static void __svga_drawpixel8(int x, int y, unsigned long c)
{
@@ -58,8 +60,8 @@ void __clear_index8( GLcontext *ctx, GLuint index )
SVGAMesa->clear_index = index;
}
-GLbitfield __clear8( GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height )
+void __clear8( GLcontext *ctx, GLbitfield mask, GLboolean all,
+ GLint x, GLint y, GLint width, GLint height )
{
int i,j;
@@ -75,6 +77,7 @@ GLbitfield __clear8( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel8(i,j,SVGAMesa->clear_index);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_FRONT_LEFT_BIT;
}
if (mask & DD_BACK_LEFT_BIT) {
if (all) {
@@ -88,8 +91,11 @@ GLbitfield __clear8( GLcontext *ctx, GLbitfield mask, GLboolean all,
__svga_drawpixel8(i,j,SVGAMesa->clear_index);
SVGABuffer.DrawBuffer = tmp;
}
+ mask &= ~DD_BACK_LEFT_BIT;
}
- return mask & (~(DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT));
+
+ if (mask)
+ _swrast_Clear( ctx, mask, all, x, y, width, height );
}
void __write_ci32_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y,
diff --git a/src/mesa/drivers/svga/svgamesa8.h b/src/mesa/drivers/svga/svgamesa8.h
index c77e10244d9..1aa25f93fce 100644
--- a/src/mesa/drivers/svga/svgamesa8.h
+++ b/src/mesa/drivers/svga/svgamesa8.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa8.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */
+/* $Id: svgamesa8.h,v 1.4 2001/02/06 00:03:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,7 +32,7 @@
#define SVGA_MESA_8_H
extern void __clear_index8( GLcontext *ctx, GLuint index );
-extern GLbitfield __clear8( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
+extern void __clear8( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height );
extern void __write_ci32_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLuint index[], const GLubyte mask[] );
extern void __write_ci8_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte index[], const GLubyte mask[] );
extern void __write_mono_ci_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint colorIndex, const GLubyte mask[] );