From: Dave Airlie Date: Thu, 3 Feb 2011 03:21:08 +0000 (+1000) Subject: r600g: set correct pitch/offset for depth textures in flushed state. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0293290ad620084d490b51693d97731a8935094;p=mesa.git r600g: set correct pitch/offset for depth textures in flushed state. This fixes zreaddraw in tiling mode --- diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index dd280491984..14422bbfe41 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -586,6 +586,9 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx, FREE(trans); return NULL; } + trans->transfer.stride = rtex->flushed_depth_texture->pitch_in_bytes[level]; + trans->offset = r600_texture_get_offset(rtex->flushed_depth_texture, level, box->z); + return &trans->transfer; } else if (use_staging_texture) { resource.target = PIPE_TEXTURE_2D; resource.format = texture->format;