summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r200/r200_state.c
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2013-05-13 21:48:34 +1200
committerChris Forbes <chrisf@ijw.co.nz>2013-05-15 22:04:34 +1200
commitc411f40cba09fcb77cc867d65917389d53acaf7c (patch)
tree5cff1a7ecdb4bd6a68e5532d0b2b208d5e791b3e /src/mesa/drivers/dri/r200/r200_state.c
parent7bbe9b78ae8ca44699bd3819afa240b0f223e25b (diff)
radeon: Use accessor for stencil reference values
V2: Drop spurious mask with 0xff. NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Acked-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_state.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index f812a15c62a..d3e811407be 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -41,6 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/light.h"
#include "main/framebuffer.h"
#include "main/fbobject.h"
+#include "main/stencil.h"
#include "swrast/swrast.h"
#include "vbo/vbo.h"
@@ -1384,7 +1385,7 @@ r200StencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- GLuint refmask = (((ctx->Stencil.Ref[0] & 0xff) << R200_STENCIL_REF_SHIFT) |
+ GLuint refmask = ((_mesa_get_stencil_ref(ctx, 0) << R200_STENCIL_REF_SHIFT) |
((ctx->Stencil.ValueMask[0] & 0xff) << R200_STENCIL_MASK_SHIFT));
R200_STATECHANGE( rmesa, ctx );