mesa: Fix error code for GetFramebufferAttachmentParameter in ES 3.0+.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Mar 2016 00:43:35 +0000 (16:43 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 8 Mar 2016 20:46:28 +0000 (12:46 -0800)
commit19f13b2096a9fdd986e5a12d4e9d8b0d6a4632f3
tree1131cca0c3b04d9f6a8982b609f7850b2073a969
parent8b3496f3782cc48b15fc7221392af2e416d9c2cb
mesa: Fix error code for GetFramebufferAttachmentParameter in ES 3.0+.

The ES 3.0+ specifications contain the exact same text as the OpenGL
specification, which says that we should return GL_INVALID_OPERATION.

ES 2.0 contains different text saying we should return GL_INVALID_ENUM.

Previously, Mesa chose the error code based on API (GL vs. ES).
This patch makes ES 3.0+ follow the GL behavior.  ES 2 remains as is.

Fixes dEQP-GLES3.functional.fbo.api.attachment_query_empty_fbo.
However, breaks the dEQP-GLES2 variant of the same test for drivers
which silently promote to ES 3.0.  This can be worked around by
exporting MESA_GLES_VERSION_OVERRIDE=2.0, but is a bug in dEQP-GLES2.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/fbobject.c