intel: Refactor intel_mipmap_level offsets
authorChad Versace <chad.versace@linux.intel.com>
Mon, 14 Nov 2011 16:56:26 +0000 (08:56 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 22 Nov 2011 00:58:36 +0000 (16:58 -0800)
commitc2ddde70daece24d1eb7185946032158993a9e4d
tree37468d650a75b5d2551b0e72b14cb7563178c363
parentda2816a45e6e3a33246a341fee72e6f893f315d9
intel: Refactor intel_mipmap_level offsets

Add a new field, intel_mipmap_level::slice, and move the offset fields
into it. Also add some much needed documentation for these fields.

Before this patch, a separate array was allocated for the
intel_mipmap_level::{x,y}_offsets.  This was just silly; it incurred an
extra call to malloc and diminished memory locality.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h