mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Add support to test the vulkan example on CPU
This commit is contained in:
parent
cabc36b8a4
commit
7a8d75b7ac
@ -563,6 +563,8 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VkPhysicalDeviceType deviceType = VK_PHYSICAL_DEVICE_TYPE_OTHER;
|
||||||
|
|
||||||
// Look for a GPU that supports swapchains
|
// Look for a GPU that supports swapchains
|
||||||
for (VkPhysicalDevice dev : devices)
|
for (VkPhysicalDevice dev : devices)
|
||||||
{
|
{
|
||||||
@ -608,6 +610,13 @@ public:
|
|||||||
if (deviceProperties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
|
if (deviceProperties.deviceType == VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
|
||||||
{
|
{
|
||||||
gpu = dev;
|
gpu = dev;
|
||||||
|
deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU;
|
||||||
|
}
|
||||||
|
else if ((deviceProperties.deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) &&
|
||||||
|
(deviceType != VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU))
|
||||||
|
{
|
||||||
|
gpu = dev;
|
||||||
|
deviceType = VK_PHYSICAL_DEVICE_TYPE_CPU;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user