From 921b05f5828ca207fb01d09eeba63b84af4adb9f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 2 Apr 2021 16:32:22 -0700 Subject: [PATCH] mesa: Remove dead _mesa_unpack_rgba_block(). Despite many changes over its lifetime, it appears to have been dead ever since its introduction in 2011. Reviewed-by: Jesse Natalie Part-of: --- src/mesa/main/format_unpack.h | 6 ------ src/mesa/main/pack.c | 34 ---------------------------------- 2 files changed, 40 deletions(-) diff --git a/src/mesa/main/format_unpack.h b/src/mesa/main/format_unpack.h index 06283c6bfa8..9baa2196b94 100644 --- a/src/mesa/main/format_unpack.h +++ b/src/mesa/main/format_unpack.h @@ -50,12 +50,6 @@ _mesa_unpack_uint_rgba_row(mesa_format format, uint32_t n, util_format_unpack_rgba(format, dst, src, n); } -extern void -_mesa_unpack_rgba_block(mesa_format format, - const void *src, int32_t srcRowStride, - float dst[][4], int32_t dstRowStride, - uint32_t x, uint32_t y, uint32_t width, uint32_t height); - static inline void _mesa_unpack_float_z_row(mesa_format format, uint32_t n, const void *src, float *dst) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 9d7d235d2e2..4e8db1b7952 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -1661,40 +1661,6 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, uint32_t n, } } -/** - * Unpack a 2D rect of pixels returning float RGBA colors. - * \param format the source image format - * \param src start address of the source image - * \param srcRowStride source image row stride in bytes - * \param dst start address of the dest image - * \param dstRowStride dest image row stride in bytes - * \param x source image start X pos - * \param y source image start Y pos - * \param width width of rect region to convert - * \param height height of rect region to convert - */ -void -_mesa_unpack_rgba_block(mesa_format format, - const void *src, int32_t srcRowStride, - float dst[][4], int32_t dstRowStride, - uint32_t x, uint32_t y, uint32_t width, uint32_t height) -{ - const uint32_t srcPixStride = _mesa_get_format_bytes(format); - const uint32_t dstPixStride = 4 * sizeof(float); - const struct util_format_unpack_description *unpack = - util_format_unpack_description((enum pipe_format)format); - const uint8_t *srcRow; - uint8_t *dstRow; - - /* XXX needs to be fixed for compressed formats */ - - srcRow = ((const uint8_t *) src) + srcRowStride * y + srcPixStride * x; - dstRow = ((uint8_t *) dst) + dstRowStride * y + dstPixStride * x; - - unpack->unpack_rgba(dstRow, dstPixStride, - srcRow, srcRowStride, width, height); -} - /** Helper struct for MESA_FORMAT_Z32_FLOAT_S8X24_UINT */ struct z32f_x24s8 {