From acafeeb6dce74382fb3a48b83ab72bf67b7581ea Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 3 Sep 2005 16:57:58 +0000 Subject: Remove last remnants of pre-renderbuffer code. --- src/mesa/swrast/s_buffers.c | 100 -------------------------------------------- 1 file changed, 100 deletions(-) (limited to 'src/mesa/swrast/s_buffers.c') diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c index b21642aa57..0247e1acab 100644 --- a/src/mesa/swrast/s_buffers.c +++ b/src/mesa/swrast/s_buffers.c @@ -234,13 +234,6 @@ clear_color_buffers(GLcontext *ctx) for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers[0]; i++) { struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0][i]; -#if OLD_RENDERBUFFER - /* SetBuffer will go away */ - if (swrast->Driver.SetBuffer) - swrast->Driver.SetBuffer(ctx, ctx->DrawBuffer, - ctx->DrawBuffer->_ColorDrawBit[0][i]); -#endif - if (ctx->Visual.rgbMode) { if (masking) { clear_rgba_buffer_with_masking(ctx, rb); @@ -258,9 +251,6 @@ clear_color_buffers(GLcontext *ctx) } } } - - /* restore default read/draw buffer */ - _swrast_use_draw_buffer(ctx); } @@ -322,93 +312,3 @@ _swrast_Clear(GLcontext *ctx, GLbitfield mask, RENDER_FINISH(swrast,ctx); } - - -/* - * Fallback for ctx->Driver.DrawBuffer() - */ -void -_swrast_DrawBuffer( GLcontext *ctx, GLenum mode ) -{ - (void) mode; - _swrast_use_draw_buffer(ctx); -} - - -/* - * Fallback for ctx->Driver.DrawBuffers() - */ -void -_swrast_DrawBuffers( GLcontext *ctx, GLsizei n, const GLenum *buffers ) -{ - _swrast_use_draw_buffer(ctx); -} - - -/* - * Setup things so that we read/write spans from the user-designated - * read buffer (set via glReadPixels). We usually just have to call - * this for glReadPixels, glCopyPixels, etc. - * - * XXX this will go away when the last OLD_RENDERBUFFER code is removed. - * The swrast->CurrentBufferBit var can be totally removed then too. - */ -void -_swrast_use_read_buffer( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - /* Do this so the software-emulated alpha plane span functions work! */ - swrast->CurrentBufferBit = ctx->ReadBuffer->_ColorReadBufferMask; - /* Tell the device driver where to read/write spans */ - if (swrast->Driver.SetBuffer) - swrast->Driver.SetBuffer(ctx, ctx->ReadBuffer, swrast->CurrentBufferBit); -} - - -/* - * Setup things so that we read/write spans from the default draw buffer. - * This is the usual mode that Mesa's software rasterizer operates in. - * - * XXX this will go away when the last OLD_RENDERBUFFER code is removed. - * The swrast->CurrentBufferBit var can be totally removed then too. - */ -void -_swrast_use_draw_buffer( GLcontext *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - /* The user can specify rendering to zero, one, two, or four color - * buffers simultaneously with glDrawBuffer()! - * We don't expect the span/point/line/triangle functions to deal with - * that mess so we'll iterate over the multiple buffers as needed. - * But usually we only render to one color buffer at a time. - * We set ctx->Color._DriverDrawBuffer to that buffer and tell the - * device driver to use that buffer. - * Look in s_span.c's multi_write_rgba_span() function to see how - * we loop over multiple color buffers when needed. - */ - - if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_FRONT_LEFT) - swrast->CurrentBufferBit = BUFFER_BIT_FRONT_LEFT; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_BACK_LEFT) - swrast->CurrentBufferBit = BUFFER_BIT_BACK_LEFT; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_FRONT_RIGHT) - swrast->CurrentBufferBit = BUFFER_BIT_FRONT_RIGHT; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_BACK_RIGHT) - swrast->CurrentBufferBit = BUFFER_BIT_BACK_RIGHT; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX0) - swrast->CurrentBufferBit = BUFFER_BIT_AUX0; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX1) - swrast->CurrentBufferBit = BUFFER_BIT_AUX1; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX2) - swrast->CurrentBufferBit = BUFFER_BIT_AUX2; - else if (ctx->DrawBuffer->_ColorDrawBufferMask[0] & BUFFER_BIT_AUX3) - swrast->CurrentBufferBit = BUFFER_BIT_AUX3; - else - /* glDrawBuffer(GL_NONE) */ - swrast->CurrentBufferBit = BUFFER_BIT_FRONT_LEFT; /* we always have this buffer */ - - if (swrast->Driver.SetBuffer) - swrast->Driver.SetBuffer(ctx, ctx->DrawBuffer, swrast->CurrentBufferBit); -} -- cgit v1.2.3