1 /*  RetroArch - A frontend for libretro.
2  *  Copyright (C) 2014-2018 - Ali Bouhlel
3  *
4  *  RetroArch is free software: you can redistribute it and/or modify it under the terms
5  *  of the GNU General Public License as published by the Free Software Found-
6  *  ation, either version 3 of the License, or (at your option) any later version.
7  *
8  *  RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9  *  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  *  PURPOSE.  See the GNU General Public License for more details.
11  *
12  *  You should have received a copy of the GNU General Public License along with RetroArch.
13  *  If not, see <http://www.gnu.org/licenses/>.
14  */
15 
16 #pragma once
17 
18 #include <retro_inline.h>
19 
20 #include <lists/string_list.h>
21 
22 #include "dxgi_common.h"
23 #ifdef CINTERFACE
24 #define D3D11_NO_HELPERS
25 #endif
26 #include <d3d11.h>
27 
28 #define D3D11_MAX_GPU_COUNT 16
29 
30 typedef const ID3D11ShaderResourceView* D3D11ShaderResourceViewRef;
31 typedef const ID3D11SamplerState*       D3D11SamplerStateRef;
32 typedef const ID3D11BlendState*         D3D11BlendStateRef;
33 
34 typedef ID3D11InputLayout*              D3D11InputLayout;
35 typedef ID3D11RasterizerState*          D3D11RasterizerState;
36 typedef ID3D11DepthStencilState*        D3D11DepthStencilState;
37 typedef ID3D11BlendState*               D3D11BlendState;
38 typedef ID3D11PixelShader*              D3D11PixelShader;
39 typedef ID3D11SamplerState*             D3D11SamplerState;
40 typedef ID3D11VertexShader*             D3D11VertexShader;
41 typedef ID3D11DomainShader*             D3D11DomainShader;
42 typedef ID3D11HullShader*               D3D11HullShader;
43 typedef ID3D11ComputeShader*            D3D11ComputeShader;
44 typedef ID3D11GeometryShader*           D3D11GeometryShader;
45 
46 /* auto-generated */
47 
48 typedef ID3D11Resource*                 D3D11Resource;
49 typedef ID3D11Buffer*                   D3D11Buffer;
50 typedef ID3D11Texture1D*                D3D11Texture1D;
51 typedef ID3D11Texture2D*                D3D11Texture2D;
52 typedef ID3D11Texture3D*                D3D11Texture3D;
53 typedef ID3D11View*                     D3D11View;
54 typedef ID3D11ShaderResourceView*       D3D11ShaderResourceView;
55 typedef ID3D11RenderTargetView*         D3D11RenderTargetView;
56 typedef ID3D11DepthStencilView*         D3D11DepthStencilView;
57 typedef ID3D11UnorderedAccessView*      D3D11UnorderedAccessView;
58 typedef ID3D11Asynchronous*             D3D11Asynchronous;
59 typedef ID3D11Query*                    D3D11Query;
60 typedef ID3D11Predicate*                D3D11Predicate;
61 typedef ID3D11Counter*                  D3D11Counter;
62 typedef ID3D11ClassInstance*            D3D11ClassInstance;
63 typedef ID3D11ClassLinkage*             D3D11ClassLinkage;
64 typedef ID3D11CommandList*              D3D11CommandList;
65 typedef ID3D11DeviceContext*            D3D11DeviceContext;
66 typedef ID3D11VideoDecoder*             D3D11VideoDecoder;
67 typedef ID3D11VideoProcessorEnumerator* D3D11VideoProcessorEnumerator;
68 typedef ID3D11VideoProcessor*           D3D11VideoProcessor;
69 typedef ID3D11AuthenticatedChannel*     D3D11AuthenticatedChannel;
70 typedef ID3D11CryptoSession*            D3D11CryptoSession;
71 typedef ID3D11VideoDecoderOutputView*   D3D11VideoDecoderOutputView;
72 typedef ID3D11VideoProcessorInputView*  D3D11VideoProcessorInputView;
73 typedef ID3D11VideoProcessorOutputView* D3D11VideoProcessorOutputView;
74 typedef ID3D11VideoContext*             D3D11VideoContext;
75 typedef ID3D11VideoDevice*              D3D11VideoDevice;
76 typedef ID3D11Device*                   D3D11Device;
77 #ifdef DEBUG
78 typedef ID3D11Debug*                    D3D11Debug;
79 #endif
80 typedef ID3D11SwitchToRef*              D3D11SwitchToRef;
81 typedef ID3D11TracingDevice*            D3D11TracingDevice;
82 typedef ID3D11InfoQueue*                D3D11InfoQueue;
83 
84 #if !defined(__cplusplus) || defined(CINTERFACE)
D3D11SetResourceEvictionPriority(D3D11Resource resource,UINT eviction_priority)85 static INLINE void D3D11SetResourceEvictionPriority(D3D11Resource resource, UINT eviction_priority)
86 {
87    resource->lpVtbl->SetEvictionPriority(resource, eviction_priority);
88 }
D3D11GetResourceEvictionPriority(D3D11Resource resource)89 static INLINE UINT D3D11GetResourceEvictionPriority(D3D11Resource resource)
90 {
91    return resource->lpVtbl->GetEvictionPriority(resource);
92 }
D3D11SetBufferEvictionPriority(D3D11Buffer buffer,UINT eviction_priority)93 static INLINE void D3D11SetBufferEvictionPriority(D3D11Buffer buffer, UINT eviction_priority)
94 {
95    buffer->lpVtbl->SetEvictionPriority(buffer, eviction_priority);
96 }
D3D11GetBufferEvictionPriority(D3D11Buffer buffer)97 static INLINE UINT D3D11GetBufferEvictionPriority(D3D11Buffer buffer)
98 {
99    return buffer->lpVtbl->GetEvictionPriority(buffer);
100 }
101 static INLINE void
D3D11SetTexture1DEvictionPriority(D3D11Texture1D texture1d,UINT eviction_priority)102 D3D11SetTexture1DEvictionPriority(D3D11Texture1D texture1d, UINT eviction_priority)
103 {
104    texture1d->lpVtbl->SetEvictionPriority(texture1d, eviction_priority);
105 }
D3D11GetTexture1DEvictionPriority(D3D11Texture1D texture1d)106 static INLINE UINT D3D11GetTexture1DEvictionPriority(D3D11Texture1D texture1d)
107 {
108    return texture1d->lpVtbl->GetEvictionPriority(texture1d);
109 }
110 static INLINE void
D3D11SetTexture2DEvictionPriority(D3D11Texture2D texture2d,UINT eviction_priority)111 D3D11SetTexture2DEvictionPriority(D3D11Texture2D texture2d, UINT eviction_priority)
112 {
113    texture2d->lpVtbl->SetEvictionPriority(texture2d, eviction_priority);
114 }
D3D11GetTexture2DEvictionPriority(D3D11Texture2D texture2d)115 static INLINE UINT D3D11GetTexture2DEvictionPriority(D3D11Texture2D texture2d)
116 {
117    return texture2d->lpVtbl->GetEvictionPriority(texture2d);
118 }
119 static INLINE void
D3D11SetTexture3DEvictionPriority(D3D11Texture3D texture3d,UINT eviction_priority)120 D3D11SetTexture3DEvictionPriority(D3D11Texture3D texture3d, UINT eviction_priority)
121 {
122    texture3d->lpVtbl->SetEvictionPriority(texture3d, eviction_priority);
123 }
D3D11GetTexture3DEvictionPriority(D3D11Texture3D texture3d)124 static INLINE UINT D3D11GetTexture3DEvictionPriority(D3D11Texture3D texture3d)
125 {
126    return texture3d->lpVtbl->GetEvictionPriority(texture3d);
127 }
D3D11GetTexture2DDesc(D3D11Texture2D texture2d,D3D11_TEXTURE2D_DESC * desc)128 static INLINE void D3D11GetTexture2DDesc(D3D11Texture2D texture2d, D3D11_TEXTURE2D_DESC* desc)
129 {
130     texture2d->lpVtbl->GetDesc(texture2d, desc);
131 }
D3D11GetViewResource(D3D11View view,D3D11Resource * resource)132 static INLINE void D3D11GetViewResource(D3D11View view, D3D11Resource* resource)
133 {
134    view->lpVtbl->GetResource(view, resource);
135 }
D3D11GetShaderResourceViewResource(D3D11ShaderResourceView shader_resource_view,D3D11Resource * resource)136 static INLINE void D3D11GetShaderResourceViewResource(
137       D3D11ShaderResourceView shader_resource_view, D3D11Resource* resource)
138 {
139    shader_resource_view->lpVtbl->GetResource(shader_resource_view, resource);
140 }
D3D11GetShaderResourceViewTexture2D(D3D11ShaderResourceView shader_resource_view,D3D11Texture2D * texture2d)141 static INLINE void D3D11GetShaderResourceViewTexture2D(
142     D3D11ShaderResourceView shader_resource_view, D3D11Texture2D* texture2d)
143 {
144     shader_resource_view->lpVtbl->GetResource(shader_resource_view, (D3D11Resource*)texture2d);
145 }
D3D11GetShaderResourceViewDesc(D3D11ShaderResourceView shader_resource_view,D3D11_SHADER_RESOURCE_VIEW_DESC * desc)146 static INLINE void D3D11GetShaderResourceViewDesc(
147     D3D11ShaderResourceView shader_resource_view, D3D11_SHADER_RESOURCE_VIEW_DESC* desc)
148 {
149     shader_resource_view->lpVtbl->GetDesc(shader_resource_view, desc);
150 }
151 static INLINE void
D3D11GetRenderTargetViewResource(D3D11RenderTargetView render_target_view,D3D11Resource * resource)152 D3D11GetRenderTargetViewResource(D3D11RenderTargetView render_target_view, D3D11Resource* resource)
153 {
154    render_target_view->lpVtbl->GetResource(render_target_view, resource);
155 }
156 static INLINE void
D3D11GetDepthStencilViewResource(D3D11DepthStencilView depth_stencil_view,D3D11Resource * resource)157 D3D11GetDepthStencilViewResource(D3D11DepthStencilView depth_stencil_view, D3D11Resource* resource)
158 {
159    depth_stencil_view->lpVtbl->GetResource(depth_stencil_view, resource);
160 }
D3D11GetUnorderedAccessViewResource(D3D11UnorderedAccessView unordered_access_view,D3D11Resource * resource)161 static INLINE void D3D11GetUnorderedAccessViewResource(
162       D3D11UnorderedAccessView unordered_access_view, D3D11Resource* resource)
163 {
164    unordered_access_view->lpVtbl->GetResource(unordered_access_view, resource);
165 }
D3D11GetAsynchronousDataSize(D3D11Asynchronous asynchronous)166 static INLINE UINT D3D11GetAsynchronousDataSize(D3D11Asynchronous asynchronous)
167 {
168    return asynchronous->lpVtbl->GetDataSize(asynchronous);
169 }
D3D11GetQueryDataSize(D3D11Query query)170 static INLINE UINT D3D11GetQueryDataSize(D3D11Query query)
171 {
172    return query->lpVtbl->GetDataSize(query);
173 }
D3D11GetPredicateDataSize(D3D11Predicate predicate)174 static INLINE UINT D3D11GetPredicateDataSize(D3D11Predicate predicate)
175 {
176    return predicate->lpVtbl->GetDataSize(predicate);
177 }
D3D11GetCounterDataSize(D3D11Counter counter)178 static INLINE UINT D3D11GetCounterDataSize(D3D11Counter counter)
179 {
180    return counter->lpVtbl->GetDataSize(counter);
181 }
182 static INLINE void
D3D11GetClassLinkage(D3D11ClassInstance class_instance,D3D11ClassLinkage * linkage)183 D3D11GetClassLinkage(D3D11ClassInstance class_instance, D3D11ClassLinkage* linkage)
184 {
185    class_instance->lpVtbl->GetClassLinkage(class_instance, linkage);
186 }
187 static INLINE void
D3D11GetInstanceName(D3D11ClassInstance class_instance,LPSTR instance_name,SIZE_T * buffer_length)188 D3D11GetInstanceName(D3D11ClassInstance class_instance, LPSTR instance_name, SIZE_T* buffer_length)
189 {
190    class_instance->lpVtbl->GetInstanceName(class_instance, instance_name, buffer_length);
191 }
192 static INLINE void
D3D11GetTypeName(D3D11ClassInstance class_instance,LPSTR type_name,SIZE_T * buffer_length)193 D3D11GetTypeName(D3D11ClassInstance class_instance, LPSTR type_name, SIZE_T* buffer_length)
194 {
195    class_instance->lpVtbl->GetTypeName(class_instance, type_name, buffer_length);
196 }
D3D11GetClassInstance(D3D11ClassLinkage class_linkage,LPCSTR class_instance_name,UINT instance_index,D3D11ClassInstance * instance)197 static INLINE HRESULT D3D11GetClassInstance(
198       D3D11ClassLinkage   class_linkage,
199       LPCSTR              class_instance_name,
200       UINT                instance_index,
201       D3D11ClassInstance* instance)
202 {
203    return class_linkage->lpVtbl->GetClassInstance(
204          class_linkage, class_instance_name, instance_index, instance);
205 }
D3D11CreateClassInstance(D3D11ClassLinkage class_linkage,LPCSTR class_type_name,UINT constant_buffer_offset,UINT constant_vector_offset,UINT texture_offset,UINT sampler_offset,D3D11ClassInstance * instance)206 static INLINE HRESULT D3D11CreateClassInstance(
207       D3D11ClassLinkage   class_linkage,
208       LPCSTR              class_type_name,
209       UINT                constant_buffer_offset,
210       UINT                constant_vector_offset,
211       UINT                texture_offset,
212       UINT                sampler_offset,
213       D3D11ClassInstance* instance)
214 {
215    return class_linkage->lpVtbl->CreateClassInstance(
216          class_linkage, class_type_name, constant_buffer_offset, constant_vector_offset,
217          texture_offset, sampler_offset, instance);
218 }
D3D11GetCommandListContextFlags(D3D11CommandList command_list)219 static INLINE UINT D3D11GetCommandListContextFlags(D3D11CommandList command_list)
220 {
221    return command_list->lpVtbl->GetContextFlags(command_list);
222 }
D3D11SetVShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,const D3D11Buffer * constant_buffers)223 static INLINE void D3D11SetVShaderConstantBuffers(
224       D3D11DeviceContext device_context,
225       UINT               start_slot,
226       UINT               num_buffers,
227       const D3D11Buffer* constant_buffers)
228 {
229    device_context->lpVtbl->VSSetConstantBuffers(
230          device_context, start_slot, num_buffers, constant_buffers);
231 }
D3D11SetPShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,ID3D11ShaderResourceView * const * shader_resource_views)232 static INLINE void D3D11SetPShaderResources(
233       D3D11DeviceContext               device_context,
234       UINT                             start_slot,
235       UINT                             num_views,
236       ID3D11ShaderResourceView* const* shader_resource_views)
237 {
238    device_context->lpVtbl->PSSetShaderResources(
239          device_context, start_slot, num_views,
240          shader_resource_views);
241 }
D3D11SetPShader(D3D11DeviceContext device_context,D3D11PixelShader pixel_shader,D3D11ClassInstance * const class_instances,UINT num_class_instances)242 static INLINE void D3D11SetPShader(
243       D3D11DeviceContext        device_context,
244       D3D11PixelShader          pixel_shader,
245       D3D11ClassInstance* const class_instances,
246       UINT                      num_class_instances)
247 {
248    device_context->lpVtbl->PSSetShader(
249          device_context, pixel_shader, class_instances, num_class_instances);
250 }
D3D11SetPShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,ID3D11SamplerState * const * samplers)251 static INLINE void D3D11SetPShaderSamplers(
252       D3D11DeviceContext          device_context,
253       UINT                        start_slot,
254       UINT                        num_samplers,
255       ID3D11SamplerState* const*  samplers)
256 {
257    device_context->lpVtbl->PSSetSamplers(
258          device_context, start_slot, num_samplers, samplers);
259 }
260 
D3D11SetVShader(D3D11DeviceContext device_context,D3D11VertexShader vertex_shader,D3D11ClassInstance * const class_instances,UINT num_class_instances)261 static INLINE void D3D11SetVShader(
262       D3D11DeviceContext        device_context,
263       D3D11VertexShader         vertex_shader,
264       D3D11ClassInstance* const class_instances,
265       UINT                      num_class_instances)
266 {
267    device_context->lpVtbl->VSSetShader(
268          device_context, vertex_shader, class_instances, num_class_instances);
269 }
D3D11DrawIndexed(D3D11DeviceContext device_context,UINT index_count,UINT start_index_location,INT base_vertex_location)270 static INLINE void D3D11DrawIndexed(
271       D3D11DeviceContext device_context,
272       UINT               index_count,
273       UINT               start_index_location,
274       INT                base_vertex_location)
275 {
276    device_context->lpVtbl->DrawIndexed(
277          device_context, index_count, start_index_location, base_vertex_location);
278 }
279 static INLINE void
D3D11Draw(D3D11DeviceContext device_context,UINT vertex_count,UINT start_vertex_location)280 D3D11Draw(D3D11DeviceContext device_context, UINT vertex_count, UINT start_vertex_location)
281 {
282    device_context->lpVtbl->Draw(device_context, vertex_count, start_vertex_location);
283 }
D3D11Map(D3D11DeviceContext device_context,D3D11Resource resource,UINT subresource,D3D11_MAP map_type,UINT map_flags,D3D11_MAPPED_SUBRESOURCE * mapped_resource)284 static INLINE HRESULT D3D11Map(
285       D3D11DeviceContext        device_context,
286       D3D11Resource             resource,
287       UINT                      subresource,
288       D3D11_MAP                 map_type,
289       UINT                      map_flags,
290       D3D11_MAPPED_SUBRESOURCE* mapped_resource)
291 {
292    return device_context->lpVtbl->Map(
293          device_context, resource, subresource, map_type, map_flags, mapped_resource);
294 }
295 static INLINE void
D3D11Unmap(D3D11DeviceContext device_context,D3D11Resource resource,UINT subresource)296 D3D11Unmap(D3D11DeviceContext device_context, D3D11Resource resource, UINT subresource)
297 {
298    device_context->lpVtbl->Unmap(device_context, resource, subresource);
299 }
D3D11SetPShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,const D3D11Buffer * constant_buffers)300 static INLINE void D3D11SetPShaderConstantBuffers(
301       D3D11DeviceContext device_context,
302       UINT               start_slot,
303       UINT               num_buffers,
304       const D3D11Buffer* constant_buffers)
305 {
306    device_context->lpVtbl->PSSetConstantBuffers(
307          device_context, start_slot, num_buffers, constant_buffers);
308 }
309 static INLINE void
D3D11SetInputLayout(D3D11DeviceContext device_context,D3D11InputLayout input_layout)310 D3D11SetInputLayout(D3D11DeviceContext device_context, D3D11InputLayout input_layout)
311 {
312    device_context->lpVtbl->IASetInputLayout(device_context, input_layout);
313 }
D3D11SetVertexBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,const D3D11Buffer * vertex_buffers,UINT * strides,UINT * offsets)314 static INLINE void D3D11SetVertexBuffers(
315       D3D11DeviceContext device_context,
316       UINT               start_slot,
317       UINT               num_buffers,
318       const D3D11Buffer* vertex_buffers,
319       UINT*              strides,
320       UINT*              offsets)
321 {
322    device_context->lpVtbl->IASetVertexBuffers(
323          device_context, start_slot, num_buffers, vertex_buffers, strides, offsets);
324 }
D3D11SetIndexBuffer(D3D11DeviceContext device_context,D3D11Buffer index_buffer,DXGI_FORMAT format,UINT offset)325 static INLINE void D3D11SetIndexBuffer(
326       D3D11DeviceContext device_context, D3D11Buffer index_buffer, DXGI_FORMAT format, UINT offset)
327 {
328    device_context->lpVtbl->IASetIndexBuffer(device_context, index_buffer, format, offset);
329 }
D3D11DrawIndexedInstanced(D3D11DeviceContext device_context,UINT index_count_per_instance,UINT instance_count,UINT start_index_location,INT base_vertex_location,UINT start_instance_location)330 static INLINE void D3D11DrawIndexedInstanced(
331       D3D11DeviceContext device_context,
332       UINT               index_count_per_instance,
333       UINT               instance_count,
334       UINT               start_index_location,
335       INT                base_vertex_location,
336       UINT               start_instance_location)
337 {
338    device_context->lpVtbl->DrawIndexedInstanced(
339          device_context, index_count_per_instance, instance_count, start_index_location,
340          base_vertex_location, start_instance_location);
341 }
D3D11DrawInstanced(D3D11DeviceContext device_context,UINT vertex_count_per_instance,UINT instance_count,UINT start_vertex_location,UINT start_instance_location)342 static INLINE void D3D11DrawInstanced(
343       D3D11DeviceContext device_context,
344       UINT               vertex_count_per_instance,
345       UINT               instance_count,
346       UINT               start_vertex_location,
347       UINT               start_instance_location)
348 {
349    device_context->lpVtbl->DrawInstanced(
350          device_context, vertex_count_per_instance, instance_count, start_vertex_location,
351          start_instance_location);
352 }
D3D11SetGShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * const constant_buffers)353 static INLINE void D3D11SetGShaderConstantBuffers(
354       D3D11DeviceContext device_context,
355       UINT               start_slot,
356       UINT               num_buffers,
357       D3D11Buffer* const constant_buffers)
358 {
359    device_context->lpVtbl->GSSetConstantBuffers(
360          device_context, start_slot, num_buffers, constant_buffers);
361 }
D3D11SetGShader(D3D11DeviceContext device_context,D3D11GeometryShader shader,D3D11ClassInstance * const class_instances,UINT num_class_instances)362 static INLINE void D3D11SetGShader(
363       D3D11DeviceContext        device_context,
364       D3D11GeometryShader       shader,
365       D3D11ClassInstance* const class_instances,
366       UINT                      num_class_instances)
367 {
368    device_context->lpVtbl->GSSetShader(
369          device_context, shader, class_instances, num_class_instances);
370 }
371 static INLINE void
D3D11SetPrimitiveTopology(D3D11DeviceContext device_context,D3D11_PRIMITIVE_TOPOLOGY topology)372 D3D11SetPrimitiveTopology(D3D11DeviceContext device_context, D3D11_PRIMITIVE_TOPOLOGY topology)
373 {
374    device_context->lpVtbl->IASetPrimitiveTopology(device_context, topology);
375 }
D3D11SetVShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * const shader_resource_views)376 static INLINE void D3D11SetVShaderResources(
377       D3D11DeviceContext             device_context,
378       UINT                           start_slot,
379       UINT                           num_views,
380       D3D11ShaderResourceView* const shader_resource_views)
381 {
382    device_context->lpVtbl->VSSetShaderResources(
383          device_context, start_slot, num_views, shader_resource_views);
384 }
D3D11SetVShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * const samplers)385 static INLINE void D3D11SetVShaderSamplers(
386       D3D11DeviceContext       device_context,
387       UINT                     start_slot,
388       UINT                     num_samplers,
389       D3D11SamplerState* const samplers)
390 {
391    device_context->lpVtbl->VSSetSamplers(device_context, start_slot, num_samplers, samplers);
392 }
D3D11Begin(D3D11DeviceContext device_context,D3D11Asynchronous async)393 static INLINE void D3D11Begin(D3D11DeviceContext device_context, D3D11Asynchronous async)
394 {
395    device_context->lpVtbl->Begin(device_context, async);
396 }
D3D11End(D3D11DeviceContext device_context,D3D11Asynchronous async)397 static INLINE void D3D11End(D3D11DeviceContext device_context, D3D11Asynchronous async)
398 {
399    device_context->lpVtbl->End(device_context, async);
400 }
D3D11GetData(D3D11DeviceContext device_context,D3D11Asynchronous async,void * data,UINT data_size,UINT get_data_flags)401 static INLINE HRESULT D3D11GetData(
402       D3D11DeviceContext device_context,
403       D3D11Asynchronous  async,
404       void*              data,
405       UINT               data_size,
406       UINT               get_data_flags)
407 {
408    return device_context->lpVtbl->GetData(device_context, async, data, data_size, get_data_flags);
409 }
D3D11SetPredication(D3D11DeviceContext device_context,D3D11Predicate predicate,BOOL predicate_value)410 static INLINE void D3D11SetPredication(
411       D3D11DeviceContext device_context, D3D11Predicate predicate, BOOL predicate_value)
412 {
413    device_context->lpVtbl->SetPredication(device_context, predicate, predicate_value);
414 }
D3D11SetGShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * const shader_resource_views)415 static INLINE void D3D11SetGShaderResources(
416       D3D11DeviceContext             device_context,
417       UINT                           start_slot,
418       UINT                           num_views,
419       D3D11ShaderResourceView* const shader_resource_views)
420 {
421    device_context->lpVtbl->GSSetShaderResources(
422          device_context, start_slot, num_views, shader_resource_views);
423 }
D3D11SetGShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * const samplers)424 static INLINE void D3D11SetGShaderSamplers(
425       D3D11DeviceContext       device_context,
426       UINT                     start_slot,
427       UINT                     num_samplers,
428       D3D11SamplerState* const samplers)
429 {
430    device_context->lpVtbl->GSSetSamplers(device_context, start_slot, num_samplers, samplers);
431 }
D3D11SetRenderTargets(D3D11DeviceContext device_context,UINT num_views,D3D11RenderTargetView * const render_target_views,D3D11DepthStencilView depth_stencil_view)432 static INLINE void D3D11SetRenderTargets(
433       D3D11DeviceContext           device_context,
434       UINT                         num_views,
435       D3D11RenderTargetView* const render_target_views,
436       D3D11DepthStencilView        depth_stencil_view)
437 {
438    device_context->lpVtbl->OMSetRenderTargets(
439          device_context, num_views, render_target_views, depth_stencil_view);
440 }
D3D11SetRenderTargetsAndUnorderedAccessViews(D3D11DeviceContext device_context,UINT num_rtvs,D3D11RenderTargetView * const render_target_views,D3D11DepthStencilView depth_stencil_view,UINT uavstart_slot,UINT num_uavs,D3D11UnorderedAccessView * const unordered_access_views,UINT * uavinitial_counts)441 static INLINE void D3D11SetRenderTargetsAndUnorderedAccessViews(
442       D3D11DeviceContext              device_context,
443       UINT                            num_rtvs,
444       D3D11RenderTargetView* const    render_target_views,
445       D3D11DepthStencilView           depth_stencil_view,
446       UINT                            uavstart_slot,
447       UINT                            num_uavs,
448       D3D11UnorderedAccessView* const unordered_access_views,
449       UINT*                           uavinitial_counts)
450 {
451    device_context->lpVtbl->OMSetRenderTargetsAndUnorderedAccessViews(
452          device_context, num_rtvs, render_target_views, depth_stencil_view, uavstart_slot, num_uavs,
453          unordered_access_views, uavinitial_counts);
454 }
D3D11SetBlendState(D3D11DeviceContext device_context,D3D11BlendState blend_state,FLOAT blend_factor[4],UINT sample_mask)455 static INLINE void D3D11SetBlendState(
456       D3D11DeviceContext device_context,
457       D3D11BlendState    blend_state,
458       FLOAT              blend_factor[4],
459       UINT               sample_mask)
460 {
461    device_context->lpVtbl->OMSetBlendState(device_context, blend_state, blend_factor, sample_mask);
462 }
D3D11SetDepthStencilState(D3D11DeviceContext device_context,D3D11DepthStencilState depth_stencil_state,UINT stencil_ref)463 static INLINE void D3D11SetDepthStencilState(
464       D3D11DeviceContext     device_context,
465       D3D11DepthStencilState depth_stencil_state,
466       UINT                   stencil_ref)
467 {
468    device_context->lpVtbl->OMSetDepthStencilState(device_context, depth_stencil_state, stencil_ref);
469 }
D3D11SOSetTargets(D3D11DeviceContext device_context,UINT num_buffers,D3D11Buffer * const sotargets,UINT * offsets)470 static INLINE void D3D11SOSetTargets(
471       D3D11DeviceContext device_context,
472       UINT               num_buffers,
473       D3D11Buffer* const sotargets,
474       UINT*              offsets)
475 {
476    device_context->lpVtbl->SOSetTargets(device_context, num_buffers, sotargets, offsets);
477 }
D3D11DrawAuto(D3D11DeviceContext device_context)478 static INLINE void D3D11DrawAuto(D3D11DeviceContext device_context)
479 {
480    device_context->lpVtbl->DrawAuto(device_context);
481 }
D3D11DrawIndexedInstancedIndirect(D3D11DeviceContext device_context,D3D11Buffer buffer_for_args,UINT aligned_byte_offset_for_args)482 static INLINE void D3D11DrawIndexedInstancedIndirect(
483       D3D11DeviceContext device_context,
484       D3D11Buffer        buffer_for_args,
485       UINT               aligned_byte_offset_for_args)
486 {
487    device_context->lpVtbl->DrawIndexedInstancedIndirect(
488          device_context, buffer_for_args, aligned_byte_offset_for_args);
489 }
D3D11DrawInstancedIndirect(D3D11DeviceContext device_context,D3D11Buffer buffer_for_args,UINT aligned_byte_offset_for_args)490 static INLINE void D3D11DrawInstancedIndirect(
491       D3D11DeviceContext device_context,
492       D3D11Buffer        buffer_for_args,
493       UINT               aligned_byte_offset_for_args)
494 {
495    device_context->lpVtbl->DrawInstancedIndirect(
496          device_context, buffer_for_args, aligned_byte_offset_for_args);
497 }
D3D11Dispatch(D3D11DeviceContext device_context,UINT thread_group_count_x,UINT thread_group_count_y,UINT thread_group_count_z)498 static INLINE void D3D11Dispatch(
499       D3D11DeviceContext device_context,
500       UINT               thread_group_count_x,
501       UINT               thread_group_count_y,
502       UINT               thread_group_count_z)
503 {
504    device_context->lpVtbl->Dispatch(
505          device_context, thread_group_count_x, thread_group_count_y, thread_group_count_z);
506 }
D3D11DispatchIndirect(D3D11DeviceContext device_context,D3D11Buffer buffer_for_args,UINT aligned_byte_offset_for_args)507 static INLINE void D3D11DispatchIndirect(
508       D3D11DeviceContext device_context,
509       D3D11Buffer        buffer_for_args,
510       UINT               aligned_byte_offset_for_args)
511 {
512    device_context->lpVtbl->DispatchIndirect(
513          device_context, buffer_for_args, aligned_byte_offset_for_args);
514 }
515 static INLINE void
D3D11SetRasterizerState(D3D11DeviceContext device_context,D3D11RasterizerState rasterizer_state)516 D3D11SetRasterizerState(D3D11DeviceContext device_context, D3D11RasterizerState rasterizer_state)
517 {
518    device_context->lpVtbl->RSSetState(device_context, rasterizer_state);
519 }
520 static INLINE void
D3D11SetViewports(D3D11DeviceContext device_context,UINT num_viewports,D3D11_VIEWPORT * viewports)521 D3D11SetViewports(D3D11DeviceContext device_context, UINT num_viewports, D3D11_VIEWPORT* viewports)
522 {
523    device_context->lpVtbl->RSSetViewports(device_context, num_viewports, viewports);
524 }
525 static INLINE void
D3D11SetScissorRects(D3D11DeviceContext device_context,UINT num_rects,D3D11_RECT * rects)526 D3D11SetScissorRects(D3D11DeviceContext device_context, UINT num_rects, D3D11_RECT* rects)
527 {
528    device_context->lpVtbl->RSSetScissorRects(device_context, num_rects, rects);
529 }
D3D11CopySubresourceRegion(D3D11DeviceContext device_context,D3D11Resource dst_resource,UINT dst_subresource,UINT dst_x,UINT dst_y,UINT dst_z,D3D11Resource src_resource,UINT src_subresource,D3D11_BOX * src_box)530 static INLINE void D3D11CopySubresourceRegion(
531       D3D11DeviceContext device_context,
532       D3D11Resource      dst_resource,
533       UINT               dst_subresource,
534       UINT               dst_x,
535       UINT               dst_y,
536       UINT               dst_z,
537       D3D11Resource      src_resource,
538       UINT               src_subresource,
539       D3D11_BOX*         src_box)
540 {
541    device_context->lpVtbl->CopySubresourceRegion(
542          device_context, dst_resource, dst_subresource, dst_x, dst_y, dst_z, src_resource,
543          src_subresource, src_box);
544 }
D3D11CopyResource(D3D11DeviceContext device_context,D3D11Resource dst_resource,D3D11Resource src_resource)545 static INLINE void D3D11CopyResource(
546       D3D11DeviceContext device_context, D3D11Resource dst_resource, D3D11Resource src_resource)
547 {
548    device_context->lpVtbl->CopyResource(device_context, dst_resource, src_resource);
549 }
D3D11UpdateSubresource(D3D11DeviceContext device_context,D3D11Resource dst_resource,UINT dst_subresource,D3D11_BOX * dst_box,void * src_data,UINT src_row_pitch,UINT src_depth_pitch)550 static INLINE void D3D11UpdateSubresource(
551       D3D11DeviceContext device_context,
552       D3D11Resource      dst_resource,
553       UINT               dst_subresource,
554       D3D11_BOX*         dst_box,
555       void*              src_data,
556       UINT               src_row_pitch,
557       UINT               src_depth_pitch)
558 {
559    device_context->lpVtbl->UpdateSubresource(
560          device_context, dst_resource, dst_subresource, dst_box, src_data, src_row_pitch,
561          src_depth_pitch);
562 }
D3D11CopyStructureCount(D3D11DeviceContext device_context,D3D11Buffer dst_buffer,UINT dst_aligned_byte_offset,D3D11UnorderedAccessView src_view)563 static INLINE void D3D11CopyStructureCount(
564       D3D11DeviceContext       device_context,
565       D3D11Buffer              dst_buffer,
566       UINT                     dst_aligned_byte_offset,
567       D3D11UnorderedAccessView src_view)
568 {
569    device_context->lpVtbl->CopyStructureCount(
570          device_context, dst_buffer, dst_aligned_byte_offset, src_view);
571 }
D3D11ClearRenderTargetView(D3D11DeviceContext device_context,D3D11RenderTargetView render_target_view,FLOAT color_rgba[4])572 static INLINE void D3D11ClearRenderTargetView(
573       D3D11DeviceContext    device_context,
574       D3D11RenderTargetView render_target_view,
575       FLOAT                 color_rgba[4])
576 {
577    device_context->lpVtbl->ClearRenderTargetView(device_context, render_target_view, color_rgba);
578 }
D3D11ClearUnorderedAccessViewUint(D3D11DeviceContext device_context,D3D11UnorderedAccessView unordered_access_view,UINT values[4])579 static INLINE void D3D11ClearUnorderedAccessViewUint(
580       D3D11DeviceContext       device_context,
581       D3D11UnorderedAccessView unordered_access_view,
582       UINT                     values[4])
583 {
584    device_context->lpVtbl->ClearUnorderedAccessViewUint(
585          device_context, unordered_access_view, values);
586 }
D3D11ClearUnorderedAccessViewFloat(D3D11DeviceContext device_context,D3D11UnorderedAccessView unordered_access_view,FLOAT values[4])587 static INLINE void D3D11ClearUnorderedAccessViewFloat(
588       D3D11DeviceContext       device_context,
589       D3D11UnorderedAccessView unordered_access_view,
590       FLOAT                    values[4])
591 {
592    device_context->lpVtbl->ClearUnorderedAccessViewFloat(
593          device_context, unordered_access_view, values);
594 }
D3D11ClearDepthStencilView(D3D11DeviceContext device_context,D3D11DepthStencilView depth_stencil_view,UINT clear_flags,FLOAT depth,UINT8 stencil)595 static INLINE void D3D11ClearDepthStencilView(
596       D3D11DeviceContext    device_context,
597       D3D11DepthStencilView depth_stencil_view,
598       UINT                  clear_flags,
599       FLOAT                 depth,
600       UINT8                 stencil)
601 {
602    device_context->lpVtbl->ClearDepthStencilView(
603          device_context, depth_stencil_view, clear_flags, depth, stencil);
604 }
605 static INLINE void
D3D11GenerateMips(D3D11DeviceContext device_context,D3D11ShaderResourceView shader_resource_view)606 D3D11GenerateMips(D3D11DeviceContext device_context, D3D11ShaderResourceView shader_resource_view)
607 {
608    device_context->lpVtbl->GenerateMips(device_context, shader_resource_view);
609 }
610 static INLINE void
D3D11SetResourceMinLOD(D3D11DeviceContext device_context,D3D11Resource resource,FLOAT min_lod)611 D3D11SetResourceMinLOD(D3D11DeviceContext device_context, D3D11Resource resource, FLOAT min_lod)
612 {
613    device_context->lpVtbl->SetResourceMinLOD(device_context, resource, min_lod);
614 }
615 static INLINE FLOAT
D3D11GetResourceMinLOD(D3D11DeviceContext device_context,D3D11Resource resource)616 D3D11GetResourceMinLOD(D3D11DeviceContext device_context, D3D11Resource resource)
617 {
618    return device_context->lpVtbl->GetResourceMinLOD(device_context, resource);
619 }
D3D11ResolveSubresource(D3D11DeviceContext device_context,D3D11Resource dst_resource,UINT dst_subresource,D3D11Resource src_resource,UINT src_subresource,DXGI_FORMAT format)620 static INLINE void D3D11ResolveSubresource(
621       D3D11DeviceContext device_context,
622       D3D11Resource      dst_resource,
623       UINT               dst_subresource,
624       D3D11Resource      src_resource,
625       UINT               src_subresource,
626       DXGI_FORMAT        format)
627 {
628    device_context->lpVtbl->ResolveSubresource(
629          device_context, dst_resource, dst_subresource, src_resource, src_subresource, format);
630 }
D3D11ExecuteCommandList(D3D11DeviceContext device_context,D3D11CommandList command_list,BOOL restore_context_state)631 static INLINE void D3D11ExecuteCommandList(
632       D3D11DeviceContext device_context, D3D11CommandList command_list, BOOL restore_context_state)
633 {
634    device_context->lpVtbl->ExecuteCommandList(device_context, command_list, restore_context_state);
635 }
D3D11HSSetShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * const shader_resource_views)636 static INLINE void D3D11HSSetShaderResources(
637       D3D11DeviceContext             device_context,
638       UINT                           start_slot,
639       UINT                           num_views,
640       D3D11ShaderResourceView* const shader_resource_views)
641 {
642    device_context->lpVtbl->HSSetShaderResources(
643          device_context, start_slot, num_views, shader_resource_views);
644 }
D3D11HSSetShader(D3D11DeviceContext device_context,D3D11HullShader hull_shader,D3D11ClassInstance * const class_instances,UINT num_class_instances)645 static INLINE void D3D11HSSetShader(
646       D3D11DeviceContext        device_context,
647       D3D11HullShader           hull_shader,
648       D3D11ClassInstance* const class_instances,
649       UINT                      num_class_instances)
650 {
651    device_context->lpVtbl->HSSetShader(
652          device_context, hull_shader, class_instances, num_class_instances);
653 }
D3D11HSSetSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * const samplers)654 static INLINE void D3D11HSSetSamplers(
655       D3D11DeviceContext       device_context,
656       UINT                     start_slot,
657       UINT                     num_samplers,
658       D3D11SamplerState* const samplers)
659 {
660    device_context->lpVtbl->HSSetSamplers(device_context, start_slot, num_samplers, samplers);
661 }
D3D11HSSetConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * const constant_buffers)662 static INLINE void D3D11HSSetConstantBuffers(
663       D3D11DeviceContext device_context,
664       UINT               start_slot,
665       UINT               num_buffers,
666       D3D11Buffer* const constant_buffers)
667 {
668    device_context->lpVtbl->HSSetConstantBuffers(
669          device_context, start_slot, num_buffers, constant_buffers);
670 }
D3D11SetDShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * const shader_resource_views)671 static INLINE void D3D11SetDShaderResources(
672       D3D11DeviceContext             device_context,
673       UINT                           start_slot,
674       UINT                           num_views,
675       D3D11ShaderResourceView* const shader_resource_views)
676 {
677    device_context->lpVtbl->DSSetShaderResources(
678          device_context, start_slot, num_views, shader_resource_views);
679 }
D3D11SetDShader(D3D11DeviceContext device_context,D3D11DomainShader domain_shader,D3D11ClassInstance * const class_instances,UINT num_class_instances)680 static INLINE void D3D11SetDShader(
681       D3D11DeviceContext        device_context,
682       D3D11DomainShader         domain_shader,
683       D3D11ClassInstance* const class_instances,
684       UINT                      num_class_instances)
685 {
686    device_context->lpVtbl->DSSetShader(
687          device_context, domain_shader, class_instances, num_class_instances);
688 }
D3D11SetDShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * const samplers)689 static INLINE void D3D11SetDShaderSamplers(
690       D3D11DeviceContext       device_context,
691       UINT                     start_slot,
692       UINT                     num_samplers,
693       D3D11SamplerState* const samplers)
694 {
695    device_context->lpVtbl->DSSetSamplers(device_context, start_slot, num_samplers, samplers);
696 }
D3D11SetDShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * const constant_buffers)697 static INLINE void D3D11SetDShaderConstantBuffers(
698       D3D11DeviceContext device_context,
699       UINT               start_slot,
700       UINT               num_buffers,
701       D3D11Buffer* const constant_buffers)
702 {
703    device_context->lpVtbl->DSSetConstantBuffers(
704          device_context, start_slot, num_buffers, constant_buffers);
705 }
D3D11SetCShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * const shader_resource_views)706 static INLINE void D3D11SetCShaderResources(
707       D3D11DeviceContext             device_context,
708       UINT                           start_slot,
709       UINT                           num_views,
710       D3D11ShaderResourceView* const shader_resource_views)
711 {
712    device_context->lpVtbl->CSSetShaderResources(
713          device_context, start_slot, num_views, shader_resource_views);
714 }
D3D11SetCShaderUnorderedAccessViews(D3D11DeviceContext device_context,UINT start_slot,UINT num_uavs,D3D11UnorderedAccessView * const unordered_access_views,UINT * uavinitial_counts)715 static INLINE void D3D11SetCShaderUnorderedAccessViews(
716       D3D11DeviceContext              device_context,
717       UINT                            start_slot,
718       UINT                            num_uavs,
719       D3D11UnorderedAccessView* const unordered_access_views,
720       UINT*                           uavinitial_counts)
721 {
722    device_context->lpVtbl->CSSetUnorderedAccessViews(
723          device_context, start_slot, num_uavs, unordered_access_views, uavinitial_counts);
724 }
D3D11SetCShader(D3D11DeviceContext device_context,D3D11ComputeShader compute_shader,D3D11ClassInstance * const class_instances,UINT num_class_instances)725 static INLINE void D3D11SetCShader(
726       D3D11DeviceContext        device_context,
727       D3D11ComputeShader        compute_shader,
728       D3D11ClassInstance* const class_instances,
729       UINT                      num_class_instances)
730 {
731    device_context->lpVtbl->CSSetShader(
732          device_context, compute_shader, class_instances, num_class_instances);
733 }
D3D11SetCShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * const samplers)734 static INLINE void D3D11SetCShaderSamplers(
735       D3D11DeviceContext       device_context,
736       UINT                     start_slot,
737       UINT                     num_samplers,
738       D3D11SamplerState* const samplers)
739 {
740    device_context->lpVtbl->CSSetSamplers(device_context, start_slot, num_samplers, samplers);
741 }
D3D11SetCShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * const constant_buffers)742 static INLINE void D3D11SetCShaderConstantBuffers(
743       D3D11DeviceContext device_context,
744       UINT               start_slot,
745       UINT               num_buffers,
746       D3D11Buffer* const constant_buffers)
747 {
748    device_context->lpVtbl->CSSetConstantBuffers(
749          device_context, start_slot, num_buffers, constant_buffers);
750 }
D3D11GetVShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * constant_buffers)751 static INLINE void D3D11GetVShaderConstantBuffers(
752       D3D11DeviceContext device_context,
753       UINT               start_slot,
754       UINT               num_buffers,
755       D3D11Buffer*       constant_buffers)
756 {
757    device_context->lpVtbl->VSGetConstantBuffers(
758          device_context, start_slot, num_buffers, constant_buffers);
759 }
D3D11GetPShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * shader_resource_views)760 static INLINE void D3D11GetPShaderResources(
761       D3D11DeviceContext       device_context,
762       UINT                     start_slot,
763       UINT                     num_views,
764       D3D11ShaderResourceView* shader_resource_views)
765 {
766    device_context->lpVtbl->PSGetShaderResources(
767          device_context, start_slot, num_views, shader_resource_views);
768 }
D3D11GetPShader(D3D11DeviceContext device_context,D3D11PixelShader * pixel_shader,D3D11ClassInstance * class_instances,UINT * num_class_instances)769 static INLINE void D3D11GetPShader(
770       D3D11DeviceContext  device_context,
771       D3D11PixelShader*   pixel_shader,
772       D3D11ClassInstance* class_instances,
773       UINT*               num_class_instances)
774 {
775    device_context->lpVtbl->PSGetShader(
776          device_context, pixel_shader, class_instances, num_class_instances);
777 }
D3D11GetPShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * samplers)778 static INLINE void D3D11GetPShaderSamplers(
779       D3D11DeviceContext device_context,
780       UINT               start_slot,
781       UINT               num_samplers,
782       D3D11SamplerState* samplers)
783 {
784    device_context->lpVtbl->PSGetSamplers(device_context, start_slot, num_samplers, samplers);
785 }
D3D11GetVShader(D3D11DeviceContext device_context,D3D11VertexShader * vertex_shader,D3D11ClassInstance * class_instances,UINT * num_class_instances)786 static INLINE void D3D11GetVShader(
787       D3D11DeviceContext  device_context,
788       D3D11VertexShader*  vertex_shader,
789       D3D11ClassInstance* class_instances,
790       UINT*               num_class_instances)
791 {
792    device_context->lpVtbl->VSGetShader(
793          device_context, vertex_shader, class_instances, num_class_instances);
794 }
D3D11GetPShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * constant_buffers)795 static INLINE void D3D11GetPShaderConstantBuffers(
796       D3D11DeviceContext device_context,
797       UINT               start_slot,
798       UINT               num_buffers,
799       D3D11Buffer*       constant_buffers)
800 {
801    device_context->lpVtbl->PSGetConstantBuffers(
802          device_context, start_slot, num_buffers, constant_buffers);
803 }
804 static INLINE void
D3D11GetInputLayout(D3D11DeviceContext device_context,D3D11InputLayout * input_layout)805 D3D11GetInputLayout(D3D11DeviceContext device_context, D3D11InputLayout* input_layout)
806 {
807    device_context->lpVtbl->IAGetInputLayout(device_context, input_layout);
808 }
D3D11GetVertexBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * vertex_buffers,UINT * strides,UINT * offsets)809 static INLINE void D3D11GetVertexBuffers(
810       D3D11DeviceContext device_context,
811       UINT               start_slot,
812       UINT               num_buffers,
813       D3D11Buffer*       vertex_buffers,
814       UINT*              strides,
815       UINT*              offsets)
816 {
817    device_context->lpVtbl->IAGetVertexBuffers(
818          device_context, start_slot, num_buffers, vertex_buffers, strides, offsets);
819 }
D3D11GetIndexBuffer(D3D11DeviceContext device_context,D3D11Buffer * index_buffer,DXGI_FORMAT * format,UINT * offset)820 static INLINE void D3D11GetIndexBuffer(
821       D3D11DeviceContext device_context,
822       D3D11Buffer*       index_buffer,
823       DXGI_FORMAT*       format,
824       UINT*              offset)
825 {
826    device_context->lpVtbl->IAGetIndexBuffer(device_context, index_buffer, format, offset);
827 }
D3D11GetGShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * constant_buffers)828 static INLINE void D3D11GetGShaderConstantBuffers(
829       D3D11DeviceContext device_context,
830       UINT               start_slot,
831       UINT               num_buffers,
832       D3D11Buffer*       constant_buffers)
833 {
834    device_context->lpVtbl->GSGetConstantBuffers(
835          device_context, start_slot, num_buffers, constant_buffers);
836 }
D3D11GetGShader(D3D11DeviceContext device_context,D3D11GeometryShader * geometry_shader,D3D11ClassInstance * class_instances,UINT * num_class_instances)837 static INLINE void D3D11GetGShader(
838       D3D11DeviceContext   device_context,
839       D3D11GeometryShader* geometry_shader,
840       D3D11ClassInstance*  class_instances,
841       UINT*                num_class_instances)
842 {
843    device_context->lpVtbl->GSGetShader(
844          device_context, geometry_shader, class_instances, num_class_instances);
845 }
846 static INLINE void
D3D11GetPrimitiveTopology(D3D11DeviceContext device_context,D3D11_PRIMITIVE_TOPOLOGY * topology)847 D3D11GetPrimitiveTopology(D3D11DeviceContext device_context, D3D11_PRIMITIVE_TOPOLOGY* topology)
848 {
849    device_context->lpVtbl->IAGetPrimitiveTopology(device_context, topology);
850 }
D3D11GetVShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * shader_resource_views)851 static INLINE void D3D11GetVShaderResources(
852       D3D11DeviceContext       device_context,
853       UINT                     start_slot,
854       UINT                     num_views,
855       D3D11ShaderResourceView* shader_resource_views)
856 {
857    device_context->lpVtbl->VSGetShaderResources(
858          device_context, start_slot, num_views, shader_resource_views);
859 }
D3D11GetVShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * samplers)860 static INLINE void D3D11GetVShaderSamplers(
861       D3D11DeviceContext device_context,
862       UINT               start_slot,
863       UINT               num_samplers,
864       D3D11SamplerState* samplers)
865 {
866    device_context->lpVtbl->VSGetSamplers(device_context, start_slot, num_samplers, samplers);
867 }
D3D11GetPredication(D3D11DeviceContext device_context,D3D11Predicate * predicate,BOOL * predicate_value)868 static INLINE void D3D11GetPredication(
869       D3D11DeviceContext device_context, D3D11Predicate* predicate, BOOL* predicate_value)
870 {
871    device_context->lpVtbl->GetPredication(device_context, predicate, predicate_value);
872 }
D3D11GetGShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * shader_resource_views)873 static INLINE void D3D11GetGShaderResources(
874       D3D11DeviceContext       device_context,
875       UINT                     start_slot,
876       UINT                     num_views,
877       D3D11ShaderResourceView* shader_resource_views)
878 {
879    device_context->lpVtbl->GSGetShaderResources(
880          device_context, start_slot, num_views, shader_resource_views);
881 }
D3D11GetGShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * samplers)882 static INLINE void D3D11GetGShaderSamplers(
883       D3D11DeviceContext device_context,
884       UINT               start_slot,
885       UINT               num_samplers,
886       D3D11SamplerState* samplers)
887 {
888    device_context->lpVtbl->GSGetSamplers(device_context, start_slot, num_samplers, samplers);
889 }
D3D11GetRenderTargets(D3D11DeviceContext device_context,UINT num_views,D3D11RenderTargetView * render_target_views,D3D11DepthStencilView * depth_stencil_view)890 static INLINE void D3D11GetRenderTargets(
891       D3D11DeviceContext     device_context,
892       UINT                   num_views,
893       D3D11RenderTargetView* render_target_views,
894       D3D11DepthStencilView* depth_stencil_view)
895 {
896    device_context->lpVtbl->OMGetRenderTargets(
897          device_context, num_views, render_target_views, depth_stencil_view);
898 }
D3D11GetRenderTargetsAndUnorderedAccessViews(D3D11DeviceContext device_context,UINT num_rtvs,D3D11RenderTargetView * render_target_views,D3D11DepthStencilView * depth_stencil_view,UINT uavstart_slot,UINT num_uavs,D3D11UnorderedAccessView * unordered_access_views)899 static INLINE void D3D11GetRenderTargetsAndUnorderedAccessViews(
900       D3D11DeviceContext        device_context,
901       UINT                      num_rtvs,
902       D3D11RenderTargetView*    render_target_views,
903       D3D11DepthStencilView*    depth_stencil_view,
904       UINT                      uavstart_slot,
905       UINT                      num_uavs,
906       D3D11UnorderedAccessView* unordered_access_views)
907 {
908    device_context->lpVtbl->OMGetRenderTargetsAndUnorderedAccessViews(
909          device_context, num_rtvs, render_target_views, depth_stencil_view, uavstart_slot, num_uavs,
910          unordered_access_views);
911 }
D3D11GetBlendState(D3D11DeviceContext device_context,D3D11BlendState * blend_state,FLOAT blend_factor[4],UINT * sample_mask)912 static INLINE void D3D11GetBlendState(
913       D3D11DeviceContext device_context,
914       D3D11BlendState*   blend_state,
915       FLOAT              blend_factor[4],
916       UINT*              sample_mask)
917 {
918    device_context->lpVtbl->OMGetBlendState(device_context, blend_state, blend_factor, sample_mask);
919 }
D3D11GetDepthStencilState(D3D11DeviceContext device_context,D3D11DepthStencilState * depth_stencil_state,UINT * stencil_ref)920 static INLINE void D3D11GetDepthStencilState(
921       D3D11DeviceContext      device_context,
922       D3D11DepthStencilState* depth_stencil_state,
923       UINT*                   stencil_ref)
924 {
925    device_context->lpVtbl->OMGetDepthStencilState(device_context, depth_stencil_state, stencil_ref);
926 }
927 static INLINE void
D3D11SOGetTargets(D3D11DeviceContext device_context,UINT num_buffers,D3D11Buffer * sotargets)928 D3D11SOGetTargets(D3D11DeviceContext device_context, UINT num_buffers, D3D11Buffer* sotargets)
929 {
930    device_context->lpVtbl->SOGetTargets(device_context, num_buffers, sotargets);
931 }
932 static INLINE void
D3D11GetState(D3D11DeviceContext device_context,D3D11RasterizerState * rasterizer_state)933 D3D11GetState(D3D11DeviceContext device_context, D3D11RasterizerState* rasterizer_state)
934 {
935    device_context->lpVtbl->RSGetState(device_context, rasterizer_state);
936 }
937 static INLINE void
D3D11GetViewports(D3D11DeviceContext device_context,UINT * num_viewports,D3D11_VIEWPORT * viewports)938 D3D11GetViewports(D3D11DeviceContext device_context, UINT* num_viewports, D3D11_VIEWPORT* viewports)
939 {
940    device_context->lpVtbl->RSGetViewports(device_context, num_viewports, viewports);
941 }
942 static INLINE void
D3D11GetScissorRects(D3D11DeviceContext device_context,UINT * num_rects,D3D11_RECT * rects)943 D3D11GetScissorRects(D3D11DeviceContext device_context, UINT* num_rects, D3D11_RECT* rects)
944 {
945    device_context->lpVtbl->RSGetScissorRects(device_context, num_rects, rects);
946 }
D3D11HSGetShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * shader_resource_views)947 static INLINE void D3D11HSGetShaderResources(
948       D3D11DeviceContext       device_context,
949       UINT                     start_slot,
950       UINT                     num_views,
951       D3D11ShaderResourceView* shader_resource_views)
952 {
953    device_context->lpVtbl->HSGetShaderResources(
954          device_context, start_slot, num_views, shader_resource_views);
955 }
D3D11HSGetShader(D3D11DeviceContext device_context,D3D11HullShader * hull_shader,D3D11ClassInstance * class_instances,UINT * num_class_instances)956 static INLINE void D3D11HSGetShader(
957       D3D11DeviceContext  device_context,
958       D3D11HullShader*    hull_shader,
959       D3D11ClassInstance* class_instances,
960       UINT*               num_class_instances)
961 {
962    device_context->lpVtbl->HSGetShader(
963          device_context, hull_shader, class_instances, num_class_instances);
964 }
D3D11HSGetSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * samplers)965 static INLINE void D3D11HSGetSamplers(
966       D3D11DeviceContext device_context,
967       UINT               start_slot,
968       UINT               num_samplers,
969       D3D11SamplerState* samplers)
970 {
971    device_context->lpVtbl->HSGetSamplers(device_context, start_slot, num_samplers, samplers);
972 }
D3D11HSGetConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * constant_buffers)973 static INLINE void D3D11HSGetConstantBuffers(
974       D3D11DeviceContext device_context,
975       UINT               start_slot,
976       UINT               num_buffers,
977       D3D11Buffer*       constant_buffers)
978 {
979    device_context->lpVtbl->HSGetConstantBuffers(
980          device_context, start_slot, num_buffers, constant_buffers);
981 }
D3D11GetDShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * shader_resource_views)982 static INLINE void D3D11GetDShaderResources(
983       D3D11DeviceContext       device_context,
984       UINT                     start_slot,
985       UINT                     num_views,
986       D3D11ShaderResourceView* shader_resource_views)
987 {
988    device_context->lpVtbl->DSGetShaderResources(
989          device_context, start_slot, num_views, shader_resource_views);
990 }
D3D11GetDShader(D3D11DeviceContext device_context,D3D11DomainShader * domain_shader,D3D11ClassInstance * class_instances,UINT * num_class_instances)991 static INLINE void D3D11GetDShader(
992       D3D11DeviceContext  device_context,
993       D3D11DomainShader*  domain_shader,
994       D3D11ClassInstance* class_instances,
995       UINT*               num_class_instances)
996 {
997    device_context->lpVtbl->DSGetShader(
998          device_context, domain_shader, class_instances, num_class_instances);
999 }
D3D11GetDShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * samplers)1000 static INLINE void D3D11GetDShaderSamplers(
1001       D3D11DeviceContext device_context,
1002       UINT               start_slot,
1003       UINT               num_samplers,
1004       D3D11SamplerState* samplers)
1005 {
1006    device_context->lpVtbl->DSGetSamplers(device_context, start_slot, num_samplers, samplers);
1007 }
D3D11GetDShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * constant_buffers)1008 static INLINE void D3D11GetDShaderConstantBuffers(
1009       D3D11DeviceContext device_context,
1010       UINT               start_slot,
1011       UINT               num_buffers,
1012       D3D11Buffer*       constant_buffers)
1013 {
1014    device_context->lpVtbl->DSGetConstantBuffers(
1015          device_context, start_slot, num_buffers, constant_buffers);
1016 }
D3D11GetCShaderResources(D3D11DeviceContext device_context,UINT start_slot,UINT num_views,D3D11ShaderResourceView * shader_resource_views)1017 static INLINE void D3D11GetCShaderResources(
1018       D3D11DeviceContext       device_context,
1019       UINT                     start_slot,
1020       UINT                     num_views,
1021       D3D11ShaderResourceView* shader_resource_views)
1022 {
1023    device_context->lpVtbl->CSGetShaderResources(
1024          device_context, start_slot, num_views, shader_resource_views);
1025 }
D3D11GetCShaderUnorderedAccessViews(D3D11DeviceContext device_context,UINT start_slot,UINT num_uavs,D3D11UnorderedAccessView * unordered_access_views)1026 static INLINE void D3D11GetCShaderUnorderedAccessViews(
1027       D3D11DeviceContext        device_context,
1028       UINT                      start_slot,
1029       UINT                      num_uavs,
1030       D3D11UnorderedAccessView* unordered_access_views)
1031 {
1032    device_context->lpVtbl->CSGetUnorderedAccessViews(
1033          device_context, start_slot, num_uavs, unordered_access_views);
1034 }
D3D11GetCShader(D3D11DeviceContext device_context,D3D11ComputeShader * compute_shader,D3D11ClassInstance * class_instances,UINT * num_class_instances)1035 static INLINE void D3D11GetCShader(
1036       D3D11DeviceContext  device_context,
1037       D3D11ComputeShader* compute_shader,
1038       D3D11ClassInstance* class_instances,
1039       UINT*               num_class_instances)
1040 {
1041    device_context->lpVtbl->CSGetShader(
1042          device_context, compute_shader, class_instances, num_class_instances);
1043 }
D3D11GetCShaderSamplers(D3D11DeviceContext device_context,UINT start_slot,UINT num_samplers,D3D11SamplerState * samplers)1044 static INLINE void D3D11GetCShaderSamplers(
1045       D3D11DeviceContext device_context,
1046       UINT               start_slot,
1047       UINT               num_samplers,
1048       D3D11SamplerState* samplers)
1049 {
1050    device_context->lpVtbl->CSGetSamplers(device_context, start_slot, num_samplers, samplers);
1051 }
D3D11GetCShaderConstantBuffers(D3D11DeviceContext device_context,UINT start_slot,UINT num_buffers,D3D11Buffer * constant_buffers)1052 static INLINE void D3D11GetCShaderConstantBuffers(
1053       D3D11DeviceContext device_context,
1054       UINT               start_slot,
1055       UINT               num_buffers,
1056       D3D11Buffer*       constant_buffers)
1057 {
1058    device_context->lpVtbl->CSGetConstantBuffers(
1059          device_context, start_slot, num_buffers, constant_buffers);
1060 }
D3D11ClearState(D3D11DeviceContext device_context)1061 static INLINE void D3D11ClearState(D3D11DeviceContext device_context)
1062 {
1063    device_context->lpVtbl->ClearState(device_context);
1064 }
D3D11Flush(D3D11DeviceContext device_context)1065 static INLINE void D3D11Flush(D3D11DeviceContext device_context)
1066 {
1067    device_context->lpVtbl->Flush(device_context);
1068 }
D3D11GetDeviceContextContextFlags(D3D11DeviceContext device_context)1069 static INLINE UINT D3D11GetDeviceContextContextFlags(D3D11DeviceContext device_context)
1070 {
1071    return device_context->lpVtbl->GetContextFlags(device_context);
1072 }
D3D11FinishCommandList(D3D11DeviceContext device_context,BOOL restore_deferred_context_state,D3D11CommandList * command_list)1073 static INLINE HRESULT D3D11FinishCommandList(
1074       D3D11DeviceContext device_context,
1075       BOOL               restore_deferred_context_state,
1076       D3D11CommandList*  command_list)
1077 {
1078    return device_context->lpVtbl->FinishCommandList(
1079          device_context, restore_deferred_context_state, command_list);
1080 }
D3D11GetCreationParameters(D3D11VideoDecoder video_decoder,D3D11_VIDEO_DECODER_DESC * video_desc,D3D11_VIDEO_DECODER_CONFIG * config)1081 static INLINE HRESULT D3D11GetCreationParameters(
1082       D3D11VideoDecoder           video_decoder,
1083       D3D11_VIDEO_DECODER_DESC*   video_desc,
1084       D3D11_VIDEO_DECODER_CONFIG* config)
1085 {
1086    return video_decoder->lpVtbl->GetCreationParameters(video_decoder, video_desc, config);
1087 }
D3D11GetDriverHandle(D3D11VideoDecoder video_decoder,HANDLE * driver_handle)1088 static INLINE HRESULT D3D11GetDriverHandle(D3D11VideoDecoder video_decoder, HANDLE* driver_handle)
1089 {
1090    return video_decoder->lpVtbl->GetDriverHandle(video_decoder, driver_handle);
1091 }
D3D11GetVideoProcessorContentDesc(D3D11VideoProcessorEnumerator video_processor_enumerator,D3D11_VIDEO_PROCESSOR_CONTENT_DESC * content_desc)1092 static INLINE HRESULT D3D11GetVideoProcessorContentDesc(
1093       D3D11VideoProcessorEnumerator       video_processor_enumerator,
1094       D3D11_VIDEO_PROCESSOR_CONTENT_DESC* content_desc)
1095 {
1096    return video_processor_enumerator->lpVtbl->GetVideoProcessorContentDesc(
1097          video_processor_enumerator, content_desc);
1098 }
D3D11CheckVideoProcessorFormat(D3D11VideoProcessorEnumerator video_processor_enumerator,DXGI_FORMAT format,UINT * flags)1099 static INLINE HRESULT D3D11CheckVideoProcessorFormat(
1100       D3D11VideoProcessorEnumerator video_processor_enumerator, DXGI_FORMAT format, UINT* flags)
1101 {
1102    return video_processor_enumerator->lpVtbl->CheckVideoProcessorFormat(
1103          video_processor_enumerator, format, flags);
1104 }
D3D11GetVideoProcessorCaps(D3D11VideoProcessorEnumerator video_processor_enumerator,D3D11_VIDEO_PROCESSOR_CAPS * caps)1105 static INLINE HRESULT D3D11GetVideoProcessorCaps(
1106       D3D11VideoProcessorEnumerator video_processor_enumerator, D3D11_VIDEO_PROCESSOR_CAPS* caps)
1107 {
1108    return video_processor_enumerator->lpVtbl->GetVideoProcessorCaps(
1109          video_processor_enumerator, caps);
1110 }
D3D11GetVideoProcessorRateConversionCaps(D3D11VideoProcessorEnumerator video_processor_enumerator,UINT type_index,D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS * caps)1111 static INLINE HRESULT D3D11GetVideoProcessorRateConversionCaps(
1112       D3D11VideoProcessorEnumerator               video_processor_enumerator,
1113       UINT                                        type_index,
1114       D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* caps)
1115 {
1116    return video_processor_enumerator->lpVtbl->GetVideoProcessorRateConversionCaps(
1117          video_processor_enumerator, type_index, caps);
1118 }
D3D11GetVideoProcessorCustomRate(D3D11VideoProcessorEnumerator video_processor_enumerator,UINT type_index,UINT custom_rate_index,D3D11_VIDEO_PROCESSOR_CUSTOM_RATE * rate)1119 static INLINE HRESULT D3D11GetVideoProcessorCustomRate(
1120       D3D11VideoProcessorEnumerator      video_processor_enumerator,
1121       UINT                               type_index,
1122       UINT                               custom_rate_index,
1123       D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* rate)
1124 {
1125    return video_processor_enumerator->lpVtbl->GetVideoProcessorCustomRate(
1126          video_processor_enumerator, type_index, custom_rate_index, rate);
1127 }
D3D11GetVideoProcessorFilterRange(D3D11VideoProcessorEnumerator video_processor_enumerator,D3D11_VIDEO_PROCESSOR_FILTER filter,D3D11_VIDEO_PROCESSOR_FILTER_RANGE * range)1128 static INLINE HRESULT D3D11GetVideoProcessorFilterRange(
1129       D3D11VideoProcessorEnumerator       video_processor_enumerator,
1130       D3D11_VIDEO_PROCESSOR_FILTER        filter,
1131       D3D11_VIDEO_PROCESSOR_FILTER_RANGE* range)
1132 {
1133    return video_processor_enumerator->lpVtbl->GetVideoProcessorFilterRange(
1134          video_processor_enumerator, filter, range);
1135 }
1136 static INLINE void
D3D11GetContentDesc(D3D11VideoProcessor video_processor,D3D11_VIDEO_PROCESSOR_CONTENT_DESC * desc)1137 D3D11GetContentDesc(D3D11VideoProcessor video_processor, D3D11_VIDEO_PROCESSOR_CONTENT_DESC* desc)
1138 {
1139    video_processor->lpVtbl->GetContentDesc(video_processor, desc);
1140 }
D3D11GetRateConversionCaps(D3D11VideoProcessor video_processor,D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS * caps)1141 static INLINE void D3D11GetRateConversionCaps(
1142       D3D11VideoProcessor video_processor, D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* caps)
1143 {
1144    video_processor->lpVtbl->GetRateConversionCaps(video_processor, caps);
1145 }
D3D11GetAuthenticatedChannelCertificateSize(D3D11AuthenticatedChannel authenticated_channel,UINT * certificate_size)1146 static INLINE HRESULT D3D11GetAuthenticatedChannelCertificateSize(
1147       D3D11AuthenticatedChannel authenticated_channel, UINT* certificate_size)
1148 {
1149    return authenticated_channel->lpVtbl->GetCertificateSize(
1150          authenticated_channel, certificate_size);
1151 }
D3D11GetAuthenticatedChannelCertificate(D3D11AuthenticatedChannel authenticated_channel,UINT certificate_size,BYTE * certificate)1152 static INLINE HRESULT D3D11GetAuthenticatedChannelCertificate(
1153       D3D11AuthenticatedChannel authenticated_channel, UINT certificate_size, BYTE* certificate)
1154 {
1155    return authenticated_channel->lpVtbl->GetCertificate(
1156          authenticated_channel, certificate_size, certificate);
1157 }
1158 static INLINE void
D3D11GetChannelHandle(D3D11AuthenticatedChannel authenticated_channel,HANDLE * channel_handle)1159 D3D11GetChannelHandle(D3D11AuthenticatedChannel authenticated_channel, HANDLE* channel_handle)
1160 {
1161    authenticated_channel->lpVtbl->GetChannelHandle(authenticated_channel, channel_handle);
1162 }
D3D11GetCryptoType(D3D11CryptoSession crypto_session,GUID * crypto_type)1163 static INLINE void D3D11GetCryptoType(D3D11CryptoSession crypto_session, GUID* crypto_type)
1164 {
1165    crypto_session->lpVtbl->GetCryptoType(crypto_session, crypto_type);
1166 }
D3D11GetDecoderProfile(D3D11CryptoSession crypto_session,GUID * decoder_profile)1167 static INLINE void D3D11GetDecoderProfile(D3D11CryptoSession crypto_session, GUID* decoder_profile)
1168 {
1169    crypto_session->lpVtbl->GetDecoderProfile(crypto_session, decoder_profile);
1170 }
1171 static INLINE HRESULT
D3D11GetCryptoSessionCertificateSize(D3D11CryptoSession crypto_session,UINT * certificate_size)1172 D3D11GetCryptoSessionCertificateSize(D3D11CryptoSession crypto_session, UINT* certificate_size)
1173 {
1174    return crypto_session->lpVtbl->GetCertificateSize(crypto_session, certificate_size);
1175 }
D3D11GetCryptoSessionCertificate(D3D11CryptoSession crypto_session,UINT certificate_size,BYTE * certificate)1176 static INLINE HRESULT D3D11GetCryptoSessionCertificate(
1177       D3D11CryptoSession crypto_session, UINT certificate_size, BYTE* certificate)
1178 {
1179    return crypto_session->lpVtbl->GetCertificate(crypto_session, certificate_size, certificate);
1180 }
1181 static INLINE void
D3D11GetCryptoSessionHandle(D3D11CryptoSession crypto_session,HANDLE * crypto_session_handle)1182 D3D11GetCryptoSessionHandle(D3D11CryptoSession crypto_session, HANDLE* crypto_session_handle)
1183 {
1184    crypto_session->lpVtbl->GetCryptoSessionHandle(crypto_session, crypto_session_handle);
1185 }
D3D11GetVideoDecoderOutputViewResource(D3D11VideoDecoderOutputView video_decoder_output_view,D3D11Resource * resource)1186 static INLINE void D3D11GetVideoDecoderOutputViewResource(
1187       D3D11VideoDecoderOutputView video_decoder_output_view, D3D11Resource* resource)
1188 {
1189    video_decoder_output_view->lpVtbl->GetResource(video_decoder_output_view, resource);
1190 }
D3D11GetVideoProcessorInputViewResource(D3D11VideoProcessorInputView video_processor_input_view,D3D11Resource * resource)1191 static INLINE void D3D11GetVideoProcessorInputViewResource(
1192       D3D11VideoProcessorInputView video_processor_input_view, D3D11Resource* resource)
1193 {
1194    video_processor_input_view->lpVtbl->GetResource(video_processor_input_view, resource);
1195 }
D3D11GetVideoProcessorOutputViewResource(D3D11VideoProcessorOutputView video_processor_output_view,D3D11Resource * resource)1196 static INLINE void D3D11GetVideoProcessorOutputViewResource(
1197       D3D11VideoProcessorOutputView video_processor_output_view, D3D11Resource* resource)
1198 {
1199    video_processor_output_view->lpVtbl->GetResource(video_processor_output_view, resource);
1200 }
D3D11GetDecoderBuffer(D3D11VideoContext video_context,D3D11VideoDecoder decoder,D3D11_VIDEO_DECODER_BUFFER_TYPE type,UINT * buffer_size,void ** buffer)1201 static INLINE HRESULT D3D11GetDecoderBuffer(
1202       D3D11VideoContext               video_context,
1203       D3D11VideoDecoder               decoder,
1204       D3D11_VIDEO_DECODER_BUFFER_TYPE type,
1205       UINT*                           buffer_size,
1206       void**                          buffer)
1207 {
1208    return video_context->lpVtbl->GetDecoderBuffer(
1209          video_context, decoder, type, buffer_size, buffer);
1210 }
D3D11ReleaseDecoderBuffer(D3D11VideoContext video_context,D3D11VideoDecoder decoder,D3D11_VIDEO_DECODER_BUFFER_TYPE type)1211 static INLINE HRESULT D3D11ReleaseDecoderBuffer(
1212       D3D11VideoContext               video_context,
1213       D3D11VideoDecoder               decoder,
1214       D3D11_VIDEO_DECODER_BUFFER_TYPE type)
1215 {
1216    return video_context->lpVtbl->ReleaseDecoderBuffer(video_context, decoder, type);
1217 }
D3D11DecoderBeginFrame(D3D11VideoContext video_context,D3D11VideoDecoder decoder,D3D11VideoDecoderOutputView view,UINT content_key_size,void * content_key)1218 static INLINE HRESULT D3D11DecoderBeginFrame(
1219       D3D11VideoContext           video_context,
1220       D3D11VideoDecoder           decoder,
1221       D3D11VideoDecoderOutputView view,
1222       UINT                        content_key_size,
1223       void*                       content_key)
1224 {
1225    return video_context->lpVtbl->DecoderBeginFrame(
1226          video_context, decoder, view, content_key_size, content_key);
1227 }
1228 static INLINE HRESULT
D3D11DecoderEndFrame(D3D11VideoContext video_context,D3D11VideoDecoder decoder)1229 D3D11DecoderEndFrame(D3D11VideoContext video_context, D3D11VideoDecoder decoder)
1230 {
1231    return video_context->lpVtbl->DecoderEndFrame(video_context, decoder);
1232 }
D3D11SubmitDecoderBuffers(D3D11VideoContext video_context,D3D11VideoDecoder decoder,UINT num_buffers,D3D11_VIDEO_DECODER_BUFFER_DESC * buffer_desc)1233 static INLINE HRESULT D3D11SubmitDecoderBuffers(
1234       D3D11VideoContext                video_context,
1235       D3D11VideoDecoder                decoder,
1236       UINT                             num_buffers,
1237       D3D11_VIDEO_DECODER_BUFFER_DESC* buffer_desc)
1238 {
1239    return video_context->lpVtbl->SubmitDecoderBuffers(
1240          video_context, decoder, num_buffers, buffer_desc);
1241 }
D3D11DecoderExtension(D3D11VideoContext video_context,D3D11VideoDecoder decoder,D3D11_VIDEO_DECODER_EXTENSION * extension_data)1242 static INLINE APP_DEPRECATED_HRESULT D3D11DecoderExtension(
1243       D3D11VideoContext              video_context,
1244       D3D11VideoDecoder              decoder,
1245       D3D11_VIDEO_DECODER_EXTENSION* extension_data)
1246 {
1247    return video_context->lpVtbl->DecoderExtension(video_context, decoder, extension_data);
1248 }
D3D11VideoProcessorSetOutputTargetRect(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL enable,RECT * rect)1249 static INLINE void D3D11VideoProcessorSetOutputTargetRect(
1250       D3D11VideoContext video_context, D3D11VideoProcessor video_processor, BOOL enable, RECT* rect)
1251 {
1252    video_context->lpVtbl->VideoProcessorSetOutputTargetRect(
1253          video_context, video_processor, enable, rect);
1254 }
D3D11VideoProcessorSetOutputBackgroundColor(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL ycb_cr,D3D11_VIDEO_COLOR * color)1255 static INLINE void D3D11VideoProcessorSetOutputBackgroundColor(
1256       D3D11VideoContext   video_context,
1257       D3D11VideoProcessor video_processor,
1258       BOOL                ycb_cr,
1259       D3D11_VIDEO_COLOR*  color)
1260 {
1261    video_context->lpVtbl->VideoProcessorSetOutputBackgroundColor(
1262          video_context, video_processor, ycb_cr, color);
1263 }
D3D11VideoProcessorSetOutputColorSpace(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,D3D11_VIDEO_PROCESSOR_COLOR_SPACE * color_space)1264 static INLINE void D3D11VideoProcessorSetOutputColorSpace(
1265       D3D11VideoContext                  video_context,
1266       D3D11VideoProcessor                video_processor,
1267       D3D11_VIDEO_PROCESSOR_COLOR_SPACE* color_space)
1268 {
1269    video_context->lpVtbl->VideoProcessorSetOutputColorSpace(
1270          video_context, video_processor, color_space);
1271 }
D3D11VideoProcessorSetOutputAlphaFillMode(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE alpha_fill_mode,UINT stream_index)1272 static INLINE void D3D11VideoProcessorSetOutputAlphaFillMode(
1273       D3D11VideoContext                     video_context,
1274       D3D11VideoProcessor                   video_processor,
1275       D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE alpha_fill_mode,
1276       UINT                                  stream_index)
1277 {
1278    video_context->lpVtbl->VideoProcessorSetOutputAlphaFillMode(
1279          video_context, video_processor, alpha_fill_mode, stream_index);
1280 }
D3D11VideoProcessorSetOutputConstriction(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL enable,SIZE size)1281 static INLINE void D3D11VideoProcessorSetOutputConstriction(
1282       D3D11VideoContext video_context, D3D11VideoProcessor video_processor, BOOL enable, SIZE size)
1283 {
1284    video_context->lpVtbl->VideoProcessorSetOutputConstriction(
1285          video_context, video_processor, enable, size);
1286 }
D3D11VideoProcessorSetOutputStereoMode(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL enable)1287 static INLINE void D3D11VideoProcessorSetOutputStereoMode(
1288       D3D11VideoContext video_context, D3D11VideoProcessor video_processor, BOOL enable)
1289 {
1290    video_context->lpVtbl->VideoProcessorSetOutputStereoMode(video_context, video_processor, enable);
1291 }
D3D11VideoProcessorSetOutputExtension(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,GUID * extension_guid,UINT data_size,void * data)1292 static INLINE APP_DEPRECATED_HRESULT D3D11VideoProcessorSetOutputExtension(
1293       D3D11VideoContext   video_context,
1294       D3D11VideoProcessor video_processor,
1295       GUID*               extension_guid,
1296       UINT                data_size,
1297       void*               data)
1298 {
1299    return video_context->lpVtbl->VideoProcessorSetOutputExtension(
1300          video_context, video_processor, extension_guid, data_size, data);
1301 }
D3D11VideoProcessorGetOutputTargetRect(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL * enabled,RECT * rect)1302 static INLINE void D3D11VideoProcessorGetOutputTargetRect(
1303       D3D11VideoContext   video_context,
1304       D3D11VideoProcessor video_processor,
1305       BOOL*               enabled,
1306       RECT*               rect)
1307 {
1308    video_context->lpVtbl->VideoProcessorGetOutputTargetRect(
1309          video_context, video_processor, enabled, rect);
1310 }
D3D11VideoProcessorGetOutputBackgroundColor(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL * ycb_cr,D3D11_VIDEO_COLOR * color)1311 static INLINE void D3D11VideoProcessorGetOutputBackgroundColor(
1312       D3D11VideoContext   video_context,
1313       D3D11VideoProcessor video_processor,
1314       BOOL*               ycb_cr,
1315       D3D11_VIDEO_COLOR*  color)
1316 {
1317    video_context->lpVtbl->VideoProcessorGetOutputBackgroundColor(
1318          video_context, video_processor, ycb_cr, color);
1319 }
D3D11VideoProcessorGetOutputColorSpace(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,D3D11_VIDEO_PROCESSOR_COLOR_SPACE * color_space)1320 static INLINE void D3D11VideoProcessorGetOutputColorSpace(
1321       D3D11VideoContext                  video_context,
1322       D3D11VideoProcessor                video_processor,
1323       D3D11_VIDEO_PROCESSOR_COLOR_SPACE* color_space)
1324 {
1325    video_context->lpVtbl->VideoProcessorGetOutputColorSpace(
1326          video_context, video_processor, color_space);
1327 }
D3D11VideoProcessorGetOutputAlphaFillMode(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE * alpha_fill_mode,UINT * stream_index)1328 static INLINE void D3D11VideoProcessorGetOutputAlphaFillMode(
1329       D3D11VideoContext                      video_context,
1330       D3D11VideoProcessor                    video_processor,
1331       D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE* alpha_fill_mode,
1332       UINT*                                  stream_index)
1333 {
1334    video_context->lpVtbl->VideoProcessorGetOutputAlphaFillMode(
1335          video_context, video_processor, alpha_fill_mode, stream_index);
1336 }
D3D11VideoProcessorGetOutputConstriction(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL * enabled,SIZE * size)1337 static INLINE void D3D11VideoProcessorGetOutputConstriction(
1338       D3D11VideoContext   video_context,
1339       D3D11VideoProcessor video_processor,
1340       BOOL*               enabled,
1341       SIZE*               size)
1342 {
1343    video_context->lpVtbl->VideoProcessorGetOutputConstriction(
1344          video_context, video_processor, enabled, size);
1345 }
D3D11VideoProcessorGetOutputStereoMode(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,BOOL * enabled)1346 static INLINE void D3D11VideoProcessorGetOutputStereoMode(
1347       D3D11VideoContext video_context, D3D11VideoProcessor video_processor, BOOL* enabled)
1348 {
1349    video_context->lpVtbl->VideoProcessorGetOutputStereoMode(
1350          video_context, video_processor, enabled);
1351 }
D3D11VideoProcessorGetOutputExtension(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,GUID * extension_guid,UINT data_size,void * data)1352 static INLINE APP_DEPRECATED_HRESULT D3D11VideoProcessorGetOutputExtension(
1353       D3D11VideoContext   video_context,
1354       D3D11VideoProcessor video_processor,
1355       GUID*               extension_guid,
1356       UINT                data_size,
1357       void*               data)
1358 {
1359    return video_context->lpVtbl->VideoProcessorGetOutputExtension(
1360          video_context, video_processor, extension_guid, data_size, data);
1361 }
D3D11VideoProcessorSetStreamFrameFormat(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_FRAME_FORMAT frame_format)1362 static INLINE void D3D11VideoProcessorSetStreamFrameFormat(
1363       D3D11VideoContext        video_context,
1364       D3D11VideoProcessor      video_processor,
1365       UINT                     stream_index,
1366       D3D11_VIDEO_FRAME_FORMAT frame_format)
1367 {
1368    video_context->lpVtbl->VideoProcessorSetStreamFrameFormat(
1369          video_context, video_processor, stream_index, frame_format);
1370 }
D3D11VideoProcessorSetStreamColorSpace(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_PROCESSOR_COLOR_SPACE * color_space)1371 static INLINE void D3D11VideoProcessorSetStreamColorSpace(
1372       D3D11VideoContext                  video_context,
1373       D3D11VideoProcessor                video_processor,
1374       UINT                               stream_index,
1375       D3D11_VIDEO_PROCESSOR_COLOR_SPACE* color_space)
1376 {
1377    video_context->lpVtbl->VideoProcessorSetStreamColorSpace(
1378          video_context, video_processor, stream_index, color_space);
1379 }
D3D11VideoProcessorSetStreamOutputRate(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_PROCESSOR_OUTPUT_RATE output_rate,BOOL repeat_frame,DXGI_RATIONAL * custom_rate)1380 static INLINE void D3D11VideoProcessorSetStreamOutputRate(
1381       D3D11VideoContext                 video_context,
1382       D3D11VideoProcessor               video_processor,
1383       UINT                              stream_index,
1384       D3D11_VIDEO_PROCESSOR_OUTPUT_RATE output_rate,
1385       BOOL                              repeat_frame,
1386       DXGI_RATIONAL*                    custom_rate)
1387 {
1388    video_context->lpVtbl->VideoProcessorSetStreamOutputRate(
1389          video_context, video_processor, stream_index, output_rate, repeat_frame, custom_rate);
1390 }
D3D11VideoProcessorSetStreamSourceRect(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,RECT * rect)1391 static INLINE void D3D11VideoProcessorSetStreamSourceRect(
1392       D3D11VideoContext   video_context,
1393       D3D11VideoProcessor video_processor,
1394       UINT                stream_index,
1395       BOOL                enable,
1396       RECT*               rect)
1397 {
1398    video_context->lpVtbl->VideoProcessorSetStreamSourceRect(
1399          video_context, video_processor, stream_index, enable, rect);
1400 }
D3D11VideoProcessorSetStreamDestRect(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,RECT * rect)1401 static INLINE void D3D11VideoProcessorSetStreamDestRect(
1402       D3D11VideoContext   video_context,
1403       D3D11VideoProcessor video_processor,
1404       UINT                stream_index,
1405       BOOL                enable,
1406       RECT*               rect)
1407 {
1408    video_context->lpVtbl->VideoProcessorSetStreamDestRect(
1409          video_context, video_processor, stream_index, enable, rect);
1410 }
D3D11VideoProcessorSetStreamAlpha(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,FLOAT alpha)1411 static INLINE void D3D11VideoProcessorSetStreamAlpha(
1412       D3D11VideoContext   video_context,
1413       D3D11VideoProcessor video_processor,
1414       UINT                stream_index,
1415       BOOL                enable,
1416       FLOAT               alpha)
1417 {
1418    video_context->lpVtbl->VideoProcessorSetStreamAlpha(
1419          video_context, video_processor, stream_index, enable, alpha);
1420 }
D3D11VideoProcessorSetStreamPalette(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,UINT count,UINT * entries)1421 static INLINE void D3D11VideoProcessorSetStreamPalette(
1422       D3D11VideoContext   video_context,
1423       D3D11VideoProcessor video_processor,
1424       UINT                stream_index,
1425       UINT                count,
1426       UINT*               entries)
1427 {
1428    video_context->lpVtbl->VideoProcessorSetStreamPalette(
1429          video_context, video_processor, stream_index, count, entries);
1430 }
D3D11VideoProcessorSetStreamPixelAspectRatio(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,DXGI_RATIONAL * source_aspect_ratio,DXGI_RATIONAL * destination_aspect_ratio)1431 static INLINE void D3D11VideoProcessorSetStreamPixelAspectRatio(
1432       D3D11VideoContext   video_context,
1433       D3D11VideoProcessor video_processor,
1434       UINT                stream_index,
1435       BOOL                enable,
1436       DXGI_RATIONAL*      source_aspect_ratio,
1437       DXGI_RATIONAL*      destination_aspect_ratio)
1438 {
1439    video_context->lpVtbl->VideoProcessorSetStreamPixelAspectRatio(
1440          video_context, video_processor, stream_index, enable, source_aspect_ratio,
1441          destination_aspect_ratio);
1442 }
D3D11VideoProcessorSetStreamLumaKey(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,FLOAT lower,FLOAT upper)1443 static INLINE void D3D11VideoProcessorSetStreamLumaKey(
1444       D3D11VideoContext   video_context,
1445       D3D11VideoProcessor video_processor,
1446       UINT                stream_index,
1447       BOOL                enable,
1448       FLOAT               lower,
1449       FLOAT               upper)
1450 {
1451    video_context->lpVtbl->VideoProcessorSetStreamLumaKey(
1452          video_context, video_processor, stream_index, enable, lower, upper);
1453 }
D3D11VideoProcessorSetStreamStereoFormat(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format,BOOL left_view_frame0,BOOL base_view_frame0,D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode,int mono_offset)1454 static INLINE void D3D11VideoProcessorSetStreamStereoFormat(
1455       D3D11VideoContext                      video_context,
1456       D3D11VideoProcessor                    video_processor,
1457       UINT                                   stream_index,
1458       BOOL                                   enable,
1459       D3D11_VIDEO_PROCESSOR_STEREO_FORMAT    format,
1460       BOOL                                   left_view_frame0,
1461       BOOL                                   base_view_frame0,
1462       D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode,
1463       int                                    mono_offset)
1464 {
1465    video_context->lpVtbl->VideoProcessorSetStreamStereoFormat(
1466          video_context, video_processor, stream_index, enable, format, left_view_frame0,
1467          base_view_frame0, flip_mode, mono_offset);
1468 }
D3D11VideoProcessorSetStreamAutoProcessingMode(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable)1469 static INLINE void D3D11VideoProcessorSetStreamAutoProcessingMode(
1470       D3D11VideoContext   video_context,
1471       D3D11VideoProcessor video_processor,
1472       UINT                stream_index,
1473       BOOL                enable)
1474 {
1475    video_context->lpVtbl->VideoProcessorSetStreamAutoProcessingMode(
1476          video_context, video_processor, stream_index, enable);
1477 }
D3D11VideoProcessorSetStreamFilter(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_PROCESSOR_FILTER filter,BOOL enable,int level)1478 static INLINE void D3D11VideoProcessorSetStreamFilter(
1479       D3D11VideoContext            video_context,
1480       D3D11VideoProcessor          video_processor,
1481       UINT                         stream_index,
1482       D3D11_VIDEO_PROCESSOR_FILTER filter,
1483       BOOL                         enable,
1484       int                          level)
1485 {
1486    video_context->lpVtbl->VideoProcessorSetStreamFilter(
1487          video_context, video_processor, stream_index, filter, enable, level);
1488 }
D3D11VideoProcessorSetStreamExtension(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,GUID * extension_guid,UINT data_size,void * data)1489 static INLINE APP_DEPRECATED_HRESULT D3D11VideoProcessorSetStreamExtension(
1490       D3D11VideoContext   video_context,
1491       D3D11VideoProcessor video_processor,
1492       UINT                stream_index,
1493       GUID*               extension_guid,
1494       UINT                data_size,
1495       void*               data)
1496 {
1497    return video_context->lpVtbl->VideoProcessorSetStreamExtension(
1498          video_context, video_processor, stream_index, extension_guid, data_size, data);
1499 }
D3D11VideoProcessorGetStreamFrameFormat(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_FRAME_FORMAT * frame_format)1500 static INLINE void D3D11VideoProcessorGetStreamFrameFormat(
1501       D3D11VideoContext         video_context,
1502       D3D11VideoProcessor       video_processor,
1503       UINT                      stream_index,
1504       D3D11_VIDEO_FRAME_FORMAT* frame_format)
1505 {
1506    video_context->lpVtbl->VideoProcessorGetStreamFrameFormat(
1507          video_context, video_processor, stream_index, frame_format);
1508 }
D3D11VideoProcessorGetStreamColorSpace(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_PROCESSOR_COLOR_SPACE * color_space)1509 static INLINE void D3D11VideoProcessorGetStreamColorSpace(
1510       D3D11VideoContext                  video_context,
1511       D3D11VideoProcessor                video_processor,
1512       UINT                               stream_index,
1513       D3D11_VIDEO_PROCESSOR_COLOR_SPACE* color_space)
1514 {
1515    video_context->lpVtbl->VideoProcessorGetStreamColorSpace(
1516          video_context, video_processor, stream_index, color_space);
1517 }
D3D11VideoProcessorGetStreamOutputRate(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_PROCESSOR_OUTPUT_RATE * output_rate,BOOL * repeat_frame,DXGI_RATIONAL * custom_rate)1518 static INLINE void D3D11VideoProcessorGetStreamOutputRate(
1519       D3D11VideoContext                  video_context,
1520       D3D11VideoProcessor                video_processor,
1521       UINT                               stream_index,
1522       D3D11_VIDEO_PROCESSOR_OUTPUT_RATE* output_rate,
1523       BOOL*                              repeat_frame,
1524       DXGI_RATIONAL*                     custom_rate)
1525 {
1526    video_context->lpVtbl->VideoProcessorGetStreamOutputRate(
1527          video_context, video_processor, stream_index, output_rate, repeat_frame, custom_rate);
1528 }
D3D11VideoProcessorGetStreamSourceRect(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enabled,RECT * rect)1529 static INLINE void D3D11VideoProcessorGetStreamSourceRect(
1530       D3D11VideoContext   video_context,
1531       D3D11VideoProcessor video_processor,
1532       UINT                stream_index,
1533       BOOL*               enabled,
1534       RECT*               rect)
1535 {
1536    video_context->lpVtbl->VideoProcessorGetStreamSourceRect(
1537          video_context, video_processor, stream_index, enabled, rect);
1538 }
D3D11VideoProcessorGetStreamDestRect(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enabled,RECT * rect)1539 static INLINE void D3D11VideoProcessorGetStreamDestRect(
1540       D3D11VideoContext   video_context,
1541       D3D11VideoProcessor video_processor,
1542       UINT                stream_index,
1543       BOOL*               enabled,
1544       RECT*               rect)
1545 {
1546    video_context->lpVtbl->VideoProcessorGetStreamDestRect(
1547          video_context, video_processor, stream_index, enabled, rect);
1548 }
D3D11VideoProcessorGetStreamAlpha(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enabled,FLOAT * alpha)1549 static INLINE void D3D11VideoProcessorGetStreamAlpha(
1550       D3D11VideoContext   video_context,
1551       D3D11VideoProcessor video_processor,
1552       UINT                stream_index,
1553       BOOL*               enabled,
1554       FLOAT*              alpha)
1555 {
1556    video_context->lpVtbl->VideoProcessorGetStreamAlpha(
1557          video_context, video_processor, stream_index, enabled, alpha);
1558 }
D3D11VideoProcessorGetStreamPalette(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,UINT count,UINT * entries)1559 static INLINE void D3D11VideoProcessorGetStreamPalette(
1560       D3D11VideoContext   video_context,
1561       D3D11VideoProcessor video_processor,
1562       UINT                stream_index,
1563       UINT                count,
1564       UINT*               entries)
1565 {
1566    video_context->lpVtbl->VideoProcessorGetStreamPalette(
1567          video_context, video_processor, stream_index, count, entries);
1568 }
D3D11VideoProcessorGetStreamPixelAspectRatio(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enabled,DXGI_RATIONAL * source_aspect_ratio,DXGI_RATIONAL * destination_aspect_ratio)1569 static INLINE void D3D11VideoProcessorGetStreamPixelAspectRatio(
1570       D3D11VideoContext   video_context,
1571       D3D11VideoProcessor video_processor,
1572       UINT                stream_index,
1573       BOOL*               enabled,
1574       DXGI_RATIONAL*      source_aspect_ratio,
1575       DXGI_RATIONAL*      destination_aspect_ratio)
1576 {
1577    video_context->lpVtbl->VideoProcessorGetStreamPixelAspectRatio(
1578          video_context, video_processor, stream_index, enabled, source_aspect_ratio,
1579          destination_aspect_ratio);
1580 }
D3D11VideoProcessorGetStreamLumaKey(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enabled,FLOAT * lower,FLOAT * upper)1581 static INLINE void D3D11VideoProcessorGetStreamLumaKey(
1582       D3D11VideoContext   video_context,
1583       D3D11VideoProcessor video_processor,
1584       UINT                stream_index,
1585       BOOL*               enabled,
1586       FLOAT*              lower,
1587       FLOAT*              upper)
1588 {
1589    video_context->lpVtbl->VideoProcessorGetStreamLumaKey(
1590          video_context, video_processor, stream_index, enabled, lower, upper);
1591 }
D3D11VideoProcessorGetStreamStereoFormat(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enable,D3D11_VIDEO_PROCESSOR_STEREO_FORMAT * format,BOOL * left_view_frame0,BOOL * base_view_frame0,D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE * flip_mode,int * mono_offset)1592 static INLINE void D3D11VideoProcessorGetStreamStereoFormat(
1593       D3D11VideoContext                       video_context,
1594       D3D11VideoProcessor                     video_processor,
1595       UINT                                    stream_index,
1596       BOOL*                                   enable,
1597       D3D11_VIDEO_PROCESSOR_STEREO_FORMAT*    format,
1598       BOOL*                                   left_view_frame0,
1599       BOOL*                                   base_view_frame0,
1600       D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE* flip_mode,
1601       int*                                    mono_offset)
1602 {
1603    video_context->lpVtbl->VideoProcessorGetStreamStereoFormat(
1604          video_context, video_processor, stream_index, enable, format, left_view_frame0,
1605          base_view_frame0, flip_mode, mono_offset);
1606 }
D3D11VideoProcessorGetStreamAutoProcessingMode(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enabled)1607 static INLINE void D3D11VideoProcessorGetStreamAutoProcessingMode(
1608       D3D11VideoContext   video_context,
1609       D3D11VideoProcessor video_processor,
1610       UINT                stream_index,
1611       BOOL*               enabled)
1612 {
1613    video_context->lpVtbl->VideoProcessorGetStreamAutoProcessingMode(
1614          video_context, video_processor, stream_index, enabled);
1615 }
D3D11VideoProcessorGetStreamFilter(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,D3D11_VIDEO_PROCESSOR_FILTER filter,BOOL * enabled,int * level)1616 static INLINE void D3D11VideoProcessorGetStreamFilter(
1617       D3D11VideoContext            video_context,
1618       D3D11VideoProcessor          video_processor,
1619       UINT                         stream_index,
1620       D3D11_VIDEO_PROCESSOR_FILTER filter,
1621       BOOL*                        enabled,
1622       int*                         level)
1623 {
1624    video_context->lpVtbl->VideoProcessorGetStreamFilter(
1625          video_context, video_processor, stream_index, filter, enabled, level);
1626 }
D3D11VideoProcessorGetStreamExtension(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,GUID * extension_guid,UINT data_size,void * data)1627 static INLINE APP_DEPRECATED_HRESULT D3D11VideoProcessorGetStreamExtension(
1628       D3D11VideoContext   video_context,
1629       D3D11VideoProcessor video_processor,
1630       UINT                stream_index,
1631       GUID*               extension_guid,
1632       UINT                data_size,
1633       void*               data)
1634 {
1635    return video_context->lpVtbl->VideoProcessorGetStreamExtension(
1636          video_context, video_processor, stream_index, extension_guid, data_size, data);
1637 }
D3D11VideoProcessorBlt(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,D3D11VideoProcessorOutputView view,UINT output_frame,UINT stream_count,D3D11_VIDEO_PROCESSOR_STREAM * streams)1638 static INLINE HRESULT D3D11VideoProcessorBlt(
1639       D3D11VideoContext             video_context,
1640       D3D11VideoProcessor           video_processor,
1641       D3D11VideoProcessorOutputView view,
1642       UINT                          output_frame,
1643       UINT                          stream_count,
1644       D3D11_VIDEO_PROCESSOR_STREAM* streams)
1645 {
1646    return video_context->lpVtbl->VideoProcessorBlt(
1647          video_context, video_processor, view, output_frame, stream_count, streams);
1648 }
D3D11NegotiateCryptoSessionKeyExchange(D3D11VideoContext video_context,D3D11CryptoSession crypto_session,UINT data_size,void * data)1649 static INLINE HRESULT D3D11NegotiateCryptoSessionKeyExchange(
1650       D3D11VideoContext  video_context,
1651       D3D11CryptoSession crypto_session,
1652       UINT               data_size,
1653       void*              data)
1654 {
1655    return video_context->lpVtbl->NegotiateCryptoSessionKeyExchange(
1656          video_context, crypto_session, data_size, data);
1657 }
D3D11EncryptionBlt(D3D11VideoContext video_context,D3D11CryptoSession crypto_session,D3D11Texture2D src_surface,D3D11Texture2D dst_surface,UINT ivsize,void * iv)1658 static INLINE void D3D11EncryptionBlt(
1659       D3D11VideoContext  video_context,
1660       D3D11CryptoSession crypto_session,
1661       D3D11Texture2D     src_surface,
1662       D3D11Texture2D     dst_surface,
1663       UINT               ivsize,
1664       void*              iv)
1665 {
1666    video_context->lpVtbl->EncryptionBlt(
1667          video_context, crypto_session, src_surface, dst_surface, ivsize, iv);
1668 }
D3D11DecryptionBlt(D3D11VideoContext video_context,D3D11CryptoSession crypto_session,D3D11Texture2D src_surface,D3D11Texture2D dst_surface,D3D11_ENCRYPTED_BLOCK_INFO * encrypted_block_info,UINT content_key_size,void * content_key,UINT ivsize,void * iv)1669 static INLINE void D3D11DecryptionBlt(
1670       D3D11VideoContext           video_context,
1671       D3D11CryptoSession          crypto_session,
1672       D3D11Texture2D              src_surface,
1673       D3D11Texture2D              dst_surface,
1674       D3D11_ENCRYPTED_BLOCK_INFO* encrypted_block_info,
1675       UINT                        content_key_size,
1676       void*                       content_key,
1677       UINT                        ivsize,
1678       void*                       iv)
1679 {
1680    video_context->lpVtbl->DecryptionBlt(
1681          video_context, crypto_session, src_surface, dst_surface, encrypted_block_info,
1682          content_key_size, content_key, ivsize, iv);
1683 }
D3D11StartSessionKeyRefresh(D3D11VideoContext video_context,D3D11CryptoSession crypto_session,UINT random_number_size,void * random_number)1684 static INLINE void D3D11StartSessionKeyRefresh(
1685       D3D11VideoContext  video_context,
1686       D3D11CryptoSession crypto_session,
1687       UINT               random_number_size,
1688       void*              random_number)
1689 {
1690    video_context->lpVtbl->StartSessionKeyRefresh(
1691          video_context, crypto_session, random_number_size, random_number);
1692 }
1693 static INLINE void
D3D11FinishSessionKeyRefresh(D3D11VideoContext video_context,D3D11CryptoSession crypto_session)1694 D3D11FinishSessionKeyRefresh(D3D11VideoContext video_context, D3D11CryptoSession crypto_session)
1695 {
1696    video_context->lpVtbl->FinishSessionKeyRefresh(video_context, crypto_session);
1697 }
D3D11GetEncryptionBltKey(D3D11VideoContext video_context,D3D11CryptoSession crypto_session,UINT key_size,void * readback_key)1698 static INLINE HRESULT D3D11GetEncryptionBltKey(
1699       D3D11VideoContext  video_context,
1700       D3D11CryptoSession crypto_session,
1701       UINT               key_size,
1702       void*              readback_key)
1703 {
1704    return video_context->lpVtbl->GetEncryptionBltKey(
1705          video_context, crypto_session, key_size, readback_key);
1706 }
D3D11NegotiateAuthenticatedChannelKeyExchange(D3D11VideoContext video_context,D3D11AuthenticatedChannel channel,UINT data_size,void * data)1707 static INLINE HRESULT D3D11NegotiateAuthenticatedChannelKeyExchange(
1708       D3D11VideoContext         video_context,
1709       D3D11AuthenticatedChannel channel,
1710       UINT                      data_size,
1711       void*                     data)
1712 {
1713    return video_context->lpVtbl->NegotiateAuthenticatedChannelKeyExchange(
1714          video_context, channel, data_size, data);
1715 }
D3D11QueryAuthenticatedChannel(D3D11VideoContext video_context,D3D11AuthenticatedChannel channel,UINT input_size,void * input,UINT output_size,void * output)1716 static INLINE HRESULT D3D11QueryAuthenticatedChannel(
1717       D3D11VideoContext         video_context,
1718       D3D11AuthenticatedChannel channel,
1719       UINT                      input_size,
1720       void*                     input,
1721       UINT                      output_size,
1722       void*                     output)
1723 {
1724    return video_context->lpVtbl->QueryAuthenticatedChannel(
1725          video_context, channel, input_size, input, output_size, output);
1726 }
D3D11ConfigureAuthenticatedChannel(D3D11VideoContext video_context,D3D11AuthenticatedChannel channel,UINT input_size,void * input,D3D11_AUTHENTICATED_CONFIGURE_OUTPUT * output)1727 static INLINE HRESULT D3D11ConfigureAuthenticatedChannel(
1728       D3D11VideoContext                     video_context,
1729       D3D11AuthenticatedChannel             channel,
1730       UINT                                  input_size,
1731       void*                                 input,
1732       D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* output)
1733 {
1734    return video_context->lpVtbl->ConfigureAuthenticatedChannel(
1735          video_context, channel, input_size, input, output);
1736 }
D3D11VideoProcessorSetStreamRotation(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL enable,D3D11_VIDEO_PROCESSOR_ROTATION rotation)1737 static INLINE void D3D11VideoProcessorSetStreamRotation(
1738       D3D11VideoContext              video_context,
1739       D3D11VideoProcessor            video_processor,
1740       UINT                           stream_index,
1741       BOOL                           enable,
1742       D3D11_VIDEO_PROCESSOR_ROTATION rotation)
1743 {
1744    video_context->lpVtbl->VideoProcessorSetStreamRotation(
1745          video_context, video_processor, stream_index, enable, rotation);
1746 }
D3D11VideoProcessorGetStreamRotation(D3D11VideoContext video_context,D3D11VideoProcessor video_processor,UINT stream_index,BOOL * enable,D3D11_VIDEO_PROCESSOR_ROTATION * rotation)1747 static INLINE void D3D11VideoProcessorGetStreamRotation(
1748       D3D11VideoContext               video_context,
1749       D3D11VideoProcessor             video_processor,
1750       UINT                            stream_index,
1751       BOOL*                           enable,
1752       D3D11_VIDEO_PROCESSOR_ROTATION* rotation)
1753 {
1754    video_context->lpVtbl->VideoProcessorGetStreamRotation(
1755          video_context, video_processor, stream_index, enable, rotation);
1756 }
D3D11CreateVideoDecoder(D3D11VideoDevice video_device,D3D11_VIDEO_DECODER_DESC * video_desc,D3D11_VIDEO_DECODER_CONFIG * config,D3D11VideoDecoder * decoder)1757 static INLINE HRESULT D3D11CreateVideoDecoder(
1758       D3D11VideoDevice            video_device,
1759       D3D11_VIDEO_DECODER_DESC*   video_desc,
1760       D3D11_VIDEO_DECODER_CONFIG* config,
1761       D3D11VideoDecoder*          decoder)
1762 {
1763    return video_device->lpVtbl->CreateVideoDecoder(video_device, video_desc, config, decoder);
1764 }
D3D11CreateVideoProcessor(D3D11VideoDevice video_device,D3D11VideoProcessorEnumerator enumerator,UINT rate_conversion_index,D3D11VideoProcessor * video_processor)1765 static INLINE HRESULT D3D11CreateVideoProcessor(
1766       D3D11VideoDevice              video_device,
1767       D3D11VideoProcessorEnumerator enumerator,
1768       UINT                          rate_conversion_index,
1769       D3D11VideoProcessor*          video_processor)
1770 {
1771    return video_device->lpVtbl->CreateVideoProcessor(
1772          video_device, enumerator, rate_conversion_index, video_processor);
1773 }
D3D11CreateAuthenticatedChannel(D3D11VideoDevice video_device,D3D11_AUTHENTICATED_CHANNEL_TYPE channel_type,D3D11AuthenticatedChannel * authenticated_channel)1774 static INLINE HRESULT D3D11CreateAuthenticatedChannel(
1775       D3D11VideoDevice                 video_device,
1776       D3D11_AUTHENTICATED_CHANNEL_TYPE channel_type,
1777       D3D11AuthenticatedChannel*       authenticated_channel)
1778 {
1779    return video_device->lpVtbl->CreateAuthenticatedChannel(
1780          video_device, channel_type, authenticated_channel);
1781 }
D3D11CreateCryptoSession(D3D11VideoDevice video_device,GUID * crypto_type,GUID * decoder_profile,GUID * key_exchange_type,D3D11CryptoSession * crypto_session)1782 static INLINE HRESULT D3D11CreateCryptoSession(
1783       D3D11VideoDevice    video_device,
1784       GUID*               crypto_type,
1785       GUID*               decoder_profile,
1786       GUID*               key_exchange_type,
1787       D3D11CryptoSession* crypto_session)
1788 {
1789    return video_device->lpVtbl->CreateCryptoSession(
1790          video_device, crypto_type, decoder_profile, key_exchange_type, crypto_session);
1791 }
D3D11CreateVideoDecoderOutputView(D3D11VideoDevice video_device,D3D11Resource resource,D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC * desc,D3D11VideoDecoderOutputView * vdovview)1792 static INLINE HRESULT D3D11CreateVideoDecoderOutputView(
1793       D3D11VideoDevice                      video_device,
1794       D3D11Resource                         resource,
1795       D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* desc,
1796       D3D11VideoDecoderOutputView*          vdovview)
1797 {
1798    return video_device->lpVtbl->CreateVideoDecoderOutputView(
1799          video_device, resource, desc, vdovview);
1800 }
D3D11CreateVideoProcessorInputView(D3D11VideoDevice video_device,D3D11Resource resource,D3D11VideoProcessorEnumerator enumerator,D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC * desc,D3D11VideoProcessorInputView * vpiview)1801 static INLINE HRESULT D3D11CreateVideoProcessorInputView(
1802       D3D11VideoDevice                       video_device,
1803       D3D11Resource                          resource,
1804       D3D11VideoProcessorEnumerator          enumerator,
1805       D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* desc,
1806       D3D11VideoProcessorInputView*          vpiview)
1807 {
1808    return video_device->lpVtbl->CreateVideoProcessorInputView(
1809          video_device, resource, enumerator, desc, vpiview);
1810 }
D3D11CreateVideoProcessorOutputView(D3D11VideoDevice video_device,D3D11Resource resource,D3D11VideoProcessorEnumerator enumerator,D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC * desc,D3D11VideoProcessorOutputView * vpoview)1811 static INLINE HRESULT D3D11CreateVideoProcessorOutputView(
1812       D3D11VideoDevice                        video_device,
1813       D3D11Resource                           resource,
1814       D3D11VideoProcessorEnumerator           enumerator,
1815       D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* desc,
1816       D3D11VideoProcessorOutputView*          vpoview)
1817 {
1818    return video_device->lpVtbl->CreateVideoProcessorOutputView(
1819          video_device, resource, enumerator, desc, vpoview);
1820 }
D3D11CreateVideoProcessorEnumerator(D3D11VideoDevice video_device,D3D11_VIDEO_PROCESSOR_CONTENT_DESC * desc,D3D11VideoProcessorEnumerator * enumerator)1821 static INLINE HRESULT D3D11CreateVideoProcessorEnumerator(
1822       D3D11VideoDevice                    video_device,
1823       D3D11_VIDEO_PROCESSOR_CONTENT_DESC* desc,
1824       D3D11VideoProcessorEnumerator*      enumerator)
1825 {
1826    return video_device->lpVtbl->CreateVideoProcessorEnumerator(video_device, desc, enumerator);
1827 }
D3D11GetVideoDecoderProfileCount(D3D11VideoDevice video_device)1828 static INLINE UINT D3D11GetVideoDecoderProfileCount(D3D11VideoDevice video_device)
1829 {
1830    return video_device->lpVtbl->GetVideoDecoderProfileCount(video_device);
1831 }
1832 static INLINE HRESULT
D3D11GetVideoDecoderProfile(D3D11VideoDevice video_device,UINT index,GUID * decoder_profile)1833 D3D11GetVideoDecoderProfile(D3D11VideoDevice video_device, UINT index, GUID* decoder_profile)
1834 {
1835    return video_device->lpVtbl->GetVideoDecoderProfile(video_device, index, decoder_profile);
1836 }
D3D11CheckVideoDecoderFormat(D3D11VideoDevice video_device,GUID * decoder_profile,DXGI_FORMAT format,BOOL * supported)1837 static INLINE HRESULT D3D11CheckVideoDecoderFormat(
1838       D3D11VideoDevice video_device, GUID* decoder_profile, DXGI_FORMAT format, BOOL* supported)
1839 {
1840    return video_device->lpVtbl->CheckVideoDecoderFormat(
1841          video_device, decoder_profile, format, supported);
1842 }
D3D11GetVideoDecoderConfigCount(D3D11VideoDevice video_device,D3D11_VIDEO_DECODER_DESC * desc,UINT * count)1843 static INLINE HRESULT D3D11GetVideoDecoderConfigCount(
1844       D3D11VideoDevice video_device, D3D11_VIDEO_DECODER_DESC* desc, UINT* count)
1845 {
1846    return video_device->lpVtbl->GetVideoDecoderConfigCount(video_device, desc, count);
1847 }
D3D11GetVideoDecoderConfig(D3D11VideoDevice video_device,D3D11_VIDEO_DECODER_DESC * desc,UINT index,D3D11_VIDEO_DECODER_CONFIG * config)1848 static INLINE HRESULT D3D11GetVideoDecoderConfig(
1849       D3D11VideoDevice            video_device,
1850       D3D11_VIDEO_DECODER_DESC*   desc,
1851       UINT                        index,
1852       D3D11_VIDEO_DECODER_CONFIG* config)
1853 {
1854    return video_device->lpVtbl->GetVideoDecoderConfig(video_device, desc, index, config);
1855 }
D3D11GetContentProtectionCaps(D3D11VideoDevice video_device,GUID * crypto_type,GUID * decoder_profile,D3D11_VIDEO_CONTENT_PROTECTION_CAPS * caps)1856 static INLINE HRESULT D3D11GetContentProtectionCaps(
1857       D3D11VideoDevice                     video_device,
1858       GUID*                                crypto_type,
1859       GUID*                                decoder_profile,
1860       D3D11_VIDEO_CONTENT_PROTECTION_CAPS* caps)
1861 {
1862    return video_device->lpVtbl->GetContentProtectionCaps(
1863          video_device, crypto_type, decoder_profile, caps);
1864 }
D3D11CheckCryptoKeyExchange(D3D11VideoDevice video_device,GUID * crypto_type,GUID * decoder_profile,UINT index,GUID * key_exchange_type)1865 static INLINE HRESULT D3D11CheckCryptoKeyExchange(
1866       D3D11VideoDevice video_device,
1867       GUID*            crypto_type,
1868       GUID*            decoder_profile,
1869       UINT             index,
1870       GUID*            key_exchange_type)
1871 {
1872    return video_device->lpVtbl->CheckCryptoKeyExchange(
1873          video_device, crypto_type, decoder_profile, index, key_exchange_type);
1874 }
D3D11CreateBuffer(D3D11Device device,D3D11_BUFFER_DESC * desc,D3D11_SUBRESOURCE_DATA * initial_data,D3D11Buffer * buffer)1875 static INLINE HRESULT D3D11CreateBuffer(
1876       D3D11Device             device,
1877       D3D11_BUFFER_DESC*      desc,
1878       D3D11_SUBRESOURCE_DATA* initial_data,
1879       D3D11Buffer*            buffer)
1880 {
1881    return device->lpVtbl->CreateBuffer(device, desc, initial_data, buffer);
1882 }
D3D11CreateTexture1D(D3D11Device device,D3D11_TEXTURE1D_DESC * desc,D3D11_SUBRESOURCE_DATA * initial_data,D3D11Texture1D * texture1d)1883 static INLINE HRESULT D3D11CreateTexture1D(
1884       D3D11Device             device,
1885       D3D11_TEXTURE1D_DESC*   desc,
1886       D3D11_SUBRESOURCE_DATA* initial_data,
1887       D3D11Texture1D*         texture1d)
1888 {
1889    return device->lpVtbl->CreateTexture1D(device, desc, initial_data, texture1d);
1890 }
D3D11CreateTexture2D(D3D11Device device,D3D11_TEXTURE2D_DESC * desc,D3D11_SUBRESOURCE_DATA * initial_data,D3D11Texture2D * texture2d)1891 static INLINE HRESULT D3D11CreateTexture2D(
1892       D3D11Device             device,
1893       D3D11_TEXTURE2D_DESC*   desc,
1894       D3D11_SUBRESOURCE_DATA* initial_data,
1895       D3D11Texture2D*         texture2d)
1896 {
1897    return device->lpVtbl->CreateTexture2D(device, desc, initial_data, texture2d);
1898 }
D3D11CreateTexture3D(D3D11Device device,D3D11_TEXTURE3D_DESC * desc,D3D11_SUBRESOURCE_DATA * initial_data,D3D11Texture3D * texture3d)1899 static INLINE HRESULT D3D11CreateTexture3D(
1900       D3D11Device             device,
1901       D3D11_TEXTURE3D_DESC*   desc,
1902       D3D11_SUBRESOURCE_DATA* initial_data,
1903       D3D11Texture3D*         texture3d)
1904 {
1905    return device->lpVtbl->CreateTexture3D(device, desc, initial_data, texture3d);
1906 }
D3D11CreateShaderResourceView(D3D11Device device,D3D11Resource resource,D3D11_SHADER_RESOURCE_VIEW_DESC * desc,D3D11ShaderResourceView * srview)1907 static INLINE HRESULT D3D11CreateShaderResourceView(
1908       D3D11Device                      device,
1909       D3D11Resource                    resource,
1910       D3D11_SHADER_RESOURCE_VIEW_DESC* desc,
1911       D3D11ShaderResourceView*         srview)
1912 {
1913    return device->lpVtbl->CreateShaderResourceView(device, resource, desc, srview);
1914 }
D3D11CreateUnorderedAccessView(D3D11Device device,D3D11Resource resource,D3D11_UNORDERED_ACCESS_VIEW_DESC * desc,D3D11UnorderedAccessView * uaview)1915 static INLINE HRESULT D3D11CreateUnorderedAccessView(
1916       D3D11Device                       device,
1917       D3D11Resource                     resource,
1918       D3D11_UNORDERED_ACCESS_VIEW_DESC* desc,
1919       D3D11UnorderedAccessView*         uaview)
1920 {
1921    return device->lpVtbl->CreateUnorderedAccessView(device, resource, desc, uaview);
1922 }
D3D11CreateRenderTargetView(D3D11Device device,D3D11Resource resource,D3D11_RENDER_TARGET_VIEW_DESC * desc,D3D11RenderTargetView * rtview)1923 static INLINE HRESULT D3D11CreateRenderTargetView(
1924       D3D11Device                    device,
1925       D3D11Resource                  resource,
1926       D3D11_RENDER_TARGET_VIEW_DESC* desc,
1927       D3D11RenderTargetView*         rtview)
1928 {
1929    return device->lpVtbl->CreateRenderTargetView(device, resource, desc, rtview);
1930 }
D3D11CreateDepthStencilView(D3D11Device device,D3D11Resource resource,D3D11_DEPTH_STENCIL_VIEW_DESC * desc,D3D11DepthStencilView * depth_stencil_view)1931 static INLINE HRESULT D3D11CreateDepthStencilView(
1932       D3D11Device                    device,
1933       D3D11Resource                  resource,
1934       D3D11_DEPTH_STENCIL_VIEW_DESC* desc,
1935       D3D11DepthStencilView*         depth_stencil_view)
1936 {
1937    return device->lpVtbl->CreateDepthStencilView(device, resource, desc, depth_stencil_view);
1938 }
D3D11CreateInputLayout(D3D11Device device,const D3D11_INPUT_ELEMENT_DESC * input_element_descs,UINT num_elements,void * shader_bytecode_with_input_signature,SIZE_T bytecode_length,D3D11InputLayout * input_layout)1939 static INLINE HRESULT D3D11CreateInputLayout(
1940       D3D11Device                     device,
1941       const D3D11_INPUT_ELEMENT_DESC* input_element_descs,
1942       UINT                            num_elements,
1943       void*                           shader_bytecode_with_input_signature,
1944       SIZE_T                          bytecode_length,
1945       D3D11InputLayout*               input_layout)
1946 {
1947    return device->lpVtbl->CreateInputLayout(
1948          device, input_element_descs, num_elements, shader_bytecode_with_input_signature,
1949          bytecode_length, input_layout);
1950 }
D3D11CreateVertexShader(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11ClassLinkage class_linkage,D3D11VertexShader * vertex_shader)1951 static INLINE HRESULT D3D11CreateVertexShader(
1952       D3D11Device        device,
1953       void*              shader_bytecode,
1954       SIZE_T             bytecode_length,
1955       D3D11ClassLinkage  class_linkage,
1956       D3D11VertexShader* vertex_shader)
1957 {
1958    return device->lpVtbl->CreateVertexShader(
1959          device, shader_bytecode, bytecode_length, class_linkage, vertex_shader);
1960 }
D3D11CreateGeometryShader(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11ClassLinkage class_linkage,D3D11GeometryShader * geometry_shader)1961 static INLINE HRESULT D3D11CreateGeometryShader(
1962       D3D11Device          device,
1963       void*                shader_bytecode,
1964       SIZE_T               bytecode_length,
1965       D3D11ClassLinkage    class_linkage,
1966       D3D11GeometryShader* geometry_shader)
1967 {
1968    return device->lpVtbl->CreateGeometryShader(
1969          device, shader_bytecode, bytecode_length, class_linkage, geometry_shader);
1970 }
D3D11CreateGeometryShaderWithStreamOutput(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11_SO_DECLARATION_ENTRY * sodeclaration,UINT num_entries,UINT * buffer_strides,UINT num_strides,UINT rasterized_stream,D3D11ClassLinkage class_linkage,D3D11GeometryShader * geometry_shader)1971 static INLINE HRESULT D3D11CreateGeometryShaderWithStreamOutput(
1972       D3D11Device                 device,
1973       void*                       shader_bytecode,
1974       SIZE_T                      bytecode_length,
1975       D3D11_SO_DECLARATION_ENTRY* sodeclaration,
1976       UINT                        num_entries,
1977       UINT*                       buffer_strides,
1978       UINT                        num_strides,
1979       UINT                        rasterized_stream,
1980       D3D11ClassLinkage           class_linkage,
1981       D3D11GeometryShader*        geometry_shader)
1982 {
1983    return device->lpVtbl->CreateGeometryShaderWithStreamOutput(
1984          device, shader_bytecode, bytecode_length, sodeclaration, num_entries, buffer_strides,
1985          num_strides, rasterized_stream, class_linkage, geometry_shader);
1986 }
D3D11CreatePixelShader(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11ClassLinkage class_linkage,D3D11PixelShader * pixel_shader)1987 static INLINE HRESULT D3D11CreatePixelShader(
1988       D3D11Device       device,
1989       void*             shader_bytecode,
1990       SIZE_T            bytecode_length,
1991       D3D11ClassLinkage class_linkage,
1992       D3D11PixelShader* pixel_shader)
1993 {
1994    return device->lpVtbl->CreatePixelShader(
1995          device, shader_bytecode, bytecode_length, class_linkage, pixel_shader);
1996 }
D3D11CreateHullShader(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11ClassLinkage class_linkage,D3D11HullShader * hull_shader)1997 static INLINE HRESULT D3D11CreateHullShader(
1998       D3D11Device       device,
1999       void*             shader_bytecode,
2000       SIZE_T            bytecode_length,
2001       D3D11ClassLinkage class_linkage,
2002       D3D11HullShader*  hull_shader)
2003 {
2004    return device->lpVtbl->CreateHullShader(
2005          device, shader_bytecode, bytecode_length, class_linkage, hull_shader);
2006 }
D3D11CreateDomainShader(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11ClassLinkage class_linkage,D3D11DomainShader * domain_shader)2007 static INLINE HRESULT D3D11CreateDomainShader(
2008       D3D11Device        device,
2009       void*              shader_bytecode,
2010       SIZE_T             bytecode_length,
2011       D3D11ClassLinkage  class_linkage,
2012       D3D11DomainShader* domain_shader)
2013 {
2014    return device->lpVtbl->CreateDomainShader(
2015          device, shader_bytecode, bytecode_length, class_linkage, domain_shader);
2016 }
D3D11CreateComputeShader(D3D11Device device,void * shader_bytecode,SIZE_T bytecode_length,D3D11ClassLinkage class_linkage,D3D11ComputeShader * compute_shader)2017 static INLINE HRESULT D3D11CreateComputeShader(
2018       D3D11Device         device,
2019       void*               shader_bytecode,
2020       SIZE_T              bytecode_length,
2021       D3D11ClassLinkage   class_linkage,
2022       D3D11ComputeShader* compute_shader)
2023 {
2024    return device->lpVtbl->CreateComputeShader(
2025          device, shader_bytecode, bytecode_length, class_linkage, compute_shader);
2026 }
D3D11CreateClassLinkage(D3D11Device device,D3D11ClassLinkage * linkage)2027 static INLINE HRESULT D3D11CreateClassLinkage(D3D11Device device, D3D11ClassLinkage* linkage)
2028 {
2029    return device->lpVtbl->CreateClassLinkage(device, linkage);
2030 }
D3D11CreateBlendState(D3D11Device device,D3D11_BLEND_DESC * blend_state_desc,D3D11BlendState * blend_state)2031 static INLINE HRESULT D3D11CreateBlendState(
2032       D3D11Device device, D3D11_BLEND_DESC* blend_state_desc, D3D11BlendState* blend_state)
2033 {
2034    return device->lpVtbl->CreateBlendState(device, blend_state_desc, blend_state);
2035 }
D3D11CreateDepthStencilState(D3D11Device device,D3D11_DEPTH_STENCIL_DESC * depth_stencil_desc,D3D11DepthStencilState * depth_stencil_state)2036 static INLINE HRESULT D3D11CreateDepthStencilState(
2037       D3D11Device               device,
2038       D3D11_DEPTH_STENCIL_DESC* depth_stencil_desc,
2039       D3D11DepthStencilState*   depth_stencil_state)
2040 {
2041    return device->lpVtbl->CreateDepthStencilState(device, depth_stencil_desc, depth_stencil_state);
2042 }
D3D11CreateRasterizerState(D3D11Device device,D3D11_RASTERIZER_DESC * rasterizer_desc,D3D11RasterizerState * rasterizer_state)2043 static INLINE HRESULT D3D11CreateRasterizerState(
2044       D3D11Device            device,
2045       D3D11_RASTERIZER_DESC* rasterizer_desc,
2046       D3D11RasterizerState*  rasterizer_state)
2047 {
2048    return device->lpVtbl->CreateRasterizerState(device, rasterizer_desc, rasterizer_state);
2049 }
D3D11CreateSamplerState(D3D11Device device,D3D11_SAMPLER_DESC * sampler_desc,D3D11SamplerState * sampler_state)2050 static INLINE HRESULT D3D11CreateSamplerState(
2051       D3D11Device device, D3D11_SAMPLER_DESC* sampler_desc, D3D11SamplerState* sampler_state)
2052 {
2053    return device->lpVtbl->CreateSamplerState(device, sampler_desc, sampler_state);
2054 }
2055 static INLINE HRESULT
D3D11CreateQuery(D3D11Device device,D3D11_QUERY_DESC * query_desc,D3D11Query * query)2056 D3D11CreateQuery(D3D11Device device, D3D11_QUERY_DESC* query_desc, D3D11Query* query)
2057 {
2058    return device->lpVtbl->CreateQuery(device, query_desc, query);
2059 }
D3D11CreatePredicate(D3D11Device device,D3D11_QUERY_DESC * predicate_desc,D3D11Predicate * predicate)2060 static INLINE HRESULT D3D11CreatePredicate(
2061       D3D11Device device, D3D11_QUERY_DESC* predicate_desc, D3D11Predicate* predicate)
2062 {
2063    return device->lpVtbl->CreatePredicate(device, predicate_desc, predicate);
2064 }
2065 static INLINE HRESULT
D3D11CreateCounter(D3D11Device device,D3D11_COUNTER_DESC * counter_desc,D3D11Counter * counter)2066 D3D11CreateCounter(D3D11Device device, D3D11_COUNTER_DESC* counter_desc, D3D11Counter* counter)
2067 {
2068    return device->lpVtbl->CreateCounter(device, counter_desc, counter);
2069 }
D3D11CreateDeferredContext(D3D11Device device,UINT context_flags,D3D11DeviceContext * deferred_context)2070 static INLINE HRESULT D3D11CreateDeferredContext(
2071       D3D11Device device, UINT context_flags, D3D11DeviceContext* deferred_context)
2072 {
2073    return device->lpVtbl->CreateDeferredContext(device, context_flags, deferred_context);
2074 }
2075 static INLINE HRESULT
D3D11OpenSharedResource(D3D11Device device,HANDLE h_resource,ID3D11Resource ** out)2076 D3D11OpenSharedResource(D3D11Device device, HANDLE h_resource, ID3D11Resource** out)
2077 {
2078    return device->lpVtbl->OpenSharedResource(
2079          device, h_resource, uuidof(ID3D11Resource), (void**)out);
2080 }
2081 static INLINE HRESULT
D3D11CheckFormatSupport(D3D11Device device,DXGI_FORMAT format,UINT * format_support)2082 D3D11CheckFormatSupport(D3D11Device device, DXGI_FORMAT format, UINT* format_support)
2083 {
2084    return device->lpVtbl->CheckFormatSupport(device, format, format_support);
2085 }
D3D11CheckMultisampleQualityLevels(D3D11Device device,DXGI_FORMAT format,UINT sample_count,UINT * num_quality_levels)2086 static INLINE HRESULT D3D11CheckMultisampleQualityLevels(
2087       D3D11Device device, DXGI_FORMAT format, UINT sample_count, UINT* num_quality_levels)
2088 {
2089    return device->lpVtbl->CheckMultisampleQualityLevels(
2090          device, format, sample_count, num_quality_levels);
2091 }
D3D11CheckCounterInfo(D3D11Device device,D3D11_COUNTER_INFO * counter_info)2092 static INLINE void D3D11CheckCounterInfo(D3D11Device device, D3D11_COUNTER_INFO* counter_info)
2093 {
2094    device->lpVtbl->CheckCounterInfo(device, counter_info);
2095 }
D3D11CheckCounter(D3D11Device device,D3D11_COUNTER_DESC * desc,D3D11_COUNTER_TYPE * type,UINT * active_counters,LPSTR sz_name,UINT * name_length,LPSTR sz_units,UINT * units_length,LPSTR sz_description,UINT * description_length)2096 static INLINE HRESULT D3D11CheckCounter(
2097       D3D11Device         device,
2098       D3D11_COUNTER_DESC* desc,
2099       D3D11_COUNTER_TYPE* type,
2100       UINT*               active_counters,
2101       LPSTR               sz_name,
2102       UINT*               name_length,
2103       LPSTR               sz_units,
2104       UINT*               units_length,
2105       LPSTR               sz_description,
2106       UINT*               description_length)
2107 {
2108    return device->lpVtbl->CheckCounter(
2109          device, desc, type, active_counters, sz_name, name_length, sz_units, units_length,
2110          sz_description, description_length);
2111 }
D3D11CheckFeatureSupport(D3D11Device device,D3D11_FEATURE feature,void * feature_support_data,UINT feature_support_data_size)2112 static INLINE HRESULT D3D11CheckFeatureSupport(
2113       D3D11Device   device,
2114       D3D11_FEATURE feature,
2115       void*         feature_support_data,
2116       UINT          feature_support_data_size)
2117 {
2118    return device->lpVtbl->CheckFeatureSupport(
2119          device, feature, feature_support_data, feature_support_data_size);
2120 }
D3D11GetFeatureLevel(D3D11Device device)2121 static INLINE D3D_FEATURE_LEVEL D3D11GetFeatureLevel(D3D11Device device)
2122 {
2123    return device->lpVtbl->GetFeatureLevel(device);
2124 }
D3D11GetCreationFlags(D3D11Device device)2125 static INLINE UINT D3D11GetCreationFlags(D3D11Device device)
2126 {
2127    return device->lpVtbl->GetCreationFlags(device);
2128 }
D3D11GetDeviceRemovedReason(D3D11Device device)2129 static INLINE HRESULT D3D11GetDeviceRemovedReason(D3D11Device device)
2130 {
2131    return device->lpVtbl->GetDeviceRemovedReason(device);
2132 }
2133 static INLINE void
D3D11GetImmediateContext(D3D11Device device,D3D11DeviceContext * immediate_context)2134 D3D11GetImmediateContext(D3D11Device device, D3D11DeviceContext* immediate_context)
2135 {
2136    device->lpVtbl->GetImmediateContext(device, immediate_context);
2137 }
D3D11SetExceptionMode(D3D11Device device,UINT raise_flags)2138 static INLINE HRESULT D3D11SetExceptionMode(D3D11Device device, UINT raise_flags)
2139 {
2140    return device->lpVtbl->SetExceptionMode(device, raise_flags);
2141 }
D3D11GetExceptionMode(D3D11Device device)2142 static INLINE UINT D3D11GetExceptionMode(D3D11Device device)
2143 {
2144    return device->lpVtbl->GetExceptionMode(device);
2145 }
2146 
2147 #ifdef DEBUG
D3D11SetDebugFeatureMask(D3D11Debug debug,UINT mask)2148 static INLINE HRESULT D3D11SetDebugFeatureMask(D3D11Debug debug, UINT mask)
2149 {
2150    return debug->lpVtbl->SetFeatureMask(debug, mask);
2151 }
D3D11GetDebugFeatureMask(D3D11Debug debug)2152 static INLINE UINT D3D11GetDebugFeatureMask(D3D11Debug debug)
2153 {
2154    return debug->lpVtbl->GetFeatureMask(debug);
2155 }
D3D11SetPresentPerRenderOpDelay(D3D11Debug debug,UINT milliseconds)2156 static INLINE HRESULT D3D11SetPresentPerRenderOpDelay(D3D11Debug debug, UINT milliseconds)
2157 {
2158    return debug->lpVtbl->SetPresentPerRenderOpDelay(debug, milliseconds);
2159 }
D3D11GetPresentPerRenderOpDelay(D3D11Debug debug)2160 static INLINE UINT D3D11GetPresentPerRenderOpDelay(D3D11Debug debug)
2161 {
2162    return debug->lpVtbl->GetPresentPerRenderOpDelay(debug);
2163 }
D3D11SetSwapChain(D3D11Debug debug,IDXGISwapChain * swap_chain)2164 static INLINE HRESULT D3D11SetSwapChain(D3D11Debug debug, IDXGISwapChain* swap_chain)
2165 {
2166    return debug->lpVtbl->SetSwapChain(debug, (IDXGISwapChain*)swap_chain);
2167 }
D3D11GetSwapChain(D3D11Debug debug,IDXGISwapChain ** swap_chain)2168 static INLINE HRESULT D3D11GetSwapChain(D3D11Debug debug, IDXGISwapChain** swap_chain)
2169 {
2170    return debug->lpVtbl->GetSwapChain(debug, (IDXGISwapChain**)swap_chain);
2171 }
D3D11ValidateContext(D3D11Debug debug,D3D11DeviceContext context)2172 static INLINE HRESULT D3D11ValidateContext(D3D11Debug debug, D3D11DeviceContext context)
2173 {
2174    return debug->lpVtbl->ValidateContext(debug, context);
2175 }
D3D11ReportLiveDeviceObjects(D3D11Debug debug,D3D11_RLDO_FLAGS flags)2176 static INLINE HRESULT D3D11ReportLiveDeviceObjects(D3D11Debug debug, D3D11_RLDO_FLAGS flags)
2177 {
2178    return debug->lpVtbl->ReportLiveDeviceObjects(debug, flags);
2179 }
D3D11ValidateContextForDispatch(D3D11Debug debug,D3D11DeviceContext context)2180 static INLINE HRESULT D3D11ValidateContextForDispatch(D3D11Debug debug, D3D11DeviceContext context)
2181 {
2182    return debug->lpVtbl->ValidateContextForDispatch(debug, context);
2183 }
2184 #endif
2185 
2186 #ifndef __WINRT__
D3D11SetUseRef(D3D11SwitchToRef switch_to_ref,BOOL use_ref)2187 static INLINE BOOL D3D11SetUseRef(D3D11SwitchToRef switch_to_ref, BOOL use_ref)
2188 {
2189    return switch_to_ref->lpVtbl->SetUseRef(switch_to_ref, use_ref);
2190 }
D3D11GetUseRef(D3D11SwitchToRef switch_to_ref)2191 static INLINE BOOL D3D11GetUseRef(D3D11SwitchToRef switch_to_ref)
2192 {
2193    return switch_to_ref->lpVtbl->GetUseRef(switch_to_ref);
2194 }
2195 #endif
D3D11SetShaderTrackingOptionsByType(D3D11TracingDevice tracing_device,UINT resource_type_flags,UINT options)2196 static INLINE HRESULT D3D11SetShaderTrackingOptionsByType(
2197       D3D11TracingDevice tracing_device, UINT resource_type_flags, UINT options)
2198 {
2199    return tracing_device->lpVtbl->SetShaderTrackingOptionsByType(
2200          tracing_device, resource_type_flags, options);
2201 }
2202 static INLINE HRESULT
D3D11SetShaderTrackingOptions(D3D11TracingDevice tracing_device,void * shader,UINT options)2203 D3D11SetShaderTrackingOptions(D3D11TracingDevice tracing_device, void* shader, UINT options)
2204 {
2205    return tracing_device->lpVtbl->SetShaderTrackingOptions(
2206          tracing_device, (IUnknown*)shader, options);
2207 }
2208 static INLINE HRESULT
D3D11SetMessageCountLimit(D3D11InfoQueue info_queue,UINT64 message_count_limit)2209 D3D11SetMessageCountLimit(D3D11InfoQueue info_queue, UINT64 message_count_limit)
2210 {
2211    return info_queue->lpVtbl->SetMessageCountLimit(info_queue, message_count_limit);
2212 }
D3D11ClearStoredMessages(D3D11InfoQueue info_queue)2213 static INLINE void D3D11ClearStoredMessages(D3D11InfoQueue info_queue)
2214 {
2215    info_queue->lpVtbl->ClearStoredMessages(info_queue);
2216 }
2217 #ifndef __WINRT__
D3D11GetMessageA(D3D11InfoQueue info_queue,UINT64 message_index,D3D11_MESSAGE * message,SIZE_T * message_byte_length)2218 static INLINE HRESULT D3D11GetMessageA(
2219       D3D11InfoQueue info_queue,
2220       UINT64         message_index,
2221       D3D11_MESSAGE* message,
2222       SIZE_T*        message_byte_length)
2223 {
2224    return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length);
2225 }
2226 #endif
D3D11GetNumMessagesAllowedByStorageFilter(D3D11InfoQueue info_queue)2227 static INLINE UINT64 D3D11GetNumMessagesAllowedByStorageFilter(D3D11InfoQueue info_queue)
2228 {
2229    return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue);
2230 }
D3D11GetNumMessagesDeniedByStorageFilter(D3D11InfoQueue info_queue)2231 static INLINE UINT64 D3D11GetNumMessagesDeniedByStorageFilter(D3D11InfoQueue info_queue)
2232 {
2233    return info_queue->lpVtbl->GetNumMessagesDeniedByStorageFilter(info_queue);
2234 }
D3D11GetNumStoredMessages(D3D11InfoQueue info_queue)2235 static INLINE UINT64 D3D11GetNumStoredMessages(D3D11InfoQueue info_queue)
2236 {
2237    return info_queue->lpVtbl->GetNumStoredMessages(info_queue);
2238 }
D3D11GetNumStoredMessagesAllowedByRetrievalFilter(D3D11InfoQueue info_queue)2239 static INLINE UINT64 D3D11GetNumStoredMessagesAllowedByRetrievalFilter(D3D11InfoQueue info_queue)
2240 {
2241    return info_queue->lpVtbl->GetNumStoredMessagesAllowedByRetrievalFilter(info_queue);
2242 }
D3D11GetNumMessagesDiscardedByMessageCountLimit(D3D11InfoQueue info_queue)2243 static INLINE UINT64 D3D11GetNumMessagesDiscardedByMessageCountLimit(D3D11InfoQueue info_queue)
2244 {
2245    return info_queue->lpVtbl->GetNumMessagesDiscardedByMessageCountLimit(info_queue);
2246 }
D3D11GetMessageCountLimit(D3D11InfoQueue info_queue)2247 static INLINE UINT64 D3D11GetMessageCountLimit(D3D11InfoQueue info_queue)
2248 {
2249    return info_queue->lpVtbl->GetMessageCountLimit(info_queue);
2250 }
2251 static INLINE HRESULT
D3D11AddStorageFilterEntries(D3D11InfoQueue info_queue,D3D11_INFO_QUEUE_FILTER * filter)2252 D3D11AddStorageFilterEntries(D3D11InfoQueue info_queue, D3D11_INFO_QUEUE_FILTER* filter)
2253 {
2254    return info_queue->lpVtbl->AddStorageFilterEntries(info_queue, filter);
2255 }
D3D11GetStorageFilter(D3D11InfoQueue info_queue,D3D11_INFO_QUEUE_FILTER * filter,SIZE_T * filter_byte_length)2256 static INLINE HRESULT D3D11GetStorageFilter(
2257       D3D11InfoQueue info_queue, D3D11_INFO_QUEUE_FILTER* filter, SIZE_T* filter_byte_length)
2258 {
2259    return info_queue->lpVtbl->GetStorageFilter(info_queue, filter, filter_byte_length);
2260 }
D3D11ClearStorageFilter(D3D11InfoQueue info_queue)2261 static INLINE void D3D11ClearStorageFilter(D3D11InfoQueue info_queue)
2262 {
2263    info_queue->lpVtbl->ClearStorageFilter(info_queue);
2264 }
D3D11PushEmptyStorageFilter(D3D11InfoQueue info_queue)2265 static INLINE HRESULT D3D11PushEmptyStorageFilter(D3D11InfoQueue info_queue)
2266 {
2267    return info_queue->lpVtbl->PushEmptyStorageFilter(info_queue);
2268 }
D3D11PushCopyOfStorageFilter(D3D11InfoQueue info_queue)2269 static INLINE HRESULT D3D11PushCopyOfStorageFilter(D3D11InfoQueue info_queue)
2270 {
2271    return info_queue->lpVtbl->PushCopyOfStorageFilter(info_queue);
2272 }
2273 static INLINE HRESULT
D3D11PushStorageFilter(D3D11InfoQueue info_queue,D3D11_INFO_QUEUE_FILTER * filter)2274 D3D11PushStorageFilter(D3D11InfoQueue info_queue, D3D11_INFO_QUEUE_FILTER* filter)
2275 {
2276    return info_queue->lpVtbl->PushStorageFilter(info_queue, filter);
2277 }
D3D11PopStorageFilter(D3D11InfoQueue info_queue)2278 static INLINE void D3D11PopStorageFilter(D3D11InfoQueue info_queue)
2279 {
2280    info_queue->lpVtbl->PopStorageFilter(info_queue);
2281 }
D3D11GetStorageFilterStackSize(D3D11InfoQueue info_queue)2282 static INLINE UINT D3D11GetStorageFilterStackSize(D3D11InfoQueue info_queue)
2283 {
2284    return info_queue->lpVtbl->GetStorageFilterStackSize(info_queue);
2285 }
2286 static INLINE HRESULT
D3D11AddRetrievalFilterEntries(D3D11InfoQueue info_queue,D3D11_INFO_QUEUE_FILTER * filter)2287 D3D11AddRetrievalFilterEntries(D3D11InfoQueue info_queue, D3D11_INFO_QUEUE_FILTER* filter)
2288 {
2289    return info_queue->lpVtbl->AddRetrievalFilterEntries(info_queue, filter);
2290 }
D3D11GetRetrievalFilter(D3D11InfoQueue info_queue,D3D11_INFO_QUEUE_FILTER * filter,SIZE_T * filter_byte_length)2291 static INLINE HRESULT D3D11GetRetrievalFilter(
2292       D3D11InfoQueue info_queue, D3D11_INFO_QUEUE_FILTER* filter, SIZE_T* filter_byte_length)
2293 {
2294    return info_queue->lpVtbl->GetRetrievalFilter(info_queue, filter, filter_byte_length);
2295 }
D3D11ClearRetrievalFilter(D3D11InfoQueue info_queue)2296 static INLINE void D3D11ClearRetrievalFilter(D3D11InfoQueue info_queue)
2297 {
2298    info_queue->lpVtbl->ClearRetrievalFilter(info_queue);
2299 }
D3D11PushEmptyRetrievalFilter(D3D11InfoQueue info_queue)2300 static INLINE HRESULT D3D11PushEmptyRetrievalFilter(D3D11InfoQueue info_queue)
2301 {
2302    return info_queue->lpVtbl->PushEmptyRetrievalFilter(info_queue);
2303 }
D3D11PushCopyOfRetrievalFilter(D3D11InfoQueue info_queue)2304 static INLINE HRESULT D3D11PushCopyOfRetrievalFilter(D3D11InfoQueue info_queue)
2305 {
2306    return info_queue->lpVtbl->PushCopyOfRetrievalFilter(info_queue);
2307 }
2308 static INLINE HRESULT
D3D11PushRetrievalFilter(D3D11InfoQueue info_queue,D3D11_INFO_QUEUE_FILTER * filter)2309 D3D11PushRetrievalFilter(D3D11InfoQueue info_queue, D3D11_INFO_QUEUE_FILTER* filter)
2310 {
2311    return info_queue->lpVtbl->PushRetrievalFilter(info_queue, filter);
2312 }
D3D11PopRetrievalFilter(D3D11InfoQueue info_queue)2313 static INLINE void D3D11PopRetrievalFilter(D3D11InfoQueue info_queue)
2314 {
2315    info_queue->lpVtbl->PopRetrievalFilter(info_queue);
2316 }
D3D11GetRetrievalFilterStackSize(D3D11InfoQueue info_queue)2317 static INLINE UINT D3D11GetRetrievalFilterStackSize(D3D11InfoQueue info_queue)
2318 {
2319    return info_queue->lpVtbl->GetRetrievalFilterStackSize(info_queue);
2320 }
D3D11AddMessage(D3D11InfoQueue info_queue,D3D11_MESSAGE_CATEGORY category,D3D11_MESSAGE_SEVERITY severity,D3D11_MESSAGE_ID id,LPCSTR description)2321 static INLINE HRESULT D3D11AddMessage(
2322       D3D11InfoQueue         info_queue,
2323       D3D11_MESSAGE_CATEGORY category,
2324       D3D11_MESSAGE_SEVERITY severity,
2325       D3D11_MESSAGE_ID       id,
2326       LPCSTR                 description)
2327 {
2328    return info_queue->lpVtbl->AddMessage(info_queue, category, severity, id, description);
2329 }
D3D11AddApplicationMessage(D3D11InfoQueue info_queue,D3D11_MESSAGE_SEVERITY severity,LPCSTR description)2330 static INLINE HRESULT D3D11AddApplicationMessage(
2331       D3D11InfoQueue info_queue, D3D11_MESSAGE_SEVERITY severity, LPCSTR description)
2332 {
2333    return info_queue->lpVtbl->AddApplicationMessage(info_queue, severity, description);
2334 }
2335 static INLINE HRESULT
D3D11SetBreakOnCategory(D3D11InfoQueue info_queue,D3D11_MESSAGE_CATEGORY category,BOOL enable)2336 D3D11SetBreakOnCategory(D3D11InfoQueue info_queue, D3D11_MESSAGE_CATEGORY category, BOOL enable)
2337 {
2338    return info_queue->lpVtbl->SetBreakOnCategory(info_queue, category, enable);
2339 }
2340 static INLINE HRESULT
D3D11SetBreakOnSeverity(D3D11InfoQueue info_queue,D3D11_MESSAGE_SEVERITY severity,BOOL enable)2341 D3D11SetBreakOnSeverity(D3D11InfoQueue info_queue, D3D11_MESSAGE_SEVERITY severity, BOOL enable)
2342 {
2343    return info_queue->lpVtbl->SetBreakOnSeverity(info_queue, severity, enable);
2344 }
D3D11SetBreakOnID(D3D11InfoQueue info_queue,D3D11_MESSAGE_ID id,BOOL enable)2345 static INLINE HRESULT D3D11SetBreakOnID(D3D11InfoQueue info_queue, D3D11_MESSAGE_ID id, BOOL enable)
2346 {
2347    return info_queue->lpVtbl->SetBreakOnID(info_queue, id, enable);
2348 }
2349 static INLINE BOOL
D3D11GetBreakOnCategory(D3D11InfoQueue info_queue,D3D11_MESSAGE_CATEGORY category)2350 D3D11GetBreakOnCategory(D3D11InfoQueue info_queue, D3D11_MESSAGE_CATEGORY category)
2351 {
2352    return info_queue->lpVtbl->GetBreakOnCategory(info_queue, category);
2353 }
2354 static INLINE BOOL
D3D11GetBreakOnSeverity(D3D11InfoQueue info_queue,D3D11_MESSAGE_SEVERITY severity)2355 D3D11GetBreakOnSeverity(D3D11InfoQueue info_queue, D3D11_MESSAGE_SEVERITY severity)
2356 {
2357    return info_queue->lpVtbl->GetBreakOnSeverity(info_queue, severity);
2358 }
D3D11GetBreakOnID(D3D11InfoQueue info_queue,D3D11_MESSAGE_ID id)2359 static INLINE BOOL D3D11GetBreakOnID(D3D11InfoQueue info_queue, D3D11_MESSAGE_ID id)
2360 {
2361    return info_queue->lpVtbl->GetBreakOnID(info_queue, id);
2362 }
2363 #ifdef DEBUG
D3D11SetMuteDebugOutput(D3D11InfoQueue info_queue,BOOL mute)2364 static INLINE void D3D11SetMuteDebugOutput(D3D11InfoQueue info_queue, BOOL mute)
2365 {
2366    info_queue->lpVtbl->SetMuteDebugOutput(info_queue, mute);
2367 }
D3D11GetMuteDebugOutput(D3D11InfoQueue info_queue)2368 static INLINE BOOL D3D11GetMuteDebugOutput(D3D11InfoQueue info_queue)
2369 {
2370    return info_queue->lpVtbl->GetMuteDebugOutput(info_queue);
2371 }
2372 #endif
2373 
2374 /* end of auto-generated */
2375 
2376 static INLINE HRESULT
DXGIGetSwapChainBufferD3D11(DXGISwapChain swap_chain,UINT buffer,D3D11Texture2D * out)2377 DXGIGetSwapChainBufferD3D11(DXGISwapChain swap_chain, UINT buffer, D3D11Texture2D* out)
2378 {
2379    return swap_chain->lpVtbl->GetBuffer(swap_chain, buffer, uuidof(ID3D11Texture2D), (void**)out);
2380 }
2381 
D3D11MapTexture2D(D3D11DeviceContext device_context,D3D11Texture2D texture,UINT subresource,D3D11_MAP map_type,UINT map_flags,D3D11_MAPPED_SUBRESOURCE * mapped_resource)2382 static INLINE HRESULT D3D11MapTexture2D(
2383       D3D11DeviceContext        device_context,
2384       D3D11Texture2D            texture,
2385       UINT                      subresource,
2386       D3D11_MAP                 map_type,
2387       UINT                      map_flags,
2388       D3D11_MAPPED_SUBRESOURCE* mapped_resource)
2389 {
2390    return device_context->lpVtbl->Map(
2391          device_context, (D3D11Resource)texture, subresource, map_type, map_flags, mapped_resource);
2392 }
2393 static INLINE void
D3D11UnmapTexture2D(D3D11DeviceContext device_context,D3D11Texture2D texture,UINT subresource)2394 D3D11UnmapTexture2D(D3D11DeviceContext device_context, D3D11Texture2D texture, UINT subresource)
2395 {
2396    device_context->lpVtbl->Unmap(device_context, (D3D11Resource)texture, subresource);
2397 }
D3D11CopyTexture2DSubresourceRegion(D3D11DeviceContext device_context,D3D11Texture2D dst_texture,UINT dst_subresource,UINT dst_x,UINT dst_y,UINT dst_z,D3D11Texture2D src_texture,UINT src_subresource,D3D11_BOX * src_box)2398 static INLINE void D3D11CopyTexture2DSubresourceRegion(
2399       D3D11DeviceContext device_context,
2400       D3D11Texture2D     dst_texture,
2401       UINT               dst_subresource,
2402       UINT               dst_x,
2403       UINT               dst_y,
2404       UINT               dst_z,
2405       D3D11Texture2D     src_texture,
2406       UINT               src_subresource,
2407       D3D11_BOX*         src_box)
2408 {
2409    device_context->lpVtbl->CopySubresourceRegion(
2410          device_context, (D3D11Resource)dst_texture, dst_subresource, dst_x, dst_y, dst_z,
2411          (D3D11Resource)src_texture, src_subresource, src_box);
2412 }
D3D11CreateTexture2DRenderTargetView(D3D11Device device,D3D11Texture2D texture,D3D11_RENDER_TARGET_VIEW_DESC * desc,D3D11RenderTargetView * rtview)2413 static INLINE HRESULT D3D11CreateTexture2DRenderTargetView(
2414       D3D11Device                    device,
2415       D3D11Texture2D                 texture,
2416       D3D11_RENDER_TARGET_VIEW_DESC* desc,
2417       D3D11RenderTargetView*         rtview)
2418 {
2419    return device->lpVtbl->CreateRenderTargetView(device, (D3D11Resource)texture, desc, rtview);
2420 }
D3D11CreateTexture2DShaderResourceView(D3D11Device device,D3D11Texture2D texture,D3D11_SHADER_RESOURCE_VIEW_DESC * desc,D3D11ShaderResourceView * srview)2421 static INLINE HRESULT D3D11CreateTexture2DShaderResourceView(
2422       D3D11Device                      device,
2423       D3D11Texture2D                   texture,
2424       D3D11_SHADER_RESOURCE_VIEW_DESC* desc,
2425       D3D11ShaderResourceView*         srview)
2426 {
2427    return device->lpVtbl->CreateShaderResourceView(device, (D3D11Resource)texture, desc, srview);
2428 }
2429 
D3D11MapBuffer(D3D11DeviceContext device_context,D3D11Buffer buffer,UINT subresource,D3D11_MAP map_type,UINT map_flags,D3D11_MAPPED_SUBRESOURCE * mapped_resource)2430 static INLINE HRESULT D3D11MapBuffer(
2431       D3D11DeviceContext        device_context,
2432       D3D11Buffer               buffer,
2433       UINT                      subresource,
2434       D3D11_MAP                 map_type,
2435       UINT                      map_flags,
2436       D3D11_MAPPED_SUBRESOURCE* mapped_resource)
2437 {
2438    return device_context->lpVtbl->Map(
2439          device_context, (D3D11Resource)buffer, subresource, map_type, map_flags, mapped_resource);
2440 }
2441 static INLINE void
D3D11UnmapBuffer(D3D11DeviceContext device_context,D3D11Buffer buffer,UINT subresource)2442 D3D11UnmapBuffer(D3D11DeviceContext device_context, D3D11Buffer buffer, UINT subresource)
2443 {
2444    device_context->lpVtbl->Unmap(device_context, (D3D11Resource)buffer, subresource);
2445 }
2446 #endif
2447 
2448    /* internal */
2449 
2450 #include <assert.h>
2451 #include <boolean.h>
2452 #include <retro_math.h>
2453 #include <gfx/math/matrix_4x4.h>
2454 #include <libretro_d3d.h>
2455 #include "../../retroarch.h"
2456 #include "../drivers_shader/slang_process.h"
2457 
2458 typedef struct d3d11_vertex_t
2459 {
2460    float position[2];
2461    float texcoord[2];
2462    float color[4];
2463 } d3d11_vertex_t;
2464 
2465 typedef struct
2466 {
2467    D3D11Texture2D          handle;
2468    D3D11Texture2D          staging;
2469    D3D11_TEXTURE2D_DESC    desc;
2470    D3D11RenderTargetView   rt_view;
2471    D3D11ShaderResourceView view;
2472    D3D11SamplerStateRef    sampler;
2473    float4_t                size_data;
2474 } d3d11_texture_t;
2475 
2476 typedef struct
2477 {
2478    UINT32 colors[4];
2479    struct
2480    {
2481       float x, y, w, h;
2482    } pos;
2483    struct
2484    {
2485       float u, v, w, h;
2486    } coords;
2487    struct
2488    {
2489       float scaling;
2490       float rotation;
2491    } params;
2492 } d3d11_sprite_t;
2493 
2494 #ifndef ALIGN
2495 #ifdef _MSC_VER
2496 #define ALIGN(x) __declspec(align(x))
2497 #else
2498 #define ALIGN(x) __attribute__((aligned(x)))
2499 #endif
2500 #endif
2501 
2502 typedef struct ALIGN(16)
2503 {
2504    math_matrix_4x4 mvp;
2505    struct
2506    {
2507       float width;
2508       float height;
2509    } OutputSize;
2510    float time;
2511 } d3d11_uniform_t;
2512 
2513 typedef struct d3d11_shader_t
2514 {
2515    D3D11VertexShader   vs;
2516    D3D11PixelShader    ps;
2517    D3D11GeometryShader gs;
2518    D3D11InputLayout    layout;
2519 } d3d11_shader_t;
2520 
2521 typedef struct
2522 {
2523    unsigned              cur_mon_id;
2524    DXGISwapChain         swapChain;
2525    D3D11Device           device;
2526    D3D_FEATURE_LEVEL     supportedFeatureLevel;
2527    D3D11DeviceContext    context;
2528    D3D11RasterizerState  scissor_enabled;
2529    D3D11RasterizerState  scissor_disabled;
2530    D3D11Buffer           ubo;
2531    d3d11_uniform_t       ubo_values;
2532    D3D11SamplerState     samplers[RARCH_FILTER_MAX][RARCH_WRAP_MAX];
2533    D3D11BlendState       blend_enable;
2534    D3D11BlendState       blend_disable;
2535    D3D11BlendState       blend_pipeline;
2536    D3D11Buffer           menu_pipeline_vbo;
2537    math_matrix_4x4       mvp, mvp_no_rot;
2538    struct video_viewport vp;
2539    D3D11_VIEWPORT        viewport;
2540    D3D11_RECT            scissor;
2541    DXGI_FORMAT           format;
2542    float                 clearcolor[4];
2543    bool                  vsync;
2544    bool                  resize_chain;
2545    bool                  keep_aspect;
2546    bool                  resize_viewport;
2547    bool                  resize_render_targets;
2548    bool                  init_history;
2549    bool                  has_flip_model;
2550    bool                  has_allow_tearing;
2551    d3d11_shader_t        shaders[GFX_MAX_SHADERS];
2552 #ifdef __WINRT__
2553    DXGIFactory2 factory;
2554 #else
2555    DXGIFactory factory;
2556 #endif
2557    DXGIAdapter adapter;
2558 
2559 	struct
2560    {
2561       bool enable;
2562       struct retro_hw_render_interface_d3d11 iface;
2563    } hw;
2564 
2565 	struct
2566    {
2567       d3d11_shader_t shader;
2568       d3d11_shader_t shader_font;
2569       D3D11Buffer    vbo;
2570       int            offset;
2571       int            capacity;
2572       bool           enabled;
2573    } sprites;
2574 
2575 #ifdef HAVE_OVERLAY
2576    struct
2577    {
2578       D3D11Buffer      vbo;
2579       d3d11_texture_t* textures;
2580       bool             enabled;
2581       bool             fullscreen;
2582       int              count;
2583    } overlays;
2584 #endif
2585 
2586    struct
2587    {
2588       d3d11_texture_t texture;
2589       D3D11Buffer     vbo;
2590       bool            enabled;
2591       bool            fullscreen;
2592    } menu;
2593 
2594    struct
2595    {
2596       d3d11_texture_t texture[GFX_MAX_FRAME_HISTORY + 1];
2597       D3D11Buffer     vbo;
2598       D3D11Buffer     ubo;
2599       D3D11_VIEWPORT  viewport;
2600       float4_t        output_size;
2601       int             rotation;
2602    } frame;
2603 
2604    struct
2605    {
2606       d3d11_shader_t             shader;
2607       D3D11Buffer                buffers[SLANG_CBUFFER_MAX];
2608       d3d11_texture_t            rt;
2609       d3d11_texture_t            feedback;
2610       D3D11_VIEWPORT             viewport;
2611       pass_semantics_t           semantics;
2612       uint32_t                   frame_count;
2613       int32_t                    frame_direction;
2614    } pass[GFX_MAX_SHADERS];
2615 
2616    struct video_shader* shader_preset;
2617    struct string_list *gpu_list;
2618    IDXGIAdapter1 *current_adapter;
2619    IDXGIAdapter1 *adapters[D3D11_MAX_GPU_COUNT];
2620    d3d11_texture_t      luts[GFX_MAX_TEXTURES];
2621 } d3d11_video_t;
2622 
2623 void d3d11_init_texture(D3D11Device device, d3d11_texture_t* texture);
d3d11_release_texture(d3d11_texture_t * texture)2624 static INLINE void d3d11_release_texture(d3d11_texture_t* texture)
2625 {
2626    Release(texture->handle);
2627    Release(texture->staging);
2628    Release(texture->view);
2629    Release(texture->rt_view);
2630 }
2631 
2632 void d3d11_update_texture(
2633       D3D11DeviceContext ctx,
2634       unsigned           width,
2635       unsigned           height,
2636       unsigned           pitch,
2637       DXGI_FORMAT        format,
2638       const void*        data,
2639       d3d11_texture_t*   texture);
2640 
2641 DXGI_FORMAT d3d11_get_closest_match(
2642       D3D11Device device, DXGI_FORMAT desired_format, UINT desired_format_support);
2643 
2644 bool d3d11_init_shader(
2645       D3D11Device                     device,
2646       const char*                     src,
2647       size_t                          size,
2648       const void*                     src_name,
2649       LPCSTR                          vs_entry,
2650       LPCSTR                          ps_entry,
2651       LPCSTR                          gs_entry,
2652       const D3D11_INPUT_ELEMENT_DESC* input_element_descs,
2653       UINT                            num_elements,
2654       d3d11_shader_t*                 out);
2655 
d3d11_release_shader(d3d11_shader_t * shader)2656 static INLINE void d3d11_release_shader(d3d11_shader_t* shader)
2657 {
2658    Release(shader->layout);
2659    Release(shader->vs);
2660    Release(shader->ps);
2661    Release(shader->gs);
2662 }
2663 #if !defined(__cplusplus) || defined(CINTERFACE)
2664 static INLINE void
d3d11_set_texture_and_sampler(D3D11DeviceContext ctx,UINT slot,d3d11_texture_t * texture)2665 d3d11_set_texture_and_sampler(D3D11DeviceContext ctx, UINT slot, d3d11_texture_t* texture)
2666 {
2667    D3D11SetPShaderResources(ctx, slot, 1, &texture->view);
2668    D3D11SetPShaderSamplers(ctx, slot, 1, (D3D11SamplerState*)&texture->sampler);
2669 }
2670 
d3d11_set_shader(D3D11DeviceContext ctx,d3d11_shader_t * shader)2671 static INLINE void d3d11_set_shader(D3D11DeviceContext ctx, d3d11_shader_t* shader)
2672 {
2673    D3D11SetInputLayout(ctx, shader->layout);
2674    D3D11SetVShader(ctx, shader->vs, NULL, 0);
2675    D3D11SetPShader(ctx, shader->ps, NULL, 0);
2676    D3D11SetGShader(ctx, shader->gs, NULL, 0);
2677 }
D3D11SetVertexBuffer(D3D11DeviceContext device_context,UINT slot,D3D11Buffer const vertex_buffer,UINT stride,UINT offset)2678 static INLINE void D3D11SetVertexBuffer(
2679       D3D11DeviceContext device_context,
2680       UINT               slot,
2681       D3D11Buffer const  vertex_buffer,
2682       UINT               stride,
2683       UINT               offset)
2684 {
2685    D3D11SetVertexBuffers(device_context, slot, 1, &vertex_buffer, &stride, &offset);
2686 }
D3D11SetVShaderConstantBuffer(D3D11DeviceContext device_context,UINT slot,D3D11Buffer const constant_buffer)2687 static INLINE void D3D11SetVShaderConstantBuffer(
2688       D3D11DeviceContext device_context, UINT slot, D3D11Buffer const constant_buffer)
2689 {
2690    D3D11SetVShaderConstantBuffers(device_context, slot, 1, &constant_buffer);
2691 }
D3D11SetPShaderConstantBuffer(D3D11DeviceContext device_context,UINT slot,D3D11Buffer const constant_buffer)2692 static INLINE void D3D11SetPShaderConstantBuffer(
2693       D3D11DeviceContext device_context, UINT slot, D3D11Buffer const constant_buffer)
2694 {
2695    D3D11SetPShaderConstantBuffers(device_context, slot, 1, &constant_buffer);
2696 }
2697 #endif
2698