summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_eval_api.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-04-30 21:08:51 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-04-30 21:08:51 +0000
commit0e14d6d68eae5b9a3f8d21d63d8129db947e3580 (patch)
treed13e7d5bbac6a09c4e2eaa82013d4ef2e2cea4c5 /src/mesa/tnl/t_eval_api.c
parent16837e4219e03df36c34f08cee1967b946c44536 (diff)
Lots more eval fixes
Diffstat (limited to 'src/mesa/tnl/t_eval_api.c')
-rw-r--r--src/mesa/tnl/t_eval_api.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_eval_api.c b/src/mesa/tnl/t_eval_api.c
index 10700e8329..798b8f46e2 100644
--- a/src/mesa/tnl/t_eval_api.c
+++ b/src/mesa/tnl/t_eval_api.c
@@ -1,4 +1,4 @@
-/* $Id: t_eval_api.c,v 1.4 2001/03/12 00:48:43 gareth Exp $ */
+/* $Id: t_eval_api.c,v 1.5 2001/04/30 21:08:52 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -61,6 +61,8 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
GLenum prim;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ fprintf(stderr, "%s\n", __FUNCTION__);
+
switch (mode) {
case GL_POINT:
prim = GL_POINTS;
@@ -95,6 +97,7 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
if (compiling) {
FLUSH_VERTICES( ctx, 0 );
SET_IMMEDIATE( ctx, _tnl_alloc_immediate( ctx ) );
+ TNL_CURRENT_IM(ctx)->ref_count++;
ctx->CompileFlag = GL_FALSE;
}
@@ -104,8 +107,12 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
}
_tnl_end(ctx);
+ /* Need this for replay *and* compile:
+ */
+ FLUSH_VERTICES( ctx, 0 );
+
if (compiling) {
- FLUSH_VERTICES( ctx, 0 );
+ TNL_CURRENT_IM(ctx)->ref_count--;
ASSERT( TNL_CURRENT_IM(ctx)->ref_count == 0 );
_tnl_free_immediate( TNL_CURRENT_IM(ctx) );
SET_IMMEDIATE( ctx, im );
@@ -124,6 +131,8 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
GLfloat u, du, v, dv, v1, u1;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ fprintf(stderr, "%s\n", __FUNCTION__);
+
/* No effect if vertex maps disabled.
*/
if (!ctx->Eval.Map2Vertex4 && !ctx->Eval.Map2Vertex3)
@@ -146,6 +155,7 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
if (compiling) {
FLUSH_VERTICES( ctx, 0 );
SET_IMMEDIATE( ctx, _tnl_alloc_immediate( ctx ) );
+ TNL_CURRENT_IM(ctx)->ref_count++;
ctx->CompileFlag = GL_FALSE;
}
@@ -190,8 +200,12 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
return;
}
+ /* Need this for replay *and* compile:
+ */
+ FLUSH_VERTICES( ctx, 0 );
+
if (compiling) {
- FLUSH_VERTICES( ctx, 0 );
+ TNL_CURRENT_IM(ctx)->ref_count--;
_tnl_free_immediate( TNL_CURRENT_IM( ctx ) );
SET_IMMEDIATE( ctx, im );
ctx->CompileFlag = GL_TRUE;