Added explicit error check for when no supported GPUs are available to use #256
|
@ -61,8 +61,13 @@ namespace SHADE
|
||||||
SHVkInstance::Init(true, false, true);
|
SHVkInstance::Init(true, false, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Get Physical Device and Construct Logical Device
|
// Get Physical Device
|
||||||
physicalDevice = SHVkInstance::CreatePhysicalDevice(SH_PHYSICAL_DEVICE_TYPE::BEST);
|
physicalDevice = SHVkInstance::CreatePhysicalDevice(SH_PHYSICAL_DEVICE_TYPE::BEST);
|
||||||
|
if (!physicalDevice->GetVkPhysicalDevice())
|
||||||
|
{
|
||||||
|
throw std::runtime_error("[Graphics System] No supported Vulkan 1.3 compatible GPU was detected!");
|
||||||
|
}
|
||||||
|
// Construct Logical Device
|
||||||
device = SHVkInstance::CreateLogicalDevice({ SHQueueParams(SH_Q_FAM::GRAPHICS, SH_QUEUE_SELECT::DEDICATED), SHQueueParams(SH_Q_FAM::TRANSFER, SH_QUEUE_SELECT::DEDICATED) }, physicalDevice);
|
device = SHVkInstance::CreateLogicalDevice({ SHQueueParams(SH_Q_FAM::GRAPHICS, SH_QUEUE_SELECT::DEDICATED), SHQueueParams(SH_Q_FAM::TRANSFER, SH_QUEUE_SELECT::DEDICATED) }, physicalDevice);
|
||||||
|
|
||||||
// Construct surface
|
// Construct surface
|
||||||
|
|
Loading…
Reference in New Issue