anv: Split dispatch tables into device and instance

Graphics / Mesa 3D Graphics Library / Mesa - Jason Ekstrand [intel.com] - 15 October 2018 18:30 EDT

There's no reason why we need generate trampoline functions for instance functions or carry N copies of the instance dispatch table around for every hardware generation. Splitting the tables and being more conservative shaves about 34K off .text and about 4K off .data when built with clang.

Before splitting dispatch tables:

text data bss dec hex filename 3224305 286216 8960 3519481 35b3f9 _install/lib64/libvulkan_intel.so

After splitting dispatch tables:

text data bss dec hex filename 3190325 282232 8960 3481517 351fad _install/lib64/libvulkan_intel.so

ae18c53ba6 anv: Split dispatch tables into device and instance
src/intel/vulkan/anv_device.c | 61 +++++---
src/intel/vulkan/anv_entrypoints_gen.py | 242 +++++++++++++++++++++++---------
src/intel/vulkan/anv_private.h | 18 ++-
3 files changed, 230 insertions(+), 91 deletions(-)

Upstream: cgit.freedesktop.org


  • Share