[Mesa-dev] [PATCH 03/13] gallium: Introduce 32-bit bytewise format names
rsandifo at linux.vnet.ibm.com
Thu Jun 6 01:34:25 PDT 2013
Michel Dänzer <michel at daenzer.net> writes:
> On Die, 2013-06-04 at 10:47 +0100, Richard Sandiford wrote:
>> (2) it uses PIPE_FORMAT_INT_* names with the lsb first rather than the
>> mesa-like ones with msb first. (I'm happy to change the names to
>> something else though.)
>> The patch isn't in a submittable state yet. I just thought it was worth
>> posting because the lsb-first names do make the change look a bit more
>> obvious/less scary :-)
> I can see the appeal of that, but I also see some danger in that naming
> scheme: It'll be easy to miss the difference between the two kinds of
> formats, e.g. when grepping for B8G8R8A8. That's why I'd prefer making
> the difference more explicit in the naming scheme. Sticking to LSB
> first, BGRA8888 might already look a little less scary? :)
I realise this was probably more a question for Jose, but FWIW:
I liked the names you originally suggested for their consistency with
mesa and natural number ordering (as you said). The PIPE_FORMAT_INT_*
version seemed OK too from the "lowest always first" perspective.
I'm just afraid that if we use BGRA8888 to mean the reverse of what
it means in mesa, these patches are going to be cursed by gallium
developers for years to come.
BGRA8888_REV would be consistent with the mesa names while being
lsb-first, and I'd be happy with that too FWIW. It's just that
_REV kind of implies that the other order is somehow the canonical one.
Having all int formats end in _REV might seem a bit odd.
More information about the mesa-dev