From: Tomeu Vizoso Date: Tue, 5 Nov 2019 10:21:47 +0000 (+0100) Subject: panfrost: Take into account texture layers in SFBD X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afeda06062fef3542ca792ace6a15dc78371658b;p=mesa.git panfrost: Take into account texture layers in SFBD Signed-off-by: Tomeu Vizoso Reviewed-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pan_sfbd.c b/src/gallium/drivers/panfrost/pan_sfbd.c index 2be48e7155f..9fa806a8a1a 100644 --- a/src/gallium/drivers/panfrost/pan_sfbd.c +++ b/src/gallium/drivers/panfrost/pan_sfbd.c @@ -130,14 +130,15 @@ panfrost_sfbd_set_cbuf( struct panfrost_resource *rsrc = pan_resource(surf->texture); unsigned level = surf->u.tex.level; - assert(surf->u.tex.first_layer == 0); + unsigned first_layer = surf->u.tex.first_layer; + assert(surf->u.tex.last_layer == first_layer); + signed stride = rsrc->slices[level].stride; - fb->format = panfrost_sfbd_format(surf); + mali_ptr base = panfrost_get_texture_address(rsrc, level, first_layer); - unsigned offset = rsrc->slices[level].offset; - signed stride = rsrc->slices[level].stride; + fb->format = panfrost_sfbd_format(surf); - fb->framebuffer = rsrc->bo->gpu + offset; + fb->framebuffer = base; fb->stride = stride; if (rsrc->layout == PAN_LINEAR)