1
0
mirror of https://github.com/brl/mutter.git synced 2025-06-14 01:09:30 +00:00

cogl/texture-2d-gl: Try to determine format for external textures

Don't just set the internal format to the dummy format "any", as that causes
code intended to be unreachable code to be reached. It's not possible to
actually know the internal format of an external texture, however, so it might
not actually correspond to the real format.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
This commit is contained in:
Jonas Ådahl
2018-12-19 10:08:05 +01:00
committed by Georges Basile Stavracas Neto
parent 177d0c2d63
commit b329256113

@ -470,7 +470,12 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
{ {
CoglTexture *tex = COGL_TEXTURE (tex_2d); CoglTexture *tex = COGL_TEXTURE (tex_2d);
CoglContext *ctx = tex->context; CoglContext *ctx = tex->context;
CoglPixelFormat internal_format = loader->src.egl_image_external.format; CoglPixelFormat external_format;
CoglPixelFormat internal_format;
external_format = loader->src.egl_image_external.format;
internal_format = _cogl_texture_determine_internal_format (tex,
external_format);
_cogl_gl_util_clear_gl_errors (ctx); _cogl_gl_util_clear_gl_errors (ctx);