1 From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
3 Date: Tue, 19 Apr 2016 19:27:33 +0300
4 Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
5 not work at all in newer versions than 3.3
7 Use the newer texture() function instead. This fixes glimagesink and other
8 things on various Android devices.
10 Upstream-Status: Backport [1.9.1]
12 https://bugzilla.gnome.org/show_bug.cgi?id=765266
14 gst-libs/gst/gl/gstglcolorconvert.c | 7 ++++---
15 1 file changed, 4 insertions(+), 3 deletions(-)
17 diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
18 index c23624f..f472d5d 100644
19 --- a/gst-libs/gst/gl/gstglcolorconvert.c
20 +++ b/gst-libs/gst/gl/gstglcolorconvert.c
21 @@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
24 _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
25 - GstGLTextureTarget to, GstGLAPI gl_api)
26 + GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
28 const gchar *from_str = NULL, *to_str = NULL;
30 @@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
31 if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
32 from_str = "texture2D";
34 - if (gl_api & GST_GL_API_OPENGL3) {
35 + if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
36 + && gl_major >= 3)) {
39 if (to == GST_GL_TEXTURE_TARGET_2D)
40 @@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
42 _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
44 - tmp = _mangle_texture_access (str, from, to, gl_api);
45 + tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
46 tmp2 = _mangle_sampler_type (tmp, from, to);