diff options
author | Eric Anholt <eric@anholt.net> | 2021-04-19 14:53:06 -0700 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-04-21 19:59:10 +0000 |
commit | 84db62553317b27ba1b205867e0944b608d74950 (patch) | |
tree | f9c9d90b0b112c72f5b6fb8b8ff0c9e271efb272 /src/mesa/main | |
parent | 698c8b5022d022a4616a8f3a3fb8f19ecb25f9f6 (diff) |
msea: Move z24s8-to-z24s8 packing fastpath to swrast.
It was only used here, and this made it clear (see
draw_depth_stencil_pixels()) that the z32f_s8 case was unused and could be
dropped. Also, it means this code will nicely go away when swrast is
deleted.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/format_pack.h | 4 | ||||
-rw-r--r-- | src/mesa/main/format_pack.py | 39 |
2 files changed, 0 insertions, 43 deletions
diff --git a/src/mesa/main/format_pack.h b/src/mesa/main/format_pack.h index 1a4e0868a5d..ae5738e5c8f 100644 --- a/src/mesa/main/format_pack.h +++ b/src/mesa/main/format_pack.h @@ -93,10 +93,6 @@ _mesa_pack_ubyte_stencil_row(mesa_format format, uint32_t n, util_format_pack_s_8uint(format, dst, src, n); } -extern void -_mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, uint32_t n, - const uint32_t *src, void *dst); - #ifdef __cplusplus } #endif diff --git a/src/mesa/main/format_pack.py b/src/mesa/main/format_pack.py index 30b5e0dc57f..286623b83c0 100644 --- a/src/mesa/main/format_pack.py +++ b/src/mesa/main/format_pack.py @@ -362,45 +362,6 @@ _mesa_get_pack_ubyte_stencil_func(mesa_format format) } -/** - * Incoming Z/stencil values are always in uint_24_8 format. - */ -void -_mesa_pack_uint_24_8_depth_stencil_row(mesa_format format, uint32_t n, - const uint32_t *src, void *dst) -{ - switch (format) { - case MESA_FORMAT_S8_UINT_Z24_UNORM: - memcpy(dst, src, n * sizeof(uint32_t)); - break; - case MESA_FORMAT_Z24_UNORM_S8_UINT: - { - uint32_t *d = ((uint32_t *) dst); - uint32_t i; - for (i = 0; i < n; i++) { - uint32_t s = src[i] << 24; - uint32_t z = src[i] >> 8; - d[i] = s | z; - } - } - break; - case MESA_FORMAT_Z32_FLOAT_S8X24_UINT: - { - const double scale = 1.0 / (double) 0xffffff; - struct z32f_x24s8 *d = (struct z32f_x24s8 *) dst; - uint32_t i; - for (i = 0; i < n; i++) { - float z = (float) ((src[i] >> 8) * scale); - d[i].z = z; - d[i].x24s8 = src[i]; - } - } - break; - default: - unreachable("bad format in _mesa_pack_ubyte_s_row"); - } -} - """ template = Template(string, future_imports=['division']) |