intel: Fix miptree height alignment for compressed NPOT textures.
This is effectively just "round up when dividing by 4" compared to the previous code. Fixes the broken stripe at the top of fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc.
This commit is contained in:
parent
56965aa007
commit
b9fbb9df22
|
@ -97,11 +97,9 @@ void i945_miptree_layout_2d(struct intel_context *intel,
|
||||||
intel_miptree_set_level_info(mt, level, nr_images, x, y, width,
|
intel_miptree_set_level_info(mt, level, nr_images, x, y, width,
|
||||||
height, 1);
|
height, 1);
|
||||||
|
|
||||||
|
img_height = ALIGN(height, align_h);
|
||||||
if (mt->compressed)
|
if (mt->compressed)
|
||||||
img_height = MAX2(1, height/4);
|
img_height /= align_h;
|
||||||
else
|
|
||||||
img_height = ALIGN(height, align_h);
|
|
||||||
|
|
||||||
|
|
||||||
/* Because the images are packed better, the final offset
|
/* Because the images are packed better, the final offset
|
||||||
* might not be the maximal one:
|
* might not be the maximal one:
|
||||||
|
|
Loading…
Reference in New Issue