From efcb1e494b77cebeb58bf9590a7030c8fd08d130 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 26 Mar 2021 19:12:39 +0100 Subject: [PATCH] panfrost: Stop passing a depth > 1 when creating 2D textures The depth field is ignored if dim != 3D, but it's a bit confusing. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_blit.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/panfrost/lib/pan_blit.c b/src/panfrost/lib/pan_blit.c index b6d1a62166e..95cc9057053 100644 --- a/src/panfrost/lib/pan_blit.c +++ b/src/panfrost/lib/pan_blit.c @@ -337,8 +337,7 @@ midgard_load_emit_texture(struct pan_pool *pool, struct MALI_DRAW *draw, }; panfrost_new_texture(pool->dev, image->layout, texture.cpu, - image->width0, image->height0, - MAX2(image->nr_samples, 1), 1, + image->width0, image->height0, 1, 1, image->format, MALI_TEXTURE_DIMENSION_2D, image->first_level, image->last_level, 0, 0, @@ -513,8 +512,7 @@ bifrost_load_emit_texture(struct pan_pool *pool, struct MALI_DRAW *draw, }; panfrost_new_texture(pool->dev, image->layout, texture.cpu, - image->width0, image->height0, - MAX2(image->nr_samples, 1), 1, + image->width0, image->height0, 1, 1, image->format, MALI_TEXTURE_DIMENSION_2D, image->first_level, image->last_level, 0, 0,