intel: Use a CPU map of the batch on LLC-sharing architectures.
authorEric Anholt <eric@anholt.net>
Sat, 19 Jan 2013 02:18:57 +0000 (18:18 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 29 Jan 2013 00:25:14 +0000 (11:25 +1100)
commit99fe2b36cf5f9ff221be8de42c8649b26707972d
treeeca09101b3cc07ce23997fd65c9cf1f60b6735c4
parente1598cb642334c809e6ec219d793e7bc85a213de
intel: Use a CPU map of the batch on LLC-sharing architectures.

Before, we were keeping a CPU-only buffer to accumulate the batchbuffer in,
which was an improvement over mapping the batch through the GTT directly
(since any readback or other failure to stream through write combining
correctly would hurt).  However, on LLC-sharing architectures we can do better
by mapping the batch directly, which reduces the cache footprint of the
application since we no longer have this extra copy of a batchbuffer around.

Improves performance of GLBenchmark 2.1 offscreen on IVB by 3.5% +/- 0.4%
(n=21).  Improves Lightsmark performance by 1.1 +/- 0.1% (n=76).  Improves
cairo-gl performance by 1.9% +/- 1.4% (n=57).

No statistically significant difference in GLB2.1 on SNB (n=37).  Improves
cairo-gl performance by 2.1% +/- 0.1% (n=278).
src/mesa/drivers/dri/intel/intel_batchbuffer.c
src/mesa/drivers/dri/intel/intel_batchbuffer.h
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_context.h