Fixed unit test build errors
このコミットが含まれているのは:
1 親
b386c23742
コミット
2d200db5ba
5ファイル変更
+235
-138
検索条件に一致するファイルはありません
@@ -2,6 +2,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.__Internals;
|
||||
using ComputeSharp.SwapChain.Shaders;
|
||||
using ComputeSharp.Tests.Attributes;
|
||||
using ComputeSharp.Tests.Extensions;
|
||||
@@ -10,6 +11,8 @@ using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.Formats.Png;
|
||||
using ImageSharpRgba32 = SixLabors.ImageSharp.PixelFormats.Rgba32;
|
||||
|
||||
#pragma warning disable CS0618
|
||||
|
||||
namespace ComputeSharp.Tests
|
||||
{
|
||||
[TestClass]
|
||||
@@ -137,7 +140,7 @@ namespace ComputeSharp.Tests
|
||||
if (shaderType.IsAssignableTo(typeof(IComputeShader)))
|
||||
{
|
||||
static void RunComputeShader<T>(ReadWriteTexture2D<Rgba32, Float4> texture)
|
||||
where T : struct, IComputeShader
|
||||
where T : struct, IComputeShader, IShader<T>
|
||||
{
|
||||
texture.GraphicsDevice.For(texture.Width, texture.Height, (T)Activator.CreateInstance(typeof(T), texture, 0f)!);
|
||||
}
|
||||
@@ -149,7 +152,7 @@ namespace ComputeSharp.Tests
|
||||
else
|
||||
{
|
||||
static void RunPixelShader<T>(ReadWriteTexture2D<Rgba32, Float4> texture)
|
||||
where T : struct, IPixelShader<Float4>
|
||||
where T : struct, IPixelShader<Float4>, IShader<T>
|
||||
{
|
||||
texture.GraphicsDevice.ForEach(texture, (T)Activator.CreateInstance(typeof(T), 0f)!);
|
||||
}
|
||||
@@ -188,8 +191,8 @@ namespace ComputeSharp.Tests
|
||||
Func<ReadWriteTexture2D<Rgba32, Float4>, TCompute> computeFactory,
|
||||
Func<ReadWriteTexture2D<Rgba32, Float4>, TPixel> pixelFactory,
|
||||
float delta)
|
||||
where TCompute : struct, IComputeShader
|
||||
where TPixel : struct, IPixelShader<Float4>
|
||||
where TCompute : struct, IComputeShader, IShader<TCompute>
|
||||
where TPixel : struct, IPixelShader<Float4>, IShader<TPixel>
|
||||
{
|
||||
_ = device.Get();
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする