aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-21 22:50:26 +0100
committermarha <marha@users.sourceforge.net>2014-03-21 22:56:24 +0100
commiteb71c0f23999d1cc156e1821d73634ec79621fc2 (patch)
treed45d551ada10b1bfb3d57517c892770734a77817 /mesalib/src/mesa/main/buffers.c
parentab3d257d88f67e169a314ad0fac851fc2fc6cb05 (diff)
parent41fea4472dec859ddec76bdfa7108ebec71de1e3 (diff)
downloadvcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.gz
vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.bz2
vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014 Conflicts: libxcb/src/xcb_auth.c libxcb/src/xcb_conn.c libxcb/src/xcb_util.c libxcb/src/xcb_windefs.h mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'mesalib/src/mesa/main/buffers.c')
-rw-r--r--mesalib/src/mesa/main/buffers.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/buffers.c b/mesalib/src/mesa/main/buffers.c
index 6cbce9d5d..b13a7af65 100644
--- a/mesalib/src/mesa/main/buffers.c
+++ b/mesalib/src/mesa/main/buffers.c
@@ -101,7 +101,7 @@ draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer)
case GL_FRONT:
return BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT;
case GL_BACK:
- if (_mesa_is_gles3(ctx)) {
+ if (_mesa_is_gles(ctx)) {
/* Page 181 (page 192 of the PDF) in section 4.2.1 of the OpenGL
* ES 3.0.1 specification says:
*
@@ -111,6 +111,11 @@ draw_buffer_enum_to_bitmask(const struct gl_context *ctx, GLenum buffer)
*
* Since there is no stereo rendering in ES 3.0, only return the
* LEFT bits. This also satisfies the "n must be 1" requirement.
+ *
+ * We also do this for GLES 1 and 2 because those APIs have no
+ * concept of selecting the front and back buffer anyway and it's
+ * convenient to be able to maintain the magic behaviour of
+ * GL_BACK in that case.
*/
if (ctx->DrawBuffer->Visual.doubleBufferMode)
return BUFFER_BIT_BACK_LEFT;