bitsPerRGBValue == 0??

Peter Harris pharris at opentext.com
Wed Dec 16 14:29:14 PST 2009


Timothy Normand Miller wrote:
> I'm having a problem with 8-bit mode, regarding colormaps.  Here's the
> Visual I'm getting:
> 
> (gdb) print *pVisual
> $6 = {vid = 33, class = 4, bitsPerRGBValue = 0, ColormapEntries = 8,
>   nplanes = 8, redMask = 7, greenMask = 56, blueMask = 192, offsetRed = 0,
>   offsetGreen = 3, offsetBlue = 6}
> 
> This is an 8-bit Truecolor visual.  Is this valid?

Yes. Not so common these days, but it used to be popular.

>  And is it valid to
> have bitsPerRGBValue=0?

No.

>  Where does this get set?  I can't figure out
> if it's my fault or what.

If you're using the mi layer to initialize visuals, you will have passed
it into miSetVisualTypes. There is also a similar fbSetVisualTypes, and
there used to be a similar cfbSetVisualTypes, etc.

Depending on the level your driver uses, fbInitVisuals calls
fbSetVisualTypes. I'm pretty sure you aren't using fbFinishScreenInit,
since it always passes bitsPerRGBValue=8 to fbInitVisuals.

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the xorg-devel mailing list