[Mesa-dev] [PATCH 7/9] i965: Always allocate validated miptrees from level 0.

Eric Anholt eric at anholt.net
Wed Sep 18 12:59:26 PDT 2013


No change in copies during a piglit run, but it's one less first_level !=
0 in our codebase.
---
 src/mesa/drivers/dri/i965/intel_tex_validate.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c
index 42533bb..e44c3ca 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c
@@ -99,16 +99,15 @@ intel_finalize_mipmap_tree(struct brw_context *brw, 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",
+      perf_debug("Creating new %s %dx%dx%d %d-level miptree to handle "
+                 "finalized texture miptree.\n",
                  _mesa_get_format_name(firstImage->base.Base.TexFormat),
-                 width, height, depth,
-                 validate_first_level, validate_last_level);
+                 width, height, depth, validate_last_level + 1);
 
       intelObj->mt = intel_miptree_create(brw,
                                           intelObj->base.Target,
 					  firstImage->base.Base.TexFormat,
-                                          validate_first_level,
+                                          0, /* first_level */
                                           validate_last_level,
                                           width,
                                           height,
-- 
1.8.4.rc3



More information about the mesa-dev mailing list