Bug 36959

Summary: glxinfo -v doesn't show proper drawable type information.
Product: Mesa Reporter: sagawa <sagawa.aki+fdtbugs>
Component: DemosAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed patch

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.