Added more tests for discard out parameters in intrinsic functions
このコミットが含まれているのは:
1 親
60d5fc8a59
コミット
332701c0fa
1ファイル変更
+20
@@ -31,6 +31,26 @@ namespace ComputeSharp.Tests
|
||||
Assert.IsTrue(MathF.Abs(result[1] - result[3]) < 0.0001f);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void IntrinsicWithInlineOutParamaterAndDiscard()
|
||||
{
|
||||
float angle = 80;
|
||||
using ReadWriteBuffer<float> buffer = Gpu.Default.AllocateReadWriteBuffer<float>(2);
|
||||
|
||||
Action<ThreadIds> action = id =>
|
||||
{
|
||||
buffer[0] = Hlsl.Sin(angle);
|
||||
Hlsl.SinCos(angle, out float sine, out _);
|
||||
buffer[1] = sine;
|
||||
};
|
||||
|
||||
Gpu.Default.For(1, action);
|
||||
|
||||
float[] result = buffer.GetData();
|
||||
|
||||
Assert.IsTrue(MathF.Abs(result[0] - result[1]) < 0.0001f);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void IntrinsicWithOutParamaters()
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする