summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_blend.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_blend.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_blend.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c
index 9b950e82d8..8bb89f96c2 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c
@@ -121,3 +121,24 @@ llvmpipe_delete_depth_stencil_state(struct pipe_context *pipe, void *depth)
{
FREE( depth );
}
+
+void llvmpipe_set_stencil_ref( struct pipe_context *pipe,
+ const struct pipe_stencil_ref *stencil_ref )
+{
+ struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
+
+ if(!stencil_ref)
+ return;
+
+ if(memcmp(&llvmpipe->stencil_ref, stencil_ref, sizeof *stencil_ref) == 0)
+ return;
+
+ draw_flush(llvmpipe->draw);
+
+ memcpy(&llvmpipe->stencil_ref, stencil_ref, sizeof *stencil_ref);
+
+ /* not sure. want new flag? */
+ llvmpipe->dirty |= LP_NEW_DEPTH_STENCIL_ALPHA;
+}
+
+