gbm/dri: Fix color format for big endian.
What does this MR do and why?
gbm/dri: Fix color format for big endian.
Using wayland on s390x has all the colors wrong.
Mesa reports using GBM_FORMAT_XRGB8888 but inside the buffer, the
colors are in GBM_FORMAT_BGRX8888 order.
The root cause is that the conversion between __DRI_IMAGE_FORMAT and GBM_FORMAT only consider little endian.
Use the proper PIPE_FORMAT instead, that have the same meaning on both endianess.
Also adds the BGRX8888 variant, that are the default on big endian.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Edited by Jocelyn Falempe