Compare commits

..

No commits in common. "16d2b922ce97395bee2f432aea64a46177a0206b" and "d76633bdfccc01d0ad625ca846ef4050b3b64e75" have entirely different histories.

6 changed files with 9 additions and 51 deletions

@ -1 +1 @@
Subproject commit 9068263afcf5743ac8f2c023eb68610523feb905 Subproject commit 2880ab39a323a8482331cf76f69d764f13ff2921

View File

@ -847,10 +847,6 @@ namespace MoonWorks.Graphics
in BufferBinding bufferBinding, in BufferBinding bufferBinding,
uint firstBinding = 0 uint firstBinding = 0
) { ) {
#if DEBUG
AssertGraphicsPipelineBound();
#endif
var bufferPtrs = stackalloc IntPtr[1]; var bufferPtrs = stackalloc IntPtr[1];
var offsets = stackalloc ulong[1]; var offsets = stackalloc ulong[1];
@ -878,10 +874,6 @@ namespace MoonWorks.Graphics
in BufferBinding bufferBindingTwo, in BufferBinding bufferBindingTwo,
uint firstBinding = 0 uint firstBinding = 0
) { ) {
#if DEBUG
AssertGraphicsPipelineBound();
#endif
var bufferPtrs = stackalloc IntPtr[2]; var bufferPtrs = stackalloc IntPtr[2];
var offsets = stackalloc ulong[2]; var offsets = stackalloc ulong[2];
@ -914,10 +906,6 @@ namespace MoonWorks.Graphics
in BufferBinding bufferBindingThree, in BufferBinding bufferBindingThree,
uint firstBinding = 0 uint firstBinding = 0
) { ) {
#if DEBUG
AssertGraphicsPipelineBound();
#endif
var bufferPtrs = stackalloc IntPtr[3]; var bufferPtrs = stackalloc IntPtr[3];
var offsets = stackalloc ulong[3]; var offsets = stackalloc ulong[3];
@ -954,10 +942,6 @@ namespace MoonWorks.Graphics
in BufferBinding bufferBindingFour, in BufferBinding bufferBindingFour,
uint firstBinding = 0 uint firstBinding = 0
) { ) {
#if DEBUG
AssertGraphicsPipelineBound();
#endif
var bufferPtrs = stackalloc IntPtr[4]; var bufferPtrs = stackalloc IntPtr[4];
var offsets = stackalloc ulong[4]; var offsets = stackalloc ulong[4];
@ -990,10 +974,6 @@ namespace MoonWorks.Graphics
in Span<BufferBinding> bufferBindings, in Span<BufferBinding> bufferBindings,
uint firstBinding = 0 uint firstBinding = 0
) { ) {
#if DEBUG
AssertGraphicsPipelineBound();
#endif
var bufferPtrs = stackalloc IntPtr[bufferBindings.Length]; var bufferPtrs = stackalloc IntPtr[bufferBindings.Length];
var offsets = stackalloc ulong[bufferBindings.Length]; var offsets = stackalloc ulong[bufferBindings.Length];
@ -1643,13 +1623,6 @@ namespace MoonWorks.Graphics
public Texture AcquireSwapchainTexture( public Texture AcquireSwapchainTexture(
Window window Window window
) { ) {
#if DEBUG
if (!window.Claimed)
{
throw new System.InvalidOperationException("Cannot acquire swapchain texture, window has not been claimed!");
}
#endif
var texturePtr = Refresh.Refresh_AcquireSwapchainTexture( var texturePtr = Refresh.Refresh_AcquireSwapchainTexture(
Device.Handle, Device.Handle,
Handle, Handle,

View File

@ -221,7 +221,11 @@ namespace MoonWorks.Graphics
OneMinusDestinationAlpha, OneMinusDestinationAlpha,
ConstantColor, ConstantColor,
OneMinusConstantColor, OneMinusConstantColor,
SourceAlphaSaturate SourceAlphaSaturate,
SourceOneColor,
OneMinusSourceOneColor,
SourceOneAlpha,
OneMinusSourceOneAlpha
} }
[Flags] [Flags]

View File

@ -364,25 +364,4 @@ namespace MoonWorks.Graphics
BlendState = blendState; BlendState = blendState;
} }
} }
[StructLayout(LayoutKind.Sequential)]
public struct IndirectDrawCommand
{
public uint VertexCount;
public uint InstanceCount;
public uint FirstVertex;
public uint FirstInstance;
public IndirectDrawCommand(
uint vertexCount,
uint instanceCount,
uint firstVertex,
uint firstInstance
) {
VertexCount = vertexCount;
InstanceCount = instanceCount;
FirstVertex = firstVertex;
FirstInstance = firstInstance;
}
}
} }

View File

@ -89,6 +89,7 @@ namespace MoonWorks.Graphics
refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasConstantFactor = rasterizerState.DepthBiasConstantFactor; refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasConstantFactor = rasterizerState.DepthBiasConstantFactor;
refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasEnable = Conversions.BoolToByte(rasterizerState.DepthBiasEnable); refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasEnable = Conversions.BoolToByte(rasterizerState.DepthBiasEnable);
refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasSlopeFactor = rasterizerState.DepthBiasSlopeFactor; refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasSlopeFactor = rasterizerState.DepthBiasSlopeFactor;
refreshGraphicsPipelineCreateInfo.rasterizerState.depthClampEnable = Conversions.BoolToByte(rasterizerState.DepthClampEnable);
refreshGraphicsPipelineCreateInfo.rasterizerState.fillMode = (Refresh.FillMode) rasterizerState.FillMode; refreshGraphicsPipelineCreateInfo.rasterizerState.fillMode = (Refresh.FillMode) rasterizerState.FillMode;
refreshGraphicsPipelineCreateInfo.rasterizerState.frontFace = (Refresh.FrontFace) rasterizerState.FrontFace; refreshGraphicsPipelineCreateInfo.rasterizerState.frontFace = (Refresh.FrontFace) rasterizerState.FrontFace;

View File

@ -29,6 +29,7 @@
/// Factor applied to a fragment's slope in depth bias calculations. Only applies if depth biasing is enabled. /// Factor applied to a fragment's slope in depth bias calculations. Only applies if depth biasing is enabled.
/// </summary> /// </summary>
public float DepthBiasSlopeFactor; public float DepthBiasSlopeFactor;
public bool DepthClampEnable;
/// <summary> /// <summary>
/// Specifies how triangles should be drawn. /// Specifies how triangles should be drawn.