From: Eric Anholt Date: Thu, 12 Apr 2018 23:29:19 +0000 (-0700) Subject: broadcom/vc5: Set up internal_format for imported resources. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d21fc193efc3ccca1e442d4f9409cd93eb04282;p=mesa.git broadcom/vc5: Set up internal_format for imported resources. Without this, we'd assertion fail in u_transfer_helper when mapping an imported resource. --- 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");