diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/api_noop.c | 1 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 5 | ||||
-rw-r--r-- | src/mesa/main/dlist.c | 18 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt.c | 1 | ||||
-rw-r--r-- | src/mesa/main/vtxfmt_tmp.h | 7 |
5 files changed, 15 insertions, 17 deletions
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index 8cdbecc1e6e..74af0fc9b56 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -799,6 +799,7 @@ void _mesa_noop_vtxfmt_init( GLvertexformat *vfmt ) vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ vfmt->Begin = _mesa_noop_Begin; vfmt->CallList = _mesa_CallList; + vfmt->CallLists = _mesa_CallLists; vfmt->Color3f = _mesa_noop_Color3f; vfmt->Color3fv = _mesa_noop_Color3fv; vfmt->Color4f = _mesa_noop_Color4f; diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index dab3d1d9ae6..e14ae7f1a68 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -950,6 +950,7 @@ typedef struct { void (*Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); void (*Vertex4fv)( const GLfloat * ); void (*CallList)( GLuint ); /* NOTE */ + void (*CallLists)( GLsizei, GLenum, const GLvoid * ); /* NOTE */ void (*Begin)( GLenum ); void (*End)( void ); void (*VertexAttrib1fNV)( GLuint index, GLfloat x ); @@ -968,10 +969,6 @@ typedef struct { /** * \name Array - * - * These may or may not belong here. Heuristic: if an array is - * enabled, the installed vertex format should support that array and - * its current size natively. */ /*@{*/ void (*DrawArrays)( GLenum mode, GLint start, GLsizei count ); diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index ef5f6b1bfe9..095ec45f057 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -1017,8 +1017,7 @@ void _mesa_save_CallList( GLuint list ) { GET_CURRENT_CONTEXT(ctx); Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); + SAVE_FLUSH_VERTICES(ctx); n = ALLOC_INSTRUCTION( ctx, OPCODE_CALL_LIST, 1 ); if (n) { @@ -1041,8 +1040,7 @@ void _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists ) GLint i; GLboolean typeErrorFlag; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); + SAVE_FLUSH_VERTICES(ctx); switch (type) { case GL_BYTE: @@ -1222,7 +1220,6 @@ static void save_ColorMaterial( GLenum face, GLenum mode ) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); n = ALLOC_INSTRUCTION( ctx, OPCODE_COLOR_MATERIAL, 2 ); if (n) { @@ -2788,7 +2785,6 @@ static void save_PopMatrix( void ) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); (void) ALLOC_INSTRUCTION( ctx, OPCODE_POP_MATRIX, 0 ); if (ctx->ExecuteFlag) { (*ctx->Exec->PopMatrix)(); @@ -2833,7 +2829,6 @@ static void save_PushAttrib( GLbitfield mask ) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); n = ALLOC_INSTRUCTION( ctx, OPCODE_PUSH_ATTRIB, 1 ); if (n) { n[1].bf = mask; @@ -2875,7 +2870,6 @@ static void save_RasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); n = ALLOC_INSTRUCTION( ctx, OPCODE_RASTER_POS, 4 ); if (n) { n[1].f = x; @@ -3615,7 +3609,6 @@ static void save_WindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w ) GET_CURRENT_CONTEXT(ctx); Node *n; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - FLUSH_CURRENT(ctx, 0); n = ALLOC_INSTRUCTION( ctx, OPCODE_WINDOW_POS, 4 ); if (n) { n[1].f = x; @@ -6161,9 +6154,7 @@ _mesa_NewList( GLuint list, GLenum mode ) /* - * End definition of current display list. Is the current - * ASSERT_OUTSIDE_BEGIN_END strong enough to really guarentee that - * we are outside begin/end calls? + * End definition of current display list. */ void _mesa_EndList( void ) @@ -7728,7 +7719,8 @@ void _mesa_save_vtxfmt_init( GLvertexformat *vfmt ) { vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ vfmt->Begin = save_Begin; - vfmt->CallList = _mesa_CallList; + vfmt->CallList = _mesa_save_CallList; + vfmt->CallLists = _mesa_save_CallLists; vfmt->Color3f = save_Color3f; vfmt->Color3fv = save_Color3fv; vfmt->Color4f = save_Color4f; diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index 564885b697d..b9e3f2ef603 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -119,6 +119,7 @@ static void install_vtxfmt( struct _glapi_table *tab, GLvertexformat *vfmt ) tab->Vertex4f = vfmt->Vertex4f; tab->Vertex4fv = vfmt->Vertex4fv; tab->CallList = vfmt->CallList; + tab->CallLists = vfmt->CallLists; tab->Begin = vfmt->Begin; tab->End = vfmt->End; tab->VertexAttrib1fNV = vfmt->VertexAttrib1fNV; diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h index 8cc7ffa905d..3cbd278371c 100644 --- a/src/mesa/main/vtxfmt_tmp.h +++ b/src/mesa/main/vtxfmt_tmp.h @@ -302,6 +302,12 @@ static void TAG(CallList)( GLuint i ) _glapi_Dispatch->CallList( i ); } +static void TAG(CallLists)( GLsizei sz, GLenum type, const GLvoid *v ) +{ + PRE_LOOPBACK( CallLists ); + _glapi_Dispatch->CallLists( sz, type, v ); +} + static void TAG(Begin)( GLenum mode ) { PRE_LOOPBACK( Begin ); @@ -449,6 +455,7 @@ static GLvertexformat TAG(vtxfmt) = { TAG(Vertex4f), TAG(Vertex4fv), TAG(CallList), + TAG(CallLists), TAG(Begin), TAG(End), TAG(VertexAttrib1fNV), |