Remove split UAV barriers (unsupported), add more unit tests

このコミットが含まれているのは:
Sergio Pedri committed 2021-12-28 16:58:17 +01:00
1 親 37670e8f4c
コミット ec70bcf61b
9ファイル変更
+85 -287

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

+31 -3
ファイルの表示
@@ -45,7 +45,7 @@ public partial class ComputeContextTests
using (ComputeContext context = device.Get().CreateComputeContext())
{
context.ForEach(texture, default(ClearPixelShader));
context.FullBarrier(texture);
context.Barrier(texture);
context.ForEach(texture, new ColorPixelShader(new float4(0.22f, 0.44f, 0.66f, 0.88f)));
}
@@ -74,9 +74,8 @@ public partial class ComputeContextTests
context.For(512, new OffsetComputeShader(buffer, 0));
context.For(64, new OffsetComputeShader(buffer, 512));
context.ForEach(texture, default(ClearPixelShader));
context.StartBarrier(texture);
context.For(299, new OffsetComputeShader(buffer, 576));
context.EndBarrier(texture);
context.Barrier(texture);
context.ForEach(texture, new ColorPixelShader(new float4(0.22f, 0.44f, 0.66f, 0.88f)));
context.For(149, new OffsetComputeShader(buffer, 875));
}
@@ -107,6 +106,35 @@ public partial class ComputeContextTests
}
}
[CombinatorialTestMethod]
[AllDevices]
[ExpectedException(typeof(InvalidOperationException))]
public void Barrier_WithoutPreviousDispatches_ThrowsException(Device device)
{
using ReadWriteBuffer<int> buffer = device.Get().AllocateReadWriteBuffer<int>(64);
using (ComputeContext context = device.Get().CreateComputeContext())
{
context.Barrier(buffer);
}
Assert.Fail();
}
[CombinatorialTestMethod]
[AllDevices]
[ExpectedException(typeof(InvalidOperationException))]
public void DefaultContext_Barrier_ThrowsException(Device device)
{
using ReadWriteBuffer<int> buffer = device.Get().AllocateReadWriteBuffer<int>(64);
using ComputeContext context = default;
context.Barrier(buffer);
Assert.Fail();
}
[TestMethod]
[ExpectedException(typeof(InvalidOperationException))]
public void DefaultContext_For_ThrowsException()