Dri2 buffer format

Pauli Nieminen suokkos at gmail.com
Fri Dec 10 07:57:12 PST 2010


On Tue, Nov 9, 2010 at 2:12 AM, Russell Shaw <rjshaw at netspace.net.au> wrote:
> Hi,
> How should the "format" of a DRI2 buffer be determined?
>
>
> http://www.x.org/releases/current/doc/dri2proto/dri2proto.txt
>
> DRI2ATTACH_FORMAT { attachment: CARD32
>            format:     CARD32 }
>
>    The DRI2ATTACH_FORMAT describes an attachment and the associated
>    format.  'attachment' describes the attachment point for the buffer,
>    'format' describes an opaque, device-dependent format for the buffer.
>
>
> xorg-server-1.7.7/hw/xfree86/dri2/dri2ext.c
>
>
> If it's opaque, how does a user or library know what bytes are
> red/green/blue
> so that you can draw a line in the right colour?
>

Only driver knows it. That why user code would need glx extension to
map and provide information about format.



More information about the xorg mailing list