moved to .cpp about ChoosePhysicalDevice

This commit is contained in:
2023-05-12 00:32:12 +08:00
parent 9a24aa237d
commit 254264ac5e
2 changed files with 19 additions and 14 deletions

View File

@@ -250,16 +250,7 @@ public:
const PreferFormats *spf_depth,
const VulkanHardwareRequirement *req);
virtual bool ChoosePhysicalDevice()
{
physical_device=nullptr;
if(!physical_device)physical_device=instance->GetDevice(VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU); //先找独显
if(!physical_device)physical_device=instance->GetDevice(VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU); //再找集显
if(!physical_device)physical_device=instance->GetDevice(VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU); //最后找虚拟显卡
return physical_device;
}
virtual bool ChoosePhysicalDevice();
virtual bool RequirementCheck();