From 1af16231ce98f48633da1b46a378c4e5b6e2d54a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Thu, 25 Aug 2022 12:32:49 -0700 Subject: [PATCH] Refresh 1.6.0 --- lib/RefreshCS | 2 +- src/Graphics/CommandBuffer.cs | 30 +++++++++++++++++++++++++++ src/Graphics/RefreshEnums.cs | 6 ++++-- src/Graphics/State/RasterizerState.cs | 4 ++-- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/lib/RefreshCS b/lib/RefreshCS index 98c590a..c378027 160000 --- a/lib/RefreshCS +++ b/lib/RefreshCS @@ -1 +1 @@ -Subproject commit 98c590ae77c3b6a64a370bac439f20728959a8b6 +Subproject commit c378027989dbc4233c7ead476aba4e22b335ba0f diff --git a/src/Graphics/CommandBuffer.cs b/src/Graphics/CommandBuffer.cs index 07837ff..81a2c91 100644 --- a/src/Graphics/CommandBuffer.cs +++ b/src/Graphics/CommandBuffer.cs @@ -616,6 +616,36 @@ namespace MoonWorks.Graphics ); } + /// + /// Similar to DrawPrimitives, but parameters are set from a buffer. + /// + /// The draw parameters buffer. + /// The offset to start reading from the draw parameters buffer. + /// The number of draw parameter sets that should be read from the buffer. + /// The byte stride between sets of draw parameters. + /// An offset value obtained from PushVertexShaderUniforms. If no uniforms are required then use 0. + /// An offset value obtained from PushFragmentShaderUniforms. If no uniforms are required the use 0. + public void DrawPrimitivesIndirect( + Buffer buffer, + uint offsetInBytes, + uint drawCount, + uint stride, + uint vertexParamOffset, + uint fragmentParamOffset + ) + { + Refresh.Refresh_DrawPrimitivesIndirect( + Device.Handle, + Handle, + buffer.Handle, + offsetInBytes, + drawCount, + stride, + vertexParamOffset, + fragmentParamOffset + ); + } + /// /// Ends the current render pass. /// This must be called before beginning another render pass or submitting the command buffer. diff --git a/src/Graphics/RefreshEnums.cs b/src/Graphics/RefreshEnums.cs index 12d70c8..50ba244 100644 --- a/src/Graphics/RefreshEnums.cs +++ b/src/Graphics/RefreshEnums.cs @@ -91,7 +91,8 @@ namespace MoonWorks.Graphics { Sampler = 1, ColorTarget = 2, - DepthStencilTarget = 4 + DepthStencilTarget = 4, + Compute = 8 } public enum SampleCount @@ -120,7 +121,8 @@ namespace MoonWorks.Graphics { Vertex = 1, Index = 2, - Compute = 4 + Compute = 4, + Indirect = 8 } public enum VertexElementFormat diff --git a/src/Graphics/State/RasterizerState.cs b/src/Graphics/State/RasterizerState.cs index 042a55d..8d5b4ac 100644 --- a/src/Graphics/State/RasterizerState.cs +++ b/src/Graphics/State/RasterizerState.cs @@ -69,7 +69,7 @@ { CullMode = CullMode.None, FrontFace = FrontFace.Clockwise, - FillMode = FillMode.Fill, + FillMode = FillMode.Line, DepthBiasEnable = false }; @@ -101,7 +101,7 @@ { CullMode = CullMode.None, FrontFace = FrontFace.CounterClockwise, - FillMode = FillMode.Fill, + FillMode = FillMode.Line, DepthBiasEnable = false }; }