summaryrefslogtreecommitdiff
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorYuqing Zhu <carol.zhu@nxp.com>2016-07-04 13:46:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-20 10:24:50 +0100
commit2ddbc4fac1d5e84428c503b48e5015ac506a962f (patch)
tree0d68c7a740df47ea0148fae7847a286fec3552dd /meta/recipes-multimedia
parentbf58344101de5cbdfb54534b028aad2112863033 (diff)
downloadopenembedded-core-2ddbc4fac1d5e84428c503b48e5015ac506a962f.tar.gz
openembedded-core-2ddbc4fac1d5e84428c503b48e5015ac506a962f.tar.bz2
openembedded-core-2ddbc4fac1d5e84428c503b48e5015ac506a962f.zip
gstreamer1.0-plugins-bad: Add glBindFragDataLocation in glshader
There are some cases where it's needed for binding in/out variables in shaders. Signed-off-by: Yuqing Zhu <carol.zhu@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-multimedia')
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch77
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb1
2 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
new file mode 100755
index 0000000000..57e9d1a46e
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
@@ -0,0 +1,77 @@
+From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 31 Mar 2016 19:25:32 +1100
+Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
+
+There are some cases where it's needed for binding in/out variables in shaders.
+e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
+the shader source so we have to bind them ourselves.
+
+Upstream-Status: Backport [1.9.1]
+---
+ gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
+ gst-libs/gst/gl/gstglshader.c | 20 ++++++++++++++++++++
+ gst-libs/gst/gl/gstglshader.h | 1 +
+ 3 files changed, 31 insertions(+)
+
+diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
+index 817e479..6d828db 100644
+--- a/gst-libs/gst/gl/glprototypes/shaders.h
++++ b/gst-libs/gst/gl/glprototypes/shaders.h
+@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
+ GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
+ (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
+ GST_GL_EXT_END ()
++
++GST_GL_EXT_BEGIN (bind_frag_data,
++ GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
++ 3, 0,
++ 255, 255,
++ "\0",
++ "\0")
++GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
++ (GLuint program, GLuint index, const GLchar * name))
++GST_GL_EXT_END ()
+diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
+index 9d96784..9f09236 100644
+--- a/gst-libs/gst/gl/gstglshader.c
++++ b/gst-libs/gst/gl/gstglshader.c
+@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
+
+ gl->BindAttribLocation (priv->program_handle, index, name);
+ }
++
++void
++gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
++ guint index, const gchar * name)
++{
++ GstGLShaderPrivate *priv;
++ GstGLFuncs *gl;
++
++ g_return_if_fail (shader != NULL);
++ if (!_ensure_program (shader))
++ g_return_if_fail (shader->priv->program_handle);
++ priv = shader->priv;
++ gl = shader->context->gl_vtable;
++ g_return_if_fail (gl->BindFragDataLocation);
++
++ GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
++ (int) priv->program_handle, name, index);
++
++ gl->BindFragDataLocation (priv->program_handle, index, name);
++}
+diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
+index 21410e2..2200b89 100644
+--- a/gst-libs/gst/gl/gstglshader.h
++++ b/gst-libs/gst/gl/gstglshader.h
+@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
+
+ gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name);
+ void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
++void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
+
+ G_END_DECLS
+
+--
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
index 7f6b918e29..825d100a11 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
+ file://0005-glshader-add-glBindFragDataLocation.patch \
"
SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
SRC_URI[sha256sum] = "d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"