GNOME Bugzilla – Bug 708007
st-scroll-view-fade: Reduce number of GLSL uniforms and instructions
Last modified: 2013-09-13 07:45:49 UTC
See patch.
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.
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.
Review of attachment 254837 [details] [review]: Yes, this one is correct.
Attachment 254837 [details] pushed as 4095a58 - st-scroll-view-fade: Reduce number of GLSL uniforms and instructions