[Glamor] [PATCH] Optimize gradient_fs_template shader
Tom Stellard
tom at stellard.net
Thu Jun 13 13:12:19 PDT 2013
On Tue, Jun 11, 2013 at 08:30:45AM +0100, Chris Wilson wrote:
> On Mon, Jun 10, 2013 at 07:11:23PM -0700, Tom Stellard wrote:
> > From: Tom Stellard <thomas.stellard at amd.com>
> >
> > Replace:
> >
> > while(t > 1.0)
> > t = t - 1.0;
> > while(t < 0.0)
> > t = t + 1.0;
> >
> > With:
> >
> > t = fract(t);
> > ---
> >
> > This code is untested since I'm not usre which test suite to use
> > for glamor. Any suggestions?
> >
> > This should improve the performance of any app that uses this shader via glamor.
> > I think the cairo perf test firefox-canvas uses this, but the patch didn't
> > improve perfomance. I may try looking through the cairo micro benchmarks
> > to see if I can find a more specific performance test.
>
> firefox-particles and firefox-talos-svg are the heaviest users of radial
> gradients. firefox-particles has the simpler geometry and drawing code,
> so I would expect it to be the more sensitive test.
> -Chris
Maybe I've overlooked something, but as far as I can tell
neither the firefox-particles or the gradient-demo use the
gradient_radial_fs_template shader, but instead use the
gradient_fs_template, which looks very similar when compiled.
-Tom
>
> --
> Chris Wilson, Intel Open Source Technology Centre
More information about the Glamor
mailing list