r600g: fix height calcs for miptree

h needs to be rounded up, this probably needs revisiting when we get
to tiling etc.

fixes fbo-generatemipmap-npot
This commit is contained in:
Dave Airlie 2010-08-18 10:50:19 +10:00
parent 1d18739290
commit edb465e9bb
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ static void r600_setup_miptree(struct r600_screen *rscreen, struct r600_resource
for (i = 0, offset = 0; i <= ptex->last_level; i++) {
w = u_minify(ptex->width0, i);
h = u_minify(ptex->height0, i);
h = util_next_power_of_two(h);
pitch = util_format_get_stride(ptex->format, align(w, 64));
layer_size = pitch * h;
if (ptex->target == PIPE_TEXTURE_CUBE)