From b8aab80dbd49119c6a2fc6b263b8d497462740fb Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 25 Apr 2023 16:19:18 +0200 Subject: [PATCH 1/4] Add WASDK test project --- ComputeSharp.sln | 13 +++++ .../CanvasEffectTests.cs | 4 ++ .../Helpers/Win2DHelper.cs | 55 ++++++++++++++++++- .../PixelShaderEffectTests.cs | 4 ++ .../ShadersTests.cs | 14 ++++- .../ComputeSharp.D2D1.Uwp.Tests.csproj | 1 + .../ComputeSharp.D2D1.WinUI.Tests.csproj | 24 ++++++++ tests/Directory.Build.props | 3 + 8 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj diff --git a/ComputeSharp.sln b/ComputeSharp.sln index b39cce02..3db33d13 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -154,6 +154,8 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.D2D1.UI.Tests" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1.Uwp.Tests", "tests\ComputeSharp.D2D1.Uwp.Tests\ComputeSharp.D2D1.Uwp.Tests.csproj", "{4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.WinUI.Tests", "tests\ComputeSharp.D2D1.WinUI.Tests\ComputeSharp.D2D1.WinUI.Tests.csproj", "{4D5019D5-3D1F-48C0-B134-7F01F93A3573}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -430,6 +432,14 @@ Global {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|x64.ActiveCfg = Release|x64 {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|x64.Build.0 = Release|x64 {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|x64.Deploy.0 = Release|x64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|ARM64.Build.0 = Debug|ARM64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|x64.ActiveCfg = Debug|x64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|x64.Build.0 = Debug|x64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|ARM64.ActiveCfg = Release|ARM64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|ARM64.Build.0 = Release|ARM64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|x64.ActiveCfg = Release|x64 + {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -469,6 +479,7 @@ Global {9EA5AE9D-C39A-4F43-B03E-0A848EA2558A} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {346AEB10-A4EA-427E-8578-F60915DB3053} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} + {4D5019D5-3D1F-48C0-B134-7F01F93A3573} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC} @@ -487,6 +498,8 @@ Global 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 + samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{4d5019d5-3d1f-48c0-b134-7f01f93a3573}*SharedItemsImports = 5 + tests\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.projitems*{4d5019d5-3d1f-48c0-b134-7f01f93a3573}*SharedItemsImports = 5 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 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{51d5a422-d3a5-4c4d-8a6d-a048940bf279}*SharedItemsImports = 13 diff --git a/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs b/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs index 21a57cb2..1f293ee2 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs +++ b/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs @@ -1,4 +1,8 @@ +#if WINDOWS_UWP using ComputeSharp.D2D1.Uwp; +#else +using ComputeSharp.D2D1.WinUI; +#endif using Microsoft.Graphics.Canvas; using Microsoft.VisualStudio.TestTools.UnitTesting; diff --git a/tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs b/tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs index 653fbfbd..f26153fc 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs +++ b/tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs @@ -1,9 +1,15 @@ using System; using System.Runtime.InteropServices; +#if WINDOWS_UWP using System.Runtime.InteropServices.WindowsRuntime; +#endif using Microsoft.Graphics.Canvas; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; +#if !WINDOWS_UWP +using WinRT; +using WinRT.Interop; +#endif #nullable enable @@ -22,11 +28,17 @@ internal static class Win2DHelper /// The resulting managed wrapper for . public static unsafe object GetOrCreate(ID2D1Image* d2D1Image, CanvasDevice? canvasDevice = null) { - IActivationFactory activationFactory = WindowsRuntimeMarshal.GetActivationFactory(typeof(CanvasDevice)); - using ComPtr activationFactoryUnknown = default; +#if WINDOWS_UWP + IActivationFactory activationFactory = WindowsRuntimeMarshal.GetActivationFactory(typeof(CanvasDevice)); + activationFactoryUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(activationFactory)); +#else + ICanvasFactoryNative activationFactory = CanvasDevice.As(); + + activationFactoryUnknown.Attach((IUnknown*)MarshalInterface.FromManaged(activationFactory)); +#endif using ComPtr canvasFactoryNativeUnknown = default; @@ -41,7 +53,11 @@ internal static class Win2DHelper if (canvasDevice is not null) { +#if WINDOWS_UWP canvasDeviceUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(canvasDevice)); +#else + canvasDeviceUnknown.Attach((IUnknown*)MarshalInspectable.FromManaged(canvasDevice)); +#endif } using ComPtr canvasDeviceInterfaceUnknown = default; @@ -67,7 +83,11 @@ internal static class Win2DHelper Marshal.ThrowExceptionForHR(hresult); // Get or create a managed object for the native object +#if WINDOWS_UWP return Marshal.GetObjectForIUnknown((IntPtr)wrapperUnknown.Get()); +#else + return MarshalInspectable.FromAbi((IntPtr)wrapperUnknown.Get()); +#endif } /// @@ -80,7 +100,11 @@ internal static class Win2DHelper { using ComPtr effectUnknown = default; +#if WINDOWS_UWP effectUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(canvasImage)); +#else + effectUnknown.Attach((IUnknown*)MarshalInterface.FromManaged(canvasImage)); +#endif using ComPtr canvasImageInteropUnknown = default; @@ -93,7 +117,11 @@ internal static class Win2DHelper using ComPtr canvasDeviceUnknown = default; +#if WINDOWS_UWP canvasDeviceUnknown.Attach((IUnknown*)Marshal.GetIUnknownForObject(canvasDevice)); +#else + canvasDeviceUnknown.Attach((IUnknown*)MarshalInspectable.FromManaged(canvasDevice)); +#endif using ComPtr canvasDeviceInterfaceUnknown = default; @@ -116,4 +144,27 @@ internal static class Win2DHelper Marshal.ThrowExceptionForHR(hresult); } + +#if !WINDOWS_UWP + /// + /// The managed interface for . + /// + [Guid("695C440D-04B3-4EDD-BFD9-63E51E9F7202")] + [WindowsRuntimeType] + [WindowsRuntimeHelperType(typeof(ICanvasFactoryNative))] + public interface ICanvasFactoryNative + { + /// + /// The vtable type for . + /// + [Guid("695C440D-04B3-4EDD-BFD9-63E51E9F7202")] + public readonly struct Vftbl + { + /// + /// Allows CsWinRT to retrieve a pointer to the projection vtable (the name is hardcoded by convention). + /// + public static readonly IntPtr AbiToProjectionVftablePtr = IUnknownVftbl.AbiToProjectionVftblPtr; + } + } +#endif } \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs b/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs index d1ca0216..909d8986 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs +++ b/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs @@ -3,7 +3,11 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using ComputeSharp.D2D1.Interop; using ComputeSharp.D2D1.UI.Tests.Helpers; +#if WINDOWS_UWP using ComputeSharp.D2D1.Uwp; +#else +using ComputeSharp.D2D1.WinUI; +#endif using Microsoft.Graphics.Canvas; using Microsoft.VisualStudio.TestTools.UnitTesting; using TerraFX.Interop.DirectX; diff --git a/tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs b/tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs index 374fb3ad..071527b3 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs +++ b/tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs @@ -1,8 +1,13 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading.Tasks; using ComputeSharp.D2D1.UI.Tests.Helpers; +#if WINDOWS_UWP using ComputeSharp.D2D1.Uwp; +#else +using ComputeSharp.D2D1.WinUI; +#endif using ComputeSharp.SwapChain.Shaders.D2D1; using Microsoft.Graphics.Canvas; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -73,7 +78,7 @@ public class ShadersTests await RunTestAsync(wrapperType, 0.000026f); } - private static async Task RunTestAsync(WrapperType wrapperType, float threshold = 0.00001f) + private static async Task RunTestAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(WrapperType wrapperType, float threshold = 0.00001f) where T : unmanaged, ID2D1PixelShader { T shader = (T)Activator.CreateInstance(typeof(T), 0f, new int2(1280, 720))!; @@ -134,6 +139,13 @@ public class ShadersTests { this.effect!.ConstantBuffer = this.constantBuffer; } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + this.effect?.Dispose(); + } } public enum WrapperType diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj b/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj index 041635c7..c58342da 100644 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj +++ b/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj @@ -18,6 +18,7 @@ {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} $(VisualStudioVersion) false + true true diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj new file mode 100644 index 00000000..5b310862 --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj @@ -0,0 +1,24 @@ + + + net6.0-windows10.0.22621 + x64;ARM64 + + + + + + + + + + + + + + + + + + + + diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 7fe8533e..7e38b3c1 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -17,5 +17,8 @@ $(NoWarn);IDE0065 + + + $(NoWarn);IDE0240 \ No newline at end of file From b38c967358356ac797e1ea6bcc45d7d901e50a1d Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 27 Apr 2023 02:44:27 +0200 Subject: [PATCH 2/4] Switch D2D1 WASDK test project to use WinUI 3 This works around the issues with the test runner --- ComputeSharp.sln | 28 ++++--- .../Package.appxmanifest | 7 +- tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml | 4 + .../ComputeSharp.D2D1.WinUI.Tests/App.xaml.cs | 25 ++++++ .../Assets/LockScreenLogo.scale-200.png | Bin 0 -> 432 bytes .../Assets/SplashScreen.scale-200.png | Bin 0 -> 5372 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 0 -> 1755 bytes .../Assets/Square44x44Logo.scale-200.png | Bin 0 -> 637 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 0 -> 283 bytes .../Assets/StoreLogo.png | Bin 0 -> 456 bytes .../Assets/Wide310x150Logo.scale-200.png | Bin 0 -> 2097 bytes .../ComputeSharp.D2D1.WinUI.Tests.csproj | 79 +++++++++++++++++- .../Package.appxmanifest | 49 +++++++++++ .../PublishProfiles/win10-arm64.pubxml | 14 ++++ .../PublishProfiles/win10-x64.pubxml | 14 ++++ .../Properties/launchSettings.json | 10 +++ .../app.manifest | 17 ++++ 17 files changed, 228 insertions(+), 19 deletions(-) create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml.cs create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/LockScreenLogo.scale-200.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/SplashScreen.scale-200.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square150x150Logo.scale-200.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.scale-200.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/StoreLogo.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Wide310x150Logo.scale-200.png create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Package.appxmanifest create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-arm64.pubxml create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-x64.pubxml create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/Properties/launchSettings.json create mode 100644 tests/ComputeSharp.D2D1.WinUI.Tests/app.manifest diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 3db33d13..0ad476a6 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -154,7 +154,7 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.D2D1.UI.Tests" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1.Uwp.Tests", "tests\ComputeSharp.D2D1.Uwp.Tests\ComputeSharp.D2D1.Uwp.Tests.csproj", "{4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.WinUI.Tests", "tests\ComputeSharp.D2D1.WinUI.Tests\ComputeSharp.D2D1.WinUI.Tests.csproj", "{4D5019D5-3D1F-48C0-B134-7F01F93A3573}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.WinUI.Tests", "tests\ComputeSharp.D2D1.WinUI.Tests\ComputeSharp.D2D1.WinUI.Tests.csproj", "{73C32D0F-64DB-4674-84E9-8FCC41228474}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -432,14 +432,18 @@ Global {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|x64.ActiveCfg = Release|x64 {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|x64.Build.0 = Release|x64 {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|x64.Deploy.0 = Release|x64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|ARM64.Build.0 = Debug|ARM64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|x64.ActiveCfg = Debug|x64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Debug|x64.Build.0 = Debug|x64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|ARM64.ActiveCfg = Release|ARM64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|ARM64.Build.0 = Release|ARM64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|x64.ActiveCfg = Release|x64 - {4D5019D5-3D1F-48C0-B134-7F01F93A3573}.Release|x64.Build.0 = Release|x64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Debug|ARM64.Build.0 = Debug|ARM64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Debug|x64.ActiveCfg = Debug|x64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Debug|x64.Build.0 = Debug|x64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Debug|x64.Deploy.0 = Debug|x64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Release|ARM64.ActiveCfg = Release|ARM64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Release|ARM64.Build.0 = Release|ARM64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Release|ARM64.Deploy.0 = Release|ARM64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Release|x64.ActiveCfg = Release|x64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Release|x64.Build.0 = Release|x64 + {73C32D0F-64DB-4674-84E9-8FCC41228474}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -479,7 +483,7 @@ Global {9EA5AE9D-C39A-4F43-B03E-0A848EA2558A} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1} {346AEB10-A4EA-427E-8578-F60915DB3053} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} - {4D5019D5-3D1F-48C0-B134-7F01F93A3573} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} + {73C32D0F-64DB-4674-84E9-8FCC41228474} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC} @@ -498,11 +502,11 @@ Global 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 - samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{4d5019d5-3d1f-48c0-b134-7f01f93a3573}*SharedItemsImports = 5 - tests\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.projitems*{4d5019d5-3d1f-48c0-b134-7f01f93a3573}*SharedItemsImports = 5 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 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{51d5a422-d3a5-4c4d-8a6d-a048940bf279}*SharedItemsImports = 13 + samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{73c32d0f-64db-4674-84e9-8fcc41228474}*SharedItemsImports = 5 + tests\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.projitems*{73c32d0f-64db-4674-84e9-8fcc41228474}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{751bb05b-563d-4b3a-94c6-15e2d79d35ea}*SharedItemsImports = 13 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{764bc0f5-0c5e-49ad-abaa-e3874c0f3286}*SharedItemsImports = 5 src\TerraFX.Interop.Windows.Dynamic\TerraFX.Interop.Windows.Dynamic.projitems*{76c66257-fdaa-47ab-85e7-ef757eab10c0}*SharedItemsImports = 5 diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest b/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest index 24fb011e..5ffa2d0e 100644 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest +++ b/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest @@ -5,9 +5,10 @@ xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" IgnorableNamespaces="uap mp"> - + diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml b/tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml new file mode 100644 index 00000000..e2692d1f --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml.cs b/tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml.cs new file mode 100644 index 00000000..335c3778 --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/App.xaml.cs @@ -0,0 +1,25 @@ +using System; +using Microsoft.UI.Xaml; +using Microsoft.VisualStudio.TestPlatform.TestExecutor; + +namespace ComputeSharp.D2D1.WinUI.Tests; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application +{ + /// + /// Creates a new instance. + /// + public App() + { + InitializeComponent(); + } + + /// + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + UnitTestClient.Run(Environment.CommandLine); + } +} diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/LockScreenLogo.scale-200.png b/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..7440f0d4bf7c7e26e4e36328738c68e624ee851e GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezr3(FqV6|IEGZ*x-#9g>~Mkr+x6^F zy~CDX2QIMs&Gcs3RnRBoxBA!*(Mfw0KTCYuYk0WlEIV>qBmPl! zq4ukrvfADX@#p8fbLY(H47N+k`FZ(FZh?cDro7>{8mkBO3>^oaIx`3!Jl)Qq)HI!+ z(S=1{o~eT)&W^=Ea8C`-17(Jv5(nHFJ{dOjGdxLVkY_y6&S1whfuFI4MM0kF0f&cO zPDVpV%nz;Id$>+0Ga5e9625-JcI)oq=#Pa3p^>8BB}21BUw@eN!-6@w%X+^`+Vn?! zryu|3T>kVWNBYyBc=7Y6H#s1Ah!OI_nezW zXTqOdkv2Az6KKBV=$yHdF^R3Fqw(TZEoNSZX>reXJ#bwX42%f|Pgg&ebxsLQ010xn AssI20 literal 0 HcmV?d00001 diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/SplashScreen.scale-200.png b/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..32f486a86792a5e34cd9a8261b394c49b48f86be GIT binary patch literal 5372 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 literal 0 HcmV?d00001 diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.scale-200.png b/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..f713bba67f551ef91020b75716a4dc8ebd744b1c GIT binary patch literal 637 zcmeAS@N?(olHy`uVBq!ia0vp^5g^RL1|$oo8kjIJFu8cTIEGZ*dUI*J;2{SImxtDO zm%3!R$UazoY}x{$j0P5ABYXWr(l=jxJ6ps1W{tV=^>{Dl><3nv3A}sm=EZ)#l3`NR zpZda3^rNox*D1%NC98Z~L*6zipLw~Gxn&(Y-;KmJ+aR6eLabU-L#y8HW%7P-E_-VlLqIabbHPHKT*)fT@9iWJ7iWgOT9%0}Lrj>lztPxWq6sPw3pi z#-<=#$jjrP_DD*i!RLsn0mIA=>4~N)IMYWIf=j%-zuKCdMG%tHYot70D1| zvWa0wMhauW#S>1CnI_;>!1Q3zMA17@DOVq{MQ+{U7^a&yA+%dMCG;WNPV0i;w$tu; zX^b}UKziPM)(<;)ruW;-`)bBN+rQNM*Zs_>?n$|FVFo-e*PZb*@U7VAd+tHb4e?=Blc~}S6K)wL}r*Gf`BM#QB z+y>N$mCswb4d{^{S9v_!eQj4fTRMOwOCi?lSk9%<=vAz}jM-*PQtH@Odn1LZcd^j#o> hW$4xn+CT+ep9lJ{OAO?njobhL002ovPDHLkV1nYebbkN< literal 0 HcmV?d00001 diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/StoreLogo.png b/tests/ComputeSharp.D2D1.WinUI.Tests/Assets/StoreLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..a4586f26bdf7841cad10f39cdffe2aca3af252c1 GIT binary patch literal 456 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2o;fF!p=8IEGZ*dUM0H=rDtTTVkd2 z(%lbKn@VS_lUaADVB&;Z6F#LM+mPsa?e>FnHo;HND^!P`-lX%BH~FOg%y&x+t*x!? zg$#_1A1kgsSvO(fw`bOmo;lrJX8byO1j^gf7qohR%mmt z@L)WX;>gqgK|tWJvQ5j;4;=gt4HXVKSMYRv5RhY5vS~TqfK_NAP*r{h!!g^BZ;w4r z7CGdsai)y;fJQc`7{Zc2b==h%o`Op$|bg6a&nL{*m7-=0>k4M4-PXlU;G-?%*(*g>iFt^ U$m#7DfHB12>FVdQ&MBb@0G`#n8vpc0sq%A~kJcD9FY~qQRMt?ZR3YyDZt}Od;|mgpc{2dv9AHF){kXU%k({ z=Y8JidEayHTkG@twPZ|U3_^%3ct-OgLSiFAqDN!|tbCX@c@?4P`2x*TMK!+Q4b?k0 ziW7!!KF6dPWcF<%I|iznM~`QJ_V7sHGV_D`dhgpA9Vd@&X}ErK+j~_rdv;Bp?OA@a zFXOk7eWOJe5NcK;6h$FaM&7JxNc#-@QTwzW6x#d_zmQNkz5) zPI;kh;3d;5UCJU+9a(cOxX(|edWoOiAEdGU#kPJ&xnc2||3vDbuhBCkj-pb0as$Zl z5;}4n=**n6(1g`JEtSy;SG6X;#-F~Oz3lESG2b5`j@wAwY4Yp<=4Xeb>iH=6aicF?DxD&q{`!&}ct zBI)aycwuobQAf&678Uf+Mmh-@9RUhyH~>?w0dixO0#jZjEc9R^=5NZw=|a(kcB?9^ zfnTiEFXp-q#B;Tn>(O%$A*ud^Rg&eVH6Y_5Y%!E39RR&s?XpG`gKwU!6FE1 z7X)DC7)*(5g}lh`4`{i~DZcWupZI`K)_4P)VE{@gc7@Xsd^86zl~_mOYH?I4!aGeX z^E(_=L6?PgveDQ+r%P@UISEXrkn`LHJZ##+!-anV>6h)IkKp;E@p8+3&(5%kS2)ld*J*rJccZM0iyaAx7+F~GW1UWFK&3X$PE1^}NH zgAG9ck5K!{07OwU@j@Do>TbH=CDEo#4m0cEyAuXy_<&jlzJVcKweSJ5 z&=q~iIn18$w8yb=rmEmHxVEUA^?RwnB?6Qlp1os8@*dWTGL2bhzZ!s*xqScR?EPL` zo(JwNdKUUYy7GtvZ3asXm)cgFvCx9EmAi;|w=a0iGiv%%VYKh`P0Wma4y`Xyx|T~( zAmfGbgbEEC7)j8b@WA@+5W3a61HJXC1dX@6_T|Czk0I0zBk%tnW~()VWITGI!`$c< gARL?UBrYYkwoDw4eo*CrzXGTrZ@;GF>596)00d&n@&Et; literal 0 HcmV?d00001 diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj index 5b310862..d53a7513 100644 --- a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj @@ -1,14 +1,62 @@ - net6.0-windows10.0.22621 + WinExe + net6.0-windows10.0.22621.0 + 10.0.17763.0 + app.manifest x64;ARM64 + win10-x64;win10-arm64 + win10-$(Platform).pubxml + true + true - - - + + Assets\Shaders\ColorfulInfinity.png + PreserveNewest + + + Assets\Shaders\FractalTiling.png + PreserveNewest + + + Assets\Shaders\HelloWorld.png + PreserveNewest + + + Assets\Shaders\MengerJourney.png + PreserveNewest + + + Assets\Shaders\Octagrams.png + PreserveNewest + + + Assets\Shaders\ProteanClouds.png + PreserveNewest + + + Assets\Shaders\TerracedHills.png + PreserveNewest + + + + + + + + + + + + + + + + + @@ -19,6 +67,29 @@ + + + + + + + + + + + + + true + + diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Package.appxmanifest b/tests/ComputeSharp.D2D1.WinUI.Tests/Package.appxmanifest new file mode 100644 index 00000000..adbf9a7a --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Package.appxmanifest @@ -0,0 +1,49 @@ + + + + + + + + ComputeSharp.D2D1.WinUI.Tests + sergiopedri + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-arm64.pubxml b/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-arm64.pubxml new file mode 100644 index 00000000..13886493 --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-arm64.pubxml @@ -0,0 +1,14 @@ + + + + FileSystem + ARM64 + win10-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + false + false + true + false + + \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-x64.pubxml b/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-x64.pubxml new file mode 100644 index 00000000..f76db08c --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/PublishProfiles/win10-x64.pubxml @@ -0,0 +1,14 @@ + + + + FileSystem + x64 + win10-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + false + false + true + false + + \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/launchSettings.json b/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/launchSettings.json new file mode 100644 index 00000000..e6724a08 --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "ComputeSharp.D2D1.WinUI.Tests (Package)": { + "commandName": "MsixPackage" + }, + "ComputeSharp.D2D1.WinUI.Tests (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.WinUI.Tests/app.manifest b/tests/ComputeSharp.D2D1.WinUI.Tests/app.manifest new file mode 100644 index 00000000..f2f15019 --- /dev/null +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/app.manifest @@ -0,0 +1,17 @@ + + + + + + + + + + + + + true/PM + PerMonitorV2, PerMonitor + + + \ No newline at end of file From 973e378d0fb9d64851401f96f0a866bbe3f29eea Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 25 Apr 2023 16:39:38 +0200 Subject: [PATCH 3/4] Add D2D1 WASDK tests to CI script --- .github/workflows/dotnet.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cae3f955..fa5d9def 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -122,12 +122,13 @@ jobs: - name: Run ComputeSharp.D2D1.Tests.AssemblyLevelAttributes run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -f ${{matrix.framework}} -v n -l "console;verbosity=detailed" - # Run all UWP tests (separately, as they need VS Test) - run-tests-uwp: + # Run all Win2D tests (separately, as they need VS Test) + run-tests-win2d: needs: [build-solution] strategy: matrix: configuration: [Debug, Release] + framework: [uwp, wasdk] runs-on: windows-2022 steps: - name: Git checkout @@ -136,17 +137,34 @@ jobs: uses: microsoft/setup-msbuild@v1.1 # Build the D2D1 UWP unit tests (need to restore and build separately for it to build correctly) - - name: Build ComputeSharp.D2D1.Uwp.Tests + - if: matrix.framework == 'uwp' + name: Build ComputeSharp.D2D1.Uwp.Tests run: > msbuild tests\ComputeSharp.D2D1.Uwp.Tests\ComputeSharp.D2D1.Uwp.Tests.csproj -t:restore /p:Configuration=${{matrix.configuration}} /p:Platform=x64; msbuild tests\ComputeSharp.D2D1.Uwp.Tests\ComputeSharp.D2D1.Uwp.Tests.csproj -t:build /p:Configuration=${{matrix.configuration}} /p:Platform=x64 # Run the D2D1 UWP unit tests with VS Test (need to use vswhere to find the VS Test runner) - - name: Run ComputeSharp.D2D1.Uwp.Tests + - if: matrix.framework == 'uwp' + name: Run ComputeSharp.D2D1.Uwp.Tests run: > $vs_path = vswhere -latest -products * -requires Microsoft.VisualStudio.Workload.ManagedDesktop -requiresAny -property installationPath; $vstest_path = join-path $vs_path 'Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'; & $vstest_path /Platform:x64 /framework:frameworkuap10 tests\ComputeSharp.D2D1.Uwp.Tests\bin\x64\${{matrix.configuration}}\ComputeSharp.D2D1.Uwp.Tests.build.appxrecipe + + # Build the D2D1 WinAppSDK unit tests (this also needs two steps, or the entry point won't be generated) + - if: matrix.framework == 'wasdk' + name: Build ComputeSharp.D2D1.WinUI.Tests + run: > + msbuild tests\ComputeSharp.D2D1.WinUI.Tests\ComputeSharp.D2D1.WinUI.Tests.csproj -t:restore /p:Configuration=${{matrix.configuration}} /p:Platform=x64; + msbuild tests\ComputeSharp.D2D1.WinUI.Tests\ComputeSharp.D2D1.WinUI.Tests.csproj -t:build /p:Configuration=${{matrix.configuration}} /p:Platform=x64 + + # Run the D2D1 WinAppSDK unit tests with VS Test again + - if: matrix.framework == 'wasdk' + name: Run ComputeSharp.D2D1.WinUI.Tests + run: > + $vs_path = vswhere -latest -products * -requires Microsoft.VisualStudio.Workload.ManagedDesktop -requiresAny -property installationPath; + $vstest_path = join-path $vs_path 'Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'; + & $vstest_path /Platform:x64 tests\ComputeSharp.D2D1.WinUI.Tests\bin\x64\${{matrix.configuration}}\net6.0-windows10.0.22621.0\win10-x64\ComputeSharp.D2D1.WinUI.Tests.build.appxrecipe # Run all the local samples to ensure they build and run with no errors run-samples: @@ -281,7 +299,7 @@ jobs: # Publish the packages to GitHub packages publish-nightlies-github: - needs: [run-tests, run-tests-uwp, run-samples, run-samples-aot, verify-packages] + needs: [run-tests, run-tests-win2d, run-samples, run-samples-aot, verify-packages] runs-on: windows-2022 if: ${{github.event_name == 'push'}} steps: @@ -293,7 +311,7 @@ jobs: # Publish the packages to Azure DevOps publish-nightlies-azure-devops: - needs: [run-tests, run-tests-uwp, run-samples, run-samples-aot, verify-packages] + needs: [run-tests, run-tests-win2d, run-samples, run-samples-aot, verify-packages] runs-on: windows-2022 if: ${{github.event_name == 'push'}} steps: From 61215984ef43347821ac45d3546cd0570ef46784 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 27 Apr 2023 02:31:14 +0200 Subject: [PATCH 4/4] Rename App.xaml.cs file in UWP tests for consistency --- .../{UnitTestApp.xaml => App.xaml} | 0 .../{UnitTestApp.xaml.cs => App.xaml.cs} | 0 .../ComputeSharp.D2D1.Uwp.Tests.csproj | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) rename tests/ComputeSharp.D2D1.Uwp.Tests/{UnitTestApp.xaml => App.xaml} (100%) rename tests/ComputeSharp.D2D1.Uwp.Tests/{UnitTestApp.xaml.cs => App.xaml.cs} (100%) diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/UnitTestApp.xaml b/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml similarity index 100% rename from tests/ComputeSharp.D2D1.Uwp.Tests/UnitTestApp.xaml rename to tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/UnitTestApp.xaml.cs b/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml.cs similarity index 100% rename from tests/ComputeSharp.D2D1.Uwp.Tests/UnitTestApp.xaml.cs rename to tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml.cs diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj b/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj index c58342da..21d4a8d2 100644 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj +++ b/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj @@ -75,12 +75,12 @@ - - UnitTestApp.xaml + + App.xaml - + MSBuild:Compile Designer