Add interop unit tests for PixelShaderEffect<T>
このコミットが含まれているのは:
1 親
60ae63ead2
コミット
ea887bf56e
7ファイル変更
+362
-5
検索条件に一致するファイルはありません
@@ -484,6 +484,8 @@ Global
|
||||
src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{314eb353-e7e3-4146-8111-685cc83ec1de}*SharedItemsImports = 5
|
||||
tests\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.projitems*{346aeb10-a4ea-427e-8578-f60915db3053}*SharedItemsImports = 13
|
||||
samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{4d4bb2f6-5653-4db5-a8dd-90d58d8fe4d3}*SharedItemsImports = 4
|
||||
src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{4d4bb2f6-5653-4db5-a8dd-90d58d8fe4d3}*SharedItemsImports = 4
|
||||
src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{4d4bb2f6-5653-4db5-a8dd-90d58d8fe4d3}*SharedItemsImports = 4
|
||||
tests\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.projitems*{4d4bb2f6-5653-4db5-a8dd-90d58d8fe4d3}*SharedItemsImports = 4
|
||||
src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{4d7d9ba8-a821-4b1c-9ee2-cbcf5849906e}*SharedItemsImports = 5
|
||||
src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{514ff00e-bbf0-4d55-a47c-eeeb6208adce}*SharedItemsImports = 13
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<Import_RootNamespace>ComputeSharp.D2D1.UI.Tests</Import_RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Helpers\Win2DHelper.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Helpers\TolerantImageComparer.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)CanvasEffectTests.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)PixelShaderEffectTests.cs" />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using System.Drawing;
|
||||
using Color = Windows.UI.Color;
|
||||
|
||||
namespace ComputeSharp.D2D1.UI.Tests.Helpers;
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using TerraFX.Interop.DirectX;
|
||||
using TerraFX.Interop.Windows;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace ComputeSharp.D2D1.UI.Tests.Helpers;
|
||||
|
||||
/// <summary>
|
||||
/// A helper type to marshal managed objects in unit tests.
|
||||
/// </summary>
|
||||
internal static class Win2DHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the managed wrapper for a given <see cref="ID2D1Image"/> object.
|
||||
/// </summary>
|
||||
/// <param name="d2D1Image">The input <see cref="ID2D1Image"/> object to get a wrapper for.</param>
|
||||
/// <param name="canvasDevice">The realization <see cref="CanvasDevice"/> instance to use.</param>
|
||||
/// <returns>The resulting managed wrapper for <paramref name="d2D1Image"/>.</returns>
|
||||
public static unsafe object GetOrCreate(ID2D1Image* d2D1Image, CanvasDevice? canvasDevice = null)
|
||||
{
|
||||
IActivationFactory activationFactory = WindowsRuntimeMarshal.GetActivationFactory(typeof(CanvasDevice));
|
||||
|
||||
using ComPtr<IUnknown> activationFactoryUnknown = default;
|
||||
|
||||
activationFactoryUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(activationFactory));
|
||||
|
||||
using ComPtr<IUnknown> canvasFactoryNativeUnknown = default;
|
||||
|
||||
Guid uuidOfCanvasFactoryNativeUnknown = new("695C440D-04B3-4EDD-BFD9-63E51E9F7202");
|
||||
|
||||
//Get the ICanvasFactoryNative object
|
||||
int hresult = activationFactoryUnknown.CopyTo(&uuidOfCanvasFactoryNativeUnknown, (void**)canvasFactoryNativeUnknown.GetAddressOf());
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
using ComPtr<IUnknown> canvasDeviceUnknown = default;
|
||||
|
||||
if (canvasDevice is not null)
|
||||
{
|
||||
canvasDeviceUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(canvasDevice));
|
||||
}
|
||||
|
||||
using ComPtr<IUnknown> canvasDeviceInterfaceUnknown = default;
|
||||
|
||||
if (canvasDevice is not null)
|
||||
{
|
||||
Guid uuidOfCanvasDeviceInterface = new("A27F0B5D-EC2C-4D4F-948F-0AA1E95E33E6");
|
||||
|
||||
// Get the ICanvasDevice object (as an IUnknown* as well)
|
||||
hresult = canvasDeviceUnknown.CopyTo(&uuidOfCanvasDeviceInterface, (void**)canvasDeviceInterfaceUnknown.GetAddressOf());
|
||||
}
|
||||
|
||||
using ComPtr<IUnknown> wrapperUnknown = default;
|
||||
|
||||
// Invoke GetOrCreate to get the inspectable wrapper
|
||||
hresult = ((delegate* unmanaged[Stdcall]<IUnknown*, IUnknown*, IUnknown*, float, IUnknown**, int>)(*(void***)canvasFactoryNativeUnknown.Get())[6])(
|
||||
canvasFactoryNativeUnknown.Get(),
|
||||
canvasDeviceInterfaceUnknown.Get(),
|
||||
(IUnknown*)d2D1Image,
|
||||
0,
|
||||
wrapperUnknown.GetAddressOf());
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
// Get or create a managed object for the native object
|
||||
return Marshal.GetObjectForIUnknown((IntPtr)wrapperUnknown.Get());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the D2D image from a given <see cref="ICanvasImage"/> object.
|
||||
/// </summary>
|
||||
/// <param name="canvasImage">The input <see cref="ICanvasImage"/> object.</param>
|
||||
/// <param name="canvasDevice">The realization <see cref="CanvasDevice"/> instance to use.</param>
|
||||
/// <param name="d2D1Image">The resulting <see cref="ID2D1Image"/> object.</param>
|
||||
public static unsafe void GetD2DImage(ICanvasImage canvasImage, CanvasDevice canvasDevice, ID2D1Image** d2D1Image)
|
||||
{
|
||||
using ComPtr<IUnknown> effectUnknown = default;
|
||||
|
||||
effectUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(canvasImage));
|
||||
|
||||
using ComPtr<IUnknown> canvasImageInteropUnknown = default;
|
||||
|
||||
Guid uuidOfCanvasImageInterop = new("E042D1F7-F9AD-4479-A713-67627EA31863");
|
||||
|
||||
// Get the ICanvasImageInterop object (as an IUnknown*)
|
||||
int hresult = effectUnknown.CopyTo(&uuidOfCanvasImageInterop, (void**)canvasImageInteropUnknown.GetAddressOf());
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
using ComPtr<IUnknown> canvasDeviceUnknown = default;
|
||||
|
||||
canvasDeviceUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(canvasDevice));
|
||||
|
||||
using ComPtr<IUnknown> canvasDeviceInterfaceUnknown = default;
|
||||
|
||||
Guid uuidOfCanvasDeviceInterface = new("A27F0B5D-EC2C-4D4F-948F-0AA1E95E33E6");
|
||||
|
||||
// Get the ICanvasDevice object (as an IUnknown* as well)
|
||||
hresult = canvasDeviceUnknown.CopyTo(&uuidOfCanvasDeviceInterface, (void**)canvasDeviceInterfaceUnknown.GetAddressOf());
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
// Invoke GetD2DImage (passing NEVER_INSERT_DPI_COMPENSATION | MINIMAL_REALIZATION | ALLOW_NULL_EFFECT_INPUTS)
|
||||
hresult = ((delegate* unmanaged[Stdcall]<IUnknown*, IUnknown*, IUnknown*, uint, float, float*, ID2D1Image**, int>)(*(void***)canvasImageInteropUnknown.Get())[4])(
|
||||
canvasImageInteropUnknown.Get(),
|
||||
canvasDeviceInterfaceUnknown.Get(),
|
||||
null,
|
||||
4 | 8 | 16,
|
||||
0,
|
||||
null,
|
||||
d2D1Image);
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using ComputeSharp.D2D1.Interop;
|
||||
using ComputeSharp.D2D1.UI.Tests.Helpers;
|
||||
using ComputeSharp.D2D1.Uwp;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using TerraFX.Interop.DirectX;
|
||||
using TerraFX.Interop.Windows;
|
||||
|
||||
namespace ComputeSharp.D2D1.UI.Tests;
|
||||
|
||||
@@ -164,6 +168,216 @@ public partial class PixelShaderEffectTests
|
||||
Win2DHelper.GetD2DImage(effect5, new CanvasDevice(), d2D1Image.GetAddressOf());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public unsafe void Interop_EffectPropertiesAreForwardedCorrectly()
|
||||
{
|
||||
ShaderWithSomePropertiesAndInputs shader = new(-1234567);
|
||||
|
||||
PixelShaderEffect<ShaderWith0Inputs> effect0 = new();
|
||||
PixelShaderEffect<ShaderWithSomePropertiesAndInputs> effect1 = new()
|
||||
{
|
||||
ConstantBuffer = shader,
|
||||
CacheOutput = true,
|
||||
BufferPrecision = CanvasBufferPrecision.Precision32Float,
|
||||
Sources = { [0] = effect0 }
|
||||
};
|
||||
|
||||
CanvasDevice canvasDevice = new();
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image = default;
|
||||
|
||||
// Realize the effect and get the D2D effect (this will also apply all local properties)
|
||||
Win2DHelper.GetD2DImage(effect1, canvasDevice, d2D1Image.GetAddressOf());
|
||||
|
||||
using ComPtr<ID2D1Effect> d2D1Effect = default;
|
||||
|
||||
Marshal.ThrowExceptionForHR(d2D1Image.CopyTo(d2D1Effect.GetAddressOf()));
|
||||
|
||||
int constantBufferDataSize = D2D1PixelShader.GetConstantBufferSize<ShaderWithSomePropertiesAndInputs>();
|
||||
byte* constantBufferData = stackalloc byte[constantBufferDataSize];
|
||||
|
||||
int hresult = d2D1Effect.Get()->GetValue(
|
||||
index: D2D1PixelShaderEffectProperty.ConstantBuffer,
|
||||
type: D2D1_PROPERTY_TYPE.D2D1_PROPERTY_TYPE_BLOB,
|
||||
data: constantBufferData,
|
||||
dataSize: (uint)constantBufferDataSize);
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
ReadOnlyMemory<byte> expectedConstantBufferData = D2D1PixelShader.GetConstantBuffer(in shader);
|
||||
|
||||
Assert.IsTrue(expectedConstantBufferData.Span.SequenceEqual(new ReadOnlySpan<byte>(constantBufferData, constantBufferDataSize)));
|
||||
|
||||
int cacheOutput;
|
||||
|
||||
hresult = d2D1Effect.Get()->GetValue(
|
||||
index: (uint)D2D1_PROPERTY.D2D1_PROPERTY_CACHED,
|
||||
type: D2D1_PROPERTY_TYPE.D2D1_PROPERTY_TYPE_BOOL,
|
||||
data: (byte*)&cacheOutput,
|
||||
dataSize: sizeof(int));
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
Assert.AreEqual(1, cacheOutput);
|
||||
|
||||
D2D1_BUFFER_PRECISION d2D1BufferPrecision;
|
||||
|
||||
hresult = d2D1Effect.Get()->GetValue(
|
||||
index: (uint)D2D1_PROPERTY.D2D1_PROPERTY_PRECISION,
|
||||
type: D2D1_PROPERTY_TYPE.D2D1_PROPERTY_TYPE_UNKNOWN,
|
||||
data: (byte*)&d2D1BufferPrecision,
|
||||
dataSize: sizeof(D2D1_BUFFER_PRECISION));
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
Assert.AreEqual(D2D1_BUFFER_PRECISION.D2D1_BUFFER_PRECISION_32BPC_FLOAT, d2D1BufferPrecision);
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image1 = default;
|
||||
using ComPtr<ID2D1Image> d2D1Image2 = default;
|
||||
|
||||
Win2DHelper.GetD2DImage(effect0, canvasDevice, d2D1Image1.GetAddressOf());
|
||||
|
||||
d2D1Effect.Get()->GetInput(0, d2D1Image2.GetAddressOf());
|
||||
|
||||
using ComPtr<IUnknown> d2D1Image1Unknown = default;
|
||||
using ComPtr<IUnknown> d2D1Image2Unknown = default;
|
||||
|
||||
Marshal.ThrowExceptionForHR(d2D1Image1.CopyTo(d2D1Image1Unknown.GetAddressOf()));
|
||||
Marshal.ThrowExceptionForHR(d2D1Image2.CopyTo(d2D1Image2Unknown.GetAddressOf()));
|
||||
|
||||
// The image from the effect input should be the same retrieved from the original source wrapper
|
||||
Assert.IsTrue(d2D1Image1Unknown.Get() == d2D1Image2Unknown.Get());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public unsafe void Interop_EffectPropertiesAreUpdatedFromNativeEffectCorrectly()
|
||||
{
|
||||
ShaderWithSomePropertiesAndInputs shader = new(-1234567);
|
||||
|
||||
PixelShaderEffect<ShaderWith0Inputs> effect0 = new();
|
||||
PixelShaderEffect<ShaderWithSomePropertiesAndInputs> effect1 = new();
|
||||
|
||||
CanvasDevice canvasDevice = new();
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image0 = default;
|
||||
using ComPtr<ID2D1Image> d2D1Image1 = default;
|
||||
|
||||
// Realize the effects and get the D2D effects
|
||||
Win2DHelper.GetD2DImage(effect0, canvasDevice, d2D1Image0.GetAddressOf());
|
||||
Win2DHelper.GetD2DImage(effect1, canvasDevice, d2D1Image1.GetAddressOf());
|
||||
|
||||
using ComPtr<ID2D1Effect> d2D1Effect = default;
|
||||
|
||||
Marshal.ThrowExceptionForHR(d2D1Image1.CopyTo(d2D1Effect.GetAddressOf()));
|
||||
|
||||
D2D1PixelShaderEffect.SetConstantBufferForD2D1Effect(d2D1Effect.Get(), in shader);
|
||||
|
||||
int cacheOutput = 1;
|
||||
|
||||
int hresult = d2D1Effect.Get()->SetValue(
|
||||
index: (uint)D2D1_PROPERTY.D2D1_PROPERTY_CACHED,
|
||||
type: D2D1_PROPERTY_TYPE.D2D1_PROPERTY_TYPE_BOOL,
|
||||
data: (byte*)&cacheOutput,
|
||||
dataSize: sizeof(int));
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
Assert.AreEqual(1, cacheOutput);
|
||||
|
||||
D2D1_BUFFER_PRECISION d2D1BufferPrecision = D2D1_BUFFER_PRECISION.D2D1_BUFFER_PRECISION_32BPC_FLOAT;
|
||||
|
||||
hresult = d2D1Effect.Get()->SetValue(
|
||||
index: (uint)D2D1_PROPERTY.D2D1_PROPERTY_PRECISION,
|
||||
type: D2D1_PROPERTY_TYPE.D2D1_PROPERTY_TYPE_UNKNOWN,
|
||||
data: (byte*)&d2D1BufferPrecision,
|
||||
dataSize: sizeof(D2D1_BUFFER_PRECISION));
|
||||
|
||||
Marshal.ThrowExceptionForHR(hresult);
|
||||
|
||||
d2D1Effect.Get()->SetInput(0, d2D1Image0.Get());
|
||||
|
||||
Assert.AreEqual(shader.Number, effect1.ConstantBuffer.Number);
|
||||
Assert.IsTrue(effect1.CacheOutput);
|
||||
Assert.AreEqual(CanvasBufferPrecision.Precision32Float, effect1.BufferPrecision);
|
||||
Assert.AreSame(effect0, effect1.Sources[0]);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public unsafe void Interop_IsWrapperRegisteredCorrectly()
|
||||
{
|
||||
PixelShaderEffect<ShaderWith0Inputs> effect = new();
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image = default;
|
||||
|
||||
Win2DHelper.GetD2DImage(effect, new CanvasDevice(), d2D1Image.GetAddressOf());
|
||||
|
||||
object wrapper = Win2DHelper.GetOrCreate(d2D1Image.Get());
|
||||
|
||||
Assert.AreSame(effect, wrapper);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public unsafe void Interop_IsWrapperFactoryRegisteredCorrectlyAndWorking()
|
||||
{
|
||||
PixelShaderEffect<ShaderWith0Inputs> effect = new();
|
||||
CanvasDevice canvasDevice1 = new();
|
||||
CanvasDevice canvasDevice2 = new();
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image1 = default;
|
||||
using ComPtr<ID2D1Image> d2D1Image2 = default;
|
||||
|
||||
Win2DHelper.GetD2DImage(effect, canvasDevice1, d2D1Image1.GetAddressOf());
|
||||
Win2DHelper.GetD2DImage(effect, canvasDevice2, d2D1Image2.GetAddressOf());
|
||||
|
||||
// The first resource is orphaned, so a new wrapper will be created
|
||||
object wrapper1 = Win2DHelper.GetOrCreate(d2D1Image1.Get(), canvasDevice1);
|
||||
|
||||
Assert.IsTrue(wrapper1 is PixelShaderEffect<ShaderWith0Inputs>);
|
||||
Assert.AreNotSame(wrapper1, effect);
|
||||
|
||||
// Getting the same wrapper again should return the newly created one
|
||||
object wrapper1FromCache = Win2DHelper.GetOrCreate(d2D1Image1.Get(), canvasDevice1);
|
||||
|
||||
Assert.AreSame(wrapper1, wrapper1FromCache);
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image1FromNewWrapper = default;
|
||||
|
||||
// Get the realized image from the newly created wrapper
|
||||
Win2DHelper.GetD2DImage((ICanvasImage)wrapper1, canvasDevice1, d2D1Image1FromNewWrapper.GetAddressOf());
|
||||
|
||||
using ComPtr<IUnknown> d2D1Image1Unknown = default;
|
||||
using ComPtr<IUnknown> d2D1Image1FromNewWrapperUnknown = default;
|
||||
|
||||
Marshal.ThrowExceptionForHR(d2D1Image1.CopyTo(d2D1Image1Unknown.GetAddressOf()));
|
||||
Marshal.ThrowExceptionForHR(d2D1Image1FromNewWrapper.CopyTo(d2D1Image1FromNewWrapperUnknown.GetAddressOf()));
|
||||
|
||||
// The retrieved image should be the same one the new wrapper was created from
|
||||
Assert.IsTrue(d2D1Image1Unknown.Get() == d2D1Image1FromNewWrapperUnknown.Get());
|
||||
|
||||
// The second resource is currently registered, so it returns the local wrapper
|
||||
object wrapper2 = Win2DHelper.GetOrCreate(d2D1Image2.Get());
|
||||
|
||||
Assert.AreSame(effect, wrapper2);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(ArgumentException))]
|
||||
public unsafe void Interop_WrapperFactoryDetectsMismatchedDevices()
|
||||
{
|
||||
PixelShaderEffect<ShaderWith0Inputs> effect = new();
|
||||
CanvasDevice canvasDevice1 = new();
|
||||
CanvasDevice canvasDevice2 = new();
|
||||
|
||||
using ComPtr<ID2D1Image> d2D1Image1 = default;
|
||||
using ComPtr<ID2D1Image> d2D1Image2 = default;
|
||||
|
||||
Win2DHelper.GetD2DImage(effect, canvasDevice1, d2D1Image1.GetAddressOf());
|
||||
Win2DHelper.GetD2DImage(effect, canvasDevice2, d2D1Image2.GetAddressOf());
|
||||
|
||||
// The factory should detect we're passing an incompatible device for the resource
|
||||
_ = Win2DHelper.GetOrCreate(d2D1Image1.Get(), canvasDevice2);
|
||||
}
|
||||
|
||||
[D2DInputCount(0)]
|
||||
[AutoConstructor]
|
||||
private partial struct ShaderWithSomeProperties : ID2D1PixelShader
|
||||
@@ -180,6 +394,18 @@ public partial class PixelShaderEffectTests
|
||||
}
|
||||
}
|
||||
|
||||
[D2DInputCount(1)]
|
||||
[AutoConstructor]
|
||||
private partial struct ShaderWithSomePropertiesAndInputs : ID2D1PixelShader
|
||||
{
|
||||
public int Number;
|
||||
|
||||
public float4 Execute()
|
||||
{
|
||||
return D2D.GetInput(0);
|
||||
}
|
||||
}
|
||||
|
||||
[D2DInputCount(0)]
|
||||
private partial struct ShaderWith0Inputs : ID2D1PixelShader
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\ARM64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<NoWarn>$(NoWarn);2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
@@ -35,7 +35,7 @@
|
||||
<OutputPath>bin\ARM64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<NoWarn>$(NoWarn);2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
@@ -47,7 +47,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<NoWarn>$(NoWarn);2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
@@ -58,7 +58,7 @@
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<NoWarn>$(NoWarn);2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
@@ -137,6 +137,10 @@
|
||||
<PackageReference Include="MSTest.TestFramework">
|
||||
<Version>2.2.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="PolySharp">
|
||||
<Version>1.13.1</Version>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
||||
@@ -147,6 +151,8 @@
|
||||
</ItemGroup>
|
||||
<Import Project="..\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.projitems" Label="Shared" />
|
||||
<Import Project="..\..\samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems" Label="Shared" />
|
||||
<Import Project="..\..\src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems" Label="Shared" />
|
||||
<Import Project="..\..\src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems" Label="Shared" />
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
<!-- Test projects never need to be packaged -->
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
<!-- Ignore warnings for public fields (TerraFX polyfills) -->
|
||||
<NoWarn>$(NoWarn);CS0649</NoWarn>
|
||||
|
||||
<!-- Unit tests don't need public XML docs -->
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする