dri/kopper: Add translations for sRGB formats
There was DRI_IMAGE_FORMAT -> FourCC format translation, but this was unreachable as we only ever called image_format_to_fourcc() on the result of get_dri_format(). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
This commit is contained in:
@@ -186,6 +186,15 @@ get_dri_format(enum pipe_format pf)
|
||||
{
|
||||
int image_format;
|
||||
switch (pf) {
|
||||
case PIPE_FORMAT_BGRA8888_SRGB:
|
||||
image_format = __DRI_IMAGE_FORMAT_SARGB8;
|
||||
break;
|
||||
case PIPE_FORMAT_BGRX8888_SRGB:
|
||||
image_format = __DRI_IMAGE_FORMAT_SXRGB8;
|
||||
break;
|
||||
case PIPE_FORMAT_RGBA8888_SRGB:
|
||||
image_format = __DRI_IMAGE_FORMAT_SABGR8;
|
||||
break;
|
||||
case PIPE_FORMAT_R16G16B16A16_FLOAT:
|
||||
image_format = __DRI_IMAGE_FORMAT_ABGR16161616F;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user