mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
egl/wayland: select the format based on the interface used
Rather than misleadingly depending on DRI2 for the WL_DRM vs WL_SHM formats, use the wl_drm and wl_shm interface respectively. Fixes:a1727aa75e("egl/wayland: Don't use DRM format codes for SHM") Signed-off-by: Emil Velikov <emil.velikov@collabora.com> (cherry picked from commit6ef0fc400c) Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
This commit is contained in:
parent
da7bde9d9a
commit
e4c4b86f70
1 changed files with 2 additions and 1 deletions
|
|
@ -124,7 +124,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
|||
if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
|
||||
goto cleanup_surf;
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
if (dri2_dpy->wl_drm) {
|
||||
if (conf->RedSize == 5)
|
||||
dri2_surf->format = WL_DRM_FORMAT_RGB565;
|
||||
else if (conf->AlphaSize == 0)
|
||||
|
|
@ -132,6 +132,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
|||
else
|
||||
dri2_surf->format = WL_DRM_FORMAT_ARGB8888;
|
||||
} else {
|
||||
assert(dri2_dpy->wl_shm);
|
||||
if (conf->RedSize == 5)
|
||||
dri2_surf->format = WL_SHM_FORMAT_RGB565;
|
||||
else if (conf->AlphaSize == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue