nil: Drop miptail support for now
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:11:50 +0000 (20:11 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:55 +0000 (21:31 +0000)
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/nil/nil_image.c
src/nouveau/nil/nil_image.h
src/nouveau/nil/nil_image_tic.c

index e350828..f657795 100644 (file)
@@ -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,
    };
 
index 766ee94..e837849 100644 (file)
@@ -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];
index 973a02a..be9f4ed 100644 (file)
@@ -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);