Bug 3320

Summary: is driFillInModes correct?
Product: Mesa Reporter: Jon Smirl <jonsmirl>
Component: Mesa coreAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Jon Smirl 2005-05-17 15:37:59 UTC
Are the FillInModes() functions working right? I found these two
problem when I copied the code into EGL.

drivers/dri/common/util.c
driFillInModes()

               modes->stencilBits = stencil_bits[k];
               modes->depthBits = depth_bits[k];

Shouldn't that be

               modes->stencilBits = stencil_bits[k];
               modes->depthBits = depth_bits[i];

i instead of k?

And in r200screen.c, r200FillInModes()

   depth_bits_array[0] = depth_bits;
   depth_bits_array[1] = depth_bits;

Should be

   depth_bits_array[0] = 0;
   depth_bits_array[1] = depth_bits;

This bug is probably in all of the drivers due to copying.
Comment 1 Ian Romanick 2009-10-20 09:10:34 UTC
It appears the bug in util.c was fixed aeons ago.  The strangeness with depth_bits_array in r200 and other drivers is intentional.  On DRI1 the depth buffer is pre-allocated and always available, so there is no reason to expose visuals without it.  On DRI2 the depth buffer is allocated per-window, so DRI2 drivers should (and do) expose visuals without depth.

Closing.

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.