llvmpipe: fix broken stencil writemask
authorBrian Paul <brianp@vmware.com>
Fri, 3 Dec 2010 16:42:37 +0000 (09:42 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 3 Dec 2010 16:44:30 +0000 (09:44 -0700)
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32070

src/gallium/drivers/llvmpipe/lp_bld_depth.c

index e88a21726ebc782c551c774cf58a12fbdebda6e8..1bf741194c5ec6d4e4737f380d52874f3085ec13 100644 (file)
@@ -269,7 +269,7 @@ lp_build_stencil_op(struct lp_build_context *bld,
                                                       stencil->writemask);
       mask = LLVMBuildAnd(builder, mask, writemask, "");
       /* res = (res & mask) | (stencilVals & ~mask) */
-      res = lp_build_select_bitwise(bld, writemask, res, stencilVals);
+      res = lp_build_select_bitwise(bld, mask, res, stencilVals);
    }
    else {
       /* res = mask ? res : stencilVals */