From 39130cbada3f5ad0f5c733f8bd940d617ad75219 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 6 Sep 2019 18:05:28 +0200 Subject: [PATCH] Tweaked some public properties for the GraphicsDevice class --- src/ComputeSharp.Graphics/GraphicsDevice.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ComputeSharp.Graphics/GraphicsDevice.cs b/src/ComputeSharp.Graphics/GraphicsDevice.cs index c4322efd..63252662 100644 --- a/src/ComputeSharp.Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp.Graphics/GraphicsDevice.cs @@ -46,7 +46,9 @@ namespace ComputeSharp.Graphics public GraphicsDevice(ID3D12Device device, AdapterDescription description) { NativeDevice = device; - Description = description; + Name = description.Description; + MemorySize = description.DedicatedVideoMemory; + ComputeUnits = device.Options1.TotalLaneCount; WavefrontSize = device.Options1.WaveLaneCountMin; NativeComputeCommandQueue = NativeDevice.CreateCommandQueue(new CommandQueueDescription(CommandListType.Compute)); @@ -65,9 +67,19 @@ namespace ComputeSharp.Graphics } /// - /// Gets the available info for the current instance + /// Gets the name of the current instance /// - public AdapterDescription Description { get; } + public string Name { get; } + + /// + /// Gets the size of the dedicated video memory for the current instance + /// + public long MemorySize { get; } + + /// + /// Gets the number of total lanes on the current device (eg. CUDA cores on an nVidia GPU) + /// + public int ComputeUnits { get; } /// /// Gets the number of lanes in a SIMD wave on the current device (also known as "wavefront size" or "warp width")