diff --git a/src/ComputeSharp/Gpu.cs b/src/ComputeSharp/Gpu.cs index 220a0916..1e3610b2 100644 --- a/src/ComputeSharp/Gpu.cs +++ b/src/ComputeSharp/Gpu.cs @@ -29,6 +29,18 @@ namespace ComputeSharp /// Make sure to check before accessing this property. public static GraphicsDevice Default => DefaultFactory.Value; + /// + /// Enumerates all the currently available DX12.0 devices. Note that creating a device is a relatively + /// expensive operation, so consider using to be able to filter the available + /// devices before creating them, to reduce the system overhead and avoiding creating unnecessary devices. + /// + /// A sequence of instances. + [Pure] + public static IEnumerable EnumerateDevices() + { + return new DeviceHelper.DeviceQuery(static _ => true); + } + /// /// Executes a query on the currently available DX12.0 devices matching a given predicate. ///