diff -u -r a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c --- a/src/gallium/drivers/r300/r300_context.c 2010-12-24 12:03:42.000000000 +0300 +++ b/src/gallium/drivers/r300/r300_context.c 2010-12-24 19:43:15.023333353 +0300 @@ -35,6 +35,10 @@ #include "r300_screen_buffer.h" #include "r300_winsys.h" +#if HAVE_LLVM +#include "gallivm/lp_bld_init.h" +#endif + static void r300_update_num_contexts(struct r300_screen *r300screen, int diff) { @@ -422,7 +426,14 @@ if (!r300screen->caps.has_tcl) { /* Create a Draw. This is used for SW TCL. */ + +#if HAVE_LLVM + lp_build_init(); + r300->draw = draw_create_gallivm(&r300->context, gallivm_create()); +#else r300->draw = draw_create(&r300->context); +#endif + if (r300->draw == NULL) goto fail; /* Enable our renderer. */