summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_rasterizer.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_rasterizer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
index 6df3ef25b0..47f65fe72d 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;
@@ -69,6 +76,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)
{