diff --git a/BasicCompute/BasicComputeGame.cs b/BasicCompute/BasicComputeGame.cs index 88c9e31..813310b 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(), 60, true) + public BasicComputeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Create the compute pipeline that writes texture data ShaderModule fillTextureComputeShaderModule = new ShaderModule( @@ -115,15 +115,12 @@ namespace MoonWorks.Test cmdbuf.EndComputePass(); - cmdbuf.BeginCopyPass(); - cmdbuf.DownloadFromBuffer(squaresBuffer, transferBuffer, TransferOptions.Overwrite); - cmdbuf.EndCopyPass(); - var fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); GraphicsDevice.WaitForFences(fence); GraphicsDevice.ReleaseFence(fence); // Print the squares! + GraphicsDevice.DownloadFromBuffer(squaresBuffer, transferBuffer, TransferOptions.Overwrite); transferBuffer.GetData(squares, 0); Logger.LogInfo("Squares of the first " + squares.Length + " integers: " + string.Join(", ", squares)); } diff --git a/BasicStencil/BasicStencilGame.cs b/BasicStencil/BasicStencilGame.cs index 9a635e7..0593e22 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(), 60, true) + public BasicStencilGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 490d1f6..bdf67a9 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(), 60, true) + public BasicTriangleGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 811a923..4982ffb 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(), 60, true) { } + public ClearScreenGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { } protected override void Update(System.TimeSpan delta) { } diff --git a/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs b/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs index b41d901..51036f5 100644 --- a/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs +++ b/ClearScreen_MultiWindow/ClearScreen_MultiWindowGame.cs @@ -7,12 +7,17 @@ namespace MoonWorks.Test { private Window secondaryWindow; - public ClearScreen_MultiWindowGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public ClearScreen_MultiWindowGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { + var (windowX, windowY) = MainWindow.Position; + MainWindow.SetPosition(windowX - 360, windowY); + secondaryWindow = new Window( new WindowCreateInfo("Secondary Window", 640, 480, ScreenMode.Windowed, PresentMode.FIFO, false, false), GraphicsDevice.WindowFlags ); + (windowX, windowY) = secondaryWindow.Position; + secondaryWindow.SetPosition(windowX + 360, windowY); GraphicsDevice.ClaimWindow(secondaryWindow, PresentMode.FIFO); } diff --git a/CompressedTextures/CompressedTexturesGame.cs b/CompressedTextures/CompressedTexturesGame.cs index c9234d9..8a37c89 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(), 60, true) + public CompressedTexturesGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 12596c2..0c25d16 100644 --- a/ComputeUniforms/ComputeUniformsGame.cs +++ b/ComputeUniforms/ComputeUniformsGame.cs @@ -23,7 +23,7 @@ namespace MoonWorks.Test } } - public ComputeUniformsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public ComputeUniformsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 2b0f602..6bc89f9 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(), 60, true) + public unsafe CopyTextureGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuad.vert")); @@ -115,22 +115,19 @@ namespace MoonWorks.Test // Render the half-size copy cmdbuf.Blit(originalTexture, textureSmallCopy, Filter.Linear, WriteOptions.SafeOverwrite); - // Copy the texture to a transfer buffer - TransferBuffer compareBuffer = new TransferBuffer(GraphicsDevice, byteCount); - - cmdbuf.BeginCopyPass(); - cmdbuf.DownloadFromTexture( - originalTexture, - compareBuffer, - new BufferImageCopy(0, 0, 0), - TransferOptions.Overwrite - ); - cmdbuf.EndCopyPass(); - var fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); GraphicsDevice.WaitForFences(fence); GraphicsDevice.ReleaseFence(fence); + // Copy the texture to a transfer buffer + TransferBuffer compareBuffer = new TransferBuffer(GraphicsDevice, byteCount); + + GraphicsDevice.DownloadFromTexture( + textureCopy, + compareBuffer, + TransferOptions.Overwrite + ); + // Compare the original bytes to the copied bytes. var copiedBytes = NativeMemory.Alloc(byteCount); var copiedSpan = new System.Span(copiedBytes, (int) byteCount); @@ -140,12 +137,12 @@ namespace MoonWorks.Test if (System.MemoryExtensions.SequenceEqual(originalSpan, copiedSpan)) { - Logger.LogError("SUCCESS! Original texture bytes and the bytes from CopyTextureToBuffer match!"); + Logger.LogError("SUCCESS! Original texture bytes and the downloaded bytes match!"); } else { - Logger.LogError("FAIL! Original texture bytes do not match bytes from CopyTextureToBuffer!"); + Logger.LogError("FAIL! Original texture bytes do not match downloaded bytes!"); } RefreshCS.Refresh.Refresh_Image_Free(pixels); diff --git a/Cube/CubeGame.cs b/Cube/CubeGame.cs index 05fa035..6dcbdad 100644 --- a/Cube/CubeGame.cs +++ b/Cube/CubeGame.cs @@ -26,6 +26,7 @@ namespace MoonWorks.Test private TransferBuffer screenshotTransferBuffer; private Texture screenshotTexture; + private Fence? screenshotFence; private Texture skyboxTexture; private Sampler skyboxSampler; @@ -38,6 +39,7 @@ namespace MoonWorks.Test private Vector3 camPos = new Vector3(0, 1.5f, 4f); private bool takeScreenshot; + private bool screenshotInProgress; private bool swapchainCopied; // don't want to take screenshot if the swapchain was invalid struct DepthUniforms @@ -86,7 +88,7 @@ namespace MoonWorks.Test cubemapUploader.Dispose(); } - public CubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public CubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { ShaderModule cubeVertShaderModule = new ShaderModule( GraphicsDevice, @@ -360,7 +362,7 @@ namespace MoonWorks.Test Logger.LogInfo("Depth-Only Mode enabled: " + depthOnlyEnabled); } - if (TestUtils.CheckButtonPressed(Inputs, TestUtils.ButtonType.Right)) + if (!screenshotInProgress && TestUtils.CheckButtonPressed(Inputs, TestUtils.ButtonType.Right)) { takeScreenshot = true; } @@ -461,32 +463,31 @@ namespace MoonWorks.Test } } - GraphicsDevice.Submit(cmdbuf); - if (takeScreenshot && swapchainCopied) { + screenshotFence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); Task.Run(TakeScreenshot); takeScreenshot = false; swapchainCopied = false; } + else + { + GraphicsDevice.Submit(cmdbuf); + } } private unsafe void TakeScreenshot() { - var commandBuffer = GraphicsDevice.AcquireCommandBuffer(); + screenshotInProgress = true; - commandBuffer.BeginCopyPass(); - commandBuffer.DownloadFromTexture( + GraphicsDevice.WaitForFences(screenshotFence); + + GraphicsDevice.DownloadFromTexture( screenshotTexture, screenshotTransferBuffer, TransferOptions.Overwrite ); - commandBuffer.EndCopyPass(); - - var fence = GraphicsDevice.SubmitAndAcquireFence(commandBuffer); - GraphicsDevice.WaitForFences(fence); - GraphicsDevice.ReleaseFence(fence); ImageUtils.SavePNG( Path.Combine(System.AppContext.BaseDirectory, "screenshot.png"), @@ -496,6 +497,11 @@ namespace MoonWorks.Test (int) screenshotTexture.Height, screenshotTexture.Format == TextureFormat.B8G8R8A8 ); + + GraphicsDevice.ReleaseFence(screenshotFence); + screenshotFence = null; + + screenshotInProgress = false; } public static void Main(string[] args) diff --git a/CullFace/CullFaceGame.cs b/CullFace/CullFaceGame.cs index bba75c2..01c6775 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(), 60, true) + public CullFaceGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 48d77fa..a9289f1 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(), 60, true) + public DepthMSAAGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 ad689f8..203d34e 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(), 60, true) + public DrawIndirectGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 ae5ef67..98bdb61 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(), 60, true) + public GetBufferDataGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { var vertices = new System.Span( [ @@ -33,24 +33,19 @@ namespace MoonWorks.Test var vertexBuffer = resourceUploader.CreateBuffer(vertices, BufferUsageFlags.Vertex); - resourceUploader.Upload(); + // Wait for the vertices to finish copying... + resourceUploader.UploadAndWait(); resourceUploader.Dispose(); var transferBuffer = new TransferBuffer(GraphicsDevice, vertexBuffer.Size); - CommandBuffer cmdbuf = GraphicsDevice.AcquireCommandBuffer(); - - cmdbuf.BeginCopyPass(); - cmdbuf.DownloadFromBuffer(vertexBuffer, transferBuffer, TransferOptions.Overwrite); - cmdbuf.EndCopyPass(); - - var fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); - - // Wait for the vertices to finish copying... - GraphicsDevice.WaitForFences(fence); - GraphicsDevice.ReleaseFence(fence); - // Read back and print out the vertex values + GraphicsDevice.DownloadFromBuffer( + vertexBuffer, + transferBuffer, + TransferOptions.Overwrite + ); + PositionVertex[] readbackVertices = new PositionVertex[vertices.Length]; transferBuffer.GetData(readbackVertices); for (int i = 0; i < readbackVertices.Length; i += 1) @@ -59,23 +54,22 @@ namespace MoonWorks.Test } // Change the first three vertices and upload - cmdbuf = GraphicsDevice.AcquireCommandBuffer(); transferBuffer.SetData(otherVerts, TransferOptions.Overwrite); + + var cmdbuf = GraphicsDevice.AcquireCommandBuffer(); cmdbuf.BeginCopyPass(); cmdbuf.UploadToBuffer(transferBuffer, vertexBuffer, WriteOptions.SafeOverwrite); cmdbuf.EndCopyPass(); - fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); + var fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); GraphicsDevice.WaitForFences(fence); GraphicsDevice.ReleaseFence(fence); // Download the data - cmdbuf = GraphicsDevice.AcquireCommandBuffer(); - cmdbuf.BeginCopyPass(); - cmdbuf.DownloadFromBuffer(vertexBuffer, transferBuffer, TransferOptions.Overwrite); - cmdbuf.EndCopyPass(); - fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); - GraphicsDevice.WaitForFences(fence); - GraphicsDevice.ReleaseFence(fence); + GraphicsDevice.DownloadFromBuffer( + vertexBuffer, + transferBuffer, + TransferOptions.Overwrite + ); // Read the updated buffer transferBuffer.GetData(readbackVertices); @@ -103,13 +97,11 @@ namespace MoonWorks.Test GraphicsDevice.WaitForFences(fence); GraphicsDevice.ReleaseFence(fence); - cmdbuf = GraphicsDevice.AcquireCommandBuffer(); - cmdbuf.BeginCopyPass(); - cmdbuf.DownloadFromBuffer(vertexBuffer, transferBuffer, TransferOptions.Overwrite); - cmdbuf.EndCopyPass(); - fence = GraphicsDevice.SubmitAndAcquireFence(cmdbuf); - GraphicsDevice.WaitForFences(fence); - GraphicsDevice.ReleaseFence(fence); + GraphicsDevice.DownloadFromBuffer( + vertexBuffer, + transferBuffer, + TransferOptions.Overwrite + ); // Read the updated buffer transferBuffer.GetData(readbackVertices); diff --git a/InstancingAndOffsets/InstancingAndOffsetsGame.cs b/InstancingAndOffsets/InstancingAndOffsetsGame.cs index 45db9e0..1dd0a8d 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(), 60, true) + public InstancingAndOffsetsGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 409c9ce..2b81813 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(), 60, true) + public MSAAGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 ea2b220..abc9e91 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(), 60, true) + public MSAACubeGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 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 db1640d..14da96d 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/CalculateSquares.comp.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/CalculateSquares.comp.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/FillTexture.comp.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/FillTexture.comp.refresh index 9cc0204..82b6cfe 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/FillTexture.comp.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/FillTexture.comp.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/GradientTexture.comp.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/GradientTexture.comp.refresh index f4f0bcc..45bc488 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/GradientTexture.comp.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/GradientTexture.comp.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColor.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColor.vert.refresh index 5daef24..67a8967 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColor.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColor.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorInstanced.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorInstanced.vert.refresh index bc78019..9c2c534 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorInstanced.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorInstanced.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorWithMatrix.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorWithMatrix.vert.refresh index 9e90d79..559cef0 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorWithMatrix.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionColorWithMatrix.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionSampler.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionSampler.vert.refresh index c95c648..1bd2672 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionSampler.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/PositionSampler.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/RawTriangle.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/RawTriangle.vert.refresh index 3b388c3..3eda99c 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/RawTriangle.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/RawTriangle.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.frag.refresh index 6cc78dd..8be0b5d 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.frag.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.vert.refresh index 22abe51..9299f15 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/Skybox.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/SolidColor.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/SolidColor.frag.refresh index ce21468..2a62f1d 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/SolidColor.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/SolidColor.frag.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedDepthQuad.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedDepthQuad.frag.refresh index cf9fe9e..d3e105c 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedDepthQuad.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedDepthQuad.frag.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.frag.refresh index 0b955c1..a1a3e0f 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.frag.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.vert.refresh index e57c13c..4729e32 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad2DArray.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad2DArray.frag.refresh index 3587389..df4b41c 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad2DArray.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad2DArray.frag.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad3D.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad3D.frag.refresh index a94da74..8fd6d2b 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad3D.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuad3D.frag.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMatrix.vert.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMatrix.vert.refresh index ba7f4e1..c07a513 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMatrix.vert.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMatrix.vert.refresh differ diff --git a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMultiplyColor.frag.refresh b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMultiplyColor.frag.refresh index 079835c..e626e5b 100644 Binary files a/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMultiplyColor.frag.refresh and b/MoonWorks.Test.Common/Content/Shaders/Compiled/TexturedQuadWithMultiplyColor.frag.refresh differ diff --git a/MoonWorks.Test.Common/CopyMoonlibs.targets b/MoonWorks.Test.Common/CopyMoonlibs.targets index 4641909..98312e8 100644 --- a/MoonWorks.Test.Common/CopyMoonlibs.targets +++ b/MoonWorks.Test.Common/CopyMoonlibs.targets @@ -8,43 +8,43 @@ %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always %(RecursiveDir)%(Filename)%(Extension) - PreserveNewest + Always diff --git a/MoonWorks.Test.Common/TestUtils.cs b/MoonWorks.Test.Common/TestUtils.cs index 89318d9..11b6668 100644 --- a/MoonWorks.Test.Common/TestUtils.cs +++ b/MoonWorks.Test.Common/TestUtils.cs @@ -4,6 +4,8 @@ namespace MoonWorks.Test { public static class TestUtils { + public static Backend DefaultBackend = Backend.D3D11; // change this to test different backends + public static WindowCreateInfo GetStandardWindowCreateInfo() { return new WindowCreateInfo( diff --git a/RenderTexture2D/RenderTexture2DGame.cs b/RenderTexture2D/RenderTexture2DGame.cs index 102d714..9c4337a 100644 --- a/RenderTexture2D/RenderTexture2DGame.cs +++ b/RenderTexture2D/RenderTexture2DGame.cs @@ -12,7 +12,7 @@ namespace MoonWorks.Test private Texture[] textures = new Texture[4]; private Sampler sampler; - public RenderTexture2DGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public RenderTexture2DGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), TestUtils.DefaultBackend, 60, true) { // Load the shaders ShaderModule vertShaderModule = new ShaderModule(GraphicsDevice, TestUtils.GetShaderPath("TexturedQuad.vert")); diff --git a/WindowResizing/WindowResizingGame.cs b/WindowResizing/WindowResizingGame.cs index 4d9dff7..a85853c 100644 --- a/WindowResizing/WindowResizingGame.cs +++ b/WindowResizing/WindowResizingGame.cs @@ -20,7 +20,7 @@ namespace MoonWorks.Test new Res(3840, 2160), }; - public WindowResizingGame() : base(TestUtils.GetStandardWindowCreateInfo(), TestUtils.GetStandardFrameLimiterSettings(), 60, true) + public WindowResizingGame() : 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"));