Mesa (master): r600g: fix transfer stride.

Dave Airlie airlied at kemper.freedesktop.org
Wed Oct 13 05:57:30 UTC 2010


Module: Mesa
Branch: master
Commit: e9acf9a3bb45caea7b0fba197aa9ab01f24bb63f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9acf9a3bb45caea7b0fba197aa9ab01f24bb63f

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Oct 13 10:14:55 2010 +1000

r600g: fix transfer stride.

fixes segfaults

---

 src/gallium/drivers/r600/r600_texture.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index d1339f6..94886ac 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -387,6 +387,9 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
 			FREE(trans);
 			return NULL;
 		}
+
+		trans->transfer.stride =
+		  ((struct r600_resource_texture *)trans->linear_texture)->pitch_in_bytes[0];
 		if (usage & PIPE_TRANSFER_READ) {
 			/* We cannot map a tiled texture directly because the data is
 			 * in a different order, therefore we do detiling using a blit. */




More information about the mesa-commit mailing list