summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2009-08-26 13:33:06 -0400
committerAlex Deucher <[email protected]>2009-08-26 13:33:06 -0400
commit7ffbe487069575d5b5077cb631a1fc9494920fbd (patch)
tree115d92c12f62546b9a24328848c2ad57c746d1ac
parentf988c750a9d3baa2c71f9fd1c0493daef93afc86 (diff)
r600: fix two sided stencil
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index efa1daf2d3c..30cf2dd399d 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -947,9 +947,6 @@ static void r700SetStencilState(GLcontext * ctx, GLboolean state)
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
GLboolean hw_stencil = GL_FALSE;
- //fixme
- //r300CatchStencilFallback(ctx);
-
if (ctx->DrawBuffer) {
struct radeon_renderbuffer *rrbStencil
= radeon_get_renderbuffer(ctx->DrawBuffer, BUFFER_STENCIL);
@@ -958,9 +955,10 @@ static void r700SetStencilState(GLcontext * ctx, GLboolean state)
if (hw_stencil) {
R600_STATECHANGE(context, db);
- if (state)
+ if (state) {
SETbit(r700->DB_DEPTH_CONTROL.u32All, STENCIL_ENABLE_bit);
- else
+ SETbit(r700->DB_DEPTH_CONTROL.u32All, BACKFACE_ENABLE_bit);
+ } else
CLEARbit(r700->DB_DEPTH_CONTROL.u32All, STENCIL_ENABLE_bit);
}
}
@@ -972,10 +970,8 @@ static void r700StencilFuncSeparate(GLcontext * ctx, GLenum face,
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
const unsigned back = ctx->Stencil._BackFace;
- //fixme
- //r300CatchStencilFallback(ctx);
-
R600_STATECHANGE(context, stencil);
+ R600_STATECHANGE(context, db);
//front
SETfield(r700->DB_STENCILREFMASK.u32All, ctx->Stencil.Ref[0],
@@ -1003,9 +999,6 @@ static void r700StencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask) /
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
const unsigned back = ctx->Stencil._BackFace;
- //fixme
- //r300CatchStencilFallback(ctx);
-
R600_STATECHANGE(context, stencil);
// front
@@ -1025,9 +1018,6 @@ static void r700StencilOpSeparate(GLcontext * ctx, GLenum face,
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
const unsigned back = ctx->Stencil._BackFace;
- //fixme
- //r300CatchStencilFallback(ctx);
-
R600_STATECHANGE(context, db);
SETfield(r700->DB_DEPTH_CONTROL.u32All, translate_stencil_op(ctx->Stencil.FailFunc[0]),