gallium/dri: fix dri2_from_names

`createImageFromNames` uses fourcc, not dri_image_formats

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8547
Fixes: 433ca3127a ("st/dri: replace format conversion functions with single mapping table")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24597>
(cherry picked from commit c4133a110d)
This commit is contained in:
Julia Tatz 2023-08-09 22:35:56 -04:00 committed by Dylan Baker
parent 8aca433f4a
commit 0f12f5dba6
2 changed files with 3 additions and 3 deletions

View file

@ -5734,7 +5734,7 @@
"description": "gallium/dri: fix dri2_from_names",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "433ca3127a3b94bfe9a513e7c7ce594e09e1359f",
"notes": null

View file

@ -1576,11 +1576,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;