summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2019-08-09 16:04:03 -0400
committerTim-Philipp Müller <tim@centricular.com>2019-08-12 18:42:01 +0100
commite7f3b3f506ca9e6ad2685caa016c2190453b8ff3 (patch)
tree47763f17cc2f2f75f90e12a00668a6ae3d127391
parent4cd1cf9d48fddaab0bcb57f2eb1aa6fd3c3d9931 (diff)
downloadgstreamer-plugins-base-e7f3b3f506ca9e6ad2685caa016c2190453b8ff3.tar.gz
glcolorconvert: Fix external-oes shader
The #extention must come before 'precision highp float;'. Closes: #650
-rw-r--r--gst-libs/gst/gl/gstglcolorconvert.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
index 644c233e7..e73a3e52c 100644
--- a/gst-libs/gst/gl/gstglcolorconvert.c
+++ b/gst-libs/gst/gl/gstglcolorconvert.c
@@ -1960,6 +1960,10 @@ _create_shader (GstGLColorConvert * convert)
&& info->templ->target != GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
g_string_append (str, glsl_OES_extension_string);
+ g_string_append (str,
+ gst_gl_shader_string_get_highest_precision (convert->context, version,
+ profile));
+
if (info->templ->uniforms)
g_string_append (str, info->templ->uniforms);
@@ -2036,12 +2040,9 @@ _create_shader (GstGLColorConvert * convert)
&version, &profile);
g_free (tmp);
- strings[1] =
- gst_gl_shader_string_get_highest_precision (convert->context, version,
- profile);
- strings[2] = info->frag_prog;
+ strings[1] = info->frag_prog;
if (!(stage = gst_glsl_stage_new_with_strings (convert->context,
- GL_FRAGMENT_SHADER, version, profile, 3, strings))) {
+ GL_FRAGMENT_SHADER, version, profile, 2, strings))) {
GST_ERROR_OBJECT (convert, "Failed to create fragment stage");
g_free (info->frag_prog);
info->frag_prog = NULL;