diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3fcb049c..63b9cf24 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,10 +50,6 @@ jobs: run: dotnet pack src\ComputeSharp.D2D1\ComputeSharp.D2D1.csproj -c Release - name: Build ComputeSharp.Pix package run: dotnet pack src\ComputeSharp.Pix\ComputeSharp.Pix.csproj -c Release - - name: Build ComputeSharp.Uwp package - run: msbuild src\ComputeSharp.Uwp\ComputeSharp.Uwp.csproj /restore -t:pack /p:Configuration=Release - - name: Build ComputeSharp.D2D1.Uwp package - run: msbuild src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj /restore -t:pack /p:Configuration=Release - name: Build ComputeSharp.WinUI package run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj /restore -t:pack /p:Configuration=Release - name: Build ComputeSharp.D2D1.WinUI package @@ -152,35 +148,19 @@ jobs: strategy: matrix: configuration: [Debug, Release] - framework: [uwp, wasdk] runs-on: windows-2022 steps: - name: Git checkout uses: actions/checkout@v3 - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.1 - - # Build the D2D1 UWP unit tests - - if: matrix.framework == 'uwp' - name: Build ComputeSharp.D2D1.Uwp.Tests - run: msbuild tests\ComputeSharp.D2D1.Uwp.Tests\ComputeSharp.D2D1.Uwp.Tests.csproj /restore -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) - - 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 - - if: matrix.framework == 'wasdk' - name: Build ComputeSharp.D2D1.WinUI.Tests + - name: Build ComputeSharp.D2D1.WinUI.Tests run: msbuild tests\ComputeSharp.D2D1.WinUI.Tests\ComputeSharp.D2D1.WinUI.Tests.csproj /restore -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 + - 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'; diff --git a/ComputeSharp.sln b/ComputeSharp.sln index 5094cf24..06791225 100644 --- a/ComputeSharp.sln +++ b/ComputeSharp.sln @@ -56,12 +56,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.WinUI", "src\C EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.SwapChain.WinUI", "samples\ComputeSharp.SwapChain.WinUI\ComputeSharp.SwapChain.WinUI.csproj", "{0071701E-B9C5-4098-BE5F-EF556C4553C6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Uwp", "src\ComputeSharp.Uwp\ComputeSharp.Uwp.csproj", "{AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.SwapChain.Uwp", "samples\ComputeSharp.SwapChain.Uwp\ComputeSharp.SwapChain.Uwp.csproj", "{FBD388A5-7855-4408-98FF-E689F509DB5A}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.UI", "src\ComputeSharp.UI\ComputeSharp.UI.shproj", "{0C82EDE1-5B8A-4DF3-87DA-700B29D5E265}" -EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.SwapChain.Shaders.Shared", "samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.shproj", "{0800BD51-499D-44C2-9417-FD1F7FDFE9C4}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.SwapChain.Core.Shared", "samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.shproj", "{751BB05B-563D-4B3A-94C6-15E2D79D35EA}" @@ -120,14 +116,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B86A48A7-18B src\Directory.Build.targets = src\Directory.Build.targets EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.Uwp", "src\ComputeSharp.D2D1.Uwp\ComputeSharp.D2D1.Uwp.csproj", "{E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}" -EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.SwapChain.Shaders.D2D1.Shared", "samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.shproj", "{F8BF7666-7CCF-4FE4-B055-2EBA4BCD4564}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.WinUI", "src\ComputeSharp.D2D1.WinUI\ComputeSharp.D2D1.WinUI.csproj", "{BD9E6556-357E-4C20-BFCD-FB131F9372FA}" EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.D2D1.UI", "src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.shproj", "{902D7B44-2C6C-4FCD-840B-EBCAE811EE63}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{568E7009-5C13-4153-9C94-0AC7A3E6883C}" ProjectSection(SolutionItems) = preProject samples\Directory.Build.props = samples\Directory.Build.props @@ -150,17 +142,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assets", "Assets", "{345F62 assets\icon_highres.png = assets\icon_highres.png EndProjectSection EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.D2D1.UI.Tests", "tests\ComputeSharp.D2D1.UI.Tests\ComputeSharp.D2D1.UI.Tests.shproj", "{346AEB10-A4EA-427E-8578-F60915DB3053}" -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", "{73C32D0F-64DB-4674-84E9-8FCC41228474}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D3D12MemoryAllocator", "src\ComputeSharp.D3D12MemoryAllocator\ComputeSharp.D3D12MemoryAllocator.csproj", "{E017B3B6-C7D3-4E53-A7F6-1036178E98C3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.CodeFixers", "src\ComputeSharp.D2D1.CodeFixers\ComputeSharp.D2D1.CodeFixers.csproj", "{54654960-54B5-4E19-B3ED-993591CA39E5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.D2D1.Tests.SourceGenerators", "tests\ComputeSharp.D2D1.Tests.SourceGenerators\ComputeSharp.D2D1.Tests.SourceGenerators.csproj", "{59A17380-24A0-4BD7-9012-B105A9E7D46F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.D2D1.Tests.SourceGenerators", "tests\ComputeSharp.D2D1.Tests.SourceGenerators\ComputeSharp.D2D1.Tests.SourceGenerators.csproj", "{59A17380-24A0-4BD7-9012-B105A9E7D46F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -294,14 +282,6 @@ Global {0071701E-B9C5-4098-BE5F-EF556C4553C6}.Release|x64.ActiveCfg = Release|x64 {0071701E-B9C5-4098-BE5F-EF556C4553C6}.Release|x64.Build.0 = Release|x64 {0071701E-B9C5-4098-BE5F-EF556C4553C6}.Release|x64.Deploy.0 = Release|x64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|ARM64.Build.0 = Debug|ARM64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|x64.ActiveCfg = Debug|x64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Debug|x64.Build.0 = Debug|x64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|ARM64.ActiveCfg = Release|ARM64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|ARM64.Build.0 = Release|ARM64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|x64.ActiveCfg = Release|x64 - {AFAAFDC9-BE42-45D4-8C79-0EE8C8EDBF52}.Release|x64.Build.0 = Release|x64 {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|ARM64.ActiveCfg = Debug|ARM64 {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|ARM64.Build.0 = Debug|ARM64 {FBD388A5-7855-4408-98FF-E689F509DB5A}.Debug|ARM64.Deploy.0 = Debug|ARM64 @@ -402,14 +382,6 @@ Global {669A414F-3B46-4B55-B587-061AF63C3067}.Release|ARM64.Build.0 = Release|Any CPU {669A414F-3B46-4B55-B587-061AF63C3067}.Release|x64.ActiveCfg = Release|Any CPU {669A414F-3B46-4B55-B587-061AF63C3067}.Release|x64.Build.0 = Release|Any CPU - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|ARM64.Build.0 = Debug|ARM64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|x64.ActiveCfg = Debug|x64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Debug|x64.Build.0 = Debug|x64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Release|ARM64.ActiveCfg = Release|ARM64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Release|ARM64.Build.0 = Release|ARM64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Release|x64.ActiveCfg = Release|x64 - {E60A3B1E-FC5D-41AC-ACF0-C2D75B6590D2}.Release|x64.Build.0 = Release|x64 {BD9E6556-357E-4C20-BFCD-FB131F9372FA}.Debug|ARM64.ActiveCfg = Debug|ARM64 {BD9E6556-357E-4C20-BFCD-FB131F9372FA}.Debug|ARM64.Build.0 = Debug|ARM64 {BD9E6556-357E-4C20-BFCD-FB131F9372FA}.Debug|x64.ActiveCfg = Debug|x64 @@ -426,18 +398,6 @@ Global {9EA5AE9D-C39A-4F43-B03E-0A848EA2558A}.Release|ARM64.Build.0 = Release|ARM64 {9EA5AE9D-C39A-4F43-B03E-0A848EA2558A}.Release|x64.ActiveCfg = Release|x64 {9EA5AE9D-C39A-4F43-B03E-0A848EA2558A}.Release|x64.Build.0 = Release|x64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Debug|ARM64.Build.0 = Debug|ARM64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Debug|ARM64.Deploy.0 = Debug|ARM64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Debug|x64.ActiveCfg = Debug|x64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Debug|x64.Build.0 = Debug|x64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Debug|x64.Deploy.0 = Debug|x64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|ARM64.ActiveCfg = Release|ARM64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|ARM64.Build.0 = Release|ARM64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3}.Release|ARM64.Deploy.0 = Release|ARM64 - {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 {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 @@ -511,8 +471,6 @@ Global {568E7009-5C13-4153-9C94-0AC7A3E6883C} = {1A9C4108-F61A-4ABE-B5CF-F524521EAE2D} {B54B6DCA-6EAB-46A8-83D3-15154659F47F} = {1A9C4108-F61A-4ABE-B5CF-F524521EAE2D} {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} {73C32D0F-64DB-4674-84E9-8FCC41228474} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} {59A17380-24A0-4BD7-9012-B105A9E7D46F} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7} EndGlobalSection @@ -524,30 +482,20 @@ Global samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{0071701e-b9c5-4098-be5f-ef556c4553c6}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{0800bd51-499d-44c2-9417-fd1f7fdfe9c4}*SharedItemsImports = 13 - src\ComputeSharp.UI\ComputeSharp.UI.projitems*{0c82ede1-5b8a-4df3-87da-700b29d5e265}*SharedItemsImports = 13 src\TerraFX.Interop.Windows.Dynamic\TerraFX.Interop.Windows.Dynamic.projitems*{158f984d-cd96-4062-bd02-2268946031a0}*SharedItemsImports = 13 samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{209c95a3-fa53-431b-b688-3299ca6c29d2}*SharedItemsImports = 5 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 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 - src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.projitems*{902d7b44-2c6c-4fcd-840b-ebcae811ee63}*SharedItemsImports = 13 src\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems*{9ac496a3-bbf0-4c8f-a50d-a20bf01c5e05}*SharedItemsImports = 13 src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{9da1da9f-f8b2-4b25-be80-c21f773029e3}*SharedItemsImports = 13 samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{9ea5ae9d-c39a-4f43-b03e-0a848ea2558a}*SharedItemsImports = 5 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{a5997814-d8d2-4541-87ac-c3e53caa67c0}*SharedItemsImports = 13 - src\ComputeSharp.UI\ComputeSharp.UI.projitems*{afaafdc9-be42-45d4-8c79-0ee8c8edbf52}*SharedItemsImports = 5 - src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.projitems*{bd9e6556-357e-4c20-bfcd-fb131f9372fa}*SharedItemsImports = 5 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{bfb003d1-788b-48de-8065-39479c162cb0}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{bfb003d1-788b-48de-8065-39479c162cb0}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{c12d7ace-98ed-4813-8118-6667c34f484f}*SharedItemsImports = 5 @@ -555,7 +503,6 @@ Global src\ComputeSharp.SourceGeneration.Hlsl\ComputeSharp.SourceGeneration.Hlsl.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 src\ComputeSharp.SourceGeneration\ComputeSharp.SourceGeneration.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 src\TerraFX.Interop.Windows.D2D1\TerraFX.Interop.Windows.D2D1.projitems*{e44053bd-a761-47fb-aa78-087a599672ea}*SharedItemsImports = 5 - src\ComputeSharp.D2D1.UI\ComputeSharp.D2D1.UI.projitems*{e60a3b1e-fc5d-41ac-acf0-c2d75b6590d2}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e7c9247d-016b-4819-af9f-0e9b3591e04b}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{e91f4d24-922a-4921-a8d7-9c45a143c45d}*SharedItemsImports = 5 src\ComputeSharp.NetStandard\ComputeSharp.NetStandard.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 @@ -564,7 +511,6 @@ Global src\TerraFX.Interop.Windows.Dynamic\TerraFX.Interop.Windows.Dynamic.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 src\TerraFX.Interop.Windows\TerraFX.Interop.Windows.projitems*{eb52cb67-4162-4722-874b-44ea8da5450e}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{f8bf7666-7ccf-4fe4-b055-2eba4bcd4564}*SharedItemsImports = 13 - src\ComputeSharp.UI\ComputeSharp.UI.projitems*{fa18ba9f-76bf-4de0-8d24-02fc7657e6cb}*SharedItemsImports = 5 samples\ComputeSharp.SwapChain.Core.Shared\ComputeSharp.SwapChain.Core.Shared.projitems*{fbd388a5-7855-4408-98ff-e689f509db5a}*SharedItemsImports = 4 samples\ComputeSharp.SwapChain.Shaders.D2D1.Shared\ComputeSharp.SwapChain.Shaders.D2D1.Shared.projitems*{fbd388a5-7855-4408-98ff-e689f509db5a}*SharedItemsImports = 4 samples\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems*{fbd388a5-7855-4408-98ff-e689f509db5a}*SharedItemsImports = 4 diff --git a/README.md b/README.md index 1f1bd081..c3bb9bfa 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,9 @@ The sample app is available in the Microsoft Store, showcasing several pixel sha | **ComputeSharp.Dynamic** | An extension for **ComputeSharp**, enabling dynamic shader compilation at runtime and shader metaprogramming | | **ComputeSharp.D3D12MemoryAllocator** | An extension for **ComputeSharp**, adding D3D12MA as the memory allocator for graphics resources. | | **ComputeSharp.Pix** | An extension library for **ComputeSharp**, enabling PIX support to produce debugging information | -| **ComputeSharp.Uwp** | A UWP library (targeting .NET Standard 2.0) with controls to render DX12 shaders powered by **ComputeSharp** | -| **ComputeSharp.WinUI** | A WinUI 3 library (targeting .NET 6) with controls to render DX12 shaders powered by **ComputeSharp** | +| **ComputeSharp.WinUI** | A WinUI 3 library with controls to render DX12 shaders powered by **ComputeSharp** | | **ComputeSharp.D2D1** | A library to write D2D1 pixel shaders entirely with C# code, and to easily register and create ID2D1Effect-s from them | +| **ComputeSharp.D2D1.WinUI** | A WinUI 3 library with custom effects for Win2D powered by **ComputeSharp.D2D1** | Preview builds are available at https://pkgs.computesharp.dev/index.json (as well as GitHub Packages). diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index 2057cce4..0606b34d 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -165,6 +165,12 @@ 8.2.1 + + 2.2.0-preview1 + + + 2.2.0-preview1 + 5.0.2 @@ -187,16 +193,6 @@ 2.8.5 - - - - - - - - - - MSBuild:Compile diff --git a/src/ComputeSharp.Core/ComputeSharp.Core.csproj b/src/ComputeSharp.Core/ComputeSharp.Core.csproj index af45fa55..7022c387 100644 --- a/src/ComputeSharp.Core/ComputeSharp.Core.csproj +++ b/src/ComputeSharp.Core/ComputeSharp.Core.csproj @@ -8,10 +8,8 @@ - - diff --git a/src/ComputeSharp.D2D1.UI/ComputeSharp.D2D1.UI.projitems b/src/ComputeSharp.D2D1.UI/ComputeSharp.D2D1.UI.projitems deleted file mode 100644 index d83501cc..00000000 --- a/src/ComputeSharp.D2D1.UI/ComputeSharp.D2D1.UI.projitems +++ /dev/null @@ -1,54 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 902d7b44-2c6c-4fcd-840b-ebcae811ee63 - - - ComputeSharp.D2D1.UI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.UI/ComputeSharp.D2D1.UI.shproj b/src/ComputeSharp.D2D1.UI/ComputeSharp.D2D1.UI.shproj deleted file mode 100644 index 7cb7c873..00000000 --- a/src/ComputeSharp.D2D1.UI/ComputeSharp.D2D1.UI.shproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - 902d7b44-2c6c-4fcd-840b-ebcae811ee63 - 14.0 - - - - - - - - diff --git a/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj b/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj deleted file mode 100644 index 18eb8992..00000000 --- a/src/ComputeSharp.D2D1.Uwp/ComputeSharp.D2D1.Uwp.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - uap10.0.17763 - 10.0 - 22621 - 17763 - $(TargetPlatformBaseVersion).$(TargetPlatformRevision).0 - $(TargetPlatformBaseVersion).$(TargetPlatformMinRevision).0 - 6.2.14 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - x64;ARM64 - win10-x64;win-arm64 - $(NoWarn);NETSDK1023 - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.Uwp/Properties/ComputeSharp.D2D1.Uwp.rd.xml b/src/ComputeSharp.D2D1.Uwp/Properties/ComputeSharp.D2D1.Uwp.rd.xml deleted file mode 100644 index 0ac421e8..00000000 --- a/src/ComputeSharp.D2D1.Uwp/Properties/ComputeSharp.D2D1.Uwp.rd.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasDevice.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasDevice.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasDevice.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasDevice.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasEffect.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasEffect.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasEffect.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasEffect.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasEffectFactoryNative.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasEffectFactoryNative.cs similarity index 96% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasEffectFactoryNative.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasEffectFactoryNative.cs index 95c3252b..9aecc008 100644 --- a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasEffectFactoryNative.cs +++ b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasEffectFactoryNative.cs @@ -4,10 +4,8 @@ using System.Runtime.InteropServices; using TerraFX.Interop; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if !WINDOWS_UWP using WinRT; using WinRT.Interop; -#endif using IInspectable = TerraFX.Interop.WinRT.IInspectable; #pragma warning disable CS0649, IDE1006 @@ -78,23 +76,14 @@ internal unsafe struct ICanvasEffectFactoryNative /// The managed implementation of . /// [Guid("29BA1A1F-1CFE-44C3-984D-426D61B51427")] -#if WINDOWS_UWP - [ComImport] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] -#else [WindowsRuntimeType] [WindowsRuntimeHelperType(typeof(Interface))] -#endif public interface Interface { /// -#if WINDOWS_UWP - [PreserveSig] -#endif [return: NativeTypeName("HRESULT")] int CreateWrapper(ICanvasDevice* device, ID2D1Effect* resource, float dpi, IInspectable** wrapper); -#if !WINDOWS_UWP /// /// The vtable type for . /// @@ -147,6 +136,5 @@ internal unsafe struct ICanvasEffectFactoryNative } } } -#endif } } \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasFactoryNative.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasFactoryNative.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasFactoryNative.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasFactoryNative.cs index c89c99b6..98d88e29 100644 --- a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasFactoryNative.cs +++ b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasFactoryNative.cs @@ -3,13 +3,9 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using TerraFX.Interop; using TerraFX.Interop.Windows; -#if WINDOWS_UWP -using TerraFX.Interop.WinRT; -#else using WinRT; using WinRT.Interop; using IInspectable = TerraFX.Interop.WinRT.IInspectable; -#endif #pragma warning disable CS0649, IDE1006 @@ -151,7 +147,6 @@ internal unsafe struct ICanvasFactoryNative effectId); } -#if !WINDOWS_UWP /// /// The managed interface for . /// @@ -172,5 +167,4 @@ internal unsafe struct ICanvasFactoryNative public static readonly IntPtr AbiToProjectionVftablePtr = IUnknownVftbl.AbiToProjectionVftblPtr; } } -#endif } \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasImageInterop.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasImageInterop.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasImageInterop.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasImageInterop.cs index ac53ae5d..a8a143aa 100644 --- a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasImageInterop.cs +++ b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasImageInterop.cs @@ -4,10 +4,8 @@ using System.Runtime.InteropServices; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using TerraFX.Interop; -#if !WINDOWS_UWP using WinRT; using WinRT.Interop; -#endif #pragma warning disable CS0649, IDE1006 @@ -86,26 +84,15 @@ internal unsafe struct ICanvasImageInterop /// The managed implementation of . /// [Guid("E042D1F7-F9AD-4479-A713-67627EA31863")] -#if WINDOWS_UWP - [ComImport] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] -#else [WindowsRuntimeType] [WindowsRuntimeHelperType(typeof(Interface))] -#endif public interface Interface { /// -#if WINDOWS_UWP - [PreserveSig] -#endif [return: NativeTypeName("HRESULT")] int GetDevice(ICanvasDevice** device, WIN2D_GET_DEVICE_ASSOCIATION_TYPE* type); /// -#if WINDOWS_UWP - [PreserveSig] -#endif [return: NativeTypeName("HRESULT")] int GetD2DImage( ICanvasDevice* device, @@ -115,7 +102,6 @@ internal unsafe struct ICanvasImageInterop float* realizeDpi, ID2D1Image** ppImage); -#if !WINDOWS_UWP /// /// The vtable type for . /// @@ -198,6 +184,5 @@ internal unsafe struct ICanvasImageInterop } } } -#endif } } \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreator.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreator.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreator.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreator.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreatorWithDpi.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreatorWithDpi.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreatorWithDpi.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceCreatorWithDpi.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceWrapperNative.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceWrapperNative.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceWrapperNative.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ICanvasResourceWrapperNative.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextLease.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextLease.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextLease.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextLease.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextPool.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextPool.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextPool.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/ID2D1DeviceContextPool.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/Inspectable/IInspectable.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/Inspectable/IInspectable.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/Inspectable/IInspectable.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/Inspectable/IInspectable.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_D2D_IMAGE_FLAGS.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_D2D_IMAGE_FLAGS.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_D2D_IMAGE_FLAGS.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_D2D_IMAGE_FLAGS.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_DEVICE_ASSOCIATION_TYPE.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_DEVICE_ASSOCIATION_TYPE.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_DEVICE_ASSOCIATION_TYPE.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/WIN2D_GET_DEVICE_ASSOCIATION_TYPE.cs diff --git a/src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/Win2D.cs b/src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/Win2D.cs similarity index 100% rename from src/ComputeSharp.D2D1.UI/ABI.Microsoft.Graphics.Canvas/Win2D.cs rename to src/ComputeSharp.D2D1.WinUI/ABI.Microsoft.Graphics.Canvas/Win2D.cs diff --git a/src/ComputeSharp.D2D1.UI/Buffers/GraphicsEffectSourceBuffer.cs b/src/ComputeSharp.D2D1.WinUI/Buffers/GraphicsEffectSourceBuffer.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/Buffers/GraphicsEffectSourceBuffer.cs rename to src/ComputeSharp.D2D1.WinUI/Buffers/GraphicsEffectSourceBuffer.cs index f689c6df..34502c69 100644 --- a/src/ComputeSharp.D2D1.UI/Buffers/GraphicsEffectSourceBuffer.cs +++ b/src/ComputeSharp.D2D1.WinUI/Buffers/GraphicsEffectSourceBuffer.cs @@ -3,11 +3,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using Windows.Graphics.Effects; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Buffers; -#else namespace ComputeSharp.D2D1.WinUI.Buffers; -#endif /// /// A fixed buffer type containing 16 fields. diff --git a/src/ComputeSharp.D2D1.UI/Buffers/ResourceTextureManagerBuffer.cs b/src/ComputeSharp.D2D1.WinUI/Buffers/ResourceTextureManagerBuffer.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/Buffers/ResourceTextureManagerBuffer.cs rename to src/ComputeSharp.D2D1.WinUI/Buffers/ResourceTextureManagerBuffer.cs index 5efb789a..66744195 100644 --- a/src/ComputeSharp.D2D1.UI/Buffers/ResourceTextureManagerBuffer.cs +++ b/src/ComputeSharp.D2D1.WinUI/Buffers/ResourceTextureManagerBuffer.cs @@ -3,11 +3,7 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using ComputeSharp.D2D1.Interop; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Buffers; -#else namespace ComputeSharp.D2D1.WinUI.Buffers; -#endif /// /// A fixed buffer type containing 16 fields. diff --git a/src/ComputeSharp.D2D1.UI/Buffers/SourceReference.cs b/src/ComputeSharp.D2D1.WinUI/Buffers/SourceReference.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/Buffers/SourceReference.cs rename to src/ComputeSharp.D2D1.WinUI/Buffers/SourceReference.cs index d9f917b2..e91c02ab 100644 --- a/src/ComputeSharp.D2D1.UI/Buffers/SourceReference.cs +++ b/src/ComputeSharp.D2D1.WinUI/Buffers/SourceReference.cs @@ -1,22 +1,13 @@ using System; using System.Runtime.CompilerServices; using ABI.Microsoft.Graphics.Canvas; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Extensions; -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Extensions; using ComputeSharp.D2D1.WinUI.Helpers; -#endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using Windows.Graphics.Effects; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Buffers; -#else namespace ComputeSharp.D2D1.WinUI.Buffers; -#endif /// /// A wrapper type for an input and its underlying native D2D images. diff --git a/src/ComputeSharp.D2D1.UI/CanvasEffect.EffectGraph.cs b/src/ComputeSharp.D2D1.WinUI/CanvasEffect.EffectGraph.cs similarity index 99% rename from src/ComputeSharp.D2D1.UI/CanvasEffect.EffectGraph.cs rename to src/ComputeSharp.D2D1.WinUI/CanvasEffect.EffectGraph.cs index 9af0f2a7..2122aa51 100644 --- a/src/ComputeSharp.D2D1.UI/CanvasEffect.EffectGraph.cs +++ b/src/ComputeSharp.D2D1.WinUI/CanvasEffect.EffectGraph.cs @@ -2,11 +2,7 @@ using System; using System.Runtime.CompilerServices; using Microsoft.Graphics.Canvas; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// partial class CanvasEffect diff --git a/src/ComputeSharp.D2D1.UI/CanvasEffect.Interop.cs b/src/ComputeSharp.D2D1.WinUI/CanvasEffect.Interop.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/CanvasEffect.Interop.cs rename to src/ComputeSharp.D2D1.WinUI/CanvasEffect.Interop.cs index 3f46123e..b0f6fd7b 100644 --- a/src/ComputeSharp.D2D1.UI/CanvasEffect.Interop.cs +++ b/src/ComputeSharp.D2D1.WinUI/CanvasEffect.Interop.cs @@ -3,22 +3,14 @@ using System.Diagnostics.CodeAnalysis; using System.Numerics; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Helpers; -#endif using Microsoft.Graphics.Canvas; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using Windows.Foundation; using ICanvasResourceCreator = Microsoft.Graphics.Canvas.ICanvasResourceCreator; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// partial class CanvasEffect diff --git a/src/ComputeSharp.D2D1.UI/CanvasEffect.cs b/src/ComputeSharp.D2D1.WinUI/CanvasEffect.cs similarity index 99% rename from src/ComputeSharp.D2D1.UI/CanvasEffect.cs rename to src/ComputeSharp.D2D1.WinUI/CanvasEffect.cs index c9cdbf63..b138a98d 100644 --- a/src/ComputeSharp.D2D1.UI/CanvasEffect.cs +++ b/src/ComputeSharp.D2D1.WinUI/CanvasEffect.cs @@ -4,11 +4,7 @@ using System.Diagnostics.CodeAnalysis; using ABI.Microsoft.Graphics.Canvas; using Microsoft.Graphics.Canvas; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// /// A base type to implement packaged and easy to use -based effects that can be used with Win2D. diff --git a/src/ComputeSharp.D2D1.UI/Collections/FixedCountList{T}.cs b/src/ComputeSharp.D2D1.WinUI/Collections/FixedCountList{T}.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/Collections/FixedCountList{T}.cs rename to src/ComputeSharp.D2D1.WinUI/Collections/FixedCountList{T}.cs index 8f93a9b0..d4c46083 100644 --- a/src/ComputeSharp.D2D1.UI/Collections/FixedCountList{T}.cs +++ b/src/ComputeSharp.D2D1.WinUI/Collections/FixedCountList{T}.cs @@ -1,11 +1,7 @@ using System; using System.Collections.Generic; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Collections; -#else namespace ComputeSharp.D2D1.WinUI.Collections; -#endif /// /// Shared helpers for all types implementing . diff --git a/src/ComputeSharp.D2D1.UI/Collections/IFixedCountList{T}.cs b/src/ComputeSharp.D2D1.WinUI/Collections/IFixedCountList{T}.cs similarity index 87% rename from src/ComputeSharp.D2D1.UI/Collections/IFixedCountList{T}.cs rename to src/ComputeSharp.D2D1.WinUI/Collections/IFixedCountList{T}.cs index c3672855..6dcd595c 100644 --- a/src/ComputeSharp.D2D1.UI/Collections/IFixedCountList{T}.cs +++ b/src/ComputeSharp.D2D1.WinUI/Collections/IFixedCountList{T}.cs @@ -1,11 +1,7 @@ using System.Collections.Generic; using System.Collections.Immutable; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Collections; -#else namespace ComputeSharp.D2D1.WinUI.Collections; -#endif /// /// An interface for a list with a fixed collection. diff --git a/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj b/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj index b031138d..2fe6baa8 100644 --- a/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj +++ b/src/ComputeSharp.D2D1.WinUI/ComputeSharp.D2D1.WinUI.csproj @@ -19,6 +19,11 @@ $(NoWarn);IDE0065 + + + + + @@ -26,6 +31,4 @@ - - diff --git a/src/ComputeSharp.D2D1.UI/Extensions/ICanvasDeviceExtensions.cs b/src/ComputeSharp.D2D1.WinUI/Extensions/ICanvasDeviceExtensions.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/Extensions/ICanvasDeviceExtensions.cs rename to src/ComputeSharp.D2D1.WinUI/Extensions/ICanvasDeviceExtensions.cs index ab5a75e4..cf59c1f5 100644 --- a/src/ComputeSharp.D2D1.UI/Extensions/ICanvasDeviceExtensions.cs +++ b/src/ComputeSharp.D2D1.WinUI/Extensions/ICanvasDeviceExtensions.cs @@ -4,11 +4,7 @@ using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Extensions; -#else namespace ComputeSharp.D2D1.WinUI.Extensions; -#endif /// /// A with extensions for the type. diff --git a/src/ComputeSharp.D2D1.UI/Extensions/ID2D1DeviceContextExtensions.cs b/src/ComputeSharp.D2D1.WinUI/Extensions/ID2D1DeviceContextExtensions.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/Extensions/ID2D1DeviceContextExtensions.cs rename to src/ComputeSharp.D2D1.WinUI/Extensions/ID2D1DeviceContextExtensions.cs index 7a3b47db..c80b7afd 100644 --- a/src/ComputeSharp.D2D1.UI/Extensions/ID2D1DeviceContextExtensions.cs +++ b/src/ComputeSharp.D2D1.WinUI/Extensions/ID2D1DeviceContextExtensions.cs @@ -2,11 +2,7 @@ using ComputeSharp.D2D1.Extensions; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Extensions; -#else namespace ComputeSharp.D2D1.WinUI.Extensions; -#endif /// /// A with extensions for the type. diff --git a/src/ComputeSharp.D2D1.UI/Extensions/ID2D1EffectExtensions.cs b/src/ComputeSharp.D2D1.WinUI/Extensions/ID2D1EffectExtensions.cs similarity index 99% rename from src/ComputeSharp.D2D1.UI/Extensions/ID2D1EffectExtensions.cs rename to src/ComputeSharp.D2D1.WinUI/Extensions/ID2D1EffectExtensions.cs index 090d6c56..c7ed870e 100644 --- a/src/ComputeSharp.D2D1.UI/Extensions/ID2D1EffectExtensions.cs +++ b/src/ComputeSharp.D2D1.WinUI/Extensions/ID2D1EffectExtensions.cs @@ -10,11 +10,7 @@ using ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Extensions; -#else namespace ComputeSharp.D2D1.WinUI.Extensions; -#endif /// /// A with extensions for the type. diff --git a/src/ComputeSharp.D2D1.UI/Extensions/IUnknownExtensions.cs b/src/ComputeSharp.D2D1.WinUI/Extensions/IUnknownExtensions.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/Extensions/IUnknownExtensions.cs rename to src/ComputeSharp.D2D1.WinUI/Extensions/IUnknownExtensions.cs index e8e06034..8166a47c 100644 --- a/src/ComputeSharp.D2D1.UI/Extensions/IUnknownExtensions.cs +++ b/src/ComputeSharp.D2D1.WinUI/Extensions/IUnknownExtensions.cs @@ -3,11 +3,7 @@ using ComputeSharp.D2D1.Extensions; using TerraFX.Interop.Windows; using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Extensions; -#else namespace ComputeSharp.D2D1.WinUI.Extensions; -#endif /// /// Helper methods for working with the type. diff --git a/src/ComputeSharp.D2D1.UI/Helpers/RcwMarshaller.cs b/src/ComputeSharp.D2D1.WinUI/Helpers/RcwMarshaller.cs similarity index 74% rename from src/ComputeSharp.D2D1.UI/Helpers/RcwMarshaller.cs rename to src/ComputeSharp.D2D1.WinUI/Helpers/RcwMarshaller.cs index 3adfae3c..07abf3bf 100644 --- a/src/ComputeSharp.D2D1.UI/Helpers/RcwMarshaller.cs +++ b/src/ComputeSharp.D2D1.WinUI/Helpers/RcwMarshaller.cs @@ -1,20 +1,10 @@ using System; using System.Diagnostics.CodeAnalysis; -#if WINDOWS_UWP -using System.Runtime.InteropServices; -using ComputeSharp.D2D1.Extensions; -#endif using TerraFX.Interop.Windows; -#if !WINDOWS_UWP using WinRT; -#endif using IInspectable = TerraFX.Interop.WinRT.IInspectable; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Helpers; -#else namespace ComputeSharp.D2D1.WinUI.Helpers; -#endif /// /// A helper type to handle marshalling of RCW instances. @@ -31,12 +21,7 @@ internal static unsafe class RcwMarshaller public static T GetOrCreateManagedInterface(IUnknown* nativeObject) where T : class { -#if WINDOWS_UWP - // On UWP, Marshal.GetObjectForIUnknown handles all the marshalling/wrapping logic - return (T)Marshal.GetObjectForIUnknown((IntPtr)nativeObject); -#else return MarshalInterface.FromAbi((IntPtr)nativeObject); -#endif } /// @@ -49,18 +34,7 @@ internal static unsafe class RcwMarshaller public static void GetNativeObject<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.Interfaces)] T>(T managedObject, IInspectable** nativeObject) where T : class { -#if WINDOWS_UWP - using ComPtr unknownObject = default; - - // On UWP, due to built-in COM/WinRT support, Marshal.GetIUnknownForObject can handle all the logic. - // We get back an IUnknown* pointer, so we need to QueryInterface for IInspectable* ourselves. - unknownObject.Attach((IUnknown*)Marshal.GetIUnknownForObject(managedObject)); - - unknownObject.CopyTo(nativeObject).Assert(); -#else - // On WinUI 3, delegate the RCW unwrapping or CCW creation logic to CsWinRT's APIs *nativeObject = (IInspectable*)MarshalInspectable.FromManaged(managedObject); -#endif } /// @@ -78,15 +52,9 @@ internal static unsafe class RcwMarshaller { using ComPtr unknownObject = default; -#if WINDOWS_UWP - unknownObject.Attach((IUnknown*)Marshal.GetIUnknownForObject(managedObject)); - - unknownObject.CopyTo(nativeObject).Assert(); -#else // Here we only want to get an IUnknown* pointer for a given interface, and then we'll do // QueryInterface ourselves to get the target COM type. So MarshalInterface is fine. unknownObject.Attach((IUnknown*)MarshalInterface.FromManaged(managedObject)); -#endif return unknownObject.CopyTo(nativeObject); } diff --git a/src/ComputeSharp.D2D1.UI/Helpers/ResourceManager.cs b/src/ComputeSharp.D2D1.WinUI/Helpers/ResourceManager.cs similarity index 80% rename from src/ComputeSharp.D2D1.UI/Helpers/ResourceManager.cs rename to src/ComputeSharp.D2D1.WinUI/Helpers/ResourceManager.cs index f1990f56..97562833 100644 --- a/src/ComputeSharp.D2D1.UI/Helpers/ResourceManager.cs +++ b/src/ComputeSharp.D2D1.WinUI/Helpers/ResourceManager.cs @@ -3,22 +3,13 @@ using System.Diagnostics.CodeAnalysis; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; using TerraFX.Interop.Windows; -#if WINDOWS_UWP -using TerraFX.Interop.WinRT; -#endif using Windows.Graphics.Effects; -#if !WINDOWS_UWP using WinRT; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp.Helpers; -#else namespace ComputeSharp.D2D1.WinUI.Helpers; using CanvasDevice = Microsoft.Graphics.Canvas.CanvasDevice; using IInspectable = TerraFX.Interop.WinRT.IInspectable; -#endif /// /// A helper type to replicate Win2D's ResourceManager type. @@ -115,32 +106,6 @@ internal static unsafe class ResourceManager /// A pointer to the resulting activation factory. private static void GetActivationFactory(ICanvasFactoryNative** factoryNative) { -#if WINDOWS_UWP - const string activatableClassId = "Microsoft.Graphics.Canvas.CanvasDevice"; - - // On UWP, the WinRT types from Win2D are automatically registered for activation. - // This means we can simply use RoGetActivationFactory to retrieve the factory. - fixed (char* pActivatableClassId = activatableClassId) - { - HSTRING_HEADER hStringHeaderActivatableClassId; - HSTRING hStringActivatableClass; - - // Create a fast-pass HSTRING for "Microsoft.Graphics.Canvas.CanvasDevice" - WinRT.WindowsCreateStringReference( - sourceString: (ushort*)pActivatableClassId, - length: (uint)activatableClassId.Length, - hstringHeader: &hStringHeaderActivatableClassId, - @string: &hStringActivatableClass).Assert(); - - Guid canvasFactoryNativeId = typeof(ICanvasFactoryNative).GUID; - - // Get the activation factory for CanvasDevice - WinRT.RoGetActivationFactory( - activatableClassId: hStringActivatableClass, - iid: &canvasFactoryNativeId, - factory: (void**)factoryNative).Assert(); - } -#else // On WinUI 3, the types are not guaranteed to be registered for activation. Additionally, // for concistency with other types, we just use the built-in T.As() method, which will // automatically handle fallback logic to resolve types to activate if they're not registered. @@ -148,6 +113,5 @@ internal static unsafe class ResourceManager ICanvasFactoryNative.Interface canvasDeviceActivationFactory = CanvasDevice.As(); *factoryNative = (ICanvasFactoryNative*)MarshalInterface.FromManaged(canvasDeviceActivationFactory); -#endif } } diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasEffect.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasEffect.cs index a55b2506..467c1f5f 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffect.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasEffect.cs @@ -3,22 +3,14 @@ using System.Buffers; using System.Runtime.InteropServices; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Helpers; -#endif using ComputeSharp.Interop; using TerraFX.Interop.Windows; using Windows.Foundation; using ICanvasEffect = Microsoft.Graphics.Canvas.Effects.ICanvasEffect; using ICanvasResourceCreatorWithDpi = Microsoft.Graphics.Canvas.ICanvasResourceCreatorWithDpi; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// unsafe partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs index 0fcc7e0e..eefa430b 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasEffectFactoryNative.cs @@ -3,22 +3,13 @@ using System.Runtime.CompilerServices; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; using ComputeSharp.D2D1.Interop; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Extensions; -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Extensions; using ComputeSharp.D2D1.WinUI.Helpers; -#endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using TerraFX.Interop.WinRT; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// unsafe partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasImage.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasImage.cs similarity index 93% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasImage.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasImage.cs index 140d13eb..3a23f23d 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasImage.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasImage.cs @@ -1,21 +1,13 @@ using System.Numerics; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Helpers; -#endif using ComputeSharp.Interop; using TerraFX.Interop.Windows; using Windows.Foundation; using ICanvasResourceCreator = Microsoft.Graphics.Canvas.ICanvasResourceCreator; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// unsafe partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasImageInterop.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasImageInterop.cs similarity index 99% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasImageInterop.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasImageInterop.cs index f63e388e..3a683c99 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ICanvasImageInterop.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ICanvasImageInterop.cs @@ -4,13 +4,8 @@ using System.Threading; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; using ComputeSharp.D2D1.Interop; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Extensions; -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Extensions; using ComputeSharp.D2D1.WinUI.Helpers; -#endif using ComputeSharp.Interop; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -19,11 +14,7 @@ using static ABI.Microsoft.Graphics.Canvas.WIN2D_GET_D2D_IMAGE_FLAGS; using static ABI.Microsoft.Graphics.Canvas.WIN2D_GET_DEVICE_ASSOCIATION_TYPE; using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// unsafe partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.Interop.Sources.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.Interop.Sources.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.Interop.Sources.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.Interop.Sources.cs index a24bdd4d..68b69134 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.Interop.Sources.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.Interop.Sources.cs @@ -3,15 +3,9 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Extensions; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Buffers; -using ComputeSharp.D2D1.Uwp.Extensions; -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Buffers; using ComputeSharp.D2D1.WinUI.Extensions; using ComputeSharp.D2D1.WinUI.Helpers; -#endif using ComputeSharp.Interop; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; @@ -24,11 +18,7 @@ using static TerraFX.Interop.DirectX.D2D1_DPICOMPENSATION_PROP; using static TerraFX.Interop.DirectX.D2D1_PROPERTY_TYPE; using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// unsafe partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.Interop.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.Interop.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.Interop.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.Interop.cs index bc5e4f2f..afa2fa24 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.Interop.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.Interop.cs @@ -1,19 +1,11 @@ using System; using ComputeSharp.D2D1.Interop; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Extensions; -#else using ComputeSharp.D2D1.WinUI.Extensions; -#endif using ComputeSharp.Interop; using Microsoft.Graphics.Canvas; using TerraFX.Interop.DirectX; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// unsafe partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs similarity index 98% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs index 5b47ee1d..3cd6822c 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.ResourceTextureManagerCollection.cs @@ -5,21 +5,12 @@ using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using ComputeSharp.D2D1.Interop; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Buffers; -using ComputeSharp.D2D1.Uwp.Collections; -#else using ComputeSharp.D2D1.WinUI.Buffers; using ComputeSharp.D2D1.WinUI.Collections; -#endif #pragma warning disable CS8767 -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.SourceCollection.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.SourceCollection.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.SourceCollection.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.SourceCollection.cs index 69c3369d..2b063129 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.SourceCollection.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.SourceCollection.cs @@ -4,20 +4,11 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Runtime.CompilerServices; using ComputeSharp.D2D1.Interop; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Buffers; -using ComputeSharp.D2D1.Uwp.Collections; -#else using ComputeSharp.D2D1.WinUI.Buffers; using ComputeSharp.D2D1.WinUI.Collections; -#endif using Windows.Graphics.Effects; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.cs similarity index 96% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.cs index d171e39f..eb0fb811 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.Properties.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.Properties.cs @@ -3,11 +3,7 @@ using System.Diagnostics.CodeAnalysis; using ComputeSharp.D2D1.Interop; using Microsoft.Graphics.Canvas; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ReferenceTracking.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ReferenceTracking.cs similarity index 94% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ReferenceTracking.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ReferenceTracking.cs index 97ce8fa2..76865d69 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.ReferenceTracking.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.ReferenceTracking.cs @@ -1,18 +1,10 @@ using System; using ComputeSharp.Interop; using System.Runtime.CompilerServices; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp.Helpers; -#else using ComputeSharp.D2D1.WinUI.Helpers; -#endif using TerraFX.Interop.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// partial class PixelShaderEffect diff --git a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.cs b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.cs similarity index 97% rename from src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.cs rename to src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.cs index 863d7176..7820cf68 100644 --- a/src/ComputeSharp.D2D1.UI/PixelShaderEffect{T}.cs +++ b/src/ComputeSharp.D2D1.WinUI/PixelShaderEffect{T}.cs @@ -1,6 +1,4 @@ -#if !WINDOWS_UWP using System.Diagnostics.CodeAnalysis; -#endif using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Descriptors; using ComputeSharp.D2D1.Interop; @@ -10,11 +8,7 @@ using Microsoft.Graphics.Canvas.Effects; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.D2D1.Uwp; -#else namespace ComputeSharp.D2D1.WinUI; -#endif /// /// A custom implementation powered by a supplied shader type. @@ -76,7 +70,6 @@ public sealed partial class PixelShaderEffect : IReferenceTrackedObject, ICan /// /// Creates a new instance. /// -#if !WINDOWS_UWP // Workaround for trimming bug in custom COM/WinRT components with CsWinRT. Without manually preserving metadata for // these types, using them will throw an InvalidCastException (see https://github.com/microsoft/CsWinRT/issues/1319). [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ICanvasImageInterop.Interface))] @@ -85,7 +78,6 @@ public sealed partial class PixelShaderEffect : IReferenceTrackedObject, ICan [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ICanvasFactoryNative.Interface.Vftbl))] [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ICanvasEffectFactoryNative.Interface))] [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(ICanvasEffectFactoryNative.Interface.Vftbl))] -#endif public PixelShaderEffect() { using ReferenceTracker.Lease _0 = ReferenceTracker.Create(this, out this.referenceTracker); diff --git a/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj b/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj index 33456cca..2fdee2e1 100644 --- a/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj +++ b/src/ComputeSharp.D2D1/ComputeSharp.D2D1.csproj @@ -5,7 +5,6 @@ - diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1InputDescription.cs b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1InputDescription.cs index 45081c6a..0a403fd8 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/D2D1InputDescription.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/D2D1InputDescription.cs @@ -15,12 +15,6 @@ public readonly struct D2D1InputDescription /// /// The index of the resource the description belongs to. /// - /// - /// This field and the ones below are explicity used because this type is in the type layout of . - /// Since that type is used in an unmanaged context, MCG will produce a shadow copy to inform the runtime marshaller. Such a shallow copy - /// cannot process the type if it has unspeakable names in any of its members, which is the case for the generated fields. As such, this - /// type has to use explicit fields here and not readonly autoproperties, or compiling a project using ComputeSharp.D2D1 would fail on UWP. - /// private readonly int index; /// diff --git a/src/ComputeSharp.UI/ComputeSharp.UI.projitems b/src/ComputeSharp.UI/ComputeSharp.UI.projitems deleted file mode 100644 index 0944f819..00000000 --- a/src/ComputeSharp.UI/ComputeSharp.UI.projitems +++ /dev/null @@ -1,26 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 0c82ede1-5b8a-4df3-87da-700b29d5e265 - - - ComputeSharp.UI - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.UI/ComputeSharp.UI.shproj b/src/ComputeSharp.UI/ComputeSharp.UI.shproj deleted file mode 100644 index 4196b150..00000000 --- a/src/ComputeSharp.UI/ComputeSharp.UI.shproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - 0c82ede1-5b8a-4df3-87da-700b29d5e265 - 14.0 - - - - - - - diff --git a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj deleted file mode 100644 index b4bfd8f5..00000000 --- a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - uap10.0.17763 - 10.0 - 22621 - 17763 - $(TargetPlatformBaseVersion).$(TargetPlatformRevision).0 - $(TargetPlatformBaseVersion).$(TargetPlatformMinRevision).0 - 6.2.14 - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - x64;ARM64 - win10-x64;win-arm64 - $(NoWarn);NETSDK1023 - - - - - - - - \ No newline at end of file diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index 73a43d27..8b172529 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -13,6 +13,4 @@ - - diff --git a/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.Properties.cs b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs similarity index 98% rename from src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.Properties.cs rename to src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs index 35a3d39d..79e84861 100644 --- a/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.Properties.cs +++ b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs @@ -1,16 +1,8 @@ using System; -#if WINDOWS_UWP -using Windows.UI.Xaml; -#else using Microsoft.UI.Xaml; -#endif using Windows.Foundation; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// partial class AnimatedComputeShaderPanel diff --git a/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs similarity index 95% rename from src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs rename to src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs index d486235a..d64c7f97 100644 --- a/src/ComputeSharp.UI/Controls/AnimatedComputeShaderPanel.cs +++ b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs @@ -1,19 +1,9 @@ using System; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Helpers; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -#else using ComputeSharp.WinUI.Helpers; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// diff --git a/src/ComputeSharp.UI/Controls/ComputeShaderPanel.Properties.cs b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs similarity index 98% rename from src/ComputeSharp.UI/Controls/ComputeShaderPanel.Properties.cs rename to src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs index 2c5e37f5..aee683e9 100644 --- a/src/ComputeSharp.UI/Controls/ComputeShaderPanel.Properties.cs +++ b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs @@ -1,16 +1,8 @@ using System; -#if WINDOWS_UWP -using Windows.UI.Xaml; -#else using Microsoft.UI.Xaml; -#endif using Windows.Foundation; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// partial class ComputeShaderPanel diff --git a/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs similarity index 94% rename from src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs rename to src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs index dfeb8554..d68db8e9 100644 --- a/src/ComputeSharp.UI/Controls/ComputeShaderPanel.cs +++ b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs @@ -1,19 +1,9 @@ using System; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Helpers; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -#else using ComputeSharp.WinUI.Helpers; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// diff --git a/src/ComputeSharp.UI/Controls/RenderingFailedEventArgs.cs b/src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs similarity index 93% rename from src/ComputeSharp.UI/Controls/RenderingFailedEventArgs.cs rename to src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs index c65ee832..c4d38d72 100644 --- a/src/ComputeSharp.UI/Controls/RenderingFailedEventArgs.cs +++ b/src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs @@ -1,10 +1,6 @@ using System; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// The arguments for the and events. diff --git a/src/ComputeSharp.UI/Extensions/IDXGIAdapterExtensions.cs b/src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs similarity index 98% rename from src/ComputeSharp.UI/Extensions/IDXGIAdapterExtensions.cs rename to src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs index e9878637..1d581f8a 100644 --- a/src/ComputeSharp.UI/Extensions/IDXGIAdapterExtensions.cs +++ b/src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs @@ -5,11 +5,7 @@ using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Extensions; -#else namespace ComputeSharp.WinUI.Extensions; -#endif /// /// A with extensions for the type. diff --git a/src/ComputeSharp.UI/Extensions/SemaphoreSlimExtensions.cs b/src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs similarity index 95% rename from src/ComputeSharp.UI/Extensions/SemaphoreSlimExtensions.cs rename to src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs index 750e637d..33db32fd 100644 --- a/src/ComputeSharp.UI/Extensions/SemaphoreSlimExtensions.cs +++ b/src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs @@ -5,11 +5,7 @@ using System.Threading.Tasks; #pragma warning disable CS0618 -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Extensions; -#else namespace ComputeSharp.WinUI.Extensions; -#endif /// /// A helper type for . diff --git a/src/ComputeSharp.UI/Helpers/DynamicResolutionManager.cs b/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs similarity index 98% rename from src/ComputeSharp.UI/Helpers/DynamicResolutionManager.cs rename to src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs index fc7d0e55..0f99d50c 100644 --- a/src/ComputeSharp.UI/Helpers/DynamicResolutionManager.cs +++ b/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs @@ -2,11 +2,7 @@ using System; using System.Runtime.CompilerServices; using System.Threading; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Helpers; -#else namespace ComputeSharp.WinUI.Helpers; -#endif /// /// A helper type that is responsible for applying dynamic resolution changes. diff --git a/src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs similarity index 99% rename from src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs rename to src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs index d35d92b4..a15b7599 100644 --- a/src/ComputeSharp.UI/Helpers/SwapChainManager.Rendering.cs +++ b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs @@ -3,17 +3,9 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; using ComputeSharp.Interop; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Extensions; -#else using ComputeSharp.WinUI.Extensions; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Helpers; -#else namespace ComputeSharp.WinUI.Helpers; -#endif #pragma warning disable CS0420 diff --git a/src/ComputeSharp.UI/Helpers/SwapChainManager.cs b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs similarity index 97% rename from src/ComputeSharp.UI/Helpers/SwapChainManager.cs rename to src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs index efcd2acb..a81a0cc8 100644 --- a/src/ComputeSharp.UI/Helpers/SwapChainManager.cs +++ b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs @@ -1,40 +1,21 @@ using System; using System.Diagnostics; using System.Runtime.CompilerServices; -#if WINDOWS_UWP -using System.Runtime.InteropServices; -#endif using System.Threading; using ComputeSharp.Core.Extensions; using ComputeSharp.Graphics.Helpers; using ComputeSharp.Interop; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Extensions; -#else using ComputeSharp.WinUI.Extensions; -#endif -#if !WINDOWS_UWP using Microsoft.UI.Dispatching; using Microsoft.UI.Xaml.Controls; -#endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using TerraFX.Interop.WinRT; -#if WINDOWS_UWP -using Windows.Foundation; -using Windows.UI.Xaml.Controls; -using Windows.System; -#else using Windows.Foundation; using WinRT; -#endif using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Helpers; -#else namespace ComputeSharp.WinUI.Helpers; -#endif /// /// A type managing rendering on a target swap chain object. @@ -243,17 +224,11 @@ internal sealed unsafe partial class SwapChainManager : ReferenceTracked { using ComPtr swapChainPanel = default; -#if WINDOWS_UWP - swapChainPanel.Attach((IUnknown*)Marshal.GetIUnknownForObject(owner)); - - swapChainPanel.CopyTo(swapChainPanelNative).Assert(); -#else swapChainPanel.Attach((IUnknown*)((IWinRTObject)owner).NativeObject.GetRef()); swapChainPanel.CopyTo( (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(new Guid(0x63AAD0B8, 0x7C24, 0x40FF, 0x85, 0xA8, 0x64, 0x0D, 0x94, 0x4C, 0xC3, 0x25))), (void**)swapChainPanelNative).Assert(); -#endif } // Get the underlying ID3D12Device in use diff --git a/src/ComputeSharp.UI/IFrameRequestQueue.cs b/src/ComputeSharp.WinUI/IFrameRequestQueue.cs similarity index 97% rename from src/ComputeSharp.UI/IFrameRequestQueue.cs rename to src/ComputeSharp.WinUI/IFrameRequestQueue.cs index 59d0ebd6..416debd6 100644 --- a/src/ComputeSharp.UI/IFrameRequestQueue.cs +++ b/src/ComputeSharp.WinUI/IFrameRequestQueue.cs @@ -1,10 +1,6 @@ using System.Threading; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// An interface for a shader runner to be used with . diff --git a/src/ComputeSharp.UI/IShaderRunner.cs b/src/ComputeSharp.WinUI/IShaderRunner.cs similarity index 94% rename from src/ComputeSharp.UI/IShaderRunner.cs rename to src/ComputeSharp.WinUI/IShaderRunner.cs index 23e7d337..95cab2c7 100644 --- a/src/ComputeSharp.UI/IShaderRunner.cs +++ b/src/ComputeSharp.WinUI/IShaderRunner.cs @@ -1,10 +1,6 @@ using System; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// An interface for a shader runner to be used with or . diff --git a/src/ComputeSharp.UI/ShaderRunner{T}.cs b/src/ComputeSharp.WinUI/ShaderRunner{T}.cs similarity index 97% rename from src/ComputeSharp.UI/ShaderRunner{T}.cs rename to src/ComputeSharp.WinUI/ShaderRunner{T}.cs index 8b355863..7ed4ce51 100644 --- a/src/ComputeSharp.UI/ShaderRunner{T}.cs +++ b/src/ComputeSharp.WinUI/ShaderRunner{T}.cs @@ -1,10 +1,6 @@ using System; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// A simple implementation powered by a supplied shader type. diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index a5d08ede..121ff07d 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -8,7 +8,6 @@ - diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 19fabcad..00d7ce1c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -13,9 +13,6 @@ - - - @@ -28,9 +25,6 @@ - - - @@ -38,7 +32,6 @@ $(PackageTags) d2d d2d1 direct2d pixel - $(PackageTags) uwp winui $(PackageTags) winui winui3 wasdk diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index a1986002..c605755e 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -69,10 +69,10 @@ - - + - + <_Parameter1>false diff --git a/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems b/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems index cfa82c7b..60f2591b 100644 --- a/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems +++ b/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems @@ -75,7 +75,5 @@ - - \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows.D2D1/WinRT/winrt/roapi/WinRT.cs b/src/TerraFX.Interop.Windows.D2D1/WinRT/winrt/roapi/WinRT.cs deleted file mode 100644 index 0e955b67..00000000 --- a/src/TerraFX.Interop.Windows.D2D1/WinRT/winrt/roapi/WinRT.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/roapi.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.WinRT; - -internal static unsafe partial class WinRT -{ - [DllImport("combase", ExactSpelling = true)] - public static extern HRESULT RoGetActivationFactory(HSTRING activatableClassId, [NativeTypeName("const IID &")] Guid* iid, void** factory); -} \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows.D2D1/WinRT/winrt/winstring/WinRT.cs b/src/TerraFX.Interop.Windows.D2D1/WinRT/winrt/winstring/WinRT.cs deleted file mode 100644 index ef4c8562..00000000 --- a/src/TerraFX.Interop.Windows.D2D1/WinRT/winrt/winstring/WinRT.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from winrt/winstring.h in the Windows SDK for Windows 10.0.22621.0 -// Original source is Copyright © Microsoft. All rights reserved. - -using System.Runtime.InteropServices; -using TerraFX.Interop.Windows; - -namespace TerraFX.Interop.WinRT; - -internal static unsafe partial class WinRT -{ - [DllImport("combase", ExactSpelling = true)] - public static extern HRESULT WindowsCreateStringReference([NativeTypeName("PCWSTR")] ushort* sourceString, [NativeTypeName("UINT32")] uint length, HSTRING_HEADER* hstringHeader, HSTRING* @string); -} \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.UI.Tests/ComputeSharp.D2D1.UI.Tests.projitems b/tests/ComputeSharp.D2D1.UI.Tests/ComputeSharp.D2D1.UI.Tests.projitems deleted file mode 100644 index 826aaefe..00000000 --- a/tests/ComputeSharp.D2D1.UI.Tests/ComputeSharp.D2D1.UI.Tests.projitems +++ /dev/null @@ -1,18 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - 346aeb10-a4ea-427e-8578-f60915db3053 - - - ComputeSharp.D2D1.UI.Tests - - - - - - - - - \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.UI.Tests/ComputeSharp.D2D1.UI.Tests.shproj b/tests/ComputeSharp.D2D1.UI.Tests/ComputeSharp.D2D1.UI.Tests.shproj deleted file mode 100644 index 9abf6f55..00000000 --- a/tests/ComputeSharp.D2D1.UI.Tests/ComputeSharp.D2D1.UI.Tests.shproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - 346aeb10-a4ea-427e-8578-f60915db3053 - 14.0 - - - - - - - - diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml b/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml deleted file mode 100644 index 606340e6..00000000 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml.cs b/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml.cs deleted file mode 100644 index 0f6c05d2..00000000 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/App.xaml.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Windows.ApplicationModel.Activation; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; - -namespace ComputeSharp.D2D1.Uwp.Tests; - -/// -/// Provides application-specific behavior to supplement the default Application class. -/// -public sealed partial class App : Application -{ - /// - /// Creates a new instance. - /// - public App() - { - InitializeComponent(); - } - - /// - protected override void OnLaunched(LaunchActivatedEventArgs e) - { - Window.Current.Content ??= new Frame(); - - Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI(); - - Window.Current.Activate(); - - Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(e.Arguments); - } -} \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/LockScreenLogo.scale-200.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57ad..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/SplashScreen.scale-200.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1f..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square150x150Logo.scale-200.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square44x44Logo.scale-200.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2e..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce9..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/StoreLogo.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/StoreLogo.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Wide310x150Logo.scale-200.png b/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b3..00000000 Binary files a/tests/ComputeSharp.D2D1.Uwp.Tests/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj b/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj deleted file mode 100644 index 128b0d96..00000000 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/ComputeSharp.D2D1.Uwp.Tests.csproj +++ /dev/null @@ -1,157 +0,0 @@ - - - - - Debug - x64 - {4D4BB2F6-5653-4DB5-A8DD-90D58D8FE4D3} - AppContainerExe - Properties - ComputeSharp.D2D1.Uwp.Tests - ComputeSharp.D2D1.Uwp.Tests - en-US - UAP - 10.0.22621.0 - 10.0.17763.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - $(VisualStudioVersion) - false - true - - - true - bin\ARM64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - $(NoWarn);2008 - full - ARM64 - false - prompt - true - true - - - bin\ARM64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - $(NoWarn);2008 - pdbonly - ARM64 - false - prompt - true - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - $(NoWarn);2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - $(NoWarn);2008 - pdbonly - x64 - false - prompt - true - true - - - PackageReference - - - - - - - - App.xaml - - - - - MSBuild:Compile - Designer - - - - - Designer - - - - - 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 - - - - - - - - - - - - - 6.2.14 - - - 3.0.4 - - - 3.0.4 - - - - - - - - - - - - - - - 14.0 - - - \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest b/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest deleted file mode 100644 index 5ffa2d0e..00000000 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/Package.appxmanifest +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - ComputeSharp.D2D1.Uwp.Tests - sergiopedri - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Properties/AssemblyInfo.cs b/tests/ComputeSharp.D2D1.Uwp.Tests/Properties/AssemblyInfo.cs deleted file mode 100644 index b5d4d1be..00000000 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("ComputeSharp.D2D1.Uwp.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ComputeSharp.D2D1.Uwp.Tests")] -[assembly: AssemblyCopyright("Copyright © 2023")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: AssemblyMetadata("TargetPlatform", "UAP")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.Uwp.Tests/Properties/Default.rd.xml b/tests/ComputeSharp.D2D1.Uwp.Tests/Properties/Default.rd.xml deleted file mode 100644 index 922d306f..00000000 --- a/tests/ComputeSharp.D2D1.Uwp.Tests/Properties/Default.rd.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - \ No newline at end of file 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 337f2a91..0920ed31 100644 --- a/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/ComputeSharp.D2D1.WinUI.Tests.csproj @@ -95,7 +95,5 @@ true - - diff --git a/tests/ComputeSharp.D2D1.UI.Tests/Helpers/TolerantImageComparer.cs b/tests/ComputeSharp.D2D1.WinUI.Tests/Helpers/TolerantImageComparer.cs similarity index 98% rename from tests/ComputeSharp.D2D1.UI.Tests/Helpers/TolerantImageComparer.cs rename to tests/ComputeSharp.D2D1.WinUI.Tests/Helpers/TolerantImageComparer.cs index 60cb3c99..8017b876 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/Helpers/TolerantImageComparer.cs +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Helpers/TolerantImageComparer.cs @@ -7,7 +7,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.Graphics.Canvas; using Color = Windows.UI.Color; -namespace ComputeSharp.D2D1.UI.Tests.Helpers; +namespace ComputeSharp.D2D1.WinUI.Tests.Helpers; /// /// An tolerant image comparer type, inspired from ImageSharp. diff --git a/tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs b/tests/ComputeSharp.D2D1.WinUI.Tests/Helpers/Win2DHelper.cs similarity index 86% rename from tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs rename to tests/ComputeSharp.D2D1.WinUI.Tests/Helpers/Win2DHelper.cs index caf3de5e..e4b3e30a 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/Helpers/Win2DHelper.cs +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Helpers/Win2DHelper.cs @@ -1,19 +1,12 @@ 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 - -namespace ComputeSharp.D2D1.UI.Tests.Helpers; +namespace ComputeSharp.D2D1.WinUI.Tests.Helpers; /// /// A helper type to marshal managed objects in unit tests. @@ -30,15 +23,9 @@ internal static class Win2DHelper { 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; @@ -53,11 +40,7 @@ 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; @@ -83,11 +66,7 @@ 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 } /// @@ -100,11 +79,7 @@ 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; @@ -117,11 +92,7 @@ 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; @@ -145,7 +116,6 @@ internal static class Win2DHelper Marshal.ThrowExceptionForHR(hresult); } -#if !WINDOWS_UWP /// /// The managed interface for . /// @@ -166,5 +136,4 @@ internal static class Win2DHelper public static readonly IntPtr AbiToProjectionVftablePtr = IUnknownVftbl.AbiToProjectionVftblPtr; } } -#endif } \ No newline at end of file diff --git a/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs b/tests/ComputeSharp.D2D1.WinUI.Tests/Tests/CanvasEffectTests.cs similarity index 99% rename from tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs rename to tests/ComputeSharp.D2D1.WinUI.Tests/Tests/CanvasEffectTests.cs index 82f2bb65..8f549f15 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/CanvasEffectTests.cs +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Tests/CanvasEffectTests.cs @@ -3,12 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Numerics; 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.D2D1.WinUI.Tests.Helpers; using ComputeSharp.SwapChain.Shaders.D2D1; using Microsoft.Graphics.Canvas; using Microsoft.Graphics.Canvas.Effects; @@ -18,9 +13,7 @@ using Windows.Foundation; using Windows.Storage; using Windows.UI; -#nullable enable - -namespace ComputeSharp.D2D1.UI.Tests; +namespace ComputeSharp.D2D1.WinUI.Tests; [TestClass] [TestCategory("CanvasEffect")] diff --git a/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs b/tests/ComputeSharp.D2D1.WinUI.Tests/Tests/PixelShaderEffectTests.cs similarity index 99% rename from tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs rename to tests/ComputeSharp.D2D1.WinUI.Tests/Tests/PixelShaderEffectTests.cs index ba221a16..f44b0b74 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/PixelShaderEffectTests.cs +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Tests/PixelShaderEffectTests.cs @@ -2,18 +2,13 @@ using System; 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 ComputeSharp.D2D1.WinUI.Tests.Helpers; using Microsoft.Graphics.Canvas; using Microsoft.VisualStudio.TestTools.UnitTesting; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; -namespace ComputeSharp.D2D1.UI.Tests; +namespace ComputeSharp.D2D1.WinUI.Tests; [TestClass] [TestCategory("PixelShaderEffect")] diff --git a/tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs b/tests/ComputeSharp.D2D1.WinUI.Tests/Tests/ShadersTests.cs similarity index 96% rename from tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs rename to tests/ComputeSharp.D2D1.WinUI.Tests/Tests/ShadersTests.cs index bcc474da..f88d6311 100644 --- a/tests/ComputeSharp.D2D1.UI.Tests/ShadersTests.cs +++ b/tests/ComputeSharp.D2D1.WinUI.Tests/Tests/ShadersTests.cs @@ -3,21 +3,14 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading.Tasks; using ComputeSharp.D2D1.Descriptors; -using ComputeSharp.D2D1.UI.Tests.Helpers; -#if WINDOWS_UWP -using ComputeSharp.D2D1.Uwp; -#else -using ComputeSharp.D2D1.WinUI; -#endif +using ComputeSharp.D2D1.WinUI.Tests.Helpers; using ComputeSharp.SwapChain.Shaders.D2D1; using Microsoft.Graphics.Canvas; using Microsoft.VisualStudio.TestTools.UnitTesting; using Windows.Storage; using Windows.UI; -#nullable enable - -namespace ComputeSharp.D2D1.UI.Tests; +namespace ComputeSharp.D2D1.WinUI.Tests; [TestClass] [TestCategory("Shaders")] diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 654a3725..cf9c02d4 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -18,9 +18,6 @@ $(NoWarn);IDE0065 - - $(NoWarn);IDE0240 - $(NoWarn);IDE0251