d3d11_1.idl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /*
  2. * Copyright 2014 Jacek Caban for CodeWeavers
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  17. */
  18. import "oaidl.idl";
  19. import "ocidl.idl";
  20. import "dxgi1_2.idl";
  21. import "d3dcommon.idl";
  22. import "d3d11.idl";
  23. typedef enum D3D11_LOGIC_OP
  24. {
  25. D3D11_LOGIC_OP_CLEAR = 0,
  26. D3D11_LOGIC_OP_SET,
  27. D3D11_LOGIC_OP_COPY,
  28. D3D11_LOGIC_OP_COPY_INVERTED,
  29. D3D11_LOGIC_OP_NOOP,
  30. D3D11_LOGIC_OP_INVERT,
  31. D3D11_LOGIC_OP_AND,
  32. D3D11_LOGIC_OP_NAND,
  33. D3D11_LOGIC_OP_OR,
  34. D3D11_LOGIC_OP_NOR,
  35. D3D11_LOGIC_OP_XOR,
  36. D3D11_LOGIC_OP_EQUIV,
  37. D3D11_LOGIC_OP_AND_REVERSE,
  38. D3D11_LOGIC_OP_AND_INVERTED,
  39. D3D11_LOGIC_OP_OR_REVERSE,
  40. D3D11_LOGIC_OP_OR_INVERTED
  41. } D3D11_LOGIC_OP;
  42. typedef enum D3D11_COPY_FLAGS
  43. {
  44. D3D11_COPY_NO_OVERWRITE = 0x00000001,
  45. D3D11_COPY_DISCARD = 0x00000002,
  46. } D3D11_COPY_FLAGS;
  47. typedef enum D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG
  48. {
  49. D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED = 0x1,
  50. } D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG;
  51. typedef enum D3D11_VIDEO_DECODER_CAPS
  52. {
  53. D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE = 0x01,
  54. D3D11_VIDEO_DECODER_CAPS_NON_REAL_TIME = 0x02,
  55. D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC = 0x04,
  56. D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_REQUIRED = 0x08,
  57. D3D11_VIDEO_DECODER_CAPS_UNSUPPORTED = 0x10,
  58. } D3D11_VIDEO_DECODER_CAPS;
  59. typedef enum D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS
  60. {
  61. D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_ROTATION = 0x01,
  62. D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_RESIZE = 0x02,
  63. D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_COLOR_SPACE_CONVERSION = 0x04,
  64. D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_TRIPLE_BUFFER_OUTPUT = 0x08,
  65. } D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS;
  66. typedef enum D3D11_CRYPTO_SESSION_STATUS
  67. {
  68. D3D11_CRYPTO_SESSION_STATUS_OK = 0x0,
  69. D3D11_CRYPTO_SESSION_STATUS_KEY_LOST = 0x1,
  70. D3D11_CRYPTO_SESSION_STATUS_KEY_AND_CONTENT_LOST = 0x2,
  71. } D3D11_CRYPTO_SESSION_STATUS;
  72. typedef struct D3D11_RENDER_TARGET_BLEND_DESC1
  73. {
  74. BOOL BlendEnable;
  75. BOOL LogicOpEnable;
  76. D3D11_BLEND SrcBlend;
  77. D3D11_BLEND DestBlend;
  78. D3D11_BLEND_OP BlendOp;
  79. D3D11_BLEND SrcBlendAlpha;
  80. D3D11_BLEND DestBlendAlpha;
  81. D3D11_BLEND_OP BlendOpAlpha;
  82. D3D11_LOGIC_OP LogicOp;
  83. UINT8 RenderTargetWriteMask;
  84. } D3D11_RENDER_TARGET_BLEND_DESC1;
  85. typedef struct D3D11_BLEND_DESC1
  86. {
  87. BOOL AlphaToCoverageEnable;
  88. BOOL IndependentBlendEnable;
  89. D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT];
  90. } D3D11_BLEND_DESC1;
  91. typedef struct D3D11_RASTERIZER_DESC1
  92. {
  93. D3D11_FILL_MODE FillMode;
  94. D3D11_CULL_MODE CullMode;
  95. BOOL FrontCounterClockwise;
  96. INT DepthBias;
  97. FLOAT DepthBiasClamp;
  98. FLOAT SlopeScaledDepthBias;
  99. BOOL DepthClipEnable;
  100. BOOL ScissorEnable;
  101. BOOL MultisampleEnable;
  102. BOOL AntialiasedLineEnable;
  103. UINT ForcedSampleCount;
  104. } D3D11_RASTERIZER_DESC1;
  105. typedef struct D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK
  106. {
  107. UINT ClearSize;
  108. UINT EncryptedSize;
  109. } D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK;
  110. typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC1
  111. {
  112. D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType;
  113. UINT DataOffset;
  114. UINT DataSize;
  115. void *pIV;
  116. UINT IVSize;
  117. D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK *pSubSampleMappingBlock;
  118. UINT SubSampleMappingCount;
  119. } D3D11_VIDEO_DECODER_BUFFER_DESC1;
  120. typedef struct D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION
  121. {
  122. ID3D11CryptoSession *pCryptoSession;
  123. UINT BlobSize;
  124. void *pBlob;
  125. GUID *pKeyInfoId;
  126. UINT PrivateDataSize;
  127. void *pPrivateData;
  128. } D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION;
  129. typedef struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
  130. {
  131. BOOL Enable;
  132. UINT Width;
  133. UINT Height;
  134. DXGI_FORMAT Format;
  135. } D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT;
  136. typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA
  137. {
  138. UINT PrivateDataSize;
  139. UINT HWProtectionDataSize;
  140. BYTE pbInput[4];
  141. } D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA;
  142. typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA
  143. {
  144. UINT PrivateDataSize;
  145. UINT MaxHWProtectionDataSize;
  146. UINT HWProtectionDataSize;
  147. UINT64 TransportTime;
  148. UINT64 ExecutionTime;
  149. BYTE pbOutput[4];
  150. } D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA;
  151. typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA
  152. {
  153. UINT HWProtectionFunctionID;
  154. D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA *pInputData;
  155. D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA *pOutputData;
  156. HRESULT Status;
  157. } D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA;
  158. typedef struct D3D11_VIDEO_SAMPLE_DESC
  159. {
  160. UINT Width;
  161. UINT Height;
  162. DXGI_FORMAT Format;
  163. DXGI_COLOR_SPACE_TYPE ColorSpace;
  164. } D3D11_VIDEO_SAMPLE_DESC;
  165. [
  166. uuid(cc86fabe-da55-401d-85e7-e3c9de2877e9),
  167. object,
  168. local,
  169. pointer_default(unique)
  170. ]
  171. interface ID3D11BlendState1 : ID3D11BlendState
  172. {
  173. void GetDesc1(D3D11_BLEND_DESC1 *pDesc);
  174. }
  175. [
  176. uuid(5c1e0d8a-7c23-48f9-8c59-a92958ceff11),
  177. object,
  178. local,
  179. pointer_default(unique)
  180. ]
  181. interface ID3DDeviceContextState : ID3D11DeviceChild
  182. {
  183. }
  184. [
  185. uuid(bb2c6faa-b5fb-4082-8e6b-388b8cfa90e1),
  186. object,
  187. local,
  188. pointer_default(unique)
  189. ]
  190. interface ID3D11DeviceContext1 : ID3D11DeviceContext
  191. {
  192. void CopySubresourceRegion1(
  193. ID3D11Resource *pDstResource,
  194. UINT DstSubresource,
  195. UINT DstX,
  196. UINT DstY,
  197. UINT DstZ,
  198. ID3D11Resource *pSrcResource,
  199. UINT SrcSubresource,
  200. const D3D11_BOX *pSrcBox,
  201. UINT CopyFlags);
  202. void UpdateSubresource1(
  203. ID3D11Resource *pDstResource,
  204. UINT DstSubresource,
  205. const D3D11_BOX *pDstBox,
  206. const void *pSrcData,
  207. UINT SrcRowPitch,
  208. UINT SrcDepthPitch,
  209. UINT CopyFlags);
  210. void DiscardResource(ID3D11Resource *pResource);
  211. void DiscardView(ID3D11View *pResourceView);
  212. void VSSetConstantBuffers1(
  213. UINT StartSlot,
  214. UINT NumBuffers,
  215. ID3D11Buffer *const *ppConstantBuffers,
  216. const UINT *pFirstConstant,
  217. const UINT *pNumConstants);
  218. void HSSetConstantBuffers1(
  219. UINT StartSlot,
  220. UINT NumBuffers,
  221. ID3D11Buffer *const *ppConstantBuffers,
  222. const UINT *pFirstConstant,
  223. const UINT *pNumConstants);
  224. void DSSetConstantBuffers1(
  225. UINT StartSlot,
  226. UINT NumBuffers,
  227. ID3D11Buffer *const *ppConstantBuffers,
  228. const UINT *pFirstConstant,
  229. const UINT *pNumConstants);
  230. void GSSetConstantBuffers1(
  231. UINT StartSlot,
  232. UINT NumBuffers,
  233. ID3D11Buffer *const *ppConstantBuffers,
  234. const UINT *pFirstConstant,
  235. const UINT *pNumConstants);
  236. void PSSetConstantBuffers1(
  237. UINT StartSlot,
  238. UINT NumBuffers,
  239. ID3D11Buffer *const *ppConstantBuffers,
  240. const UINT *pFirstConstant,
  241. const UINT *pNumConstants);
  242. void CSSetConstantBuffers1(
  243. UINT StartSlot,
  244. UINT NumBuffers,
  245. ID3D11Buffer *const *ppConstantBuffers,
  246. const UINT *pFirstConstant,
  247. const UINT *pNumConstants);
  248. void VSGetConstantBuffers1(
  249. UINT StartSlot,
  250. UINT NumBuffers,
  251. ID3D11Buffer **ppConstantBuffers,
  252. UINT *pFirstConstant,
  253. UINT *pNumConstants);
  254. void HSGetConstantBuffers1(
  255. UINT StartSlot,
  256. UINT NumBuffers,
  257. ID3D11Buffer **ppConstantBuffers,
  258. UINT *pFirstConstant,
  259. UINT *pNumConstants);
  260. void DSGetConstantBuffers1(
  261. UINT StartSlot,
  262. UINT NumBuffers,
  263. ID3D11Buffer **ppConstantBuffers,
  264. UINT *pFirstConstant,
  265. UINT *pNumConstants);
  266. void GSGetConstantBuffers1(
  267. UINT StartSlot,
  268. UINT NumBuffers,
  269. ID3D11Buffer **ppConstantBuffers,
  270. UINT *pFirstConstant,
  271. UINT *pNumConstants);
  272. void PSGetConstantBuffers1(
  273. UINT StartSlot,
  274. UINT NumBuffers,
  275. ID3D11Buffer **ppConstantBuffers,
  276. UINT *pFirstConstant,
  277. UINT *pNumConstants);
  278. void CSGetConstantBuffers1(
  279. UINT StartSlot,
  280. UINT NumBuffers,
  281. ID3D11Buffer **ppConstantBuffers,
  282. UINT *pFirstConstant,
  283. UINT *pNumConstants);
  284. void SwapDeviceContextState(
  285. ID3DDeviceContextState *pState,
  286. ID3DDeviceContextState **ppPreviousState);
  287. void ClearView(
  288. ID3D11View *pView,
  289. const FLOAT Color[4],
  290. const D3D11_RECT *pRect,
  291. UINT NumRects);
  292. void DiscardView1(
  293. ID3D11View *pResourceView,
  294. const D3D11_RECT *pRects,
  295. UINT NumRects);
  296. }
  297. [
  298. uuid(a7f026da-a5f8-4487-a564-15e34357651e),
  299. object,
  300. local,
  301. pointer_default(unique)
  302. ]
  303. interface ID3D11VideoContext1 : ID3D11VideoContext
  304. {
  305. HRESULT SubmitDecoderBuffers1(
  306. ID3D11VideoDecoder *decoder,
  307. UINT buffer_count,
  308. const D3D11_VIDEO_DECODER_BUFFER_DESC1 *buffer_desc
  309. );
  310. HRESULT GetDataForNewHardwareKey(
  311. ID3D11CryptoSession *session,
  312. UINT input_size,
  313. const void *input_data,
  314. UINT64 *output_data
  315. );
  316. HRESULT CheckCryptoSessionStatus(
  317. ID3D11CryptoSession *session,
  318. D3D11_CRYPTO_SESSION_STATUS *status
  319. );
  320. HRESULT DecoderEnableDownsampling(
  321. ID3D11VideoDecoder *decoder,
  322. DXGI_COLOR_SPACE_TYPE colour_space,
  323. const D3D11_VIDEO_SAMPLE_DESC *output_desc,
  324. UINT reference_frame_count
  325. );
  326. HRESULT DecoderUpdateDownsampling(
  327. ID3D11VideoDecoder *decoder,
  328. const D3D11_VIDEO_SAMPLE_DESC *output_desc
  329. );
  330. void VideoProcessorSetOutputColorSpace1(
  331. ID3D11VideoProcessor *processor,
  332. DXGI_COLOR_SPACE_TYPE colour_space
  333. );
  334. void VideoProcessorSetOutputShaderUsage(
  335. ID3D11VideoProcessor *processor,
  336. BOOL shader_usage
  337. );
  338. void VideoProcessorGetOutputColorSpace1(
  339. ID3D11VideoProcessor *processor,
  340. DXGI_COLOR_SPACE_TYPE *colour_space
  341. );
  342. void VideoProcessorGetOutputShaderUsage(
  343. ID3D11VideoProcessor *processor,
  344. BOOL *shader_usage
  345. );
  346. void VideoProcessorSetStreamColorSpace1(
  347. ID3D11VideoProcessor *processor,
  348. UINT stream_index,
  349. DXGI_COLOR_SPACE_TYPE colour_space
  350. );
  351. void VideoProcessorSetStreamMirror(
  352. ID3D11VideoProcessor *processor,
  353. UINT stream_index,
  354. BOOL enable,
  355. BOOL flip_horizontal,
  356. BOOL flip_vertical
  357. );
  358. void VideoProcessorGetStreamColorSpace1(
  359. ID3D11VideoProcessor *processor,
  360. UINT stream_index,
  361. DXGI_COLOR_SPACE_TYPE *colour_space
  362. );
  363. void VideoProcessorGetStreamMirror(
  364. ID3D11VideoProcessor *processor,
  365. UINT stream_index,
  366. BOOL *enable,
  367. BOOL *flip_horizontal,
  368. BOOL *flip_vertical
  369. );
  370. HRESULT VideoProcessorGetBehaviorHints(
  371. ID3D11VideoProcessor *processor,
  372. UINT output_width,
  373. UINT output_height,
  374. DXGI_FORMAT output_format,
  375. UINT stream_count,
  376. const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *streams,
  377. UINT *behaviour_hints
  378. );
  379. }
  380. [
  381. uuid(29da1d51-1321-4454-804b-f5fc9f861f0f),
  382. object,
  383. local,
  384. pointer_default(unique)
  385. ]
  386. interface ID3D11VideoDevice1 : ID3D11VideoDevice
  387. {
  388. HRESULT GetCryptoSessionPrivateDataSize(
  389. const GUID *crypto_type,
  390. const GUID *decoder_profile,
  391. const GUID *key_exchange_type,
  392. UINT *input_size,
  393. UINT *output_size
  394. );
  395. HRESULT GetVideoDecoderCaps(
  396. const GUID *decoder_profile,
  397. UINT sample_width,
  398. UINT sample_height,
  399. const DXGI_RATIONAL *framerate,
  400. UINT bitrate,
  401. const GUID *crypto_type,
  402. UINT *decoder_caps
  403. );
  404. HRESULT CheckVideoDecoderDownsampling(
  405. const D3D11_VIDEO_DECODER_DESC *input_desc,
  406. DXGI_COLOR_SPACE_TYPE input_colour_space,
  407. const D3D11_VIDEO_DECODER_CONFIG *input_config,
  408. const DXGI_RATIONAL *framerate,
  409. const D3D11_VIDEO_SAMPLE_DESC *output_desc,
  410. BOOL *supported,
  411. BOOL *real_time_hint
  412. );
  413. HRESULT RecommendVideoDecoderDownsampleParameters(
  414. const D3D11_VIDEO_DECODER_DESC *input_desc,
  415. DXGI_COLOR_SPACE_TYPE input_colour_space,
  416. const D3D11_VIDEO_DECODER_CONFIG *input_config,
  417. const DXGI_RATIONAL *framerate,
  418. D3D11_VIDEO_SAMPLE_DESC *recommended_output_desc
  419. );
  420. }
  421. [
  422. uuid(465217f2-5568-43cf-b5b9-f61d54531ca1),
  423. object,
  424. local,
  425. pointer_default(unique)
  426. ]
  427. interface ID3D11VideoProcessorEnumerator1 : ID3D11VideoProcessorEnumerator
  428. {
  429. HRESULT CheckVideoProcessorFormatConversion(
  430. DXGI_FORMAT input_format,
  431. DXGI_COLOR_SPACE_TYPE input_colour_space,
  432. DXGI_FORMAT output_format,
  433. DXGI_COLOR_SPACE_TYPE output_colour_space,
  434. BOOL *supported
  435. );
  436. }
  437. [
  438. uuid(b2daad8b-03d4-4dbf-95eb-32ab4b63d0ab),
  439. object,
  440. local,
  441. pointer_default(unique)
  442. ]
  443. interface ID3DUserDefinedAnnotation : IUnknown
  444. {
  445. INT BeginEvent(LPCWSTR Name);
  446. INT EndEvent();
  447. void SetMarker(LPCWSTR Name);
  448. BOOL GetStatus();
  449. }
  450. [
  451. uuid(1217d7a6-5039-418c-b042-9cbe256afd6e),
  452. object,
  453. local,
  454. pointer_default(unique)
  455. ]
  456. interface ID3D11RasterizerState1 : ID3D11RasterizerState
  457. {
  458. void GetDesc1(D3D11_RASTERIZER_DESC1 *pDesc);
  459. }
  460. [
  461. uuid(a04bfb29-08ef-43d6-a49c-a9bdbdcbe686),
  462. object,
  463. local,
  464. pointer_default(unique)
  465. ]
  466. interface ID3D11Device1 : ID3D11Device
  467. {
  468. void GetImmediateContext1(
  469. ID3D11DeviceContext1 **ppImmediateContext);
  470. HRESULT CreateDeferredContext1(
  471. UINT ContextFlags,
  472. ID3D11DeviceContext1 **ppDeferredContext);
  473. HRESULT CreateBlendState1(
  474. const D3D11_BLEND_DESC1 *pBlendStateDesc,
  475. ID3D11BlendState1 **ppBlendState);
  476. HRESULT CreateRasterizerState1(
  477. const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
  478. ID3D11RasterizerState1 **ppRasterizerState);
  479. HRESULT CreateDeviceContextState(
  480. UINT Flags,
  481. const D3D_FEATURE_LEVEL *pFeatureLevels,
  482. UINT FeatureLevels,
  483. UINT SDKVersion,
  484. REFIID EmulatedInterface,
  485. D3D_FEATURE_LEVEL *pChosenFeatureLevel,
  486. ID3DDeviceContextState **ppContextState);
  487. HRESULT OpenSharedResource1(
  488. HANDLE hResource,
  489. REFIID returnedInterface,
  490. void **ppResource);
  491. HRESULT OpenSharedResourceByName(
  492. LPCWSTR lpName,
  493. DWORD dwDesiredAccess,
  494. REFIID returnedInterface,
  495. void **ppResource);
  496. }