Mesa (master): r600g: set correct pitch/ offset for depth textures in flushed state.
Dave Airlie
airlied at kemper.freedesktop.org
Thu Feb 3 04:17:30 UTC 2011
Module: Mesa
Branch: master
Commit: d0293290ad620084d490b51693d97731a8935094
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0293290ad620084d490b51693d97731a8935094
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Feb 3 13:21:08 2011 +1000
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 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index dd28049..14422bb 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;
More information about the mesa-commit
mailing list