summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_blend.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2010-02-10 21:20:24 +0100
committerRoland Scheidegger <sroland@vmware.com>2010-02-10 21:20:24 +0100
commit6a509ec6dd16f93758a308a0f0eb1b032f099693 (patch)
tree88326364a2a25dbc6e9bc6115abb1bf275384d0d /src/gallium/drivers/llvmpipe/lp_state_blend.c
parent4ea2f61e5ae556fa4141cd226ecbf1521e9f16ff (diff)
llvmpipe: adapt to stencil ref changes
since the driver doesn't actually handle stencil yet the code won't do much.
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;
+}
+
+