mesa: Allow glReadBuffer(GL_NONE) for winsys framebuffers.
authorPaul Berry <stereotype441@gmail.com>
Wed, 19 Dec 2012 18:08:58 +0000 (10:08 -0800)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Wed, 13 Feb 2013 17:46:38 +0000 (18:46 +0100)
commitdcb6a7ccbb63aaeec719b873a809c61a8bf45297
tree641f0d34fe5b6ac823ca19fb3760c239a9c3583f
parente8830f5a4009c3784836edb441319a62c7beef36
mesa: Allow glReadBuffer(GL_NONE) for winsys framebuffers.

Previously, Mesa code assumed that glReadBuffer(GL_NONE) was only
valid for user-created framebuffer objects.  However, the spec is
quite clear that is should also be valid for the default framebuffer.
From section 18.2.1 ("Obtaining Pixels from the Framebuffer") of the
GL 4.3 spec:

    "When READ_FRAMEBUFFER_BINDING is zero, i.e. the default
    framebuffer, src must be one of the values listed in table 17.4,
    including NONE."

Similar language exists in the GLES 3.0 spec, and in desktop GL all
the way back to ARB_framebuffer_object.

Partially fixes GLES3 conformance test "CoverageES30.test".

NOTE: This is a candidate for stable branches.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit cf5632094ba0c19d570ea47025cf6da75ef8457a)
src/mesa/main/buffers.c