summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-09 20:37:34 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:48:30 +0200
commitc2408838c83719cb133332c7adac71ef50503259 (patch)
treee09e430dd0678f4398b500824966ce16114bde51 /src/mesa/drivers/dri/nouveau
parentd28cc798bdf10c7e85189dc2dc3461d63e2fbfc7 (diff)
mesa: replace _mesa_update_stencil() with helper functions
The idea is to remove the dependency on _mesa_update_state_locked, so that st/mesa can skip it for stencil state updates, and then stop setting _NEW_STENCIL in mesa/main if the driver is st/mesa. The main motivation is to stop invoking _mesa_update_state_locked for certain state groups. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_raster.c2
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 fbcc840f891..69664fb40ad 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 (_mesa_stencil_is_enabled(ctx))
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 ffde87ab27b..d537f7bc229 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, _mesa_stencil_is_enabled(ctx));
BEGIN_NV04(push, NV10_3D(STENCIL_FUNC_FUNC), 3);
PUSH_DATA (push, nvgl_comparison_op(ctx->Stencil.Function[0]));