[Mesa-dev] [PATCH 5/9] panfrost: Include all cubemap faces in bitmap list

Alyssa Rosenzweig alyssa at rosenzweig.io
Fri Mar 29 01:53:43 UTC 2019


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 253328f3694..b4a26f71dd3 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1020,9 +1020,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));
-- 
2.20.1



More information about the mesa-dev mailing list