mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
renderer-native: Fall back to non-modifier GBM surfaces
If we attempt GBM surface allocation with a set of modifiers but the
allocation fails, fall back to non-modifier allocations. This fixes
startup on Pineview-based Atom systems, where KMS provides us a set of
modifiers but the GBM implementation doesn't support modifier use.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/84
(cherry picked from commit e6109cfc22
)
This commit is contained in:
parent
de7d7bbf3d
commit
1851fa2bd0
@ -1996,7 +1996,7 @@ meta_renderer_native_create_surface_gbm (CoglOnscreen *onscreen,
|
|||||||
CoglRenderer *cogl_renderer = cogl_display->renderer;
|
CoglRenderer *cogl_renderer = cogl_display->renderer;
|
||||||
CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
|
CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
|
||||||
MetaRendererNativeGpuData *renderer_gpu_data = cogl_renderer_egl->platform;
|
MetaRendererNativeGpuData *renderer_gpu_data = cogl_renderer_egl->platform;
|
||||||
struct gbm_surface *new_gbm_surface;
|
struct gbm_surface *new_gbm_surface = NULL;
|
||||||
EGLNativeWindowType egl_native_window;
|
EGLNativeWindowType egl_native_window;
|
||||||
EGLSurface new_egl_surface;
|
EGLSurface new_egl_surface;
|
||||||
uint32_t format = GBM_FORMAT_XRGB8888;
|
uint32_t format = GBM_FORMAT_XRGB8888;
|
||||||
@ -2017,7 +2017,8 @@ meta_renderer_native_create_surface_gbm (CoglOnscreen *onscreen,
|
|||||||
modifiers->len);
|
modifiers->len);
|
||||||
g_array_free (modifiers, TRUE);
|
g_array_free (modifiers, TRUE);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (!new_gbm_surface)
|
||||||
{
|
{
|
||||||
uint32_t flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
|
uint32_t flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user