virgl: remove dead code
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 5 Sep 2018 13:17:24 +0000 (14:17 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 10 Sep 2018 08:35:32 +0000 (10:35 +0200)
We don't use the size we calculate in this function, so let's just
drop the calculation

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/virgl/virgl_texture.c

index 2cee4126652d942cd0bee2a5ef0e53c67ab7c05f..88c2f384838e447824cbc7213c0cfca22854f89c 100644 (file)
@@ -311,15 +311,11 @@ virgl_texture_from_handle(struct virgl_screen *vs,
                           const struct pipe_resource *template,
                           struct winsys_handle *whandle)
 {
-   struct virgl_texture *tex;
-   uint32_t size;
-
-   tex = CALLOC_STRUCT(virgl_texture);
+   struct virgl_texture *tex = CALLOC_STRUCT(virgl_texture);
    tex->base.u.b = *template;
    tex->base.u.b.screen = &vs->base;
    pipe_reference_init(&tex->base.u.b.reference, 1);
    tex->base.u.vtbl = &virgl_texture_vtbl;
-   vrend_resource_layout(tex, &size);
 
    tex->base.hw_res = vs->vws->resource_create_from_handle(vs->vws, whandle);
    return &tex->base.u.b;