diff options
| author | Courtney Goeltzenleuchter <courtneygo@google.com> | 2016-01-08 12:18:43 -0700 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2016-01-20 18:04:55 -0700 |
| commit | a1de4b2dffb98222ca59f4a70c301d22bb4c089e (patch) | |
| tree | b5d9e5235b444d8995f2c122637280b8e32ef72d /loader/loader.h | |
| parent | e974568a65f7243dbc1eeb69d94174d0563c9d65 (diff) | |
| download | usermoji-a1de4b2dffb98222ca59f4a70c301d22bb4c089e.tar.xz | |
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
Diffstat (limited to 'loader/loader.h')
| -rw-r--r-- | loader/loader.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/loader/loader.h b/loader/loader.h index b5b3d2c9..55662b73 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -241,6 +241,8 @@ struct loader_instance { struct loader_layer_list activated_layer_list; + VkInstance instance; + bool debug_report_enabled; VkLayerDbgFunctionNode *DbgFunctionHead; @@ -425,6 +427,12 @@ VKAPI_ATTR void VKAPI_CALL loader_GetPhysicalDeviceMemoryProperties ( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties * pProperties); +VkResult loader_create_device_terminator( + VkPhysicalDevice physicalDevice, + const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDevice* pDevice); + VKAPI_ATTR VkResult VKAPI_CALL loader_CreateDevice( VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, @@ -490,7 +498,11 @@ VkResult loader_enable_instance_layers( const VkInstanceCreateInfo *pCreateInfo, const struct loader_layer_list *instance_layers); void loader_deactivate_instance_layers(struct loader_instance *instance); -uint32_t loader_activate_instance_layers(struct loader_instance *inst); + +VkResult loader_create_instance_chain(const VkInstanceCreateInfo *pCreateInfo, + const VkAllocationCallbacks* pAllocator, + struct loader_instance *inst); + void loader_activate_instance_layer_extensions(struct loader_instance *inst, VkInstance created_inst); void* loader_heap_alloc( |
