summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-12-21 15:15:09 -0800
committerEric Anholt <[email protected]>2011-12-29 09:33:56 -0800
commitab7794cada02f3b3b5e3a642c20eeedeb17b65a6 (patch)
tree3d7b318554ea0188eded461a6315c46252b2ed27 /src/mesa/drivers
parent0ddb759991c1b39baf04cbe366328630bceeaca7 (diff)
intel: Don't consider miptrees for other texture targets to match.
We would have done a relayout at validate time, but it's senseless to store into a miptree if it's going to force relayout.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index e0f9632838b..9e0f2014556 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -333,6 +333,9 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
GLuint level = intelImage->base.Base.Level;
int width, height, depth;
+ if (target_to_target(image->TexObject->Target) != mt->target)
+ return false;
+
if (image->TexFormat != mt->format &&
!(image->TexFormat == MESA_FORMAT_S8_Z24 &&
mt->format == MESA_FORMAT_X8_Z24 &&
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index b0daa2c4de3..63938dd4fe2 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -62,7 +62,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
*/
if (intelObj->mt &&
(!intel_miptree_match_image(intelObj->mt, &firstImage->base.Base) ||
- intelObj->mt->target != intelObj->base.Target ||
intelObj->mt->first_level != tObj->BaseLevel ||
intelObj->mt->last_level < intelObj->_MaxLevel)) {
intel_miptree_release(&intelObj->mt);