anv: Use resolve_device_entrypoint for dispatch init
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 17 Jun 2020 18:42:15 +0000 (13:42 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 19 Jun 2020 19:13:56 +0000 (19:13 +0000)
commit77c50891b65a98fda392d83aba188e9bcace6381
treebdc8e34775621c3a8a6496a2bc4a58177c03a104
parente94a122642f6f4878e87e9f83baf31a82b9c248e
anv: Use resolve_device_entrypoint for dispatch init

There's no good reason to have the "which table do I use?" code
duplicated twice.  The only advantage to the way we were doing it before
was that we could move the switch statement outside the loop.  If this
is ever an actual device initialization perf problem that someone cares
about, we can optimize that when the time comes.  For now, the
duplicated cases are simply a platform-enabling pit-fall.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5530>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py
src/intel/vulkan/anv_private.h