u_format: Fix z32_s8x24 s8 unpacking on big-endian.
The s8x24 is a packed group in the format, and for packing we properly write our s8 in the low bits of the 32, but for unpacking we tried treating it as a byte array. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7776>
This commit is contained in:
@@ -873,10 +873,10 @@ util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *restrict dst_row, unsig
|
||||
unsigned x, y;
|
||||
for(y = 0; y < height; ++y) {
|
||||
uint8_t *dst = dst_row;
|
||||
const uint8_t *src = src_row + 4;
|
||||
const uint32_t *src = (uint32_t *)(src_row + 4);
|
||||
for(x = 0; x < width; ++x) {
|
||||
*dst = *src;
|
||||
src += 8;
|
||||
src += 2;
|
||||
dst += 1;
|
||||
}
|
||||
src_row += src_stride/sizeof(*src_row);
|
||||
|
Reference in New Issue
Block a user