summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_context.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_rasterizer.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index e31ae6a3fc..6962a7921b 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -174,7 +174,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
/*
* Create drawing context and plug our rendering stage into it.
*/
- llvmpipe->draw = draw_create();
+ llvmpipe->draw = draw_create(&llvmpipe->pipe);
if (!llvmpipe->draw)
goto fail;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
index feb012816c..8592da0d9d 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
@@ -38,19 +38,26 @@ void *
llvmpipe_create_rasterizer_state(struct pipe_context *pipe,
const struct pipe_rasterizer_state *rast)
{
+ /* We do nothing special with rasterizer state.
+ * The CSO handle is just a pointer to a pipe_rasterizer_state object.
+ */
return mem_dup(rast, sizeof(*rast));
}
-void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe,
- void *rasterizer)
+
+
+void
+llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
{
struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
+ const struct pipe_rasterizer_state *rasterizer =
+ (const struct pipe_rasterizer_state *) handle;
if (llvmpipe->rasterizer == rasterizer)
return;
/* pass-through to draw module */
- draw_set_rasterizer_state(llvmpipe->draw, rasterizer);
+ draw_set_rasterizer_state(llvmpipe->draw, rasterizer, handle);
llvmpipe->rasterizer = rasterizer;
@@ -68,6 +75,7 @@ void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe,
llvmpipe->dirty |= LP_NEW_RASTERIZER;
}
+
void llvmpipe_delete_rasterizer_state(struct pipe_context *pipe,
void *rasterizer)
{