diff options
author | Keith Whitwell <[email protected]> | 2000-11-13 20:02:56 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2000-11-13 20:02:56 +0000 |
commit | 1e1aac034c986a08248861363c0baa27dc2ae2d5 (patch) | |
tree | d6aa2dd575eae913007d089928d765be8c867126 /src/mesa/swrast/s_stencil.c | |
parent | 6b8ae62d6b6a3b06c51628123fc30634cacf9c7c (diff) |
Cleanup of derived state calculation prior to seperating software T&L
into a new directory. Specifically the handling of changes to lighting
lighting space (light in model vs. light in eye) have been revamped.
Moved several derived values used only by swrast into that directory.
Removed direct calls to swrast_flush() from vbrender.c -- pushed into
ctx->Driver.RenderFinish.
Optimized flat-shading case in swrast_setup.
Diffstat (limited to 'src/mesa/swrast/s_stencil.c')
-rw-r--r-- | src/mesa/swrast/s_stencil.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index 80839451cba..aed107ca003 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -1,4 +1,4 @@ -/* $Id: s_stencil.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */ +/* $Id: s_stencil.c,v 1.3 2000/11/13 20:02:57 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -1137,15 +1137,15 @@ clear_software_stencil_buffer( GLcontext *ctx ) if (ctx->Scissor.Enabled) { /* clear scissor region only */ - const GLint width = ctx->DrawBuffer->Xmax - ctx->DrawBuffer->Xmin; + const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; if (ctx->Stencil.WriteMask != STENCIL_MAX) { /* must apply mask to the clear */ GLint y; - for (y = ctx->DrawBuffer->Ymin; y < ctx->DrawBuffer->Ymax; y++) { + for (y = ctx->DrawBuffer->_Ymin; y < ctx->DrawBuffer->_Ymax; y++) { const GLstencil mask = ctx->Stencil.WriteMask; const GLstencil invMask = ~mask; const GLstencil clearVal = (ctx->Stencil.Clear & mask); - GLstencil *stencil = STENCIL_ADDRESS( ctx->DrawBuffer->Xmin, y ); + GLstencil *stencil = STENCIL_ADDRESS( ctx->DrawBuffer->_Xmin, y ); GLint i; for (i = 0; i < width; i++) { stencil[i] = (stencil[i] & invMask) | clearVal; @@ -1155,8 +1155,8 @@ clear_software_stencil_buffer( GLcontext *ctx ) else { /* no masking */ GLint y; - for (y = ctx->DrawBuffer->Ymin; y < ctx->DrawBuffer->Ymax; y++) { - GLstencil *stencil = STENCIL_ADDRESS( ctx->DrawBuffer->Xmin, y ); + for (y = ctx->DrawBuffer->_Ymin; y < ctx->DrawBuffer->_Ymax; y++) { + GLstencil *stencil = STENCIL_ADDRESS( ctx->DrawBuffer->_Xmin, y ); #if STENCIL_BITS==8 MEMSET( stencil, ctx->Stencil.Clear, width * sizeof(GLstencil) ); #else @@ -1217,12 +1217,12 @@ clear_hardware_stencil_buffer( GLcontext *ctx ) if (ctx->Scissor.Enabled) { /* clear scissor region only */ - const GLint x = ctx->DrawBuffer->Xmin; - const GLint width = ctx->DrawBuffer->Xmax - ctx->DrawBuffer->Xmin; + const GLint x = ctx->DrawBuffer->_Xmin; + const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; if (ctx->Stencil.WriteMask != STENCIL_MAX) { /* must apply mask to the clear */ GLint y; - for (y = ctx->DrawBuffer->Ymin; y < ctx->DrawBuffer->Ymax; y++) { + for (y = ctx->DrawBuffer->_Ymin; y < ctx->DrawBuffer->_Ymax; y++) { const GLstencil mask = ctx->Stencil.WriteMask; const GLstencil invMask = ~mask; const GLstencil clearVal = (ctx->Stencil.Clear & mask); @@ -1242,7 +1242,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx ) for (i = 0; i < width; i++) { stencil[i] = ctx->Stencil.Clear; } - for (y = ctx->DrawBuffer->Ymin; y < ctx->DrawBuffer->Ymax; y++) { + for (y = ctx->DrawBuffer->_Ymin; y < ctx->DrawBuffer->_Ymax; y++) { (*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL); } } @@ -1256,7 +1256,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx ) const GLstencil clearVal = (ctx->Stencil.Clear & mask); const GLint width = ctx->DrawBuffer->Width; const GLint height = ctx->DrawBuffer->Height; - const GLint x = ctx->DrawBuffer->Xmin; + const GLint x = ctx->DrawBuffer->_Xmin; GLint y; for (y = 0; y < height; y++) { GLstencil stencil[MAX_WIDTH]; @@ -1272,7 +1272,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx ) /* clear whole buffer without masking */ const GLint width = ctx->DrawBuffer->Width; const GLint height = ctx->DrawBuffer->Width; - const GLint x = ctx->DrawBuffer->Xmin; + const GLint x = ctx->DrawBuffer->_Xmin; GLstencil stencil[MAX_WIDTH]; GLint y, i; for (i = 0; i < width; i++) { |