aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/trace/tr_dump.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-04-12 15:03:25 +0900
committerJosé Fonseca <[email protected]>2010-04-12 15:32:22 +0900
commitb77583203e44a8937577bf3b813dc66cea1a2005 (patch)
treef8f9ea7adf655fefc1dfca3fb9e912b0fd6568e4 /src/gallium/drivers/trace/tr_dump.c
parent5a549d8b48c068040a47e845e6f7d069ec42bf7d (diff)
trace: Fix several regressions introduced by recent interface changes.
Diffstat (limited to 'src/gallium/drivers/trace/tr_dump.c')
-rw-r--r--src/gallium/drivers/trace/tr_dump.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c
index 19cf0de1d38..8ff25fb1e85 100644
--- a/src/gallium/drivers/trace/tr_dump.c
+++ b/src/gallium/drivers/trace/tr_dump.c
@@ -50,6 +50,8 @@
#include "util/u_debug.h"
#include "util/u_memory.h"
#include "util/u_string.h"
+#include "util/u_math.h"
+#include "util/u_format.h"
#include "tr_dump.h"
#include "tr_screen.h"
@@ -471,13 +473,14 @@ void trace_dump_bytes(const void *data,
}
void trace_dump_box_bytes(const void *data,
- unsigned format,
+ enum pipe_format format,
const struct pipe_box *box,
unsigned stride,
unsigned slice_stride)
{
- //size_t size = util_format_get_nblocksy(transfer->resource->format, transfer->box.height) * transfer->stride;
-
+ size_t size = MAX2(util_format_get_nblocksy(format, box->height) * stride,
+ box->depth * slice_stride);
+ trace_dump_bytes(data, size);
}
void trace_dump_string(const char *str)