#include "pipe/p_state.h"
-#ifdef DRAW_LLVM
-#include <llvm-c/ExecutionEngine.h>
-#endif
-
struct pipe_context;
struct draw_context;
struct draw_stage;
/*******************************************************************************
* LLVM integration
*/
-struct draw_context *draw_create_with_llvm(LLVMExecutionEngineRef engine);
+struct draw_context *draw_create_with_llvm(void);
#endif
#endif /* DRAW_CONTEXT_H */
#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"
}
-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;
* 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