aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2012-02-24 14:26:41 -0500
committerBrian Paul <[email protected]>2012-03-09 08:43:41 -0700
commit151d32dd4595f21be2d2126aa8c0d0c9434af416 (patch)
tree9ce39b0a524ce05da4c1427c1cffe096fef0406b /src/gallium
parent1fae49b0f5e3a2124ce578df48c800313778a74e (diff)
svga: Fix stencil op mapping
We were inverting the meaning of the stencil op flags: in svga/d3d the normal incr/decr wraps and the SAT ops clamp. This fixes piglit failures (at least stencil-twoside and stencil-wrap). We should backport this everywhere we can. Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 5d9bfc4d3f117fd6d95e1818c60f4f7ea47e6929)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_depthstencil.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_depthstencil.c b/src/gallium/drivers/svga/svga_pipe_depthstencil.c
index c84615a1f3b..cb07dbe09a3 100644
--- a/src/gallium/drivers/svga/svga_pipe_depthstencil.c
+++ b/src/gallium/drivers/svga/svga_pipe_depthstencil.c
@@ -57,10 +57,10 @@ svga_translate_stencil_op(unsigned op)
case PIPE_STENCIL_OP_KEEP: return SVGA3D_STENCILOP_KEEP;
case PIPE_STENCIL_OP_ZERO: return SVGA3D_STENCILOP_ZERO;
case PIPE_STENCIL_OP_REPLACE: return SVGA3D_STENCILOP_REPLACE;
- case PIPE_STENCIL_OP_INCR: return SVGA3D_STENCILOP_INCR;
- case PIPE_STENCIL_OP_DECR: return SVGA3D_STENCILOP_DECR;
- case PIPE_STENCIL_OP_INCR_WRAP: return SVGA3D_STENCILOP_INCRSAT; /* incorrect? */
- case PIPE_STENCIL_OP_DECR_WRAP: return SVGA3D_STENCILOP_DECRSAT; /* incorrect? */
+ case PIPE_STENCIL_OP_INCR: return SVGA3D_STENCILOP_INCRSAT;
+ case PIPE_STENCIL_OP_DECR: return SVGA3D_STENCILOP_DECRSAT;
+ case PIPE_STENCIL_OP_INCR_WRAP: return SVGA3D_STENCILOP_INCR;
+ case PIPE_STENCIL_OP_DECR_WRAP: return SVGA3D_STENCILOP_DECR;
case PIPE_STENCIL_OP_INVERT: return SVGA3D_STENCILOP_INVERT;
default:
assert(0);