Catch no-op vertex buffers consisting only of vertices which will
also appear in a future buffer.
This commit is contained in:
parent
a85eb9c0a7
commit
a9a4c5489e
|
@ -259,15 +259,16 @@ static GLuint _tnl_copy_vertices( GLcontext *ctx )
|
|||
void _tnl_flush_vtx( GLcontext *ctx )
|
||||
{
|
||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||
GLuint vertex_count = tnl->vtx.initial_counter - tnl->vtx.counter;
|
||||
|
||||
if (0)
|
||||
_tnl_print_vtx( ctx );
|
||||
|
||||
if (tnl->vtx.prim_count &&
|
||||
tnl->vtx.counter != tnl->vtx.initial_counter) {
|
||||
if (tnl->vtx.prim_count && vertex_count) {
|
||||
|
||||
tnl->vtx.copied.nr = _tnl_copy_vertices( ctx );
|
||||
|
||||
if (tnl->vtx.copied.nr != vertex_count) {
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state( ctx );
|
||||
|
||||
|
@ -282,6 +283,7 @@ void _tnl_flush_vtx( GLcontext *ctx )
|
|||
tnl->Driver.RunPipeline( ctx );
|
||||
tnl->pipeline.run_input_changes |= tnl->pipeline.inputs;
|
||||
}
|
||||
}
|
||||
|
||||
tnl->vtx.prim_count = 0;
|
||||
tnl->vtx.counter = tnl->vtx.initial_counter;
|
||||
|
|
Loading…
Reference in New Issue