http://bugs.freedesktop.org/show_bug.cgi?id=17861
Summary: glGetObjectParameterivARB sets wrong error code
Product: Mesa
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Mesa core
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=19332)
--> (http://bugs.freedesktop.org/attachment.cgi?id=19332)
Propsed patch to fix the bug
The GL_ARB_shader_objects spec is a bit confusing about the error codes
returned by glGetObjectParameterivARB. It says:
The error INVALID_OPERATION is generated by GetObjectParameter{if}vARB
if <pname> is OBJECT_TYPE_ARB or OBJECT_DELETE_STATUS_ARB or
OBJECT_INFO_LOG_LENGTH_ARB and <obj> is not of type PROGRAM_OBJECT_ARB
or SHADER_OBJECT_ARB.
However, it also says:
The error INVALID_VALUE is generated by any command that takes one or
more handles as input, and one or more of these handles are not an
object handle generated by OpenGL. Note that this error is also set when
passing in the value 0 as a handle, except for UseProgramObjectARB and
DeleteObject. Passing in 0 to UseProgramObjectARB is valid, and ignored
by DeleteObject.
The code in _mesa_GetObjectParameterivARB correctly implements the
GL_INVALID_OPERATION error, but it does not implement the GL_INVALID_VALUE
case. What is needed is a way to determine if the passed handle is an existing
object. I have a patch for this, but it breaks the separation between
src/mesa/main/shaders.c and src/mesa/shader/shader_api.c.
Opinions?
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev