Skip to content

Commit

Permalink
Merge branch 'master' into HelloBundles
Browse files Browse the repository at this point in the history
  • Loading branch information
IngmarBitter authored May 24, 2020
2 parents f0ce139 + 55ab95c commit 2709e23
Show file tree
Hide file tree
Showing 25 changed files with 1,865 additions and 1 deletion.
52 changes: 52 additions & 0 deletions generation/um/dxcapi/generate.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@../../settings.rsp
@../../remap.rsp
--exclude
DxcValidatorFlags_Default
DxcValidatorFlags_InPlaceEdit
DxcValidatorFlags_RootSignatureOnly
DxcValidatorFlags_ModuleOnly
DxcValidatorFlags_ValidMask
DxcVersionInfoFlags_None
DxcVersionInfoFlags_Debug
DxcVersionInfoFlags_Internal
CLSID_DxcCompiler
CLSID_DxcLinker
CLSID_DxcDiaDataSource
CLSID_DxcLibrary
CLSID_DxcValidator
CLSID_DxcAssembler
CLSID_DxcContainerReflection
CLSID_DxcOptimizer
CLSID_DxcContainerBuilder
--file
um-dxcapi.h
--output
../../../sources/Interop/Windows/um/dxcapi
--traverse
C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/dxcapi.h
--with-attribute
IDxcAssembly=Guid("091F7A26-1C1F-4948-904B-E6E3A8A771D5")
IDxcBlob=Guid("8BA5FB08-5195-40e2-AC58-0D989C3A0102")
IDxcBlobEncoding=Guid("7241d424-2646-4191-97c0-98e96e42fc68")
IDxcBlobUtf16=Guid("A3F84EAB-0FAA-497E-A39C-EE6ED60B2D84")
IDxcBlobUtf8=Guid("3DA636C9-BA71-4024-A301-30CBF125305B")
IDxcIncludeHandler=Guid("7f61fc7d-950d-467f-b3e3-3c02fb49187c")
IDxcCompilerArgs=Guid("73EFFE2A-70DC-45F8-9690-EFF64C02429D")
IDxcLibrary=Guid("e5204dc7-d18c-4c3c-bdfb-851673980fe7")
IDxcOperationResult=Guid("CEDB484A-D4E9-445A-B991-CA21CA157DC2")
IDxcCompiler=Guid("8c210bf3-011f-4422-8d70-6f9acb8db617")
IDxcCompiler2=Guid("A005A9D9-B8BB-4594-B5C9-0E633BEC4D37")
IDxcLinker=Guid("F1B5BE2A-62DD-4327-A1C2-42AC1E1E78E6")
IDxcUtils=Guid("4605C4CB-2019-492A-ADA4-65F20BB7D67F")
IDxcResult=Guid("58346CDA-DDE7-4497-9461-6F87AF5E0659")
IDxcCompiler3=Guid("228B4687-5A6A-4730-900C-9702B2203F54")
IDxcValidator=Guid("A6E82BD2-1FD7-4826-9811-2857E797F49A")
IDxcContainerBuilder=Guid("334b1f50-2292-4b35-99a1-25588d8c17fe")
IDxcAssembler=Guid("091f7a26-1c1f-4948-904b-e6e3a8a771d5")
IDxcContainerReflection=Guid("d2c21b26-8350-4bdc-976a-331ce6f4c54c")
IDxcOptimizerPass=Guid("AE2CD79F-CC22-453F-9B6B-B124E7A5204C")
IDxcOptimizer=Guid("25740E2E-9CBA-401B-9119-4FB42F39F270")
IDxcVersionInfo=Guid("b04f5b50-2059-4f12-a8ff-a1e0cde1cc7e")
IDxcVersionInfo2=Guid("fb6904c4-42f0-4b62-9c46-983af7da7c83")
--with-librarypath
*=dxcompiler
4 changes: 4 additions & 0 deletions generation/um/dxcapi/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.
2 changes: 2 additions & 0 deletions generation/um/dxcapi/um-dxcapi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include <Windows.h>
#include <dxcapi.h>
2 changes: 1 addition & 1 deletion samples/DirectX/D3D12/HelloTriangle12.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private void LoadAssets()
InputSlotClass = D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA,
},
};

