d3d11on12.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*-------------------------------------------------------------------------------------
  2. *
  3. * Copyright (c) Microsoft Corporation
  4. *
  5. *-------------------------------------------------------------------------------------*/
  6. /* this ALWAYS GENERATED file contains the definitions for the interfaces */
  7. /* File created by MIDL compiler version 8.01.0622 */
  8. /* verify that the <rpcndr.h> version is high enough to compile this file*/
  9. #ifndef __REQUIRED_RPCNDR_H_VERSION__
  10. #define __REQUIRED_RPCNDR_H_VERSION__ 500
  11. #endif
  12. /* verify that the <rpcsal.h> version is high enough to compile this file*/
  13. #ifndef __REQUIRED_RPCSAL_H_VERSION__
  14. #define __REQUIRED_RPCSAL_H_VERSION__ 100
  15. #endif
  16. #include "rpc.h"
  17. #include "rpcndr.h"
  18. #ifndef __RPCNDR_H_VERSION__
  19. #error this stub requires an updated version of <rpcndr.h>
  20. #endif /* __RPCNDR_H_VERSION__ */
  21. #ifndef COM_NO_WINDOWS_H
  22. #include "windows.h"
  23. #include "ole2.h"
  24. #endif /*COM_NO_WINDOWS_H*/
  25. #ifndef __d3d11on12_h__
  26. #define __d3d11on12_h__
  27. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  28. #pragma once
  29. #endif
  30. /* Forward Declarations */
  31. #ifndef __ID3D11On12Device_FWD_DEFINED__
  32. #define __ID3D11On12Device_FWD_DEFINED__
  33. typedef interface ID3D11On12Device ID3D11On12Device;
  34. #endif /* __ID3D11On12Device_FWD_DEFINED__ */
  35. /* header files for imported files */
  36. #include "oaidl.h"
  37. #include "ocidl.h"
  38. #include "d3d11.h"
  39. #include "d3d12.h"
  40. #ifdef __cplusplus
  41. extern "C"{
  42. #endif
  43. /* interface __MIDL_itf_d3d11on12_0000_0000 */
  44. /* [local] */
  45. #include <winapifamily.h>
  46. #pragma region App Family
  47. #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
  48. ///////////////////////////////////////////////////////////////////////////
  49. // D3D11On12CreateDevice
  50. // ------------------
  51. //
  52. // pDevice
  53. // Specifies a pre-existing D3D12 device to use for D3D11 interop.
  54. // May not be NULL.
  55. // Flags
  56. // Any of those documented for D3D11CreateDeviceAndSwapChain.
  57. // pFeatureLevels
  58. // Array of any of the following:
  59. // D3D_FEATURE_LEVEL_12_1
  60. // D3D_FEATURE_LEVEL_12_0
  61. // D3D_FEATURE_LEVEL_11_1
  62. // D3D_FEATURE_LEVEL_11_0
  63. // D3D_FEATURE_LEVEL_10_1
  64. // D3D_FEATURE_LEVEL_10_0
  65. // D3D_FEATURE_LEVEL_9_3
  66. // D3D_FEATURE_LEVEL_9_2
  67. // D3D_FEATURE_LEVEL_9_1
  68. // The first feature level which is less than or equal to the
  69. // D3D12 device's feature level will be used to perform D3D11 validation.
  70. // Creation will fail if no acceptable feature levels are provided.
  71. // Providing NULL will default to the D3D12 device's feature level.
  72. // FeatureLevels
  73. // Size of feature levels array.
  74. // ppCommandQueues
  75. // Array of unique queues for D3D11On12 to use. Valid queue types:
  76. // 3D command queue.
  77. // Flags must be compatible with device flags, and its NodeMask must
  78. // be a subset of the NodeMask provided to this API.
  79. // NumQueues
  80. // Size of command queue array.
  81. // NodeMask
  82. // Which node of the D3D12 device to use. Only 1 bit may be set.
  83. // ppDevice
  84. // Pointer to returned interface. May be NULL.
  85. // ppImmediateContext
  86. // Pointer to returned interface. May be NULL.
  87. // pChosenFeatureLevel
  88. // Pointer to returned feature level. May be NULL.
  89. //
  90. // Return Values
  91. // Any of those documented for
  92. // D3D11CreateDevice
  93. //
  94. ///////////////////////////////////////////////////////////////////////////
  95. typedef HRESULT (WINAPI* PFN_D3D11ON12_CREATE_DEVICE)( _In_ IUnknown*, UINT,
  96. _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL*, UINT FeatureLevels,
  97. _In_reads_opt_( NumQueues ) IUnknown* CONST*, UINT NumQueues,
  98. UINT, _COM_Outptr_opt_ ID3D11Device**, _COM_Outptr_opt_ ID3D11DeviceContext**,
  99. _Out_opt_ D3D_FEATURE_LEVEL* );
  100. HRESULT WINAPI D3D11On12CreateDevice(
  101. _In_ IUnknown* pDevice,
  102. UINT Flags,
  103. _In_reads_opt_( FeatureLevels ) CONST D3D_FEATURE_LEVEL* pFeatureLevels,
  104. UINT FeatureLevels,
  105. _In_reads_opt_( NumQueues ) IUnknown* CONST* ppCommandQueues,
  106. UINT NumQueues,
  107. UINT NodeMask,
  108. _COM_Outptr_opt_ ID3D11Device** ppDevice,
  109. _COM_Outptr_opt_ ID3D11DeviceContext** ppImmediateContext,
  110. _Out_opt_ D3D_FEATURE_LEVEL* pChosenFeatureLevel );
  111. typedef struct D3D11_RESOURCE_FLAGS
  112. {
  113. UINT BindFlags;
  114. UINT MiscFlags;
  115. UINT CPUAccessFlags;
  116. UINT StructureByteStride;
  117. } D3D11_RESOURCE_FLAGS;
  118. extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_c_ifspec;
  119. extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0000_v0_0_s_ifspec;
  120. #ifndef __ID3D11On12Device_INTERFACE_DEFINED__
  121. #define __ID3D11On12Device_INTERFACE_DEFINED__
  122. /* interface ID3D11On12Device */
  123. /* [unique][local][object][uuid] */
  124. EXTERN_C const IID IID_ID3D11On12Device;
  125. #if defined(__cplusplus) && !defined(CINTERFACE)
  126. MIDL_INTERFACE("85611e73-70a9-490e-9614-a9e302777904")
  127. ID3D11On12Device : public IUnknown
  128. {
  129. public:
  130. virtual HRESULT STDMETHODCALLTYPE CreateWrappedResource(
  131. _In_ IUnknown *pResource12,
  132. _In_ const D3D11_RESOURCE_FLAGS *pFlags11,
  133. D3D12_RESOURCE_STATES InState,
  134. D3D12_RESOURCE_STATES OutState,
  135. REFIID riid,
  136. _COM_Outptr_opt_ void **ppResource11) = 0;
  137. virtual void STDMETHODCALLTYPE ReleaseWrappedResources(
  138. _In_reads_( NumResources ) ID3D11Resource *const *ppResources,
  139. UINT NumResources) = 0;
  140. virtual void STDMETHODCALLTYPE AcquireWrappedResources(
  141. _In_reads_( NumResources ) ID3D11Resource *const *ppResources,
  142. UINT NumResources) = 0;
  143. };
  144. #else /* C style interface */
  145. typedef struct ID3D11On12DeviceVtbl
  146. {
  147. BEGIN_INTERFACE
  148. HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
  149. ID3D11On12Device * This,
  150. REFIID riid,
  151. _COM_Outptr_ void **ppvObject);
  152. ULONG ( STDMETHODCALLTYPE *AddRef )(
  153. ID3D11On12Device * This);
  154. ULONG ( STDMETHODCALLTYPE *Release )(
  155. ID3D11On12Device * This);
  156. HRESULT ( STDMETHODCALLTYPE *CreateWrappedResource )(
  157. ID3D11On12Device * This,
  158. _In_ IUnknown *pResource12,
  159. _In_ const D3D11_RESOURCE_FLAGS *pFlags11,
  160. D3D12_RESOURCE_STATES InState,
  161. D3D12_RESOURCE_STATES OutState,
  162. REFIID riid,
  163. _COM_Outptr_opt_ void **ppResource11);
  164. void ( STDMETHODCALLTYPE *ReleaseWrappedResources )(
  165. ID3D11On12Device * This,
  166. _In_reads_( NumResources ) ID3D11Resource *const *ppResources,
  167. UINT NumResources);
  168. void ( STDMETHODCALLTYPE *AcquireWrappedResources )(
  169. ID3D11On12Device * This,
  170. _In_reads_( NumResources ) ID3D11Resource *const *ppResources,
  171. UINT NumResources);
  172. END_INTERFACE
  173. } ID3D11On12DeviceVtbl;
  174. interface ID3D11On12Device
  175. {
  176. CONST_VTBL struct ID3D11On12DeviceVtbl *lpVtbl;
  177. };
  178. #ifdef COBJMACROS
  179. #define ID3D11On12Device_QueryInterface(This,riid,ppvObject) \
  180. ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
  181. #define ID3D11On12Device_AddRef(This) \
  182. ( (This)->lpVtbl -> AddRef(This) )
  183. #define ID3D11On12Device_Release(This) \
  184. ( (This)->lpVtbl -> Release(This) )
  185. #define ID3D11On12Device_CreateWrappedResource(This,pResource12,pFlags11,InState,OutState,riid,ppResource11) \
  186. ( (This)->lpVtbl -> CreateWrappedResource(This,pResource12,pFlags11,InState,OutState,riid,ppResource11) )
  187. #define ID3D11On12Device_ReleaseWrappedResources(This,ppResources,NumResources) \
  188. ( (This)->lpVtbl -> ReleaseWrappedResources(This,ppResources,NumResources) )
  189. #define ID3D11On12Device_AcquireWrappedResources(This,ppResources,NumResources) \
  190. ( (This)->lpVtbl -> AcquireWrappedResources(This,ppResources,NumResources) )
  191. #endif /* COBJMACROS */
  192. #endif /* C style interface */
  193. #endif /* __ID3D11On12Device_INTERFACE_DEFINED__ */
  194. /* interface __MIDL_itf_d3d11on12_0000_0001 */
  195. /* [local] */
  196. #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
  197. #pragma endregion
  198. DEFINE_GUID(IID_ID3D11On12Device,0x85611e73,0x70a9,0x490e,0x96,0x14,0xa9,0xe3,0x02,0x77,0x79,0x04);
  199. extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_c_ifspec;
  200. extern RPC_IF_HANDLE __MIDL_itf_d3d11on12_0000_0001_v0_0_s_ifspec;
  201. /* Additional Prototypes for ALL interfaces */
  202. /* end of Additional Prototypes */
  203. #ifdef __cplusplus
  204. }
  205. #endif
  206. #endif