diff options
author | Chris Forbes <[email protected]> | 2013-05-13 21:47:37 +1200 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-06-05 10:53:19 -0700 |
commit | c7d9a467378642ee1dd3fcce0ba44d53f36d92de (patch) | |
tree | 7ff8bcd4f49f6a6b3756cbf46fb43df04417ba57 /src/mesa | |
parent | 0fdf9716a478427ef22854053463b55b7fa16981 (diff) |
nouveau: Use accessor for stencil reference values
NOTE: This is a candidate for stable branches.
Signed-off-by: Chris Forbes <[email protected]>
Acked-by: Paul Berry <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
(cherry picked from commit 7bbe9b78ae8ca44699bd3819afa240b0f223e25b)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv04_state_raster.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nv10_state_raster.c | 4 |
2 files changed, 5 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 ecede6703d2..ed21e540501 100644 --- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c +++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c @@ -30,6 +30,7 @@ #include "nv_object.xml.h" #include "nv04_3d.xml.h" #include "nv04_driver.h" +#include "main/stencil.h" static unsigned get_comparison_op(unsigned op) @@ -177,7 +178,7 @@ nv04_emit_control(struct gl_context *ctx, int emit) nv04->ctrl[1] |= NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE; nv04->ctrl[1] |= get_comparison_op(ctx->Stencil.Function[0]) << 4 | - ctx->Stencil.Ref[0] << 8 | + _mesa_get_stencil_ref(ctx, 0) << 8 | ctx->Stencil.ValueMask[0] << 16 | ctx->Stencil.WriteMask[0] << 24; diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c index 8b08c7519d0..bd4a78e1bdb 100644 --- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c +++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c @@ -31,6 +31,8 @@ #include "nv10_3d.xml.h" #include "nv10_driver.h" +#include "main/stencil.h" + void nv10_emit_alpha_func(struct gl_context *ctx, int emit) { @@ -145,7 +147,7 @@ nv10_emit_stencil_func(struct gl_context *ctx, int emit) BEGIN_NV04(push, NV10_3D(STENCIL_FUNC_FUNC), 3); PUSH_DATA (push, nvgl_comparison_op(ctx->Stencil.Function[0])); - PUSH_DATA (push, ctx->Stencil.Ref[0]); + PUSH_DATA (push, _mesa_get_stencil_ref(ctx, 0)); PUSH_DATA (push, ctx->Stencil.ValueMask[0]); } |