Mesa (master): panfrost: Include all cubemap faces in bitmap list

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Mar 31 02:38:34 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Thu Mar 28 02:12:03 2019 +0000

panfrost: Include all cubemap faces in bitmap list

Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>

---

 src/gallium/drivers/panfrost/pan_context.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 43e0a6268fe..afef5d01515 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1021,9 +1021,15 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data)
                                 struct panfrost_resource *rsrc = (struct panfrost_resource *) tex_rsrc;
 
                                 /* Inject the address in. */
-                                for (int l = 0; l <= tex_rsrc->last_level; ++l) {
-                                        ctx->sampler_views[t][i]->hw.swizzled_bitmaps[l] =
-                                                rsrc->bo->gpu + rsrc->bo->slices[l].offset;
+                                for (int f = 0; f < tex_rsrc->array_size; ++f) {
+                                        for (int l = 0; l <= tex_rsrc->last_level; ++l) {
+                                                unsigned idx = f * (tex_rsrc->last_level + 1) + l;
+
+                                                ctx->sampler_views[t][i]->hw.swizzled_bitmaps[idx] =
+                                                        rsrc->bo->gpu +
+                                                        rsrc->bo->slices[l].offset +
+                                                        f * rsrc->bo->cubemap_stride;
+                                        }
                                 }
 
                                 trampolines[i] = panfrost_upload_transient(ctx, &ctx->sampler_views[t][i]->hw, sizeof(struct mali_texture_descriptor));




More information about the mesa-commit mailing list