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 616748 - multiply_fragment_source shader compilation error with Apple GLSL compiler
multiply_fragment_source shader compilation error with Apple GLSL compiler
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
0.10.1
Other Mac OS
: Normal normal
: 0.10.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-25 03:46 UTC by Vinson Lee
Modified: 2010-04-26 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstgleffectssources.c.patch (556 bytes, patch)
2010-04-25 03:47 UTC, Vinson Lee
committed Details | Review
multiply: fix a compilation error with Apple compiler (1.08 KB, patch)
2010-04-25 08:23 UTC, Filippo Argiolas
committed Details | Review

Description Vinson Lee 2010-04-25 03:46:52 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.
Comment 1 Vinson Lee 2010-04-25 03:47:57 UTC
Created attachment 159496 [details] [review]
gstgleffectssources.c.patch

Patch attached.
Comment 2 Filippo Argiolas 2010-04-25 08:23:13 UTC
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
Comment 3 Filippo Argiolas 2010-04-25 08:23:21 UTC
Created attachment 159499 [details] [review]
multiply: fix a compilation error with Apple compiler

Fix multiply_fragment_source to compile with Apple GLSL compiler.