1 LLVMPIPE -- a fork of softpipe that employs LLVM for code generation.
9 - the whole fragment pipeline is code generated in a single function
15 - texture sampling (not all state/formats are supported)
17 - fragment shader TGSI translation
18 - same level of support as the TGSI SSE2 exec machine, with the exception
19 we don't fallback to TGSI interpretation when an unsupported opcode is
20 found, but just ignore it
22 - input interpolation also code generated
26 - blend (including logic ops)
27 - both in SoA and AoS layouts, but only the former used for now
30 - intermediates can be vectors of floats, ubytes, fixed point, etc, and of
32 - not all operations are implemented for these types yet though
34 Most mesa/progs/demos/* work.
36 To do (probably by this order):
38 - code generate stipple and stencil testing
40 - translate the remaining bits of texture sampling state
42 - translate TGSI control flow instructions, and all other remaining opcodes
44 - integrate with the draw module for VS code generation
46 - code generate the triangle setup and rasterization
52 - A x86 or amd64 processor. 64bit mode is preferred.
54 Support for sse2 is strongly encouraged. Support for ssse3, and sse4.1 will
55 yield the most efficient code. The less features the CPU has the more
56 likely is that you ran into underperforming, buggy, or incomplete code.
58 See /proc/cpuinfo to know what your CPU supports.
62 For Linux, on a recent Debian based distribution do:
64 aptitude install llvm-dev
66 For Windows download pre-built MSVC 9.0 or MinGW binaries from
67 http://people.freedesktop.org/~jrfonseca/llvm/ and set the LLVM environment
68 variable to the extracted path.
72 - udis86, http://udis86.sourceforge.net/ (optional):
74 git clone git://udis86.git.sourceforge.net/gitroot/udis86/udis86
77 ./configure --with-pic
85 To build everything on Linux invoke scons as:
87 scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=xlib dri=false
89 Alternatively, you can build it with GNU make, if you prefer, by invoking it as
93 but the rest of these instructions assume that scons is used.
95 For windows is everything the except except the winsys:
97 scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=gdi dri=false
102 On Linux, building will create a drop-in alternative for libGL.so. To use it
103 set the environment variables:
105 export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/lib:$LD_LIBRARY_PATH
109 export LD_LIBRARY_PATH=$PWD/build/linux-x86-debug/lib:$LD_LIBRARY_PATH
111 For performance evaluation pass debug=no to scons, and use the corresponding
112 lib directory without the "-debug" suffix.
114 On Windows, building will create a drop-in alternative for opengl32.dll. To use
115 it put it in the same directory as the application. It can also be used by
116 replacing the native ICD driver, but it's quite an advanced usage, so if you
117 need to ask, don't even try it.
123 Building will also create several unit tests in
124 build/linux-???-debug/gallium/drivers/llvmpipe:
126 - lp_test_blend: blending
127 - lp_test_conv: SIMD vector conversion
128 - lp_test_format: pixel unpacking/packing
130 Some of this tests can output results and benchmarks to a tab-separated-file
131 for posterior analysis, e.g.:
133 build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_blend -o blend.tsv
139 - When looking to this code by the first time start in lp_state_fs.c, and
140 then skim through the lp_bld_* functions called in there, and the comments
141 at the top of the lp_bld_*.c functions.
143 - All lp_bld_*.[ch] are isolated from the rest of the driver, and could/may be
144 put in a stand-alone Gallium state -> LLVM IR translation module.
146 - We use LLVM-C bindings for now. They are not documented, but follow the C++
147 interfaces very closely, and appear to be complete enough for code
149 http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html
150 for a stand-alone example.