diff --git a/src/ComputeSharp/Graphics/Resources/Abstract/StructuredBuffer{T}.cs b/src/ComputeSharp/Graphics/Resources/Abstract/StructuredBuffer{T}.cs index 5ccda018..9ec2c94b 100644 --- a/src/ComputeSharp/Graphics/Resources/Abstract/StructuredBuffer{T}.cs +++ b/src/ComputeSharp/Graphics/Resources/Abstract/StructuredBuffer{T}.cs @@ -65,7 +65,7 @@ public abstract class StructuredBuffer : Buffer nint byteLength = count * sizeof(T); #if NET6_0_OR_GREATER - using ComPtr allocation = GraphicsDevice.Allocator->CreateResource(null, ResourceType.ReadBack, AllocationMode.Default, (ulong)byteLength); + using ComPtr allocation = GraphicsDevice.Allocator->CreateResource(GraphicsDevice.Pool, ResourceType.ReadBack, AllocationMode.Default, (ulong)byteLength); #else using ComPtr d3D12Resource = GraphicsDevice.D3D12Device->CreateCommittedResource( ResourceType.ReadBack, @@ -226,7 +226,7 @@ public abstract class StructuredBuffer : Buffer nint byteLength = length * sizeof(T); #if NET6_0_OR_GREATER - using ComPtr allocation = GraphicsDevice.Allocator->CreateResource(null, ResourceType.Upload, AllocationMode.Default, (ulong)byteLength); + using ComPtr allocation = GraphicsDevice.Allocator->CreateResource(GraphicsDevice.Pool, ResourceType.Upload, AllocationMode.Default, (ulong)byteLength); #else using ComPtr d3D12Resource = GraphicsDevice.D3D12Device->CreateCommittedResource( ResourceType.Upload,