X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Ftrace%2Ftr_screen.c;h=6cdb4c04a81e86c14116cac9d6ea8a6a0f4cfb7b;hb=28486880ca3ec39419ccee0cb1a3bedc9ef7117c;hp=7da9bd3866ba8e6b2c82713db3b7b0a0ccc20c47;hpb=7d56caabe45e91a67096804c7e341d04d01db7aa;p=mesa.git diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 7da9bd3866b..6cdb4c04a81 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -25,6 +25,7 @@ * **************************************************************************/ +#include "util/u_format.h" #include "util/u_memory.h" #include "util/u_simple_list.h" @@ -34,7 +35,8 @@ #include "tr_texture.h" #include "tr_screen.h" -#include "pipe/p_inlines.h" +#include "util/u_inlines.h" +#include "pipe/p_format.h" static boolean trace = FALSE; @@ -424,7 +426,7 @@ trace_screen_transfer_unmap(struct pipe_screen *_screen, struct pipe_transfer *transfer = tr_trans->transfer; if(tr_trans->map) { - size_t size = transfer->nblocksy * transfer->stride; + size_t size = util_format_get_nblocksy(transfer->texture->format, transfer->height) * transfer->stride; trace_dump_call_begin("pipe_screen", "transfer_write");