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 693339 - Fix the scroll view fade shader on GLES2
Fix the scroll view fade shader on GLES2
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-07 16:03 UTC by Neil Roberts
Modified: 2013-02-08 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't rely on implicit type conversion in the scroll view shader (1.94 KB, patch)
2013-02-07 16:03 UTC, Neil Roberts
committed Details | Review

Description Neil Roberts 2013-02-07 16:03:04 UTC
See patch
Comment 1 Neil Roberts 2013-02-07 16:03:32 UTC
Created attachment 235421 [details] [review]
Don't rely on implicit type conversion in the scroll view shader

Before version 1.2 of GLSL it would not implicitly convert from int to
float which meant that if you compare a float variable with an integer
constant it will generate a compile error. In particular this means
that on GLES2 (which uses GLSL 1.0) the scroll view shader will not
compile on pedantic compilers, which includes Mesa. This patch just
changes it to use floating point constants.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-07 20:14:29 UTC
Review of attachment 235421 [details] [review]:

We used to have #version 120 in the header, but cogl started emitting that automatically. Are you serious that GLES2 doesn't have 1.20 of GLSL? Sigh.
Comment 3 drago01 2013-02-07 21:20:12 UTC
(In reply to comment #2)
> Review of attachment 235421 [details] [review]:
> 
> We used to have #version 120 in the header, but cogl started emitting that
> automatically. Are you serious that GLES2 doesn't have 1.20 of GLSL? Sigh.

It is a modified GLSL 1.0. Anyway even the NVIDIA compiler on GL warns here so the patch is a nice cleanup regardless of the GLES2 issue.
Comment 4 Neil Roberts 2013-02-08 12:06:01 UTC
Ok, thanks. I've pushed it to master:

http://git.gnome.org/browse/gnome-shell/commit/?id=33f69481f7c