Mesa (master): mesa: Remove dead _mesa_get_pack_float_z_func().
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 21 20:26:04 UTC 2021
Module: Mesa
Branch: master
Commit: 698c8b5022d022a4616a8f3a3fb8f19ecb25f9f6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=698c8b5022d022a4616a8f3a3fb8f19ecb25f9f6
Author: Eric Anholt <eric at anholt.net>
Date: Mon Apr 19 14:32:55 2021 -0700
mesa: Remove dead _mesa_get_pack_float_z_func().
Unused since its introduction 10 years ago.
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
---
src/mesa/main/format_pack.h | 10 ------
src/mesa/main/format_pack.py | 83 ++------------------------------------------
2 files changed, 2 insertions(+), 91 deletions(-)
diff --git a/src/mesa/main/format_pack.h b/src/mesa/main/format_pack.h
index 4caa2d75d2c..1a4e0868a5d 100644
--- a/src/mesa/main/format_pack.h
+++ b/src/mesa/main/format_pack.h
@@ -34,10 +34,6 @@
extern "C" {
#endif
-
-/** Pack a float Z value to dest address */
-typedef void (*mesa_pack_float_z_func)(const float *src, void *dst);
-
/** Pack a uint32_t Z value to dest address */
typedef void (*mesa_pack_uint_z_func)(const uint32_t *src, void *dst);
@@ -45,12 +41,6 @@ typedef void (*mesa_pack_uint_z_func)(const uint32_t *src, void *dst);
typedef void (*mesa_pack_ubyte_stencil_func)(const uint8_t *src, void *dst);
-
-
-extern mesa_pack_float_z_func
-_mesa_get_pack_float_z_func(mesa_format format);
-
-
extern mesa_pack_uint_z_func
_mesa_get_pack_uint_z_func(mesa_format format);
diff --git a/src/mesa/main/format_pack.py b/src/mesa/main/format_pack.py
index a0086e9dfc7..30b5e0dc57f 100644
--- a/src/mesa/main/format_pack.py
+++ b/src/mesa/main/format_pack.py
@@ -229,85 +229,6 @@ struct z32f_x24s8
};
-/**
- ** Pack float Z pixels
- **/
-
-static void
-pack_float_S8_UINT_Z24_UNORM(const float *src, void *dst)
-{
- /* don't disturb the stencil values */
- uint32_t *d = ((uint32_t *) dst);
- const double scale = (double) 0xffffff;
- uint32_t s = *d & 0xff;
- uint32_t z = (uint32_t) (*src * scale);
- assert(z <= 0xffffff);
- *d = (z << 8) | s;
-}
-
-static void
-pack_float_Z24_UNORM_S8_UINT(const float *src, void *dst)
-{
- /* don't disturb the stencil values */
- uint32_t *d = ((uint32_t *) dst);
- const double scale = (double) 0xffffff;
- uint32_t s = *d & 0xff000000;
- uint32_t z = (uint32_t) (*src * scale);
- assert(z <= 0xffffff);
- *d = s | z;
-}
-
-static void
-pack_float_Z_UNORM16(const float *src, void *dst)
-{
- uint16_t *d = ((uint16_t *) dst);
- const float scale = (float) 0xffff;
- *d = (uint16_t) (*src * scale);
-}
-
-static void
-pack_float_Z_UNORM32(const float *src, void *dst)
-{
- uint32_t *d = ((uint32_t *) dst);
- const double scale = (double) 0xffffffff;
- *d = (uint32_t) (*src * scale);
-}
-
-/**
- ** Pack float to Z_FLOAT32 or Z_FLOAT32_X24S8.
- **/
-
-static void
-pack_float_Z_FLOAT32(const float *src, void *dst)
-{
- float *d = (float *) dst;
- *d = *src;
-}
-
-mesa_pack_float_z_func
-_mesa_get_pack_float_z_func(mesa_format format)
-{
- switch (format) {
- case MESA_FORMAT_S8_UINT_Z24_UNORM:
- case MESA_FORMAT_X8_UINT_Z24_UNORM:
- return pack_float_S8_UINT_Z24_UNORM;
- case MESA_FORMAT_Z24_UNORM_S8_UINT:
- case MESA_FORMAT_Z24_UNORM_X8_UINT:
- return pack_float_Z24_UNORM_S8_UINT;
- case MESA_FORMAT_Z_UNORM16:
- return pack_float_Z_UNORM16;
- case MESA_FORMAT_Z_UNORM32:
- return pack_float_Z_UNORM32;
- case MESA_FORMAT_Z_FLOAT32:
- case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
- return pack_float_Z_FLOAT32;
- default:
- unreachable("unexpected format in _mesa_get_pack_float_z_func()");
- }
-}
-
-
-
/**
** Pack uint Z pixels. The incoming src value is always in
** the range [0, 2^32-1].
@@ -482,6 +403,6 @@ _mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, uint32_t n,
"""
-template = Template(string, future_imports=['division']);
+template = Template(string, future_imports=['division'])
-print(template.render(argv = argv[0:]))
+print(template.render(argv=argv[0:]))
More information about the mesa-commit
mailing list