From 232aef4eca889af45ca3b478a7ee7df15c79af37 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 2 Oct 2024 14:59:37 +0200 Subject: [PATCH] egl: fix dri2_from_names() call The offset argument is `int *offsets`. !31406 pointed this out and I checked for other instances of the same bug. Cc: mesa-stable Part-of: (cherry picked from commit 842a7b2821e21b5869160025b3efd85626e87578) --- .pick_status.json | 2 +- src/egl/drivers/dri2/egl_dri2.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 89bb9cc3b56..964f6fa76b2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -114,7 +114,7 @@ "description": "egl: fix dri2_from_names() call", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 5857acbcdf3..10e6ce5b581 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -2417,9 +2417,10 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, return NULL; } + int offset = 0; dri_image = dri2_dpy->image->createImageFromNames( dri2_dpy->dri_screen_render_gpu, attrs.Width, attrs.Height, fourcc, - (int *) &name, 1, (int *) &pitch, 0, NULL); + (int *) &name, 1, (int *) &pitch, &offset, NULL); return dri2_create_image_from_dri(disp, dri_image); }