X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Freadpix.c;h=b09cf54994a638c27e29da96b07640e62cd427f1;hb=de42431a9d761305c9911f30b5880a9a049a2d60;hp=63cf0202bbd535829b4d0eb44d3aed051486b10f;hpb=71fe9437169cfdafda8814aa814bb85429fb6cfc;p=mesa.git diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 63cf0202bbd..b09cf54994a 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -424,13 +424,13 @@ read_rgba_pixels_swizzle(struct gl_context *ctx, GLboolean swizzle_rb = GL_FALSE, copy_xrgb = GL_FALSE; /* XXX we could check for other swizzle/special cases here as needed */ - if (rb->Format == MESA_FORMAT_RGBA8888_REV && + if (rb->Format == MESA_FORMAT_R8G8B8A8_UNORM && format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV && !ctx->Pack.SwapBytes) { swizzle_rb = GL_TRUE; } - else if (rb->Format == MESA_FORMAT_XRGB8888 && + else if (rb->Format == MESA_FORMAT_B8G8R8X8_UNORM && format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV && !ctx->Pack.SwapBytes) { @@ -594,8 +594,8 @@ fast_read_depth_stencil_pixels(struct gl_context *ctx, if (rb != stencilRb) return GL_FALSE; - if (rb->Format != MESA_FORMAT_Z24_S8 && - rb->Format != MESA_FORMAT_S8_Z24) + if (rb->Format != MESA_FORMAT_S8_UINT_Z24_UNORM && + rb->Format != MESA_FORMAT_Z24_UNORM_S8_UINT) return GL_FALSE; ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT, @@ -1033,7 +1033,7 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, } if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && - _mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { + _mesa_check_disallowed_mapping(ctx->Pack.BufferObj)) { /* buffer is mapped - that's an error */ _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)"); return;