From: Alejandro PiƱeiro Date: Wed, 11 Jan 2017 20:11:55 +0000 (-0200) Subject: main/buffers: take into account FRONT_AND_BACK on ReadBuffer X-Git-Tag: upstream/17.1.0~3218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f354cd5c69b0b1fe7db87473240a51ecc7369c03;p=platform%2Fupstream%2Fmesa.git main/buffers: take into account FRONT_AND_BACK on ReadBuffer From OpenGL 3.1 spec, section 4.3.1 "Reading Pixels", page 190 (203 PDF) "When READ FRAMEBUFFER BINDING is zero, i.e. the default framebuffer, src must be one of the values listed in table 4.4, including NONE . FRONT_AND_BACK , FRONT , and LEFT refer to the front left buffer." There is an equivalent text on OpenGL 4.5 spec, section 18.2.1 "Selecting Buffers for Reading", page 502 (524 PDF), so the behaviour is still the same. Part of the fix for: GL45-CTS.direct_state_access.framebuffers_draw_read_buffers_errors Reviewed-by: Anuj Phogat --- diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index bba5e7e..7d17ae9 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -204,6 +204,8 @@ read_buffer_enum_to_index(const struct gl_context *ctx, GLenum buffer) return BUFFER_FRONT_LEFT; case GL_AUX0: return BUFFER_AUX0; + case GL_FRONT_AND_BACK: + return BUFFER_FRONT_LEFT; case GL_AUX1: case GL_AUX2: case GL_AUX3: