mesa: Remove dead _mesa_pack_ubyte_rgba_rect().
authorEric Anholt <eric@anholt.net>
Mon, 19 Apr 2021 21:57:20 +0000 (14:57 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 21 Apr 2021 19:59:10 +0000 (19:59 +0000)
Unused since 8ec6534b2665 ("mesa: Use _mesa_format_convert to implement
texstore_rgba.") in 2014

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>

src/mesa/main/format_pack.h
src/mesa/main/format_pack.py

index 7fd186b..fce4045 100644 (file)
@@ -52,11 +52,6 @@ _mesa_pack_uint_rgba_row(mesa_format format, uint32_t n,
    util_format_pack_rgba(format, dst, src, n);
 }
 
-extern void
-_mesa_pack_ubyte_rgba_rect(mesa_format format, uint32_t width, uint32_t height,
-                           const uint8_t *src, int32_t srcRowStride,
-                           void *dst, int32_t dstRowStride);
-
 static inline void
 _mesa_pack_float_z_row(mesa_format format, uint32_t n,
                        const float *src, void *dst)
index 1a8d2f4..c8df4b3 100644 (file)
@@ -189,37 +189,6 @@ _mesa_pack_ubyte_rgba_row(mesa_format format, uint32_t n,
    }
 }
 
-
-/**
- * Pack a 2D image of ubyte RGBA pixels in the given format.
- * \param srcRowStride  source image row stride in bytes
- * \param dstRowStride  destination image row stride in bytes
- */
-void
-_mesa_pack_ubyte_rgba_rect(mesa_format format, uint32_t width, uint32_t height,
-                           const uint8_t *src, int32_t srcRowStride,
-                           void *dst, int32_t dstRowStride)
-{
-   uint8_t *dstUB = dst;
-   uint32_t i;
-
-   if (srcRowStride == width * 4 * sizeof(uint8_t) &&
-       dstRowStride == _mesa_format_row_stride(format, width)) {
-      /* do whole image at once */
-      _mesa_pack_ubyte_rgba_row(format, width * height,
-                                (const uint8_t (*)[4]) src, dst);
-   }
-   else {
-      /* row by row */
-      for (i = 0; i < height; i++) {
-         _mesa_pack_ubyte_rgba_row(format, width,
-                                   (const uint8_t (*)[4]) src, dstUB);
-         src += srcRowStride;
-         dstUB += dstRowStride;
-      }
-   }
-}
-
 """
 
 template = Template(string, future_imports=['division'])