From 8fcb369a70b40c1704d27d387c095de910bb1ba9 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sun, 3 Jan 2021 14:11:45 +0100 Subject: [PATCH] Added cache coherent UMA info to GraphicsDevice --- src/ComputeSharp.Graphics/GraphicsDevice.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ComputeSharp.Graphics/GraphicsDevice.cs b/src/ComputeSharp.Graphics/GraphicsDevice.cs index bfb9e5cd..ff2dfd47 100644 --- a/src/ComputeSharp.Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp.Graphics/GraphicsDevice.cs @@ -99,6 +99,10 @@ namespace ComputeSharp.Graphics ComputeUnits = d3D12Options1Data.TotalLaneCount; WavefrontSize = d3D12Options1Data.WaveLaneCountMin; + + var d3D12Architecture1Data = d3D12Device.Get()->CheckFeatureSupport(D3D12_FEATURE_ARCHITECTURE1); + + IsCacheCoherentUMA = d3D12Architecture1Data.CacheCoherentUMA != 0; } /// @@ -142,6 +146,11 @@ namespace ComputeSharp.Graphics /// internal ID3D12Device* D3D12Device => this.d3D12Device; + /// + /// Gets whether or not the current device has a cache coherent UMA architecture. + /// + internal bool IsCacheCoherentUMA { get; } + /// /// Checks whether the current device supports the creation of /// resources for a specified type .