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