trace: Correct transfer box size calculation.
authorJose Fonseca <jfonseca@vmware.com>
Mon, 24 Jul 2017 13:20:03 +0000 (14:20 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Tue, 25 Jul 2017 16:18:04 +0000 (17:18 +0100)
commit8d655263cae8765895feec14ac0cd1ebcfdf6e3f
tree5fae1124c1be8ac80c39ecbea449935a90cb6a4d
parentc3ea898932cb2fd408339bab103fc8ac63908320
trace: Correct transfer box size calculation.

For textures we must not approximate the calculation with `stride *
height`, or `slice_stride * depth`, as that can easily lead to buffer
overflows, particularly for partial transfers.

This should address the issue that Bruce Cherniak found and diagnosed.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/trace/tr_dump.c