diff --git a/lib/RefreshCS b/lib/RefreshCS index 86cc5fa..7465d4d 160000 --- a/lib/RefreshCS +++ b/lib/RefreshCS @@ -1 +1 @@ -Subproject commit 86cc5fa1422c8b79c436c4e4fc345114e9615dbb +Subproject commit 7465d4d4de1a0f2c5de5a2d0b3240671e83776d1 diff --git a/src/Game.cs b/src/Game.cs index 096afc7..cf1e133 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -53,6 +53,7 @@ namespace MoonWorks public Game( WindowCreateInfo windowCreateInfo, FrameLimiterSettings frameLimiterSettings, + Backend backend = Backend.Vulkan, int targetTimestep = 60, bool debugMode = false ) @@ -82,7 +83,7 @@ namespace MoonWorks Logger.LogInfo("Initializing graphics device..."); GraphicsDevice = new GraphicsDevice( - Backend.Vulkan, + backend, debugMode ); diff --git a/src/Graphics/CommandBuffer.cs b/src/Graphics/CommandBuffer.cs index b1f4d43..a0f5c0b 100644 --- a/src/Graphics/CommandBuffer.cs +++ b/src/Graphics/CommandBuffer.cs @@ -2087,94 +2087,6 @@ namespace MoonWorks.Graphics ); } - /// - /// Copies the contents of a Texture to a GpuBuffer. - /// This copy occurs on the GPU timeline. - /// - /// You MAY assume that the copy has finished in subsequent commands. - /// - public void CopyTextureToBuffer( - in TextureRegion textureRegion, - GpuBuffer buffer, - in BufferImageCopy copyParams, - WriteOptions option - ) { -#if DEBUG - AssertNotSubmitted(); - AssertInCopyPass("Cannot download from texture outside of copy pass!"); - AssertBufferBoundsCheck(buffer.Size, copyParams.BufferOffset, textureRegion.Size); -#endif - - Refresh.Refresh_CopyTextureToBuffer( - Device.Handle, - Handle, - textureRegion.ToRefreshTextureRegion(), - buffer.Handle, - copyParams.ToRefresh(), - (Refresh.WriteOptions) option - ); - } - - /// - /// Copies the entire contents of a Texture to a GpuBuffer. - /// - public void CopyTextureToBuffer( - Texture texture, - GpuBuffer buffer, - WriteOptions option - ) { - CopyTextureToBuffer( - new TextureRegion(texture), - buffer, - new BufferImageCopy(0, 0, 0), - option - ); - } - - /// - /// Copies the contents of a GpuBuffer to a Texture. - /// This copy occurs on the GPU timeline. - /// - /// You MAY assume that the copy has finished in subsequent commands. - /// - public void CopyBufferToTexture( - GpuBuffer gpuBuffer, - in TextureRegion textureRegion, - in BufferImageCopy copyParams, - WriteOptions option - ) { -#if DEBUG - AssertNotSubmitted(); - AssertInCopyPass("Cannot download from texture outside of copy pass!"); - AssertBufferBoundsCheck(gpuBuffer.Size, copyParams.BufferOffset, textureRegion.Size); -#endif - - Refresh.Refresh_CopyBufferToTexture( - Device.Handle, - Handle, - gpuBuffer.Handle, - textureRegion.ToRefreshTextureRegion(), - copyParams.ToRefresh(), - (Refresh.WriteOptions) option - ); - } - - /// - /// Copies the entire contents of a Texture with no mips to a GpuBuffer. - /// - public void CopyBufferToTexture( - GpuBuffer buffer, - Texture texture, - WriteOptions option - ) { - CopyBufferToTexture( - buffer, - new TextureRegion(texture), - new BufferImageCopy(0, 0, 0), - option - ); - } - /// /// Copies data from a GpuBuffer to another GpuBuffer. /// This copy occurs on the GPU timeline. diff --git a/src/Graphics/RefreshEnums.cs b/src/Graphics/RefreshEnums.cs index 918bdb1..2e1b9f8 100644 --- a/src/Graphics/RefreshEnums.cs +++ b/src/Graphics/RefreshEnums.cs @@ -313,6 +313,7 @@ namespace MoonWorks.Graphics { DontCare, Vulkan, + D3D11, PS5, Invalid } diff --git a/src/Graphics/StockShaders/Binary/blit.frag.refresh b/src/Graphics/StockShaders/Binary/blit.frag.refresh index ac3850a..a64dddb 100644 Binary files a/src/Graphics/StockShaders/Binary/blit.frag.refresh and b/src/Graphics/StockShaders/Binary/blit.frag.refresh differ diff --git a/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh b/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh index 131f3a6..762caae 100644 Binary files a/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh and b/src/Graphics/StockShaders/Binary/fullscreen.vert.refresh differ diff --git a/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh b/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh index ba50a5a..ad0a698 100644 Binary files a/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh and b/src/Graphics/StockShaders/Binary/text_msdf.frag.refresh differ diff --git a/src/Graphics/StockShaders/Binary/text_transform.vert.refresh b/src/Graphics/StockShaders/Binary/text_transform.vert.refresh index 21bee62..fd34e1b 100644 Binary files a/src/Graphics/StockShaders/Binary/text_transform.vert.refresh and b/src/Graphics/StockShaders/Binary/text_transform.vert.refresh differ diff --git a/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh b/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh index 176e8b4..1493276 100644 Binary files a/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh and b/src/Graphics/StockShaders/Binary/video_yuv2rgba.frag.refresh differ