mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 11:58:10 +02:00
trace: Handle transfers with zero strides correctly.
This commit is contained in:
parent
4b95c9549d
commit
53c3c914a7
1 changed files with 10 additions and 2 deletions
|
|
@ -478,8 +478,16 @@ void trace_dump_box_bytes(const void *data,
|
|||
unsigned stride,
|
||||
unsigned slice_stride)
|
||||
{
|
||||
size_t size = MAX2(util_format_get_nblocksy(format, box->height) * stride,
|
||||
box->depth * slice_stride);
|
||||
size_t size;
|
||||
|
||||
if (slice_stride)
|
||||
size = box->depth * slice_stride;
|
||||
else if (stride)
|
||||
size = util_format_get_nblocksy(format, box->height) * stride;
|
||||
else {
|
||||
size = util_format_get_nblocksx(format, box->width) * util_format_get_blocksize(format);
|
||||
}
|
||||
|
||||
trace_dump_bytes(data, size);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue