vbo: minor code simplification in _save_compile_vertex_list()
authorBrian Paul <brianp@vmware.com>
Fri, 12 Jan 2018 16:56:42 +0000 (09:56 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 17 Jan 2018 18:17:56 +0000 (11:17 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/vbo/vbo_save_api.c

index 84d8d1e05231bbd3cf9910a746fe16a4c142eb3b..cb48cb8d1e1134a99c03359b3ae16a4035528339 100644 (file)
@@ -501,10 +501,11 @@ _save_compile_vertex_list(struct gl_context *ctx)
 
       _glapi_set_dispatch(ctx->Exec);
 
-      vbo_loopback_vertex_list(ctx,
-                               (const GLfloat *) ((const char *) save->
-                                                  vertex_store->buffer_map +
-                                                  node->buffer_offset),
+      const GLfloat *buffer = (const GLfloat *)
+         ((const char *) save->vertex_store->buffer_map +
+          node->buffer_offset);
+
+      vbo_loopback_vertex_list(ctx, buffer,
                                node->attrsz, node->prims, node->prim_count,
                                node->wrap_count, node->vertex_size);