aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-10-02 16:39:09 +0000
committerBrian Paul <[email protected]>2004-10-02 16:39:09 +0000
commit53f82c5aadbb15585754bfacf3237093eccdb2ce (patch)
tree93c013f62d99caf8581c774f768cb7f365350095 /src/mesa/drivers/dri/tdfx
parent289ffee2a017308a9a97689662293613dc62d9e9 (diff)
added support for GL_ARB_draw_buffers
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_pixels.c12
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_render.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.c2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_state.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
index 803c8c5c1cc..aaee401d7ab 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
@@ -255,7 +255,7 @@ tdfx_bitmap_R5G6B5(GLcontext * ctx, GLint px, GLint py,
* to the front or back buffer. This compile-time test seems to do
* the job for now.
*/
- const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT)
+ const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT)
? (fxMesa->screen_width) : (info.strideInBytes / 2);
GLint row;
/* compute dest address of bottom-left pixel in bitmap */
@@ -407,7 +407,7 @@ tdfx_bitmap_R8G8B8A8(GLcontext * ctx, GLint px, GLint py,
GLuint *dst;
GLint row;
- if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) {
+ if (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) {
dstStride = fxMesa->screen_width;
dst =
(GLuint *) info.lfbPtr + (winY - py) * dstStride + (winX +
@@ -508,7 +508,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y,
fxMesa->ReadBuffer,
GR_LFBWRITEMODE_ANY,
GR_ORIGIN_UPPER_LEFT, FXFALSE, &info)) {
- const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer ==
+ const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer[0] ==
GL_FRONT) ? (fxMesa->screen_width) : (info.strideInBytes / 2);
const GLushort *src = (const GLushort *) info.lfbPtr
+ scrY * srcStride + scrX;
@@ -567,7 +567,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
GR_LFBWRITEMODE_ANY,
GR_ORIGIN_UPPER_LEFT, FXFALSE, &info))
{
- const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT)
+ const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT)
? (fxMesa->screen_width) : (info.strideInBytes / 4);
const GLuint *src = (const GLuint *) info.lfbPtr
+ scrY * srcStride + scrX;
@@ -646,7 +646,7 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
}
/* look for clipmasks, giveup if region obscured */
- if (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) {
+ if (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) {
if (!inClipRects_Region(fxMesa, scrX, scrY, width, height)) {
UNLOCK_HARDWARE(fxMesa);
_swrast_DrawPixels( ctx, x, y, width, height, format, type,
@@ -661,7 +661,7 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
GR_LFBWRITEMODE_8888,
GR_ORIGIN_UPPER_LEFT, FXTRUE, &info))
{
- const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT)
+ const GLint dstStride = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT)
? (fxMesa->screen_width * 4) : (info.strideInBytes);
GLubyte *dst = (GLubyte *) info.lfbPtr
+ scrY * dstStride + scrX * 4;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c
index 1c552894699..3ce91b9257b 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_render.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c
@@ -278,7 +278,7 @@ static void tdfxClear( GLcontext *ctx,
fxMesa->Color.ClearAlpha,
fxMesa->Depth.Clear);
FX_grColorMaskv_NoLock(ctx, true4);
- if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT)
+ if (ctx->Color._DrawDestMask[0] & DD_FRONT_LEFT_BIT)
fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER);
if (!ctx->Depth.Test || !ctx->Depth.Mask)
fxMesa->Glide.grDepthMask(FXFALSE);
@@ -298,7 +298,7 @@ static void tdfxClear( GLcontext *ctx,
fxMesa->Glide.grDepthMask(FXTRUE);
}
FX_grColorMaskv_NoLock(ctx, true4);
- if (ctx->Color._DrawDestMask & DD_FRONT_LEFT_BIT)
+ if (ctx->Color._DrawDestMask[0] & DD_FRONT_LEFT_BIT)
fxMesa->Glide.grRenderBuffer(GR_BUFFER_FRONTBUFFER);
}
}
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c
index 0d2bc811e04..1bcec634131 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_span.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c
@@ -49,7 +49,7 @@
#define LOCAL_VARS \
__DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \
tdfxScreenPrivate *fxPriv = fxMesa->fxScreen; \
- GLuint pitch = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT) \
+ GLuint pitch = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) \
? (fxMesa->screen_width * BYTESPERPIXEL) : \
(info.strideInBytes); \
GLuint height = fxMesa->height; \
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c
index 7f1ce3c004d..818a9bc23f4 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_state.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c
@@ -1033,7 +1033,7 @@ static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode )
/*
* _DrawDestMask is easier to cope with than <mode>.
*/
- switch ( ctx->Color._DrawDestMask ) {
+ switch ( ctx->Color._DrawDestMask[0] ) {
case DD_FRONT_LEFT_BIT:
fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER;
fxMesa->new_state |= TDFX_NEW_RENDER;