title: MoltenVK driver calls the wrong functions for some Vulkan function calls
body: <p>I'm trying to use Vulkan on MacOS, with the eventual goal of making a cross platform program. My program worked when I statically linked MoltenVK (with the vulkan headers copied into it). </p>
  
  <p>My current setup statically links vulkan.framework, and uses an ICD to load libMoltenVK.dylib. This initially appeared to work: in the logs, I can see "INFO: Found ICD manifest file [expected path to my manifest file]". All the extensions I expect are then found and listed, including <code>VK_KHR_surface</code>. I enable it when I create my <code>VkInstance</code>. </p>
  
  <p>I can call various vulkan functions successfully, including <code>vkCreateMacOSSurfaceMVK</code>. However, when I try to call <code>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</code>, my program crashes. </p>
  
  <p>With no validation layers, it seems like vulkan loads the wrong function: the next symbol in the call stack is <code>vkCreateQueryPool</code> instead of the expected <code>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</code>, and MoltenVK prints <code>[***MoltenVK ERROR***] VK_ERROR_INITIALIZATION_FAILED: vkCreateQueryPool: Unsupported query pool type: -1094795586</code>. The program crashes on the next vulkan call, which happens to be <code>vkGetPhysicalDeviceSurfaceFormatsKHR</code>, but which actually calls into <code>MVKDevice::destoryQueryPool</code>. </p>
  
  <p>With validation layers on, the program crashes on <code>vkGetPhysicalDeviceSurfaceCapabilitiesKHR</code>, which tries to call <code>0x0</code>. There are no errors printed about validation failing for any of them. </p>
  
  <p>I tried turning on Dynamic Linker API usage/ Dynamic Library loads in Xcode's scheme editor, but I didn't find the information they provided helpful. </p>
  
  <p>Why would vulkan/dyld not hook up some functions correctly? How can I debug this? </p>