summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2006-12-21 17:30:00 +0100
committerMichel Dänzer <[email protected]>2007-01-09 12:46:50 +0100
commit92fb742065f4de941e444916c5a146db87c71701 (patch)
tree0038851e6fa79fb7ebeefe05fc0027931311aa94 /src
parentd9dd9013a8530bcafcdb2c5fed2b01a22bfca69b (diff)
intel_finalize_mipmap_tree: Only flush batchbuffer when necessary.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_tex_validate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c
index e73c9c2f218..79d587a1744 100644
--- a/src/mesa/drivers/dri/i915tex/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/i915tex/intel_tex_validate.c
@@ -110,6 +110,8 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
GLuint nr_faces = 0;
struct intel_texture_image *firstImage;
+ GLboolean need_flush = GL_FALSE;
+
/* We know/require this is true by now:
*/
assert(intelObj->base.Complete);
@@ -201,11 +203,13 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
*/
if (intelObj->mt != intelImage->mt) {
copy_image_data_to_tree(intel, intelObj, intelImage);
+ need_flush = GL_TRUE;
}
}
}
- intel_batchbuffer_flush(intel->batch);
+ if (need_flush)
+ intel_batchbuffer_flush(intel->batch);
return GL_TRUE;
}