Mesa (master): r600g: get offset for correct texture when setting up CB.

Dave Airlie airlied at kemper.freedesktop.org
Thu Feb 3 23:33:35 UTC 2011


Module: Mesa
Branch: master
Commit: 151a945d38d8c9231799b00364c5b85c8a4b2279
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=151a945d38d8c9231799b00364c5b85c8a4b2279

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Feb  4 09:38:01 2011 +1000

r600g: get offset for correct texture when setting up CB.

this fixes the mipmap tests with tiling forced on.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/r600_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 19bfa81..8c4baf7 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -704,7 +704,7 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
 	bo[2] = rbuffer->bo;
 
 	/* XXX quite sure for dx10+ hw don't need any offset hacks */
-	offset = r600_texture_get_offset((struct r600_resource_texture *)state->cbufs[cb]->texture,
+	offset = r600_texture_get_offset(rtex,
 					 level, state->cbufs[cb]->u.tex.first_layer);
 	pitch = rtex->pitch_in_pixels[level] / 8 - 1;
 	slice = rtex->pitch_in_pixels[level] * surf->aligned_height / 64 - 1;




More information about the mesa-commit mailing list