mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
virgl: unmap uploader at flush time
This should save some memory when allocating and freeing transfers. Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
This commit is contained in:
parent
14f265b533
commit
d5c2dacc15
1 changed files with 3 additions and 2 deletions
|
|
@ -730,8 +730,6 @@ static void virgl_draw_vbo(struct pipe_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
u_upload_unmap(vctx->uploader);
|
||||
|
||||
vctx->num_draws++;
|
||||
virgl_hw_set_vertex_buffers(vctx);
|
||||
if (info.index_size)
|
||||
|
|
@ -749,6 +747,9 @@ static void virgl_flush_eq(struct virgl_context *ctx, void *closure,
|
|||
struct virgl_screen *rs = virgl_screen(ctx->base.screen);
|
||||
int out_fence_fd = -1;
|
||||
|
||||
if (ctx->num_draws)
|
||||
u_upload_unmap(ctx->uploader);
|
||||
|
||||
/* send the buffer to the remote side for decoding */
|
||||
ctx->num_transfers = ctx->num_draws = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue