From: Xavier Claessens Date: Fri, 9 Aug 2019 20:04:03 +0000 (-0400) Subject: glcolorconvert: Fix external-oes shader X-Git-Tag: 1.19.3~511^2~970 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b089ab0656d730a339fd64456a68b2178685d8e;p=platform%2Fupstream%2Fgstreamer.git glcolorconvert: Fix external-oes shader The #extention must come before 'precision highp float;'. Closes: #650 --- diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index 8655651..99b5483 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -2010,6 +2010,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); @@ -2086,12 +2090,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;