diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_blend.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_blend.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c index 9b950e82d8..4ee28473e8 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c @@ -33,7 +33,7 @@ #include "util/u_memory.h" #include "util/u_math.h" -#include "util/u_debug_dump.h" +#include "util/u_dump.h" #include "draw/draw_context.h" #include "lp_screen.h" #include "lp_context.h" @@ -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; +} + + |