[cairo] pixman BGRA support

Bill Spitzak spitzak at thefoundry.co.uk
Mon Mar 9 15:51:53 PDT 2009


Mark Kettenis wrote:
> Hi,
> 
> I'm trying to make Xorg work on a Tech Source Raptor GFX-8M graphics
> card on OpenBSD/sparc64.  This card is based on the Number 9 I128-II
> chip, which has a little-endian framebuffer, that essentially uses
> ARGB pixel representation.  However, since I'm using it on a
> big-endian machine, the pixel representation as seen by the host CPU
> is BGRA.  As far as I can tell, the graphics hardware does not support
> byte swapping in hardware like the ATI cards that Sun used in many of
> their PCI framebuffers.

Are you sure about this? It would seem that if 32-bit words are 
reversed, then all >8-bit numbers sent to the graphics card will be 
reversed as well!

Ie. I would expect that even though the bytes are in BGRA order, when 
you address it as 32-bit words you would see ARGB32 data and no code 
would have to change.

Or does PCI actually identify the type of data being transferred? If so 
maybe it can just be told to transfer 32-bit words instead of bytes.

-- 
Bill Spitzak, Senior Software Engineer
The Foundry, 618 Hampton Drive, Venice, CA, 90291, USA
Tel: +1 310 399-4555 * Fax: +1 310 450-4516 * Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd * Registered in England and Wales No: 4642027


More information about the cairo mailing list