This repository has been archived by the owner on Mar 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable code generation for ID3D12RootSignatureDeserializer and RootS…
…ignatureDescription. Rely on manual marshaling instead.
- Loading branch information
Yi Zhang
committed
Jul 6, 2016
1 parent
9673433
commit db3fba1
Showing
4 changed files
with
125 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SharpDX.Direct3D12 | ||
{ | ||
public partial class RootSignatureDeserializer | ||
{ | ||
// <summary> | ||
/// <p> Gets the layout of the root signature. </p> | ||
/// </summary> | ||
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12RootSignatureDeserializer::GetRootSignatureDesc']/*"/> | ||
/// <msdn-id>dn986887</msdn-id> | ||
/// <unmanaged>GetRootSignatureDesc</unmanaged> | ||
/// <unmanaged-short>GetRootSignatureDesc</unmanaged-short> | ||
/// <unmanaged>const D3D12_ROOT_SIGNATURE_DESC* ID3D12RootSignatureDeserializer::GetRootSignatureDesc()</unmanaged> | ||
public SharpDX.Direct3D12.RootSignatureDescription RootSignatureDescription | ||
{ | ||
get { return GetRootSignatureDescription(); } | ||
} | ||
|
||
[UnmanagedFunctionPointer(CallingConvention.StdCall)] | ||
internal delegate IntPtr GetRootSignatureDescDelegate(IntPtr pThis); | ||
|
||
/// <summary> | ||
/// <p> Gets the layout of the root signature. </p> | ||
/// </summary> | ||
/// <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> | ||
/// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3D12RootSignatureDeserializer::GetRootSignatureDesc']/*"/> | ||
/// <msdn-id>dn986887</msdn-id> | ||
/// <unmanaged>const D3D12_ROOT_SIGNATURE_DESC* ID3D12RootSignatureDeserializer::GetRootSignatureDesc()</unmanaged> | ||
/// <unmanaged-short>ID3D12RootSignatureDeserializer::GetRootSignatureDesc</unmanaged-short> | ||
internal SharpDX.Direct3D12.RootSignatureDescription GetRootSignatureDescription() | ||
{ | ||
unsafe | ||
{ | ||
void* target = ((void**)(*(void**)_nativePointer))[3]; | ||
GetRootSignatureDescDelegate getRootSignatureDescMethod = Marshal.GetDelegateForFunctionPointer<GetRootSignatureDescDelegate>(new IntPtr(target)); | ||
IntPtr pDesc = getRootSignatureDescMethod(new IntPtr(_nativePointer)); | ||
return new RootSignatureDescription(pDesc); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters