From: Chia-I Wu Date: Wed, 15 May 2013 00:50:34 +0000 (+0800) Subject: ilo: no writeback without PIPE_TRANSFER_WRITE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5af8641ce0d1d725d5eb1df83c8211d2cdbe528c;p=mesa.git ilo: no writeback without PIPE_TRANSFER_WRITE We should not write staging data back when PIPE_TRANSFER_WRITE is not set. --- 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 |