mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 03:50:47 -05:00
renderer-native: Fall back to ARGB if XRGB is not supported
This fixes mutter failing to start on some ARM/Mali boards. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2354 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2519>
This commit is contained in:
parent
48f7eacdd7
commit
7c8ffe7efe
@ -416,12 +416,28 @@ meta_renderer_native_choose_egl_config (CoglDisplay *cogl_display,
|
||||
switch (renderer_gpu_data->mode)
|
||||
{
|
||||
case META_RENDERER_NATIVE_MODE_GBM:
|
||||
return choose_egl_config_from_gbm_format (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
GBM_FORMAT_XRGB8888,
|
||||
out_config,
|
||||
error);
|
||||
{
|
||||
static const uint32_t formats[] = {
|
||||
GBM_FORMAT_XRGB8888,
|
||||
GBM_FORMAT_ARGB8888,
|
||||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (formats); i++)
|
||||
{
|
||||
g_clear_error (error);
|
||||
|
||||
if (choose_egl_config_from_gbm_format (egl,
|
||||
egl_display,
|
||||
attributes,
|
||||
formats[i],
|
||||
out_config,
|
||||
error))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
case META_RENDERER_NATIVE_MODE_SURFACELESS:
|
||||
*out_config = EGL_NO_CONFIG_KHR;
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user