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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31484>
(cherry picked from commit 842a7b2821)
This commit is contained in:
Eric Engestrom 2024-10-02 14:59:37 +02:00 committed by Eric Engestrom
parent 8add14f818
commit 232aef4eca
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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);
}