mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
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:
parent
ca0f94c805
commit
d60415bad5
1 changed files with 9 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue