summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLepton Wu <lepton@chromium.org>2019-07-17 10:02:20 -0700
committerJuan A. Suarez Romero <jasuarez@igalia.com>2019-07-18 08:35:40 +0000
commit3dea2e2ffc6c2f6eaf3b703635fbe3f0ed58ea43 (patch)
treeaf191ff5875eb992dfe79fe978b3a1af70dbe82a
parent1527d02acb315ebf6359b813c7d6f644a2ce501c (diff)
virgl: Set meta data for textures from handle.
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> (cherry picked from commit 6109df58e4abe18a0db589c3cebf21cbf0211197)
-rw-r--r--src/gallium/drivers/virgl/virgl_resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c
index ef81f213f40..6d4c9f5fd00 100644
--- a/src/gallium/drivers/virgl/virgl_resource.c
+++ b/src/gallium/drivers/virgl/virgl_resource.c
@@ -112,6 +112,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) {