Skip to content
Snippets Groups Projects
Commit f2fd0d63 authored by Emma Anholt's avatar Emma Anholt
Browse files

i915: Fix NPOT compressed textures on 915.


We were failing at rounding, misplacing the non-baselevels.  Fixes:
3DFX_texture_compression_FXT1/fbo-generate-mipmaps
ARB_texture_compression/fbo-generate-mipmaps
EXT_texture_compression_s3tc/fbo-generate-mipmaps

Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
parent 898be7d5
No related branches found
No related tags found
No related merge requests found
......@@ -219,9 +219,9 @@ i915_miptree_layout_2d(struct intel_context *intel,
width, height, 1);
if (mt->compressed)
img_height = MAX2(1, height / 4);
img_height = ALIGN(height, 4) / 4;
else
img_height = (MAX2(2, height) + 1) & ~1;
img_height = ALIGN(height, 2);
mt->total_height += img_height;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment