fix assertion, z/stencil swarst readback, (still looks suspicious) copyTexSubimage

This commit is contained in:
Roland Scheidegger
2007-07-14 14:24:20 +02:00
parent f022bff5aa
commit a04056d313
4 changed files with 12 additions and 6 deletions
@@ -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
}
}
@@ -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;
}
}
+2 -2
View File
@@ -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;
@@ -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