mesa: Return INVALID_ENUM for glReadPixels(..., GL_DEPTH_*, ...) on ES 3
authorMatt Turner <mattst88@gmail.com>
Fri, 30 Nov 2012 23:07:54 +0000 (15:07 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 15 Jan 2013 21:34:00 +0000 (13:34 -0800)
commit112e302481182d625e04ae1abeaa4f4f344a645e
tree4315ad8ddae1eaf26c693f1126bd8b7666ae1e44
parent2906e2034c9d674601960a5b586b6e986e6ef04f
mesa: Return INVALID_ENUM for glReadPixels(..., GL_DEPTH_*, ...) on ES 3

I'm not sure if this is the correct fix. The
_mesa_es_error_check_format_and_type function (used above in the ES 1
and 2 cases) was originally added for glTexImage checking and allows
GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8 combinations. Using it in ES 3
causes other tests to regress.

Fixes es3conform's packed_depth_stencil_error test.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/readpix.c