Fixed non public static methods in shaders

このコミットが含まれているのは:
Sergio Pedri committed 2019-09-05 01:27:55 +02:00
1 親 a16ca5b2ad
コミット 68acc46bb1
2ファイル変更
+19

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

+15
ファイルの表示
@@ -12,6 +12,9 @@ namespace ComputeSharp.Tests
[Pure]
public static float Square(float x) => x * x;
[Pure]
internal static float InternalSquare(float x) => x * x;
[Pure]
public static Float4 Range(float x) => new Float4(x, x + 1, x + 2, x + 3);
@@ -39,6 +42,18 @@ namespace ComputeSharp.Tests
Assert.IsTrue(MathF.Abs(result[0] - 9) < 0.0001f);
}
[TestMethod]
public void InternalFloatToFloatFunc()
{
using ReadWriteBuffer<float> buffer = Gpu.Default.AllocateReadWriteBuffer<float>(1);
Gpu.Default.For(1, id => buffer[0] = StaticMethodsContainer.InternalSquare(3));
float[] result = buffer.GetData();
Assert.IsTrue(MathF.Abs(result[0] - 9) < 0.0001f);
}
[TestMethod]
public void FloatToFloat4Func()
{