summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2008-04-30 16:27:52 +0800
committerXiang, Haihao <[email protected]>2008-04-30 16:27:52 +0800
commitd12fa3511da23d8285f3ea1a51a1f328cdbb1462 (patch)
treec53ec0f6de4f2138a3bb2683bdc4eca30c0be300 /src/mesa
parentaef4ca647d1d8275b1586a92485ea6c5bc8e950c (diff)
intel: test cpp to ensure mipmap tree matches texture image.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 55503f45ae8..9205627813c 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -272,6 +272,11 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
image->IsCompressed != mt->compressed)
return GL_FALSE;
+ if (!image->IsCompressed &&
+ !mt->compressed &&
+ image->TexFormat->TexelBytes != mt->cpp)
+ return GL_FALSE;
+
/* Test image dimensions against the base level image adjusted for
* minification. This will also catch images not present in the
* tree, changed targets, etc.