On 05/20/2013 08:59 PM, Kenneth Graunke wrote:
On 05/20/2013 04:19 PM, Brian Paul wrote:
On 05/13/2013 05:10 AM, Chris Forbes wrote:
Signed-off-by: Chris Forbes<chr...@ijw.co.nz>
---
src/mesa/main/get.c | 6 +++++-
src/mesa/main/get_hash_params.py | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f498118..593c75b 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);

I think this is incorrect. I tested with NVIDIA's driver and it returns
the user's originally-specified value without any sort of masking.

Can you revert this chunk?

Sorry I missed this earlier, I was on vacation.

-Brian

Chris did notice that, but I think nVidia's implementation is
incorrect. The specification is pretty clear that it should be clamped.

It might be worth trying AMD. If both return the unclamped value, we
might want to file a spec bug.

Yeah, it would be good to know what another implementation does. It doesn't seem right that clamping/masking should be done for glGet.

-Brian

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to