wined3d: Pass a texture and sub-resource index to surface_load_renderbuffer().
[wine.git] / include / d3d11_1.idl
blob4fd82f002ba050779532d38878a47b1675b5ad3d
1 /*
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
19 import "oaidl.idl";
20 import "ocidl.idl";
21 import "dxgi1_2.idl";
22 import "d3dcommon.idl";
23 import "d3d11.idl";
25 typedef enum D3D11_LOGIC_OP
27 D3D11_LOGIC_OP_CLEAR = 0,
28 D3D11_LOGIC_OP_SET,
29 D3D11_LOGIC_OP_COPY,
30 D3D11_LOGIC_OP_COPY_INVERTED,
31 D3D11_LOGIC_OP_NOOP,
32 D3D11_LOGIC_OP_INVERT,
33 D3D11_LOGIC_OP_AND,
34 D3D11_LOGIC_OP_NAND,
35 D3D11_LOGIC_OP_OR,
36 D3D11_LOGIC_OP_NOR,
37 D3D11_LOGIC_OP_XOR,
38 D3D11_LOGIC_OP_EQUIV,
39 D3D11_LOGIC_OP_AND_REVERSE,
40 D3D11_LOGIC_OP_AND_INVERTED,
41 D3D11_LOGIC_OP_OR_REVERSE,
42 D3D11_LOGIC_OP_OR_INVERTED
43 } D3D11_LOGIC_OP;
45 typedef enum D3D11_COPY_FLAGS
47 D3D11_COPY_NO_OVERWRITE = 0x00000001,
48 D3D11_COPY_DISCARD = 0x00000002,
49 } D3D11_COPY_FLAGS;
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
82 BOOL BlendEnable;
83 BOOL LogicOpEnable;
84 D3D11_BLEND SrcBlend;
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];
99 } D3D11_BLEND_DESC1;
101 typedef struct D3D11_RASTERIZER_DESC1
103 D3D11_FILL_MODE FillMode;
104 D3D11_CULL_MODE CullMode;
105 BOOL FrontCounterClockwise;
106 INT DepthBias;
107 FLOAT DepthBiasClamp;
108 FLOAT SlopeScaledDepthBias;
109 BOOL DepthClipEnable;
110 BOOL ScissorEnable;
111 BOOL MultisampleEnable;
112 BOOL AntialiasedLineEnable;
113 UINT ForcedSampleCount;
114 } D3D11_RASTERIZER_DESC1;
116 typedef struct D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK
118 UINT ClearSize;
119 UINT EncryptedSize;
120 } D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK;
122 typedef struct D3D11_VIDEO_DECODER_BUFFER_DESC1
124 D3D11_VIDEO_DECODER_BUFFER_TYPE BufferType;
125 UINT DataOffset;
126 UINT DataSize;
127 void *pIV;
128 UINT IVSize;
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;
136 UINT BlobSize;
137 void *pBlob;
138 GUID *pKeyInfoId;
139 UINT PrivateDataSize;
140 void *pPrivateData;
141 } D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION;
143 typedef struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
145 BOOL Enable;
146 UINT Width;
147 UINT Height;
148 DXGI_FORMAT Format;
149 } D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT;
151 typedef struct D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA
153 UINT PrivateDataSize;
154 UINT HWProtectionDataSize;
155 BYTE pbInput[4];
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;
165 BYTE pbOutput[4];
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;
173 HRESULT Status;
174 } D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA;
176 typedef struct D3D11_VIDEO_SAMPLE_DESC
178 UINT Width;
179 UINT Height;
180 DXGI_FORMAT Format;
181 DXGI_COLOR_SPACE_TYPE ColorSpace;
182 } D3D11_VIDEO_SAMPLE_DESC;
185 uuid(cc86fabe-da55-401d-85e7-e3c9de2877e9),
186 object,
187 local,
188 pointer_default(unique)
190 interface ID3D11BlendState1 : ID3D11BlendState
192 void GetDesc1(D3D11_BLEND_DESC1 *pDesc);
196 uuid(5c1e0d8a-7c23-48f9-8c59-a92958ceff11),
197 object,
198 local,
199 pointer_default(unique)
201 interface ID3DDeviceContextState : ID3D11DeviceChild
206 uuid(bb2c6faa-b5fb-4082-8e6b-388b8cfa90e1),
207 object,
208 local,
209 pointer_default(unique)
211 interface ID3D11DeviceContext1 : ID3D11DeviceContext
213 void CopySubresourceRegion1(
214 ID3D11Resource *pDstResource,
215 UINT DstSubresource,
216 UINT DstX,
217 UINT DstY,
218 UINT DstZ,
219 ID3D11Resource *pSrcResource,
220 UINT SrcSubresource,
221 const D3D11_BOX *pSrcBox,
222 UINT CopyFlags);
224 void UpdateSubresource1(
225 ID3D11Resource *pDstResource,
226 UINT DstSubresource,
227 const D3D11_BOX *pDstBox,
228 const void *pSrcData,
229 UINT SrcRowPitch,
230 UINT SrcDepthPitch,
231 UINT CopyFlags);
233 void DiscardResource(ID3D11Resource *pResource);
235 void DiscardView(ID3D11View *pResourceView);
237 void VSSetConstantBuffers1(
238 UINT StartSlot,
239 UINT NumBuffers,
240 ID3D11Buffer *const *ppConstantBuffers,
241 const UINT *pFirstConstant,
242 const UINT *pNumConstants);
244 void HSSetConstantBuffers1(
245 UINT StartSlot,
246 UINT NumBuffers,
247 ID3D11Buffer *const *ppConstantBuffers,
248 const UINT *pFirstConstant,
249 const UINT *pNumConstants);
251 void DSSetConstantBuffers1(
252 UINT StartSlot,
253 UINT NumBuffers,
254 ID3D11Buffer *const *ppConstantBuffers,
255 const UINT *pFirstConstant,
256 const UINT *pNumConstants);
258 void GSSetConstantBuffers1(
259 UINT StartSlot,
260 UINT NumBuffers,
261 ID3D11Buffer *const *ppConstantBuffers,
262 const UINT *pFirstConstant,
263 const UINT *pNumConstants);
265 void PSSetConstantBuffers1(
266 UINT StartSlot,
267 UINT NumBuffers,
268 ID3D11Buffer *const *ppConstantBuffers,
269 const UINT *pFirstConstant,
270 const UINT *pNumConstants);
272 void CSSetConstantBuffers1(
273 UINT StartSlot,
274 UINT NumBuffers,
275 ID3D11Buffer *const *ppConstantBuffers,
276 const UINT *pFirstConstant,
277 const UINT *pNumConstants);
279 void VSGetConstantBuffers1(
280 UINT StartSlot,
281 UINT NumBuffers,
282 ID3D11Buffer **ppConstantBuffers,
283 UINT *pFirstConstant,
284 UINT *pNumConstants);
286 void HSGetConstantBuffers1(
287 UINT StartSlot,
288 UINT NumBuffers,
289 ID3D11Buffer **ppConstantBuffers,
290 UINT *pFirstConstant,
291 UINT *pNumConstants);
293 void DSGetConstantBuffers1(
294 UINT StartSlot,
295 UINT NumBuffers,
296 ID3D11Buffer **ppConstantBuffers,
297 UINT *pFirstConstant,
298 UINT *pNumConstants);
300 void GSGetConstantBuffers1(
301 UINT StartSlot,
302 UINT NumBuffers,
303 ID3D11Buffer **ppConstantBuffers,
304 UINT *pFirstConstant,
305 UINT *pNumConstants);
307 void PSGetConstantBuffers1(
308 UINT StartSlot,
309 UINT NumBuffers,
310 ID3D11Buffer **ppConstantBuffers,
311 UINT *pFirstConstant,
312 UINT *pNumConstants);
314 void CSGetConstantBuffers1(
315 UINT StartSlot,
316 UINT NumBuffers,
317 ID3D11Buffer **ppConstantBuffers,
318 UINT *pFirstConstant,
319 UINT *pNumConstants);
321 void SwapDeviceContextState(
322 ID3DDeviceContextState *pState,
323 ID3DDeviceContextState **ppPreviousState);
325 void ClearView(
326 ID3D11View *pView,
327 const FLOAT Color[4],
328 const D3D11_RECT *pRect,
329 UINT NumRects);
331 void DiscardView1(
332 ID3D11View *pResourceView,
333 const D3D11_RECT *pRects,
334 UINT NumRects);
338 uuid(a7f026da-a5f8-4487-a564-15e34357651e),
339 object,
340 local,
341 pointer_default(unique)
343 interface ID3D11VideoContext1 : ID3D11VideoContext
345 HRESULT SubmitDecoderBuffers1(
346 ID3D11VideoDecoder *decoder,
347 UINT buffer_count,
348 const D3D11_VIDEO_DECODER_BUFFER_DESC1 *buffer_desc
350 HRESULT GetDataForNewHardwareKey(
351 ID3D11CryptoSession *session,
352 UINT input_size,
353 const void *input_data,
354 UINT64 *output_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,
376 BOOL shader_usage
378 void VideoProcessorGetOutputColorSpace1(
379 ID3D11VideoProcessor *processor,
380 DXGI_COLOR_SPACE_TYPE *colour_space
382 void VideoProcessorGetOutputShaderUsage(
383 ID3D11VideoProcessor *processor,
384 BOOL *shader_usage
386 void VideoProcessorSetStreamColorSpace1(
387 ID3D11VideoProcessor *processor,
388 UINT stream_index,
389 DXGI_COLOR_SPACE_TYPE colour_space
391 void VideoProcessorSetStreamMirror(
392 ID3D11VideoProcessor *processor,
393 UINT stream_index,
394 BOOL enable,
395 BOOL flip_horizontal,
396 BOOL flip_vertical
398 void VideoProcessorGetStreamColorSpace1(
399 ID3D11VideoProcessor *processor,
400 UINT stream_index,
401 DXGI_COLOR_SPACE_TYPE *colour_space
403 void VideoProcessorGetStreamMirror(
404 ID3D11VideoProcessor *processor,
405 UINT stream_index,
406 BOOL *enable,
407 BOOL *flip_horizontal,
408 BOOL *flip_vertical
410 HRESULT VideoProcessorGetBehaviorHints(
411 ID3D11VideoProcessor *processor,
412 UINT output_width,
413 UINT output_height,
414 DXGI_FORMAT output_format,
415 UINT stream_count,
416 const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT *streams,
417 UINT *behaviour_hints
422 uuid(29da1d51-1321-4454-804b-f5fc9f861f0f),
423 object,
424 local,
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,
433 UINT *input_size,
434 UINT *output_size
436 HRESULT GetVideoDecoderCaps(
437 const GUID *decoder_profile,
438 UINT sample_width,
439 UINT sample_height,
440 const DXGI_RATIONAL *framerate,
441 UINT bitrate,
442 const GUID *crypto_type,
443 UINT *decoder_caps
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,
451 BOOL *supported,
452 BOOL *real_time_hint
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),
465 object,
466 local,
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,
476 BOOL *supported
481 uuid(b2daad8b-03d4-4dbf-95eb-32ab4b63d0ab),
482 object,
483 local,
484 pointer_default(unique)
486 interface ID3DUserDefinedAnnotation : IUnknown
488 INT BeginEvent(LPCWSTR Name);
489 INT EndEvent();
490 void SetMarker(LPCWSTR Name);
491 BOOL GetStatus();
495 uuid(1217d7a6-5039-418c-b042-9cbe256afd6e),
496 object,
497 local,
498 pointer_default(unique)
500 interface ID3D11RasterizerState1 : ID3D11RasterizerState
502 void GetDesc1(D3D11_RASTERIZER_DESC1 *pDesc);
506 uuid(a04bfb29-08ef-43d6-a49c-a9bdbdcbe686),
507 object,
508 local,
509 pointer_default(unique)
511 interface ID3D11Device1 : ID3D11Device
513 void GetImmediateContext1(
514 ID3D11DeviceContext1 **ppImmediateContext);
516 HRESULT CreateDeferredContext1(
517 UINT ContextFlags,
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(
529 UINT Flags,
530 const D3D_FEATURE_LEVEL *pFeatureLevels,
531 UINT FeatureLevels,
532 UINT SDKVersion,
533 REFIID EmulatedInterface,
534 D3D_FEATURE_LEVEL *pChosenFeatureLevel,
535 ID3DDeviceContextState **ppContextState);
537 HRESULT OpenSharedResource1(
538 HANDLE hResource,
539 REFIID returnedInterface,
540 void **ppResource);
542 HRESULT OpenSharedResourceByName(
543 LPCWSTR lpName,
544 DWORD dwDesiredAccess,
545 REFIID returnedInterface,
546 void **ppResource);