Fixed resource disposing after owning device
このコミットが含まれているのは:
1 親
c7f7eac265
コミット
df970a5e40
12ファイル変更
+190
-12
検索条件に一致するファイルはありません
@@ -74,6 +74,8 @@ namespace ComputeSharp.Resources
|
||||
this.allocation = device.Allocator->CreateResource(device.Pool, resourceType, allocationMode, totalSizeInBytes);
|
||||
this.d3D12Resource = new ComPtr<ID3D12Resource>(this.allocation.Get()->GetResource());
|
||||
|
||||
device.RegisterAllocatedResource();
|
||||
|
||||
this.mappedData = (T*)this.d3D12Resource.Get()->Map().Pointer;
|
||||
|
||||
this.d3D12Resource.Get()->SetName(this);
|
||||
@@ -126,6 +128,8 @@ namespace ComputeSharp.Resources
|
||||
this.d3D12Resource.Dispose();
|
||||
this.allocation.Dispose();
|
||||
|
||||
GraphicsDevice.UnregisterAllocatedResource();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする