blob: f9915d67e541cfcdd16bf2ddb0f84709b8907fe5 [file] [log] [blame]
Brianb87c1ab2008-01-24 09:15:31 -07001<HTML>
2
3<TITLE>Cell Driver</TITLE>
4
5<link rel="stylesheet" type="text/css" href="mesa.css"></head>
6
7<BODY>
8
9<H1>Mesa Cell Driver</H1>
10
11<p>
12The Mesa
13<a href="http://en.wikipedia.org/wiki/Cell_%28microprocessor%29" target="_parent">Cell</a>
14driver is part of the
15<a href="http://www.tungstengraphics.com/wiki/index.php/Gallium3D" target="_parent">Gallium3D</a>
16architecture.
17</p>
18
19<p>
20<a href="http://www.tungstengraphics.com/" target="_parent">Tungsten Graphics</a>
21is leading the project.
22Two phases are planned.
23First, to implement the framework for parallel rasterization using the Cell
24SPEs, including texture mapping.
25Second, to implement a full-featured OpenGL driver with support for GLSL, etc.
26</p>
27
28
29<H2>Source Code</H2>
30
31<p>
32The Cell driver source code is on the <code>gallium-0.1</code> branch of the
33git repository.
Brian99a12602008-02-28 09:48:26 -070034After you've cloned the repository, check out the branch with:
35</p>
36<pre>
37 git-checkout -b gallium-0.1 origin/gallium-0.1
38</pre>
39<p>
Brianb87c1ab2008-01-24 09:15:31 -070040To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0).
41To use the driver you'll need a Cell system, such as a PS3 running Linux,
42or the Cell Simulator (untested, though).
43</p>
44
45<p>
Briancabcee92008-02-27 18:01:37 -070046If using Cell SDK 3.0, first edit configs/linux-cell and add
47<code>-DSPU_MAIN_PARAM_LONG_LONG</code> to the SPU_CFLAGS.
48</p>
49
50<p>
Brianb87c1ab2008-01-24 09:15:31 -070051To compile the code, run <code>make linux-cell</code>.
52</p>
53
54<p>
55To use the library, make sure <code>LD_LIBRARY_PATH</code> points the Mesa/lib/
56directory that contains <code>libGL.so</code>.
57</p>
58
59<p>
60Verify that the Cell driver is being used by running <code>glxinfo</code>
61and looking for:
62<pre>
63 OpenGL renderer string: Gallium 0.1, Cell on Xlib
64</pre>
65
66
Briancef71f52008-02-27 18:13:21 -070067<H2>Driver Implementation Summary</H2>
68
69<p>
70Rasterization is parallelized across the SPUs in a tiled-based manner.
71Batches of transformed triangles are sent to the SPUs (actually, pulled by from
72main memory by the SPUs).
73Each SPU loops over a set of 32x32-pixel screen tiles, rendering the triangles
74into each tile.
75Because of the limited SPU memory, framebuffer tiles are paged in/out of
76SPU local store as needed.
77Similarly, textures are tiled and brought into local store as needed.
78</p>
79
80<p>
81More recently, vertex transformation has been parallelized across the SPUs
82as well.
83</p>
84
85
Brianb87c1ab2008-01-24 09:15:31 -070086<H2>Status</H2>
87
88<p>
Briancef71f52008-02-27 18:13:21 -070089As of February 2008 the driver supports smooth/flat shaded triangle rendering
90with Z testing and simple texture mapping.
Brianb87c1ab2008-01-24 09:15:31 -070091Simple demos like gears run successfully.
Briancef71f52008-02-27 18:13:21 -070092To test texture mapping, try progs/demos/texcyl (press right mouse button for
93rendering options).
Brianb87c1ab2008-01-24 09:15:31 -070094</p>
95
96
97<H2>Contributing</H2>
98
99<p>
100If you're interested in contributing to the effort, familiarize yourself
101with the code, join the <a href="lists.html">mesa3d-dev mailing list</a>,
102and describe what you'd like to do.
103</p>
104
105
106</BODY>
107</HTML>