The handling of unknown device functions queried with vkGetInstanceProcAddr
required an additional pointer dereference to get the dispatch table.
The VkDevice handle is a pointer to the `chain_device` member of
`loader_device`. This member is actually a pointer to `loader_dispatch`, or
put another way, the "start" of `loader_device`. Thus, to get access to the
dispatch table, we need to dereference the VkDevice passed into the function
then dereference the chain_device to get loader_dispatch`.
DevExtTramp macro num
public _vkdev_ext&num&@4
_vkdev_ext&num&@4:
- mov eax, dword ptr [esp + 4] ; Dereference the handle to get the dispatch table
+ mov eax, dword ptr [esp + 4] ; Dereference the handle to get VkDevice chain_device
+ mov eax, dword ptr [eax] ; Dereference the chain_device to get the loader_dispatch
jmp dword ptr [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * num))] ; Jump to the appropriate call chain
endm