]> git.cworth.org Git - cworth.org/blob - src/glucose/i965/first_look.mdwn
a02187bcfb9fe2ff66207f5ab11b043b4c81bb54
[cworth.org] / src / glucose / i965 / first_look.mdwn
1 [[meta title="A first look at Glucose on the i965"]]
2
3 [[tag xorg exa performance i965]]
4
5 As readers of my blog know, I've been working on improving the Intel
6 965 driver within the [EXA](http://cworth.org/tag/exa/) acceleration
7 architecture of the X server. Meanwhile, there's an alternate
8 acceleration architecture originally
9 [announced](http://lists.freedesktop.org/archives/xorg/2006-August/017527.html)
10 by Zack Rusin in August 2006 called Glucose. The idea with Glucose is
11 to accelerate X rendering operations by using OpenGL.
12
13 Recently there's been a fair amount of activity in the various Glucose
14 branches, so I thought I'd take a look to see how well it's
15 working. This was quite convenient for me as the current Glucose work
16 is focused only on Intel cards. Since Glucose isn't quite ready for
17 prime-time yet, it does require fetching various non-master branches
18 of several git repositories. It's not always obvious which branches to
19 take, so José Fonseca was kind enough to writeup some [Glucose build
20 instructions](http://www.freedesktop.org/wiki/Software/Glucose).
21
22 I've followed those instructions and run a benchmark comparing Glucose
23 and EXA. The benchmark I chose is the expedite application that comes
24 with evas, (thanks to the people that kindly pointed out this newer
25 benchmark to me after my recent
26 [explorations](http://cworth.org/exa/i965/render_bench/) with the
27 older evas benchmarks). To get expedite you'll need the e17/libs/evas and
28 e17/apps/expedite modules from [enlightenment
29 CVS](http://enlightenment.org/p.php?p=download/cvs&l=en).
30
31 Expedite is a nice benchmark in that it separates things like image
32 blending and text rendering into separate tests, (unlike the older
33 evas benchmark). It's also nice that evas includes many backends which
34 can be interesting for comparison. But I won't be looking at anything
35 but its XRender-based backends here---and it looks like evas' cairo
36 and OpenGL backends are not currently functional. They are disabled by
37 default, and when I enabled them I ran into compilation problems, (I
38 suspect neglect and bit rot).
39
40 So here are the results I got for three acceleration architectures:
41
42   1. XAA with the XAANoOffscreenPixmaps option, (this is an
43      all-software implementation for reference).
44
45   2. Glucose---the new thing we're looking at here.
46
47   3. EXA, (as available in the various glucose branches---so without
48      things like my recent glyph-pixmaps work).
49
50 The results are all normalized to the performance of our baseline,
51 XAA. And larger numbers are better.
52
53 [[img expedite.png]]
54
55 The [raw
56 data](http://cworth.org/glucose/i965/first_look/expedite.data) is also
57 available for anyone with particular interest, (it has non-normalized
58 values as well as results from evas' software backends using both SDL
59 and X11 for image transport).
60
61 The quick conclusion is that, so far, I'm not getting any benefit from
62 running Glucose as compared to just running an all-software
63 implementation, (see how all Glucose and XAA bars are basically
64 identical). I might still not have everything compiled or running
65 correctly yet, but I'm quite sure that at least _some_ Glucose code
66 was active during my Glucose run. That's because a glucose module
67 failed to find a required symbol and crashed during the "Polygon
68 Blend" test, (which is why it doesn't have a bar in the chart, nor is
69 there a number for the overall "EVAS SPEED" result for Glucose).
70
71 Meanwhile, it's also clear that EXA is going far too slow for text
72 operations. This isn't any surprise since I've documented problems
73 with slow text rendering on the i965 several times before. However,
74 I've never before measured text rendering that's _quite_ this
75 slow. I'm seeing speeds of only about 30k glyphs/sec. with EXA on
76 these branches, while my previous testing always showed about 100k
77 glyphs/sec. I suspect that there's been some regression somewhere in
78 the X server or the Intel driver, (and likely unrelated to anything
79 about Glucose---Keith has reported similar slowness with builds from
80 the master branches).
81
82 Another interesting thing to look at is the difference caused by the
83 "few" variants of the "Rect Blend" and "Rect Solid" tests. When going
84 from the non-few to the "few" variants, both Glucose and EXA slow down
85 significantly. I'm quite happy to see these tests in this benchmark
86 since it is often the setup overhead that kills you when trying to
87 accelerate a small number of operations, (and applications have a
88 tendency to want to do that very often). Many synthetic benchmarks are
89 extremely non-useful in hiding this overhead by doing huge batches of
90 operations.
91
92 Meanwhile, I'm still working on fixing the horribly slow compositing
93 problems in the i965 driver that are keeping text so slow. Keith
94 Packard and Eric Anholt are helping me debug my code, and hopefully
95 we'll soon have something to show which runs at a reasonable speed.
96