util: Fix translate from block compressed to rgba
Since2b5178ee
util: Switch the non-block formats to unpacking rgba rows instead of rects, compressed formats define unpack_rgba_8unorm_rect instead of unpack_rgba_8unorm. Fixes the u_format_translate check to take this into account. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5201 Fixes:2b5178ee
("util: Switch the non-block formats to unpacking rgba rows instead of rects") Signed-off-by: Axel Davy <davyaxel0@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12315>
This commit is contained in:
parent
cca5120772
commit
6a0e703512
|
@ -740,7 +740,7 @@ util_format_translate(enum pipe_format dst_format,
|
|||
unsigned tmp_stride;
|
||||
uint8_t *tmp_row;
|
||||
|
||||
if (!unpack->unpack_rgba_8unorm ||
|
||||
if ((!unpack->unpack_rgba_8unorm && !unpack->unpack_rgba_8unorm_rect) ||
|
||||
!pack->pack_rgba_8unorm) {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -802,7 +802,7 @@ util_format_translate(enum pipe_format dst_format,
|
|||
unsigned tmp_stride;
|
||||
unsigned int *tmp_row;
|
||||
|
||||
if (!unpack->unpack_rgba ||
|
||||
if ((!unpack->unpack_rgba && !unpack->unpack_rgba_rect) ||
|
||||
!pack->pack_rgba_uint) {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ util_format_translate(enum pipe_format dst_format,
|
|||
unsigned tmp_stride;
|
||||
float *tmp_row;
|
||||
|
||||
if (!unpack->unpack_rgba ||
|
||||
if ((!unpack->unpack_rgba && !unpack->unpack_rgba_rect) ||
|
||||
!pack->pack_rgba_float) {
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue