[Mesa-dev] [PATCH] mesa: adjust usage of swapBytes/littleEndian in format_matches_format_and_type

Michel Dänzer michel at daenzer.net
Thu Jan 31 10:12:55 PST 2013

On Don, 2013-01-31 at 18:03 +0100, Marek Olšák wrote: 
> On Thu, Jan 31, 2013 at 5:39 PM, Michel Dänzer <michel at daenzer.net> wrote:
> > I'm afraid these are not quite correct yet. I'm not 100% sure after
> > looking at the red book and the GL 3.x spec — this is head spinning
> > material, isn't it? :\ — but I think swapBytes only applies to the basic
> > type, in these cases GL_BYTE, so it's irrelevant. However, because the
> > Mesa formats are defined as 16 bit packed values in host byte order,
> > these cases can only match directly on little endian hosts, i.e. if
> > (type == GL_BYTE && littleEndian).
> I don't really know. This is the first time I have to worry about endiannes.
> I discarded the modifications where we are unsure. The updated patch is here:

Looks good, but the above discussion shouldn't be included in the commit
log (things like that can be put after the --- marker). Other than that,

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer

More information about the mesa-dev mailing list