From: Dave Airlie Date: Wed, 13 Oct 2010 00:14:55 +0000 (+1000) Subject: r600g: fix transfer stride. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9acf9a3bb45caea7b0fba197aa9ab01f24bb63f;p=mesa.git r600g: fix transfer stride. fixes segfaults --- 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. */