cogl/gles: Use a premul required format for opaque fp16 Cogl formats
The opaque fp16 Cogl format variants need a required format that is already premultiplied whereas the fp16 formats with an alpha channel can be either straight or premult. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3914>
This commit is contained in:
parent
41700d3cc7
commit
d820fe030a
1 changed files with 12 additions and 4 deletions
|
@ -349,7 +349,6 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
||||||
&gltype);
|
&gltype);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COGL_PIXEL_FORMAT_RGBX_FP_16161616:
|
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE:
|
||||||
if (cogl_context_has_feature (context, COGL_FEATURE_ID_TEXTURE_HALF_FLOAT))
|
if (cogl_context_has_feature (context, COGL_FEATURE_ID_TEXTURE_HALF_FLOAT))
|
||||||
|
@ -364,14 +363,23 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case COGL_PIXEL_FORMAT_RGBX_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRX_FP_16161616:
|
case COGL_PIXEL_FORMAT_BGRX_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
|
||||||
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
case COGL_PIXEL_FORMAT_XRGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
|
||||||
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
case COGL_PIXEL_FORMAT_XBGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
required_format =
|
||||||
|
_cogl_driver_pixel_format_to_gl (context,
|
||||||
|
COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE,
|
||||||
|
&glintformat,
|
||||||
|
&glformat,
|
||||||
|
&gltype);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE:
|
||||||
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE:
|
||||||
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616:
|
||||||
case COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE:
|
case COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE:
|
||||||
required_format =
|
required_format =
|
||||||
_cogl_driver_pixel_format_to_gl (context,
|
_cogl_driver_pixel_format_to_gl (context,
|
||||||
|
|
Loading…
Reference in a new issue