Switched to NuGet package for D3D12MA
このコミットが含まれているのは:
1 親
cb0268286e
コミット
7c8c37e6dd
12ファイル変更
+57
-68
検索条件に一致するファイルはありません
@@ -43,8 +43,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Tests.NativeLi
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SwapChain", "samples\ComputeSharp.SwapChain\ComputeSharp.SwapChain.csproj", "{E7C9247D-016B-4819-AF9F-0E9B3591E04B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TerraFX.Interop.D3D12MemoryAllocator", "..\terrafx.interop.d3d12memoryallocator\sources\Interop\D3D12MemoryAllocator\TerraFX.Interop.D3D12MemoryAllocator.csproj", "{DB64E751-125D-44E2-8EA9-F5B085714007}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.projitems*{7048deea-0a6f-46a0-b951-b682a8f1cb75}*SharedItemsImports = 5
|
||||
@@ -154,14 +152,6 @@ Global
|
||||
{E7C9247D-016B-4819-AF9F-0E9B3591E04B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E7C9247D-016B-4819-AF9F-0E9B3591E04B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E7C9247D-016B-4819-AF9F-0E9B3591E04B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DB64E751-125D-44E2-8EA9-F5B085714007}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -10,10 +10,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Toolkit.Diagnostics" Version="7.0.0-build.776" />
|
||||
<PackageReference Include="TerraFX.Interop.Windows" Version="10.0.19041-beta2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\terrafx.interop.d3d12memoryallocator\sources\Interop\D3D12MemoryAllocator\TerraFX.Interop.D3D12MemoryAllocator.csproj" />
|
||||
<PackageReference Include="TerraFX.Interop.D3D12MemoryAllocator" Version="2.0.0-beta1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -5,31 +5,31 @@ using TerraFX.Interop;
|
||||
using static TerraFX.Interop.D3D12_HEAP_TYPE;
|
||||
using static TerraFX.Interop.D3D12_RESOURCE_FLAGS;
|
||||
using static TerraFX.Interop.D3D12_RESOURCE_STATES;
|
||||
using static TerraFX.Interop.ALLOCATION_FLAGS;
|
||||
using static TerraFX.Interop.D3D12MA_ALLOCATION_FLAGS;
|
||||
using ResourceType = ComputeSharp.Graphics.Resources.Enums.ResourceType;
|
||||
|
||||
namespace ComputeSharp.Graphics.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> with extensions for the <see cref="Allocator"/> type.
|
||||
/// A <see langword="class"/> with extensions for the <see cref="D3D12MA_Allocator"/> type.
|
||||
/// </summary>
|
||||
internal static unsafe class AllocatorExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a resource for a given buffer type.
|
||||
/// </summary>
|
||||
/// <param name="allocator">The <see cref="Allocator"/> instance in use.</param>
|
||||
/// <param name="allocator">The <see cref="D3D12MA_Allocator"/> instance in use.</param>
|
||||
/// <param name="resourceType">The resource type currently in use.</param>
|
||||
/// <param name="allocationMode">The allocation mode to use for the new resource.</param>
|
||||
/// <param name="sizeInBytes">The size in bytes of the current buffer.</param>
|
||||
/// <returns>An <see cref="UniquePtr{T}"/> reference for the current <see cref="Allocation"/> object.</returns>
|
||||
public static UniquePtr<Allocation> CreateResource(
|
||||
this ref Allocator allocator,
|
||||
/// <returns>An <see cref="UniquePtr{T}"/> reference for the current <see cref="D3D12MA_Allocation"/> object.</returns>
|
||||
public static UniquePtr<D3D12MA_Allocation> CreateResource(
|
||||
this ref D3D12MA_Allocator allocator,
|
||||
ResourceType resourceType,
|
||||
AllocationMode allocationMode,
|
||||
ulong sizeInBytes)
|
||||
{
|
||||
ALLOCATION_FLAGS allocationFlags = allocationMode == AllocationMode.Default ? ALLOCATION_FLAG_NONE : ALLOCATION_FLAG_COMMITTED;
|
||||
D3D12MA_ALLOCATION_FLAGS allocationFlags = allocationMode == AllocationMode.Default ? D3D12MA_ALLOCATION_FLAG_NONE : D3D12MA_ALLOCATION_FLAG_COMMITTED;
|
||||
(D3D12_HEAP_TYPE d3D12HeapType,
|
||||
D3D12_RESOURCE_FLAGS d3D12ResourceFlags,
|
||||
D3D12_RESOURCE_STATES d3D12ResourceStates) = resourceType switch
|
||||
@@ -42,11 +42,11 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
_ => ThrowHelper.ThrowArgumentException<(D3D12_HEAP_TYPE, D3D12_RESOURCE_FLAGS, D3D12_RESOURCE_STATES)>()
|
||||
};
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Buffer(sizeInBytes, d3D12ResourceFlags);
|
||||
|
||||
ALLOCATION_DESC allocationDesc = default;
|
||||
D3D12MA_ALLOCATION_DESC allocationDesc = default;
|
||||
allocationDesc.HeapType = d3D12HeapType;
|
||||
allocationDesc.Flags = allocationFlags;
|
||||
|
||||
@@ -65,16 +65,16 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
/// <summary>
|
||||
/// Creates a resource for a given 2D texture type.
|
||||
/// </summary>
|
||||
/// <param name="allocator">The <see cref="Allocator"/> instance in use.</param>
|
||||
/// <param name="allocator">The <see cref="D3D12MA_Allocator"/> instance in use.</param>
|
||||
/// <param name="resourceType">The resource type currently in use.</param>
|
||||
/// <param name="allocationMode">The allocation mode to use for the new resource.</param>
|
||||
/// <param name="dxgiFormat">The <see cref="DXGI_FORMAT"/> value to use.</param>
|
||||
/// <param name="width">The width of the texture resource.</param>
|
||||
/// <param name="height">The height of the texture resource.</param>
|
||||
/// <param name="d3D12ResourceStates">The default <see cref="D3D12_RESOURCE_STATES"/> value for the resource.</param>
|
||||
/// <returns>An <see cref="UniquePtr{T}"/> reference for the current <see cref="Allocation"/> object.</returns>
|
||||
public static UniquePtr<Allocation> CreateResource(
|
||||
this ref Allocator allocator,
|
||||
/// <returns>An <see cref="UniquePtr{T}"/> reference for the current <see cref="D3D12MA_Allocation"/> object.</returns>
|
||||
public static UniquePtr<D3D12MA_Allocation> CreateResource(
|
||||
this ref D3D12MA_Allocator allocator,
|
||||
ResourceType resourceType,
|
||||
AllocationMode allocationMode,
|
||||
DXGI_FORMAT dxgiFormat,
|
||||
@@ -82,7 +82,7 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
uint height,
|
||||
out D3D12_RESOURCE_STATES d3D12ResourceStates)
|
||||
{
|
||||
ALLOCATION_FLAGS allocationFlags = allocationMode == AllocationMode.Default ? ALLOCATION_FLAG_NONE : ALLOCATION_FLAG_COMMITTED;
|
||||
D3D12MA_ALLOCATION_FLAGS allocationFlags = allocationMode == AllocationMode.Default ? D3D12MA_ALLOCATION_FLAG_NONE : D3D12MA_ALLOCATION_FLAG_COMMITTED;
|
||||
D3D12_RESOURCE_FLAGS d3D12ResourceFlags;
|
||||
|
||||
(d3D12ResourceFlags, d3D12ResourceStates) = resourceType switch
|
||||
@@ -92,11 +92,11 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
_ => ThrowHelper.ThrowArgumentException<(D3D12_RESOURCE_FLAGS, D3D12_RESOURCE_STATES)>()
|
||||
};
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex2D(dxgiFormat, width, height, mipLevels: 1, flags: d3D12ResourceFlags);
|
||||
|
||||
ALLOCATION_DESC allocationDesc = default;
|
||||
D3D12MA_ALLOCATION_DESC allocationDesc = default;
|
||||
allocationDesc.HeapType = D3D12_HEAP_TYPE_DEFAULT;
|
||||
allocationDesc.Flags = allocationFlags;
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
/// <summary>
|
||||
/// Creates a resource for a given 3D texture type.
|
||||
/// </summary>
|
||||
/// <param name="allocator">The <see cref="Allocator"/> instance in use.</param>
|
||||
/// <param name="allocator">The <see cref="D3D12MA_Allocator"/> instance in use.</param>
|
||||
/// <param name="resourceType">The resource type currently in use.</param>
|
||||
/// <param name="allocationMode">The allocation mode to use for the new resource.</param>
|
||||
/// <param name="dxgiFormat">The <see cref="DXGI_FORMAT"/> value to use.</param>
|
||||
@@ -123,9 +123,9 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
/// <param name="height">The height of the texture resource.</param>
|
||||
/// <param name="depth">The depth of the texture resource.</param>
|
||||
/// <param name="d3D12ResourceStates">The default <see cref="D3D12_RESOURCE_STATES"/> value for the resource.</param>
|
||||
/// <returns>An <see cref="UniquePtr{T}"/> reference for the current <see cref="Allocation"/> object.</returns>
|
||||
public static UniquePtr<Allocation> CreateResource(
|
||||
this ref Allocator allocator,
|
||||
/// <returns>An <see cref="UniquePtr{T}"/> reference for the current <see cref="D3D12MA_Allocation"/> object.</returns>
|
||||
public static UniquePtr<D3D12MA_Allocation> CreateResource(
|
||||
this ref D3D12MA_Allocator allocator,
|
||||
ResourceType resourceType,
|
||||
AllocationMode allocationMode,
|
||||
DXGI_FORMAT dxgiFormat,
|
||||
@@ -134,7 +134,7 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
ushort depth,
|
||||
out D3D12_RESOURCE_STATES d3D12ResourceStates)
|
||||
{
|
||||
ALLOCATION_FLAGS allocationFlags = allocationMode == AllocationMode.Default ? ALLOCATION_FLAG_NONE : ALLOCATION_FLAG_COMMITTED;
|
||||
D3D12MA_ALLOCATION_FLAGS allocationFlags = allocationMode == AllocationMode.Default ? D3D12MA_ALLOCATION_FLAG_NONE : D3D12MA_ALLOCATION_FLAG_COMMITTED;
|
||||
D3D12_RESOURCE_FLAGS d3D12ResourceFlags;
|
||||
|
||||
(d3D12ResourceFlags, d3D12ResourceStates) = resourceType switch
|
||||
@@ -144,11 +144,11 @@ namespace ComputeSharp.Graphics.Extensions
|
||||
_ => ThrowHelper.ThrowArgumentException<(D3D12_RESOURCE_FLAGS, D3D12_RESOURCE_STATES)>()
|
||||
};
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
|
||||
D3D12_RESOURCE_DESC d3D12ResourceDescription = D3D12_RESOURCE_DESC.Tex3D(dxgiFormat, width, height, depth, mipLevels: 1, flags: d3D12ResourceFlags);
|
||||
|
||||
ALLOCATION_DESC allocationDesc = default;
|
||||
D3D12MA_ALLOCATION_DESC allocationDesc = default;
|
||||
allocationDesc.HeapType = D3D12_HEAP_TYPE_DEFAULT;
|
||||
allocationDesc.Flags = allocationFlags;
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@ namespace ComputeSharp
|
||||
private ulong nextD3D12CopyFenceValue = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocator"/> in use associated to the current device.
|
||||
/// The <see cref="D3D12MA_Allocator"/> in use associated to the current device.
|
||||
/// </summary>
|
||||
private UniquePtr<Allocator> allocator;
|
||||
private UniquePtr<D3D12MA_Allocator> allocator;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="GraphicsDevice"/> instance for the input <see cref="ID3D12Device"/>.
|
||||
@@ -110,15 +110,15 @@ namespace ComputeSharp
|
||||
|
||||
IsCacheCoherentUMA = d3D12Architecture1Data.CacheCoherentUMA != 0;
|
||||
|
||||
ALLOCATOR_DESC allocatorDesc = default;
|
||||
D3D12MA_ALLOCATOR_DESC allocatorDesc = default;
|
||||
allocatorDesc.pDevice = d3D12Device;
|
||||
allocatorDesc.pAdapter = dxgiAdapter;
|
||||
|
||||
if (!IsCacheCoherentUMA)
|
||||
{
|
||||
fixed (Allocator** allocator = this.allocator)
|
||||
fixed (D3D12MA_Allocator** allocator = this.allocator)
|
||||
{
|
||||
D3D12MemoryAllocator.CreateAllocator(&allocatorDesc, allocator).Assert();
|
||||
D3D12MemAlloc.D3D12MA_CreateAllocator(&allocatorDesc, allocator).Assert();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,9 +165,9 @@ namespace ComputeSharp
|
||||
internal ID3D12Device* D3D12Device => this.d3D12Device;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the underlying <see cref="Allocator"/> wrapped by the current instance.
|
||||
/// Gets the underlying <see cref="D3D12MA_Allocator"/> wrapped by the current instance.
|
||||
/// </summary>
|
||||
internal Allocator* Allocator => this.allocator;
|
||||
internal D3D12MA_Allocator* Allocator => this.allocator;
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether or not the current device has a cache coherent UMA architecture.
|
||||
|
||||
@@ -7,9 +7,9 @@ using TerraFX.Interop;
|
||||
namespace ComputeSharp.Interop
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="ComPtr{T}"/>-equivalent type to safely work with pointers to public <see cref="D3D12MemoryAllocator"/> APIs.
|
||||
/// A <see cref="ComPtr{T}"/>-equivalent type to safely work with pointers to public <see cref="D3D12MemAlloc"/> APIs.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Must be either <see cref="Allocator"/>, <see cref="Allocation"/>, <see cref="Pool"/> or <see cref="VirtualBlock"/>.</typeparam>
|
||||
/// <typeparam name="T">Must be either <see cref="D3D12MA_Allocator"/>, <see cref="D3D12MA_Allocation"/>, <see cref="D3D12MA_Pool"/> or <see cref="D3D12MA_VirtualBlock"/>.</typeparam>
|
||||
/// <remarks>
|
||||
/// This type is not marked as <see langword="ref"/> so that it can also be used in fields, so make sure to
|
||||
/// avoid copying it and disposing it multiple times, as that would lead to a access violation exceptions.
|
||||
@@ -51,10 +51,10 @@ namespace ComputeSharp.Interop
|
||||
{
|
||||
this.pointer = null;
|
||||
|
||||
if (typeof(T) == typeof(Allocator)) ((Allocator*)pointer)->Release();
|
||||
else if (typeof(T) == typeof(Allocation)) ((Allocation*)pointer)->Release();
|
||||
else if (typeof(T) == typeof(Pool)) ((Pool*)pointer)->Release();
|
||||
else if (typeof(T) == typeof(VirtualBlock)) ((VirtualBlock*)pointer)->Release();
|
||||
if (typeof(T) == typeof(D3D12MA_Allocator)) ((D3D12MA_Allocator*)pointer)->Release();
|
||||
else if (typeof(T) == typeof(D3D12MA_Allocation)) ((D3D12MA_Allocation*)pointer)->Release();
|
||||
else if (typeof(T) == typeof(D3D12MA_Pool)) ((D3D12MA_Pool*)pointer)->Release();
|
||||
else if (typeof(T) == typeof(D3D12MA_VirtualBlock)) ((D3D12MA_VirtualBlock*)pointer)->Release();
|
||||
else throw new ArgumentException("Invalid pointer type");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ namespace ComputeSharp.Resources
|
||||
protected readonly nint SizeInBytes;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// The <see cref="D3D12MA_Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// </summary>
|
||||
/// <remarks>This will be <see langword="null"/> if the owning device has <see cref="GraphicsDevice.IsCacheCoherentUMA"/> set.</remarks>
|
||||
private UniquePtr<Allocation> allocation;
|
||||
private UniquePtr<D3D12MA_Allocation> allocation;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Buffer{T}"/> instance with the specified parameters.
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace ComputeSharp.Resources
|
||||
byteOffset = (nint)offset * sizeof(T),
|
||||
byteLength = length * sizeof(T);
|
||||
|
||||
using UniquePtr<Allocation> allocation = GraphicsDevice.Allocator->CreateResource(ResourceType.ReadBack, AllocationMode.Default, (ulong)byteLength);
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = GraphicsDevice.Allocator->CreateResource(ResourceType.ReadBack, AllocationMode.Default, (ulong)byteLength);
|
||||
|
||||
using (CommandList copyCommandList = new(GraphicsDevice, D3D12_COMMAND_LIST_TYPE_COPY))
|
||||
{
|
||||
@@ -157,7 +157,7 @@ namespace ComputeSharp.Resources
|
||||
byteOffset = (nint)offset * sizeof(T),
|
||||
byteLength = length * sizeof(T);
|
||||
|
||||
using UniquePtr<Allocation> allocation = GraphicsDevice.Allocator->CreateResource(ResourceType.Upload, AllocationMode.Default, (ulong)byteLength);
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = GraphicsDevice.Allocator->CreateResource(ResourceType.Upload, AllocationMode.Default, (ulong)byteLength);
|
||||
|
||||
using (ID3D12ResourceMap resource = allocation.Get()->GetResource()->Map())
|
||||
fixed (void* sourcePointer = &source)
|
||||
|
||||
@@ -57,10 +57,10 @@ namespace ComputeSharp.Resources
|
||||
private readonly D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// The <see cref="D3D12MA_Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// </summary>
|
||||
/// <remarks>This will be <see langword="null"/> if the owning device has <see cref="GraphicsDevice.IsCacheCoherentUMA"/> set.</remarks>
|
||||
private UniquePtr<Allocation> allocation;
|
||||
private UniquePtr<D3D12MA_Allocation> allocation;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Texture2D{T}"/> instance with the specified parameters.
|
||||
@@ -105,6 +105,7 @@ namespace ComputeSharp.Resources
|
||||
(uint)width,
|
||||
(uint)height,
|
||||
out this.d3D12ResourceState);
|
||||
|
||||
this.d3D12Resource = new ComPtr<ID3D12Resource>(this.allocation.Get()->GetResource());
|
||||
}
|
||||
|
||||
@@ -186,7 +187,7 @@ namespace ComputeSharp.Resources
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
using ComPtr<ID3D12Resource> d3D12Resource = default;
|
||||
|
||||
if (GraphicsDevice.IsCacheCoherentUMA)
|
||||
@@ -336,7 +337,7 @@ namespace ComputeSharp.Resources
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
using ComPtr<ID3D12Resource> d3D12Resource = default;
|
||||
|
||||
if (GraphicsDevice.IsCacheCoherentUMA)
|
||||
|
||||
@@ -57,10 +57,10 @@ namespace ComputeSharp.Resources
|
||||
private readonly D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// The <see cref="D3D12MA_Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// </summary>
|
||||
/// <remarks>This will be <see langword="null"/> if the owning device has <see cref="GraphicsDevice.IsCacheCoherentUMA"/> set.</remarks>
|
||||
private UniquePtr<Allocation> allocation;
|
||||
private UniquePtr<D3D12MA_Allocation> allocation;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Texture3D{T}"/> instance with the specified parameters.
|
||||
@@ -109,6 +109,7 @@ namespace ComputeSharp.Resources
|
||||
(uint)height,
|
||||
(ushort)depth,
|
||||
out this.d3D12ResourceState);
|
||||
|
||||
this.d3D12Resource = new ComPtr<ID3D12Resource>(this.allocation.Get()->GetResource());
|
||||
}
|
||||
|
||||
@@ -202,7 +203,7 @@ namespace ComputeSharp.Resources
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
using ComPtr<ID3D12Resource> d3D12Resource = default;
|
||||
|
||||
if (GraphicsDevice.IsCacheCoherentUMA)
|
||||
@@ -369,7 +370,7 @@ namespace ComputeSharp.Resources
|
||||
out ulong rowSizeInBytes,
|
||||
out ulong totalSizeInBytes);
|
||||
|
||||
using UniquePtr<Allocation> allocation = default;
|
||||
using UniquePtr<D3D12MA_Allocation> allocation = default;
|
||||
using ComPtr<ID3D12Resource> d3D12Resource = default;
|
||||
|
||||
if (GraphicsDevice.IsCacheCoherentUMA)
|
||||
|
||||
@@ -28,10 +28,10 @@ namespace ComputeSharp.Resources
|
||||
private readonly T* mappedData;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// The <see cref="D3D12MA_Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// </summary>
|
||||
/// <remarks>This will be <see langword="null"/> if the owning device has <see cref="GraphicsDevice.IsCacheCoherentUMA"/> set.</remarks>
|
||||
private UniquePtr<Allocation> allocation;
|
||||
private UniquePtr<D3D12MA_Allocation> allocation;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="TransferBuffer{T}"/> instance with the specified parameters.
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace ComputeSharp.Resources
|
||||
private readonly D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// The <see cref="D3D12MA_Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// </summary>
|
||||
/// <remarks>This will be <see langword="null"/> if the owning device has <see cref="GraphicsDevice.IsCacheCoherentUMA"/> set.</remarks>
|
||||
private UniquePtr<Allocation> allocation;
|
||||
private UniquePtr<D3D12MA_Allocation> allocation;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="TransferTexture2D{T}"/> instance with the specified parameters.
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace ComputeSharp.Resources
|
||||
private readonly D3D12_PLACED_SUBRESOURCE_FOOTPRINT d3D12PlacedSubresourceFootprint;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// The <see cref="D3D12MA_Allocation"/> instance used to retrieve <see cref="d3D12Resource"/>, if any.
|
||||
/// </summary>
|
||||
/// <remarks>This will be <see langword="null"/> if the owning device has <see cref="GraphicsDevice.IsCacheCoherentUMA"/> set.</remarks>
|
||||
private UniquePtr<Allocation> allocation;
|
||||
private UniquePtr<D3D12MA_Allocation> allocation;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="TransferTexture3D{T}"/> instance with the specified parameters.
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする