projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f934117
)
svga: avoid a calloc in svga_buffer_transfer_map()
author
Brian Paul
<brianp@vmware.com>
Tue, 2 Aug 2016 20:30:41 +0000
(14:30 -0600)
committer
Brian Paul
<brianp@vmware.com>
Tue, 16 Aug 2016 14:24:53 +0000
(08:24 -0600)
Just initialize the two other pipe_transfer fields explicitly.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_resource_buffer.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/svga/svga_resource_buffer.c
b/src/gallium/drivers/svga/svga_resource_buffer.c
index c126ff91c9080b9842836d8b19b551546fcd7c15..94788e70e318cb6ce144fb142fbdf9920d86ae03 100644
(file)
--- a/
src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/
src/gallium/drivers/svga/svga_resource_buffer.c
@@
-84,7
+84,7
@@
svga_buffer_transfer_map(struct pipe_context *pipe,
assert(box->height == 1);
assert(box->depth == 1);
- transfer =
C
ALLOC_STRUCT(pipe_transfer);
+ transfer =
M
ALLOC_STRUCT(pipe_transfer);
if (!transfer) {
return NULL;
}
@@
-93,6
+93,8
@@
svga_buffer_transfer_map(struct pipe_context *pipe,
transfer->level = level;
transfer->usage = usage;
transfer->box = *box;
+ transfer->stride = 0;
+ transfer->layer_stride = 0;
if ((usage & PIPE_TRANSFER_READ) && sbuf->dirty) {
enum pipe_error ret;