summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-11-14 17:40:13 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-11-14 17:40:13 +0000
commitc19d783e0715ac01ad4d3fd0705500d2bf6f7039 (patch)
tree68e28470e87358b225e07477a4900d79f8e47b0b /src/mesa/drivers/svga
parent1e1aac034c986a08248861363c0baa27dc2ae2d5 (diff)
Removed Driver.Color() and Driver.Index() functions.
Pass color or color index directly to WriteMono*() span functions. Updated current s/w drivers accordingly. Clean-up of X gc handling in XMesa driver.
Diffstat (limited to 'src/mesa/drivers/svga')
-rw-r--r--src/mesa/drivers/svga/svgamesa.c10
-rw-r--r--src/mesa/drivers/svga/svgamesa15.c24
-rw-r--r--src/mesa/drivers/svga/svgamesa15.h7
-rw-r--r--src/mesa/drivers/svga/svgamesa16.c21
-rw-r--r--src/mesa/drivers/svga/svgamesa16.h7
-rw-r--r--src/mesa/drivers/svga/svgamesa24.c26
-rw-r--r--src/mesa/drivers/svga/svgamesa24.h7
-rw-r--r--src/mesa/drivers/svga/svgamesa32.c23
-rw-r--r--src/mesa/drivers/svga/svgamesa32.h7
-rw-r--r--src/mesa/drivers/svga/svgamesa8.c16
-rw-r--r--src/mesa/drivers/svga/svgamesa8.h7
11 files changed, 53 insertions, 102 deletions
diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c
index 0d7fa158db..daa660e434 100644
--- a/src/mesa/drivers/svga/svgamesa.c
+++ b/src/mesa/drivers/svga/svgamesa.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa.c,v 1.6 2000/09/26 20:54:12 brianp Exp $ */
+/* $Id: svgamesa.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -291,7 +291,6 @@ static void svgamesa_update_state( GLcontext *ctx )
switch (SVGABuffer.Depth) {
case 8: ctx->Driver.ClearIndex = __clear_index8;
ctx->Driver.Clear = __clear8;
- ctx->Driver.Index = __set_index8;
ctx->Driver.ReadCI32Span = __read_ci32_span8;
ctx->Driver.ReadCI32Pixels = __read_ci32_pixels8;
@@ -307,7 +306,6 @@ static void svgamesa_update_state( GLcontext *ctx )
break;
case 15: ctx->Driver.ClearColor = __clear_color15;
ctx->Driver.Clear = __clear15;
- ctx->Driver.Color = __set_color15;
ctx->Driver.ReadRGBASpan = __read_rgba_span15;
ctx->Driver.ReadRGBAPixels = __read_rgba_pixels15;
@@ -321,7 +319,6 @@ static void svgamesa_update_state( GLcontext *ctx )
break;
case 16: ctx->Driver.ClearColor = __clear_color16;
ctx->Driver.Clear = __clear16;
- ctx->Driver.Color = __set_color16;
ctx->Driver.ReadRGBASpan = __read_rgba_span16;
ctx->Driver.ReadRGBAPixels = __read_rgba_pixels16;
@@ -335,7 +332,6 @@ static void svgamesa_update_state( GLcontext *ctx )
#endif
case 24: ctx->Driver.ClearColor = __clear_color24;
ctx->Driver.Clear = __clear24;
- ctx->Driver.Color = __set_color24;
ctx->Driver.ReadRGBASpan = __read_rgba_span24;
ctx->Driver.ReadRGBAPixels = __read_rgba_pixels24;
@@ -349,7 +345,6 @@ static void svgamesa_update_state( GLcontext *ctx )
#endif
case 32: ctx->Driver.ClearColor = __clear_color32;
ctx->Driver.Clear = __clear32;
- ctx->Driver.Color = __set_color32;
ctx->Driver.ReadRGBASpan = __read_rgba_span32;
ctx->Driver.ReadRGBAPixels = __read_rgba_pixels32;
@@ -429,9 +424,6 @@ SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer )
ctx->gl_vis->AccumRedBits > 0,
ctx->gl_vis->AlphaBits > 0 );
- ctx->index = 1;
- ctx->red = ctx->green = ctx->blue = 255;
-
ctx->width = ctx->height = 0; /* temporary until first "make-current" */
#endif
return ctx;
diff --git a/src/mesa/drivers/svga/svgamesa15.c b/src/mesa/drivers/svga/svgamesa15.c
index 28cd7a4264..3332503d2b 100644
--- a/src/mesa/drivers/svga/svgamesa15.c
+++ b/src/mesa/drivers/svga/svgamesa15.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa15.c,v 1.6 2000/06/14 21:59:07 brianp Exp $ */
+/* $Id: svgamesa15.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -54,14 +54,6 @@ static unsigned long __svga_getpixel15(int x, int y)
return shortBuffer[offset];
}
-void __set_color15( GLcontext *ctx,
- GLubyte red, GLubyte green,
- GLubyte blue, GLubyte alpha )
-{
- SVGAMesa->hicolor=(red>>3)<<10 | (green>>3)<<5 | (blue>>3);
-/* SVGAMesa->hicolor=(red)<<10 | (green)<<5 | (blue); */
-}
-
void __clear_color15( GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha )
@@ -134,12 +126,15 @@ void __write_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y,
void __write_mono_rgba_span15( const GLcontext *ctx,
GLuint n, GLint x, GLint y,
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
+ GLushort hicolor = (color[RCOMP] >> 3) << 10 |
+ (color[GCOMP] >> 3) << 5 |
+ (color[BCOMP] >> 3);
int i;
for (i=0; i<n; i++, x++) {
if (mask[i]) {
- __svga_drawpixel15( x, y, SVGAMesa->hicolor);
+ __svga_drawpixel15( x, y, hicolor);
}
}
}
@@ -174,13 +169,16 @@ void __write_rgba_pixels15( const GLcontext *ctx,
void __write_mono_rgba_pixels15( const GLcontext *ctx,
GLuint n,
const GLint x[], const GLint y[],
- const GLubyte mask[] )
+ const GLchan color[4], const GLubyte mask[] )
{
+ GLushort hicolor = (color[RCOMP] >> 3) << 10 |
+ (color[GCOMP] >> 3) << 5 |
+ (color[BCOMP] >> 3);
int i;
/* use current rgb color */
for (i=0; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel15( x[i], y[i], SVGAMesa->hicolor );
+ __svga_drawpixel15( x[i], y[i], hicolor );
}
}
}
diff --git a/src/mesa/drivers/svga/svgamesa15.h b/src/mesa/drivers/svga/svgamesa15.h
index ad04489f8e..83591a610f 100644
--- a/src/mesa/drivers/svga/svgamesa15.h
+++ b/src/mesa/drivers/svga/svgamesa15.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa15.h,v 1.3 2000/01/25 00:03:02 brianp Exp $ */
+/* $Id: svgamesa15.h,v 1.4 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,14 +31,13 @@
#ifndef SVGA_MESA_15_H
#define SVGA_MESA_15_H
-extern void __set_color15( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern void __clear_color15( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern GLbitfield __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 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] );
extern void __write_rgba_pixels15( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
-extern void __write_mono_rgba_pixels15( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+extern void __write_mono_rgba_pixels15( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLchan color[4], const GLubyte mask[] );
extern void __read_rgba_pixels15( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
#endif /* SVGA_MESA_15_H */
diff --git a/src/mesa/drivers/svga/svgamesa16.c b/src/mesa/drivers/svga/svgamesa16.c
index 817d4bb606..02d1251665 100644
--- a/src/mesa/drivers/svga/svgamesa16.c
+++ b/src/mesa/drivers/svga/svgamesa16.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa16.c,v 1.6 2000/06/14 21:59:07 brianp Exp $ */
+/* $Id: svgamesa16.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -56,14 +56,6 @@ static unsigned long __svga_getpixel16(int x, int y)
return shortBuffer[offset];
}
-void __set_color16( GLcontext *ctx,
- GLubyte red, GLubyte green,
- GLubyte blue, GLubyte alpha )
-{
- SVGAMesa->hicolor=(red>>3)<<11 | (green>>2)<<5 | (blue>>3);
-/* SVGAMesa->hicolor=(red)<<11 | (green)<<5 | (blue); */
-}
-
void __clear_color16( GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha )
@@ -136,12 +128,13 @@ void __write_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y,
void __write_mono_rgba_span16( const GLcontext *ctx,
GLuint n, GLint x, GLint y,
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
+ GLushort hicolor=(color[RCOMP]>>3)<<11 | (color[GCOMP]>>2)<<5 | (color[BCOMP]>>3);
int i;
for (i=0; i<n; i++, x++) {
if (mask[i]) {
- __svga_drawpixel16( x, y, SVGAMesa->hicolor);
+ __svga_drawpixel16( x, y, hicolor);
}
}
}
@@ -176,13 +169,13 @@ void __write_rgba_pixels16( const GLcontext *ctx,
void __write_mono_rgba_pixels16( const GLcontext *ctx,
GLuint n,
const GLint x[], const GLint y[],
- const GLubyte mask[] )
+ const GLchan color[4], const GLubyte mask[] )
{
+ GLushort hicolor=(color[RCOMP]>>3)<<11 | (color[GCOMP]>>2)<<5 | (color[BCOMP]>>3);
int i;
- /* use current rgb color */
for (i=0; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel16( x[i], y[i], SVGAMesa->hicolor );
+ __svga_drawpixel16( x[i], y[i], hicolor );
}
}
}
diff --git a/src/mesa/drivers/svga/svgamesa16.h b/src/mesa/drivers/svga/svgamesa16.h
index 114defdd7c..94ddcf3a19 100644
--- a/src/mesa/drivers/svga/svgamesa16.h
+++ b/src/mesa/drivers/svga/svgamesa16.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa16.h,v 1.2 2000/01/22 20:08:36 brianp Exp $ */
+/* $Id: svgamesa16.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,14 +31,13 @@
#ifndef SVGA_MESA_16_H
#define SVGA_MESA_16_H
-extern void __set_color16( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern void __clear_color16( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern GLbitfield __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 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] );
extern void __write_rgba_pixels16( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
-extern void __write_mono_rgba_pixels16( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+extern void __write_mono_rgba_pixels16( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLchan color[4], const GLubyte mask[] );
extern void __read_rgba_pixels16( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
#endif /* SVGA_MESA_16_H */
diff --git a/src/mesa/drivers/svga/svgamesa24.c b/src/mesa/drivers/svga/svgamesa24.c
index 6f7cc9c221..aa174df4cc 100644
--- a/src/mesa/drivers/svga/svgamesa24.c
+++ b/src/mesa/drivers/svga/svgamesa24.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa24.c,v 1.7 2000/06/14 21:59:07 brianp Exp $ */
+/* $Id: svgamesa24.c,v 1.8 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -78,16 +78,6 @@ static unsigned long __svga_getpixel24(int x, int y)
return rgbBuffer[offset].r<<16 | rgbBuffer[offset].g<<8 | rgbBuffer[offset].b;
}
-void __set_color24( GLcontext *ctx,
- GLubyte red, GLubyte green,
- GLubyte blue, GLubyte alpha )
-{
- SVGAMesa->red = red;
- SVGAMesa->green = green;
- SVGAMesa->blue = blue;
-/* SVGAMesa->truecolor = red<<16 | green<<8 | blue; */
-}
-
void __clear_color24( GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha )
@@ -172,14 +162,12 @@ void __write_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y,
void __write_mono_rgba_span24( const GLcontext *ctx,
GLuint n, GLint x, GLint y,
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
int i;
for (i=0; i<n; i++, x++) {
if (mask[i]) {
- __svga_drawpixel24( x, y, SVGAMesa->red,
- SVGAMesa->green,
- SVGAMesa->blue);
+ __svga_drawpixel24( x, y, color[RCOMP], color[GCOMP], color[BCOMP]);
}
}
}
@@ -210,15 +198,13 @@ void __write_rgba_pixels24( const GLcontext *ctx,
void __write_mono_rgba_pixels24( const GLcontext *ctx,
GLuint n,
const GLint x[], const GLint y[],
- const GLubyte mask[] )
+ const GLchan color[4], const GLubyte mask[] )
{
int i;
- /* use current rgb color */
for (i=0; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel24( x[i], y[i], SVGAMesa->red,
- SVGAMesa->green,
- SVGAMesa->blue);
+ __svga_drawpixel24( x[i], y[i],
+ color[RCOMP], color[GCOMP], color[BCOMP] );
}
}
}
diff --git a/src/mesa/drivers/svga/svgamesa24.h b/src/mesa/drivers/svga/svgamesa24.h
index 9ec4e2dbac..dc9382034b 100644
--- a/src/mesa/drivers/svga/svgamesa24.h
+++ b/src/mesa/drivers/svga/svgamesa24.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa24.h,v 1.2 2000/01/22 20:08:36 brianp Exp $ */
+/* $Id: svgamesa24.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,14 +31,13 @@
#ifndef SVGA_MESA_24_H
#define SVGA_MESA_24_H
-extern void __set_color24( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern void __clear_color24( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern GLbitfield __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 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] );
extern void __write_rgba_pixels24( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
-extern void __write_mono_rgba_pixels24( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+extern void __write_mono_rgba_pixels24( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLchan color[4], const GLubyte mask[] );
extern void __read_rgba_pixels24( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
#endif /* SVGA_MESA_24_H */
diff --git a/src/mesa/drivers/svga/svgamesa32.c b/src/mesa/drivers/svga/svgamesa32.c
index 1fbef3d26d..a56afdc86c 100644
--- a/src/mesa/drivers/svga/svgamesa32.c
+++ b/src/mesa/drivers/svga/svgamesa32.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa32.c,v 1.7 2000/06/14 21:59:07 brianp Exp $ */
+/* $Id: svgamesa32.c,v 1.8 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -74,16 +74,6 @@ static unsigned long __svga_getpixel32(int x, int y)
return intBuffer[offset];
}
-void __set_color32( GLcontext *ctx,
- GLubyte red, GLubyte green,
- GLubyte blue, GLubyte alpha )
-{
- SVGAMesa->red = red;
- SVGAMesa->green = green;
- SVGAMesa->blue = blue;
- SVGAMesa->truecolor = red<<16 | green<<8 | blue;
-}
-
void __clear_color32( GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha )
@@ -151,12 +141,13 @@ void __write_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y,
void __write_mono_rgba_span32( const GLcontext *ctx,
GLuint n, GLint x, GLint y,
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
int i;
+ GLuint truecolor = color[RCOMP]<<16 | color[GCOMP]<<8 | color[BCOMP];
for (i=0; i<n; i++, x++) {
if (mask[i]) {
- __svga_drawpixel32( x, y, SVGAMesa->truecolor);
+ __svga_drawpixel32( x, y, truecolor);
}
}
}
@@ -185,13 +176,13 @@ void __write_rgba_pixels32( const GLcontext *ctx,
void __write_mono_rgba_pixels32( const GLcontext *ctx,
GLuint n,
const GLint x[], const GLint y[],
- const GLubyte mask[] )
+ const GLchan color[4], const GLubyte mask[] )
{
+ GLuint truecolor = color[RCOMP]<<16 | color[GCOMP]<<8 | color[BCOMP];
int i;
- /* use current rgb color */
for (i=0; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel32( x[i], y[i], SVGAMesa->truecolor );
+ __svga_drawpixel32( x[i], y[i], truecolor );
}
}
}
diff --git a/src/mesa/drivers/svga/svgamesa32.h b/src/mesa/drivers/svga/svgamesa32.h
index 5029ea06a6..3640624972 100644
--- a/src/mesa/drivers/svga/svgamesa32.h
+++ b/src/mesa/drivers/svga/svgamesa32.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa32.h,v 1.2 2000/01/22 20:08:36 brianp Exp $ */
+/* $Id: svgamesa32.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,14 +31,13 @@
#ifndef SVGA_MESA_32_H
#define SVGA_MESA_32_H
-extern void __set_color32( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern void __clear_color32( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
extern GLbitfield __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 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] );
extern void __write_rgba_pixels32( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte rgba[][4], const GLubyte mask[] );
-extern void __write_mono_rgba_pixels32( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+extern void __write_mono_rgba_pixels32( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLchan color[4], const GLubyte mask[] );
extern void __read_rgba_pixels32( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLubyte rgba[][4], const GLubyte mask[] );
#endif /* SVGA_MESA_32_H */
diff --git a/src/mesa/drivers/svga/svgamesa8.c b/src/mesa/drivers/svga/svgamesa8.c
index 2578428178..a829063520 100644
--- a/src/mesa/drivers/svga/svgamesa8.c
+++ b/src/mesa/drivers/svga/svgamesa8.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa8.c,v 1.6 2000/06/14 21:59:07 brianp Exp $ */
+/* $Id: svgamesa8.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -53,11 +53,6 @@ static unsigned long __svga_getpixel8(int x, int y)
return SVGABuffer.ReadBuffer[offset];
}
-void __set_index8( GLcontext *ctx, GLuint index )
-{
- SVGAMesa->index = index;
-}
-
void __clear_index8( GLcontext *ctx, GLuint index )
{
SVGAMesa->clear_index = index;
@@ -121,12 +116,13 @@ void __write_ci8_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y,
}
void __write_mono_ci_span8( const GLcontext *ctx, GLuint n,
- GLint x, GLint y, const GLubyte mask[] )
+ GLint x, GLint y,
+ GLuint colorIndex, const GLubyte mask[] )
{
int i;
for (i=0;i<n;i++,x++) {
if (mask[i]) {
- __svga_drawpixel8( x, y, SVGAMesa->index);
+ __svga_drawpixel8( x, y, colorIndex);
}
}
}
@@ -155,12 +151,12 @@ void __write_ci32_pixels8( const GLcontext *ctx,
void __write_mono_ci_pixels8( const GLcontext *ctx, GLuint n,
const GLint x[], const GLint y[],
- const GLubyte mask[] )
+ GLuint colorIndex, const GLubyte mask[] )
{
int i;
for (i=0; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel8( x[i], y[i], SVGAMesa->index);
+ __svga_drawpixel8( x[i], y[i], colorIndex);
}
}
}
diff --git a/src/mesa/drivers/svga/svgamesa8.h b/src/mesa/drivers/svga/svgamesa8.h
index a8a175b2e9..c77e10244d 100644
--- a/src/mesa/drivers/svga/svgamesa8.h
+++ b/src/mesa/drivers/svga/svgamesa8.h
@@ -1,4 +1,4 @@
-/* $Id: svgamesa8.h,v 1.2 2000/01/22 20:08:36 brianp Exp $ */
+/* $Id: svgamesa8.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,15 +31,14 @@
#ifndef SVGA_MESA_8_H
#define SVGA_MESA_8_H
-extern void __set_index8( GLcontext *ctx, GLuint index );
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 __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, const GLubyte mask[] );
+extern void __write_mono_ci_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint colorIndex, const GLubyte mask[] );
extern void __read_ci32_span8( const GLcontext *ctx, GLuint n, GLint x, GLint y, GLuint index[]);
extern void __write_ci32_pixels8( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLuint index[], const GLubyte mask[] );
-extern void __write_mono_ci_pixels8( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], const GLubyte mask[] );
+extern void __write_mono_ci_pixels8( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint colorIndex, const GLubyte mask[] );
extern void __read_ci32_pixels8( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], GLuint index[], const GLubyte mask[] );
#endif /* SVGA_MESA_15_H */