forked from MoonsideGames/MoonWorks
				
			Compare commits
	
		
			4 Commits 
		
	
	
		
			d76633bdfc
			...
			16d2b922ce
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 16d2b922ce | |
|  | 1fb3e5adf0 | |
|  | 6f8858c8b7 | |
|  | f96298f991 | 
|  | @ -1 +1 @@ | |||
| Subproject commit 2880ab39a323a8482331cf76f69d764f13ff2921 | ||||
| Subproject commit 9068263afcf5743ac8f2c023eb68610523feb905 | ||||
|  | @ -847,6 +847,10 @@ namespace MoonWorks.Graphics | |||
| 			in BufferBinding bufferBinding, | ||||
| 			uint firstBinding = 0 | ||||
| 		) { | ||||
| #if DEBUG | ||||
| 			AssertGraphicsPipelineBound(); | ||||
| #endif | ||||
| 
 | ||||
| 			var bufferPtrs = stackalloc IntPtr[1]; | ||||
| 			var offsets = stackalloc ulong[1]; | ||||
| 
 | ||||
|  | @ -874,6 +878,10 @@ namespace MoonWorks.Graphics | |||
| 			in BufferBinding bufferBindingTwo, | ||||
| 			uint firstBinding = 0 | ||||
| 		) { | ||||
| #if DEBUG | ||||
| 			AssertGraphicsPipelineBound(); | ||||
| #endif | ||||
| 
 | ||||
| 			var bufferPtrs = stackalloc IntPtr[2]; | ||||
| 			var offsets = stackalloc ulong[2]; | ||||
| 
 | ||||
|  | @ -906,6 +914,10 @@ namespace MoonWorks.Graphics | |||
| 			in BufferBinding bufferBindingThree, | ||||
| 			uint firstBinding = 0 | ||||
| 		) { | ||||
| #if DEBUG | ||||
| 			AssertGraphicsPipelineBound(); | ||||
| #endif | ||||
| 
 | ||||
| 			var bufferPtrs = stackalloc IntPtr[3]; | ||||
| 			var offsets = stackalloc ulong[3]; | ||||
| 
 | ||||
|  | @ -942,6 +954,10 @@ namespace MoonWorks.Graphics | |||
| 			in BufferBinding bufferBindingFour, | ||||
| 			uint firstBinding = 0 | ||||
| 		) { | ||||
| #if DEBUG | ||||
| 			AssertGraphicsPipelineBound(); | ||||
| #endif | ||||
| 
 | ||||
| 			var bufferPtrs = stackalloc IntPtr[4]; | ||||
| 			var offsets = stackalloc ulong[4]; | ||||
| 
 | ||||
|  | @ -974,6 +990,10 @@ namespace MoonWorks.Graphics | |||
| 			in Span<BufferBinding> bufferBindings, | ||||
| 			uint firstBinding = 0 | ||||
| 		) { | ||||
| #if DEBUG | ||||
| 			AssertGraphicsPipelineBound(); | ||||
| #endif | ||||
| 
 | ||||
| 			var bufferPtrs = stackalloc IntPtr[bufferBindings.Length]; | ||||
| 			var offsets = stackalloc ulong[bufferBindings.Length]; | ||||
| 
 | ||||
|  | @ -1623,6 +1643,13 @@ namespace MoonWorks.Graphics | |||
| 		public Texture AcquireSwapchainTexture( | ||||
| 			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( | ||||
| 				Device.Handle, | ||||
| 				Handle, | ||||
|  |  | |||
|  | @ -221,11 +221,7 @@ namespace MoonWorks.Graphics | |||
| 		OneMinusDestinationAlpha, | ||||
| 		ConstantColor, | ||||
| 		OneMinusConstantColor, | ||||
| 		SourceAlphaSaturate, | ||||
| 		SourceOneColor, | ||||
| 		OneMinusSourceOneColor, | ||||
| 		SourceOneAlpha, | ||||
| 		OneMinusSourceOneAlpha | ||||
| 		SourceAlphaSaturate | ||||
| 	} | ||||
| 
 | ||||
| 	[Flags] | ||||
|  |  | |||
|  | @ -364,4 +364,25 @@ namespace MoonWorks.Graphics | |||
| 			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; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ namespace MoonWorks.Graphics | |||
| 
 | ||||
| 		public GraphicsShaderInfo VertexShaderInfo { get; } | ||||
| 		public GraphicsShaderInfo FragmentShaderInfo { get; } | ||||
| 		public  SampleCount SampleCount { get; } | ||||
| 		public SampleCount SampleCount { get; } | ||||
| 
 | ||||
| #if DEBUG | ||||
| 		internal GraphicsPipelineAttachmentInfo AttachmentInfo { get; } | ||||
|  | @ -89,7 +89,6 @@ namespace MoonWorks.Graphics | |||
| 			refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasConstantFactor = rasterizerState.DepthBiasConstantFactor; | ||||
| 			refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasEnable = Conversions.BoolToByte(rasterizerState.DepthBiasEnable); | ||||
| 			refreshGraphicsPipelineCreateInfo.rasterizerState.depthBiasSlopeFactor = rasterizerState.DepthBiasSlopeFactor; | ||||
| 			refreshGraphicsPipelineCreateInfo.rasterizerState.depthClampEnable = Conversions.BoolToByte(rasterizerState.DepthClampEnable); | ||||
| 			refreshGraphicsPipelineCreateInfo.rasterizerState.fillMode = (Refresh.FillMode) rasterizerState.FillMode; | ||||
| 			refreshGraphicsPipelineCreateInfo.rasterizerState.frontFace = (Refresh.FrontFace) rasterizerState.FrontFace; | ||||
| 
 | ||||
|  |  | |||
|  | @ -29,7 +29,6 @@ | |||
| 		/// Factor applied to a fragment's slope in depth bias calculations. Only applies if depth biasing is enabled. | ||||
| 		/// </summary> | ||||
| 		public float DepthBiasSlopeFactor; | ||||
| 		public bool DepthClampEnable; | ||||
| 
 | ||||
| 		/// <summary> | ||||
| 		/// Specifies how triangles should be drawn. | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue