r600g: fix transfer stride.

fixes segfaults
This commit is contained in:
Dave Airlie 2010-10-13 10:14:55 +10:00
parent e3b089126c
commit e9acf9a3bb

View file

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