After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661071 - GLES2 Shader does not compile with Clutter 1.8.0 anymore
GLES2 Shader does not compile with Clutter 1.8.0 anymore
Status: RESOLVED NOTABUG
Product: cogl
Classification: Platform
Component: GLES
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: Cogl maintainer(s)
Cogl maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-10-06 11:17 UTC by Damien Lespiau
Modified: 2011-10-28 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Damien Lespiau 2011-10-06 11:17:38 UTC
I wonder if one would consider that as an API break, the fact is that shaders that used to work with earlier version don't anymore. It seems to be because of a change in the vertex shader generated.

For instance, the GLSL shader compilation in clutter-gst fails with:

(lt-test-yuv-upload:2432): Cogl-WARNING **: Failed to link GLSL program:
Varying variable tex_coord is used in fragment shader, but not found in vertex shader.
Comment 1 Damien Lespiau 2011-10-06 12:46:32 UTC
A patch to update the variable names make clutter-gst work again

-#define TEX_COORD "tex_coord"
-#define COLOR_VAR "frag_color"
+#define TEX_COORD "cogl_tex_coord_in[0]"
+#define COLOR_VAR "cogl_color_in"

I guess that one could

#define text_coord cogl_tex_coord_in[0]
and
#define frag_color cogl_color_in

in the GLES2 shader boilerplate to maintain compatibility?
Comment 2 Neil Roberts 2011-10-10 12:43:05 UTC
It seems a shame to keep those old names unless we really have to because they aren't namespaced and could quite easily collide with someone's own names. I was kind of assuming those names weren't officially part of the API so we could get away with changing them?
Comment 3 Damien Lespiau 2011-10-10 14:34:00 UTC
Well, in my case it just means that I need to bump the dependency on Cogl and Clutter to 1.8.0, so not such a big deal. Granted the number of people having GLSL ES shaders with Clutter might not be huge, but code will break for them (maybe we should ask tomeu? or at least make it clear?)
Comment 4 Damien Lespiau 2011-10-28 16:05:45 UTC
Ok, just landed the fix in clutter-gst and depend on Clutter 1.6.0