DRI2 gallium frontend is using bad format type
This is the line with the bug https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/dri/dri2.c#L1023
Instead of dri2_get_mapping_by_format(format)
the dri2_get_mapping_by_fourcc(format)
must be used according to the DRI specification which says that DRM, but not DRI formats must be used:
/** * Unlike createImageFromName _DRI_IMAGE_FORMAT is not used but instead * DRM_FORMAT*, and strides are in bytes not pixels. Stride is * also per block and not per pixel (for non-RGB, see gallium blocks). * * \since 5 */
__DRIimage *(*createImageFromNames)(__DRIscreen *screen, int width, int height, int fourcc, int *names, int num_names, int *strides, int *offsets, void *loaderPrivate);
Edited by Mike Gorchak