mesa: Handle GL_BACK correctly for ES 3.0 in glDrawBuffers().
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 18 Dec 2012 21:26:03 +0000 (13:26 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Jan 2013 22:59:40 +0000 (14:59 -0800)
commitfd3891cbbe8f11c297edf0a6bf0580f69024722e
tree5b0982b00ce32c2a6aa774a19910fc42a1f2df16
parentd786bf2c2acbafe2ac32e7fd5b8f9a6b09f3d968
mesa: Handle GL_BACK correctly for ES 3.0 in glDrawBuffers().

In ES 3.0, when calling glDrawBuffers() on the window system
framebuffer, the only valid targets are GL_NONE or GL_BACK.  Since there
is no stereo rendering in ES 3.0, this is a single buffer, unlike
desktop where it may be two (and thus isn't allowed).

For single-buffered configs, GL_BACK ironically means the front (and
only) buffer.  I'm not sure that it matters, however, as ES shouldn't
have front buffer rendering in the first place.

Fixes es3conform framebuffer_blit_coverage_default_draw_buffer_binding.

v2: Update GLES3 spec reference.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> [v2]
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1]
src/mesa/main/buffers.c