From e7f421f0aed381dde65b891d3d81d37731ab4975 Mon Sep 17 00:00:00 2001 From: Julia Tatz Date: Wed, 9 Aug 2023 22:35:56 -0400 Subject: [PATCH] gallium/dri: fix dri2_from_names `createImageFromNames` uses fourcc, not dri_image_formats Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8547 Fixes: 433ca3127a3 ("st/dri: replace format conversion functions with single mapping table") Reviewed-by: Mike Blumenkrantz Part-of: (cherry picked from commit c4133a110def6a20dbff9ffc4531108475420fcc) --- .pick_status.json | 2 +- src/gallium/frontends/dri/dri2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 322670974ef..08ae62b7ac9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -310,7 +310,7 @@ "description": "gallium/dri: fix dri2_from_names", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "433ca3127a3b94bfe9a513e7c7ce594e09e1359f" }, diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index f45f95b659d..04c65369328 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -1526,11 +1526,11 @@ dri2_validate_usage(__DRIimage *image, unsigned int use) } static __DRIimage * -dri2_from_names(__DRIscreen *screen, int width, int height, int format, +dri2_from_names(__DRIscreen *screen, int width, int height, int fourcc, int *names, int num_names, int *strides, int *offsets, void *loaderPrivate) { - const struct dri2_format_mapping *map = dri2_get_mapping_by_format(format); + const struct dri2_format_mapping *map = dri2_get_mapping_by_fourcc(fourcc); __DRIimage *img; struct winsys_handle whandle;