From: Brian Paul Date: Fri, 10 Oct 2008 22:26:15 +0000 (-0600) Subject: mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85a3bf6dabc8b2d545dab078516fdfee9c4cd792;p=mesa.git mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861 --- diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index aeb5d4ca2ab..e5c54bb10d7 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -247,7 +247,18 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params) } } else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB"); + /* error code depends on pname */ + GLenum err; + switch (pname) { + case GL_OBJECT_TYPE_ARB: + case GL_OBJECT_DELETE_STATUS_ARB: + case GL_OBJECT_INFO_LOG_LENGTH_ARB: + err = GL_INVALID_OPERATION; + break; + default: + err = GL_INVALID_VALUE; + } + _mesa_error(ctx, err, "glGetObjectParameterivARB"); } }