error C7621: #extension directive must occur before any non-preprocessor token
I get that error message from gstglslstage compiles this shader:
#version 300 es
#ifdef GL_ES
precision highp float;
#endif
#extension GL_OES_EGL_image_external_essl3 : require
uniform vec2 tex_scale0;
uniform vec2 tex_scale1;
uniform vec2 tex_scale2;
uniform float width;
uniform float height;
uniform float poffset_x;
uniform float poffset_y;
uniform samplerExternalOES tex;
layout (location = 0) out vec4 fragColor;
in vec2 v_texcoord;
void main (void) {
vec2 texcoord;
texcoord = v_texcoord;
vec4 t = texture(tex, texcoord * tex_scale0);
fragColor = vec4(t.r, t.g, t.b, t.a);
}