From e9acf9a3bb45caea7b0fba197aa9ab01f24bb63f Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 13 Oct 2010 10:14:55 +1000 Subject: r600g: fix transfer stride. fixes segfaults --- src/gallium/drivers/r600/r600_texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index d1339f69e73..94886acc38e 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. */ -- cgit v1.2.3