i965: Don't relayout a texture just for baselevel changes.
authorEric Anholt <eric@anholt.net>
Fri, 30 Aug 2013 20:03:52 +0000 (13:03 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 30 Sep 2013 21:35:42 +0000 (14:35 -0700)
commit16060c5adcd4d809f97e874fcde763260c17ac18
tree0aac97e8759c5639552c564df8d655c3f81c3b51
parent97bdb4c039bb33dbbcbb43d0fd0bb24106777ae9
i965: Don't relayout a texture just for baselevel changes.

As long as the baselevel, maxlevel still sit inside the range we had
previously validated, there's no need to reallocate the texture.

I also hope this makes our texture validation logic much more obvious.
It's taken me enough tries to write this change, that's for sure.  Reduces
miptree copy count on a piglit run by 1.3%, though the change in amount of
data moved is much smaller.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/intel_tex_obj.h
src/mesa/drivers/dri/i965/intel_tex_validate.c