From 70ca027a5bb6a31c60178a7b68224efdb9231c12 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 9 Mar 2021 23:32:54 +0100 Subject: [PATCH] Minor improvements to some XML docs --- src/ComputeSharp/Gpu.cs | 17 +++++++++++++---- src/ComputeSharp/Graphics/GraphicsDevice.cs | 2 +- src/ComputeSharp/Graphics/GraphicsDeviceInfo.cs | 2 +- .../Graphics/Helpers/DeviceHelper.cs | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/ComputeSharp/Gpu.cs b/src/ComputeSharp/Gpu.cs index a075a6e3..a1dd8483 100644 --- a/src/ComputeSharp/Gpu.cs +++ b/src/ComputeSharp/Gpu.cs @@ -28,11 +28,14 @@ namespace ComputeSharp 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. + /// Enumerates all the currently available devices supporting the minimum necessary feature level. + /// Physical devices and integrated GPUs will be enumerated first, and the WARP device will always be last. /// /// A sequence of instances. + /// + /// Creating a device is a relatively expensive operation, so consider using to be + /// able to filter the existing adapters before creating a device from them, to reduce the system overhead. + /// [Pure] public static IEnumerable EnumerateDevices() { @@ -40,10 +43,16 @@ namespace ComputeSharp } /// - /// Executes a query on the currently available DX12.0 devices matching a given predicate. + /// Executes a query on the currently available devices matching a given predicate. /// /// The predicate to use to select the devices to create. /// A sequence of instances matching . + /// + /// Note that only devices matching the minimum necessary feature level will actually be instantiated and returned. + /// This means that might not actually be used to match against all existing adapters on + /// the current system, if any of them doesn't meet the minimum criteria, and that additional filtering might be done + /// after the input predicate is invoked, so a match doesn't necessarily guarantee that that device will be returned. + /// [Pure] public static IEnumerable QueryDevices(Predicate predicate) { diff --git a/src/ComputeSharp/Graphics/GraphicsDevice.cs b/src/ComputeSharp/Graphics/GraphicsDevice.cs index affde884..c9341815 100644 --- a/src/ComputeSharp/Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp/Graphics/GraphicsDevice.cs @@ -17,7 +17,7 @@ using static TerraFX.Interop.DXGI_ADAPTER_FLAG; namespace ComputeSharp { /// - /// A that represents a DX12-compatible GPU device that can be used to run compute shaders. + /// A that represents an instance that can be used to run compute shaders. /// [DebuggerDisplay("{ToString(),raw}")] public sealed unsafe class GraphicsDevice : NativeObject diff --git a/src/ComputeSharp/Graphics/GraphicsDeviceInfo.cs b/src/ComputeSharp/Graphics/GraphicsDeviceInfo.cs index 5c4b7f48..8212f7fe 100644 --- a/src/ComputeSharp/Graphics/GraphicsDeviceInfo.cs +++ b/src/ComputeSharp/Graphics/GraphicsDeviceInfo.cs @@ -4,7 +4,7 @@ using static TerraFX.Interop.DXGI_ADAPTER_FLAG; namespace ComputeSharp { /// - /// A type containing info on a given DX12.0 device that can be used. + /// A type containing info on a given device that can be used. /// public readonly struct GraphicsDeviceInfo { diff --git a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.cs b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.cs index 5b5b2f14..1a1b6e86 100644 --- a/src/ComputeSharp/Graphics/Helpers/DeviceHelper.cs +++ b/src/ComputeSharp/Graphics/Helpers/DeviceHelper.cs @@ -30,7 +30,7 @@ namespace ComputeSharp.Graphics.Helpers /// /// Gets the of the default device. /// - /// The of the default device supporting at least DX12.0. + /// The of the default device supporting and . /// This methods assumes that a default device is available. [Pure] public static unsafe Luid GetDefaultDeviceLuid() @@ -45,7 +45,7 @@ namespace ComputeSharp.Graphics.Helpers /// /// Gets the default instance. /// - /// The default instance supporting at least DX12.0. + /// The default instance supporting and . /// Thrown when a default device is not available. public static unsafe GraphicsDevice GetDefaultDevice() {