freedreno/fdl: Add mip_level to fdl_layout
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 13 Oct 2021 15:33:21 +0000 (17:33 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 18 Oct 2021 16:00:38 +0000 (16:00 +0000)
We need this when calculating the descriptors in the image view.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359>

src/freedreno/fdl/fd6_layout.c
src/freedreno/fdl/freedreno_layout.h

index 0f831d5..70bb06b 100644 (file)
@@ -107,6 +107,7 @@ fdl6_layout(struct fdl_layout *layout, enum pipe_format format,
    layout->width0 = width0;
    layout->height0 = height0;
    layout->depth0 = depth0;
+   layout->mip_levels = mip_levels;
 
    layout->cpp = util_format_get_blocksize(format);
    layout->cpp *= nr_samples;
index 1f78e16..1c0221b 100644 (file)
@@ -124,6 +124,7 @@ struct fdl_layout {
    uint8_t cpp_shift;
 
    uint32_t width0, height0, depth0;
+   uint32_t mip_levels;
    uint32_t nr_samples;
    enum pipe_format format;