]> git.cworth.org Git - cworth.org/blob - src/glucose/i965/first_look.mdwn
c1c54ab0fc2fc87d389ca60d7daf90be93bbf5e9
[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 m recent
26 [explorations](http://cworth.org/exa/i965/render_bench/) with the
27 older render_bench). 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
33 render_bench). It's also nice that evas includes many backends which
34 can be interesting for comparison, (though I won't be looking at
35 anything but its XRender-based backends here---and it looks like evas'
36 cairo and OpenGL backends are not currently functional).
37
38 So here are the results I got for three acceleration architectures:
39
40   1. XAA with the XAANoOffscreenPixmaps option, (this is an
41      all-software implementation for reference).
42
43   2. Glucose---the new thing we're looking at here.
44
45   3. EXA, (as available in the various glucose branches---so without
46      things like my recent glyph-pixmaps work).
47
48 The results are all normalized to the performance of our baseline,
49 XAA. And larger numbers are better.
50
51 [[img expedite.png]]
52
53 The [raw
54 data](http://cworth.org/glucose/i965/first_look/expedite.data) is also
55 available for anyone with particular interest, (it has non-normalized
56 values as well as results from evas' software backends using both SDL
57 and X11 for image transport).
58
59 The quick conclusion is that, so far, I'm not getting any benefit from
60 running Glucose as compared to just running an all-software
61 implementation, (see how all Glucose and XAA bars are basically
62 identical). I might still not have everything compiled or running
63 correctly yet, but I'm quite sure that at least _some_ Glucose code
64 was active during my Glucose run. That's because a glucose module
65 failed to find a required symbol and crashed during the "Polygon
66 Blend" test, (which is why it doesn't have a bar in the chart, nor is
67 there a number for the overall "EVAS SPEED" result for Glucose).
68
69 Meanwhile, it's also clear that EXA is going far too slow for text
70 operations. This isn't any surprise since I've documented problems
71 with slow text rendering on the i965 several times before. However,
72 I've never before measured text rendering that's _quite_ this
73 slow. I'm seeing speeds of only about 30k glyphs/sec. with EXA on
74 these branches, while my previous testing always showed about 100k
75 glyphs/sec. I suspect that there's been some regression somewhere in
76 the X server or the Intel driver, (and likely unrelated to anything
77 about Glucose---Keith has reported similar slowness with builds from
78 the master branches).
79
80 Another interesting thing to look at is the difference caused by the
81 "few" variants of the "Rect Blend" and "Rect Solid" tests. When going
82 from the non-few to the "few" variants, both Glucose and EXA slow down
83 significantly. I'm quite happy to see these tests in this benchmark
84 since it is often the setup overhead that kills you when trying to
85 accelerate a small number of operations, (and applications have a
86 tendency to want to do that very often). Many synthetic benchmarks are
87 extremely non-useful in hiding this overhead by doing huge batches of
88 operations.
89
90 Meanwhile, I'm still working on fixing the horribly slow compositing
91 problems in the i965 driver that are keeping text so slow. Keith
92 Packard and Eric Anholt are helping me debug my code, and hopefully
93 we'll soon have something to show which runs at a reasonable speed.
94