r600g: fix transfer stride.
authorDave Airlie <airlied@redhat.com>
Wed, 13 Oct 2010 00:14:55 +0000 (10:14 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 13 Oct 2010 05:55:48 +0000 (15:55 +1000)
fixes segfaults

src/gallium/drivers/r600/r600_texture.c

index d1339f69e73388348ba3afc923bea615565b5203..94886acc38e33c9c25c138e4851bebcee7aef133 100644 (file)
@@ -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. */