Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit c0abdbd

Browse files
committed
[Direct3D12] Add code comments and fix include path where relevant
1 parent 8b648d6 commit c0abdbd

6 files changed

Lines changed: 31 additions & 15 deletions

File tree

Source/SharpDX.Direct3D12/GraphicsCommandList.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ public void SetVertexBuffers(int startSlot, SharpDX.Direct3D12.VertexBufferView[
243243
/// <p>Sets a CPU descriptor handle for the vertex buffers.</p>
244244
/// </summary>
245245
/// <param name="startSlot"><dd> <p> Index into the device's zero-based array to begin setting vertex buffers. </p> </dd></param>
246-
/// <param name="vertexBufferViews"><dd> <p> Specifies the vertex buffer views in an array of <strong><see cref="SharpDX.Direct3D12.VertexBufferView"/></strong> structures. </p> </dd></param>
247-
/// <param name="numBuffers"><dd> <p> The number of views in the <em>pViews</em> array. </p> </dd></param>
246+
/// <param name="vertexBufferViews"><dd> <p> Specifies the vertex buffer views in an array of <strong><see cref="SharpDX.Direct3D12.VertexBufferView"/></strong> structures. </p> </dd></param>
248247
/// <msdn-id>dn986883</msdn-id>
249248
/// <unmanaged>void ID3D12GraphicsCommandList::IASetVertexBuffers([In] unsigned int StartSlot,[In] unsigned int NumViews,[In] const void* pViews)</unmanaged>
250249
/// <unmanaged-short>ID3D12GraphicsCommandList::IASetVertexBuffers</unmanaged-short>
@@ -335,7 +334,7 @@ public unsafe void SetScissorRectangles(SharpDX.Mathematics.Interop.RawRectangle
335334
/// <p> For internal use only. </p>
336335
/// </summary>
337336
/// <param name="name"><dd> <p> Internal. </p> </dd></param>
338-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::BeginEvent']/*"/>
337+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::BeginEvent']/*"/>
339338
/// <msdn-id>dn986879</msdn-id>
340339
/// <unmanaged>void ID3D12GraphicsCommandList::BeginEvent([In] unsigned int Metadata,[In, Buffer, Optional] const void* pData,[In] unsigned int Size)</unmanaged>
341340
/// <unmanaged-short>ID3D12GraphicsCommandList::BeginEvent</unmanaged-short>
@@ -362,7 +361,7 @@ public void BeginEvent(string name)
362361
/// <p> For internal use only.</p>
363362
/// </summary>
364363
/// <param name="name"><dd> <p> Internal. </p> </dd></param>
365-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::SetMarker']/*"/>
364+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12GraphicsCommandList::SetMarker']/*"/>
366365
/// <msdn-id>dn986885</msdn-id>
367366
/// <unmanaged>void ID3D12GraphicsCommandList::SetMarker([In] unsigned int Metadata,[In, Buffer, Optional] const void* pData,[In] unsigned int Size)</unmanaged>
368367
/// <unmanaged-short>ID3D12GraphicsCommandList::SetMarker</unmanaged-short>

Source/SharpDX.Direct3D12/InputLayoutDescription.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@ public InputLayoutDescription(InputElement[] elements)
3131
/// <summary>
3232
/// <dd> <p> An array of <strong><see cref="SharpDX.Direct3D12.InputElement"/></strong> structures that describe the data types of the input-assembler stage. </p> </dd>
3333
/// </summary>
34-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_INPUT_LAYOUT_DESC::pInputElementDescs']/*"/>
34+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_INPUT_LAYOUT_DESC::pInputElementDescs']/*"/>
3535
/// <msdn-id>dn770378</msdn-id>
3636
/// <unmanaged>const D3D12_INPUT_ELEMENT_DESC* pInputElementDescs</unmanaged>
3737
/// <unmanaged-short>D3D12_INPUT_ELEMENT_DESC pInputElementDescs</unmanaged-short>
3838
public InputElement[] Elements { get; set; }
3939

40+
/// <summary>
41+
/// Implicitely converts to an InputLayoutDescription from an array of <see cref="InputElement"/>
42+
/// </summary>
43+
/// <param name="elements">Array of input elements</param>
4044
public static implicit operator InputLayoutDescription(InputElement[] elements)
4145
{
4246
return new InputLayoutDescription(elements);

Source/SharpDX.Direct3D12/ResourceBarrier.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ namespace SharpDX.Direct3D12
2424
{
2525
public partial struct ResourceBarrier
2626
{
27+
/// <summary>
28+
/// Specifies the barrier type, see <see cref="ResourceBarrierType"/>
29+
/// </summary>
2730
public SharpDX.Direct3D12.ResourceBarrierType Type;
2831

2932
/// <summary>
3033
/// No documentation.
3134
/// </summary>
32-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_RESOURCE_BARRIER::Flags']/*"/>
35+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_RESOURCE_BARRIER::Flags']/*"/>
3336
/// <unmanaged>D3D12_RESOURCE_BARRIER_FLAGS Flags</unmanaged>
3437
/// <unmanaged-short>D3D12_RESOURCE_BARRIER_FLAGS Flags</unmanaged-short>
3538
public SharpDX.Direct3D12.ResourceBarrierFlags Flags;

Source/SharpDX.Direct3D12/RootSignatureDeserializer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ namespace SharpDX.Direct3D12
99
{
1010
public partial class RootSignatureDeserializer
1111
{
12-
// <summary>
12+
/// <summary>
1313
/// <p> Gets the layout of the root signature. </p>
1414
/// </summary>
15-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12RootSignatureDeserializer::GetRootSignatureDesc']/*"/>
15+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12RootSignatureDeserializer::GetRootSignatureDesc']/*"/>
1616
/// <msdn-id>dn986887</msdn-id>
1717
/// <unmanaged>GetRootSignatureDesc</unmanaged>
1818
/// <unmanaged-short>GetRootSignatureDesc</unmanaged-short>
@@ -23,7 +23,7 @@ public partial class RootSignatureDeserializer
2323
/// <p> Gets the layout of the root signature. </p>
2424
/// </summary>
2525
/// <returns><p> Returns a reference to a <strong><see cref="SharpDX.Direct3D12.RootSignatureDescription"/></strong> structure that describes the layout of the root signature. </p></returns>
26-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12RootSignatureDeserializer::GetRootSignatureDesc']/*"/>
26+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12RootSignatureDeserializer::GetRootSignatureDesc']/*"/>
2727
/// <msdn-id>dn986887</msdn-id>
2828
/// <unmanaged>const D3D12_ROOT_SIGNATURE_DESC* ID3D12RootSignatureDeserializer::GetRootSignatureDesc()</unmanaged>
2929
/// <unmanaged-short>ID3D12RootSignatureDeserializer::GetRootSignatureDesc</unmanaged-short>

Source/SharpDX.Direct3D12/StreamOutputDescription.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public StreamOutputDescription(StreamOutputElement[] elements)
3838
/// <summary>
3939
/// <dd> <p> An array of <strong><see cref="SharpDX.Direct3D12.StreamOutputElement"/></strong> structures. Can't be <strong><c>null</c></strong> if <strong>NumEntries</strong> &gt; 0. </p> </dd>
4040
/// </summary>
41-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_STREAM_OUTPUT_DESC::pSODeclaration']/*"/>
41+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_STREAM_OUTPUT_DESC::pSODeclaration']/*"/>
4242
/// <msdn-id>dn770410</msdn-id>
4343
/// <unmanaged>const D3D12_SO_DECLARATION_ENTRY* pSODeclaration</unmanaged>
4444
/// <unmanaged-short>D3D12_SO_DECLARATION_ENTRY pSODeclaration</unmanaged-short>

Source/SharpDX.Direct3D12/TextureCopyLocation.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace SharpDX.Direct3D12
1313
/// <remarks>
1414
/// <p> Use this structure with <strong>CopyTextureRegion</strong>. </p>
1515
/// </remarks>
16-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION']/*"/>
16+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION']/*"/>
1717
/// <msdn-id>dn903818</msdn-id>
1818
/// <unmanaged>D3D12_TEXTURE_COPY_LOCATION</unmanaged>
1919
/// <unmanaged-short>D3D12_TEXTURE_COPY_LOCATION</unmanaged-short>
@@ -22,15 +22,15 @@ public partial struct TextureCopyLocation
2222
/// <summary>
2323
/// No documentation.
2424
/// </summary>
25-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::pResource']/*"/>
25+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::pResource']/*"/>
2626
/// <unmanaged>ID3D12Resource* pResource</unmanaged>
2727
/// <unmanaged-short>ID3D12Resource pResource</unmanaged-short>
2828
private System.IntPtr PResource;
2929

3030
/// <summary>
3131
/// No documentation.
3232
/// </summary>
33-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::Type']/*"/>
33+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::Type']/*"/>
3434
/// <unmanaged>D3D12_TEXTURE_COPY_TYPE Type</unmanaged>
3535
/// <unmanaged-short>D3D12_TEXTURE_COPY_TYPE Type</unmanaged-short>
3636
public SharpDX.Direct3D12.TextureCopyType Type;
@@ -40,7 +40,7 @@ public partial struct TextureCopyLocation
4040
/// <summary>
4141
/// No documentation.
4242
/// </summary>
43-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::PlacedFootprint']/*"/>
43+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::PlacedFootprint']/*"/>
4444
/// <unmanaged>D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint</unmanaged>
4545
/// <unmanaged-short>D3D12_PLACED_SUBRESOURCE_FOOTPRINT PlacedFootprint</unmanaged-short>
4646
public SharpDX.Direct3D12.PlacedSubResourceFootprint PlacedFootprint
@@ -52,7 +52,7 @@ public SharpDX.Direct3D12.PlacedSubResourceFootprint PlacedFootprint
5252
/// <summary>
5353
/// No documentation.
5454
/// </summary>
55-
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::SubresourceIndex']/*"/>
55+
/// <include file='Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12_TEXTURE_COPY_LOCATION::SubresourceIndex']/*"/>
5656
/// <unmanaged>unsigned int SubresourceIndex</unmanaged>
5757
/// <unmanaged-short>unsigned int SubresourceIndex</unmanaged-short>
5858
public int SubresourceIndex
@@ -61,13 +61,23 @@ public int SubresourceIndex
6161
set { union.SubResourceIndex = value; }
6262
}
6363

64+
/// <summary>
65+
/// Creates a new resource copy that is represented by a subresource index
66+
/// </summary>
67+
/// <param name="resource">A valid Direct3D12 Resource</param>
68+
/// <param name="subResourceIndex">Sub resource index</param>
6469
public TextureCopyLocation(SharpDX.Direct3D12.Resource resource, int subResourceIndex) : this()
6570
{
6671
Type = TextureCopyType.SubResourceIndex;
6772
PResource = resource != null ? resource.NativePointer : IntPtr.Zero;
6873
SubresourceIndex = subResourceIndex;
6974
}
7075

76+
/// <summary>
77+
/// Creates a new resource copy that is represented by a resource footprint
78+
/// </summary>
79+
/// <param name="resource">A valid Direct3D12 Resource</param>
80+
/// <param name="placedFootprint">Placement footprint for the resource copy operation</param>
7181
public TextureCopyLocation(SharpDX.Direct3D12.Resource resource, PlacedSubResourceFootprint placedFootprint) : this()
7282
{
7383
Type = TextureCopyType.PlacedFootprint;

0 commit comments

Comments
 (0)