intel: Always allocate miptrees from level 0, not tObj->BaseLevel.
authorEric Anholt <eric@anholt.net>
Thu, 6 Jan 2011 01:02:08 +0000 (17:02 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 6 Jan 2011 02:23:54 +0000 (18:23 -0800)
commit7ce6517f3ac41bf770ab39aba4509d4f535ef663
tree3563dc5da10a71f71981a0ceb5fdbd00b37a1f79
parent01b70c06284f3a0ab2de61228b73c78ed00a1a14
intel: Always allocate miptrees from level 0, not tObj->BaseLevel.

BaseLevel/MaxLevel are mostly used for two things: clamping texture
access for FBO rendering, and limiting the used mipmap levels when
incrementally loading textures.  By restricting our mipmap trees to
just the current BaseLevel/MaxLevel, we caused reallocation thrashing
in the common case, for a theoretical win if someone really did want
just levels 2..4 or whatever of their texture object.

Bug #30366
src/mesa/drivers/dri/i965/brw_tex_layout.c
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h
src/mesa/drivers/dri/intel/intel_tex.h
src/mesa/drivers/dri/intel/intel_tex_image.c
src/mesa/drivers/dri/intel/intel_tex_layout.c
src/mesa/drivers/dri/intel/intel_tex_validate.c