diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_depth_test.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state.h | 7 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_state_blend.c | 14 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_video_context.c | 1 |
6 files changed, 20 insertions, 6 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 2b22ce256e..ddc35bcd62 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -246,6 +246,7 @@ softpipe_create_context( struct pipe_screen *screen, softpipe->pipe.delete_gs_state = softpipe_delete_gs_state; softpipe->pipe.set_blend_color = softpipe_set_blend_color; + softpipe->pipe.set_stencil_ref = softpipe_set_stencil_ref; softpipe->pipe.set_clip_state = softpipe_set_clip_state; softpipe->pipe.set_constant_buffer = softpipe_set_constant_buffer; softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index 62f9e7aad3..95def72c54 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -62,6 +62,7 @@ struct softpipe_context { /** Other rendering state */ struct pipe_blend_color blend_color; + struct pipe_stencil_ref stencil_ref; struct pipe_clip_state clip; struct pipe_buffer *constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; struct pipe_framebuffer_state framebuffer; diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c index a981775cbd..499eebd671 100644 --- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c @@ -519,7 +519,7 @@ depth_stencil_test_quad(struct quad_stage *qs, failOp = softpipe->depth_stencil->stencil[face].fail_op; zFailOp = softpipe->depth_stencil->stencil[face].zfail_op; zPassOp = softpipe->depth_stencil->stencil[face].zpass_op; - ref = softpipe->depth_stencil->stencil[face].ref_value; + ref = softpipe->stencil_ref.ref_value[face]; wrtMask = softpipe->depth_stencil->stencil[face].writemask; valMask = softpipe->depth_stencil->stencil[face].valuemask; diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h index a83cae7361..4370bbeaee 100644 --- a/src/gallium/drivers/softpipe/sp_state.h +++ b/src/gallium/drivers/softpipe/sp_state.h @@ -132,13 +132,16 @@ void softpipe_bind_rasterizer_state(struct pipe_context *, void *); void softpipe_delete_rasterizer_state(struct pipe_context *, void *); void softpipe_set_framebuffer_state( struct pipe_context *, - const struct pipe_framebuffer_state * ); + const struct pipe_framebuffer_state * ); void softpipe_set_blend_color( struct pipe_context *pipe, const struct pipe_blend_color *blend_color ); +void softpipe_set_stencil_ref( struct pipe_context *pipe, + const struct pipe_stencil_ref *stencil_ref ); + void softpipe_set_clip_state( struct pipe_context *, - const struct pipe_clip_state * ); + const struct pipe_clip_state * ); void softpipe_set_constant_buffer(struct pipe_context *, uint shader, uint index, diff --git a/src/gallium/drivers/softpipe/sp_state_blend.c b/src/gallium/drivers/softpipe/sp_state_blend.c index 95ab323433..c63a49e90b 100644 --- a/src/gallium/drivers/softpipe/sp_state_blend.c +++ b/src/gallium/drivers/softpipe/sp_state_blend.c @@ -61,7 +61,7 @@ void softpipe_delete_blend_state(struct pipe_context *pipe, void softpipe_set_blend_color( struct pipe_context *pipe, - const struct pipe_blend_color *blend_color ) + const struct pipe_blend_color *blend_color ) { struct softpipe_context *softpipe = softpipe_context(pipe); @@ -80,7 +80,7 @@ void softpipe_set_blend_color( struct pipe_context *pipe, void * softpipe_create_depth_stencil_state(struct pipe_context *pipe, - const struct pipe_depth_stencil_alpha_state *depth_stencil) + const struct pipe_depth_stencil_alpha_state *depth_stencil) { return mem_dup(depth_stencil, sizeof(*depth_stencil)); } @@ -101,3 +101,13 @@ softpipe_delete_depth_stencil_state(struct pipe_context *pipe, void *depth) { FREE( depth ); } + +void softpipe_set_stencil_ref( struct pipe_context *pipe, + const struct pipe_stencil_ref *stencil_ref ) +{ + struct softpipe_context *softpipe = softpipe_context(pipe); + + softpipe->stencil_ref = *stencil_ref; + + softpipe->dirty |= SP_NEW_DEPTH_STENCIL_ALPHA; +} diff --git a/src/gallium/drivers/softpipe/sp_video_context.c b/src/gallium/drivers/softpipe/sp_video_context.c index d8b5b31e95..7a3a636167 100644 --- a/src/gallium/drivers/softpipe/sp_video_context.c +++ b/src/gallium/drivers/softpipe/sp_video_context.c @@ -209,7 +209,6 @@ init_pipe_state(struct sp_mpeg12_context *ctx) dsa.stencil[i].fail_op = PIPE_STENCIL_OP_KEEP; dsa.stencil[i].zpass_op = PIPE_STENCIL_OP_KEEP; dsa.stencil[i].zfail_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].ref_value = 0; dsa.stencil[i].valuemask = 0; dsa.stencil[i].writemask = 0; } |