From 2dec0cbe01c158f79cfb89b216ac230da7e87533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 19 Jun 2024 11:24:18 +0200 Subject: [PATCH] egl/dri: Use packed pipe_format This is consistent with __DRI_IMAGE_FORMAT_ARGB8888 and the rest of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709 . This makes no difference with little endian, it does with big endian though. Fixes: dcbf61f5dfe3 ("egl/dri: Use pipe_format instead of DRI_IMAGE_FORMAT") Part-of: --- src/egl/drivers/dri2/egl_dri2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 77658fb2a1b..a5f3d295092 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -2447,7 +2447,7 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, switch (attrs.DRMBufferFormatMESA) { case EGL_DRM_BUFFER_FORMAT_ARGB32_MESA: - format = PIPE_FORMAT_B8G8R8A8_UNORM; + format = PIPE_FORMAT_BGRA8888_UNORM; pitch = attrs.DRMBufferStrideMESA; break; default: @@ -2900,7 +2900,7 @@ dri2_create_drm_image_mesa(_EGLDisplay *disp, const EGLint *attr_list) switch (attrs.DRMBufferFormatMESA) { case EGL_DRM_BUFFER_FORMAT_ARGB32_MESA: - format = PIPE_FORMAT_B8G8R8A8_UNORM; + format = PIPE_FORMAT_BGRA8888_UNORM; break; default: _eglError(EGL_BAD_PARAMETER, __func__);