@@ -308,7 +308,7 @@ _mesa_init_driver_state(GLcontext *ctx) | |||
ctx->Driver.Enable(ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag); | |||
ctx->Driver.Enable(ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag); | |||
ctx->Driver.Enable(ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled); | |||
ctx->Driver.Enable(ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled); | |||
ctx->Driver.Enable(ctx, GL_STENCIL_TEST, ctx->Stencil._Enabled); | |||
ctx->Driver.Enable(ctx, GL_TEXTURE_1D, GL_FALSE); | |||
ctx->Driver.Enable(ctx, GL_TEXTURE_2D, GL_FALSE); | |||
ctx->Driver.Enable(ctx, GL_TEXTURE_RECTANGLE_NV, GL_FALSE); |
@@ -275,7 +275,7 @@ ffbDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, | |||
/* We will properly update sw/hw state when stenciling is | |||
* enabled. | |||
*/ | |||
if (! ctx->Stencil.Enabled) | |||
if (! ctx->Stencil._Enabled) | |||
return; | |||
stencilctl = fmesa->stencilctl; | |||
@@ -333,7 +333,7 @@ ffbDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, | |||
/* We will properly update sw/hw state when stenciling is | |||
* enabled. | |||
*/ | |||
if (! ctx->Stencil.Enabled) | |||
if (! ctx->Stencil._Enabled) | |||
return; | |||
stencilctl = fmesa->stencilctl; |
@@ -88,7 +88,7 @@ cc_unit_populate_key(struct brw_context *brw, struct brw_cc_unit_key *key) | |||
memset(key, 0, sizeof(*key)); | |||
key->stencil = ctx->Stencil.Enabled; | |||
key->stencil = ctx->Stencil._Enabled; | |||
key->stencil_two_side = ctx->Stencil._TestTwoSide; | |||
if (key->stencil) { |
@@ -75,7 +75,7 @@ static GLboolean do_check_fallback(struct brw_context *brw) | |||
/* _NEW_STENCIL | |||
*/ | |||
if (ctx->Stencil.Enabled && | |||
if (ctx->Stencil._Enabled && | |||
(ctx->DrawBuffer->Name == 0 && !brw->intel.hw_stencil)) { | |||
DBG("FALLBACK: stencil\n"); | |||
return GL_TRUE; |
@@ -210,7 +210,7 @@ static void brw_wm_populate_key( struct brw_context *brw, | |||
lookup |= IZ_DEPTH_WRITE_ENABLE_BIT; | |||
/* _NEW_STENCIL */ | |||
if (ctx->Stencil.Enabled) { | |||
if (ctx->Stencil._Enabled) { | |||
lookup |= IZ_STENCIL_TEST_ENABLE_BIT; | |||
if (ctx->Stencil.WriteMask[0] || |
@@ -263,7 +263,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb) | |||
} | |||
} | |||
else { | |||
/* XXX FBO: instead of FALSE, pass ctx->Stencil.Enabled ??? */ | |||
/* XXX FBO: instead of FALSE, pass ctx->Stencil._Enabled ??? */ | |||
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, GL_FALSE); | |||
} | |||
@@ -274,7 +274,7 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb) | |||
ctx->Driver.Enable(ctx, GL_DEPTH_TEST, | |||
(ctx->Depth.Test && fb->Visual.depthBits > 0)); | |||
ctx->Driver.Enable(ctx, GL_STENCIL_TEST, | |||
(ctx->Stencil.Enabled && fb->Visual.stencilBits > 0)); | |||
(ctx->Stencil._Enabled && fb->Visual.stencilBits > 0)); | |||
} | |||
else { | |||
ctx->NewState |= (_NEW_DEPTH | _NEW_STENCIL); |
@@ -112,7 +112,7 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one) | |||
return GL_FALSE; | |||
} | |||
if (ctx->Stencil.Enabled) { | |||
if (ctx->Stencil._Enabled) { | |||
DBG("fallback due to image stencil\n"); | |||
return GL_FALSE; | |||
} |
@@ -87,7 +87,7 @@ intel_check_copypixel_blit_fragment_ops(GLcontext * ctx) | |||
ctx->Color.AlphaEnabled || | |||
ctx->Depth.Test || | |||
ctx->Fog.Enabled || | |||
ctx->Stencil.Enabled || | |||
ctx->Stencil._Enabled || | |||
!ctx->Color.ColorMask[0] || | |||
!ctx->Color.ColorMask[1] || | |||
!ctx->Color.ColorMask[2] || |
@@ -233,7 +233,7 @@ intel_stencil_drawpixels(GLcontext * ctx, | |||
} | |||
/* We don't support stencil testing/ops here */ | |||
if (ctx->Stencil.Enabled) | |||
if (ctx->Stencil._Enabled) | |||
return GL_FALSE; | |||
/* We use FBOs for our wrapping of the depthbuffer into a color |
@@ -133,7 +133,7 @@ check_color_per_fragment_ops( const GLcontext *ctx ) | |||
ctx->Depth.Test || | |||
ctx->Fog.Enabled || | |||
ctx->Scissor.Enabled || | |||
ctx->Stencil.Enabled || | |||
ctx->Stencil._Enabled || | |||
!ctx->Color.ColorMask[0] || | |||
!ctx->Color.ColorMask[1] || | |||
!ctx->Color.ColorMask[2] || |
@@ -87,7 +87,7 @@ check_color_per_fragment_ops( const GLcontext *ctx ) | |||
ctx->Depth.Test || | |||
ctx->Fog.Enabled || | |||
ctx->Scissor.Enabled || | |||
ctx->Stencil.Enabled || | |||
ctx->Stencil._Enabled || | |||
!ctx->Color.ColorMask[0] || | |||
!ctx->Color.ColorMask[1] || | |||
!ctx->Color.ColorMask[2] || |
@@ -2205,7 +2205,7 @@ static void r300ResetHwState(r300ContextPtr r300) | |||
r300DepthFunc(ctx, ctx->Depth.Func); | |||
/* stencil */ | |||
r300Enable(ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled); | |||
r300Enable(ctx, GL_STENCIL_TEST, ctx->Stencil._Enabled); | |||
r300StencilMaskSeparate(ctx, 0, ctx->Stencil.WriteMask[0]); | |||
r300StencilFuncSeparate(ctx, 0, ctx->Stencil.Function[0], | |||
ctx->Stencil.Ref[0], ctx->Stencil.ValueMask[0]); |
@@ -514,7 +514,7 @@ static void savageDDDepthFunc_s4(GLcontext *ctx, GLenum func) | |||
imesa->regs.s4.drawLocalCtrl.ni.flushPdZbufWrites = GL_TRUE; | |||
imesa->regs.s4.zBufCtrl.ni.zBufEn = GL_TRUE; | |||
} | |||
else if (imesa->glCtx->Stencil.Enabled && imesa->hw_stencil) | |||
else if (imesa->glCtx->Stencil._Enabled && imesa->hw_stencil) | |||
{ | |||
/* Need to keep Z on for Stencil. */ | |||
imesa->regs.s4.zBufCtrl.ni.zCmpFunc = CF_Always; | |||
@@ -1092,7 +1092,7 @@ static void savageDDEnable_s4(GLcontext *ctx, GLenum cap, GLboolean state) | |||
FALLBACK (ctx, SAVAGE_FALLBACK_STENCIL, state); | |||
else { | |||
imesa->regs.s4.stencilCtrl.ni.stencilEn = state; | |||
if (ctx->Stencil.Enabled && | |||
if (ctx->Stencil._Enabled && | |||
imesa->regs.s4.zBufCtrl.ni.zBufEn != GL_TRUE) | |||
{ | |||
/* Stencil buffer requires Z enabled. */ |
@@ -610,7 +610,7 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y, | |||
ctx->Depth.Test || | |||
ctx->Fog.Enabled || | |||
ctx->Scissor.Enabled || | |||
ctx->Stencil.Enabled || | |||
ctx->Stencil._Enabled || | |||
!ctx->Color.ColorMask[0] || | |||
!ctx->Color.ColorMask[1] || | |||
!ctx->Color.ColorMask[2] || |
@@ -740,7 +740,7 @@ void tdfxEmitHwStateLocked( tdfxContextPtr fxMesa ) | |||
} | |||
if ( fxMesa->dirty & TDFX_UPLOAD_STENCIL ) { | |||
if (fxMesa->glCtx->Stencil.Enabled) { | |||
if (fxMesa->glCtx->Stencil._Enabled) { | |||
fxMesa->Glide.grEnable(GR_STENCIL_MODE_EXT); | |||
fxMesa->Glide.grStencilOp(fxMesa->Stencil.FailFunc, | |||
fxMesa->Stencil.ZFailFunc, |
@@ -459,7 +459,7 @@ static void tdfxUpdateStencil( GLcontext *ctx ) | |||
} | |||
if (fxMesa->haveHwStencil) { | |||
if (ctx->Stencil.Enabled) { | |||
if (ctx->Stencil._Enabled) { | |||
fxMesa->Stencil.Function = ctx->Stencil.Function[0] - GL_NEVER + GR_CMP_NEVER; | |||
fxMesa->Stencil.RefValue = ctx->Stencil.Ref[0] & 0xff; | |||
fxMesa->Stencil.ValueMask = ctx->Stencil.ValueMask[0] & 0xff; |
@@ -1342,7 +1342,7 @@ static void viaChooseStencilState(GLcontext *ctx) | |||
{ | |||
struct via_context *vmesa = VIA_CONTEXT(ctx); | |||
if (ctx->Stencil.Enabled) { | |||
if (ctx->Stencil._Enabled) { | |||
GLuint temp; | |||
vmesa->regEnable |= HC_HenST_MASK; |
@@ -472,7 +472,7 @@ static void GGItriangle_flat_depth(GLcontext *ctx, const SWvertex *v0, const SWv | |||
static swrast_tri_func ggimesa_stubs_get_triangle_func(GLcontext *ctx) | |||
{ | |||
if (ctx->Stencil.Enabled) return NULL; | |||
if (ctx->Stencil._Enabled) return NULL; | |||
if (ctx->Polygon.SmoothFlag) return NULL; | |||
if (ctx->Polygon.StippleFlag) return NULL; | |||
if (ctx->Texture._ReallyEnabled) return NULL; |
@@ -1948,7 +1948,7 @@ fx_check_IsInHardware(GLcontext * ctx) | |||
return FX_FALLBACK_RENDER_MODE; | |||
} | |||
if (ctx->Stencil.Enabled && !fxMesa->haveHwStencil) { | |||
if (ctx->Stencil._Enabled && !fxMesa->haveHwStencil) { | |||
return FX_FALLBACK_STENCIL; | |||
} | |||
@@ -61,7 +61,7 @@ _swrast_update_rasterflags( GLcontext *ctx ) | |||
if (ctx->Depth.Test) rasterMask |= DEPTH_BIT; | |||
if (swrast->_FogEnabled) rasterMask |= FOG_BIT; | |||
if (ctx->Scissor.Enabled) rasterMask |= CLIP_BIT; | |||
if (ctx->Stencil.Enabled) rasterMask |= STENCIL_BIT; | |||
if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT; | |||
if (ctx->Visual.rgbMode) { | |||
const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); | |||
if (colorMask != 0xffffffff) rasterMask |= MASKING_BIT; |
@@ -846,11 +846,11 @@ _swrast_write_index_span( GLcontext *ctx, SWspan *span) | |||
} | |||
/* Stencil and Z testing */ | |||
if (ctx->Depth.Test || ctx->Stencil.Enabled) { | |||
if (ctx->Stencil._Enabled || ctx->Depth.Test) { | |||
if (!(span->arrayMask & SPAN_Z)) | |||
_swrast_span_interpolate_z(ctx, span); | |||
if (ctx->Stencil.Enabled) { | |||
if (ctx->Stencil._Enabled) { | |||
if (!_swrast_stencil_and_ztest_span(ctx, span)) { | |||
span->arrayMask = origArrayMask; | |||
return; | |||
@@ -1317,11 +1317,11 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) | |||
} | |||
/* Stencil and Z testing */ | |||
if (ctx->Stencil.Enabled || ctx->Depth.Test) { | |||
if (ctx->Stencil._Enabled || ctx->Depth.Test) { | |||
if (!(span->arrayMask & SPAN_Z)) | |||
_swrast_span_interpolate_z(ctx, span); | |||
if (ctx->Stencil.Enabled && fb->Visual.stencilBits > 0) { | |||
if (ctx->Stencil._Enabled) { | |||
/* Combined Z/stencil tests */ | |||
if (!_swrast_stencil_and_ztest_span(ctx, span)) { | |||
/* all fragments failed test */ |
@@ -1022,7 +1022,7 @@ _swrast_choose_triangle( GLcontext *ctx ) | |||
ctx->Depth.Test && | |||
ctx->Depth.Mask == GL_FALSE && | |||
ctx->Depth.Func == GL_LESS && | |||
!ctx->Stencil.Enabled) { | |||
!ctx->Stencil._Enabled) { | |||
if ((rgbmode && | |||
ctx->Color.ColorMask[0] == 0 && | |||
ctx->Color.ColorMask[1] == 0 && |