summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_validate.c3
-rw-r--r--src/mesa/main/buffers.c5
-rw-r--r--src/mesa/main/convolve.c4
-rw-r--r--src/mesa/main/dd.h27
-rw-r--r--src/mesa/main/fog.c14
-rw-r--r--src/mesa/main/mtypes.h3
6 files changed, 30 insertions, 26 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 2706c705fc..9f265381ae 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -1,5 +1,5 @@
-/* $Id: api_validate.c,v 1.2 2001/01/02 21:40:57 brianp Exp $ */
+/* $Id: api_validate.c,v 1.3 2001/01/05 02:26:48 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,6 +31,7 @@
#include "mtypes.h"
#include "state.h"
+
GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
GLenum mode, GLsizei count, GLenum type,
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index da1e6125c9..c67c8e865e 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,4 +1,4 @@
-/* $Id: buffers.c,v 1.21 2000/12/26 05:09:27 keithw Exp $ */
+/* $Id: buffers.c,v 1.22 2001/01/05 02:26:48 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -373,8 +373,9 @@ void
_mesa_ResizeBuffersMESA( void )
{
GLcontext *ctx = _mesa_get_current_context();
-
GLuint buf_width, buf_height;
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
+
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glResizeBuffersMESA\n");
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 24bdd9c4b0..1a32acb41e 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,4 +1,4 @@
-/* $Id: convolve.c,v 1.17 2000/12/26 05:09:28 keithw Exp $ */
+/* $Id: convolve.c,v 1.18 2001/01/05 02:26:48 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -268,7 +268,7 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
{
GET_CURRENT_CONTEXT(ctx);
GLuint c;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
switch (target) {
case GL_CONVOLUTION_1D:
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index cfac5f2ab2..9c600783dc 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1,4 +1,4 @@
-/* $Id: dd.h,v 1.44 2000/12/26 05:09:28 keithw Exp $ */
+/* $Id: dd.h,v 1.45 2001/01/05 02:26:48 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -126,13 +126,16 @@ struct gl_pixelstore_attrib;
*/
typedef void (*points_func)( GLcontext *ctx, GLuint first, GLuint last );
-typedef void (*line_func)( GLcontext *ctx, GLuint v1, GLuint v2, GLuint pv );
+typedef void (*line_func)( GLcontext *ctx, GLuint v1, GLuint v2 );
typedef void (*triangle_func)( GLcontext *ctx,
- GLuint v1, GLuint v2, GLuint v3, GLuint pv );
+ GLuint v1, GLuint v2, GLuint v3 );
typedef void (*quad_func)( GLcontext *ctx, GLuint v1, GLuint v2,
- GLuint v3, GLuint v4, GLuint pv );
+ GLuint v3, GLuint v4 );
+
+typedef void (*render_func)( GLcontext *ctx, GLuint start, GLuint count,
+ GLuint flags );
/*
@@ -758,19 +761,21 @@ struct dd_function_table {
triangle_func TriangleFunc;
quad_func QuadFunc;
+ render_func *RenderTabVerts;
+ render_func *RenderTabElts;
+
void (*ResetLineStipple)( GLcontext *ctx );
-
void (*BuildProjectedVertices)( GLcontext *ctx,
GLuint start, GLuint end,
GLuint new_inputs);
- /* This function, if not NULL, is called whenever new vertices are
- * required for rendering. The vertices in question are those n
- * such that start <= n < end. The new_inputs parameter indicates
- * those fields of the vertex which need to be updated, if only a
- * partial repair of the vertex is required.
+ /* This function is called whenever new vertices are required for
+ * rendering. The vertices in question are those n such that start
+ * <= n < end. The new_inputs parameter indicates those fields of
+ * the vertex which need to be updated, if only a partial repair of
+ * the vertex is required.
*
- * This function is called only from _tnl_render_stage in tnl/t_render.c.
+ * This function is called only from _tnl_render_stage in tnl/t_render.c.
*/
diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c
index 2a225d4d87..c0e4b4a907 100644
--- a/src/mesa/main/fog.c
+++ b/src/mesa/main/fog.c
@@ -1,4 +1,4 @@
-/* $Id: fog.c,v 1.31 2000/12/26 05:09:28 keithw Exp $ */
+/* $Id: fog.c,v 1.32 2001/01/05 02:26:48 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -89,8 +89,6 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
switch (pname) {
case GL_FOG_MODE:
m = (GLenum) (GLint) *params;
- if (ctx->Fog.Mode == m)
- return;
switch (m) {
case GL_LINEAR:
case GL_EXP:
@@ -100,6 +98,8 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
gl_error( ctx, GL_INVALID_ENUM, "glFog" );
return;
}
+ if (ctx->Fog.Mode == m)
+ return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Mode = m;
break;
@@ -132,7 +132,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
ctx->Fog.Index = *params;
break;
case GL_FOG_COLOR:
- if (TEST_EQ_4V(ctx->Fog.Color, params))
+ if (TEST_EQ_4V(ctx->Fog.Color, params))
return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Color[0] = params[0];
@@ -142,12 +142,12 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
break;
case GL_FOG_COORDINATE_SOURCE_EXT: {
GLenum p = (GLenum)(GLint) *params;
- if (ctx->Fog.FogCoordinateSource == p)
- return;
if (p != GL_FOG_COORDINATE_EXT && p != GL_FRAGMENT_DEPTH_EXT) {
gl_error( ctx, GL_INVALID_ENUM, "glFog" );
return;
}
+ if (ctx->Fog.FogCoordinateSource == p)
+ return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.FogCoordinateSource = p;
break;
@@ -160,8 +160,6 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
if (ctx->Driver.Fogfv) {
(*ctx->Driver.Fogfv)( ctx, pname, params );
}
-
- ctx->NewState |= _NEW_FOG;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 7992b00304..913c2f2fb5 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1,4 +1,4 @@
-/* $Id: mtypes.h,v 1.9 2001/01/02 22:02:51 brianp Exp $ */
+/* $Id: mtypes.h,v 1.10 2001/01/05 02:26:48 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -35,7 +35,6 @@
#include "glthread.h"
#include "math/m_matrix.h" /* GLmatrix */
-#include "math/m_translate.h" /* trans_XXX_func */
#if defined(MESA_TRACE)
#include "Trace/tr_context.h"