diff options
author | Brian Paul <brianp@vmware.com> | 2015-10-15 20:33:52 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2015-10-20 12:52:41 -0600 |
commit | 002c5c1da3a2db60607fb184b9c6343415987fb5 (patch) | |
tree | 7b3c9018d632f033dd4a2f6d42985f0e548b1e54 | |
parent | d916175c4d965942325bbb4a684fac45fb6ab9e2 (diff) | |
download | external_mesa3d-002c5c1da3a2db60607fb184b9c6343415987fb5.zip external_mesa3d-002c5c1da3a2db60607fb184b9c6343415987fb5.tar.gz external_mesa3d-002c5c1da3a2db60607fb184b9c6343415987fb5.tar.bz2 |
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>
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index f519f8a..3f87ac4 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -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); } |