1 LLVMPIPE -- a fork of softpipe that employs LLVM for code generation.
9 - TGSI -> LLVM fragment shader translation
10 - same level of support as the TGSI SSE2 exec machine
11 - texture sampling via an intrinsic call
13 - input interpolation also code generated
15 - blend -> LLVM (including logic ops)
16 - SoA and AoS, but only the former used
19 - intermediates can be vectors of floats, ubytes, fixed point, etc, and of
21 - not all operations are implemented for these types yet though
23 Most mesa/progs/demos/* work. Speed is on par with Keith's softpipe-opt branch,
24 which includes hand written fast implementations for common cases.
26 To do (probably by this order):
27 - code generate the rest of the fragment pipeline, namely the
28 depth/alpha/stencil state
29 - concatenate the fragment pipeline (shader + depth/stencil/alpha + blend) in a
31 - code generate texture sampling
32 - translate TGSI control flow instructions
33 - code generate the triangle setup and rasterization
41 - udis86, http://udis86.sourceforge.net/ . Use my repository, which decodes
42 opcodes not yet supported by upstream.
44 git clone git://people.freedesktop.org/~jrfonseca/udis86
46 ./configure --with-pic
50 - LLVM 2.5. On Debian based distributions do:
52 aptitude install llvm-dev
54 There is a typo in one of the llvm-dev 2.5 headers, that causes compilation
55 errors in the debug build:
57 --- /usr/include/llvm-c/Core.h.orig 2009-08-10 15:38:54.000000000 +0100
58 +++ /usr/include/llvm-c/Core.h 2009-08-10 15:38:25.000000000 +0100
61 inline T **unwrap(LLVMValueRef *Vals, unsigned Length) {
63 - for (LLVMValueRef *I = Vals, E = Vals + Length; I != E; ++I)
64 + for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I)
67 return reinterpret_cast<T**>(Vals);
69 - A x86 or amd64 processor with support for sse2, sse3, and sse4.1 SIMD
70 instructions. This is necessary because we emit several SSE intrinsics for
71 convenience. See /proc/cpuinfo to know what your CPU supports.
73 - scons (although it should be straightforward to fix the Makefiles as well)
79 To build everything invoke scons as:
81 scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=xlib dri=false -k
87 Building will create a drop-in alternative for libGL.so. To use it set the
88 environment variables:
90 export LD_LIBRARY_PATH=$PWD/build/linux-x86-debug/lib:$LD_LIBRARY_PATH
91 export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/lib:$LD_LIBRARY_PATH
97 Building will also create several unit tests in
98 build/linux-???-debug/gallium/drivers/llvmpipe:
100 - lp_test_blend: blending
101 - lp_test_conv: SIMD vector conversion
102 - lp_test_format: pixel unpacking/packing
104 Some of this tests can output results and benchmarks to a tab-seperated-file
105 for posterior analysis, e.g.:
107 build/linux-x86_64/gallium/drivers/llvmpipe/lp_test_blend -o blend.tsv
113 - We use LLVM-C bindings for now. They are not documented, but follow the C++
114 interfaces very closely, and appear to be complete enough for code
116 http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html
117 for a standalone example.