aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-05-13 21:46:07 +1200
committerChris Forbes <[email protected]>2013-05-15 22:01:03 +1200
commit96a1bf1ba3b3e556abe2e7303b8b785e93e68985 (patch)
tree5bb16d28df1e693bd71d8f461d74a0b46ac5aab2 /src/mesa/main/get.c
parent38f65162af772af6d05627e3af6e8b7caf03ec8f (diff)
mesa: Use accessor for stencil reference values in glGet
NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f4981182ced..593c75be2d2 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -36,6 +36,7 @@
#include "texcompress.h"
#include "framebuffer.h"
#include "samplerobj.h"
+#include "stencil.h"
/* This is a table driven implemetation of the glGet*v() functions.
* The basic idea is that most getters just look up an int somewhere
@@ -675,7 +676,10 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
v->value_enum = ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace];
break;
case GL_STENCIL_REF:
- v->value_int = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+ v->value_int = _mesa_get_stencil_ref(ctx, ctx->Stencil.ActiveFace);
+ break;
+ case GL_STENCIL_BACK_REF:
+ v->value_int = _mesa_get_stencil_ref(ctx, 1);
break;
case GL_STENCIL_VALUE_MASK:
v->value_int = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];