mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 10:48:05 +02:00
backend-drm: fix confused fallback format handling
This seems to think formats needs to be NULL terminated, but it doesn't
and gl_renderer_get_egl_config asserts that all formats_count elements
are not NULL.
This happens when EGL_KHR_no_config_context is not supported.
Signed-off-by: Ray Smith <rsmith@brightsign.biz>
(cherry picked from commit 885c616589)
This commit is contained in:
parent
f41ed41575
commit
17a9834892
1 changed files with 2 additions and 3 deletions
|
|
@ -82,18 +82,17 @@ drm_backend_create_gl_renderer(struct drm_backend *b)
|
|||
const struct pixel_format_info *format[3] = {
|
||||
b->format,
|
||||
fallback_format_for(b->format),
|
||||
NULL,
|
||||
};
|
||||
struct gl_renderer_display_options options = {
|
||||
.egl_platform = EGL_PLATFORM_GBM_KHR,
|
||||
.egl_native_display = b->gbm,
|
||||
.egl_surface_type = EGL_WINDOW_BIT,
|
||||
.formats = format,
|
||||
.formats_count = 2,
|
||||
.formats_count = 1,
|
||||
};
|
||||
|
||||
if (format[1])
|
||||
options.formats_count = 3;
|
||||
options.formats_count = 2;
|
||||
|
||||
return weston_compositor_init_renderer(b->compositor,
|
||||
WESTON_RENDERER_GL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue