diff options
author | Gurchetan Singh <[email protected]> | 2019-01-07 18:19:03 -0800 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-02-15 11:19:04 +0100 |
commit | d5c2dacc155912ad6e78afe9022aabc9af6ee697 (patch) | |
tree | 8943291bc60d0323fe701f0ef43a0603a9568c82 /src | |
parent | 14f265b533217a9b63c5dbe48c3b326a5cd91d3b (diff) |
virgl: unmap uploader at flush time
This should save some memory when allocating and freeing transfers.
Reviewed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 9a91df49fe8..41201c59d1c 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -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; |