// Describe and create the graphics pipeline state object (PSO).
var psoDesc = new D3D12_GRAPHICS_PIPELINE_STATE_DESC {
InputLayout = new D3D12_INPUT_LAYOUT_DESC {
Expand Down
14 changes: 14 additions & 0 deletions sources/Interop/Windows/um/dxcapi/DxcCreateInstance2Proc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public unsafe delegate int DxcCreateInstance2Proc([NativeTypeName("IMalloc *")] IMalloc* pMalloc, [NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPVOID *")] void** ppv);
}
14 changes: 14 additions & 0 deletions sources/Interop/Windows/um/dxcapi/DxcCreateInstanceProc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public unsafe delegate int DxcCreateInstanceProc([NativeTypeName("const IID &")] Guid* rclsid, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("LPVOID *")] void** ppv);
}
16 changes: 16 additions & 0 deletions sources/Interop/Windows/um/dxcapi/DxcDefine.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

namespace TerraFX.Interop
{
public unsafe partial struct DxcDefine
{
[NativeTypeName("LPCWSTR")]
public ushort* Name;

[NativeTypeName("LPCWSTR")]
public ushort* Value;
}
}
72 changes: 72 additions & 0 deletions sources/Interop/Windows/um/dxcapi/IDxcAssembler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[Guid("091f7a26-1c1f-4948-904b-e6e3a8a771d5")]
public unsafe partial struct IDxcAssembler
{
public Vtbl* lpVtbl;

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public delegate int _QueryInterface(IDxcAssembler* pThis, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("ULONG")]
public delegate uint _AddRef(IDxcAssembler* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("ULONG")]
public delegate uint _Release(IDxcAssembler* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public delegate int _AssembleToContainer(IDxcAssembler* pThis, [NativeTypeName("IDxcBlob *")] IDxcBlob* pShader, [NativeTypeName("IDxcOperationResult **")] IDxcOperationResult** ppResult);

[return: NativeTypeName("HRESULT")]
public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject)
{
return Marshal.GetDelegateForFunctionPointer<_QueryInterface>(lpVtbl->QueryInterface)((IDxcAssembler*)Unsafe.AsPointer(ref this), riid, ppvObject);
}

[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return Marshal.GetDelegateForFunctionPointer<_AddRef>(lpVtbl->AddRef)((IDxcAssembler*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("ULONG")]
public uint Release()
{
return Marshal.GetDelegateForFunctionPointer<_Release>(lpVtbl->Release)((IDxcAssembler*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("HRESULT")]
public int AssembleToContainer([NativeTypeName("IDxcBlob *")] IDxcBlob* pShader, [NativeTypeName("IDxcOperationResult **")] IDxcOperationResult** ppResult)
{
return Marshal.GetDelegateForFunctionPointer<_AssembleToContainer>(lpVtbl->AssembleToContainer)((IDxcAssembler*)Unsafe.AsPointer(ref this), pShader, ppResult);
}

public partial struct Vtbl
{
[NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")]
public IntPtr QueryInterface;

[NativeTypeName("ULONG () __attribute__((stdcall))")]
public IntPtr AddRef;

[NativeTypeName("ULONG () __attribute__((stdcall))")]
public IntPtr Release;

[NativeTypeName("HRESULT (IDxcBlob *, IDxcOperationResult **) __attribute__((stdcall))")]
public IntPtr AssembleToContainer;
}
}
}
85 changes: 85 additions & 0 deletions sources/Interop/Windows/um/dxcapi/IDxcBlob.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[Guid("8BA5FB08-5195-40e2-AC58-0D989C3A0102")]
public unsafe partial struct IDxcBlob
{
public Vtbl* lpVtbl;

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public delegate int _QueryInterface(IDxcBlob* pThis, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("ULONG")]
public delegate uint _AddRef(IDxcBlob* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("ULONG")]
public delegate uint _Release(IDxcBlob* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("LPVOID")]
public delegate void* _GetBufferPointer(IDxcBlob* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("SIZE_T")]
public delegate nuint _GetBufferSize(IDxcBlob* pThis);

[return: NativeTypeName("HRESULT")]
public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject)
{
return Marshal.GetDelegateForFunctionPointer<_QueryInterface>(lpVtbl->QueryInterface)((IDxcBlob*)Unsafe.AsPointer(ref this), riid, ppvObject);
}

[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return Marshal.GetDelegateForFunctionPointer<_AddRef>(lpVtbl->AddRef)((IDxcBlob*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("ULONG")]
public uint Release()
{
return Marshal.GetDelegateForFunctionPointer<_Release>(lpVtbl->Release)((IDxcBlob*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("LPVOID")]
public void* GetBufferPointer()
{
return Marshal.GetDelegateForFunctionPointer<_GetBufferPointer>(lpVtbl->GetBufferPointer)((IDxcBlob*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("SIZE_T")]
public nuint GetBufferSize()
{
return Marshal.GetDelegateForFunctionPointer<_GetBufferSize>(lpVtbl->GetBufferSize)((IDxcBlob*)Unsafe.AsPointer(ref this));
}

public partial struct Vtbl
{
[NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")]
public IntPtr QueryInterface;

[NativeTypeName("ULONG () __attribute__((stdcall))")]
public IntPtr AddRef;

[NativeTypeName("ULONG () __attribute__((stdcall))")]
public IntPtr Release;

[NativeTypeName("LPVOID () __attribute__((stdcall))")]
public IntPtr GetBufferPointer;

[NativeTypeName("SIZE_T () __attribute__((stdcall))")]
public IntPtr GetBufferSize;
}
}
}
98 changes: 98 additions & 0 deletions sources/Interop/Windows/um/dxcapi/IDxcBlobEncoding.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from um/dxcapi.h in the Windows SDK for Windows 10.0.19041.0
// Original source is Copyright © Microsoft. All rights reserved.

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

namespace TerraFX.Interop
{
[Guid("7241d424-2646-4191-97c0-98e96e42fc68")]
public unsafe partial struct IDxcBlobEncoding
{
public Vtbl* lpVtbl;

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public delegate int _QueryInterface(IDxcBlobEncoding* pThis, [NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("ULONG")]
public delegate uint _AddRef(IDxcBlobEncoding* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("ULONG")]
public delegate uint _Release(IDxcBlobEncoding* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("LPVOID")]
public delegate void* _GetBufferPointer(IDxcBlobEncoding* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("SIZE_T")]
public delegate nuint _GetBufferSize(IDxcBlobEncoding* pThis);

[UnmanagedFunctionPointer(CallingConvention.Winapi)]
[return: NativeTypeName("HRESULT")]
public delegate int _GetEncoding(IDxcBlobEncoding* pThis, [NativeTypeName("BOOL *")] int* pKnown, [NativeTypeName("UINT32 *")] uint* pCodePage);

[return: NativeTypeName("HRESULT")]
public int QueryInterface([NativeTypeName("const IID &")] Guid* riid, [NativeTypeName("void **")] void** ppvObject)
{
return Marshal.GetDelegateForFunctionPointer<_QueryInterface>(lpVtbl->QueryInterface)((IDxcBlobEncoding*)Unsafe.AsPointer(ref this), riid, ppvObject);
}

[return: NativeTypeName("ULONG")]
public uint AddRef()
{
return Marshal.GetDelegateForFunctionPointer<_AddRef>(lpVtbl->AddRef)((IDxcBlobEncoding*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("ULONG")]
public uint Release()
{
return Marshal.GetDelegateForFunctionPointer<_Release>(lpVtbl->Release)((IDxcBlobEncoding*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("LPVOID")]
public void* GetBufferPointer()
{
return Marshal.GetDelegateForFunctionPointer<_GetBufferPointer>(lpVtbl->GetBufferPointer)((IDxcBlobEncoding*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("SIZE_T")]
public nuint GetBufferSize()
{
return Marshal.GetDelegateForFunctionPointer<_GetBufferSize>(lpVtbl->GetBufferSize)((IDxcBlobEncoding*)Unsafe.AsPointer(ref this));
}

[return: NativeTypeName("HRESULT")]
public int GetEncoding([NativeTypeName("BOOL *")] int* pKnown, [NativeTypeName("UINT32 *")] uint* pCodePage)
{
return Marshal.GetDelegateForFunctionPointer<_GetEncoding>(lpVtbl->GetEncoding)((IDxcBlobEncoding*)Unsafe.AsPointer(ref this), pKnown, pCodePage);
}

public partial struct Vtbl
{
[NativeTypeName("HRESULT (const IID &, void **) __attribute__((stdcall))")]
public IntPtr QueryInterface;

[NativeTypeName("ULONG () __attribute__((stdcall))")]
public IntPtr AddRef;

[NativeTypeName("ULONG () __attribute__((stdcall))")]
public IntPtr Release;

[NativeTypeName("LPVOID () __attribute__((stdcall))")]
public IntPtr GetBufferPointer;

[NativeTypeName("SIZE_T () __attribute__((stdcall))")]
public IntPtr GetBufferSize;

[NativeTypeName("HRESULT (BOOL *, UINT32 *) __attribute__((stdcall))")]
public IntPtr GetEncoding;
}
}
}
Loading

0 comments on commit 2709e23

Please sign in to comment.