projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b95c95
)
trace: Handle transfers with zero strides correctly.
author
José Fonseca
<jfonseca@vmware.com>
Sat, 17 Apr 2010 13:00:13 +0000
(15:00 +0200)
committer
José Fonseca
<jfonseca@vmware.com>
Sun, 18 Apr 2010 08:36:28 +0000
(10:36 +0200)
src/gallium/drivers/trace/tr_dump.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/trace/tr_dump.c
b/src/gallium/drivers/trace/tr_dump.c
index
8ff25fb
..
51a4ea9
100644
(file)
--- a/
src/gallium/drivers/trace/tr_dump.c
+++ b/
src/gallium/drivers/trace/tr_dump.c
@@
-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);
}