Bug 10938 - __glXGetArrayType returns enabled state, not type
Summary: __glXGetArrayType returns enabled state, not type
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: 6.5
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-13 13:15 UTC by Bruce Merry
Modified: 2007-05-14 08:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Test program demonstrating the bug (582 bytes, text/x-csrc)
2007-05-13 13:19 UTC, Bruce Merry
Details
Patch to fix the bug (332 bytes, patch)
2007-05-13 13:28 UTC, Bruce Merry
Details | Splinter Review

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.