[Mesa-dev] [PATCH 1/4] i965: Add perf debug for texture relayout.

Eric Anholt eric at anholt.net
Tue Dec 18 13:35:17 PST 2012


Relayout is expensive, so it's something developers (both us and others)
should know about when it happens.
---
 src/mesa/drivers/dri/intel/intel_tex_validate.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index ad173c9..2f1b354 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -79,6 +79,11 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
       intel_miptree_get_dimensions_for_image(&firstImage->base.Base,
 					     &width, &height, &depth);
 
+      perf_debug("Creating new %s %dx%dx%d %d..%d miptree to handle finalized "
+                 "texture miptree.\n",
+                 _mesa_get_format_name(firstImage->base.Base.TexFormat),
+                 width, height, depth, tObj->BaseLevel, intelObj->_MaxLevel);
+
       intelObj->mt = intel_miptree_create(intel,
                                           intelObj->base.Target,
 					  firstImage->base.Base.TexFormat,
-- 
1.7.10.4



More information about the mesa-dev mailing list