Skip to content

Commit a912443

Browse files
committed
Add agility sdk option
1 parent f61b168 commit a912443

19 files changed

+70787
-6
lines changed

src/backends/dx/agility/D3D12TokenizedProgramFormat.hpp

Lines changed: 2634 additions & 0 deletions
Large diffs are not rendered by default.

src/backends/dx/agility/d3d12.h

Lines changed: 36620 additions & 0 deletions
Large diffs are not rendered by default.

src/backends/dx/agility/d3d12.idl

Lines changed: 6758 additions & 0 deletions
Large diffs are not rendered by default.

src/backends/dx/agility/d3d12compatibility.h

Lines changed: 899 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
/*-------------------------------------------------------------------------------------
2+
*
3+
* Copyright (c) Microsoft Corporation
4+
* Licensed under the MIT license
5+
*
6+
*-------------------------------------------------------------------------------------*/
7+
import "oaidl.idl";
8+
import "ocidl.idl";
9+
10+
import "d3d11on12.idl";
11+
12+
cpp_quote("#include <winapifamily.h>")
13+
14+
#pragma region Desktop Family
15+
cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES)")
16+
17+
typedef enum D3D12_COMPATIBILITY_SHARED_FLAGS
18+
{
19+
D3D12_COMPATIBILITY_SHARED_FLAG_NONE = 0,
20+
D3D12_COMPATIBILITY_SHARED_FLAG_NON_NT_HANDLE = 0x1,
21+
D3D12_COMPATIBILITY_SHARED_FLAG_KEYED_MUTEX = 0x2,
22+
D3D12_COMPATIBILITY_SHARED_FLAG_9_ON_12 = 0x4,
23+
24+
} D3D12_COMPATIBILITY_SHARED_FLAGS;
25+
cpp_quote( "DEFINE_ENUM_FLAG_OPERATORS( D3D12_COMPATIBILITY_SHARED_FLAGS )" )
26+
27+
typedef enum D3D12_REFLECT_SHARED_PROPERTY
28+
{
29+
D3D12_REFLECT_SHARED_PROPERTY_D3D11_RESOURCE_FLAGS, // D3D11_RESOURCE_FLAGS
30+
D3D12_REFELCT_SHARED_PROPERTY_COMPATIBILITY_SHARED_FLAGS, // D3D12_COMPATIBILITY_SHARED_FLAGS
31+
D3D12_REFLECT_SHARED_PROPERTY_NON_NT_SHARED_HANDLE, // HANDLE
32+
} D3D12_REFLECT_SHARED_PROPERTY;
33+
34+
[ uuid( 8f1c0e3c-fae3-4a82-b098-bfe1708207ff ), object, local, pointer_default( unique ) ]
35+
interface ID3D12CompatibilityDevice
36+
: IUnknown
37+
{
38+
HRESULT CreateSharedResource(
39+
[annotation("_In_")] const D3D12_HEAP_PROPERTIES* pHeapProperties,
40+
D3D12_HEAP_FLAGS HeapFlags,
41+
[annotation("_In_")] const D3D12_RESOURCE_DESC* pDesc,
42+
D3D12_RESOURCE_STATES InitialResourceState,
43+
[annotation("_In_opt_")] const D3D12_CLEAR_VALUE* pOptimizedClearValue,
44+
[annotation("_In_opt_")] const D3D11_RESOURCE_FLAGS* pFlags11,
45+
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
46+
[annotation("_In_opt_")] ID3D12LifetimeTracker* pLifetimeTracker,
47+
[annotation("_In_opt_")] ID3D12SwapChainAssistant* pOwningSwapchain,
48+
REFIID riid,
49+
[out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppResource);
50+
51+
HRESULT CreateSharedHeap(
52+
[annotation("_In_")] const D3D12_HEAP_DESC* pHeapDesc,
53+
D3D12_COMPATIBILITY_SHARED_FLAGS CompatibilityFlags,
54+
REFIID riid,
55+
[out, iid_is(riid), annotation("_COM_Outptr_opt_")] void** ppHeap);
56+
57+
HRESULT ReflectSharedProperties(
58+
[annotation("_In_")] ID3D12Object* pHeapOrResource,
59+
D3D12_REFLECT_SHARED_PROPERTY ReflectType,
60+
[annotation("_Out_writes_bytes_(DataSize)")] void* pData,
61+
UINT DataSize);
62+
}
63+
64+
[uuid(edbf5678-2960-4e81-8429-99d4b2630c4e), object, local, pointer_default(unique)]
65+
interface D3D11On12CreatorID : IUnknown { };
66+
67+
[uuid(fffcbb7f-15d3-42a2-841e-9d8d32f37ddd), object, local, pointer_default(unique)]
68+
interface D3D9On12CreatorID : IUnknown { };
69+
70+
[uuid(6bb3cd34-0d19-45ab-97ed-d720ba3dfc80), object, local, pointer_default(unique)]
71+
interface OpenGLOn12CreatorID : IUnknown { };
72+
73+
[uuid(3f76bb74-91b5-4a88-b126-20ca0331cd60), object, local, pointer_default(unique)]
74+
interface OpenCLOn12CreatorID : IUnknown { };
75+
76+
[uuid(bc806e01-3052-406c-a3e8-9fc07f048f98), object, local, pointer_default(unique)]
77+
interface VulkanOn12CreatorID : IUnknown { };
78+
79+
[uuid(cb7490ac-8a0f-44ec-9b7b-6f4cafe8e9ab), object, local, pointer_default(unique)]
80+
interface DirectMLTensorFlowCreatorID : IUnknown { };
81+
82+
[uuid(af029192-fba1-4b05-9116-235e06560354), object, local, pointer_default(unique)]
83+
interface DirectMLPyTorchCreatorID : IUnknown { };
84+
85+
[uuid(fdf01a76-1e11-450f-902b-74f04ea08094), object, local, pointer_default(unique)]
86+
interface DirectMLWebNNCreatorID : IUnknown { };
87+
88+
89+
cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_GAMES) */")
90+
#pragma endregion
91+
92+
cpp_quote( "DEFINE_GUID(IID_ID3D12CompatibilityDevice,0x8f1c0e3c,0xfae3,0x4a82,0xb0,0x98,0xbf,0xe1,0x70,0x82,0x07,0xff);" )
93+
cpp_quote( "DEFINE_GUID(IID_D3D11On12CreatorID,0xedbf5678,0x2960,0x4e81,0x84,0x29,0x99,0xd4,0xb2,0x63,0x0c,0x4e);" )
94+
cpp_quote( "DEFINE_GUID(IID_D3D9On12CreatorID,0xfffcbb7f,0x15d3,0x42a2,0x84,0x1e,0x9d,0x8d,0x32,0xf3,0x7d,0xdd);" )
95+
cpp_quote( "DEFINE_GUID(IID_OpenGLOn12CreatorID,0x6bb3cd34,0x0d19,0x45ab,0x97,0xed,0xd7,0x20,0xba,0x3d,0xfc,0x80);" )
96+
cpp_quote( "DEFINE_GUID(IID_OpenCLOn12CreatorID,0x3f76bb74,0x91b5,0x4a88,0xb1,0x26,0x20,0xca,0x03,0x31,0xcd,0x60);" )
97+
cpp_quote( "DEFINE_GUID(IID_VulkanOn12CreatorID,0xbc806e01,0x3052,0x406c,0xa3,0xe8,0x9f,0xc0,0x7f,0x04,0x8f,0x98);" )
98+
cpp_quote( "DEFINE_GUID(IID_DirectMLTensorFlowCreatorID,0xcb7490ac,0x8a0f,0x44ec,0x9b,0x7b,0x6f,0x4c,0xaf,0xe8,0xe9,0xab);" )
99+
cpp_quote( "DEFINE_GUID(IID_DirectMLPyTorchCreatorID,0xaf029192,0xfba1,0x4b05,0x91,0x16,0x23,0x5e,0x06,0x56,0x03,0x54);" )
100+
cpp_quote( "DEFINE_GUID(IID_DirectMLWebNNCreatorID,0xfdf01a76,0x1e11,0x450f,0x90,0x2b,0x74,0xf0,0x4e,0xa0,0x80,0x94);" )

0 commit comments

Comments
 (0)