summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-10-10 13:05:40 +0000
committerKeith Whitwell <[email protected]>2003-10-10 13:05:40 +0000
commit1b8c209523187ed08589a8c54af4b2ddfd268fab (patch)
treec39d26d38f75e13dd8fde19b6e26b193d57fa521 /src/mesa
parentd46adad5cdbd4800523beb980542dabe0b7663a6 (diff)
Fallback (opcode-based) display lists are working.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c4
-rw-r--r--src/mesa/main/dlist.c41
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/tnl/t_save_api.c4
4 files changed, 29 insertions, 21 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ce3514213b4..cdf0c3a55ac 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1422,15 +1422,13 @@ _mesa_initialize_context( GLcontext *ctx,
#if _HAVE_FULL_GL
_mesa_init_dlist_table(ctx->Save, dispatchSize);
+ _mesa_install_save_vtxfmt( ctx, &ctx->ListVtxfmt );
- ctx->ExecPrefersFloat = GL_FALSE;
- ctx->SavePrefersFloat = GL_FALSE;
/* Neutral tnl module stuff */
_mesa_init_exec_vtxfmt( ctx );
ctx->TnlModule.Current = NULL;
ctx->TnlModule.SwapCount = 0;
-
#endif
return GL_TRUE;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 895739e8ddd..5000177562a 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -4843,6 +4843,7 @@ static void save_End( void )
{
GET_CURRENT_CONTEXT(ctx);
ALLOC_INSTRUCTION( ctx, OPCODE_END, 0 );
+ ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
if (ctx->ExecuteFlag) {
(*ctx->Exec->End)( );
}
@@ -7650,21 +7651,6 @@ void mesa_print_display_list( GLuint list )
/***** Initialization *****/
/**********************************************************************/
-void _mesa_init_display_list( GLcontext * ctx )
-{
- /* Display list */
- ctx->CallDepth = 0;
- ctx->ExecuteFlag = GL_TRUE;
- ctx->CompileFlag = GL_FALSE;
- ctx->CurrentListPtr = NULL;
- ctx->CurrentBlock = NULL;
- ctx->CurrentListNum = 0;
- ctx->CurrentPos = 0;
-
- /* Display List group */
- ctx->List.ListBase = 0;
-}
-
void _mesa_save_vtxfmt_init( GLvertexformat *vfmt )
{
@@ -7732,7 +7718,26 @@ void _mesa_save_vtxfmt_init( GLvertexformat *vfmt )
* runtime outside-begin-end checks. As these functions aren't
* actually needed at this point, I'll punt on that for now:
*/
- vfmt->DrawArrays = 0;
- vfmt->DrawElements = 0;
- vfmt->DrawRangeElements = 0;
+ vfmt->DrawArrays = 1;
+ vfmt->DrawElements = 1;
+ vfmt->DrawRangeElements = 1;
+}
+
+
+
+void _mesa_init_display_list( GLcontext * ctx )
+{
+ /* Display list */
+ ctx->CallDepth = 0;
+ ctx->ExecuteFlag = GL_TRUE;
+ ctx->CompileFlag = GL_FALSE;
+ ctx->CurrentListPtr = NULL;
+ ctx->CurrentBlock = NULL;
+ ctx->CurrentListNum = 0;
+ ctx->CurrentPos = 0;
+
+ /* Display List group */
+ ctx->List.ListBase = 0;
+
+ _mesa_save_vtxfmt_init( &ctx->ListVtxfmt );
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5941e87f485..840c9a3eb51 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2089,6 +2089,7 @@ struct __GLcontextRec {
GLuint CurrentListNum; /**< Number of the list being compiled */
Node *CurrentBlock; /**< Pointer to current block of nodes */
GLuint CurrentPos; /**< Index into current block of nodes */
+ GLvertexformat ListVtxfmt;
/*@}*/
/** Extensions */
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index 6fdf308fd4f..47cea267a04 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -1029,6 +1029,8 @@ static void _save_NotifyBegin( GLenum mode )
tnl->save.prim[i].mode = mode | PRIM_BEGIN;
tnl->save.prim[i].start = tnl->save.initial_counter - tnl->save.counter;
tnl->save.prim[i].count = 0;
+
+ ctx->Driver.SaveNeedFlush = 1;
}
@@ -1226,6 +1228,8 @@ void _tnl_SaveFlushVertices( GLcontext *ctx )
tnl->save.attrsz[i] = 0;
tnl->save.vertex_size = 0;
+
+ ctx->Driver.SaveNeedFlush = 0;
}
static void