diff options
Diffstat (limited to 'mesalib/src/mesa/main/readpix.c')
-rw-r--r-- | mesalib/src/mesa/main/readpix.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/readpix.c b/mesalib/src/mesa/main/readpix.c index 138111049..7ac877497 100644 --- a/mesalib/src/mesa/main/readpix.c +++ b/mesalib/src/mesa/main/readpix.c @@ -36,6 +36,8 @@ #include "pack.h" #include "pbo.h" #include "state.h" +#include "glformats.h" +#include "fbobject.h" /** @@ -337,7 +339,7 @@ slow_read_rgba_pixels( struct gl_context *ctx, goto done; for (j = 0; j < height; j++) { - if (_mesa_is_integer_format(format)) { + if (_mesa_is_enum_format_integer(format)) { _mesa_unpack_uint_rgba_row(rbFormat, width, map, (GLuint (*)[4]) rgba); _mesa_rebase_rgba_uint(width, (GLuint (*)[4]) rgba, rb->_BaseFormat); @@ -378,7 +380,7 @@ read_rgba_pixels( struct gl_context *ctx, return; if ((ctx->Color._ClampReadColor == GL_TRUE || type != GL_FLOAT) && - !_mesa_is_integer_format(format)) { + !_mesa_is_enum_format_integer(format)) { transferOps |= IMAGE_CLAMP_BIT; } @@ -713,7 +715,7 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, if (ctx->Extensions.EXT_texture_integer && _mesa_is_color_format(format)) { const struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer; const GLboolean srcInteger = _mesa_is_format_integer_color(rb->Format); - const GLboolean dstInteger = _mesa_is_integer_format(format); + const GLboolean dstInteger = _mesa_is_enum_format_integer(format); if (dstInteger != srcInteger) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(integer / non-integer format mismatch"); @@ -721,7 +723,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, } } - if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) { + if (_mesa_is_user_fbo(ctx->ReadBuffer) && + ctx->ReadBuffer->Visual.samples > 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)"); return; } |