From e4f4e53f2c421b6c3b4f7ef47e71fb4a5e41bc9c Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 6 Mar 2024 14:23:06 -0800 Subject: [PATCH] more tests on D3D11 --- CopyTexture/CopyTextureGame.cs | 1 + RenderTexture2DArray/RenderTexture2DArrayGame.cs | 2 +- RenderTextureCube/RenderTextureCubeGame.cs | 2 +- RenderTextureMipmaps/RenderTextureMipmapsGame.cs | 2 +- StoreLoad/StoreLoadGame.cs | 2 +- Texture3D/Texture3DGame.cs | 2 +- Texture3DCopy/Texture3DCopy.cs | 2 +- TextureMipmaps/TextureMipmapsGame.cs | 2 +- TexturedAnimatedQuad/TexturedAnimatedQuadGame.cs | 2 +- TexturedQuad/TexturedQuadGame.cs | 2 +- TriangleVertexBuffer/TriangleVertexBufferGame.cs | 2 +- VertexSampler/VertexSamplerGame.cs | 2 +- VideoPlayer/VideoPlayerGame.cs | 2 +- 13 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CopyTexture/CopyTextureGame.cs b/CopyTexture/CopyTextureGame.cs index 6bc89f9..79dfb46 100644 --- a/CopyTexture/CopyTextureGame.cs +++ b/CopyTexture/CopyTextureGame.cs @@ -146,6 +146,7 @@ namespace MoonWorks.Test } RefreshCS.Refresh.Refresh_Image_Free(pixels); + NativeMemory.Free(copiedBytes); } protected override void Update(System.TimeSpan delta) { } diff --git a/RenderTexture2DArray/RenderTexture2DArrayGame.cs b/RenderTexture2DArray/RenderTexture2DArrayGame.cs index aff33cd..687111b 100644 --- a/RenderTexture2DArray/RenderTexture2DArrayGame.cs +++ b/RenderTexture2DArray/RenderTexture2DArrayGame.cs @@ -30,7 +30,7 @@ namespace MoonWorks.Test } } - public RenderTexture2DArrayGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public RenderTexture2DArrayGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuad.vert")); diff --git a/RenderTextureCube/RenderTextureCubeGame.cs b/RenderTextureCube/RenderTextureCubeGame.cs index df341a1..d487859 100644 --- a/RenderTextureCube/RenderTextureCubeGame.cs +++ b/RenderTextureCube/RenderTextureCubeGame.cs @@ -25,7 +25,7 @@ namespace MoonWorks.Test Color.Purple, }; - public RenderTextureCubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public RenderTextureCubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { Logger.LogInfo("Press Down to view the other side of the cubemap"); diff --git a/RenderTextureMipmaps/RenderTextureMipmapsGame.cs b/RenderTextureMipmaps/RenderTextureMipmapsGame.cs index 43a0f51..856f070 100644 --- a/RenderTextureMipmaps/RenderTextureMipmapsGame.cs +++ b/RenderTextureMipmaps/RenderTextureMipmapsGame.cs @@ -41,7 +41,7 @@ namespace MoonWorks.Test } } - public RenderTextureMipmapsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public RenderTextureMipmapsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { Logger.LogInfo("Press Left and Right to shrink/expand the scale of the quad"); Logger.LogInfo("Press Down to cycle through sampler states"); diff --git a/StoreLoad/StoreLoadGame.cs b/StoreLoad/StoreLoadGame.cs index 1ceea8f..d1e38e8 100644 --- a/StoreLoad/StoreLoadGame.cs +++ b/StoreLoad/StoreLoadGame.cs @@ -7,7 +7,7 @@ namespace MoonWorks.Test { private GraphicsPipeline fillPipeline; - public StoreLoadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public StoreLoadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("RawTriangle.vert")); ShaderModule fragShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("SolidColor.frag")); diff --git a/Texture3D/Texture3DGame.cs b/Texture3D/Texture3DGame.cs index e45cc38..374a2b7 100644 --- a/Texture3D/Texture3DGame.cs +++ b/Texture3D/Texture3DGame.cs @@ -23,7 +23,7 @@ namespace MoonWorks.Test } } - public Texture3DGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public Texture3DGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { Logger.LogInfo("Press Left and Right to cycle between depth slices"); diff --git a/Texture3DCopy/Texture3DCopy.cs b/Texture3DCopy/Texture3DCopy.cs index 2683d76..9bb7a46 100644 --- a/Texture3DCopy/Texture3DCopy.cs +++ b/Texture3DCopy/Texture3DCopy.cs @@ -30,7 +30,7 @@ namespace MoonWorks.Test } } - public RenderTexture3DGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public RenderTexture3DGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuad.vert")); diff --git a/TextureMipmaps/TextureMipmapsGame.cs b/TextureMipmaps/TextureMipmapsGame.cs index f699726..8bed4ab 100644 --- a/TextureMipmaps/TextureMipmapsGame.cs +++ b/TextureMipmaps/TextureMipmapsGame.cs @@ -13,7 +13,7 @@ namespace MoonWorks.Test private float scale = 0.5f; - public TextureMipmapsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public TextureMipmapsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { Logger.LogInfo("Press Left and Right to shrink/expand the scale of the quad"); diff --git a/TexturedAnimatedQuad/TexturedAnimatedQuadGame.cs b/TexturedAnimatedQuad/TexturedAnimatedQuadGame.cs index 8d0a729..7e1dfdf 100644 --- a/TexturedAnimatedQuad/TexturedAnimatedQuadGame.cs +++ b/TexturedAnimatedQuad/TexturedAnimatedQuadGame.cs @@ -25,7 +25,7 @@ namespace MoonWorks.Test } } - public TexturedAnimatedQuadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public TexturedAnimatedQuadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuadWithMatrix.vert")); diff --git a/TexturedQuad/TexturedQuadGame.cs b/TexturedQuad/TexturedQuadGame.cs index 820d587..b34eeba 100644 --- a/TexturedQuad/TexturedQuadGame.cs +++ b/TexturedQuad/TexturedQuadGame.cs @@ -35,7 +35,7 @@ namespace MoonWorks.Test private System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); - public TexturedQuadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public TexturedQuadGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { Logger.LogInfo("Press Left and Right to cycle between sampler states"); Logger.LogInfo("Setting sampler state to: " + samplerNames[0]); diff --git a/TriangleVertexBuffer/TriangleVertexBufferGame.cs b/TriangleVertexBuffer/TriangleVertexBufferGame.cs index 58671e0..c2b5b85 100644 --- a/TriangleVertexBuffer/TriangleVertexBufferGame.cs +++ b/TriangleVertexBuffer/TriangleVertexBufferGame.cs @@ -9,7 +9,7 @@ namespace MoonWorks.Test private GraphicsPipeline pipeline; private GpuBuffer vertexBuffer; - public TriangleVertexBufferGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public TriangleVertexBufferGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionColor.vert")); diff --git a/VertexSampler/VertexSamplerGame.cs b/VertexSampler/VertexSamplerGame.cs index cc2572b..7415a0d 100644 --- a/VertexSampler/VertexSamplerGame.cs +++ b/VertexSampler/VertexSamplerGame.cs @@ -12,7 +12,7 @@ namespace MoonWorks.Test private Texture texture; private Sampler sampler; - public VertexSamplerGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public VertexSamplerGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("PositionSampler.vert")); diff --git a/VideoPlayer/VideoPlayerGame.cs b/VideoPlayer/VideoPlayerGame.cs index 589b5d7..957dbcb 100644 --- a/VideoPlayer/VideoPlayerGame.cs +++ b/VideoPlayer/VideoPlayerGame.cs @@ -14,7 +14,7 @@ namespace MoonWorks.Test private Video.VideoAV1 video; private VideoPlayer videoPlayer; - public VideoPlayerGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public VideoPlayerGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuad.vert"));