loader: implement new layer init method
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Fri, 8 Jan 2016 19:18:43 +0000 (12:18 -0700)
committerJon Ashburn <jon@lunarg.com>
Thu, 21 Jan 2016 01:04:55 +0000 (18:04 -0700)
commita1de4b2dffb98222ca59f4a70c301d22bb4c089e
treeb5d9e5235b444d8995f2c122637280b8e32ef72d
parente974568a65f7243dbc1eeb69d94174d0563c9d65
loader: implement new layer init method

New layer init method requires the construction of
Link information for CreateInstance and CreateDevice
that is accessible to layers via the CreateInfo.pNext pointer.
The layer can then use the Get*ProcAddr from the Link
structure to initialize their dispatch table if the
call down the chain returns successfully.
This removes the need to do special initialization work
at Get*ProcAddr time.
Layer Get*ProcAddr now return their internal function
pointers regardless of the value of instance or device.
Only need to have valid instance & device when looking
up extensions or when passing the request down the chain.
This mechanism allows us to remove object wrapping used
by the loader previously. Also simplifies the dispatch table
setup.

Conflicts:
layers/device_limits.cpp
layers/draw_state.cpp
loader/loader.c
loader/trampoline.c
21 files changed:
include/vulkan/vk_layer.h
layers/api_dump.h
layers/basic.cpp
layers/device_limits.cpp
layers/draw_state.cpp
layers/image.cpp
layers/mem_tracker.cpp
layers/multi.cpp
layers/object_tracker.h
layers/param_checker.cpp
layers/screenshot.cpp
layers/swapchain.cpp
layers/unique_objects.h
layers/vk_layer_table.cpp
layers/vk_layer_table.h
loader/loader.c
loader/loader.h
loader/table_ops.h
loader/trampoline.c
vk-generate.py
vk-layer-generate.py