nouveau: only enable stencil func if the visual has stencil bits
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 16 Aug 2014 16:48:09 +0000 (12:48 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 12 Sep 2014 04:51:20 +0000 (00:51 -0400)
The _Enabled property already has the relevant information.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/nouveau/nv04_state_raster.c
src/mesa/drivers/dri/nouveau/nv10_state_raster.c

index 26cf32f2a25ada2c7289b8d2e94f9c00f3fea184..fbcc840f8913f921f6056076e7e2f4c61bbe0a2e 100644 (file)
@@ -175,7 +175,7 @@ nv04_emit_control(struct gl_context *ctx, int emit)
        if (ctx->Stencil.WriteMask[0])
                nv04->ctrl[0] |= NV04_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE;
 
-       if (ctx->Stencil.Enabled)
+       if (ctx->Stencil._Enabled)
                nv04->ctrl[1] |= NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE;
 
        nv04->ctrl[1] |= get_comparison_op(ctx->Stencil.Function[0]) << 4 |
index d34cf91dafdeb5ae1d82007d5dfacd746d8a1125..ffde87ab27be4b4096fe329b04a7668378f18f7f 100644 (file)
@@ -145,7 +145,7 @@ nv10_emit_stencil_func(struct gl_context *ctx, int emit)
        struct nouveau_pushbuf *push = context_push(ctx);
 
        BEGIN_NV04(push, NV10_3D(STENCIL_ENABLE), 1);
-       PUSH_DATAb(push, ctx->Stencil.Enabled);
+       PUSH_DATAb(push, ctx->Stencil._Enabled);
 
        BEGIN_NV04(push, NV10_3D(STENCIL_FUNC_FUNC), 3);
        PUSH_DATA (push, nvgl_comparison_op(ctx->Stencil.Function[0]));