diff options
author | Eric Anholt <eric@anholt.net> | 2021-04-16 12:29:59 -0700 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-04-21 19:59:10 +0000 |
commit | 8a773d770e094f82081820e868daa53e8e69945f (patch) | |
tree | 2670e3fdae124e2630f7dbe2405281fbfef930a0 /src/mesa/main/format_pack.h | |
parent | 0e20f6a1e99840f763c21988e723638b9a54000e (diff) |
mesa: Deduplicate _mesa_pack_float_z_row().
util_format_pack_z_float() does the same thing but supports more formats.
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>
Diffstat (limited to 'src/mesa/main/format_pack.h')
-rw-r--r-- | src/mesa/main/format_pack.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/format_pack.h b/src/mesa/main/format_pack.h index a038a043d84..64b462a8471 100644 --- a/src/mesa/main/format_pack.h +++ b/src/mesa/main/format_pack.h @@ -82,9 +82,12 @@ _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); -extern void +static inline void _mesa_pack_float_z_row(mesa_format format, uint32_t n, - const float *src, void *dst); + const float *src, void *dst) +{ + util_format_pack_z_float(format, dst, src, n); +} extern void _mesa_pack_uint_z_row(mesa_format format, uint32_t n, |