virgl: remove pointless transfer-counter
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 13 Mar 2019 16:25:41 +0000 (17:25 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 17 Apr 2019 07:27:07 +0000 (07:27 +0000)
This is only written to, never read. Let's just get rid of it.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/gallium/drivers/virgl/virgl_buffer.c
src/gallium/drivers/virgl/virgl_context.c
src/gallium/drivers/virgl/virgl_context.h
src/gallium/drivers/virgl/virgl_texture.c

index 784cc02a54586578ed8287aed93e2bcd78baeb67..7081c090814242d1cdce6f9f52fbd3e3aac45ca8 100644 (file)
@@ -88,7 +88,6 @@ static void virgl_buffer_transfer_unmap(struct pipe_context *ctx,
          trans->offset = transfer->box.x;
       }
 
-      vctx->num_transfers++;
       virgl_transfer_queue_unmap(&vctx->queue, trans);
    } else
       virgl_resource_destroy_transfer(&vctx->transfer_pool, trans);
index 5e608e47fd03d08cf0622918b1ca18772d58e0f3..b51886548925cf675f1e1f10862c60effce17211 100644 (file)
@@ -755,7 +755,7 @@ static void virgl_flush_eq(struct virgl_context *ctx, void *closure,
       u_upload_unmap(ctx->uploader);
 
    /* send the buffer to the remote side for decoding */
-   ctx->num_transfers = ctx->num_draws = ctx->num_compute = 0;
+   ctx->num_draws = ctx->num_compute = 0;
 
    virgl_transfer_queue_clear(&ctx->queue, ctx->cbuf);
    rs->vws->submit_cmd(rs->vws, ctx->cbuf, fence);
index f42a719966db46d7ee552ae4cedacf24643f49f9..1ac4ddb05416bef42b438b18eb7bc746f8632d2d 100644 (file)
@@ -82,7 +82,7 @@ struct virgl_context {
 
    struct pipe_resource *ssbos[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_BUFFERS];
    struct pipe_resource *images[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_BUFFERS];
-   uint32_t num_transfers, num_draws, num_compute;
+   uint32_t num_draws, num_compute;
 
    struct pipe_resource *atomic_buffers[PIPE_MAX_HW_ATOMIC_BUFFERS];
 
index 3871f265d4a759516174734f5d08d1d717e6b12d..12543eaeec45209e1edaed7376ffeb32a388457c 100644 (file)
@@ -178,7 +178,6 @@ static void virgl_texture_transfer_unmap(struct pipe_context *ctx,
    if (trans->base.usage & PIPE_TRANSFER_WRITE) {
       if (!(transfer->usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) {
          struct virgl_screen *vs = virgl_screen(ctx->screen);
-         vctx->num_transfers++;
 
          if (trans->resolve_tmp) {
             vs->vws->transfer_put(vs->vws, vtex->hw_res,