From c6991cdf0eb8c1d03d404c5b1dc41d5649590cd8 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 30 Jan 2021 21:00:24 +0100 Subject: [PATCH] Skipped Allocator creation for UMA devices --- src/ComputeSharp/Graphics/GraphicsDevice.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp/Graphics/GraphicsDevice.cs b/src/ComputeSharp/Graphics/GraphicsDevice.cs index b4879f2b..afdf3cf6 100644 --- a/src/ComputeSharp/Graphics/GraphicsDevice.cs +++ b/src/ComputeSharp/Graphics/GraphicsDevice.cs @@ -115,9 +115,12 @@ namespace ComputeSharp allocatorDesc.pDevice = d3D12Device; allocatorDesc.pAdapter = dxgiAdapter; - fixed (Allocator** allocator = this.allocator) + if (!IsCacheCoherentUMA) { - D3D12MemoryAllocator.CreateAllocator(&allocatorDesc, allocator).Assert(); + fixed (Allocator** allocator = this.allocator) + { + D3D12MemoryAllocator.CreateAllocator(&allocatorDesc, allocator).Assert(); + } } }