GNOME Bugzilla – Bug 616748
multiply_fragment_source shader compilation error with Apple GLSL compiler
Last modified: 2010-04-26 14:55:31 UTC
The multiply_fragment_source shader in gst-plugins-gl-0.10.1/gst/gl/effects/gstgleffectssources.c fails to compile with the Apple GLSL compiler. This error is given. wrong operand types no operation '-' exists that takes a left-hand operand of type 'const int' and a right operand of type 'uniform float' (or there is no acceptable conversion) gst-plugins-gl-0.10.1/gst/gl/effects/gstgleffectssources.c 265 const gchar *multiply_fragment_source = 266 "#extension GL_ARB_texture_rectangle : enable\n" 267 "uniform sampler2DRect base;" 268 "uniform sampler2DRect blend;" 269 "uniform float alpha;" 270 "void main () {" 271 " vec4 basecolor = texture2DRect (base, gl_TexCoord[0].st);" 272 " vec4 blendcolor = texture2DRect (blend, gl_TexCoord[0].st);" 273 " gl_FragColor = (1 - alpha) * basecolor + alpha * basecolor * blendcolor;" 274 "}"; The attached patch fixes this error.
Created attachment 159496 [details] [review] gstgleffectssources.c.patch Patch attached.
Thank you for the patch! May I ask you to test the git version too? I just pushed a bunch of changes to the shader sources and don't have a Apple machine, it would be great to have a confirm I didn't break anything. The following fix has been pushed: 239309d multiply: fix a compilation error with Apple compiler
Created attachment 159499 [details] [review] multiply: fix a compilation error with Apple compiler Fix multiply_fragment_source to compile with Apple GLSL compiler.