tools/hello: avoid needing _vkCreateDebugReportCallbackEXT symbol
This commit is contained in:
parent
e531875ad6
commit
0a952801b3
@ -293,6 +293,21 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
VkResult _vkCreateDebugReportCallbackEXT (
|
||||||
|
VkInstance instance,
|
||||||
|
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
|
||||||
|
const VkAllocationCallbacks* pAllocator,
|
||||||
|
VkDebugReportCallbackEXT* pCallback
|
||||||
|
) noexcept {
|
||||||
|
return reinterpret_cast<decltype(_vkCreateDebugReportCallbackEXT)*> (
|
||||||
|
vkGetInstanceProcAddr (
|
||||||
|
instance,
|
||||||
|
"vkCreateDebugReportCallbackEXT"
|
||||||
|
)
|
||||||
|
) (instance, pCreateInfo, pAllocator, pCallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
@ -332,16 +347,14 @@ main (void)
|
|||||||
;
|
;
|
||||||
|
|
||||||
debug_info.pfnCallback = vk_debug_callback;
|
debug_info.pfnCallback = vk_debug_callback;
|
||||||
if (0) {
|
VkDebugReportCallbackEXT obj;
|
||||||
VkDebugReportCallbackEXT obj;
|
auto res = _vkCreateDebugReportCallbackEXT (instance.native (), &debug_info, nullptr, &obj);
|
||||||
auto res = vkCreateDebugReportCallbackEXT (instance.native (), &debug_info, nullptr, &obj);
|
if (res != VK_SUCCESS)
|
||||||
if (res != VK_SUCCESS)
|
panic ("deport report callback");
|
||||||
panic ("deport report callback");
|
|
||||||
}
|
|
||||||
|
|
||||||
auto debug_callback = cruft::vk::make_owned<cruft::vk::debug_report> (
|
//auto debug_callback = cruft::vk::make_owned<cruft::vk::debug_report> (
|
||||||
instance, &debug_info, nullptr
|
// instance, &debug_info, nullptr
|
||||||
);
|
//);
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user