Mesa (master): st: Use accessor for stencil reference values
Chris Forbes
chrisf at kemper.freedesktop.org
Wed May 15 10:08:05 UTC 2013
Module: Mesa
Branch: master
Commit: db8a84de8765fc969a3fff3f1275852916eda042
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db8a84de8765fc969a3fff3f1275852916eda042
Author: Chris Forbes <chrisf at ijw.co.nz>
Date: Mon May 13 21:49:11 2013 +1200
st: Use accessor for stencil reference values
NOTE: This is a candidate for stable branches.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
Acked-by: Paul Berry <stereotype441 at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/state_tracker/st_atom_depth.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c
index e351c76..18a56a2 100644
--- a/src/mesa/state_tracker/st_atom_depth.c
+++ b/src/mesa/state_tracker/st_atom_depth.c
@@ -41,6 +41,9 @@
#include "pipe/p_defines.h"
#include "cso_cache/cso_context.h"
+#include "main/core.h"
+#include "main/stencil.h"
+
/**
* Convert an OpenGL compare mode to a pipe tokens.
@@ -116,7 +119,7 @@ update_depth_stencil_alpha(struct st_context *st)
dsa->stencil[0].zpass_op = gl_stencil_op_to_pipe(ctx->Stencil.ZPassFunc[0]);
dsa->stencil[0].valuemask = ctx->Stencil.ValueMask[0] & 0xff;
dsa->stencil[0].writemask = ctx->Stencil.WriteMask[0] & 0xff;
- sr.ref_value[0] = ctx->Stencil.Ref[0] & 0xff;
+ sr.ref_value[0] = _mesa_get_stencil_ref(ctx, 0);
if (ctx->Stencil._TestTwoSide) {
const GLuint back = ctx->Stencil._BackFace;
@@ -127,7 +130,7 @@ update_depth_stencil_alpha(struct st_context *st)
dsa->stencil[1].zpass_op = gl_stencil_op_to_pipe(ctx->Stencil.ZPassFunc[back]);
dsa->stencil[1].valuemask = ctx->Stencil.ValueMask[back] & 0xff;
dsa->stencil[1].writemask = ctx->Stencil.WriteMask[back] & 0xff;
- sr.ref_value[1] = ctx->Stencil.Ref[back] & 0xff;
+ sr.ref_value[1] = _mesa_get_stencil_ref(ctx, back);
}
else {
/* This should be unnecessary. Drivers must not expect this to
More information about the mesa-commit
mailing list