#pragma once #include #include #include #include #include #include #include /////////////////////////////////////////////////////////////////////////////// namespace cruft::vk::load { struct icd_t { std::string file_format_version; struct { std::filesystem::path library_path; std::string api_version; } icd; }; std::vector enumerate [[gnu::visibility("default")]] (void); struct vendor_table { VkResult (*vk_icdNegotiateLoaderICDInterfaceVersion)(u32*) = nullptr; void* (*vk_icdGetInstanceProcAddr) (VkInstance, char const*) = nullptr; void* (*vk_icdGetPhysicalDeviceProcAddr) (VkInstance, char const*) = nullptr; }; class [[gnu::visibility("default")]] vendor { public: vendor (icd_t const&); vendor (::cruft::library &&); private: ::cruft::library m_library; public: vendor_table vtable; instance_table itable; u32 version = 0; }; }