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 708007 - st-scroll-view-fade: Reduce number of GLSL uniforms and instructions
st-scroll-view-fade: Reduce number of GLSL uniforms and instructions
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: st
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-13 07:38 UTC by drago01
Modified: 2013-09-13 07:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-scroll-view-fade: Reduce number of GLSL uniforms and instructions (3.81 KB, patch)
2013-09-13 07:38 UTC, drago01
none Details | Review
st-scroll-view-fade: Reduce number of GLSL uniforms and instructions (4.43 KB, patch)
2013-09-13 07:44 UTC, drago01
committed Details | Review

Description drago01 2013-09-13 07:38:15 UTC
See patch.
Comment 1 drago01 2013-09-13 07:38:18 UTC
Created attachment 254836 [details] [review]
st-scroll-view-fade: Reduce number of GLSL uniforms and instructions

The vvalue and hvalue uniforms are only used to decide whether we
should do fade the edges or not based on the fade_edges uniform.
The result does not change accross fragments so there is no reason
to recompute it for every fragment (pixel) so just split the edge
fade into two uniforms and compute the "should we fade the edges"
boolean once for every direction (when setting the uniforms) instead
of for every single fragment twice.

This reduces the number of uniforms as well as the the number of instructions
which are limited on older hardware. It should also be more efficent.
Comment 2 drago01 2013-09-13 07:44:10 UTC
Created attachment 254837 [details] [review]
st-scroll-view-fade: Reduce number of GLSL uniforms and instructions

The vvalue and hvalue uniforms are only used to decide whether we
should do fade the edges or not based on the fade_edges uniform.
The result does not change accross fragments so there is no reason
to recompute it for every fragment (pixel) so just split the edge
fade into two uniforms and compute the "should we fade the edges"
boolean once for every direction (when setting the uniforms) instead
of for every single fragment twice.

This reduces the number of uniforms as well as the the number of instructions
which are limited on older hardware. It should also be more efficent.
Comment 3 Giovanni Campagna 2013-09-13 07:45:17 UTC
Review of attachment 254837 [details] [review]:

Yes, this one is correct.
Comment 4 drago01 2013-09-13 07:45:45 UTC
Attachment 254837 [details] pushed as 4095a58 - st-scroll-view-fade: Reduce number of GLSL uniforms and instructions