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

Mark Mueller markkmueller at gmail.com
Fri Dec 20 10:41:21 PST 2013


On Fri, Dec 20, 2013 at 7:38 AM, Brian Paul <brianp at vmware.com> wrote:

> 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.
>
>
That wasn't an oversight, that part is in my next phase. If it's preferred,
I can move this patch into the subsequent series that I've been working on.
I'd prefer not to because the first 2 patches are huge but straight forward
changes. The subsequent series is more challenging because further name
changing exposes format names that are redundant as well as cases where
formats are being used incorrectly, probably because the name was
misunderstood. The series will be smaller but will require more thorough
review and testing by reviewers.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131220/5be4430d/attachment.html>


More information about the mesa-dev mailing list