Mesa (master): mesa: fix error value in GetFramebufferAttachmentParameteriv for OpenGL ES 3.0
Iago Toral Quiroga
itoral at kemper.freedesktop.org
Tue Feb 3 12:24:23 UTC 2015
Module: Mesa
Branch: master
Commit: 284bd1ecdf3af2d1679baf588b3227cd34e3f15c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=284bd1ecdf3af2d1679baf588b3227cd34e3f15c
Author: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Date: Fri Jan 16 16:00:13 2015 +0100
mesa: fix error value in GetFramebufferAttachmentParameteriv for OpenGL ES 3.0
Section 6.1.13 "Framebuffer Object Queries" of OpenGL ES 3.0 spec:
"If the default framebuffer is bound to target, then attachment must be
BACK, identifying the color buffer; DEPTH, identifying the depth buffer; or
STENCIL, identifying the stencil buffer."
OpenGL ES 3.0, section 2.5 (GL Errors):
"If a command that requires an enumerated value is passed a
symbolic constant that is not one of those specified as allowable
for that command, an INVALID_ENUM error is generated."
Then change the returned error to INVALID_ENUM.
Fixes:
dEQP-GLES3.functional.fbo.api.attachment_query_default_fbo
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/main/fbobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 7d91470..3305151 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -2789,7 +2789,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
if (_mesa_is_gles3(ctx) && attachment != GL_BACK &&
attachment != GL_DEPTH && attachment != GL_STENCIL) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
+ _mesa_error(ctx, GL_INVALID_ENUM,
"glGetFramebufferAttachmentParameteriv(attachment)");
return;
}
More information about the mesa-commit
mailing list