Mesa (master): panfrost: Take into account texture layers in SFBD

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 6 15:56:28 UTC 2019


Module: Mesa
Branch: master
Commit: afeda06062fef3542ca792ace6a15dc78371658b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=afeda06062fef3542ca792ace6a15dc78371658b

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Tue Nov  5 11:21:47 2019 +0100

panfrost: Take into account texture layers in SFBD

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/pan_sfbd.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

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)




More information about the mesa-commit mailing list