On 13 July 2017 at 17:02, Daniel Stone <[email protected]> wrote:
> Hi,
>
> On 13 July 2017 at 16:59, Jason Ekstrand <[email protected]> wrote:
>> On July 13, 2017 4:13:17 AM Daniel Stone <[email protected]> wrote:
>>> +   /* The two GBM_BO_FORMAT_[XA]RGB8888 formats alias the GBM_FORMAT_*
>>> +    * formats of the same name. We want to accept them whenever someone
>>> +    * has a GBM format, but never return them to the user. */
>>> +   if (gbm_format == GBM_BO_FORMAT_XRGB8888)
>>> +      gbm_format = GBM_FORMAT_XRGB8888;
>>> +   else if (gbm_format == GBM_BO_FORMAT_ARGB8888)
>>> +      gbm_format = GBM_FORMAT_ARGB8888;
>>
>> You could put them in the table but make sure they come after their
>> GBM_FORMAT counterparts.  I'm not sure if that's actually better though.
>
> I had actually typed that out, but decided it was more confusing.
> Given that the two are an anomaly and we're definitely not going to
> have any more non-drm_fourcc formats, it looked far easier to
> completely special-case them.
>
We could even go the extra mile and create a
"legacy_bo_format_to_format" inline helper.
Helper could even have a lovely printf - GBM_BO_FORMAT_foo is
deprecated, use GBM_FORMAT_foo instead

That's a maybe and at some later point.
Emil
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to