tools/hello: cache the vkCreateDebugReportCallbackEXT lookup
This commit is contained in:
parent
5d2c872596
commit
345b428069
@ -299,12 +299,16 @@ VkResult _vkCreateDebugReportCallbackEXT (
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDebugReportCallbackEXT* pCallback
|
||||
) noexcept {
|
||||
return reinterpret_cast<decltype(_vkCreateDebugReportCallbackEXT)*> (
|
||||
static auto fn = reinterpret_cast<
|
||||
decltype(_vkCreateDebugReportCallbackEXT)*
|
||||
> (
|
||||
vkGetInstanceProcAddr (
|
||||
instance,
|
||||
"vkCreateDebugReportCallbackEXT"
|
||||
)
|
||||
) (instance, pCreateInfo, pAllocator, pCallback);
|
||||
);
|
||||
|
||||
return fn (instance, pCreateInfo, pAllocator, pCallback);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user