[Glamor] Trapezoid performance regression with the shader enabled.
He Junyan
junyan.he at linux.intel.com
Sun Aug 5 23:10:04 PDT 2012
Hi Zhigang:
The trapezoid generating speed of the shader is relatively slow when the
trapezoid area is big. We need to fallback to pixman
when the trapezoid's width and height is bigger than 300 pixels to avoid
the regression of the benchmark you referred.
I think the shader’s advantage is that it can calculate multi-pixels
concurrently and avoid uploading.
Pixman’s manner is based on scan line, the edge of the trapezoid need to
consider anti-alias and pixman’s rasterization need to do
some jobs here, but inside the trapezoid, it use memset to assign value
very effectively.
If use shader manner, it still needs to expand the vertex shader and use
the fragment shader to caculate every pixel. So for
large area of trapezoid, the pixman's speed seems faster.
The benchmarks which have regression use the big trapezoid, we can add a
workaround here to fallback to CPU when
the trapezoid is big to avoid the regression. The result on my IVB after
workaround is:
grads-heat-map 1.201 ------------> 0.698
firefox-fishbowl 35.027 ------------> 20.308
firefox-asteroids 6.379 ------------> 5.464
firefox-fishtank 28.373 ------------> 21.747
firefox-planet-gnome 7.043 ------------> 6.694
evolution 1.910 ------------> 2.047
firefox-canvas-alpha 26.458 ------------> 22.258
firefox-canvas 32.026 ------------> 27.788
firefox-talos-svg 11.758 ------------> 11.130
gnome-system-monitor 1.387 ------------> 1.761
swfdec-giant-steps 1.626 ------------> 1.579
firefox-paintball 14.353 ------------> 15.477
> Hi Junyan,
>
> After workaround the glsl-like problem, I can get correct rendering with
> trapezoid shader enabled.
>
> Then I measured the performance and found that it does accelerate some
> cases significantly, but
>
> also bring some major performance regressions, here is a summary, please
> check it out.
>
> old: cairo-trace-glamor
>
> new: cairo-trace-glamor-trapezoid
>
> Speedups
>
> ========
>
> xlib grads-heat-map 1241.46 (1243.12 0.82%) -> 593.86
> (593.89 12.62%): 2.09x speedup
>
> xlib firefox-fishbowl 35292.75 (35378.87 0.53%) -> 25675.22
> (25710.04 0.80%): 1.37x speedup
>
> xlib firefox-asteroids 6902.64 (7127.80 1.73%) -> 5518.59
> (5843.95 2.74%): 1.25x speedup
>
> xlib firefox-fishtank 33430.00 (33504.70 0.15%) -> 28612.69
> (28622.39 0.05%): 1.17x speedup
>
> xlib firefox-planet-gnome 7187.17 (7188.44 0.46%) -> 6544.22
> (6555.78 0.53%): 1.10x speedup
>
> Slowdowns
>
> =========
>
> xlib evolution 1769.50 (1774.23 0.13%) -> 1877.39
> (1891.87 4.37%): 1.06x slowdown
>
> xlib firefox-canvas-alpha 29717.59 (29761.29 0.19%) -> 32037.14
> (32108.83 0.42%): 1.08x slowdown
>
> xlib firefox-canvas 42736.86 (43217.24 1.21%) -> 46611.94
> (46761.75 0.43%): 1.09x slowdown
>
> xlib firefox-talos-svg 13468.38 (13653.09 0.65%) -> 15275.94
> (15280.97 0.11%): 1.13x slowdown
>
> xlib gnome-system-monitor 1408.31 (1417.22 0.87%) -> 1839.00
> (1863.20 0.69%): 1.31x slowdown
>
> xlib swfdec-giant-steps 1733.63 (1751.49 0.84%) -> 2280.65
> (2284.43 9.88%): 1.32x slowdown
>
> xlib firefox-paintball 18133.06 (18139.63 0.06%) -> 32112.83
> (32125.89 0.04%): 1.77x slowdown
>
> As we discussed this afternoon, I’d like to release the version 0.5 by
> the end of next week. I hope we can
>
> fix the regression before that time.
>
> Thanks.
>
>
>
> _______________________________________________
> Glamor mailing list
> Glamor at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/glamor
>
More information about the Glamor
mailing list