diff options
author | Brian Paul <[email protected]> | 2005-09-03 16:43:02 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-03 16:43:02 +0000 |
commit | 687918b794d12a0ff5d395b8cf87880dbe8012bf (patch) | |
tree | 280d1b882dc3bfd0e105d14a1f9d90c7cef935dd /src/mesa/drivers/dri/tdfx | |
parent | e6925b51e1e71dc45079636ce336a09806356999 (diff) |
SetBuffer, renderbuffer changes
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_span.c | 27 | ||||
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_state.c | 5 |
2 files changed, 4 insertions, 28 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c index b00b7ad8dba..142beb404fc 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_span.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c @@ -49,9 +49,10 @@ #define LOCAL_VARS \ __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \ tdfxScreenPrivate *fxPriv = fxMesa->fxScreen; \ - GLuint pitch = (fxMesa->glCtx->Color.DrawBuffer[0] == GL_FRONT) \ - ? (fxMesa->screen_width * BYTESPERPIXEL) : \ - (info.strideInBytes); \ + GLboolean isFront = (ctx->DrawBuffer->_ColorDrawBufferMask[0] \ + == BUFFER_BIT_FRONT_LEFT); \ + GLuint pitch = isFront ? (fxMesa->screen_width * BYTESPERPIXEL) \ + : info.strideInBytes; \ GLuint height = fxMesa->height; \ char *buf = (char *)((char *)info.lfbPtr + \ dPriv->x * fxPriv->cpp + \ @@ -1334,25 +1335,6 @@ static void tdfxSpanRenderFinish( GLcontext *ctx ) UNLOCK_HARDWARE(fxMesa); } -/* Set the buffer used for reading */ -static void tdfxDDSetBuffer( GLcontext *ctx, - GLframebuffer *buffer, GLuint bufferBit ) -{ - tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx); - (void) buffer; - - switch ( bufferBit ) { - case BUFFER_BIT_FRONT_LEFT: - fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_FRONTBUFFER; - break; - case BUFFER_BIT_BACK_LEFT: - fxMesa->DrawBuffer = fxMesa->ReadBuffer = GR_BUFFER_BACKBUFFER; - break; - default: - break; - } -} - /**********************************************************************/ /* Initialize swrast device driver */ /**********************************************************************/ @@ -1360,7 +1342,6 @@ static void tdfxDDSetBuffer( GLcontext *ctx, void tdfxDDInitSpanFuncs( GLcontext *ctx ) { struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx ); - swdd->SetBuffer = tdfxDDSetBuffer; swdd->SpanRenderStart = tdfxSpanRenderStart; swdd->SpanRenderFinish = tdfxSpanRenderFinish; } diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c index 85d99bb05e7..73dad6e086a 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_state.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c @@ -1055,11 +1055,6 @@ static void tdfxDDDrawBuffer( GLcontext *ctx, GLenum mode ) FALLBACK( fxMesa, TDFX_FALLBACK_DRAW_BUFFER, GL_TRUE ); break; } - - /* We want to update the s/w rast state too so that tdfxDDSetBuffer() - * gets called. - */ - _swrast_DrawBuffer(ctx, mode); } |