|
|
@@ -599,6 +599,25 @@ namespace Ryujinx.Graphics.Vulkan
|
|
|
return new HardwareInfo(GpuVendor, GpuRenderer);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Gets the available Vulkan devices using the default Vulkan API
|
|
|
+ /// object returned by <see cref="Vk.GetApi()"/>
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static DeviceInfo[] GetPhysicalDevices()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ return VulkanInitialization.GetSuitablePhysicalDevices(Vk.GetApi());
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Logger.Error?.PrintMsg(LogClass.Gpu, $"Error querying Vulkan devices: {ex.Message}");
|
|
|
+
|
|
|
+ return Array.Empty<DeviceInfo>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public static DeviceInfo[] GetPhysicalDevices(Vk api)
|
|
|
{
|
|
|
try
|