[Mesa-dev] [PATCH 1/1] Adjust MESA_FORMAT color component ordering to match API docs

Brian Paul brianp at vmware.com
Fri Dec 20 07:38:12 PST 2013


On 12/19/2013 06:47 PM, Michel Dänzer wrote:
> On Don, 2013-12-19 at 13:56 -0800, Mark Mueller wrote:
>> Adjust MESA_FORMAT color component ordering to match API docs, driver
>> specific formats (e.g. PIPE_FORMATs),
>
> Actually, there are a couple of examples of other format definitions
> which match the Mesa formats before your change but no longer after it,
> e.g. in the DRI and i915, nouveau and radeon driver code.
>
> Changing the Mesa format definitions will be confusing for people
> switching between branches with and without your change.

Unfortunately, I don't think there's a solution to that issue.  There'll 
always be stable branches that we're cherry-picking to.  If that's a 
major concern, we'll never change any of the MESA_FORMATs.


> Also, because these Mesa formats are defined as packed values, you're
> essentially changing the notation from big endian (aka human readable)
> to little endian. It's unfortunate that the packed PIPE_FORMATs are
> named in little endian order, that's a concession we had to make when
> adding them.
>
> Overall, I'm afraid this change doesn't look very good at all to me. At
> the very least though, you'd also have to change the order of component
> sizes for formats such as MESA_FORMAT_BGRA2101010_UNORM or
> MESA_FORMAT_BGRA1555_UNORM, otherwise they're just plain wrong.

Yeah, I missed that, and I agree that if we're going to rename things to 
follow the Gallium style, we should fix those too.

-Brian



More information about the mesa-dev mailing list