Mesa (10.2): nouveau: only enable stencil func if the visual has stencil bits
Emil Velikov
evelikov at kemper.freedesktop.org
Wed Sep 17 02:31:27 UTC 2014
Module: Mesa
Branch: 10.2
Commit: 6eaa23d1ff693aaed127c5dc4c1ec503fc09afd8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6eaa23d1ff693aaed127c5dc4c1ec503fc09afd8
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Aug 16 12:48:09 2014 -0400
nouveau: only enable stencil func if the visual has stencil bits
The _Enabled property already has the relevant information.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 3c81de58512f0615df1d90aa79a22c9a44c7189e)
---
src/mesa/drivers/dri/nouveau/nv04_state_raster.c | 2 +-
src/mesa/drivers/dri/nouveau/nv10_state_raster.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index 26cf32f..fbcc840 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -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 |
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
index d34cf91..ffde87a 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
@@ -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]));
More information about the mesa-commit
mailing list