Fix missing double support check in Buffer<T> resources
このコミットが含まれているのは:
1 親
e45aab0eed
コミット
89da6ebe30
2ファイル変更
+20
-1
検索条件に一致するファイルはありません
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using ComputeSharp.Exceptions;
|
||||
using ComputeSharp.Resources;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
@@ -407,4 +408,22 @@ public partial class BufferTests
|
||||
buffer[ThreadIds.X] = buffer[ThreadIds.X] * factor + 3.14;
|
||||
}
|
||||
}
|
||||
|
||||
[CombinatorialTestMethod]
|
||||
[AllDevices]
|
||||
[Resource(typeof(ConstantBuffer<>))]
|
||||
[Resource(typeof(ReadOnlyBuffer<>))]
|
||||
[Resource(typeof(ReadWriteBuffer<>))]
|
||||
[ExpectedException(typeof(UnsupportedDoubleOperationsException))]
|
||||
public void Dispatch_ReadWriteBuffer_DoublePrecision_ThrowsExceptionIfUnsupported(Device device, Type resourceType)
|
||||
{
|
||||
if (device.Get().IsDoublePrecisionSupportAvailable())
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
|
||||
using Buffer<double> buffer = device.Get().AllocateBuffer<double>(resourceType, 32);
|
||||
|
||||
Assert.Fail();
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする