Added manager tests

This commit is contained in:
Alejandro Saucedo 2020-08-28 17:09:17 +01:00
parent 46a0393b44
commit 85f43c5c8e
4 changed files with 250 additions and 39 deletions

View file

@ -22,13 +22,30 @@ debugMessageCallback(VkDebugReportFlagsEXT flags,
}
#endif
Manager::Manager()
Manager::Manager() : Manager(0)
{
this->mPhysicalDeviceIndex = 0;
}
Manager::Manager(uint32_t physicalDeviceIndex)
{
this->mPhysicalDeviceIndex = physicalDeviceIndex;
// TODO: Moving this into a separate init
this->createInstance();
this->createDevice();
}
Manager::Manager(std::shared_ptr<vk::Instance> instance,
std::shared_ptr<vk::PhysicalDevice> physicalDevice,
std::shared_ptr<vk::Device> device,
uint32_t physicalDeviceIndex)
{
this->mInstance = instance;
this->mPhysicalDevice = physicalDevice;
this->mDevice = device;
this->mPhysicalDeviceIndex = physicalDeviceIndex;
}
Manager::~Manager()
{
SPDLOG_DEBUG("Kompute Manager Destructor started");