From 43cd8f0182202143881689bc3dbf72c9690dbe59 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Thu, 7 Mar 2024 10:35:12 -0800 Subject: [PATCH] change backend selection behavior --- BasicCompute/BasicComputeGame.cs | 2 +- BasicStencil/BasicStencilGame.cs | 2 +- BasicTriangle/BasicTriangleGame.cs | 2 +- ClearScreen/ClearScreenGame.cs | 2 +- .../ClearScreen_MultiWindowGame.cs | 2 +- CompressedTextures/CompressedTexturesGame.cs | 2 +- ComputeUniforms/ComputeUniformsGame.cs | 2 +- CopyTexture/CopyTextureGame.cs | 2 +- Cube/CubeGame.cs | 2 +- CullFace/CullFaceGame.cs | 2 +- DepthMSAA/DepthMSAAGame.cs | 2 +- DrawIndirect/DrawIndirectGame.cs | 2 +- GetBufferData/GetBufferDataGame.cs | 2 +- .../InstancingAndOffsetsGame.cs | 2 +- MSAA/MSAAGame.cs | 2 +- MSAACube/MSAACubeGame.cs | 2 +- .../Compiled/CalculateSquares.comp.refresh | Bin 1417 -> 1417 bytes .../Shaders/Compiled/FillTexture.comp.refresh | Bin 1432 -> 1432 bytes .../Compiled/GradientTexture.comp.refresh | Bin 2331 -> 2331 bytes .../Compiled/PositionColor.vert.refresh | Bin 1808 -> 1808 bytes .../PositionColorInstanced.vert.refresh | Bin 2786 -> 2786 bytes .../PositionColorWithMatrix.vert.refresh | Bin 2240 -> 2240 bytes .../Compiled/PositionSampler.vert.refresh | Bin 2168 -> 2168 bytes .../Shaders/Compiled/RawTriangle.vert.refresh | Bin 2764 -> 2764 bytes .../Shaders/Compiled/Skybox.frag.refresh | Bin 1280 -> 1280 bytes .../Shaders/Compiled/Skybox.vert.refresh | Bin 2037 -> 2037 bytes .../Shaders/Compiled/SolidColor.frag.refresh | Bin 921 -> 921 bytes .../Compiled/TexturedDepthQuad.frag.refresh | Bin 2634 -> 2634 bytes .../Compiled/TexturedQuad.frag.refresh | Bin 1246 -> 1246 bytes .../Compiled/TexturedQuad.vert.refresh | Bin 1874 -> 1874 bytes .../Compiled/TexturedQuad2DArray.frag.refresh | Bin 1683 -> 1683 bytes .../Compiled/TexturedQuad3D.frag.refresh | Bin 1678 -> 1678 bytes .../TexturedQuadWithMatrix.vert.refresh | Bin 2306 -> 2306 bytes ...TexturedQuadWithMultiplyColor.frag.refresh | Bin 1636 -> 1636 bytes MoonWorks.Test.Common/TestUtils.cs | 3 ++- RenderTexture2D/RenderTexture2DGame.cs | 2 +- .../RenderTexture2DArrayGame.cs | 2 +- RenderTextureCube/RenderTextureCubeGame.cs | 2 +- .../RenderTextureMipmapsGame.cs | 2 +- StoreLoad/StoreLoadGame.cs | 2 +- Texture3D/Texture3DGame.cs | 2 +- Texture3DCopy/Texture3DCopy.cs | 2 +- TextureMipmaps/TextureMipmapsGame.cs | 2 +- .../TexturedAnimatedQuadGame.cs | 2 +- TexturedQuad/TexturedQuadGame.cs | 2 +- .../TriangleVertexBufferGame.cs | 2 +- VertexSampler/VertexSamplerGame.cs | 2 +- VideoPlayer/VideoPlayerGame.cs | 2 +- WindowResizing/WindowResizingGame.cs | 2 +- 49 files changed, 32 insertions(+), 31 deletions(-) diff --git a/BasicCompute/BasicComputeGame.cs b/BasicCompute/BasicComputeGame.cs index a87a06d..284a294 100644 --- a/BasicCompute/BasicComputeGame.cs +++ b/BasicCompute/BasicComputeGame.cs @@ -11,7 +11,7 @@ namespace MoonWorks.Test private Sampler sampler; private GpuBuffer vertexBuffer; - public BasicComputeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public BasicComputeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { // Create the compute pipeline that writes texture data ShaderModule fillTextureComputeShaderModule = new ShaderModule( diff --git a/BasicStencil/BasicStencilGame.cs b/BasicStencil/BasicStencilGame.cs index 2266d37..ad6001b 100644 --- a/BasicStencil/BasicStencilGame.cs +++ b/BasicStencil/BasicStencilGame.cs @@ -11,7 +11,7 @@ namespace MoonWorks.Test private GpuBuffer vertexBuffer; private Texture depthStencilTexture; - public BasicStencilGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public BasicStencilGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColor.vert")); diff --git a/BasicTriangle/BasicTriangleGame.cs b/BasicTriangle/BasicTriangleGame.cs index 6bce225..c07f88c 100644 --- a/BasicTriangle/BasicTriangleGame.cs +++ b/BasicTriangle/BasicTriangleGame.cs @@ -14,7 +14,7 @@ namespace MoonWorks.Test private bool useSmallViewport; private bool useScissorRect; - public BasicTriangleGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public BasicTriangleGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Left to toggle wireframe mode\nPress Down to toggle small viewport\nPress Right to toggle scissor rect"); diff --git a/ClearScreen/ClearScreenGame.cs b/ClearScreen/ClearScreenGame.cs index 196b014..b190e58 100644 --- a/ClearScreen/ClearScreenGame.cs +++ b/ClearScreen/ClearScreenGame.cs @@ -5,7 +5,7 @@ namespace MoonWorks.Test { class ClearScreenGame : Game { - public ClearScreenGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) { } + public ClearScreenGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { } protected override void Update(System.TimeSpan delta) { } diff --git a/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs b/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs index 7ffa4c1..073db66 100644 --- a/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs +++ b/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs @@ -7,7 +7,7 @@ namespace MoonWorks.Test { private Window secondaryWindow; - public ClearScreen_MultiWindowGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public ClearScreen_MultiWindowGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { var (windowX, windowY) = MainWindow.Position; MainWindow.SetPosition(windowX - 360, windowY); diff --git a/CompressedTextures/CompressedTexturesGame.cs b/CompressedTextures/CompressedTexturesGame.cs index 2edef00..3a3a4c8 100644 --- a/CompressedTextures/CompressedTexturesGame.cs +++ b/CompressedTextures/CompressedTexturesGame.cs @@ -21,7 +21,7 @@ namespace MoonWorks.Test private int currentTextureIndex; - public CompressedTexturesGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public CompressedTexturesGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Left and Right to cycle between textures"); Logger.LogInfo("Setting texture to: " + textureNames[0]); diff --git a/ComputeUniforms/ComputeUniformsGame.cs b/ComputeUniforms/ComputeUniformsGame.cs index 50260e4..58d47f8 100644 --- a/ComputeUniforms/ComputeUniformsGame.cs +++ b/ComputeUniforms/ComputeUniformsGame.cs @@ -23,7 +23,7 @@ namespace MoonWorks.Test } } - public ComputeUniformsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public ComputeUniformsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { // Create the compute pipeline that writes texture data ShaderModule gradientTextureComputeShaderModule = new ShaderModule( diff --git a/CopyTexture/CopyTextureGame.cs b/CopyTexture/CopyTextureGame.cs index d7da91e..80a8214 100644 --- a/CopyTexture/CopyTextureGame.cs +++ b/CopyTexture/CopyTextureGame.cs @@ -14,7 +14,7 @@ namespace MoonWorks.Test private Texture textureSmallCopy; private Sampler sampler; - public unsafe CopyTextureGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public unsafe CopyTextureGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuad.vert")); diff --git a/Cube/CubeGame.cs b/Cube/CubeGame.cs index 9736bf1..7ee5136 100644 --- a/Cube/CubeGame.cs +++ b/Cube/CubeGame.cs @@ -88,7 +88,7 @@ namespace MoonWorks.Test cubemapUploader.Dispose(); } - public CubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public CubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { ShaderModule cubeVertShaderModule = new ShaderModule( GraphicsDevice, diff --git a/CullFace/CullFaceGame.cs b/CullFace/CullFaceGame.cs index f4f4465..1e98cb1 100644 --- a/CullFace/CullFaceGame.cs +++ b/CullFace/CullFaceGame.cs @@ -17,7 +17,7 @@ namespace MoonWorks.Test private bool useClockwiseWinding; - public CullFaceGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public CullFaceGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Down to toggle the winding order of the triangles (default is counter-clockwise)"); diff --git a/DepthMSAA/DepthMSAAGame.cs b/DepthMSAA/DepthMSAAGame.cs index f0b1a30..916c989 100644 --- a/DepthMSAA/DepthMSAAGame.cs +++ b/DepthMSAA/DepthMSAAGame.cs @@ -21,7 +21,7 @@ namespace MoonWorks.Test private SampleCount currentSampleCount = SampleCount.Four; - public DepthMSAAGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public DepthMSAAGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Left and Right to cycle between sample counts"); Logger.LogInfo("Setting sample count to: " + currentSampleCount); diff --git a/DrawIndirect/DrawIndirectGame.cs b/DrawIndirect/DrawIndirectGame.cs index 417d6a9..460b36d 100644 --- a/DrawIndirect/DrawIndirectGame.cs +++ b/DrawIndirect/DrawIndirectGame.cs @@ -10,7 +10,7 @@ namespace MoonWorks.Test private GpuBuffer vertexBuffer; private GpuBuffer drawBuffer; - public DrawIndirectGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public DrawIndirectGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColor.vert")); diff --git a/GetBufferData/GetBufferDataGame.cs b/GetBufferData/GetBufferDataGame.cs index 6d102ca..e55dae1 100644 --- a/GetBufferData/GetBufferDataGame.cs +++ b/GetBufferData/GetBufferDataGame.cs @@ -6,7 +6,7 @@ namespace MoonWorks.Test { class GetBufferDataGame : Game { - public GetBufferDataGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public GetBufferDataGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { var vertices = new System.Span( [ diff --git a/InstancingAndOffsets/InstancingAndOffsetsGame.cs b/InstancingAndOffsets/InstancingAndOffsetsGame.cs index 5ee66e1..a67ae95 100644 --- a/InstancingAndOffsets/InstancingAndOffsetsGame.cs +++ b/InstancingAndOffsets/InstancingAndOffsetsGame.cs @@ -13,7 +13,7 @@ namespace MoonWorks.Test private bool useVertexOffset; private bool useIndexOffset; - public InstancingAndOffsetsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public InstancingAndOffsetsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Left to toggle vertex offset\nPress Right to toggle index offset"); diff --git a/MSAA/MSAAGame.cs b/MSAA/MSAAGame.cs index a56706d..290c6ff 100644 --- a/MSAA/MSAAGame.cs +++ b/MSAA/MSAAGame.cs @@ -16,7 +16,7 @@ namespace MoonWorks.Test private SampleCount currentSampleCount = SampleCount.Four; - public MSAAGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public MSAAGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Left and Right to cycle between sample counts"); Logger.LogInfo("Setting sample count to: " + currentSampleCount); diff --git a/MSAACube/MSAACubeGame.cs b/MSAACube/MSAACubeGame.cs index 649a4de..65cea82 100644 --- a/MSAACube/MSAACubeGame.cs +++ b/MSAACube/MSAACubeGame.cs @@ -20,7 +20,7 @@ namespace MoonWorks.Test private SampleCount currentSampleCount = SampleCount.Four; - public MSAACubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.Backend, 60, true) + public MSAACubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.PreferredBackends, 60, true) { Logger.LogInfo("Press Down to view the other side of the cubemap"); Logger.LogInfo("Press Left and Right to cycle between sample counts"); diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/CalculateSquares.comp.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/CalculateSquares.comp.refresh index 14da96dbf355d9d433d1f4b2189d89f6ab464995..651c75affd3bf4c99dce4d408733dacf5a0bed10 100644 GIT binary patch delta 25 fcmeC=?&RhSatrogVgQ1ToHLji88Ua@H_2GHz~T7GeSbN8|+% delta 25 gcmbQiJ%gJw$Sv4|iGhKEaU*99Gb7XHHfA9v07v!(5&!@I diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/GradientTexture.comp.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/GradientTexture.comp.refresh index 45bc4888b13cb7777dc881da6da784c050d38786..8fb770389a0d18c85c1c499f7ed89509bfb2d3cf 100644 GIT binary patch delta 25 fcmbO&G+T%>$Sv4|i2(>Uatg39GH#Y)V`K&ZL^=dQ delta 25 gcmbO&G+T%>$Sv4|iGhKEaU-Vy8za+ZDKgctDUd$Sv4|0R%R3dayDwZVqD2V+H_Dg9T#% delta 25 fcmX>gctDUd$Sv4|0SFj3a(b{bGHniG&0_`tPL%~^ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionSampler.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionSampler.vert.refresh index 1bd26729c88ae5d4ddadad6d272fcc5cdc2e95fb..2e5a0cb660f758a585edd9f2c682574079c3cf31 100644 GIT binary patch delta 25 ecmew%@I!zz$Sv4|0R%R3eqdo_-298Bju`-9atAK} delta 25 fcmew%@I!zz$Sv4|0SFj3a(-Z8WZL|TrH&Z@VT1=U diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/RawTriangle.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/RawTriangle.vert.refresh index 3eda99c606ccce63d1adcd57dc6774f44dcb9285..1d63c88b20898dd61b1a59afc8fc40472723a813 100644 GIT binary patch delta 25 ecmX>jdPbBp$Sv4|0R%R3s<1IKZq{R)#{vLQ69sMn delta 25 fcmX>jdPbBp$Sv4|0SFj3a;mT~GHuplo5unGP$dO$ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.frag.refresh index 8be0b5d75dc450c7f089468baecdba98ec198f0d..2c3754fd7998049d39a4d65ca09d90592591be04 100644 GIT binary patch delta 25 ecmZqRYT)7watrogWB`JVoGna@jGOzIikJXILj_9! delta 25 gcmZqRYT)7watrogWME)m+{oF&#K^R{kEw_W07O*)2Y+6AWo diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/SolidColor.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/SolidColor.frag.refresh index 2a62f1dea9084bf48b7ee8e477ce2b45bc3fbeec..764fd5b0f8038d680bb328ce5395cbd472fcae27 100644 GIT binary patch delta 25 fcmbQqK9ij@$Sv4|kpT!cavou1WZZm?@iZdla!Q0V$Sv4|kpT!ca+a_$GH$M8JHreBQ~(Ax delta 25 gcmX>la!Q0V$Sv4|k%57MaU*958za-^I<_;+08|nNH~;_u diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.frag.refresh index a1a3e0fcc0facbf19637e0fd3788166552f26624..f3ba937ed2d897e987efa686b4790ea3b9261f3f 100644 GIT binary patch delta 25 fcmcb|d5@Db$Sv4|kpT!ca@H_0GHz~TieLf&RT%}_ delta 25 gcmcb|d5@Db$Sv4|k%57MaU*996C=~+Hl_$B097jm-2eap diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.vert.refresh index 4729e32255b1695cac6ebe3e65f435d704fe5780..aa9f2967e97698750684ad81279b2c5f1088f1ab 100644 GIT binary patch delta 25 ecmcb_cZrWP$Sv4|0R%R3y09=ZZuVngVFmzDMgI diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad2DArray.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad2DArray.frag.refresh index df4b41c6650a4f6fdaa85efc3077c102cf5d72b9..a8aac42494bc6999f223872744e4d44a5a8a7c24 100644 GIT binary patch delta 25 fcmbQtJDHa=$Sv4|kpT!cavou3WZZm?`6v?rOil(& delta 25 hcmbQtJDHa=$Sv4|k%57MaU9u delta 25 gcmeCp$Sv4|kpT!ca!z1oWZXQ9`4kfXShfa< delta 25 hcmaFD^Mr>p$Sv4|k%57MaU