summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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 @@
1From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
2From: Matthew Waters <matthew@centricular.com>
3Date: Thu, 31 Mar 2016 19:25:32 +1100
4Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
5
6There are some cases where it's needed for binding in/out variables in shaders.
7e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
8the shader source so we have to bind them ourselves.
9
10Upstream-Status: Backport [1.9.1]
11---
12 gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
13 gst-libs/gst/gl/gstglshader.c | 20 ++++++++++++++++++++
14 gst-libs/gst/gl/gstglshader.h | 1 +
15 3 files changed, 31 insertions(+)
16
17diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
18index 817e479..6d828db 100644
19--- a/gst-libs/gst/gl/glprototypes/shaders.h
20+++ b/gst-libs/gst/gl/glprototypes/shaders.h
21@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
22 GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
23 (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
24 GST_GL_EXT_END ()
25+
26+GST_GL_EXT_BEGIN (bind_frag_data,
27+ GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
28+ 3, 0,
29+ 255, 255,
30+ "\0",
31+ "\0")
32+GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
33+ (GLuint program, GLuint index, const GLchar * name))
34+GST_GL_EXT_END ()
35diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
36index 9d96784..9f09236 100644
37--- a/gst-libs/gst/gl/gstglshader.c
38+++ b/gst-libs/gst/gl/gstglshader.c
39@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
40
41 gl->BindAttribLocation (priv->program_handle, index, name);
42 }
43+
44+void
45+gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
46+ guint index, const gchar * name)
47+{
48+ GstGLShaderPrivate *priv;
49+ GstGLFuncs *gl;
50+
51+ g_return_if_fail (shader != NULL);
52+ if (!_ensure_program (shader))
53+ g_return_if_fail (shader->priv->program_handle);
54+ priv = shader->priv;
55+ gl = shader->context->gl_vtable;
56+ g_return_if_fail (gl->BindFragDataLocation);
57+
58+ GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
59+ (int) priv->program_handle, name, index);
60+
61+ gl->BindFragDataLocation (priv->program_handle, index, name);
62+}
63diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
64index 21410e2..2200b89 100644
65--- a/gst-libs/gst/gl/gstglshader.h
66+++ b/gst-libs/gst/gl/gstglshader.h
67@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
68
69 gint gst_gl_shader_get_attribute_location (GstGLShader *shader, const gchar *name);
70 void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
71+void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
72
73 G_END_DECLS
74
75--
761.9.1
77
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 = " \
15 file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \ 15 file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
16 file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \ 16 file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
17 file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \ 17 file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
18 file://0005-glshader-add-glBindFragDataLocation.patch \
18" 19"
19SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8" 20SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
20SRC_URI[sha256sum] = "d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97" 21SRC_URI[sha256sum] = "d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"