[mutter] cogl/texture-2d-gl: Try to determine format for external textures
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl/texture-2d-gl: Try to determine format for external textures
- Date: Thu, 3 Jan 2019 11:19:41 +0000 (UTC)
commit b329256113e9af9edf148742b70b169f6b29bff0
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Wed Dec 19 10:08:05 2018 +0100
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
cogl/cogl/driver/gl/cogl-texture-2d-gl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
index ba90998ba..ec9ed9e18 100644
--- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -470,7 +470,12 @@ allocate_custom_egl_image_external (CoglTexture2D *tex_2d,
{
CoglTexture *tex = COGL_TEXTURE (tex_2d);
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]