[Mesa-dev] [PATCH v2 2/2] i965: expose RGBA visuals only on Android

Emil Velikov emil.l.velikov at gmail.com
Tue Sep 5 13:28:48 UTC 2017


On 5 September 2017 at 08:44, Tapani Pälli <tapani.palli at intel.com> wrote:
> Hi;
>
> How to test these changes? I get exact same visuals on x11 (using glxinfo,
> eglinfo) with or without the patch.
>
Upon second look that cannot happen, yet.

As the masks (see attribMap in src/glx/dri_common.c) are unchecked, we
currently consider RGBA the same as BGRA.
Thus no new config should be added.

Rough call chain is:
loader:
 driver->createNewScreen2(... &driver_configs...); // ultimately
calling intel_screen_make_configs
 ...
 driConvertConfigs(... driver_configs ...);
 -> createDriMode // creates new config
     -> driConfigEqual // first check if there's existing one that matches
          -> scalarEqual // check the scalar values across the two configs


I'm not sure where/how Marek observed the issue, without a
corresponding GLX patch.
GLX should be fixed to honour the masks, thus we'd want this patch as well.

>
> On 07/31/2017 09:46 PM, Emil Velikov wrote:
>>
>> From: Emil Velikov <emil.velikov at collabora.com>
>>
>> As Marek pointed out in earlier commit - exposing RGBA on other
>> platforms introduces ~500 Visuals, which are not tested.
>>
>> v2: Rebase, while keeping loaderPrivate
>>
>> Fixes: 1bf703e4ea5 ("dri_interface,egl,gallium: only expose RGBA visuals
>> on Android")
>> Cc: Tomasz Figa <tfiga at chromium.org>
>> Cc: Chad Versace <chadversary at chromium.org>
>> Cc: Marek Olšák <maraeo at gmail.com>
>> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
>> ---
>>   src/mesa/drivers/dri/i965/intel_screen.c | 23 ++++++++++++++++++++++-
>>   1 file changed, 22 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c
>> b/src/mesa/drivers/dri/i965/intel_screen.c
>> index ced80cb8790..48b412bd06a 100644
>> --- a/src/mesa/drivers/dri/i965/intel_screen.c
>> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
>> @@ -1746,6 +1746,20 @@ intel_supported_msaa_modes(const struct
>> intel_screen  *screen)
>>      }
>>   }
>>   +static int
>> +intel_loader_get_cap(const __DRIscreen *dri_screen, enum dri_loader_cap
>> cap)
>> +{
>> +   if (dri_screen->dri2.loader && dri_screen->dri2.loader->base.version
>> >= 4 &&
>> +       dri_screen->dri2.loader->getCapability)
>> +      return
>> dri_screen->dri2.loader->getCapability(dri_screen->loaderPrivate, cap);
>
>
> getCapability returns unsigned
>
Thanks, will fix.

-Emi


More information about the mesa-dev mailing list