freedreno: fix slice size for imported buffers
authorRob Clark <robdclark@gmail.com>
Mon, 21 Nov 2016 15:23:04 +0000 (10:23 -0500)
committerRob Clark <robdclark@gmail.com>
Sun, 27 Nov 2016 22:26:05 +0000 (17:26 -0500)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_resource.c

index 5a21ca44e30ea7fb337fb905220fb1884bda9129..f1acf64ee9aaac6eaa2c06a9aa8a13fa1b71aa3f 100644 (file)
@@ -909,6 +909,7 @@ fd_resource_from_handle(struct pipe_screen *pscreen,
        rsc->cpp = util_format_get_blocksize(tmpl->format);
        slice->pitch = handle->stride / rsc->cpp;
        slice->offset = handle->offset;
+       slice->size0 = handle->stride * prsc->height0;
 
        if ((slice->pitch < align(prsc->width0, 32)) || (slice->pitch % 32))
                goto fail;