draw llvm: fix constructor mess
[mesa.git] / src / gallium / auxiliary / draw / draw_context.c
index 5726444c9b7fe42518b66947cc588718f1c055bb..0d8f8807b24a9d4f450170678a1a4f7cc85dd3da 100644 (file)
@@ -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;