Fixed input checks for resource APIs

このコミットが含まれているのは:
Sergio Pedri committed 2020-12-06 02:48:02 +01:00
1 親 0b9786d293
コミット 3165d09234
3ファイル変更
+16 -16

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -45,7 +45,7 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
{
device.ThrowIfDisposed();
Guard.IsGreaterThanOrEqualTo(length, 0, nameof(length));
Guard.IsGreaterThan(length, 0, nameof(length));
SizeInBytes = checked((nint)(length * elementSizeInBytes));
GraphicsDevice = device;
+6 -6
ファイルの表示
@@ -52,8 +52,8 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
{
device.ThrowIfDisposed();
Guard.IsGreaterThanOrEqualTo(width, 0, nameof(width));
Guard.IsGreaterThanOrEqualTo(height, 0, nameof(height));
Guard.IsGreaterThan(width, 0, nameof(width));
Guard.IsGreaterThan(height, 0, nameof(height));
GraphicsDevice = device;
Width = width;
@@ -237,8 +237,8 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
Guard.IsInRange(x, 0, Width, nameof(x));
Guard.IsInRange(y, 0, Height, nameof(y));
Guard.IsBetweenOrEqualTo(width, 0, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 0, Height, nameof(height));
Guard.IsBetweenOrEqualTo(width, 1, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 1, Height, nameof(height));
Guard.IsLessThanOrEqualTo(x + width, Width, nameof(x));
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
Guard.HasSizeGreaterThanOrEqualTo(destination, width * height, nameof(destination));
@@ -389,8 +389,8 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
Guard.IsInRange(x, 0, Width, nameof(x));
Guard.IsInRange(y, 0, Height, nameof(y));
Guard.IsBetweenOrEqualTo(width, 0, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 0, Height, nameof(height));
Guard.IsBetweenOrEqualTo(width, 1, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 1, Height, nameof(height));
Guard.IsLessThanOrEqualTo(x + width, Width, nameof(x));
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
Guard.HasSizeGreaterThanOrEqualTo(source, width * height, nameof(source));
+9 -9
ファイルの表示
@@ -52,9 +52,9 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
{
device.ThrowIfDisposed();
Guard.IsGreaterThanOrEqualTo(width, 0, nameof(width));
Guard.IsGreaterThanOrEqualTo(height, 0, nameof(height));
Guard.IsBetweenOrEqualTo(depth, 0, ushort.MaxValue, nameof(depth));
Guard.IsGreaterThan(width, 0, nameof(width));
Guard.IsGreaterThan(height, 0, nameof(height));
Guard.IsBetweenOrEqualTo(depth, 1, ushort.MaxValue, nameof(depth));
GraphicsDevice = device;
Width = width;
@@ -229,9 +229,9 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
Guard.IsInRange(x, 0, Width, nameof(x));
Guard.IsInRange(y, 0, Height, nameof(y));
Guard.IsInRange(z, 0, Depth, nameof(z));
Guard.IsBetweenOrEqualTo(width, 0, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 0, Height, nameof(height));
Guard.IsBetweenOrEqualTo(depth, 0, Depth, nameof(depth));
Guard.IsBetweenOrEqualTo(width, 1, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 1, Height, nameof(height));
Guard.IsBetweenOrEqualTo(depth, 1, Depth, nameof(depth));
Guard.IsLessThanOrEqualTo(x + width, Width, nameof(x));
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
Guard.IsLessThanOrEqualTo(z + depth, Depth, nameof(z));
@@ -411,9 +411,9 @@ namespace ComputeSharp.Graphics.Buffers.Abstract
Guard.IsInRange(x, 0, Width, nameof(x));
Guard.IsInRange(y, 0, Height, nameof(y));
Guard.IsInRange(z, 0, Depth, nameof(z));
Guard.IsBetweenOrEqualTo(width, 0, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 0, Height, nameof(height));
Guard.IsBetweenOrEqualTo(depth, 0, Depth, nameof(depth));
Guard.IsBetweenOrEqualTo(width, 1, Width, nameof(width));
Guard.IsBetweenOrEqualTo(height, 1, Height, nameof(height));
Guard.IsBetweenOrEqualTo(depth, 1, Depth, nameof(depth));
Guard.IsLessThanOrEqualTo(x + width, Width, nameof(x));
Guard.IsLessThanOrEqualTo(y + height, Height, nameof(y));
Guard.IsLessThanOrEqualTo(z + depth, Depth, nameof(z));