Improve exceptions in ID3D12DescriptorHandleAllocator
このコミットが含まれているのは:
1 親
e6aad7e0ed
コミット
d0e1df9d04
1ファイル変更
+8
-2
@@ -94,7 +94,10 @@ internal unsafe struct ID3D12DescriptorHandleAllocator : IDisposable
|
||||
{
|
||||
lock (this.d3D12DescriptorHandlePairs)
|
||||
{
|
||||
Guard.IsGreaterThan(this.size, 0, nameof(size));
|
||||
if (this.size <= 0)
|
||||
{
|
||||
ThrowHelper.ThrowInvalidOperationException("There are no descriptor handles left in the pool.");
|
||||
}
|
||||
|
||||
d3D12ResourceDescriptorHandles = this.d3D12DescriptorHandlePairs[this.head++];
|
||||
|
||||
@@ -115,7 +118,10 @@ internal unsafe struct ID3D12DescriptorHandleAllocator : IDisposable
|
||||
{
|
||||
lock (this.d3D12DescriptorHandlePairs)
|
||||
{
|
||||
Guard.IsLessThan(this.size, DescriptorsPerHeap, nameof(size));
|
||||
if (this.size >= DescriptorsPerHeap)
|
||||
{
|
||||
ThrowHelper.ThrowInvalidOperationException("The pool of descriptor heaps is already full.");
|
||||
}
|
||||
|
||||
this.d3D12DescriptorHandlePairs[this.tail++] = d3D12ResourceDescriptorHandles;
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする