Bug 36959 - glxinfo -v doesn't show proper drawable type information.
Summary: glxinfo -v doesn't show proper drawable type information.
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Demos (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-08 03:00 UTC by sagawa
Modified: 2011-05-08 10:53 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (591 bytes, patch)
2011-05-08 03:00 UTC, sagawa
Details | Splinter Review

Description sagawa 2011-05-08 03:00:30 UTC
Created attachment 46446 [details] [review]
proposed patch

Under the following situation, visual_drawable_type function (defined in src/xdemos/glxinfo.c and called from glxinfo -v) returns wrong type text.
1. a visual calls visual_drawable_type(GLX_WINDOW_BIT);
2. then, another visual calls visual_drawable_type(GLX_PIXMAP_BIT);

In the later case, it expects to return "pixmap". But actually it returns "window,pixmap,". The reason of this behavior is that the function advances a pointer without testing a flag, and it doesn't clear previous texts.

I found this bug when I was testing Oracle VirtualBox's feature on Ubuntu 10.10.
I made a patch, so attach it.
Comment 1 Brian Paul 2011-05-08 10:53:27 UTC
Committed your patch.  Thanks.


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.