File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,15 +161,20 @@ VKInstance::VKInstance()
161161std::vector<std::shared_ptr<Adapter>> VKInstance::EnumerateAdapters ()
162162{
163163 std::vector<std::shared_ptr<Adapter>> adapters;
164+ std::vector<std::shared_ptr<Adapter>> sortware_adapters;
164165 auto devices = m_instance->enumeratePhysicalDevices ();
165166 for (const auto & device : devices) {
166167 vk::PhysicalDeviceProperties device_properties = device.getProperties ();
167-
168168 if (device_properties.deviceType == vk::PhysicalDeviceType::eDiscreteGpu ||
169169 device_properties.deviceType == vk::PhysicalDeviceType::eIntegratedGpu) {
170170 adapters.emplace_back (std::make_shared<VKAdapter>(*this , device));
171+ } else if (device_properties.deviceType == vk::PhysicalDeviceType::eCpu) {
172+ sortware_adapters.emplace_back (std::make_shared<VKAdapter>(*this , device));
171173 }
172174 }
175+ if (adapters.empty ()) {
176+ return sortware_adapters;
177+ }
173178 return adapters;
174179}
175180
You can’t perform that action at this time.
0 commit comments