broadcom/vc5: Set up internal_format for imported resources.
authorEric Anholt <eric@anholt.net>
Thu, 12 Apr 2018 23:29:19 +0000 (16:29 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 24 Apr 2018 17:37:29 +0000 (10:37 -0700)
Without this, we'd assertion fail in u_transfer_helper when mapping an
imported resource.

src/gallium/drivers/vc5/vc5_resource.c

index 9c714b4183b4bd2940afb30cc3d0e003c37121b8..eb5fa4e908d66a77cf3b6dddf6569532e842569b 100644 (file)
@@ -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");