Mesa: fix bug with glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES)

When querying the prefered pixel format without a current color
buffer, mesa will crash. This has been fixed in upstream mesa with
two patches, which this CL backports:

commit f8e7aa2827e2bdb1ed238cbdd351be3c8a6e9b12
Author: Jordan Justen <jordan.l.justen@intel.com>
Date:   Sat Jan 12 01:11:21 2013 -0800

framebuffer: update allowed implementation format/type

Allow additional format/type combinations based on the
color render buffer to fix failures with gles3-gtf.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>

and:

commit e20a2df4017ab10dd7199936948c6ac809bfacb6
Author: Brian Paul <brianp@vmware.com>
Date:   Sun Jun 2 18:07:55 2013 -0600

mesa: handle missing read buffer in _mesa_get_color_read_format/type()

We were crashing when GL_READ_BUFFER == GL_NONE.  Check for NULL
pointers and reorganize the code.  The spec doesn't say which error
to generate in this situation, but NVIDIA raises GL_INVALID_OPERATION.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65173
NOTE: This is a candidate for the stable branches.

Tested-by: Vedran Rodic <vrodic@gmail.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>

BUG=chromium:443074
TEST=trybots



git-svn-id: svn://svn.chromium.org/chrome/trunk/deps/third_party/mesa@293450 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed