realitix/vulkan

Question about _wrap functions

Closed this issue · 3 comments

I see that certain functions are only defined with a _wrap prefix, such as vkGetPhysicalDeviceSurfaceSupportKHR. It looks like such functions require a call to vkGetInstanceProcAddr or vkGetDeviceProcAddr in order to get a function pointer.

I'm wondering why certain functions are defined with _wrap and others aren't.

Thanks.

Hello @apenngrace,
Indeed some functions require a call to vkGetDeviceProcAddr, extension functions.
Some functions don't need this call and are exposed directly by the SDK.
That's the reason.

Hello @apenngrace.
Sorry for my late reply, extensions function are not guaranteed to be present because they are extensions like the KHR functions for example. To enable it, you have to add the extension when you create the device and you must have a driver that support it.

I hope it answers to your question.