summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-04-19 12:46:08 -0400
committerZack Rusin <[email protected]>2010-04-19 12:53:27 -0400
commit7c4208c3a0f48955720f41b3cb320a120c505ba6 (patch)
tree4e6f60cd8d6670d93f0e1a7786188d05389c94dd /src/gallium/auxiliary/draw/draw_context.c
parentdeee1523639b4b59841ecbbdebe6797541e0e7d1 (diff)
draw llvm: fix constructor mess
use just one constructor to figure out whether to use llvm.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 5726444c9b7..0d8f8807b24 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -38,6 +38,9 @@
#include "draw_vs.h"
#include "draw_gs.h"
+#if HAVE_LLVM
+#include "gallivm/lp_bld_init.h"
+#endif
struct draw_context *draw_create( struct pipe_context *pipe )
{
@@ -45,6 +48,11 @@ struct draw_context *draw_create( struct pipe_context *pipe )
if (draw == NULL)
goto fail;
+#if HAVE_LLVM
+ assert(lp_build_engine);
+ draw->engine = lp_build_engine;
+#endif
+
if (!draw_init(draw))
goto fail;