mesa/gles: Allow format GL_RED to be used with MESA_FORMAT_R_UNORM
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 25 Apr 2016 02:38:03 +0000 (19:38 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Mon, 25 Apr 2016 19:09:15 +0000 (12:09 -0700)
commit50b82ecd772ff8f59974618f852fedf98bbe77a6
treeff10e52bac47fc5a48fe8d3a2c2770bd622cd0e1
parentc4cb879f00de89c300462e7b2d0f221d920c396f
mesa/gles: Allow format GL_RED to be used with MESA_FORMAT_R_UNORM

If the bound framebuffer has a format of MESA_FORMAT_R_UNORM, then
IMPLEMENTATION_COLOR_READ_FORMAT will return GL_RED. This change
applies to OpenGLES contexts where additional restrictions are placed
on the formats that are allowed to be supported.

Fixes OpenGLES 3.1 CTS tests:
 * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC16
 * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC16Linear
 * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC32F
 * ES31-CTS.texture_border_clamp.sampling_texture.Texture2DDC32FLinear

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/framebuffer.c