virgl: Set meta data for textures from handle.
authorLepton Wu <lepton@chromium.org>
Wed, 17 Jul 2019 17:02:20 +0000 (10:02 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Wed, 17 Jul 2019 23:17:48 +0000 (16:17 -0700)
The set of meta data was removed by commit 8083464. It broke lots of
dEQP tests when running with pbuffer surface type.

Fixes: 80834640137 ("virgl: remove dead code")
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/drivers/virgl/virgl_resource.c

index c22a78a473158fbc9d94e0ef90baa1e18fd7b297..909deb774c734cf26c9e259ed39d68e310515770 100644 (file)
@@ -515,6 +515,7 @@ static struct pipe_resource *virgl_resource_from_handle(struct pipe_screen *scre
    res->u.b = *templ;
    res->u.b.screen = &vs->base;
    pipe_reference_init(&res->u.b.reference, 1);
+   virgl_resource_layout(&res->u.b, &res->metadata);
 
    res->hw_res = vs->vws->resource_create_from_handle(vs->vws, whandle);
    if (!res->hw_res) {