From 3d21fc193efc3ccca1e442d4f9409cd93eb04282 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 Apr 2018 16:29:19 -0700 Subject: [PATCH] broadcom/vc5: Set up internal_format for imported resources. Without this, we'd assertion fail in u_transfer_helper when mapping an imported resource. --- src/gallium/drivers/vc5/vc5_resource.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/vc5/vc5_resource.c b/src/gallium/drivers/vc5/vc5_resource.c index 9c714b4183b..eb5fa4e908d 100644 --- a/src/gallium/drivers/vc5/vc5_resource.c +++ b/src/gallium/drivers/vc5/vc5_resource.c @@ -731,6 +731,8 @@ vc5_resource_from_handle(struct pipe_screen *pscreen, if (!rsc->bo) goto fail; + rsc->internal_format = prsc->format; + vc5_setup_slices(rsc); vc5_debug_resource_layout(rsc, "import"); -- 2.30.2