mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 11:20:11 +01:00
util/format: Add VK_FORMAT_D16_UNORM_S8_UINT.
Not participating in packing/unpacking/stencil-only/depth-only, because it doesn't mix well in a single plane. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
This commit is contained in:
parent
f047d585ee
commit
273ead81f1
5 changed files with 74 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ enum pipe_format {
|
|||
PIPE_FORMAT_UYVY,
|
||||
PIPE_FORMAT_YUYV,
|
||||
PIPE_FORMAT_Z16_UNORM,
|
||||
PIPE_FORMAT_Z16_UNORM_S8_UINT,
|
||||
PIPE_FORMAT_Z32_UNORM,
|
||||
PIPE_FORMAT_Z32_FLOAT,
|
||||
PIPE_FORMAT_Z24_UNORM_S8_UINT,
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, 1, sn5 , sn5 , un6 , , xy
|
|||
# Depth-stencil formats
|
||||
PIPE_FORMAT_S8_UINT , plain, 1, 1, 1, up8 , , , , _x__, zs
|
||||
PIPE_FORMAT_Z16_UNORM , plain, 1, 1, 1, un16, , , , x___, zs
|
||||
PIPE_FORMAT_Z16_UNORM_S8_UINT , plain, 1, 1, 1, un16, up8 , , , xy__, zs
|
||||
PIPE_FORMAT_Z32_UNORM , plain, 1, 1, 1, un32, , , , x___, zs
|
||||
PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, 1, f32 , , , , x___, zs
|
||||
PIPE_FORMAT_Z24_UNORM_S8_UINT , plain, 1, 1, 1, un24, up8 , , , xy__, zs, up8 , un24, , , yx__
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 8 and column 3.
|
|
|
@ -333,6 +333,54 @@ util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride,
|
||||
const uint8_t *src_row, unsigned src_stride,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unreachable("z16_s8 packing/unpacking is not implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
|
||||
const float *src_row, unsigned src_stride,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unreachable("z16_s8 packing/unpacking is not implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
|
||||
const uint8_t *src_row, unsigned src_stride,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unreachable("z16_s8 packing/unpacking is not implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
|
||||
const uint32_t *src_row, unsigned src_stride,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unreachable("z16_s8 packing/unpacking is not implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
|
||||
const uint8_t *src_row, unsigned src_stride,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unreachable("z16_s8 packing/unpacking is not implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
|
||||
const uint8_t *src_row, unsigned src_stride,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
unreachable("z16_s8 packing/unpacking is not implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride,
|
||||
const uint8_t *src_row, unsigned src_stride,
|
||||
|
|
|
|||
|
|
@ -194,6 +194,29 @@ util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_s
|
|||
void
|
||||
util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
|
||||
void
|
||||
util_format_z16_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
void
|
||||
util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ static const enum pipe_format vk_format_map[] = {
|
|||
[VK_FORMAT_X8_D24_UNORM_PACK32] = PIPE_FORMAT_Z24X8_UNORM,
|
||||
[VK_FORMAT_D32_SFLOAT] = PIPE_FORMAT_Z32_FLOAT,
|
||||
[VK_FORMAT_S8_UINT] = PIPE_FORMAT_S8_UINT,
|
||||
/* Missing D16_UNORM_S8_UINT */
|
||||
[VK_FORMAT_D16_UNORM_S8_UINT] = PIPE_FORMAT_Z16_UNORM_S8_UINT,
|
||||
[VK_FORMAT_D24_UNORM_S8_UINT] = PIPE_FORMAT_Z24_UNORM_S8_UINT,
|
||||
[VK_FORMAT_D32_SFLOAT_S8_UINT] = PIPE_FORMAT_Z32_FLOAT_S8X24_UINT,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue