2 * Copyright 2014 Jacek Caban for CodeWeavers
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.
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.
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
22 import
"d3dcommon.idl";
25 typedef enum D3D11_LOGIC_OP
27 D3D11_LOGIC_OP_CLEAR
= 0,
30 D3D11_LOGIC_OP_COPY_INVERTED
,
32 D3D11_LOGIC_OP_INVERT
,
39 D3D11_LOGIC_OP_AND_REVERSE
,
40 D3D11_LOGIC_OP_AND_INVERTED
,
41 D3D11_LOGIC_OP_OR_REVERSE
,
42 D3D11_LOGIC_OP_OR_INVERTED
45 typedef enum D3D11_COPY_FLAGS
47 D3D11_COPY_NO_OVERWRITE
= 0x00000001,
48 D3D11_COPY_DISCARD
= 0x00000002,
51 typedef enum D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG
53 D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED
= 0x1,
54 } D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG
;
56 typedef enum D3D11_VIDEO_DECODER_CAPS
58 D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE
= 0x01,
59 D3D11_VIDEO_DECODER_CAPS_NON_REAL_TIME
= 0x02,
60 D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC
= 0x04,
61 D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_REQUIRED
= 0x08,
62 D3D11_VIDEO_DECODER_CAPS_UNSUPPORTED
= 0x10,
63 } D3D11_VIDEO_DECODER_CAPS
;
65 typedef enum D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS
67 D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_ROTATION
= 0x01,
68 D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_RESIZE
= 0x02,
69 D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_COLOR_SPACE_CONVERSION
= 0x04,
70 D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_TRIPLE_BUFFER_OUTPUT
= 0x08,
71 } D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS
;
73 typedef enum D3D11_CRYPTO_SESSION_STATUS
75 D3D11_CRYPTO_SESSION_STATUS_OK
= 0x0,
76 D3D11_CRYPTO_SESSION_STATUS_KEY_LOST
= 0x1,
77 D3D11_CRYPTO_SESSION_STATUS_KEY_AND_CONTENT_LOST
= 0x2,
78 } D3D11_CRYPTO_SESSION_STATUS
;
80 typedef struct D3D11_RENDER_TARGET_BLEND_DESC1
85 D3D11_BLEND DestBlend
;
86 D3D11_BLEND_OP BlendOp
;
87 D3D11_BLEND SrcBlendAlpha
;
88 D3D11_BLEND DestBlendAlpha
;
89 D3D11_BLEND_OP BlendOpAlpha
;
90 D3D11_LOGIC_OP LogicOp
;
91 UINT8 RenderTargetWriteMask
;
92 } D3D11_RENDER_TARGET_BLEND_DESC1
;
94 typedef struct D3D11_BLEND_DESC1
96 BOOL AlphaToCoverageEnable
;
97 BOOL IndependentBlendEnable
;
98 D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget
[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT
];
101 typedef struct D3D11_RASTERIZER_DESC1
103 D3D11_FILL_MODE FillMode
;
104 D3D11_CULL_MODE CullMode
;
105 BOOL FrontCounterClockwise
;
107 FLOAT DepthBiasClamp
;
108 FLOAT SlopeScaledDepthBias
;
109 BOOL DepthClipEnable
;
111 BOOL MultisampleEnable
;
112 BOOL AntialiasedLineEnable
;
113 UINT ForcedSampleCount
;
114 } D3D11_RASTERIZER_DESC1
;
116 typedef struct D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK
120 } D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK
;
122 typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC1
124 D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType
;
129 D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK
*pSubSampleMappingBlock
;
130 UINT SubSampleMappingCount
;
131 } D3D11_VIDEO_DECODER_BUFFER_DESC1
;
133 typedef struct D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION
135 ID3D11CryptoSession
*pCryptoSession
;
139 UINT PrivateDataSize
;
141 } D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION
;
143 typedef struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
149 } D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
;
151 typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA
153 UINT PrivateDataSize
;
154 UINT HWProtectionDataSize
;
156 } D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA
;
158 typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA
160 UINT PrivateDataSize
;
161 UINT MaxHWProtectionDataSize
;
162 UINT HWProtectionDataSize
;
163 UINT64 TransportTime
;
164 UINT64 ExecutionTime
;
166 } D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA
;
168 typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA
170 UINT HWProtectionFunctionID
;
171 D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA
*pInputData
;
172 D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA
*pOutputData
;
174 } D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA
;
176 typedef struct D3D11_VIDEO_SAMPLE_DESC
181 DXGI_COLOR_SPACE_TYPE ColorSpace
;
182 } D3D11_VIDEO_SAMPLE_DESC
;
185 uuid(cc86fabe
-da55
-401d
-85e7
-e3c9de2877e9
),
188 pointer_default(unique)
190 interface ID3D11BlendState1
: ID3D11BlendState
192 void GetDesc1
(D3D11_BLEND_DESC1
*pDesc
);
196 uuid(5c1e0d8a
-7c23
-48f9
-8c59
-a92958ceff11
),
199 pointer_default(unique)
201 interface ID3DDeviceContextState
: ID3D11DeviceChild
206 uuid(bb2c6faa
-b5fb
-4082-8e6b
-388b8cfa90e1
),
209 pointer_default(unique)
211 interface ID3D11DeviceContext1
: ID3D11DeviceContext
213 void CopySubresourceRegion1
(
214 ID3D11Resource
*pDstResource
,
219 ID3D11Resource
*pSrcResource
,
221 const D3D11_BOX
*pSrcBox
,
224 void UpdateSubresource1
(
225 ID3D11Resource
*pDstResource
,
227 const D3D11_BOX
*pDstBox
,
228 const void *pSrcData
,
233 void DiscardResource
(ID3D11Resource
*pResource
);
235 void DiscardView
(ID3D11View
*pResourceView
);
237 void VSSetConstantBuffers1
(
240 ID3D11Buffer
*const *ppConstantBuffers
,
241 const UINT
*pFirstConstant
,
242 const UINT
*pNumConstants
);
244 void HSSetConstantBuffers1
(
247 ID3D11Buffer
*const *ppConstantBuffers
,
248 const UINT
*pFirstConstant
,
249 const UINT
*pNumConstants
);
251 void DSSetConstantBuffers1
(
254 ID3D11Buffer
*const *ppConstantBuffers
,
255 const UINT
*pFirstConstant
,
256 const UINT
*pNumConstants
);
258 void GSSetConstantBuffers1
(
261 ID3D11Buffer
*const *ppConstantBuffers
,
262 const UINT
*pFirstConstant
,
263 const UINT
*pNumConstants
);
265 void PSSetConstantBuffers1
(
268 ID3D11Buffer
*const *ppConstantBuffers
,
269 const UINT
*pFirstConstant
,
270 const UINT
*pNumConstants
);
272 void CSSetConstantBuffers1
(
275 ID3D11Buffer
*const *ppConstantBuffers
,
276 const UINT
*pFirstConstant
,
277 const UINT
*pNumConstants
);
279 void VSGetConstantBuffers1
(
282 ID3D11Buffer
**ppConstantBuffers
,
283 UINT
*pFirstConstant
,
284 UINT
*pNumConstants
);
286 void HSGetConstantBuffers1
(
289 ID3D11Buffer
**ppConstantBuffers
,
290 UINT
*pFirstConstant
,
291 UINT
*pNumConstants
);
293 void DSGetConstantBuffers1
(
296 ID3D11Buffer
**ppConstantBuffers
,
297 UINT
*pFirstConstant
,
298 UINT
*pNumConstants
);
300 void GSGetConstantBuffers1
(
303 ID3D11Buffer
**ppConstantBuffers
,
304 UINT
*pFirstConstant
,
305 UINT
*pNumConstants
);
307 void PSGetConstantBuffers1
(
310 ID3D11Buffer
**ppConstantBuffers
,
311 UINT
*pFirstConstant
,
312 UINT
*pNumConstants
);
314 void CSGetConstantBuffers1
(
317 ID3D11Buffer
**ppConstantBuffers
,
318 UINT
*pFirstConstant
,
319 UINT
*pNumConstants
);
321 void SwapDeviceContextState
(
322 ID3DDeviceContextState
*pState
,
323 ID3DDeviceContextState
**ppPreviousState
);
327 const FLOAT Color
[4],
328 const D3D11_RECT
*pRect
,
332 ID3D11View
*pResourceView
,
333 const D3D11_RECT
*pRects
,
338 uuid(a7f026da
-a5f8
-4487-a564
-15e34357651e
),
341 pointer_default(unique)
343 interface ID3D11VideoContext1
: ID3D11VideoContext
345 HRESULT SubmitDecoderBuffers1
(
346 ID3D11VideoDecoder
*decoder
,
348 const D3D11_VIDEO_DECODER_BUFFER_DESC1
*buffer_desc
350 HRESULT GetDataForNewHardwareKey
(
351 ID3D11CryptoSession
*session
,
353 const void *input_data
,
356 HRESULT CheckCryptoSessionStatus
(
357 ID3D11CryptoSession
*session
,
358 D3D11_CRYPTO_SESSION_STATUS
*status
360 HRESULT DecoderEnableDownsampling
(
361 ID3D11VideoDecoder
*decoder
,
362 DXGI_COLOR_SPACE_TYPE colour_space
,
363 const D3D11_VIDEO_SAMPLE_DESC
*output_desc
,
364 UINT reference_frame_count
366 HRESULT DecoderUpdateDownsampling
(
367 ID3D11VideoDecoder
*decoder
,
368 const D3D11_VIDEO_SAMPLE_DESC
*output_desc
370 void VideoProcessorSetOutputColorSpace1
(
371 ID3D11VideoProcessor
*processor
,
372 DXGI_COLOR_SPACE_TYPE colour_space
374 void VideoProcessorSetOutputShaderUsage
(
375 ID3D11VideoProcessor
*processor
,
378 void VideoProcessorGetOutputColorSpace1
(
379 ID3D11VideoProcessor
*processor
,
380 DXGI_COLOR_SPACE_TYPE
*colour_space
382 void VideoProcessorGetOutputShaderUsage
(
383 ID3D11VideoProcessor
*processor
,
386 void VideoProcessorSetStreamColorSpace1
(
387 ID3D11VideoProcessor
*processor
,
389 DXGI_COLOR_SPACE_TYPE colour_space
391 void VideoProcessorSetStreamMirror
(
392 ID3D11VideoProcessor
*processor
,
395 BOOL flip_horizontal
,
398 void VideoProcessorGetStreamColorSpace1
(
399 ID3D11VideoProcessor
*processor
,
401 DXGI_COLOR_SPACE_TYPE
*colour_space
403 void VideoProcessorGetStreamMirror
(
404 ID3D11VideoProcessor
*processor
,
407 BOOL
*flip_horizontal
,
410 HRESULT VideoProcessorGetBehaviorHints
(
411 ID3D11VideoProcessor
*processor
,
414 DXGI_FORMAT output_format
,
416 const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
*streams
,
417 UINT
*behaviour_hints
422 uuid(29da1d51
-1321-4454-804b
-f5fc9f861f0f
),
425 pointer_default(unique)
427 interface ID3D11VideoDevice1
: ID3D11VideoDevice
429 HRESULT GetCryptoSessionPrivateDataSize
(
430 const GUID
*crypto_type
,
431 const GUID
*decoder_profile
,
432 const GUID
*key_exchange_type
,
436 HRESULT GetVideoDecoderCaps
(
437 const GUID
*decoder_profile
,
440 const DXGI_RATIONAL
*framerate
,
442 const GUID
*crypto_type
,
445 HRESULT CheckVideoDecoderDownsampling
(
446 const D3D11_VIDEO_DECODER_DESC
*input_desc
,
447 DXGI_COLOR_SPACE_TYPE input_colour_space
,
448 const D3D11_VIDEO_DECODER_CONFIG
*input_config
,
449 const DXGI_RATIONAL
*framerate
,
450 const D3D11_VIDEO_SAMPLE_DESC
*output_desc
,
454 HRESULT RecommendVideoDecoderDownsampleParameters
(
455 const D3D11_VIDEO_DECODER_DESC
*input_desc
,
456 DXGI_COLOR_SPACE_TYPE input_colour_space
,
457 const D3D11_VIDEO_DECODER_CONFIG
*input_config
,
458 const DXGI_RATIONAL
*framerate
,
459 D3D11_VIDEO_SAMPLE_DESC
*recommended_output_desc
464 uuid(465217f2
-5568-43cf
-b5b9
-f61d54531ca1
),
467 pointer_default(unique)
469 interface ID3D11VideoProcessorEnumerator1
: ID3D11VideoProcessorEnumerator
471 HRESULT CheckVideoProcessorFormatConversion
(
472 DXGI_FORMAT input_format
,
473 DXGI_COLOR_SPACE_TYPE input_colour_space
,
474 DXGI_FORMAT output_format
,
475 DXGI_COLOR_SPACE_TYPE output_colour_space
,
481 uuid(b2daad8b
-03d4
-4dbf
-95eb
-32ab4b63d0ab
),
484 pointer_default(unique)
486 interface ID3DUserDefinedAnnotation
: IUnknown
488 INT BeginEvent
(LPCWSTR Name
);
490 void SetMarker
(LPCWSTR Name
);
495 uuid(1217d7a6
-5039-418c
-b042
-9cbe256afd6e
),
498 pointer_default(unique)
500 interface ID3D11RasterizerState1
: ID3D11RasterizerState
502 void GetDesc1
(D3D11_RASTERIZER_DESC1
*pDesc
);
506 uuid(a04bfb29
-08ef
-43d6
-a49c
-a9bdbdcbe686
),
509 pointer_default(unique)
511 interface ID3D11Device1
: ID3D11Device
513 void GetImmediateContext1
(
514 ID3D11DeviceContext1
**ppImmediateContext
);
516 HRESULT CreateDeferredContext1
(
518 ID3D11DeviceContext1
**ppDeferredContext
);
520 HRESULT CreateBlendState1
(
521 const D3D11_BLEND_DESC1
*pBlendStateDesc
,
522 ID3D11BlendState1
**ppBlendState
);
524 HRESULT CreateRasterizerState1
(
525 const D3D11_RASTERIZER_DESC1
*pRasterizerDesc
,
526 ID3D11RasterizerState1
**ppRasterizerState
);
528 HRESULT CreateDeviceContextState
(
530 const D3D_FEATURE_LEVEL
*pFeatureLevels
,
533 REFIID EmulatedInterface
,
534 D3D_FEATURE_LEVEL
*pChosenFeatureLevel
,
535 ID3DDeviceContextState
**ppContextState
);
537 HRESULT OpenSharedResource1
(
539 REFIID returnedInterface
,
542 HRESULT OpenSharedResourceByName
(
544 DWORD dwDesiredAccess
,
545 REFIID returnedInterface
,