Remove Device functions from ICD Dispatch table
authorCharles Giessen <charles@lunarg.com>
Wed, 12 Oct 2022 19:51:17 +0000 (13:51 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 31 Oct 2022 23:19:23 +0000 (17:19 -0600)
commitd1db6c5bce9ed474ca124f0bffed9aa2468f3973
treeb16b58efedad7dfd9f068e809425324d2c4dcf09
parentd4cb3b54bb822c819b378af478145b60320e6679
Remove Device functions from ICD Dispatch table

There are numerous terminators to device level functions that the loader must
insert in the call chain. However, the Device Dispatch Tables contain pointers
to these terminators rather than the driver's function. This was worked around
by storing the driver's functions in the ICD dispatch table and calling those.
This leads to rather confusing code where the application is querying for the
ICD dispatch table inside a device level function.

The solution is to create a bespoke dispatch table for device level functions
that require a terminator, and use that table when required.
15 files changed:
loader/extension_manual.c
loader/generated/vk_loader_extensions.c
loader/generated/vk_loader_extensions.h
loader/loader.c
loader/loader_common.h
loader/wsi.c
scripts/loader_extension_generator.py
tests/framework/icd/test_icd.cpp
tests/framework/test_environment.cpp
tests/framework/test_environment.h
tests/framework/test_util.cpp
tests/framework/test_util.h
tests/loader_handle_validation_tests.cpp
tests/loader_version_tests.cpp
tests/loader_wsi_tests.cpp