diff options
| author | Mark Young <marky@lunarg.com> | 2016-11-07 13:27:02 -0700 |
|---|---|---|
| committer | Mark Young <marky@lunarg.com> | 2016-11-14 11:02:40 -0700 |
| commit | e7bf86e164e88409324fa2c8b41e0775f9d48501 (patch) | |
| tree | 10ebbd2988ad6537ee5977b11ef3814ac628bc52 /loader/loader.h | |
| parent | 1731acbd8ce5cdadf879117f92cd0b1d1388e440 (diff) | |
| download | usermoji-e7bf86e164e88409324fa2c8b41e0775f9d48501.tar.xz | |
loader: gh1120/gh1134 - Object wrapping issues
First issue was that we needed to override vkGetDeviceProcAddr. Instead
of allowing this to always go directly to the ICD, we needed to intercept
a few commands because they require a loader trampoline and terminator
call. Most commands still return a pointer directly to ICD command.
GH1120 - Unwrap both the physical device handles and the
KHR_surface handles in the loader during both the trampoline and
terminator calls for DebugMarker commands. This has to be done since the
values given to an application are the loader trampoline versions, and the
values given to the last layer is the loader terminator versions.
GH1134 - We were passing down the wrong device object to the ICD functions
when querying the ICD command function address and comparing it in the
override functions.
Thanks to Baldur (Mr. Renderdoc) for discovering this, testing my
fixes, and resolving several bugs.
Change-Id: I7618d71ffee6c53d9842758210a9261f6b3a1797
Diffstat (limited to 'loader/loader.h')
| -rw-r--r-- | loader/loader.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/loader/loader.h b/loader/loader.h index daf663eb..fc035ed3 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -166,7 +166,9 @@ struct loader_dev_dispatch_table { // per CreateDevice structure struct loader_device { struct loader_dev_dispatch_table loader_dispatch; - VkDevice device; // device object from the icd + VkDevice chain_device; // device object from the dispatch chain + VkDevice icd_device; // device object from the icd + struct loader_physical_device_term *phys_dev_term; struct loader_layer_list activated_layer_list; @@ -200,6 +202,8 @@ struct loader_icd_term { PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT; PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT; PFN_vkDebugReportMessageEXT DebugReportMessageEXT; + PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT; + PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT; PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR; @@ -526,8 +530,7 @@ void loader_init_dispatch_dev_ext(struct loader_instance *inst, struct loader_device *dev); void *loader_dev_ext_gpa(struct loader_instance *inst, const char *funcName); void *loader_get_dev_ext_trampoline(uint32_t index); -void loader_override_terminating_device_proc( - VkDevice device, struct loader_dev_dispatch_table *disp_table); +void loader_override_terminating_device_proc(struct loader_device *dev); struct loader_instance *loader_get_instance(const VkInstance instance); void loader_deactivate_layers(const struct loader_instance *instance, struct loader_device *device, |
