summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-09-13 04:42:09 +0000
committerBrian Paul <[email protected]>2005-09-13 04:42:09 +0000
commit878c371e6cf6eb28afacc482d8aeaa0119f00d5b (patch)
tree61c5d8f5e55e426e51a8601566e2a6a71ebf7415 /src/mesa/drivers/dri/i915
parent42c34efd23d7ad05df9f3c71f7d52dd259e179d8 (diff)
Replace ctx->Driver.StencilOp/Func/Mask() functions with
ctx->Driver.Stencil*Separate() functions.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c19
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c19
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c27
3 files changed, 40 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index e3f632348b6..605f400c06d 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -40,8 +40,9 @@
#include "i830_context.h"
#include "i830_reg.h"
-static void i830StencilFunc(GLcontext *ctx, GLenum func, GLint ref,
- GLuint mask)
+static void
+i830StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
+ GLuint mask)
{
i830ContextPtr i830 = I830_CONTEXT(ctx);
int test = intel_translate_compare_func(func);
@@ -65,7 +66,8 @@ static void i830StencilFunc(GLcontext *ctx, GLenum func, GLint ref,
STENCIL_TEST_FUNC(test));
}
-static void i830StencilMask(GLcontext *ctx, GLuint mask)
+static void
+i830StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
{
i830ContextPtr i830 = I830_CONTEXT(ctx);
@@ -80,8 +82,9 @@ static void i830StencilMask(GLcontext *ctx, GLuint mask)
STENCIL_WRITE_MASK(mask));
}
-static void i830StencilOp(GLcontext *ctx, GLenum fail, GLenum zfail,
- GLenum zpass)
+static void
+i830StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
+ GLenum zpass)
{
i830ContextPtr i830 = I830_CONTEXT(ctx);
int fop, dfop, dpop;
@@ -1060,9 +1063,9 @@ void i830InitStateFuncs( struct dd_function_table *functions )
functions->PolygonStipple = i830PolygonStipple;
functions->Scissor = i830Scissor;
functions->ShadeModel = i830ShadeModel;
- functions->StencilFunc = i830StencilFunc;
- functions->StencilMask = i830StencilMask;
- functions->StencilOp = i830StencilOp;
+ functions->StencilFuncSeparate = i830StencilFuncSeparate;
+ functions->StencilMaskSeparate = i830StencilMaskSeparate;
+ functions->StencilOpSeparate = i830StencilOpSeparate;
}
void i830InitState( i830ContextPtr i830 )
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 9ba47d92e40..0627f102da2 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -44,8 +44,9 @@
-static void i915StencilFunc(GLcontext *ctx, GLenum func, GLint ref,
- GLuint mask)
+static void
+i915StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
+ GLuint mask)
{
i915ContextPtr i915 = I915_CONTEXT(ctx);
int test = intel_translate_compare_func( func );
@@ -69,7 +70,8 @@ static void i915StencilFunc(GLcontext *ctx, GLenum func, GLint ref,
(test << S5_STENCIL_TEST_FUNC_SHIFT));
}
-static void i915StencilMask(GLcontext *ctx, GLuint mask)
+static void
+i915StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
{
i915ContextPtr i915 = I915_CONTEXT(ctx);
@@ -85,8 +87,9 @@ static void i915StencilMask(GLcontext *ctx, GLuint mask)
}
-static void i915StencilOp(GLcontext *ctx, GLenum fail, GLenum zfail,
- GLenum zpass)
+static void
+i915StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
+ GLenum zpass)
{
i915ContextPtr i915 = I915_CONTEXT(ctx);
int fop = intel_translate_stencil_op(fail);
@@ -928,9 +931,9 @@ void i915InitStateFunctions( struct dd_function_table *functions )
functions->PolygonStipple = i915PolygonStipple;
functions->Scissor = i915Scissor;
functions->ShadeModel = i915ShadeModel;
- functions->StencilFunc = i915StencilFunc;
- functions->StencilMask = i915StencilMask;
- functions->StencilOp = i915StencilOp;
+ functions->StencilFuncSeparate = i915StencilFuncSeparate;
+ functions->StencilMaskSeparate = i915StencilMaskSeparate;
+ functions->StencilOpSeparate = i915StencilOpSeparate;
}
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index bdf02c766ee..d39e45d0b33 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -697,15 +697,24 @@ void intelInitState( GLcontext *ctx )
ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y,
ctx->Scissor.Width, ctx->Scissor.Height );
ctx->Driver.ShadeModel( ctx, ctx->Light.ShadeModel );
- ctx->Driver.StencilFunc( ctx,
- ctx->Stencil.Function[0],
- ctx->Stencil.Ref[0],
- ctx->Stencil.ValueMask[0] );
- ctx->Driver.StencilMask( ctx, ctx->Stencil.WriteMask[0] );
- ctx->Driver.StencilOp( ctx,
- ctx->Stencil.FailFunc[0],
- ctx->Stencil.ZFailFunc[0],
- ctx->Stencil.ZPassFunc[0]);
+ ctx->Driver.StencilFuncSeparate( ctx, GL_FRONT,
+ ctx->Stencil.Function[0],
+ ctx->Stencil.Ref[0],
+ ctx->Stencil.ValueMask[0] );
+ ctx->Driver.StencilFuncSeparate( ctx, GL_BACK,
+ ctx->Stencil.Function[1],
+ ctx->Stencil.Ref[1],
+ ctx->Stencil.ValueMask[1] );
+ ctx->Driver.StencilMaskSeparate( ctx, GL_FRONT, ctx->Stencil.WriteMask[0] );
+ ctx->Driver.StencilMaskSeparate( ctx, GL_BACK, ctx->Stencil.WriteMask[1] );
+ ctx->Driver.StencilOpSeparate( ctx, GL_FRONT,
+ ctx->Stencil.FailFunc[0],
+ ctx->Stencil.ZFailFunc[0],
+ ctx->Stencil.ZPassFunc[0]);
+ ctx->Driver.StencilOpSeparate( ctx, GL_BACK,
+ ctx->Stencil.FailFunc[1],
+ ctx->Stencil.ZFailFunc[1],
+ ctx->Stencil.ZPassFunc[1]);
ctx->Driver.DrawBuffer( ctx, ctx->Color.DrawBuffer[0] );