summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-10-17 00:24:11 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-10-17 00:24:11 +0000
commit03614d2f33f4e970a18b8c240f236df46ea68fb9 (patch)
treec01ffaf608cef9cbcbe6c69789f28140900a0bd0
parente17c1d2202bb65fd7bc4797ebfc1331fccad2995 (diff)
sync with DRI tdfx3 branch
-rw-r--r--src/mesa/main/accum.c11
-rw-r--r--src/mesa/main/buffers.c7
-rw-r--r--src/mesa/main/context.c1
-rw-r--r--src/mesa/main/drawpix.c5
-rw-r--r--src/mesa/main/fog.c8
-rw-r--r--src/mesa/main/state.c1
6 files changed, 24 insertions, 9 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 79733d6aca3..2c5ad817d7c 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,8 +1,8 @@
-/* $Id: accum.c,v 1.23 2000/07/15 03:14:25 brianp Exp $ */
+/* $Id: accum.c,v 1.23.2.1 2000/10/17 00:24:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.4
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
@@ -235,6 +235,8 @@ _mesa_Accum( GLenum op, GLfloat value )
if (ctx->IntegerAccumMode && value != ctx->IntegerAccumScaler)
rescale_accum(ctx);
+ RENDER_START(ctx);
+
if (ctx->IntegerAccumMode) {
/* simply add integer color values into accum buffer */
GLuint j;
@@ -278,6 +280,7 @@ _mesa_Accum( GLenum op, GLfloat value )
/* restore read buffer = draw buffer (the default) */
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
ctx->Color.DriverDrawBuffer );
+ RENDER_FINISH(ctx);
break;
case GL_LOAD:
@@ -298,6 +301,7 @@ _mesa_Accum( GLenum op, GLfloat value )
ctx->IntegerAccumScaler = 0.0;
}
+ RENDER_START(ctx);
if (ctx->IntegerAccumMode) {
/* just copy values into accum buffer */
GLuint j;
@@ -341,6 +345,7 @@ _mesa_Accum( GLenum op, GLfloat value )
/* restore read buffer = draw buffer (the default) */
(*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
ctx->Color.DriverDrawBuffer );
+ RENDER_FINISH(ctx);
break;
case GL_RETURN:
@@ -348,6 +353,7 @@ _mesa_Accum( GLenum op, GLfloat value )
if (ctx->IntegerAccumMode && value != 1.0)
rescale_accum(ctx);
+ RENDER_START(ctx);
if (ctx->IntegerAccumMode && ctx->IntegerAccumScaler > 0) {
/* build lookup table to avoid many floating point multiplies */
const GLfloat mult = ctx->IntegerAccumScaler;
@@ -411,6 +417,7 @@ _mesa_Accum( GLenum op, GLfloat value )
ypos++;
}
}
+ RENDER_FINISH(ctx);
break;
default:
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 566afed929a..5893b907bfc 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,7 +1,8 @@
+/* $Id: buffers.c,v 1.9.4.1 2000/10/17 00:24:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.4
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
@@ -287,6 +288,8 @@ _mesa_Clear( GLbitfield mask )
}
#endif
+ RENDER_START(ctx);
+
/* do software clearing here */
if (newMask) {
if (newMask & ctx->Color.DrawDestMask) clear_color_buffers(ctx);
@@ -302,6 +305,8 @@ _mesa_Clear( GLbitfield mask )
_mesa_clear_alpha_buffers( ctx );
}
+ RENDER_FINISH(ctx);
+
#ifdef PROFILE
ctx->ClearTime += gl_time() - t0;
ctx->ClearCount++;
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 4d4a5974cd0..96733912982 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,3 +1,4 @@
+/* $Id: context.c,v 1.79.2.5 2000/10/17 00:24:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index c816ab5a3fa..c4951e1ec5c 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.26.4.5 2000/10/05 16:47:23 brianp Exp $ */
+/* $Id: drawpix.c,v 1.26.4.6 2000/10/17 00:24:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -823,6 +823,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
return;
}
+ RENDER_START(ctx);
switch (format) {
case GL_STENCIL_INDEX:
draw_stencil_pixels( ctx, x, y, width, height, type, pixels );
@@ -851,8 +852,8 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" );
- return;
}
+ RENDER_FINISH(ctx);
}
else if (ctx->RenderMode==GL_FEEDBACK) {
if (ctx->Current.RasterPosValid) {
diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c
index 3479b3bd000..952a9f19bcc 100644
--- a/src/mesa/main/fog.c
+++ b/src/mesa/main/fog.c
@@ -1,8 +1,8 @@
-/* $Id: fog.c,v 1.19 2000/07/07 15:10:35 keithw Exp $ */
+/* $Id: fog.c,v 1.19.4.1 2000/10/17 00:24:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.4
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
@@ -331,7 +331,7 @@ _mesa_fog_rgba_pixels( const GLcontext *ctx,
GLfloat eyez = d / (c+ndcz);
GLfloat f, g;
GLfloat tmp = negDensitySquared * eyez * eyez;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__alpha)
/* XXX this underflow check may be needed for other systems */
if (tmp < FLT_MIN_10_EXP)
f = exp( FLT_MIN_10_EXP );
@@ -410,7 +410,7 @@ _mesa_fog_ci_pixels( const GLcontext *ctx,
if (eyez < 0.0)
eyez = -eyez;
tmp = negDensitySquared * eyez * eyez;
-#ifdef __alpha__
+#if defined(__alpha__) || defined(__alpha)
/* XXX this underflow check may be needed for other systems */
if (tmp < FLT_MIN_10_EXP)
f = exp( FLT_MIN_10_EXP );
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 982a26b7cd1..34412118299 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -976,6 +976,7 @@ void gl_update_state( GLcontext *ctx )
}
}
+ ctx->Texture.ReallyEnabled = ctx->Enabled & ENABLE_TEX_ANY;
ctx->NeedNormals = (ctx->Light.Enabled || ctx->Texture.NeedNormals);
}