summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 951a695f96..5c476f693f 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -40,13 +40,14 @@
#include "lp_context.h"
#include "lp_flush.h"
#include "lp_perf.h"
+#include "lp_screen.h"
#include "lp_state.h"
#include "lp_surface.h"
#include "lp_query.h"
#include "lp_setup.h"
-
+#define USE_DRAW_LLVM 0
static void llvmpipe_destroy( struct pipe_context *pipe )
@@ -105,6 +106,7 @@ struct pipe_context *
llvmpipe_create_context( struct pipe_screen *screen, void *priv )
{
struct llvmpipe_context *llvmpipe;
+ struct llvmpipe_screen *llvmscreen = llvmpipe_screen(screen);
llvmpipe = align_malloc(sizeof(struct llvmpipe_context), 16);
if (!llvmpipe)
@@ -180,8 +182,12 @@ 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);
+#else
llvmpipe->draw = draw_create();
- if (!llvmpipe->draw)
+#endif
+ if (!llvmpipe->draw)
goto fail;
/* FIXME: devise alternative to draw_texture_samplers */