mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +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)
|
||||||
{
|
{
|
||||||
@ -607,7 +609,14 @@ 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