From 96f6b8a7075553ab8eb6cb2bc66350340573b3db Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 20 Aug 2019 15:24:18 -0700 Subject: [PATCH] panfrost: nr_mipmap_levels -> levels No need to be so verbose. Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.c | 2 +- src/panfrost/include/panfrost-job.h | 2 +- src/panfrost/pandecode/decode.c | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index e8411ced014..1642bb436fa 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -2316,7 +2316,7 @@ panfrost_create_sampler_view( .swizzle = panfrost_translate_swizzle_4(user_swizzle) }; - texture_descriptor.nr_mipmap_levels = last_level - first_level; + texture_descriptor.levels = last_level - first_level; so->hw = texture_descriptor; diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index ffcfd67bab6..43c7c3763d0 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -1210,7 +1210,7 @@ struct mali_texture_descriptor { uint8_t unknown3A; /* Zero for non-mipmapped, (number of levels - 1) for mipmapped */ - uint8_t nr_mipmap_levels; + uint8_t levels; /* Swizzling is a single 32-bit word, broken up here for convenience. * Here, swizzling refers to the ES 3.0 texture parameters for channel diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 3a32d25cabe..4ebab6d466f 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -1790,9 +1790,10 @@ pandecode_texture(mali_ptr u, if (t->array_size) pandecode_log_cont("[%u]", t->array_size + 1); - pandecode_log_cont("\n"); + if (t->levels) + pandecode_log_cont(" mip %u", t->levels); - pandecode_prop("nr_mipmap_levels = %" PRId8, t->nr_mipmap_levels); + pandecode_log_cont("\n"); pandecode_log(".format = {\n"); pandecode_indent++; @@ -1837,7 +1838,7 @@ pandecode_texture(mali_ptr u, * properties, but dump extra * possibilities to futureproof */ - int bitmap_count = MALI_NEGATIVE(t->nr_mipmap_levels); + int bitmap_count = MALI_NEGATIVE(t->levels); bool manual_stride = f.usage2 & MALI_TEX_MANUAL_STRIDE; /* Miptree for each face */ -- 2.30.2