freedreno: set missing internal_format when importing texture
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 22 Dec 2017 05:27:50 +0000 (00:27 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 22 Dec 2017 14:56:02 +0000 (09:56 -0500)
Fixes running piglits without -fbo. Probably lots of other stuff too.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_resource.c

index cb13f671c48382537c18ee553cae0781863d753e..daa162c166fafa4b6b9526ab53efcfa48a45d2ab 100644 (file)
@@ -832,6 +832,7 @@ fd_resource_from_handle(struct pipe_screen *pscreen,
        if (!rsc->bo)
                goto fail;
 
+       rsc->internal_format = tmpl->format;
        rsc->cpp = util_format_get_blocksize(tmpl->format);
        slice->pitch = handle->stride / rsc->cpp;
        slice->offset = handle->offset;