Merge pull request #333 from Sergio0694/dev/fix-missing-pools

Fix two allocations using D3D12MA without custom pools
このコミットが含まれているのは:
Sergio Pedri authored and GitHub committed 2022-08-07 18:42:12 +02:00
コミット c9b4bf3431
1ファイル変更
+2 -2
+2 -2
ファイルの表示
@@ -65,7 +65,7 @@ public abstract class StructuredBuffer<T> : Buffer<T>
nint byteLength = count * sizeof(T);
#if NET6_0_OR_GREATER
using ComPtr<D3D12MA_Allocation> allocation = GraphicsDevice.Allocator->CreateResource(null, ResourceType.ReadBack, AllocationMode.Default, (ulong)byteLength);
using ComPtr<D3D12MA_Allocation> allocation = GraphicsDevice.Allocator->CreateResource(GraphicsDevice.Pool, ResourceType.ReadBack, AllocationMode.Default, (ulong)byteLength);
#else
using ComPtr<ID3D12Resource> d3D12Resource = GraphicsDevice.D3D12Device->CreateCommittedResource(
ResourceType.ReadBack,
@@ -226,7 +226,7 @@ public abstract class StructuredBuffer<T> : Buffer<T>
nint byteLength = length * sizeof(T);
#if NET6_0_OR_GREATER
using ComPtr<D3D12MA_Allocation> allocation = GraphicsDevice.Allocator->CreateResource(null, ResourceType.Upload, AllocationMode.Default, (ulong)byteLength);
using ComPtr<D3D12MA_Allocation> allocation = GraphicsDevice.Allocator->CreateResource(GraphicsDevice.Pool, ResourceType.Upload, AllocationMode.Default, (ulong)byteLength);
#else
using ComPtr<ID3D12Resource> d3D12Resource = GraphicsDevice.D3D12Device->CreateCommittedResource(
ResourceType.Upload,