Update namespaces in ComputeSharp.D3D12MemoryAllocator

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-18 12:08:18 +02:00
1 親 e69cb04880
コミット 0d786ebe66
6ファイル変更
+41 -31

検索条件に一致するファイルはありません

+11 -9
ファイルの表示
@@ -1,9 +1,11 @@
using ComputeSharp.Core.Extensions;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using static TerraFX.Interop.DirectX.D3D12_CPU_PAGE_PROPERTY;
using static TerraFX.Interop.DirectX.D3D12_HEAP_TYPE;
using static TerraFX.Interop.DirectX.D3D12_MEMORY_POOL;
using ComputeSharp.Win32;
using static ComputeSharp.Win32.D3D12_CPU_PAGE_PROPERTY;
using static ComputeSharp.Win32.D3D12_HEAP_TYPE;
using static ComputeSharp.Win32.D3D12_MEMORY_POOL;
using D3D12MA_Allocator = TerraFX.Interop.DirectX.D3D12MA_Allocator;
using D3D12MA_Pool = TerraFX.Interop.DirectX.D3D12MA_Pool;
using D3D12MA_POOL_DESC = TerraFX.Interop.DirectX.D3D12MA_POOL_DESC;
namespace ComputeSharp.D3D12MemoryAllocator.Extensions;
@@ -24,11 +26,11 @@ internal static unsafe class AllocatorExtensions
D3D12MA_POOL_DESC poolDesc = default;
poolDesc.HeapProperties.CreationNodeMask = 1;
poolDesc.HeapProperties.VisibleNodeMask = 1;
poolDesc.HeapProperties.Type = D3D12_HEAP_TYPE_CUSTOM;
poolDesc.HeapProperties.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_WRITE_BACK;
poolDesc.HeapProperties.MemoryPoolPreference = D3D12_MEMORY_POOL_L0;
poolDesc.HeapProperties.Type = (TerraFX.Interop.DirectX.D3D12_HEAP_TYPE)D3D12_HEAP_TYPE_CUSTOM;
poolDesc.HeapProperties.CPUPageProperty = (TerraFX.Interop.DirectX.D3D12_CPU_PAGE_PROPERTY)D3D12_CPU_PAGE_PROPERTY_WRITE_BACK;
poolDesc.HeapProperties.MemoryPoolPreference = (TerraFX.Interop.DirectX.D3D12_MEMORY_POOL)D3D12_MEMORY_POOL_L0;
allocator.CreatePool(&poolDesc, pool.GetAddressOf()).Assert();
((HRESULT)(int)allocator.CreatePool(&poolDesc, pool.GetAddressOf())).Assert();
return pool.Move();
}
+9 -7
ファイルの表示
@@ -1,9 +1,11 @@
using ComputeSharp.Core.Extensions;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using System.Runtime.CompilerServices;
using ComputeSharp.Core.Extensions;
using ComputeSharp.Win32;
using D3D12MA_Allocator = TerraFX.Interop.DirectX.D3D12MA_Allocator;
using D3D12MA_ALLOCATOR_DESC = TerraFX.Interop.DirectX.D3D12MA_ALLOCATOR_DESC;
using D3D12MemAlloc = TerraFX.Interop.DirectX.D3D12MemAlloc;
namespace ComputeSharp.Graphics.Extensions;
namespace ComputeSharp.D3D12MemoryAllocator.Extensions;
/// <summary>
/// A <see langword="class"/> with extensions for the <see cref="ID3D12Device"/> type.
@@ -21,10 +23,10 @@ internal static unsafe class ID3D12DeviceExtensions
using ComPtr<D3D12MA_Allocator> allocator = default;
D3D12MA_ALLOCATOR_DESC allocatorDesc = default;
allocatorDesc.pDevice = (ID3D12Device*)Unsafe.AsPointer(ref d3D12Device);
allocatorDesc.pAdapter = dxgiAdapter;
allocatorDesc.pDevice = (TerraFX.Interop.DirectX.ID3D12Device*)Unsafe.AsPointer(ref d3D12Device);
allocatorDesc.pAdapter = (TerraFX.Interop.DirectX.IDXGIAdapter*)dxgiAdapter;
D3D12MemAlloc.D3D12MA_CreateAllocator(&allocatorDesc, allocator.GetAddressOf()).Assert();
((HRESULT)(int)D3D12MemAlloc.D3D12MA_CreateAllocator(&allocatorDesc, allocator.GetAddressOf())).Assert();
return allocator.Move();
}