summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-03 16:57:58 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-03 16:57:58 +0000
commitacafeeb6dce74382fb3a48b83ab72bf67b7581ea (patch)
tree63bae8571a6008628384d37514932bfd17c2f8d4
parent54be0763e1c24091ba522139e899d0254143ba7d (diff)
Remove last remnants of pre-renderbuffer code.
-rw-r--r--src/mesa/drivers/common/driverfuncs.c4
-rw-r--r--src/mesa/main/config.h4
-rw-r--r--src/mesa/main/framebuffer.c2
-rw-r--r--src/mesa/main/mtypes.h5
-rw-r--r--src/mesa/main/renderbuffer.c2
-rw-r--r--src/mesa/swrast/s_accum.c10
-rw-r--r--src/mesa/swrast/s_buffers.c100
-rw-r--r--src/mesa/swrast/s_context.h4
-rw-r--r--src/mesa/swrast/s_copypix.c52
-rw-r--r--src/mesa/swrast/s_imaging.c28
-rw-r--r--src/mesa/swrast/s_readpix.c14
-rw-r--r--src/mesa/swrast/s_span.c22
-rw-r--r--src/mesa/swrast/s_texstore.c10
-rw-r--r--src/mesa/swrast/swrast.h30
14 files changed, 15 insertions, 272 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index f2e36b7845..93d195dc22 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -138,8 +138,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->ColorMask = NULL;
driver->ColorMaterial = NULL;
driver->CullFace = NULL;
- driver->DrawBuffer = _swrast_DrawBuffer;
- driver->DrawBuffers = NULL; /***_swrast_DrawBuffers;***/
+ driver->DrawBuffer = NULL;
+ driver->DrawBuffers = NULL;
driver->FrontFace = NULL;
driver->DepthFunc = NULL;
driver->DepthMask = NULL;
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index de2bae9cb0..6fddbd116e 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -317,8 +317,4 @@
#define MAX_CLIPPED_VERTICES ((2 * (6 + MAX_CLIP_PLANES))+1)
-/* XXX everything marked with OLD_RENDERBUFFER will be going away... */
-#define OLD_RENDERBUFFER 1
-
-
#endif /* CONFIG_H */
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 271790c1ca..0c620f7908 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -462,7 +462,6 @@ get_renderbuffer(struct gl_framebuffer *fb, GLuint bufferBit)
* Update state related to the current draw/read framebuffers.
* Specifically, update these framebuffer fields:
* _ColorDrawBuffers
- * _ColorDrawBit
* _NumColorDrawBuffers
* _ColorReadBuffer
* If the current framebuffer is user-created, make sure it's complete.
@@ -495,7 +494,6 @@ _mesa_update_framebuffer(GLcontext *ctx)
struct gl_renderbuffer *rb = get_renderbuffer(fb, bufferBit);
if (rb) {
fb->_ColorDrawBuffers[output][count] = rb;
- fb->_ColorDrawBit[output][count] = bufferBit;
count++;
}
else {
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c02b64dd05..0206af937d 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2211,11 +2211,6 @@ struct gl_framebuffer
struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS][4];
struct gl_renderbuffer *_ColorReadBuffer;
-#if OLD_RENDERBUFFER
- /* XXX THIS IS TEMPORARY */
- GLuint _ColorDrawBit[MAX_DRAW_BUFFERS][4];
-#endif
-
/** Delete this framebuffer */
void (*Delete)(struct gl_framebuffer *fb);
};
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 7d21a8e358..480906533f 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1845,8 +1845,10 @@ _mesa_add_renderbuffer(struct gl_framebuffer *fb,
{
assert(fb);
assert(rb);
+#if 00
/* there should be no previous renderbuffer on this attachment point! */
assert(fb->Attachment[bufferName].Renderbuffer == NULL);
+#endif
assert(bufferName < BUFFER_COUNT);
/* winsys vs. user-created buffer cross check */
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 5621d0c8aa..e9946c55df 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -286,8 +286,6 @@ accum_accum(GLcontext *ctx, GLfloat value,
if (swrast->_IntegerAccumMode && value != swrast->_IntegerAccumScaler)
rescale_accum(ctx);
- _swrast_use_read_buffer(ctx);
-
if (rb->DataType == GL_SHORT || rb->DataType == GL_UNSIGNED_SHORT) {
const GLfloat scale = value * ACCUM_SCALE16 / CHAN_MAXF;
GLshort accumRow[4 * MAX_WIDTH];
@@ -338,8 +336,6 @@ accum_accum(GLcontext *ctx, GLfloat value,
else {
/* other types someday */
}
-
- _swrast_use_draw_buffer(ctx);
}
@@ -374,8 +370,6 @@ accum_load(GLcontext *ctx, GLfloat value,
swrast->_IntegerAccumScaler = 0.0;
}
- _swrast_use_read_buffer(ctx);
-
if (rb->DataType == GL_SHORT || rb->DataType == GL_UNSIGNED_SHORT) {
const GLfloat scale = value * ACCUM_SCALE16 / CHAN_MAXF;
GLshort accumRow[4 * MAX_WIDTH];
@@ -428,8 +422,6 @@ accum_load(GLcontext *ctx, GLfloat value,
else {
/* other types someday */
}
-
- _swrast_use_draw_buffer(ctx);
}
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);
-}
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 5f5efdc22a..4f0e225b59 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.5
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 7bae7ed99e..cc7c0b2283 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -133,7 +133,6 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
struct gl_renderbuffer *drawRb = NULL;
GLboolean quick_draw;
GLint row;
- GLboolean changeBuffer;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
const GLuint transferOps = ctx->_ImageTransferState;
GLfloat *dest, *tmpImage, *convImage;
@@ -158,11 +157,6 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
quick_draw = GL_FALSE;
}
- /* If read and draw buffer are different we must do buffer switching */
- changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer[0]
- || ctx->DrawBuffer != ctx->ReadBuffer;
-
-
/* allocate space for GLfloat image */
tmpImage = (GLfloat *) MALLOC(width * height * 4 * sizeof(GLfloat));
if (!tmpImage) {
@@ -176,11 +170,6 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
return;
}
- if (changeBuffer) {
- /* choose the read buffer */
- _swrast_use_read_buffer(ctx);
- }
-
/* read source image */
dest = tmpImage;
for (row = 0; row < height; row++) {
@@ -193,11 +182,6 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
dest += 4 * width;
}
- if (changeBuffer) {
- /* restore default src/dst buffer */
- _swrast_use_draw_buffer(ctx);
- }
-
/* do the image transfer ops which preceed convolution */
for (row = 0; row < height; row++) {
GLfloat (*rgba)[4] = (GLfloat (*)[4]) (tmpImage + row * width * 4);
@@ -274,7 +258,6 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLchan *tmpImage,*p;
GLboolean quick_draw;
GLint sy, dy, stepy, j;
- GLboolean changeBuffer;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
GLint overlapping;
const GLuint transferOps = ctx->_ImageTransferState;
@@ -331,10 +314,6 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
drawRb = NULL;
}
- /* If read and draw buffer are different we must do buffer switching */
- changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer[0]
- || ctx->DrawBuffer != ctx->ReadBuffer;
-
if (overlapping) {
GLint ssy = sy;
tmpImage = (GLchan *) MALLOC(width * height * sizeof(GLchan) * 4);
@@ -342,9 +321,6 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
return;
}
- /* setup source */
- if (changeBuffer)
- _swrast_use_read_buffer(ctx);
/* read the source image */
p = tmpImage;
for (j = 0; j < height; j++, ssy += stepy) {
@@ -353,11 +329,6 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
p += width * 4;
}
p = tmpImage;
- /* restore dest */
- if (changeBuffer) {
- _swrast_use_draw_buffer(ctx);
- changeBuffer = GL_FALSE;
- }
}
else {
tmpImage = NULL; /* silence compiler warnings */
@@ -374,13 +345,9 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
}
else {
/* get from framebuffer */
- if (changeBuffer)
- _swrast_use_read_buffer(ctx);
ASSERT(width < MAX_WIDTH);
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
width, srcx, sy, span.array->rgba );
- if (changeBuffer)
- _swrast_use_draw_buffer(ctx);
}
if (transferOps) {
@@ -435,7 +402,6 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
GLuint *tmpImage,*p;
GLint sy, dy, stepy;
GLint j;
- GLboolean changeBuffer;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
const GLboolean shift_or_offset = ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset;
GLint overlapping;
@@ -475,10 +441,6 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
if (ctx->Fog.Enabled)
_swrast_span_default_fog(ctx, &span);
- /* If read and draw buffer are different we must do buffer switching */
- changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer[0]
- || ctx->DrawBuffer != ctx->ReadBuffer;
-
if (overlapping) {
GLint ssy = sy;
tmpImage = (GLuint *) MALLOC(width * height * sizeof(GLuint));
@@ -486,9 +448,6 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
_mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" );
return;
}
- /* setup source */
- if (changeBuffer)
- _swrast_use_read_buffer(ctx);
/* read the image */
p = tmpImage;
for (j = 0; j < height; j++, ssy += stepy) {
@@ -497,11 +456,6 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
p += width;
}
p = tmpImage;
- /* restore to draw buffer */
- if (changeBuffer) {
- _swrast_use_draw_buffer(ctx);
- changeBuffer = GL_FALSE;
- }
}
else {
tmpImage = NULL; /* silence compiler warning */
@@ -515,12 +469,8 @@ copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
p += width;
}
else {
- if (changeBuffer)
- _swrast_use_read_buffer(ctx);
_swrast_read_index_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
width, srcx, sy, span.array->index );
- if (changeBuffer)
- _swrast_use_draw_buffer(ctx);
}
/* Apply shift, offset, look-up table */
diff --git a/src/mesa/swrast/s_imaging.c b/src/mesa/swrast/s_imaging.c
index 5c79a7ba95..43e955c6a7 100644
--- a/src/mesa/swrast/s_imaging.c
+++ b/src/mesa/swrast/s_imaging.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -46,9 +46,6 @@ _swrast_CopyColorTable( GLcontext *ctx,
return;
}
- /* Select buffer to read from */
- _swrast_use_read_buffer(ctx);
-
if (width > MAX_WIDTH)
width = MAX_WIDTH;
@@ -56,9 +53,6 @@ _swrast_CopyColorTable( GLcontext *ctx,
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
width, x, y, data );
- /* Restore reading from draw buffer (the default) */
- _swrast_use_draw_buffer(ctx);
-
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj;
@@ -82,9 +76,6 @@ _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
return;
}
- /* Select buffer to read from */
- _swrast_use_read_buffer(ctx);
-
if (width > MAX_WIDTH)
width = MAX_WIDTH;
@@ -92,9 +83,6 @@ _swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
_swrast_read_rgba_span( ctx, ctx->ReadBuffer->_ColorReadBuffer,
width, x, y, data );
- /* Restore reading from draw buffer (the default) */
- _swrast_use_draw_buffer(ctx);
-
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj;
@@ -120,9 +108,6 @@ _swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target,
return;
}
- /* Select buffer to read from */
- _swrast_use_read_buffer(ctx);
-
RENDER_START( swrast, ctx );
/* read the data from framebuffer */
@@ -131,9 +116,6 @@ _swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target,
RENDER_FINISH( swrast, ctx );
- /* Restore reading from draw buffer (the default) */
- _swrast_use_draw_buffer(ctx);
-
/* save PBO binding */
bufferSave = ctx->Unpack.BufferObj;
ctx->Unpack.BufferObj = ctx->Array.NullBufferObj;
@@ -163,9 +145,6 @@ _swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target,
return;
}
- /* Select buffer to read from */
- _swrast_use_read_buffer(ctx);
-
RENDER_START(swrast,ctx);
/* read pixels from framebuffer */
@@ -176,9 +155,6 @@ _swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target,
RENDER_FINISH(swrast,ctx);
- /* Restore reading from draw buffer (the default) */
- _swrast_use_draw_buffer(ctx);
-
/*
* HACK: save & restore context state so we can store this as a
* convolution filter via the GL api. Doesn't call any callbacks
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index de13a95ffc..82322c766c 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -74,8 +74,6 @@ read_index_pixels( GLcontext *ctx,
return;
}
- _swrast_use_read_buffer(ctx);
-
/* XXX: width should never be > MAX_WIDTH since we did clipping earlier */
readWidth = (width > MAX_WIDTH) ? MAX_WIDTH : width;
@@ -92,8 +90,6 @@ read_index_pixels( GLcontext *ctx,
_mesa_pack_index_span(ctx, readWidth, type, dest, index,
&ctx->Pack, ctx->_ImageTransferState);
}
-
- _swrast_use_draw_buffer(ctx);
}
@@ -378,13 +374,9 @@ read_rgba_pixels( GLcontext *ctx,
return;
}
- _swrast_use_read_buffer(ctx);
-
/* Try optimized path first */
if (read_fast_rgba_pixels( ctx, x, y, width, height,
format, type, pixels, packing )) {
-
- _swrast_use_draw_buffer(ctx);
return; /* done! */
}
@@ -499,8 +491,6 @@ read_rgba_pixels( GLcontext *ctx,
}
}
}
-
- _swrast_use_draw_buffer(ctx);
}
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index d8c912640e..a44a91036c 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -983,11 +983,6 @@ _swrast_write_index_span( GLcontext *ctx, struct sw_span *span)
}
}
-#if OLD_RENDERBUFFER
- /* restore default dest buffer */
- _swrast_use_draw_buffer(ctx);
-#endif
-
span->interpMask = origInterpMask;
span->arrayMask = origArrayMask;
}
@@ -1029,9 +1024,6 @@ add_colors(GLuint n, GLchan rgba[][4], GLchan specular[][4] )
static void
multi_write_rgba_span( GLcontext *ctx, struct sw_span *span )
{
-#if OLD_RENDERBUFFER
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
-#endif
const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask);
struct gl_framebuffer *fb = ctx->DrawBuffer;
const GLuint output = 0;
@@ -1044,15 +1036,6 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span )
struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[output][i];
GLchan rgbaTmp[MAX_WIDTH][4];
-#if OLD_RENDERBUFFER
- /* obsolete code */
- GLuint bufferBit = fb->_ColorDrawBit[output][i];
- /* Set the current read/draw buffer */
- swrast->CurrentBufferBit = bufferBit;
- if (swrast->Driver.SetBuffer)
- (*swrast->Driver.SetBuffer)(ctx, ctx->DrawBuffer, bufferBit);
-#endif
-
/* make copy of incoming colors */
MEMCPY( rgbaTmp, span->array->rgba, 4 * span->end * sizeof(GLchan) );
@@ -1080,11 +1063,6 @@ multi_write_rgba_span( GLcontext *ctx, struct sw_span *span )
span->array->mask);
}
}
-
-#if OLD_RENDERBUFFER
- /* restore default dest buffer */
- _swrast_use_draw_buffer(ctx);
-#endif
}
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c
index 24470a7358..68c8b376f8 100644
--- a/src/mesa/swrast/s_texstore.c
+++ b/src/mesa/swrast/s_texstore.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.5
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -71,9 +71,6 @@ read_color_image( GLcontext *ctx, GLint x, GLint y,
if (!image)
return NULL;
- /* Select buffer to read from */
- _swrast_use_read_buffer(ctx);
-
RENDER_START(swrast,ctx);
dst = image;
@@ -86,9 +83,6 @@ read_color_image( GLcontext *ctx, GLint x, GLint y,
RENDER_FINISH(swrast,ctx);
- /* Read from draw buffer (the default) */
- _swrast_use_draw_buffer(ctx);
-
return image;
}
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 90123e5132..86cc7d2cc8 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -81,11 +81,6 @@ struct swrast_device_driver;
/* These are the public-access functions exported from swrast.
*/
-extern void
-_swrast_use_read_buffer( GLcontext *ctx );
-
-extern void
-_swrast_use_draw_buffer( GLcontext *ctx );
extern GLboolean
_swrast_CreateContext( GLcontext *ctx );
@@ -137,13 +132,6 @@ _swrast_Accum( GLcontext *ctx, GLenum op,
GLint width, GLint height );
-extern void
-_swrast_DrawBuffer( GLcontext *ctx, GLenum mode );
-
-
-extern void
-_swrast_DrawBuffers( GLcontext *ctx, GLsizei n, const GLenum *buffers );
-
/* Reset the stipple counter
*/
@@ -260,22 +248,6 @@ _swrast_copy_texsubimage3d(GLcontext *ctx,
* Unless otherwise noted, all functions are mandatory.
*/
struct swrast_device_driver {
-#if OLD_RENDERBUFFER
- void (*SetBuffer)(GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit);
- /*
- * Specifies the current color buffer for span/pixel writing/reading.
- * buffer indicates which window to write to / read from. Normally,
- * this'll be the buffer currently bound to the context, but it doesn't
- * have to be!
- * bufferBit indicates which color buffer, exactly one of:
- * DD_FRONT_LEFT_BIT - this buffer always exists
- * DD_BACK_LEFT_BIT - when double buffering
- * DD_FRONT_RIGHT_BIT - when using stereo
- * DD_BACK_RIGHT_BIT - when using stereo and double buffering
- * DD_AUXn_BIT - if aux buffers are implemented
- */
-#endif
-
/***
*** Functions for synchronizing access to the framebuffer:
***/