From d0293290ad620084d490b51693d97731a8935094 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 3 Feb 2011 13:21:08 +1000 Subject: [PATCH] r600g: set correct pitch/offset for depth textures in flushed state. This fixes zreaddraw in tiling mode --- 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 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; -- 2.30.2