summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-05-13 21:49:30 +1200
committerChris Forbes <[email protected]>2013-05-15 22:04:53 +1200
commit978f91b8292cf504d3d50307aacfb94943d7f186 (patch)
treef6328c1e7ca7177302b89cbf26d8e2c0254079cd /src
parentdb8a84de8765fc969a3fff3f1275852916eda042 (diff)
swrast: 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]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_stencil.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index 0c46d934e0d..a63a773cf3a 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -29,6 +29,8 @@
#include "main/imports.h"
#include "main/format_pack.h"
#include "main/format_unpack.h"
+#include "main/core.h"
+#include "main/stencil.h"
#include "s_context.h"
#include "s_depth.h"
@@ -129,7 +131,7 @@ apply_stencil_op(const struct gl_context *ctx, GLenum oper, GLuint face,
GLuint n, GLubyte stencil[], const GLubyte mask[],
GLint stride)
{
- const GLubyte ref = ctx->Stencil.Ref[face];
+ const GLubyte ref = _mesa_get_stencil_ref(ctx, face);
const GLubyte wrtmask = ctx->Stencil.WriteMask[face];
const GLubyte invmask = (GLubyte) (~wrtmask);
GLuint i, j;
@@ -216,7 +218,7 @@ do_stencil_test(struct gl_context *ctx, GLuint face, GLuint n,
GLboolean allfail = GL_FALSE;
GLuint i, j;
const GLuint valueMask = ctx->Stencil.ValueMask[face];
- const GLubyte ref = (GLubyte) (ctx->Stencil.Ref[face] & valueMask);
+ const GLubyte ref = (GLubyte) (_mesa_get_stencil_ref(ctx, face) & valueMask);
GLubyte s;
/*