[Mesa-dev] [PATCH 0/2] i965: reduce driver binary size through metrics code reuse

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Mar 13 14:44:24 UTC 2018


Hi all,

While adding new metrics for newer generations I wondered how much
code we could save by reusing the identical equation functions across
metrics & generations. Turns out quite a bit, the saving in patch 2 is
about 4Mb.

We might be able to improve further by sharing similar register
programming, but this probably won't yield as much of an improvement
as the metrics have to be declined per generation because their
programming is actually different.

Cheers,

Lionel Landwerlin (2):
  i965: perf: fix a counter return type on hsw
  i965: perf: reduce i965 binary size

 src/mesa/drivers/dri/i965/Makefile.am             |  15 +-
 src/mesa/drivers/dri/i965/brw_oa.py               | 395 +++++++++++++---------
 src/mesa/drivers/dri/i965/brw_oa_hsw.xml          |   2 +-
 src/mesa/drivers/dri/i965/brw_performance_query.c |  13 +-
 src/mesa/drivers/dri/i965/meson.build             |  37 +-
 5 files changed, 278 insertions(+), 184 deletions(-)

--
2.16.2


More information about the mesa-dev mailing list