diff options
author | Eric Anholt <eric@anholt.net> | 2011-06-09 17:04:12 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-06-14 11:17:39 -0700 |
commit | b9fbb9df22ab8ef869730c8b5c1eb79f4f48038e (patch) | |
tree | a95a8ba1cb4d89cf01d7a1f33ef5f246fd21235d /src/mesa | |
parent | 56965aa007c2c6029204d617c0edcf142603e98d (diff) | |
download | external_mesa3d-b9fbb9df22ab8ef869730c8b5c1eb79f4f48038e.zip external_mesa3d-b9fbb9df22ab8ef869730c8b5c1eb79f4f48038e.tar.gz external_mesa3d-b9fbb9df22ab8ef869730c8b5c1eb79f4f48038e.tar.bz2 |
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.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_layout.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c index 91ee55e..9d81523 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_layout.c +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c @@ -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, height, 1); + img_height = ALIGN(height, align_h); if (mt->compressed) - img_height = MAX2(1, height/4); - else - img_height = ALIGN(height, align_h); - + img_height /= align_h; /* Because the images are packed better, the final offset * might not be the maximal one: |