diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-03-28 04:33:28 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-03-31 02:36:38 +0000 |
commit | c87f3ce97f69212d27ac830d5c37ac0f55e892f8 (patch) | |
tree | 03126c312c165c03197c68087b3e3300973edbdb /src/gallium/drivers/panfrost/pan_context.c | |
parent | 70b3e5db7d46b172a3f9d290cf7850bb6d797ea0 (diff) |
panfrost: Implement command stream for linear cubemaps
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_context.c')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index afef5d01515..65019f8566e 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1020,10 +1020,12 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data) struct pipe_resource *tex_rsrc = ctx->sampler_views[t][i]->base.texture; struct panfrost_resource *rsrc = (struct panfrost_resource *) tex_rsrc; - /* Inject the address in. */ - 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; + /* Inject the addresses in, interleaving cube + * faces and mip levels appropriately. */ + + for (int l = 0; l <= tex_rsrc->last_level; ++l) { + for (int f = 0; f < tex_rsrc->array_size; ++f) { + unsigned idx = (l * tex_rsrc->array_size) + f; ctx->sampler_views[t][i]->hw.swizzled_bitmaps[idx] = rsrc->bo->gpu + @@ -1958,7 +1960,7 @@ panfrost_create_sampler_view( .format = format, .usage1 = 0x0, - .is_not_cubemap = 1, + .is_not_cubemap = texture->target != PIPE_TEXTURE_CUBE, .usage2 = usage2_layout }, |