[Mesa-dev] [PATCH] st/dri: add 32-bit RGBX/RGBA formats

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 11 12:04:09 UTC 2017


On 10 July 2017 at 22:33, Chad Versace <chadversary at chromium.org> wrote:
> On Mon 10 Jul 2017, Chad Versace wrote:
>> On Fri 07 Jul 2017, Rob Herring wrote:
>> > On Wed, Jul 5, 2017 at 5:14 PM, Chad Versace <chadversary at chromium.org> wrote:
>> > > On Fri 30 Jun 2017, Rob Herring wrote:
>> > >> Add support for 32-bit RGBX/RGBA formats which are required for Android.
>> > >>
>> > >> The original patch (commit ccdcf91104a5) was reverted (commit
>> > >> c0c6ca40a25e) in mesa as it broke GLX resulting in swapped colors. Based
>> > >> on further investigation by Chad Versace, moving the RGBX/RGBA configs
>> > >> to the end is enough to prevent breaking GLX.
>> > >>
>> > >> Cc: Marek Olšák <marek.olsak at amd.com>
>> > >> Cc: Eric Anholt <eric at anholt.net>
>> > >> Cc: Chad Versace <chadversary at chromium.org>
>> > >> Cc: Mauro Rossi <issor.oruam at gmail.com>
>> > >> Signed-off-by: Rob Herring <robh at kernel.org>
>> > >> ---
>> > >> I've tested only on Android and could use help testing with KDE which
>> > >> broke last time. This has been done on the Intel driver and *should* be
>> > >> okay, but maybe not.
>> > >
>> > > Should this patch also update the switch statement in
>> > > dri2.c:dri2_drawable_get_buffers()? I think so, but am not certain.
>> >
>> > I don't know. At least for Android, I think we'd always take the
>> > dri_image_drawable_get_buffers path which already has the formats.
>>
>> True, I think Android always takes the dri_image_drawable_get_buffers()
>> path. It wouldn't hurt to also add the formats to
>> dri2_drawable_get_buffers(), but I doubt that function will ever see the
>> new formats.
>>
>> Reviewed-by: Chad Versace <chadversary at chromium.org>
>
> Oops. I retract my r-b.
>
> dri_create_context() and dri_create_buffer() call dri_fill_st_visual(),
> but dri_fill_st_visual() hasn't yet been taught about the new formats.
> But I don't understand Gallium well enough to know when those functions
> get called.

Marek had a patch for that in https://bugs.freedesktop.org/show_bug.cgi?id=95071
I thought it was merged, but it seems not.

-Emil


More information about the mesa-dev mailing list