mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Examples: Vulkan: pick integrated GPU if nothing else is available. (#6359)
This commit is contained in:
parent
0fbf2888e7
commit
565aa0b763
@ -58,7 +58,7 @@ Other changes:
|
|||||||
by context (Desktop 3.0, 3.1, or 3.2+ with compat bit). (#6333) [@GereonV]
|
by context (Desktop 3.0, 3.1, or 3.2+ with compat bit). (#6333) [@GereonV]
|
||||||
- Examples: Added native Win32+OpenGL3 example. We don't recommend using this setup but we
|
- Examples: Added native Win32+OpenGL3 example. We don't recommend using this setup but we
|
||||||
provide it for completeness. (#3218, #5170, #6086, #2772, #2600, #2359, #2022, #1553) [@learn-more]
|
provide it for completeness. (#3218, #5170, #6086, #2772, #2600, #2359, #2022, #1553) [@learn-more]
|
||||||
|
- Examples: Vulkan: Use integrated GPU if nothing else is available. (#6359) [@kimidaisuki22]
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
@ -99,6 +99,10 @@ static VkPhysicalDevice SetupVulkan_SelectPhysicalDevice()
|
|||||||
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use first GPU (Integrated) is a Discrete one is not available.
|
||||||
|
if (gpu_count > 0)
|
||||||
|
return gpus[0];
|
||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,6 +87,10 @@ static VkPhysicalDevice SetupVulkan_SelectPhysicalDevice()
|
|||||||
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use first GPU (Integrated) is a Discrete one is not available.
|
||||||
|
if (gpu_count > 0)
|
||||||
|
return gpus[0];
|
||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user