mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 23:08:18 +02:00
gallium: fix type size in z24_unorm_packed_pack_z_32unorm
util_format_z24_unorm_packed_pack_z_32unorm was accidentally writing
48-bits instead of 24 since it used a 16-bit integer pointer instead of
an 8-bit pointer. This could cause a segfault if the function was used,
but it is currently unused.
Fixes: 18f352090d ("util/format: Add a Z24_UNORM_PACKED format")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41288>
This commit is contained in:
parent
0925c68adf
commit
3a3099369f
1 changed files with 1 additions and 1 deletions
|
|
@ -274,7 +274,7 @@ util_format_z24_unorm_packed_pack_z_32unorm(uint8_t *restrict dst_row, unsigned
|
|||
unsigned x, y;
|
||||
for(y = 0; y < height; ++y) {
|
||||
const uint32_t *src = src_row;
|
||||
uint16_t *dst = (uint16_t *)dst_row;
|
||||
uint8_t *dst = dst_row;
|
||||
for(x = 0; x < width; ++x) {
|
||||
uint32_t tmp = z32_unorm_to_z24_unorm(*src++);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue