From 8cb965b112ad8a8465c4c5063b821a0210008d7d Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 21 Nov 2016 10:23:04 -0500 Subject: [PATCH] freedreno: fix slice size for imported buffers Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 5a21ca44e30..f1acf64ee9a 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -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; -- 2.30.2