From b462d9a633c756667e759965c763195df8bf6b40 Mon Sep 17 00:00:00 2001 From: Julien Vulliet Date: Sat, 18 Feb 2017 20:52:47 +0100 Subject: [PATCH] [SharpDX.Direct3D12] Add overloads for SetDescriptorHeaps and SetVertexBuffers in GraphicsCommandList --- .../SharpDX.Direct3D12/GraphicsCommandList.cs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Source/SharpDX.Direct3D12/GraphicsCommandList.cs b/Source/SharpDX.Direct3D12/GraphicsCommandList.cs index 3c3fb9673..5e815d28b 100644 --- a/Source/SharpDX.Direct3D12/GraphicsCommandList.cs +++ b/Source/SharpDX.Direct3D12/GraphicsCommandList.cs @@ -149,6 +149,22 @@ public unsafe void ResourceBarrier(params SharpDX.Direct3D12.ResourceBarrier[] b ResourceBarrier(barriers.Length, new IntPtr(pBarriers)); } + /// + ///

Changes the currently bound descriptor heaps that are associated with a command list.

+ ///
+ ///

A reference to an array of objects for the heaps to set on the command list.

+ /// + ///

SetDescriptorHeaps can be called on a bundle, but the bundle descriptor heaps must match the calling command list descriptor heap. For more information on bundle restrictions, refer to Creating and Recording Command Lists and Bundles.

+ ///
+ /// + /// Dn903908 + /// void ID3D12GraphicsCommandList::SetDescriptorHeaps([In] unsigned int NumDescriptorHeaps,[In, Buffer] const ID3D12DescriptorHeap** ppDescriptorHeaps) + /// ID3D12GraphicsCommandList::SetDescriptorHeaps + public void SetDescriptorHeaps(params SharpDX.Direct3D12.DescriptorHeap[] descriptorHeaps) + { + SetDescriptorHeaps(descriptorHeaps.Length, descriptorHeaps); + } + /// ///

Sets CPU descriptor handles for the render targets and depth stencil.

///
@@ -223,6 +239,22 @@ public void SetVertexBuffers(int startSlot, SharpDX.Direct3D12.VertexBufferView[ } } + /// + ///

Sets a CPU descriptor handle for the vertex buffers.

+ ///
+ ///

Index into the device's zero-based array to begin setting vertex buffers.

+ ///

Specifies the vertex buffer views in an array of structures.

+ ///

The number of views in the pViews array.

+ /// dn986883 + /// void ID3D12GraphicsCommandList::IASetVertexBuffers([In] unsigned int StartSlot,[In] unsigned int NumViews,[In] const void* pViews) + /// ID3D12GraphicsCommandList::IASetVertexBuffers + public void SetVertexBuffers(int startSlot, params SharpDX.Direct3D12.VertexBufferView[] vertexBufferViews) + { + SetVertexBuffers(startSlot, vertexBufferViews, vertexBufferViews.Length); + } + + + /// ///

Sets a CPU descriptor handle for the vertex buffers.

///