summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-08-30 13:03:52 -0700
committerEric Anholt <eric@anholt.net>2013-09-30 14:35:42 -0700
commit8037c0b69c483d94854bd9adc8fb23902077bc13 (patch)
tree6a8081676a57e3a188323429f9d27e49022316ca /src/mesa
parent16060c5adcd4d809f97e874fcde763260c17ac18 (diff)
downloadexternal_mesa3d-8037c0b69c483d94854bd9adc8fb23902077bc13.zip
external_mesa3d-8037c0b69c483d94854bd9adc8fb23902077bc13.tar.gz
external_mesa3d-8037c0b69c483d94854bd9adc8fb23902077bc13.tar.bz2
i965: Always allocate validated miptrees from level 0.
No change in copies during a piglit run, but it's one less first_level != 0 in our codebase. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_validate.c11
1 files changed, 5 insertions, 6 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..3ad0feb 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c
@@ -66,7 +66,7 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit)
int validate_last_level = intelObj->_MaxLevel;
/* Skip the loop over images in the common case of no images having
- * changed. But if the GL_BASE_LEVEL / GL_MAX_LEVEL change to something we
+ * changed. But if the GL_BASE_LEVEL or GL_MAX_LEVEL change to something we
* haven't looked at, then we do need to look at those new images.
*/
if (!intelObj->needs_validate &&
@@ -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,