Skip to content

Commit

Permalink
Merge branch 'pr/n577_mrvux' into master_integration
Browse files Browse the repository at this point in the history
Conflicts:
	Source/SharpDX.Direct3D12/Device.cs
  • Loading branch information
xoofx committed Jun 10, 2015
2 parents 6514e8a + 36e0e4e commit 649ee59
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 1 deletion.
26 changes: 26 additions & 0 deletions Source/SharpDX.Direct3D12/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,32 @@ public SharpDX.Direct3D12.Resource CreateReservedResource(SharpDX.Direct3D12.Res
return CreateReservedResource(ref descRef, initialState, optimizedClearValueRef, Utilities.GetGuidFromType(typeof(Resource)));
}

/// <summary>
/// Retrieves Direct3D12 Options"/>
/// </summary>
public unsafe FeatureDataD3D12Options D3D12Options
{
get
{
FeatureDataD3D12Options options = new FeatureDataD3D12Options();
this.CheckFeatureSupport(Feature.D3D12Options, new IntPtr(&options), Utilities.SizeOf<FeatureDataD3D12Options>());
return options;
}
}

/// <summary>
/// Retrieves Direct3D12 Architecture information
/// </summary>
public unsafe FeatureDataArchitecture Architecture
{
get
{
FeatureDataArchitecture options = new FeatureDataArchitecture();
this.CheckFeatureSupport(Feature.Architecture, new IntPtr(&options), Utilities.SizeOf<FeatureDataArchitecture>());
return options;
}
}

private static void CreateDevice(Adapter adapter, FeatureLevel minFeatureLevel, Device instance)
{
D3D12.CreateDevice(adapter, minFeatureLevel, Utilities.GetGuidFromType(typeof(Device)), instance).CheckError();
Expand Down
52 changes: 52 additions & 0 deletions Source/SharpDX.Direct3D12/GraphicsCommandList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ namespace SharpDX.Direct3D12
{
public partial class GraphicsCommandList
{
/// <summary>
/// No documentation for Direct3D12
/// </summary>
/// <param name="depthStencilView">No documentation.</param>
/// <param name="clearFlags">No documentation.</param>
/// <param name="depth">No documentation.</param>
/// <param name="stencil">No documentation.</param>
/// <param name="rectRef">No documentation.</param>
/// <param name="numRects">No documentation.</param>
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::ClearDepthStencilView']/*"/>
/// <unmanaged>void ID3D12GraphicsCommandList::ClearDepthStencilView([In] D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView,[In] D3D12_CLEAR_FLAGS ClearFlags,[In] float Depth,[In] unsigned char Stencil,[In] unsigned int NumRects,[In, Buffer] const RECT* pRects)</unmanaged>
/// <unmanaged-short>ID3D12GraphicsCommandList::ClearDepthStencilView</unmanaged-short>
public void ClearDepthStencilView(SharpDX.Direct3D12.CpuDescriptorHandle depthStencilView, SharpDX.Direct3D12.ClearFlags clearFlags, float depth, byte stencil)
{
ClearDepthStencilView(depthStencilView, clearFlags, depth, stencil, 0, null);
}

/// <unmanaged>void ID3D12CommandList::ResourceBarrier([In] unsigned int Count,[In, Buffer] const D3D12_RESOURCE_BARRIER_DESC* pDesc)</unmanaged>
/// <unmanaged-short>ID3D12CommandList::ResourceBarrier</unmanaged-short>
public void ResourceBarrierTransition(Resource resource, ResourceStates stateBefore, ResourceStates stateAfter)
Expand Down Expand Up @@ -64,6 +81,41 @@ public unsafe void ResourceBarrier(params SharpDX.Direct3D12.ResourceBarrier[] b
ResourceBarrier(barriers.Length, new IntPtr(pBarriers));
}

/// <summary>
/// No documentation for Direct3D12
/// </summary>
/// <param name="startSlot">No documentation.</param>
/// <param name="descRef">No documentation.</param>
/// <param name="numBuffers">No documentation.</param>
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::SetVertexBuffers']/*"/>
/// <unmanaged>void ID3D12GraphicsCommandList::SetVertexBuffers([In] unsigned int StartSlot,[In, Buffer, Optional] const D3D12_VERTEX_BUFFER_VIEW* pDesc,[In] unsigned int NumBuffers)</unmanaged>
/// <unmanaged-short>ID3D12GraphicsCommandList::SetVertexBuffers</unmanaged-short>
public void SetVertexBuffers(int startSlot, SharpDX.Direct3D12.VertexBufferView[] descRef, int numBuffers)
{
unsafe
{
fixed (void* descPtr = descRef)
SetVertexBuffers(startSlot, numBuffers, new IntPtr(descPtr));
}
}

/// <summary>
/// No documentation for Direct3D12
/// </summary>
/// <param name="startSlot">No documentation.</param>
/// <param name="descRef">No documentation.</param>
/// <param name="numBuffers">No documentation.</param>
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::SetVertexBuffers']/*"/>
/// <unmanaged>void ID3D12GraphicsCommandList::SetVertexBuffers([In] unsigned int StartSlot,[In, Buffer, Optional] const D3D12_VERTEX_BUFFER_VIEW* pDesc,[In] unsigned int NumBuffers)</unmanaged>
/// <unmanaged-short>ID3D12GraphicsCommandList::SetVertexBuffers</unmanaged-short>
public void SetVertexBuffer(int startSlot, SharpDX.Direct3D12.VertexBufferView descRef)
{
unsafe
{
SetVertexBuffers(startSlot, 1, (IntPtr)(&descRef));
}
}

/// <unmanaged>void ID3D12CommandList::RSSetViewports([In] unsigned int Count,[In, Buffer] const D3D11_VIEWPORT* pViewports)</unmanaged>
/// <unmanaged-short>ID3D12CommandList::RSSetViewports</unmanaged-short>
public void SetViewports(params SharpDX.Mathematics.Interop.RawViewportF[] viewports)
Expand Down
5 changes: 4 additions & 1 deletion Source/SharpDX.Direct3D12/Mapping.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@
<map param="ID3D12GraphicsCommandList::ClearUnorderedAccessViewFloat::Values" type="SHARPDX_VECTOR4"/>
<map param="ID3D12GraphicsCommandList::ResourceBarrier::pBarriers" type="void"/>
<map method="ID3D12GraphicsCommandList::ResourceBarrier" visibility="private"/>


<map method="ID3D12GraphicsCommandList::RSSetViewports" rawptr="true"/>
<map method="ID3D12GraphicsCommandList::RSSetScissorRects" name="SetScissorRectangles" rawptr="true"/>


<map method="ID3D12GraphicsCommandList::(.*)ToHeap" name="$1To" />
<move method="ID3D12GraphicsCommandList::(.*)ToHeap" to="DescriptorManager" property="Descriptors" />

Expand All @@ -198,6 +198,9 @@
<move method="ID3D12GraphicsCommandList::CopyDescriptors" to="DescriptorManager" property="Descriptors" />

<move method="ID3D12GraphicsCommandList::(.*)Table" to="DescriptorManager" property="Descriptors" />
<map method="ID3D12GraphicsCommandList::IASetVertexBuffers" visibility="private" />
<map param="ID3D12GraphicsCommandList::IASetVertexBuffers::pViews" attribute="in" type="void"/>
<map method="ID3D12GraphicsCommandList::IASetIndexBuffer" property="false"/>

<map method="ID3D12Device::RegisterBudgetChangeCallback" visibility="internal"/>

Expand Down

0 comments on commit 649ee59

Please sign in to comment.