r600g: get offset for correct texture when setting up CB.
authorDave Airlie <airlied@redhat.com>
Thu, 3 Feb 2011 23:38:01 +0000 (09:38 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 3 Feb 2011 23:38:01 +0000 (09:38 +1000)
this fixes the mipmap tests with tiling forced on.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_state.c

index 19bfa81b99adf5f4365a13698543ecabc4e5a3aa..8c4baf7cab58392be9ef87a544f40c3a6b804ce3 100644 (file)
@@ -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;