2017-09-08 17:05:59 +10:00
|
|
|
/*
|
2018-08-04 15:24:36 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2017-09-08 17:05:59 +10:00
|
|
|
*
|
|
|
|
* Copyright:
|
|
|
|
* 2017, Danny Robson <danny@nerdcruft.net>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "./traits.hpp"
|
|
|
|
|
2017-09-14 00:31:23 +10:00
|
|
|
#include "./instance.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2019-03-03 22:12:46 +11:00
|
|
|
#if 0
|
2017-09-14 00:31:23 +10:00
|
|
|
#define INSTANTIATE(KLASS, NAME, FUNC) \
|
|
|
|
decltype(FUNC)* cruft::vk::life_traits<KLASS>::NAME = nullptr
|
|
|
|
|
|
|
|
INSTANTIATE(VkDebugReportCallbackEXT, create, vkCreateDebugReportCallbackEXT);
|
|
|
|
INSTANTIATE(VkDebugReportCallbackEXT, destroy, vkDestroyDebugReportCallbackEXT);
|
2019-03-03 22:12:46 +11:00
|
|
|
#endif
|
2017-09-14 00:31:23 +10:00
|
|
|
|
2017-09-08 17:05:59 +10:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2017-09-14 00:31:23 +10:00
|
|
|
void
|
|
|
|
cruft::vk::load_traits (instance &i)
|
|
|
|
{
|
2019-03-03 22:12:46 +11:00
|
|
|
#if 0
|
2017-09-14 00:31:23 +10:00
|
|
|
#define LOAD(KLASS,NAME,FUNC) \
|
|
|
|
try { \
|
|
|
|
cruft::vk::life_traits<KLASS>::NAME = i.proc<decltype(&FUNC)> (#FUNC); \
|
|
|
|
} catch (const vk::invalid_argument&) \
|
|
|
|
{ ; }
|
|
|
|
|
|
|
|
LOAD(VkDebugReportCallbackEXT, create, vkCreateDebugReportCallbackEXT);
|
|
|
|
LOAD(VkDebugReportCallbackEXT, destroy, vkDestroyDebugReportCallbackEXT);
|
2019-03-03 22:12:46 +11:00
|
|
|
#else
|
|
|
|
(void)i;
|
|
|
|
#endif
|
2017-09-14 00:31:23 +10:00
|
|
|
}
|