radeonsi: Mipmaps require memory footprint to be padded to powers of two.
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 4 Sep 2012 16:58:38 +0000 (18:58 +0200)
committerMichel Dänzer <michel@daenzer.net>
Thu, 6 Sep 2012 13:39:13 +0000 (15:39 +0200)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index dac64aab80d25ac76e6dda14bc9d993ee21d53bc..762887d224e6b0dcf96f76f2bf40cf4357c1d6a5 100644 (file)
@@ -2107,6 +2107,7 @@ static struct pipe_sampler_view *si_create_sampler_view(struct pipe_context *ctx
                          S_008F1C_BASE_LEVEL(state->u.tex.first_level) |
                          S_008F1C_LAST_LEVEL(state->u.tex.last_level) |
                          S_008F1C_TILING_INDEX(tiling_index) |
+                         S_008F1C_POW2_PAD(texture->last_level > 0) |
                          S_008F1C_TYPE(si_tex_dim(texture->target)));
        view->state[4] = (S_008F20_DEPTH(depth - 1) | S_008F20_PITCH(pitch - 1));
        view->state[5] = (S_008F24_BASE_ARRAY(state->u.tex.first_layer) |