diff options
author | Jordan Justen <[email protected]> | 2013-01-12 01:05:44 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-01-20 19:54:38 -0800 |
commit | ffdffd834a9b0bc6866331e7ecca995d0eb1c041 (patch) | |
tree | d96b5ee80086845a781b228e20072dde0ec602d1 /src/mesa/main/readpix.c | |
parent | 119002a648180ba1a20ed086adf2b1b306f81386 (diff) |
readpix: allow implementation format/type
For GLES2/3 allow reading of pixels with format/type based on:
* GL_IMPLEMENTATION_COLOR_READ_FORMAT
* GL_IMPLEMENTATION_COLOR_READ_TYPE
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main/readpix.c')
-rw-r--r-- | src/mesa/main/readpix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 994e5895e73..6b07563e982 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -773,7 +773,12 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, * combination is, and Mesa can handle anything valid. Just work instead. */ if (_mesa_is_gles(ctx)) { - if (ctx->Version < 30) { + if (ctx->API == API_OPENGLES2 && + _mesa_is_color_format(format) && + _mesa_get_color_read_format(ctx) == format && + _mesa_get_color_read_type(ctx) == type) { + err = GL_NO_ERROR; + } else if (ctx->Version < 30) { err = _mesa_es_error_check_format_and_type(format, type, 2); if (err == GL_NO_ERROR) { if (type == GL_FLOAT || type == GL_HALF_FLOAT_OES) { |