summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-05-13 21:48:34 +1200
committerChris Forbes <[email protected]>2013-05-15 22:04:34 +1200
commitc411f40cba09fcb77cc867d65917389d53acaf7c (patch)
tree5cff1a7ecdb4bd6a68e5532d0b2b208d5e791b3e /src/mesa/drivers/dri/radeon
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 <[email protected]> Acked-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 94fb69bc768..70542f68a19 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -42,6 +42,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/fbobject.h"
#include "main/simple_list.h"
#include "main/state.h"
+#include "main/core.h"
+#include "main/stencil.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -1156,7 +1158,7 @@ radeonStencilFuncSeparate( struct gl_context *ctx, GLenum face, GLenum func,
GLint ref, GLuint mask )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
- GLuint refmask = (((ctx->Stencil.Ref[0] & 0xff) << RADEON_STENCIL_REF_SHIFT) |
+ GLuint refmask = ((_mesa_get_stencil_ref(ctx, 0) << RADEON_STENCIL_REF_SHIFT) |
((ctx->Stencil.ValueMask[0] & 0xff) << RADEON_STENCIL_MASK_SHIFT));
RADEON_STATECHANGE( rmesa, ctx );