#include "vendor.hpp" #include using cruft::vk::icd::vendor; template <> cruft::vk::icd::icd_t json::tree::io::deserialise (json::tree::node const &obj) { return { .file_format_version = obj["'file_format_version"].as_string (), .icd = { .library_path = obj["ICD"]["library_path"].as_string ().native (), .api_version = obj["ICD"]["api_version"].as_string (), }, }; } /////////////////////////////////////////////////////////////////////////////// vendor::vendor (icd_t const &_icd): vendor (cruft::library (_icd.icd.library_path)) { ; } //----------------------------------------------------------------------------- vendor::vendor (::cruft::library &&_library) : m_library (std::move (_library)) , m_get_proc (m_library.symbol ("vk_icdGetInstanceProcAddr")) { vtable.CreateInstance = reinterpret_cast (m_get_proc (nullptr, "vkCreateInstance")); }