glcolorconvert: Fix external-oes shader

The #extention must come before 'precision highp float;'.

Closes: #650
This commit is contained in:
Xavier Claessens 2019-08-09 16:04:03 -04:00 committed by Xavier Claessens
parent 8936886192
commit 1b089ab065

View file

@ -2010,6 +2010,10 @@ _create_shader (GstGLColorConvert * convert)
&& info->templ->target != GST_GL_TEXTURE_TARGET_EXTERNAL_OES) && info->templ->target != GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
g_string_append (str, glsl_OES_extension_string); 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) if (info->templ->uniforms)
g_string_append (str, info->templ->uniforms); g_string_append (str, info->templ->uniforms);
@ -2086,12 +2090,9 @@ _create_shader (GstGLColorConvert * convert)
&version, &profile); &version, &profile);
g_free (tmp); g_free (tmp);
strings[1] = strings[1] = info->frag_prog;
gst_gl_shader_string_get_highest_precision (convert->context, version,
profile);
strings[2] = info->frag_prog;
if (!(stage = gst_glsl_stage_new_with_strings (convert->context, 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"); GST_ERROR_OBJECT (convert, "Failed to create fragment stage");
g_free (info->frag_prog); g_free (info->frag_prog);
info->frag_prog = NULL; info->frag_prog = NULL;