From a67cfe2590c64ce3479eaf9f2277a2f7de0f986c Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 30 Jan 2023 20:11:50 -0600 Subject: [PATCH] nil: Drop miptail support for now We don't have any idea how they work or even which TIC bits have to do with them. Better off just leave them alone for now. Part-of: --- src/nouveau/nil/nil_image.c | 2 -- src/nouveau/nil/nil_image.h | 1 - src/nouveau/nil/nil_image_tic.c | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/nouveau/nil/nil_image.c b/src/nouveau/nil/nil_image.c index e350828..f657795 100644 --- a/src/nouveau/nil/nil_image.c +++ b/src/nouveau/nil/nil_image.c @@ -164,8 +164,6 @@ nil_image_init(struct nouveau_ws_device *dev, .format = info->format, .extent_px = info->extent_px, .num_levels = info->levels, - /* TODO: Figure out miptails */ - .mip_tail_start = info->levels, .num_samples = info->samples, }; diff --git a/src/nouveau/nil/nil_image.h b/src/nouveau/nil/nil_image.h index 766ee94..e837849 100644 --- a/src/nouveau/nil/nil_image.h +++ b/src/nouveau/nil/nil_image.h @@ -95,7 +95,6 @@ struct nil_image { struct nil_extent4d extent_px; uint8_t num_levels; - uint8_t mip_tail_start; uint8_t num_samples; struct nil_image_level levels[NIL_MAX_LEVELS]; diff --git a/src/nouveau/nil/nil_image_tic.c b/src/nouveau/nil/nil_image_tic.c index 973a02a..be9f4ed 100644 --- a/src/nouveau/nil/nil_image_tic.c +++ b/src/nouveau/nil/nil_image_tic.c @@ -151,12 +151,12 @@ nil_image_fill_tic(struct nouveau_ws_device *dev, tic[5] |= height - 1; tic[5] |= (depth - 1) << 16; - tic[3] |= image->mip_tail_start << GM107_TIC2_3_MAX_MIP_LEVEL__SHIFT; + const uint32_t last_level = view->num_levels + view->base_level - 1; + tic[3] |= last_level << GM107_TIC2_3_MAX_MIP_LEVEL__SHIFT; tic[6] |= GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC_TWO; tic[6] |= GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC_ONE; - const uint32_t last_level = view->num_levels + view->base_level - 1; tic[7] |= (last_level << 4) | view->base_level; tic[7] |= gm107_tic7_4_multi_sample_count(image->num_samples); -- 2.7.4