summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_readpix.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-29 03:20:15 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-29 03:20:15 +0000
commit8d0edf015d82a705796389890f6fe9b32e19414c (patch)
treef62127d12108175d8b1fa85bd3f797e1e49de70e /src/mesa/swrast/s_readpix.c
parent5208867f12abd4b13c517e8cd006afde6fadbed8 (diff)
Rewrite much of the pixel zoom code.
Zoomed DrawPixels of packed depth/stencil works now.
Diffstat (limited to 'src/mesa/swrast/s_readpix.c')
-rw-r--r--src/mesa/swrast/s_readpix.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 984205d44d..cae89724c0 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -53,9 +53,7 @@ read_index_pixels( GLcontext *ctx,
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
GLint i;
- if (!rb) {
- return; /* no readbuffer OK */
- }
+ ASSERT(rb);
/* width should never be > MAX_WIDTH since we did clipping earlier */
ASSERT(width <= MAX_WIDTH);
@@ -99,9 +97,7 @@ read_depth_pixels( GLcontext *ctx,
/* width should never be > MAX_WIDTH since we did clipping earlier */
ASSERT(width <= MAX_WIDTH);
- if (!rb) {
- return; /* no readbuffer OK */
- }
+ ASSERT(rb);
bias_or_scale = ctx->Pixel.DepthBias != 0.0 || ctx->Pixel.DepthScale != 1.0;
@@ -175,10 +171,7 @@ read_stencil_pixels( GLcontext *ctx,
struct gl_renderbuffer *rb = fb->Attachment[BUFFER_STENCIL].Renderbuffer;
GLint j;
- if (!rb) {
- /* no readbuffer - OK */
- return;
- }
+ ASSERT(rb);
/* width should never be > MAX_WIDTH since we did clipping earlier */
ASSERT(width <= MAX_WIDTH);
@@ -291,10 +284,7 @@ read_rgba_pixels( GLcontext *ctx,
struct gl_framebuffer *fb = ctx->ReadBuffer;
struct gl_renderbuffer *rb = fb->_ColorReadBuffer;
- if (!rb) {
- /* No readbuffer is OK with GL_EXT_framebuffer_object */
- return;
- }
+ ASSERT(rb);
/* Try optimized path first */
if (read_fast_rgba_pixels( ctx, x, y, width, height,