diff options
author | Roland Scheidegger <[email protected]> | 2007-07-14 14:24:20 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2007-07-14 14:24:20 +0200 |
commit | a04056d313a8346dc9e6e1b062762a6f115d1b46 (patch) | |
tree | 5e9597deefb8653708ea34456d8460af9664358f | |
parent | f022bff5aa828cfdbb4749f672fc51c345f9cb33 (diff) |
fix assertion, z/stencil swarst readback, (still looks suspicious) copyTexSubimage
-rw-r--r-- | src/mesa/drivers/dri/common/drirenderbuffer.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_pixel_read.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_span.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_tex_copy.c | 8 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index d36af3e5bee..d4f7f2527bb 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -209,7 +209,11 @@ driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv) struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate; if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) { ctx->Driver.ResizeBuffers(ctx, fb, dPriv->w, dPriv->h); +#if 0 + /* if the driver needs the hw lock for ResizeBuffers, the drawable + might have changed again by now */ assert(fb->Width == dPriv->w); assert(fb->Height == dPriv->h); +#endif } } diff --git a/src/mesa/drivers/dri/i915tex/intel_pixel_read.c b/src/mesa/drivers/dri/i915tex/intel_pixel_read.c index 9481cb4800f..c7bdb6bc855 100644 --- a/src/mesa/drivers/dri/i915tex/intel_pixel_read.c +++ b/src/mesa/drivers/dri/i915tex/intel_pixel_read.c @@ -183,7 +183,7 @@ do_blit_readpixels(GLcontext * ctx, */ if (!_mesa_validate_pbo_access(2, pack, width, height, 1, format, type, pixels)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels"); + _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels"); return GL_TRUE; } } diff --git a/src/mesa/drivers/dri/i915tex/intel_span.c b/src/mesa/drivers/dri/i915tex/intel_span.c index 368e0ec3c09..74f118121c1 100644 --- a/src/mesa/drivers/dri/i915tex/intel_span.c +++ b/src/mesa/drivers/dri/i915tex/intel_span.c @@ -264,7 +264,7 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) /* depth buffer (Note wrapper!) */ if (ctx->DrawBuffer->_DepthBuffer) { irb = intel_renderbuffer(ctx->DrawBuffer->_DepthBuffer->Wrapped); - if (irb && irb->region && irb->Base.Name != 0) { + if (irb && irb->region) { if (map) { intel_region_map(intel->intelScreen, irb->region); irb->pfMap = irb->region->map; @@ -281,7 +281,7 @@ intel_map_unmap_buffers(struct intel_context *intel, GLboolean map) /* stencil buffer (Note wrapper!) */ if (ctx->DrawBuffer->_StencilBuffer) { irb = intel_renderbuffer(ctx->DrawBuffer->_StencilBuffer->Wrapped); - if (irb && irb->region && irb->Base.Name != 0) { + if (irb && irb->region) { if (map) { intel_region_map(intel->intelScreen, irb->region); irb->pfMap = irb->region->map; diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c index 90c2b9ebb51..8d7f8f9d91b 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_copy.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_copy.c @@ -118,9 +118,11 @@ do_copy_texsubimage(struct intel_context *intel, dstx += x - orig_x; dsty += y - orig_y; - /* invert Y */ - y = ctx->ReadBuffer->Height - y - 1; - + if (!(ctx->ReadBuffer->Name == 0)) { + /* XXX this looks bogus ? */ + /* FBO: invert Y */ + y = ctx->ReadBuffer->Height - y - 1; + } /* A bit of fiddling to get the blitter to work with -ve * pitches. But we get a nice inverted blit this way, so it's |