mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
vbo: simplify some code in vbo_exec_End()
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
This commit is contained in:
parent
d916175c4d
commit
002c5c1da3
1 changed files with 3 additions and 4 deletions
|
|
@ -821,11 +821,10 @@ static void GLAPIENTRY vbo_exec_End( void )
|
|||
|
||||
if (exec->vtx.prim_count > 0) {
|
||||
/* close off current primitive */
|
||||
int idx = exec->vtx.vert_count;
|
||||
int i = exec->vtx.prim_count - 1;
|
||||
struct _mesa_prim *last_prim = &exec->vtx.prim[exec->vtx.prim_count - 1];
|
||||
|
||||
exec->vtx.prim[i].end = 1;
|
||||
exec->vtx.prim[i].count = idx - exec->vtx.prim[i].start;
|
||||
last_prim->end = 1;
|
||||
last_prim->count = exec->vtx.vert_count - last_prim->start;
|
||||
|
||||
try_vbo_merge(exec);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue