diff --git a/src/ComputeSharp/Graphics/GraphicsDevice.cs b/src/ComputeSharp/Graphics/GraphicsDevice.cs index fb303d28..dfd55438 100644 --- a/src/ComputeSharp/Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp/Graphics/GraphicsDevice.cs @@ -188,6 +188,20 @@ public sealed unsafe class GraphicsDevice : NativeObject /// internal bool IsCacheCoherentUMA { get; } + /// + /// Checks whether the current device supports double precision floating point operations in shaders. + /// + /// Whether the current device supports double precision floating point operations in shaders. + [Pure] + public bool IsDoublePrecisionSupportAvailable() + { + ThrowIfDisposed(); + + var d3D12OptionsData = this.d3D12Device.Get()->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS); + + return d3D12OptionsData.DoublePrecisionFloatShaderOps; + } + /// /// Checks whether the current device supports the creation of /// resources for a specified type .