vc4: Fix stencil writemask handling.
authorEric Anholt <eric@anholt.net>
Mon, 20 Oct 2014 20:14:57 +0000 (21:14 +0100)
committerEric Anholt <eric@anholt.net>
Tue, 21 Oct 2014 14:16:41 +0000 (15:16 +0100)
If the writemask doesn't compress, then we want to put in the uncompressed
writemask, not the compressed writemask failure value (all-on).

Fixes glean's stencil2 and fbo-clear-formats on stencil.

src/gallium/drivers/vc4/vc4_state.c

index 99b5b3c727155670e5a639685df7933e94019f33..bbbb73d4cd6a1c3be56bb936a9727cd406a82cf2 100644 (file)
@@ -223,8 +223,8 @@ vc4_create_depth_stencil_alpha_state(struct pipe_context *pctx,
 
                 if (front_writemask_bits == 0xff ||
                     back_writemask_bits == 0xff) {
-                        so->stencil_uniforms[2] = (front_writemask_bits |
-                                                   (back_writemask_bits << 8));
+                        so->stencil_uniforms[2] = (front->writemask |
+                                                   (back_writemask << 8));
                 }
         }