intel: Add more intermediate sizes of cache buckets between powers of 2.
authorEric Anholt <eric@anholt.net>
Sat, 5 Jun 2010 00:09:11 +0000 (17:09 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 10 Jun 2010 15:56:56 +0000 (08:56 -0700)
commit0ec768e67aec8b1ded9bcf575ad1c0beb28cc0ca
tree4b1379f47447bb39ddc20a7bb543734c4b2c6967
parente65caeba9ed0e6c53830d944248aaae2228351ab
intel: Add more intermediate sizes of cache buckets between powers of 2.

We had two cases recently where the rounding to powers of two hurt
badly: 4:2:0 YUV HD video frames would round up from 2.2MB to 4MB, and
Urban Terror was hitting aperture size limitations.  For UT, this is
because mipmap trees for power of two texture sizes will land right in
the middle between two cache buckets.

By giving a few more sizes between powers of two, Urban Terror on my
945 ends up consuming 207MB of GEM objects instead of 272MB, and HD
video decode on Ironlake goes from 99MB to 75MB.

cairo-perf-diff of the benchmarks for gl and xlib shows a 1.09x and
1.06x speedup and a 1.07x, 1.08x, and 1.11x slowdown.  From this, I
think this patch was really a no-op in terms of performance for these
CPU-bound workloads.
intel/intel_bufmgr_gem.c