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