summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-05-04 20:11:35 +0000
committerBrian Paul <[email protected]>2005-05-04 20:11:35 +0000
commite4b2356c07d31fbeeabb13b2fb47db703b473080 (patch)
treed8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/swrast/s_context.c
parentebef61f5c0950572f9c6a81b08f447957461675c (diff)
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r--src/mesa/swrast/s_context.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index f6dcdbb9644..00c4ae4bc9c 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -73,11 +73,6 @@ _swrast_update_rasterflags( GLcontext *ctx )
if (ctx->Color.IndexLogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
}
- if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
- && ctx->Color.ColorMask[ACOMP]
- && ctx->Color.DrawBuffer != GL_NONE)
- rasterMask |= ALPHABUF_BIT;
-
if ( ctx->Viewport.X < 0
|| ctx->Viewport.X + ctx->Viewport.Width > (GLint) ctx->DrawBuffer->Width
|| ctx->Viewport.Y < 0
@@ -93,7 +88,9 @@ _swrast_update_rasterflags( GLcontext *ctx )
* MULTI_DRAW_BIT flag. Also set it if we're drawing to no
* buffers or the RGBA or CI mask disables all writes.
*/
- if (_mesa_bitcount(ctx->Color._DrawDestMask[0]) != 1) {
+#if NEW_RENDERBUFFER
+ if (ctx->DrawBuffer->_NumColorDrawBuffers[0] != 1) {
+#endif
/* more than one color buffer designated for writing (or zero buffers) */
rasterMask |= MULTI_DRAW_BIT;
}
@@ -446,26 +443,6 @@ _swrast_invalidate_state( GLcontext *ctx, GLuint new_state )
if (new_state & _SWRAST_NEW_TEXTURE_SAMPLE_FUNC)
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
swrast->TextureSample[i] = _swrast_validate_texture_sample;
-
- /* Debug checks */
- if (ctx->Visual.rgbMode) {
- ASSERT(swrast->Driver.WriteRGBASpan);
- ASSERT(swrast->Driver.WriteRGBSpan);
- ASSERT(swrast->Driver.WriteMonoRGBASpan);
- ASSERT(swrast->Driver.WriteRGBAPixels);
- ASSERT(swrast->Driver.WriteMonoRGBAPixels);
- ASSERT(swrast->Driver.ReadRGBASpan);
- ASSERT(swrast->Driver.ReadRGBAPixels);
- }
- else {
- ASSERT(swrast->Driver.WriteCI32Span);
- ASSERT(swrast->Driver.WriteCI8Span);
- ASSERT(swrast->Driver.WriteMonoCISpan);
- ASSERT(swrast->Driver.WriteCI32Pixels);
- ASSERT(swrast->Driver.WriteMonoCIPixels);
- ASSERT(swrast->Driver.ReadCI32Span);
- ASSERT(swrast->Driver.ReadCI32Pixels);
- }
}
@@ -625,12 +602,12 @@ _swrast_CreateContext( GLcontext *ctx )
swrast->AllowPixelFog = GL_TRUE;
if (ctx->Visual.doubleBufferMode)
- swrast->CurrentBufferBit = DD_BACK_LEFT_BIT;
+ swrast->CurrentBufferBit = BUFFER_BIT_BACK_LEFT;
else
- swrast->CurrentBufferBit = DD_FRONT_LEFT_BIT;
+ swrast->CurrentBufferBit = BUFFER_FRONT_LEFT;
/* Optimized Accum buffer */
- swrast->_IntegerAccumMode = GL_TRUE;
+ swrast->_IntegerAccumMode = GL_FALSE;
swrast->_IntegerAccumScaler = 0.0;
for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)