diff options
author | Ilia Mirkin <[email protected]> | 2015-04-06 01:39:14 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-04-27 20:17:07 -0400 |
commit | 0a4cb00c7765dbe26a4dbfad3bb87d6c6ce03919 (patch) | |
tree | 3915303cbebf29c76045926e40cf5dfef3109596 /src/gallium/drivers/freedreno/freedreno_resource.c | |
parent | f5c110199675b7f4c50d4a7a64b6aac44c55d0a4 (diff) |
freedreno: add fd_transfer to wrap around pipe_transfer
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 985b663d618..e8da68e116b 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -140,6 +140,7 @@ fd_resource_transfer_map(struct pipe_context *pctx, struct fd_context *ctx = fd_context(pctx); struct fd_resource *rsc = fd_resource(prsc); struct fd_resource_slice *slice = fd_resource_slice(rsc, level); + struct fd_transfer *trans; struct pipe_transfer *ptrans; enum pipe_format format = prsc->format; uint32_t op = 0; @@ -154,7 +155,8 @@ fd_resource_transfer_map(struct pipe_context *pctx, return NULL; /* util_slab_alloc() doesn't zero: */ - memset(ptrans, 0, sizeof(*ptrans)); + trans = fd_transfer(ptrans); + memset(trans, 0, sizeof(*trans)); pipe_resource_reference(&ptrans->resource, prsc); ptrans->level = level; |