diff options
author | Chia-I Wu <[email protected]> | 2013-05-15 08:50:34 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-05-15 15:08:54 +0800 |
commit | 5af8641ce0d1d725d5eb1df83c8211d2cdbe528c (patch) | |
tree | 94f3bb586f2ef277f8f2c37f0c40ac6b07fba646 | |
parent | 46bb33bc217e20c42ffca11d15d1efb01043d489 (diff) |
ilo: no writeback without PIPE_TRANSFER_WRITE
We should not write staging data back when PIPE_TRANSFER_WRITE is not set.
-rw-r--r-- | src/gallium/drivers/ilo/ilo_transfer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_transfer.c b/src/gallium/drivers/ilo/ilo_transfer.c index 3b4a2136c81..3d38fe88452 100644 --- a/src/gallium/drivers/ilo/ilo_transfer.c +++ b/src/gallium/drivers/ilo/ilo_transfer.c @@ -188,6 +188,11 @@ tex_staging_sys_unmap(struct ilo_context *ilo, struct pipe_transfer *dst_xfer; void *dst; + if (!(xfer->base.usage & PIPE_TRANSFER_WRITE)) { + FREE(xfer->staging_sys); + return; + } + dst = ilo->base.transfer_map(&ilo->base, xfer->base.resource, xfer->base.level, PIPE_TRANSFER_WRITE | |