diff options
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_pixels.c')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_pixels.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c index 803c8c5c1c..aaee401d7a 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; |