diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2006-12-14 10:56:10 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2006-12-14 11:04:10 +0100 |
commit | cc1afed6718882d13ab66ba0bbeaab6334e0629c (patch) | |
tree | 68604b366cb3338ee9233cedef18b9724da00485 /src/mesa | |
parent | 5f8a3e586f21219d02912635a93ce312bcf5987c (diff) |
intel_finalize_mipmap_tree: Add more conditions for rebuilding mipmap trees.
These are taken from the i965 driver and fix corruption of some mipmap levels
under some circumsances with 945 chipsets at least.
Also flush the batchbuffer after copying data between trees, or some apps fail
an assertion elsewhere.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_tex_validate.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c index 5f82dfa19e..e73c9c2f21 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c @@ -2,6 +2,7 @@ #include "macros.h" #include "intel_context.h" +#include "intel_batchbuffer.h" #include "intel_mipmap_tree.h" #include "intel_tex.h" @@ -155,9 +156,15 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) * leaving the tree alone. */ if (intelObj->mt && - ((intelObj->mt->first_level > intelObj->firstLevel) || - (intelObj->mt->last_level < intelObj->lastLevel) || - (intelObj->mt->internal_format != firstImage->base.InternalFormat))) { + (intelObj->mt->target != intelObj->base.Target || + intelObj->mt->internal_format != firstImage->base.InternalFormat || + intelObj->mt->first_level != intelObj->firstLevel || + intelObj->mt->last_level != intelObj->lastLevel || + intelObj->mt->width0 != firstImage->base.Width || + intelObj->mt->height0 != firstImage->base.Height || + intelObj->mt->depth0 != firstImage->base.Depth || + intelObj->mt->cpp != firstImage->base.TexFormat->TexelBytes || + intelObj->mt->compressed != firstImage->base.IsCompressed)) { intel_miptree_release(intel, &intelObj->mt); } @@ -198,6 +205,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) } } + intel_batchbuffer_flush(intel->batch); + return GL_TRUE; } |