llvmpipe: Fix USE_DRAW_LLVM build. Use lp_build_engine.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 7 Apr 2010 12:49:29 +0000 (13:49 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 7 Apr 2010 12:49:29 +0000 (13:49 +0100)
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/drivers/llvmpipe/lp_context.c

index d42e400318317b55dfac35d4697fa06042f37ef0..a0e1c1c59b94d8b97f491529d721dbd5ab6df37e 100644 (file)
 
 #include "pipe/p_state.h"
 
-#ifdef DRAW_LLVM
-#include <llvm-c/ExecutionEngine.h>
-#endif
-
 struct pipe_context;
 struct draw_context;
 struct draw_stage;
@@ -204,7 +200,7 @@ boolean draw_need_pipeline(const struct draw_context *draw,
 /*******************************************************************************
  * LLVM integration
  */
-struct draw_context *draw_create_with_llvm(LLVMExecutionEngineRef engine);
+struct draw_context *draw_create_with_llvm(void);
 #endif
 
 #endif /* DRAW_CONTEXT_H */
index 121cce3d717dbfeb083f73ee0d6d87a2ff277474..4912b6ac508299f8c9f189ef2257bf2997dce90f 100644 (file)
@@ -11,6 +11,7 @@
 #include "gallivm/lp_bld_debug.h"
 #include "gallivm/lp_bld_tgsi.h"
 #include "gallivm/lp_bld_printf.h"
+#include "gallivm/lp_bld_init.h"
 
 #include "util/u_cpu_detect.h"
 #include "tgsi/tgsi_dump.h"
@@ -199,12 +200,14 @@ draw_llvm_prepare(struct draw_llvm *llvm, int num_inputs)
 }
 
 
-struct draw_context *draw_create_with_llvm(LLVMExecutionEngineRef engine)
+struct draw_context *draw_create_with_llvm(void)
 {
    struct draw_context *draw = CALLOC_STRUCT( draw_context );
    if (draw == NULL)
       goto fail;
-   draw->engine = engine;
+
+   assert(lp_build_engine);
+   draw->engine = lp_build_engine;
 
    if (!draw_init(draw))
       goto fail;
index 62d42317d7ae8485114e661fad766656e3108a85..d94c2da2ff1daa20b95d32e719bca83015148ff8 100644 (file)
@@ -182,7 +182,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
     * Create drawing context and plug our rendering stage into it.
     */
 #if USE_DRAW_LLVM
-   llvmpipe->draw = draw_create_with_llvm(llvmscreen->engine);
+   llvmpipe->draw = draw_create_with_llvm();
 #else
    llvmpipe->draw = draw_create();
 #endif