diff options
author | Roland Scheidegger <[email protected]> | 2010-02-10 21:21:30 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-02-10 21:21:30 +0100 |
commit | 9381a2777c1a36c1b88de9edf04141c485569259 (patch) | |
tree | f3767cc68a9899607cf7dbf352827e067feb6f06 /src/gallium/drivers/svga/svga_pipe_depthstencil.c | |
parent | 6a509ec6dd16f93758a308a0f0eb1b032f099693 (diff) |
svga: adapt to stencil ref changes
also add some disabled code to handle blendcolor?
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_depthstencil.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_depthstencil.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_depthstencil.c b/src/gallium/drivers/svga/svga_pipe_depthstencil.c index 12bbd233a58..c317bec6d57 100644 --- a/src/gallium/drivers/svga/svga_pipe_depthstencil.c +++ b/src/gallium/drivers/svga/svga_pipe_depthstencil.c @@ -89,7 +89,6 @@ svga_create_depth_stencil_state(struct pipe_context *pipe, /* SVGA3D has one ref/mask/writemask triple shared between front & * back face stencil. We really need two: */ - ds->stencil_ref = templ->stencil[0].ref_value & 0xff; ds->stencil_mask = templ->stencil[0].valuemask & 0xff; ds->stencil_writemask = templ->stencil[0].writemask & 0xff; } @@ -102,7 +101,6 @@ svga_create_depth_stencil_state(struct pipe_context *pipe, ds->stencil[1].zfail = svga_translate_stencil_op(templ->stencil[1].zfail_op); ds->stencil[1].pass = svga_translate_stencil_op(templ->stencil[1].zpass_op); - ds->stencil_ref = templ->stencil[1].ref_value & 0xff; ds->stencil_mask = templ->stencil[1].valuemask & 0xff; ds->stencil_writemask = templ->stencil[1].writemask & 0xff; } @@ -139,12 +137,24 @@ static void svga_delete_depth_stencil_state(struct pipe_context *pipe, } +static void svga_set_stencil_ref( struct pipe_context *pipe, + const struct pipe_stencil_ref *stencil_ref ) +{ + struct svga_context *svga = svga_context(pipe); + + svga->curr.stencil_ref = *stencil_ref; + + svga->dirty |= SVGA_NEW_STENCIL_REF; +} + void svga_init_depth_stencil_functions( struct svga_context *svga ) { svga->pipe.create_depth_stencil_alpha_state = svga_create_depth_stencil_state; svga->pipe.bind_depth_stencil_alpha_state = svga_bind_depth_stencil_state; svga->pipe.delete_depth_stencil_alpha_state = svga_delete_depth_stencil_state; + + svga->pipe.set_stencil_ref = svga_set_stencil_ref; } |