Bug 10938

Summary: __glXGetArrayType returns enabled state, not type
Product: Mesa Reporter: Bruce Merry <bmerry>
Component: GLXAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 6.5   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Test program demonstrating the bug
Patch to fix the bug

Description Bruce Merry 2007-05-13 13:15:27 UTC
In src/glx/x11/indirect_vertex_array.c:__glXGetArrayType there is a copy-paste bug that causes the function to return the enabled state rather than the type of the array. The result is that calls to glGetIntegerv(GL_VERTEX_ARRAY_TYPE) (and similarly for other arrays) returns the wrong value when using indirect rendering.

I've found this with 6.5.1, someone else has reproduced it with 6.5.2, and I've checked that the code is still present and incorrect in 6.5.3 (I haven't tried rebuilding my X server to verify it experimentally though).
Comment 1 Bruce Merry 2007-05-13 13:19:21 UTC
Created attachment 9957 [details]
Test program demonstrating the bug

I've attached a simple GLUT app that will demonstrate the bug. It will throw an assert error if the bug is present.
Comment 2 Bruce Merry 2007-05-13 13:28:00 UTC
Created attachment 9958 [details] [review]
Patch to fix the bug

I'm not too sure about rebuilding my X server, so I haven't verified that the patch works, but hopefully it's a no-brainer.
Comment 3 Brian Paul 2007-05-14 08:38:50 UTC
Thanks.  The patch looks good.  Commited to git.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.