[Mesa-dev] [PATCH v2 05/11] gbm: Pull out FourCC <-> DRIimage format table

Daniel Stone daniel at fooishbar.org
Thu Jul 13 16:02:58 UTC 2017


Hi,

On 13 July 2017 at 16:59, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On July 13, 2017 4:13:17 AM Daniel Stone <daniels at collabora.com> 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.

Cheers,
Daniel


More information about the mesa-dev mailing list