mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
mesa: Remove dead _mesa_get_pack_float_z_func().
Unused since its introduction 10 years ago. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10336>
This commit is contained in:
parent
90f98b56f8
commit
698c8b5022
2 changed files with 2 additions and 91 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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:]))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue