From: Rob Clark Date: Mon, 21 Nov 2016 15:23:04 +0000 (-0500) Subject: freedreno: fix slice size for imported buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8cb965b112ad8a8465c4c5063b821a0210008d7d;p=mesa.git freedreno: fix slice size for imported buffers Signed-off-by: Rob Clark --- 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;