[Mesa-dev] [PATCH 07/10] vbo: simplify some code in vbo_exec_End()
Brian Paul
brianp at vmware.com
Fri Oct 16 14:25:14 PDT 2015
---
src/mesa/vbo/vbo_exec_api.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 2a78eac..903aa42 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -823,11 +823,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);
}
--
1.9.1
More information about the mesa-dev
mailing list