2018-09-10 13:21:02 +10:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "vk.hpp"
|
|
|
|
|
|
|
|
#include <cruft/util/library.hpp>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <experimental/filesystem>
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
namespace cruft::vk::icd {
|
|
|
|
struct icd_t {
|
|
|
|
std::string file_format_version;
|
|
|
|
struct {
|
|
|
|
std::experimental::filesystem::path library_path;
|
|
|
|
std::string api_version;
|
|
|
|
} icd;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<icd_t>
|
|
|
|
enumerate (void);
|
|
|
|
|
|
|
|
|
|
|
|
class vendor {
|
|
|
|
public:
|
|
|
|
vendor (icd_t const&);
|
|
|
|
vendor (::cruft::library &&);
|
|
|
|
|
|
|
|
struct vtable_t {
|
|
|
|
VkResult (*CreateInstance) (
|
|
|
|
VkInstanceCreateInfo const*,
|
|
|
|
VkAllocationCallbacks const*,
|
|
|
|
VkInstance*
|
|
|
|
) noexcept;
|
2018-11-05 15:04:04 +11:00
|
|
|
|
|
|
|
void (*GetInstanceProc) (VkInstance instance, const char* pName) noexcept;
|
2018-09-10 13:21:02 +10:00
|
|
|
} vtable;
|
|
|
|
|
|
|
|
private:
|
|
|
|
::cruft::library m_library;
|
|
|
|
|
|
|
|
public:
|
|
|
|
using get_proc_t = void* (*)(VkInstance, char const*);
|
|
|
|
get_proc_t const m_get_proc;
|
|
|
|
};
|
|
|
|
}
|