RetroArch
d3d10_common.h
Go to the documentation of this file.
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 "dxgi_common.h"
21 #include <d3d10.h>
22 
23 #include "../drivers_shader/slang_process.h"
24 
26 
35 
36 /* auto-generated */
56 
57 
58 #if !defined(__cplusplus) || defined(CINTERFACE)
59 static INLINE void D3D10SetResourceEvictionPriority(D3D10Resource resource, UINT eviction_priority)
60 {
61  resource->lpVtbl->SetEvictionPriority(resource, eviction_priority);
62 }
64 {
65  return resource->lpVtbl->GetEvictionPriority(resource);
66 }
68 {
69  buffer->lpVtbl->SetEvictionPriority(buffer, eviction_priority);
70 }
72 {
73  return buffer->lpVtbl->GetEvictionPriority(buffer);
74 }
75 static INLINE HRESULT
76 D3D10MapBuffer(D3D10Buffer buffer, D3D10_MAP map_type, UINT map_flags, void** data)
77 {
78  return buffer->lpVtbl->Map(buffer, map_type, map_flags, data);
79 }
80 static INLINE void D3D10UnmapBuffer(D3D10Buffer buffer) { buffer->lpVtbl->Unmap(buffer); }
81 static INLINE void
83 {
84  texture1d->lpVtbl->SetEvictionPriority(texture1d, eviction_priority);
85 }
87 {
88  return texture1d->lpVtbl->GetEvictionPriority(texture1d);
89 }
91  D3D10Texture1D texture1d, UINT subresource, D3D10_MAP map_type, UINT map_flags, void** data)
92 {
93  return texture1d->lpVtbl->Map(texture1d, subresource, map_type, map_flags, data);
94 }
95 static INLINE void D3D10UnmapTexture1D(D3D10Texture1D texture1d, UINT subresource)
96 {
97  texture1d->lpVtbl->Unmap(texture1d, subresource);
98 }
99 static INLINE void
101 {
102  texture2d->lpVtbl->SetEvictionPriority(texture2d, eviction_priority);
103 }
105 {
106  return texture2d->lpVtbl->GetEvictionPriority(texture2d);
107 }
109  D3D10Texture2D texture2d,
110  UINT subresource,
111  D3D10_MAP map_type,
112  UINT map_flags,
113  D3D10_MAPPED_TEXTURE2D* mapped_tex2d)
114 {
115  return texture2d->lpVtbl->Map(texture2d, subresource, map_type, map_flags, mapped_tex2d);
116 }
117 static INLINE void D3D10UnmapTexture2D(D3D10Texture2D texture2d, UINT subresource)
118 {
119  texture2d->lpVtbl->Unmap(texture2d, subresource);
120 }
121 static INLINE void
123 {
124  texture3d->lpVtbl->SetEvictionPriority(texture3d, eviction_priority);
125 }
127 {
128  return texture3d->lpVtbl->GetEvictionPriority(texture3d);
129 }
131  D3D10Texture3D texture3d,
132  UINT subresource,
133  D3D10_MAP map_type,
134  UINT map_flags,
135  D3D10_MAPPED_TEXTURE3D* mapped_tex3d)
136 {
137  return texture3d->lpVtbl->Map(texture3d, subresource, map_type, map_flags, mapped_tex3d);
138 }
139 static INLINE void D3D10UnmapTexture3D(D3D10Texture3D texture3d, UINT subresource)
140 {
141  texture3d->lpVtbl->Unmap(texture3d, subresource);
142 }
144 {
145  view->lpVtbl->GetResource(view, resource);
146 }
148  D3D10ShaderResourceView shader_resource_view, D3D10Resource* resource)
149 {
150  shader_resource_view->lpVtbl->GetResource(shader_resource_view, resource);
151 }
152 static INLINE void
154 {
155  render_target_view->lpVtbl->GetResource(render_target_view, resource);
156 }
157 static INLINE void
159 {
160  depth_stencil_view->lpVtbl->GetResource(depth_stencil_view, resource);
161 }
163 {
164  asynchronous->lpVtbl->Begin(asynchronous);
165 }
167 {
168  asynchronous->lpVtbl->End(asynchronous);
169 }
171  D3D10Asynchronous asynchronous, void* data, UINT data_size, UINT get_data_flags)
172 {
173  return asynchronous->lpVtbl->GetData(asynchronous, data, data_size, get_data_flags);
174 }
176 {
177  return asynchronous->lpVtbl->GetDataSize(asynchronous);
178 }
179 static INLINE void D3D10BeginQuery(D3D10Query query) { query->lpVtbl->Begin(query); }
180 static INLINE void D3D10EndQuery(D3D10Query query) { query->lpVtbl->End(query); }
181 static INLINE HRESULT
182 D3D10GetQueryData(D3D10Query query, void* data, UINT data_size, UINT get_data_flags)
183 {
184  return query->lpVtbl->GetData(query, data, data_size, get_data_flags);
185 }
187 {
188  return query->lpVtbl->GetDataSize(query);
189 }
191 {
192  predicate->lpVtbl->Begin(predicate);
193 }
195 {
196  predicate->lpVtbl->End(predicate);
197 }
198 static INLINE HRESULT
199 D3D10GetPredicateData(D3D10Predicate predicate, void* data, UINT data_size, UINT get_data_flags)
200 {
201  return predicate->lpVtbl->GetData(predicate, data, data_size, get_data_flags);
202 }
204 {
205  return predicate->lpVtbl->GetDataSize(predicate);
206 }
207 static INLINE void D3D10BeginCounter(D3D10Counter counter) { counter->lpVtbl->Begin(counter); }
208 static INLINE void D3D10EndCounter(D3D10Counter counter) { counter->lpVtbl->End(counter); }
209 static INLINE HRESULT
210 D3D10GetCounterData(D3D10Counter counter, void* data, UINT data_size, UINT get_data_flags)
211 {
212  return counter->lpVtbl->GetData(counter, data, data_size, get_data_flags);
213 }
215 {
216  return counter->lpVtbl->GetDataSize(counter);
217 }
219  D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer* const constant_buffers)
220 {
221  device->lpVtbl->VSSetConstantBuffers(device, start_slot, num_buffers, constant_buffers);
222 }
225  UINT start_slot,
226  UINT num_views,
227  D3D10ShaderResourceView* const shader_resource_views)
228 {
229  device->lpVtbl->PSSetShaderResources(device, start_slot, num_views, shader_resource_views);
230 }
232 {
233  device->lpVtbl->PSSetShader(device, pixel_shader);
234 }
236  D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState* const samplers)
237 {
238  device->lpVtbl->PSSetSamplers(device, start_slot, num_samplers, samplers);
239 }
241 {
242  device->lpVtbl->VSSetShader(device, vertex_shader);
243 }
244 
246  D3D10Device device, UINT index_count, UINT start_index_location, INT base_vertex_location)
247 {
248  device->lpVtbl->DrawIndexed(device, index_count, start_index_location, base_vertex_location);
249 }
250 static INLINE void D3D10Draw(D3D10Device device, UINT vertex_count, UINT start_vertex_location)
251 {
252  device->lpVtbl->Draw(device, vertex_count, start_vertex_location);
253 }
255  D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer* const constant_buffers)
256 {
257  device->lpVtbl->PSSetConstantBuffers(device, start_slot, num_buffers, constant_buffers);
258 }
260 {
261  device->lpVtbl->IASetInputLayout(device, input_layout);
262 }
265  UINT start_slot,
266  UINT num_buffers,
267  D3D10Buffer* const vertex_buffers,
268  UINT* strides,
269  UINT* offsets)
270 {
271  device->lpVtbl->IASetVertexBuffers(
272  device, start_slot, num_buffers, vertex_buffers, strides, offsets);
273 }
274 
276  D3D10Device device_context,
277  UINT slot,
278  D3D10Buffer const vertex_buffer,
279  UINT stride,
280  UINT offset)
281 {
282  D3D10SetVertexBuffers(device_context, slot, 1, (D3D10Buffer* const)&vertex_buffer, &stride, &offset);
283 }
285  D3D10Device device_context, UINT slot, D3D10Buffer const constant_buffer)
286 {
287  D3D10SetVShaderConstantBuffers(device_context, slot, 1, (ID3D10Buffer ** const)&constant_buffer);
288 }
289 
291  D3D10Device device_context, UINT slot, D3D10Buffer const constant_buffer)
292 {
293  D3D10SetPShaderConstantBuffers(device_context, slot, 1, (ID3D10Buffer** const)&constant_buffer);
294 }
295 
296 static INLINE void
298 {
299  device->lpVtbl->IASetIndexBuffer(device, index_buffer, format, offset);
300 }
303  UINT index_count_per_instance,
304  UINT instance_count,
305  UINT start_index_location,
306  INT base_vertex_location,
307  UINT start_instance_location)
308 {
309  device->lpVtbl->DrawIndexedInstanced(
310  device, index_count_per_instance, instance_count, start_index_location,
311  base_vertex_location, start_instance_location);
312 }
315  UINT vertex_count_per_instance,
316  UINT instance_count,
317  UINT start_vertex_location,
318  UINT start_instance_location)
319 {
320  device->lpVtbl->DrawInstanced(
321  device, vertex_count_per_instance, instance_count, start_vertex_location,
322  start_instance_location);
323 }
325  D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer* const constant_buffers)
326 {
327  device->lpVtbl->GSSetConstantBuffers(device, start_slot, num_buffers, constant_buffers);
328 }
330 {
331  device->lpVtbl->GSSetShader(device, shader);
332 }
334 {
335  device->lpVtbl->IASetPrimitiveTopology(device, topology);
336 }
339  UINT start_slot,
340  UINT num_views,
341  D3D10ShaderResourceView* const shader_resource_views)
342 {
343  device->lpVtbl->VSSetShaderResources(device, start_slot, num_views, shader_resource_views);
344 }
346  D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState* const samplers)
347 {
348  device->lpVtbl->VSSetSamplers(device, start_slot, num_samplers, samplers);
349 }
350 static INLINE void
352 {
353  device->lpVtbl->SetPredication(device, predicate, predicate_value);
354 }
357  UINT start_slot,
358  UINT num_views,
359  D3D10ShaderResourceView* const shader_resource_views)
360 {
361  device->lpVtbl->GSSetShaderResources(device, start_slot, num_views, shader_resource_views);
362 }
364  D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState* const samplers)
365 {
366  device->lpVtbl->GSSetSamplers(device, start_slot, num_samplers, samplers);
367 }
370  UINT num_views,
371  D3D10RenderTargetView* const render_target_views,
372  D3D10DepthStencilView depth_stencil_view)
373 {
374  device->lpVtbl->OMSetRenderTargets(device, num_views, render_target_views, depth_stencil_view);
375 }
377  D3D10Device device, D3D10BlendState blend_state, FLOAT blend_factor[4], UINT sample_mask)
378 {
379  device->lpVtbl->OMSetBlendState(device, blend_state, blend_factor, sample_mask);
380 }
382  D3D10Device device, D3D10DepthStencilState depth_stencil_state, UINT stencil_ref)
383 {
384  device->lpVtbl->OMSetDepthStencilState(device, depth_stencil_state, stencil_ref);
385 }
386 static INLINE void
388 {
389  device->lpVtbl->SOSetTargets(device, num_buffers, sotargets, offsets);
390 }
391 static INLINE void D3D10DrawAuto(D3D10Device device) { device->lpVtbl->DrawAuto(device); }
393 {
394  device->lpVtbl->RSSetState(device, rasterizer_state);
395 }
396 static INLINE void
398 {
399  device->lpVtbl->RSSetViewports(device, num_viewports, viewports);
400 }
402 {
403  device->lpVtbl->RSSetScissorRects(device, num_rects, rects);
404 }
407  D3D10Resource dst_resource,
408  UINT dst_subresource,
409  UINT dst_x,
410  UINT dst_y,
411  UINT dst_z,
412  D3D10Resource src_resource,
413  UINT src_subresource,
414  D3D10_BOX* src_box)
415 {
416  device->lpVtbl->CopySubresourceRegion(
417  device, dst_resource, dst_subresource, dst_x, dst_y, dst_z, src_resource, src_subresource,
418  src_box);
419 }
420 static INLINE void
422 {
423  device->lpVtbl->CopyResource(device, dst_resource, src_resource);
424 }
427  D3D10Resource dst_resource,
428  UINT dst_subresource,
429  D3D10_BOX* dst_box,
430  void* src_data,
431  UINT src_row_pitch,
432  UINT src_depth_pitch)
433 {
434  device->lpVtbl->UpdateSubresource(
435  device, dst_resource, dst_subresource, dst_box, src_data, src_row_pitch, src_depth_pitch);
436 }
438  D3D10Device device, D3D10RenderTargetView render_target_view, FLOAT color_rgba[4])
439 {
440  device->lpVtbl->ClearRenderTargetView(device, render_target_view, color_rgba);
441 }
444  D3D10DepthStencilView depth_stencil_view,
445  UINT clear_flags,
446  FLOAT depth,
447  UINT8 stencil)
448 {
449  device->lpVtbl->ClearDepthStencilView(device, depth_stencil_view, clear_flags, depth, stencil);
450 }
451 static INLINE void
453 {
454  device->lpVtbl->GenerateMips(device, shader_resource_view);
455 }
458  D3D10Resource dst_resource,
459  UINT dst_subresource,
460  D3D10Resource src_resource,
461  UINT src_subresource,
463 {
464  device->lpVtbl->ResolveSubresource(
465  device, dst_resource, dst_subresource, src_resource, src_subresource, format);
466 }
468  D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer* constant_buffers)
469 {
470  device->lpVtbl->VSGetConstantBuffers(device, start_slot, num_buffers, constant_buffers);
471 }
474  UINT start_slot,
475  UINT num_views,
476  D3D10ShaderResourceView* shader_resource_views)
477 {
478  device->lpVtbl->PSGetShaderResources(device, start_slot, num_views, shader_resource_views);
479 }
481 {
482  device->lpVtbl->PSGetShader(device, pixel_shader);
483 }
485  D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState* samplers)
486 {
487  device->lpVtbl->PSGetSamplers(device, start_slot, num_samplers, samplers);
488 }
490 {
491  device->lpVtbl->VSGetShader(device, vertex_shader);
492 }
494  D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer* constant_buffers)
495 {
496  device->lpVtbl->PSGetConstantBuffers(device, start_slot, num_buffers, constant_buffers);
497 }
499 {
500  device->lpVtbl->IAGetInputLayout(device, input_layout);
501 }
504  UINT start_slot,
505  UINT num_buffers,
506  D3D10Buffer* vertex_buffers,
507  UINT* strides,
508  UINT* offsets)
509 {
510  device->lpVtbl->IAGetVertexBuffers(
511  device, start_slot, num_buffers, vertex_buffers, strides, offsets);
512 }
515 {
516  device->lpVtbl->IAGetIndexBuffer(device, index_buffer, format, offset);
517 }
519  D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer* constant_buffers)
520 {
521  device->lpVtbl->GSGetConstantBuffers(device, start_slot, num_buffers, constant_buffers);
522 }
524 {
525  device->lpVtbl->GSGetShader(device, geometry_shader);
526 }
528 {
529  device->lpVtbl->IAGetPrimitiveTopology(device, topology);
530 }
533  UINT start_slot,
534  UINT num_views,
535  D3D10ShaderResourceView* shader_resource_views)
536 {
537  device->lpVtbl->VSGetShaderResources(device, start_slot, num_views, shader_resource_views);
538 }
540  D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState* samplers)
541 {
542  device->lpVtbl->VSGetSamplers(device, start_slot, num_samplers, samplers);
543 }
544 static INLINE void
546 {
547  device->lpVtbl->GetPredication(device, predicate, predicate_value);
548 }
551  UINT start_slot,
552  UINT num_views,
553  D3D10ShaderResourceView* shader_resource_views)
554 {
555  device->lpVtbl->GSGetShaderResources(device, start_slot, num_views, shader_resource_views);
556 }
558  D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState* samplers)
559 {
560  device->lpVtbl->GSGetSamplers(device, start_slot, num_samplers, samplers);
561 }
564  UINT num_views,
565  D3D10RenderTargetView* render_target_views,
566  D3D10DepthStencilView* depth_stencil_view)
567 {
568  device->lpVtbl->OMGetRenderTargets(device, num_views, render_target_views, depth_stencil_view);
569 }
571  D3D10Device device, D3D10BlendState* blend_state, FLOAT blend_factor[4], UINT* sample_mask)
572 {
573  device->lpVtbl->OMGetBlendState(device, blend_state, blend_factor, sample_mask);
574 }
576  D3D10Device device, D3D10DepthStencilState* depth_stencil_state, UINT* stencil_ref)
577 {
578  device->lpVtbl->OMGetDepthStencilState(device, depth_stencil_state, stencil_ref);
579 }
580 static INLINE void
582 {
583  device->lpVtbl->SOGetTargets(device, num_buffers, sotargets, offsets);
584 }
586 {
587  device->lpVtbl->RSGetState(device, rasterizer_state);
588 }
589 static INLINE void
591 {
592  device->lpVtbl->RSGetViewports(device, num_viewports, viewports);
593 }
595 {
596  device->lpVtbl->RSGetScissorRects(device, num_rects, rects);
597 }
599 {
600  return device->lpVtbl->GetDeviceRemovedReason(device);
601 }
603 {
604  return device->lpVtbl->SetExceptionMode(device, raise_flags);
605 }
607 {
608  return device->lpVtbl->GetExceptionMode(device);
609 }
610 static INLINE void D3D10ClearState(D3D10Device device) { device->lpVtbl->ClearState(device); }
611 static INLINE void D3D10Flush(D3D10Device device) { device->lpVtbl->Flush(device); }
614  D3D10_BUFFER_DESC* desc,
615  D3D10_SUBRESOURCE_DATA* initial_data,
617 {
618  return device->lpVtbl->CreateBuffer(device, desc, initial_data, buffer);
619 }
622  D3D10_TEXTURE1D_DESC* desc,
623  D3D10_SUBRESOURCE_DATA* initial_data,
624  D3D10Texture1D* texture1d)
625 {
626  return device->lpVtbl->CreateTexture1D(device, desc, initial_data, texture1d);
627 }
630  D3D10_TEXTURE2D_DESC* desc,
631  D3D10_SUBRESOURCE_DATA* initial_data,
632  D3D10Texture2D* texture2d)
633 {
634  return device->lpVtbl->CreateTexture2D(device, desc, initial_data, texture2d);
635 }
638  D3D10_TEXTURE3D_DESC* desc,
639  D3D10_SUBRESOURCE_DATA* initial_data,
640  D3D10Texture3D* texture3d)
641 {
642  return device->lpVtbl->CreateTexture3D(device, desc, initial_data, texture3d);
643 }
646  D3D10Resource resource,
648  D3D10ShaderResourceView* srview)
649 {
650  return device->lpVtbl->CreateShaderResourceView(device, resource, desc, srview);
651 }
654  D3D10Resource resource,
656  D3D10RenderTargetView* rtview)
657 {
658  return device->lpVtbl->CreateRenderTargetView(device, resource, desc, rtview);
659 }
662  D3D10Resource resource,
664  D3D10DepthStencilView* depth_stencil_view)
665 {
666  return device->lpVtbl->CreateDepthStencilView(device, resource, desc, depth_stencil_view);
667 }
670  D3D10_INPUT_ELEMENT_DESC* input_element_descs,
671  UINT num_elements,
672  void* shader_bytecode_with_input_signature,
673  SIZE_T bytecode_length,
674  D3D10InputLayout* input_layout)
675 {
676  return device->lpVtbl->CreateInputLayout(
677  device, input_element_descs, num_elements, shader_bytecode_with_input_signature,
678  bytecode_length, input_layout);
679 }
682  void* shader_bytecode,
683  SIZE_T bytecode_length,
684  D3D10VertexShader* vertex_shader)
685 {
686  return device->lpVtbl->CreateVertexShader(
687  device, shader_bytecode, bytecode_length, vertex_shader);
688 }
691  void* shader_bytecode,
692  SIZE_T bytecode_length,
693  D3D10GeometryShader* geometry_shader)
694 {
695  return device->lpVtbl->CreateGeometryShader(
696  device, shader_bytecode, bytecode_length, geometry_shader);
697 }
700  void* shader_bytecode,
701  SIZE_T bytecode_length,
702  D3D10_SO_DECLARATION_ENTRY* sodeclaration,
703  UINT num_entries,
704  UINT output_stream_stride,
705  D3D10GeometryShader* geometry_shader)
706 {
707  return device->lpVtbl->CreateGeometryShaderWithStreamOutput(
708  device, shader_bytecode, bytecode_length, sodeclaration, num_entries, output_stream_stride,
709  geometry_shader);
710 }
713  void* shader_bytecode,
714  SIZE_T bytecode_length,
715  D3D10PixelShader* pixel_shader)
716 {
717  return device->lpVtbl->CreatePixelShader(device, shader_bytecode, bytecode_length, pixel_shader);
718 }
720  D3D10Device device, D3D10_BLEND_DESC* blend_state_desc, D3D10BlendState* blend_state)
721 {
722  return device->lpVtbl->CreateBlendState(device, blend_state_desc, blend_state);
723 }
726  D3D10_DEPTH_STENCIL_DESC* depth_stencil_desc,
727  D3D10DepthStencilState* depth_stencil_state)
728 {
729  return device->lpVtbl->CreateDepthStencilState(device, depth_stencil_desc, depth_stencil_state);
730 }
733  D3D10_RASTERIZER_DESC* rasterizer_desc,
734  D3D10RasterizerState* rasterizer_state)
735 {
736  return device->lpVtbl->CreateRasterizerState(device, rasterizer_desc, rasterizer_state);
737 }
739  D3D10Device device, D3D10_SAMPLER_DESC* sampler_desc, D3D10SamplerState* sampler_state)
740 {
741  return device->lpVtbl->CreateSamplerState(device, sampler_desc, sampler_state);
742 }
743 static INLINE HRESULT
745 {
746  return device->lpVtbl->CreateQuery(device, query_desc, query);
747 }
749  D3D10Device device, D3D10_QUERY_DESC* predicate_desc, D3D10Predicate* predicate)
750 {
751  return device->lpVtbl->CreatePredicate(device, predicate_desc, predicate);
752 }
753 static INLINE HRESULT
755 {
756  return device->lpVtbl->CreateCounter(device, counter_desc, counter);
757 }
758 static INLINE HRESULT
760 {
761  return device->lpVtbl->CheckFormatSupport(device, format, format_support);
762 }
764  D3D10Device device, DXGI_FORMAT format, UINT sample_count, UINT* num_quality_levels)
765 {
766  return device->lpVtbl->CheckMultisampleQualityLevels(
767  device, format, sample_count, num_quality_levels);
768 }
770 {
771  device->lpVtbl->CheckCounterInfo(device, counter_info);
772 }
775  D3D10_COUNTER_DESC* desc,
777  UINT* active_counters,
778  LPSTR sz_name,
779  UINT* name_length,
780  LPSTR sz_units,
781  UINT* units_length,
782  LPSTR sz_description,
783  UINT* description_length)
784 {
785  return device->lpVtbl->CheckCounter(
786  device, desc, type, active_counters, sz_name, name_length, sz_units, units_length,
787  sz_description, description_length);
788 }
790 {
791  return device->lpVtbl->GetCreationFlags(device);
792 }
793 static INLINE HRESULT
795 {
796  return device->lpVtbl->OpenSharedResource(
797  device, h_resource, uuidof(ID3D10Resource), (void**)out);
798 }
800 {
801  device->lpVtbl->SetTextFilterSize(device, width, height);
802 }
804 {
805  device->lpVtbl->GetTextFilterSize(device, width, height);
806 }
807 static INLINE void D3D10Enter(D3D10Multithread multithread)
808 {
809  multithread->lpVtbl->Enter(multithread);
810 }
811 static INLINE void D3D10Leave(D3D10Multithread multithread)
812 {
813  multithread->lpVtbl->Leave(multithread);
814 }
816 {
817  return multithread->lpVtbl->SetMultithreadProtected(multithread, mtprotect);
818 }
820 {
821  return multithread->lpVtbl->GetMultithreadProtected(multithread);
822 }
824 {
825  return debug->lpVtbl->SetFeatureMask(debug, mask);
826 }
828 {
829  return debug->lpVtbl->GetFeatureMask(debug);
830 }
832 {
833  return debug->lpVtbl->SetPresentPerRenderOpDelay(debug, milliseconds);
834 }
836 {
837  return debug->lpVtbl->GetPresentPerRenderOpDelay(debug);
838 }
840 {
841  return debug->lpVtbl->SetSwapChain(debug, (IDXGISwapChain*)swap_chain);
842 }
844 {
845  return debug->lpVtbl->GetSwapChain(debug, (IDXGISwapChain**)swap_chain);
846 }
847 static INLINE HRESULT D3D10Validate(D3D10Debug debug) { return debug->lpVtbl->Validate(debug); }
848 static INLINE BOOL D3D10SetUseRef(D3D10SwitchToRef switch_to_ref, BOOL use_ref)
849 {
850  return switch_to_ref->lpVtbl->SetUseRef(switch_to_ref, use_ref);
851 }
853 {
854  return switch_to_ref->lpVtbl->GetUseRef(switch_to_ref);
855 }
856 static INLINE HRESULT
857 D3D10SetMessageCountLimit(D3D10InfoQueue info_queue, UINT64 message_count_limit)
858 {
859  return info_queue->lpVtbl->SetMessageCountLimit(info_queue, message_count_limit);
860 }
862 {
863  info_queue->lpVtbl->ClearStoredMessages(info_queue);
864 }
866  D3D10InfoQueue info_queue,
867  UINT64 message_index,
869  SIZE_T* message_byte_length)
870 {
871  return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length);
872 }
874 {
875  return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue);
876 }
878 {
879  return info_queue->lpVtbl->GetNumMessagesDeniedByStorageFilter(info_queue);
880 }
882 {
883  return info_queue->lpVtbl->GetNumStoredMessages(info_queue);
884 }
886 {
887  return info_queue->lpVtbl->GetNumStoredMessagesAllowedByRetrievalFilter(info_queue);
888 }
890 {
891  return info_queue->lpVtbl->GetNumMessagesDiscardedByMessageCountLimit(info_queue);
892 }
894 {
895  return info_queue->lpVtbl->GetMessageCountLimit(info_queue);
896 }
897 static INLINE HRESULT
899 {
900  return info_queue->lpVtbl->AddStorageFilterEntries(info_queue, filter);
901 }
903  D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER* filter, SIZE_T* filter_byte_length)
904 {
905  return info_queue->lpVtbl->GetStorageFilter(info_queue, filter, filter_byte_length);
906 }
908 {
909  info_queue->lpVtbl->ClearStorageFilter(info_queue);
910 }
912 {
913  return info_queue->lpVtbl->PushEmptyStorageFilter(info_queue);
914 }
916 {
917  return info_queue->lpVtbl->PushCopyOfStorageFilter(info_queue);
918 }
919 static INLINE HRESULT
921 {
922  return info_queue->lpVtbl->PushStorageFilter(info_queue, filter);
923 }
925 {
926  info_queue->lpVtbl->PopStorageFilter(info_queue);
927 }
929 {
930  return info_queue->lpVtbl->GetStorageFilterStackSize(info_queue);
931 }
932 static INLINE HRESULT
934 {
935  return info_queue->lpVtbl->AddRetrievalFilterEntries(info_queue, filter);
936 }
938  D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER* filter, SIZE_T* filter_byte_length)
939 {
940  return info_queue->lpVtbl->GetRetrievalFilter(info_queue, filter, filter_byte_length);
941 }
943 {
944  info_queue->lpVtbl->ClearRetrievalFilter(info_queue);
945 }
947 {
948  return info_queue->lpVtbl->PushEmptyRetrievalFilter(info_queue);
949 }
951 {
952  return info_queue->lpVtbl->PushCopyOfRetrievalFilter(info_queue);
953 }
954 static INLINE HRESULT
956 {
957  return info_queue->lpVtbl->PushRetrievalFilter(info_queue, filter);
958 }
960 {
961  info_queue->lpVtbl->PopRetrievalFilter(info_queue);
962 }
964 {
965  return info_queue->lpVtbl->GetRetrievalFilterStackSize(info_queue);
966 }
968  D3D10InfoQueue info_queue,
969  D3D10_MESSAGE_CATEGORY category,
971  D3D10_MESSAGE_ID id,
972  LPCSTR description)
973 {
974  return info_queue->lpVtbl->AddMessage(info_queue, category, severity, id, description);
975 }
978 {
979  return info_queue->lpVtbl->AddApplicationMessage(info_queue, severity, description);
980 }
981 static INLINE HRESULT
983 {
984  return info_queue->lpVtbl->SetBreakOnCategory(info_queue, category, enable);
985 }
986 static INLINE HRESULT
988 {
989  return info_queue->lpVtbl->SetBreakOnSeverity(info_queue, severity, enable);
990 }
992 {
993  return info_queue->lpVtbl->SetBreakOnID(info_queue, id, enable);
994 }
995 static INLINE BOOL
997 {
998  return info_queue->lpVtbl->GetBreakOnCategory(info_queue, category);
999 }
1000 static INLINE BOOL
1002 {
1003  return info_queue->lpVtbl->GetBreakOnSeverity(info_queue, severity);
1004 }
1006 {
1007  return info_queue->lpVtbl->GetBreakOnID(info_queue, id);
1008 }
1009 static INLINE void D3D10SetMuteDebugOutput(D3D10InfoQueue info_queue, BOOL mute)
1010 {
1011  info_queue->lpVtbl->SetMuteDebugOutput(info_queue, mute);
1012 }
1014 {
1015  return info_queue->lpVtbl->GetMuteDebugOutput(info_queue);
1016 }
1017 
1018 /* end of auto-generated */
1019 
1020 static INLINE HRESULT
1022 {
1023  return swap_chain->lpVtbl->GetBuffer(swap_chain, buffer, uuidof(ID3D10Texture2D), (void**)out);
1024 }
1027  D3D10Texture2D dst_texture,
1028  UINT dst_subresource,
1029  UINT dst_x,
1030  UINT dst_y,
1031  UINT dst_z,
1032  D3D10Texture2D src_texture,
1033  UINT src_subresource,
1034  D3D10_BOX* src_box)
1035 {
1036  device->lpVtbl->CopySubresourceRegion(
1037  device, (D3D10Resource)dst_texture, dst_subresource, dst_x, dst_y, dst_z,
1038  (D3D10Resource)src_texture, src_subresource, src_box);
1039 }
1044  D3D10RenderTargetView* rtview)
1045 {
1046  return device->lpVtbl->CreateRenderTargetView(device, (D3D10Resource)texture, desc, rtview);
1047 }
1052  D3D10ShaderResourceView* srview)
1053 {
1054  return device->lpVtbl->CreateShaderResourceView(device, (D3D10Resource)texture, desc, srview);
1055 }
1056 #endif
1057  /* internal */
1058 
1059 #include <boolean.h>
1060 
1061 #include <retro_math.h>
1062 #include <gfx/math/matrix_4x4.h>
1063 
1064 #include "../video_driver.h"
1065 
1066 typedef struct d3d10_vertex_t
1067 {
1068  float position[2];
1069  float texcoord[2];
1070  float color[4];
1071 } d3d10_vertex_t;
1072 
1073 typedef struct
1074 {
1082 } d3d10_texture_t;
1083 
1084 typedef struct
1085 {
1086  struct
1087  {
1088  float x, y, w, h;
1089  } pos;
1090  struct
1091  {
1092  float u, v, w, h;
1093  } coords;
1094  UINT32 colors[4];
1095  struct
1096  {
1097  float scaling;
1098  float rotation;
1099  } params;
1100 } d3d10_sprite_t;
1101 
1102 #ifndef ALIGN
1103 #ifdef _MSC_VER
1104 #define ALIGN(x) __declspec(align(x))
1105 #else
1106 #define ALIGN(x) __attribute__((aligned(x)))
1107 #endif
1108 #endif
1109 
1110 typedef struct ALIGN(16)
1111 {
1112  math_matrix_4x4 mvp;
1113  struct
1114  {
1115  float width;
1116  float height;
1117  } OutputSize;
1118  float time;
1120 
1121 static_assert(
1122  (!(sizeof(d3d10_uniform_t) & 0xF)), "sizeof(d3d10_uniform_t) must be a multiple of 16");
1123 
1124 typedef struct d3d10_shader_t
1125 {
1130 } d3d10_shader_t;
1131 
1132 typedef struct
1133 {
1134  unsigned cur_mon_id;
1147  struct video_viewport vp;
1150  float clearcolor[4];
1151  bool vsync;
1158 
1159  struct
1160  {
1164  int offset;
1166  bool enabled;
1167  } sprites;
1168 
1169 #ifdef HAVE_OVERLAY
1170  struct
1171  {
1172  D3D10Buffer vbo;
1174  bool enabled;
1175  bool fullscreen;
1176  int count;
1177  } overlays;
1178 #endif
1179 
1180  struct
1181  {
1183  D3D10Buffer vbo;
1184  bool enabled;
1186  } menu;
1187  struct
1188  {
1190  D3D10Buffer vbo;
1191  D3D10Buffer ubo;
1192  D3D10_VIEWPORT viewport;
1195  } frame;
1196 
1197  struct
1198  {
1203  D3D10_VIEWPORT viewport;
1206  } pass[GFX_MAX_SHADERS];
1207 
1210 } d3d10_video_t;
1211 
1214 {
1215  Release(texture->handle);
1216  Release(texture->staging);
1217  Release(texture->view);
1218  Release(texture->rt_view);
1219 }
1220 
1222  D3D10Device ctx,
1223  int width,
1224  int height,
1225  int pitch,
1227  const void* data,
1229 
1231  D3D10Device device, DXGI_FORMAT desired_format, UINT desired_format_support);
1232 
1233 bool d3d10_init_shader(
1235  const char* src,
1236  size_t size,
1237  const void* src_name,
1238  LPCSTR vs_entry,
1239  LPCSTR ps_entry,
1240  LPCSTR gs_entry,
1241  const D3D10_INPUT_ELEMENT_DESC* input_element_descs,
1242  UINT num_elements,
1243  d3d10_shader_t* out);
1244 
1246 {
1247  Release(shader->layout);
1248  Release(shader->vs);
1249  Release(shader->ps);
1250  Release(shader->gs);
1251 }
1252 
1253 static INLINE DXGI_FORMAT
1255 {
1256  return d3d10_get_closest_match(
1257  device, desired_format,
1259 }
1260 
1262 {
1263  D3D10SetInputLayout(ctx, shader->layout);
1264  D3D10SetVShader(ctx, shader->vs);
1265  D3D10SetPShader(ctx, shader->ps);
1266  D3D10SetGShader(ctx, shader->gs);
1267 }
1268 
1269 #if !defined(__cplusplus) || defined(CINTERFACE)
1270 static INLINE void
1272 {
1274  D3D10SetPShaderSamplers(ctx, slot, 1, (D3D10SamplerState*)&texture->sampler);
1275 }
1276 #endif
static INLINE BOOL D3D10SetMultithreadProtected(D3D10Multithread multithread, BOOL mtprotect)
Definition: d3d10_common.h:815
Definition: d3d10.h:674
#define GFX_MAX_FRAME_HISTORY
Definition: video_shader_parse.h:46
static INLINE void D3D10SOGetTargets(D3D10Device device, UINT num_buffers, D3D10Buffer *sotargets, UINT *offsets)
Definition: d3d10_common.h:581
GLuint shader
Definition: glext.h:6670
const GLuint * buffers
Definition: glext.h:6556
static INLINE HRESULT D3D10CreateShaderResourceViewDevice(D3D10Device device, D3D10Resource resource, D3D10_SHADER_RESOURCE_VIEW_DESC *desc, D3D10ShaderResourceView *srview)
Definition: d3d10_common.h:644
static INLINE void D3D10PopStorageFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:924
D3D10BlendState blend_enable
Definition: d3d10_common.h:1142
void d3d10_init_texture(D3D10Device device, d3d10_texture_t *texture)
Definition: d3d10_common.c:69
bool resize_chain
Definition: d3d10_common.h:1152
int capacity
Definition: d3d10_common.h:1165
static INLINE void D3D10ClearState(D3D10Device device)
Definition: d3d10_common.h:610
D3D10Texture2D handle
Definition: d3d10_common.h:1075
ID3D10InputLayout * D3D10InputLayout
Definition: d3d10_common.h:27
Definition: matrix_4x4.h:40
static INLINE HRESULT D3D10PushStorageFilter(D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER *filter)
Definition: d3d10_common.h:920
static INLINE void D3D10SetVertexBuffer(D3D10Device device_context, UINT slot, D3D10Buffer const vertex_buffer, UINT stride, UINT offset)
Definition: d3d10_common.h:275
d3d10_uniform_t ubo_values
Definition: d3d10_common.h:1140
static INLINE void D3D10GetGShaderSamplers(D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState *samplers)
Definition: d3d10_common.h:557
Definition: d3d10.h:1482
static INLINE HRESULT D3D10CreateGeometryShaderWithStreamOutput(D3D10Device device, void *shader_bytecode, SIZE_T bytecode_length, D3D10_SO_DECLARATION_ENTRY *sodeclaration, UINT num_entries, UINT output_stream_stride, D3D10GeometryShader *geometry_shader)
Definition: d3d10_common.h:698
#define INLINE
Definition: retro_inline.h:35
D3D10RenderTargetView renderTargetView
Definition: d3d10_common.h:1138
static INLINE HRESULT D3D10CreateGeometryShader(D3D10Device device, void *shader_bytecode, SIZE_T bytecode_length, D3D10GeometryShader *geometry_shader)
Definition: d3d10_common.h:689
static INLINE void D3D10GetVertexBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *vertex_buffers, UINT *strides, UINT *offsets)
Definition: d3d10_common.h:502
Definition: d3d10sdklayers.h:903
static INLINE HRESULT D3D10AddStorageFilterEntries(D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER *filter)
Definition: d3d10_common.h:898
D3D10VertexShader vs
Definition: d3d10_common.h:1126
static INLINE HRESULT D3D10GetDeviceRemovedReason(D3D10Device device)
Definition: d3d10_common.h:598
static INLINE void D3D10EndQuery(D3D10Query query)
Definition: d3d10_common.h:180
Definition: d3d10.h:998
static INLINE UINT D3D10GetBufferEvictionPriority(D3D10Buffer buffer)
Definition: d3d10_common.h:71
static INLINE void D3D10SetScissorRects(D3D10Device device, UINT num_rects, D3D10_RECT *rects)
Definition: d3d10_common.h:401
static INLINE void D3D10CopySubresourceRegionDevice(D3D10Device device, D3D10Resource dst_resource, UINT dst_subresource, UINT dst_x, UINT dst_y, UINT dst_z, D3D10Resource src_resource, UINT src_subresource, D3D10_BOX *src_box)
Definition: d3d10_common.h:405
Definition: glslang_tab.cpp:129
static INLINE void D3D10GetViewResource(D3D10View view, D3D10Resource *resource)
Definition: d3d10_common.h:143
static INLINE HRESULT D3D10SetBreakOnCategory(D3D10InfoQueue info_queue, D3D10_MESSAGE_CATEGORY category, BOOL enable)
Definition: d3d10_common.h:982
ID3D10RasterizerState * D3D10RasterizerState
Definition: d3d10_common.h:28
Definition: d3d10_common.h:1073
__unsafe_unretained id< MTLTexture > view
Definition: metal_common.m:518
Definition: d3d10.h:800
interface ID3D10ShaderResourceView ID3D10ShaderResourceView
Definition: d3d10.h:119
static INLINE void D3D10SetBufferEvictionPriority(D3D10Buffer buffer, UINT eviction_priority)
Definition: d3d10_common.h:67
static INLINE void D3D10ClearStoredMessages(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:861
GLenum const GLfloat * params
Definition: glext.h:6297
static INLINE void D3D10DrawAuto(D3D10Device device)
Definition: d3d10_common.h:391
Definition: dxgi_common.h:798
static INLINE void D3D10GetBlendState(D3D10Device device, D3D10BlendState *blend_state, FLOAT blend_factor[4], UINT *sample_mask)
Definition: d3d10_common.h:570
static INLINE void D3D10BeginQuery(D3D10Query query)
Definition: d3d10_common.h:179
D3D10_MESSAGE_ID
Definition: d3d10sdklayers.h:368
static INLINE HRESULT D3D10CreateVertexShader(D3D10Device device, void *shader_bytecode, SIZE_T bytecode_length, D3D10VertexShader *vertex_shader)
Definition: d3d10_common.h:680
ID3DDestructionNotifier * D3DDestructionNotifier
Definition: d3d10_common.h:37
Definition: ffmpeg_core.c:151
pass_semantics_t semantics
Definition: d3d10_common.h:1204
static INLINE void D3D10SetTexture1DEvictionPriority(D3D10Texture1D texture1d, UINT eviction_priority)
Definition: d3d10_common.h:82
D3D10RasterizerState state
Definition: d3d10_common.h:1137
bool enabled
Definition: d3d10_common.h:1166
static INLINE void D3D10GetPrimitiveTopology(D3D10Device device, D3D10_PRIMITIVE_TOPOLOGY *topology)
Definition: d3d10_common.h:527
static INLINE BOOL D3D10GetBreakOnID(D3D10InfoQueue info_queue, D3D10_MESSAGE_ID id)
Definition: d3d10_common.h:1005
static INLINE void D3D10SetTextFilterSize(D3D10Device device, UINT width, UINT height)
Definition: d3d10_common.h:799
static INLINE HRESULT D3D10SetMessageCountLimit(D3D10InfoQueue info_queue, UINT64 message_count_limit)
Definition: d3d10_common.h:857
#define uuidof(type)
Definition: dxgi_common.h:246
static INLINE HRESULT D3D10CreateBlendState(D3D10Device device, D3D10_BLEND_DESC *blend_state_desc, D3D10BlendState *blend_state)
Definition: d3d10_common.h:719
static INLINE HRESULT D3D10CreateRenderTargetViewDevice(D3D10Device device, D3D10Resource resource, D3D10_RENDER_TARGET_VIEW_DESC *desc, D3D10RenderTargetView *rtview)
Definition: d3d10_common.h:652
D3D10PixelShader ps
Definition: d3d10_common.h:1127
static INLINE void D3D10Flush(D3D10Device device)
Definition: d3d10_common.h:611
uint32_t frame_count
Definition: d3d10_common.h:1205
static INLINE void D3D10GetDepthStencilViewResource(D3D10DepthStencilView depth_stencil_view, D3D10Resource *resource)
Definition: d3d10_common.h:158
const ID3D10SamplerState * D3D10SamplerStateRef
Definition: d3d10_common.h:25
static INLINE void D3D10GetTextFilterSize(D3D10Device device, UINT *width, UINT *height)
Definition: d3d10_common.h:803
uint64_t UINT64
Definition: coretypes.h:8
static INLINE void D3D10GetRenderTargetViewResource(D3D10RenderTargetView render_target_view, D3D10Resource *resource)
Definition: d3d10_common.h:153
static INLINE HRESULT D3D10PushEmptyRetrievalFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:946
static INLINE void D3D10EndAsynchronous(D3D10Asynchronous asynchronous)
Definition: d3d10_common.h:166
static INLINE HRESULT D3D10GetStorageFilter(D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER *filter, SIZE_T *filter_byte_length)
Definition: d3d10_common.h:902
static INLINE void D3D10EndCounter(D3D10Counter counter)
Definition: d3d10_common.h:208
static INLINE void D3D10BeginPredicate(D3D10Predicate predicate)
Definition: d3d10_common.h:190
Definition: d3d10.h:2798
static INLINE HRESULT D3D10AddMessage(D3D10InfoQueue info_queue, D3D10_MESSAGE_CATEGORY category, D3D10_MESSAGE_SEVERITY severity, D3D10_MESSAGE_ID id, LPCSTR description)
Definition: d3d10_common.h:967
GLsizeiptr size
Definition: glext.h:6559
static INLINE void D3D10Leave(D3D10Multithread multithread)
Definition: d3d10_common.h:811
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glsym_gl.h:634
static INLINE BOOL D3D10SetUseRef(D3D10SwitchToRef switch_to_ref, BOOL use_ref)
Definition: d3d10_common.h:848
interface ID3D10View ID3D10View
Definition: d3d10.h:112
static INLINE void D3D10SetDepthStencilState(D3D10Device device, D3D10DepthStencilState depth_stencil_state, UINT stencil_ref)
Definition: d3d10_common.h:381
Definition: d3d10.h:3208
Definition: d3d10.h:1185
#define GFX_MAX_TEXTURES
Definition: video_shader_parse.h:34
D3D10InputLayout layout
Definition: d3d10_common.h:1129
interface ID3D10Debug ID3D10Debug
Definition: d3d10sdklayers.h:49
GLboolean enable
Definition: glext.h:12027
static INLINE void D3D10GetGShaderResources(D3D10Device device, UINT start_slot, UINT num_views, D3D10ShaderResourceView *shader_resource_views)
Definition: d3d10_common.h:549
ID3D10Texture2D * D3D10Texture2D
Definition: d3d10_common.h:41
static INLINE UINT D3D10GetQueryDataSize(D3D10Query query)
Definition: d3d10_common.h:186
Definition: video_shader_parse.h:72
D3D10Buffer vbo
Definition: d3d10_common.h:1163
interface ID3D10Buffer ID3D10Buffer
Definition: d3d10.h:84
interface ID3D10DepthStencilView ID3D10DepthStencilView
Definition: d3d10.h:133
static INLINE void D3D10GetVShaderResources(D3D10Device device, UINT start_slot, UINT num_views, D3D10ShaderResourceView *shader_resource_views)
Definition: d3d10_common.h:531
struct passwd out
Definition: missing_libc_functions.c:51
ID3D10Predicate * D3D10Predicate
Definition: d3d10_common.h:49
RECT D3D10_RECT
Definition: d3d10.h:798
static INLINE HRESULT D3D10CreateTexture1D(D3D10Device device, D3D10_TEXTURE1D_DESC *desc, D3D10_SUBRESOURCE_DATA *initial_data, D3D10Texture1D *texture1d)
Definition: d3d10_common.h:620
static INLINE void D3D10GetIndexBuffer(D3D10Device device, D3D10Buffer *index_buffer, DXGI_FORMAT *format, UINT *offset)
Definition: d3d10_common.h:513
static const bool fullscreen
Definition: config.def.h:108
DXGI_FORMAT format
Definition: d3d10_common.h:1149
bool vsync
Definition: d3d10_common.h:1151
Definition: d3d10_common.h:1066
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
static INLINE HRESULT D3D10CreateSamplerState(D3D10Device device, D3D10_SAMPLER_DESC *sampler_desc, D3D10SamplerState *sampler_state)
Definition: d3d10_common.h:738
bool d3d10_init_shader(D3D10Device device, const char *src, size_t size, const void *src_name, LPCSTR vs_entry, LPCSTR ps_entry, LPCSTR gs_entry, const D3D10_INPUT_ELEMENT_DESC *input_element_descs, UINT num_elements, d3d10_shader_t *out)
Definition: d3d10_common.c:198
static INLINE void D3D10CopyTexture2DSubresourceRegion(D3D10Device device, D3D10Texture2D dst_texture, UINT dst_subresource, UINT dst_x, UINT dst_y, UINT dst_z, D3D10Texture2D src_texture, UINT src_subresource, D3D10_BOX *src_box)
Definition: d3d10_common.h:1025
interface ID3DDestructionNotifier ID3DDestructionNotifier
Definition: d3dcommon.h:51
static INLINE HRESULT D3D10GetCounterData(D3D10Counter counter, void *data, UINT data_size, UINT get_data_flags)
Definition: d3d10_common.h:210
D3D10ShaderResourceView view
Definition: d3d10_common.h:1079
static INLINE HRESULT D3D10CreateTexture3D(D3D10Device device, D3D10_TEXTURE3D_DESC *desc, D3D10_SUBRESOURCE_DATA *initial_data, D3D10Texture3D *texture3d)
Definition: d3d10_common.h:636
static INLINE void D3D10DrawIndexed(D3D10Device device, UINT index_count, UINT start_index_location, INT base_vertex_location)
Definition: d3d10_common.h:245
D3D10_MESSAGE_CATEGORY
Definition: d3d10sdklayers.h:342
Definition: ibxm.h:9
ID3D10Buffer * D3D10Buffer
Definition: d3d10_common.h:39
static INLINE UINT D3D10GetExceptionMode(D3D10Device device)
Definition: d3d10_common.h:606
static INLINE void D3D10ClearRenderTargetView(D3D10Device device, D3D10RenderTargetView render_target_view, FLOAT color_rgba[4])
Definition: d3d10_common.h:437
d3d10_texture_t feedback
Definition: d3d10_common.h:1202
DXGI_FORMAT d3d10_get_closest_match(D3D10Device device, DXGI_FORMAT desired_format, UINT desired_format_support)
Definition: d3d10_common.c:177
static INLINE void D3D10PopRetrievalFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:959
static INLINE HRESULT D3D10CreateTexture2DShaderResourceView(D3D10Device device, D3D10Texture2D texture, D3D10_SHADER_RESOURCE_VIEW_DESC *desc, D3D10ShaderResourceView *srview)
Definition: d3d10_common.h:1048
int rotation
Definition: d3d10_common.h:1194
GLuint GLuint GLsizei count
Definition: glext.h:6292
static INLINE HRESULT D3D10CreateRasterizerState(D3D10Device device, D3D10_RASTERIZER_DESC *rasterizer_desc, D3D10RasterizerState *rasterizer_state)
Definition: d3d10_common.h:731
Definition: video_shader_parse.h:143
static INLINE void D3D10GenerateMips(D3D10Device device, D3D10ShaderResourceView shader_resource_view)
Definition: d3d10_common.h:452
static INLINE void D3D10ClearDepthStencilView(D3D10Device device, D3D10DepthStencilView depth_stencil_view, UINT clear_flags, FLOAT depth, UINT8 stencil)
Definition: d3d10_common.h:442
static INLINE void D3D10SetPShaderConstantBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *const constant_buffers)
Definition: d3d10_common.h:254
static INLINE HRESULT D3D10GetQueryData(D3D10Query query, void *data, UINT data_size, UINT get_data_flags)
Definition: d3d10_common.h:182
bool resize_viewport
Definition: d3d10_common.h:1154
D3D10_MAP
Definition: d3d10.h:769
static INLINE UINT64 D3D10GetNumMessagesDiscardedByMessageCountLimit(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:889
d3d10_uniform_t
Definition: d3d10_common.h:1119
static INLINE HRESULT D3D10SetDebugFeatureMask(D3D10Debug debug, UINT mask)
Definition: d3d10_common.h:823
float texcoord[2]
Definition: d3d10_common.h:1069
interface ID3D10InputLayout ID3D10InputLayout
Definition: d3d10.h:161
static INLINE UINT64 D3D10GetMessageCountLimit(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:893
float rotation
Definition: d3d10_common.h:1098
GLenum GLuint GLenum severity
Definition: glext.h:6233
static INLINE void D3D10UnmapBuffer(D3D10Buffer buffer)
Definition: d3d10_common.h:80
interface ID3D10GeometryShader ID3D10GeometryShader
Definition: d3d10.h:147
static INLINE void D3D10CopyResource(D3D10Device device, D3D10Resource dst_resource, D3D10Resource src_resource)
Definition: d3d10_common.h:421
GLuint coords
Definition: glext.h:8035
static INLINE HRESULT D3D10PushEmptyStorageFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:911
static INLINE UINT D3D10GetResourceEvictionPriority(D3D10Resource resource)
Definition: d3d10_common.h:63
d3d10_texture_t texture
Definition: d3d10_common.h:1182
static INLINE void D3D10GetState(D3D10Device device, D3D10RasterizerState *rasterizer_state)
Definition: d3d10_common.h:585
const GLuint * shaders
Definition: glext.h:8205
static INLINE void D3D10SetVShaderConstantBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *const constant_buffers)
Definition: d3d10_common.h:218
static INLINE void D3D10ResolveSubresource(D3D10Device device, D3D10Resource dst_resource, UINT dst_subresource, D3D10Resource src_resource, UINT src_subresource, DXGI_FORMAT format)
Definition: d3d10_common.h:456
static INLINE HRESULT D3D10AddApplicationMessage(D3D10InfoQueue info_queue, D3D10_MESSAGE_SEVERITY severity, LPCSTR description)
Definition: d3d10_common.h:976
static INLINE void D3D10GetDepthStencilState(D3D10Device device, D3D10DepthStencilState *depth_stencil_state, UINT *stencil_ref)
Definition: d3d10_common.h:575
D3D10Buffer menu_pipeline_vbo
Definition: d3d10_common.h:1145
static INLINE HRESULT D3D10PushCopyOfRetrievalFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:950
static INLINE void D3D10GetRenderTargets(D3D10Device device, UINT num_views, D3D10RenderTargetView *render_target_views, D3D10DepthStencilView *depth_stencil_view)
Definition: d3d10_common.h:562
ID3D10VertexShader * D3D10VertexShader
Definition: d3d10_common.h:33
Definition: d3d10.h:3903
interface ID3D10RasterizerState ID3D10RasterizerState
Definition: d3d10.h:70
ID3D10PixelShader * D3D10PixelShader
Definition: d3d10_common.h:31
GLenum type
Definition: glext.h:6233
static INLINE void D3D10DrawInstanced(D3D10Device device, UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
Definition: d3d10_common.h:313
static INLINE HRESULT D3D10SetPresentPerRenderOpDelay(D3D10Debug debug, UINT milliseconds)
Definition: d3d10_common.h:831
static INLINE HRESULT D3D10SetBreakOnSeverity(D3D10InfoQueue info_queue, D3D10_MESSAGE_SEVERITY severity, BOOL enable)
Definition: d3d10_common.h:987
static INLINE UINT D3D10GetTexture1DEvictionPriority(D3D10Texture1D texture1d)
Definition: d3d10_common.h:86
DXGI_FORMAT
Definition: dxgiformat.h:10
static INLINE UINT D3D10GetTexture2DEvictionPriority(D3D10Texture2D texture2d)
Definition: d3d10_common.h:104
static INLINE void D3D10GetPredication(D3D10Device device, D3D10Predicate *predicate, BOOL *predicate_value)
Definition: d3d10_common.h:545
ID3D10Resource * D3D10Resource
Definition: d3d10_common.h:38
static INLINE void D3D10GetScissorRects(D3D10Device device, UINT *num_rects, D3D10_RECT *rects)
Definition: d3d10_common.h:594
static INLINE void D3D10GetViewports(D3D10Device device, UINT *num_viewports, D3D10_VIEWPORT *viewports)
Definition: d3d10_common.h:590
Definition: video_shader_parse.h:83
GLuint * samplers
Definition: glext.h:7947
static INLINE void D3D10GetVShader(D3D10Device device, D3D10VertexShader *vertex_shader)
Definition: d3d10_common.h:489
GLuint counter
Definition: glext.h:12023
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
interface ID3D10Texture2D ID3D10Texture2D
Definition: d3d10.h:98
interface ID3D10Counter ID3D10Counter
Definition: d3d10.h:196
ID3D10Query * D3D10Query
Definition: d3d10_common.h:48
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:8417
Definition: d3d10_common.h:1132
static INLINE void D3D10SetPShaderSamplers(D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState *const samplers)
Definition: d3d10_common.h:235
static INLINE DXGI_FORMAT d3d10_get_closest_match_texture2D(D3D10Device device, DXGI_FORMAT desired_format)
Definition: d3d10_common.h:1254
static INLINE void D3D10SetPrimitiveTopology(D3D10Device device, D3D10_PRIMITIVE_TOPOLOGY topology)
Definition: d3d10_common.h:333
static INLINE HRESULT D3D10CheckMultisampleQualityLevels(D3D10Device device, DXGI_FORMAT format, UINT sample_count, UINT *num_quality_levels)
Definition: d3d10_common.h:763
static INLINE HRESULT D3D10MapBuffer(D3D10Buffer buffer, D3D10_MAP map_type, UINT map_flags, void **data)
Definition: d3d10_common.h:76
static INLINE HRESULT D3D10SetSwapChain(D3D10Debug debug, IDXGISwapChain *swap_chain)
Definition: d3d10_common.h:839
static INLINE HRESULT D3D10CheckCounter(D3D10Device device, D3D10_COUNTER_DESC *desc, D3D10_COUNTER_TYPE *type, UINT *active_counters, LPSTR sz_name, UINT *name_length, LPSTR sz_units, UINT *units_length, LPSTR sz_description, UINT *description_length)
Definition: d3d10_common.h:773
static INLINE void D3D10GetPShaderConstantBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *constant_buffers)
Definition: d3d10_common.h:493
static INLINE void D3D10BeginAsynchronous(D3D10Asynchronous asynchronous)
Definition: d3d10_common.h:162
static INLINE void D3D10SetPredication(D3D10Device device, D3D10Predicate predicate, BOOL predicate_value)
Definition: d3d10_common.h:351
static INLINE HRESULT D3D10GetSwapChain(D3D10Debug debug, IDXGISwapChain **swap_chain)
Definition: d3d10_common.h:843
static INLINE HRESULT D3D10GetPredicateData(D3D10Predicate predicate, void *data, UINT data_size, UINT get_data_flags)
Definition: d3d10_common.h:199
static INLINE HRESULT D3D10CreateInputLayout(D3D10Device device, D3D10_INPUT_ELEMENT_DESC *input_element_descs, UINT num_elements, void *shader_bytecode_with_input_signature, SIZE_T bytecode_length, D3D10InputLayout *input_layout)
Definition: d3d10_common.h:668
struct video_shader * shader_preset
Definition: d3d10_common.h:1208
ID3D10DepthStencilState * D3D10DepthStencilState
Definition: d3d10_common.h:29
interface IDXGISwapChain IDXGISwapChain
Definition: dxgi.h:100
static INLINE UINT D3D10GetDebugFeatureMask(D3D10Debug debug)
Definition: d3d10_common.h:827
ID3D10ShaderResourceView * D3D10ShaderResourceView
Definition: d3d10_common.h:44
interface ID3D10SwitchToRef ID3D10SwitchToRef
Definition: d3d10sdklayers.h:56
static INLINE HRESULT D3D10GetRetrievalFilter(D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER *filter, SIZE_T *filter_byte_length)
Definition: d3d10_common.h:937
static INLINE void D3D10SetPShaderResources(D3D10Device device, UINT start_slot, UINT num_views, D3D10ShaderResourceView *const shader_resource_views)
Definition: d3d10_common.h:223
static INLINE UINT64 D3D10GetNumStoredMessages(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:881
ID3D10SamplerState * D3D10SamplerState
Definition: d3d10_common.h:32
static INLINE HRESULT D3D10MapTexture2D(D3D10Texture2D texture2d, UINT subresource, D3D10_MAP map_type, UINT map_flags, D3D10_MAPPED_TEXTURE2D *mapped_tex2d)
Definition: d3d10_common.h:108
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:6233
interface ID3D10Resource ID3D10Resource
Definition: d3d10.h:77
GLint GLfloat GLint stencil
Definition: glext.h:6900
time_t time(time_t *timer)
D3D10_MESSAGE_SEVERITY
Definition: d3d10sdklayers.h:358
static INLINE void D3D10UnmapTexture3D(D3D10Texture3D texture3d, UINT subresource)
Definition: d3d10_common.h:139
ID3D10BlendState * D3D10BlendState
Definition: d3d10_common.h:30
GLenum src
Definition: glext.h:6980
static INLINE HRESULT D3D10CreateCounter(D3D10Device device, D3D10_COUNTER_DESC *counter_desc, D3D10Counter *counter)
Definition: d3d10_common.h:754
static INLINE void D3D10SetGShader(D3D10Device device, D3D10GeometryShader shader)
Definition: d3d10_common.h:329
GLenum GLint GLuint mask
Definition: glext.h:6668
static INLINE HRESULT D3D10CheckFormatSupport(D3D10Device device, DXGI_FORMAT format, UINT *format_support)
Definition: d3d10_common.h:759
interface ID3D10PixelShader ID3D10PixelShader
Definition: d3d10.h:154
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
static INLINE void D3D10SetInputLayout(D3D10Device device, D3D10InputLayout input_layout)
Definition: d3d10_common.h:259
D3D10Buffer ubo
Definition: d3d10_common.h:1139
static INLINE void D3D10SetBlendState(D3D10Device device, D3D10BlendState blend_state, FLOAT blend_factor[4], UINT sample_mask)
Definition: d3d10_common.h:376
static INLINE HRESULT D3D10AddRetrievalFilterEntries(D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER *filter)
Definition: d3d10_common.h:933
bool resize_render_targets
Definition: d3d10_common.h:1155
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glext.h:6293
static INLINE void D3D10GetVShaderSamplers(D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState *samplers)
Definition: d3d10_common.h:539
Definition: d3d10.h:4062
description
Definition: setup.py:7
static INLINE HRESULT D3D10Validate(D3D10Debug debug)
Definition: d3d10_common.h:847
struct d3d10_vertex_t d3d10_vertex_t
ID3D10Asynchronous * D3D10Asynchronous
Definition: d3d10_common.h:47
Definition: d3d10.h:4656
static INLINE void D3D10SetRenderTargets(D3D10Device device, UINT num_views, D3D10RenderTargetView *const render_target_views, D3D10DepthStencilView depth_stencil_view)
Definition: d3d10_common.h:368
unsigned cur_mon_id
Definition: d3d10_common.h:1134
D3D10RenderTargetView rt_view
Definition: d3d10_common.h:1078
static INLINE void D3D10SetResourceEvictionPriority(D3D10Resource resource, UINT eviction_priority)
Definition: d3d10_common.h:59
static INLINE HRESULT D3D10CreateTexture2DRenderTargetView(D3D10Device device, D3D10Texture2D texture, D3D10_RENDER_TARGET_VIEW_DESC *desc, D3D10RenderTargetView *rtview)
Definition: d3d10_common.h:1040
Definition: d3d10.h:644
static INLINE UINT64 D3D10GetNumMessagesDeniedByStorageFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:877
interface ID3D10VertexShader ID3D10VertexShader
Definition: d3d10.h:140
static INLINE HRESULT D3D10OpenSharedResource(D3D10Device device, HANDLE h_resource, ID3D10Resource **out)
Definition: d3d10_common.h:794
d3d10_texture_t rt
Definition: d3d10_common.h:1201
static INLINE void D3D10SetPShader(D3D10Device device, D3D10PixelShader pixel_shader)
Definition: d3d10_common.h:231
static INLINE void D3D10SetGShaderSamplers(D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState *const samplers)
Definition: d3d10_common.h:363
static INLINE HRESULT D3D10CreateBuffer(D3D10Device device, D3D10_BUFFER_DESC *desc, D3D10_SUBRESOURCE_DATA *initial_data, D3D10Buffer *buffer)
Definition: d3d10_common.h:612
static INLINE void D3D10DrawIndexedInstanced(D3D10Device device, UINT index_count_per_instance, UINT instance_count, UINT start_index_location, INT base_vertex_location, UINT start_instance_location)
Definition: d3d10_common.h:301
static INLINE void D3D10SetMuteDebugOutput(D3D10InfoQueue info_queue, BOOL mute)
Definition: d3d10_common.h:1009
interface ID3D10SamplerState ID3D10SamplerState
Definition: d3d10.h:168
static INLINE void d3d10_release_texture(d3d10_texture_t *texture)
Definition: d3d10_common.h:1213
ID3D10InfoQueue * D3D10InfoQueue
Definition: d3d10_common.h:55
static INLINE HRESULT D3D10GetMessageA(D3D10InfoQueue info_queue, UINT64 message_index, D3D10_MESSAGE *message, SIZE_T *message_byte_length)
Definition: d3d10_common.h:865
Definition: slang_reflection.h:85
interface ID3D10Device ID3D10Device
Definition: d3d10.h:203
static INLINE void D3D10ClearStorageFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:907
unsigned luts
Definition: video_shader_parse.h:156
static INLINE void D3D10Enter(D3D10Multithread multithread)
Definition: d3d10_common.h:807
struct d3d10_shader_t d3d10_shader_t
ID3D10GeometryShader * D3D10GeometryShader
Definition: d3d10_common.h:34
static INLINE HRESULT D3D10GetAsynchronousData(D3D10Asynchronous asynchronous, void *data, UINT data_size, UINT get_data_flags)
Definition: d3d10_common.h:170
static INLINE BOOL D3D10GetBreakOnCategory(D3D10InfoQueue info_queue, D3D10_MESSAGE_CATEGORY category)
Definition: d3d10_common.h:996
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
static INLINE void d3d10_release_shader(d3d10_shader_t *shader)
Definition: d3d10_common.h:1245
static INLINE void D3D10GetPShaderSamplers(D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState *samplers)
Definition: d3d10_common.h:484
interface ID3D10Predicate ID3D10Predicate
Definition: d3d10.h:189
Definition: d3d10.h:4058
int offset
Definition: d3d10_common.h:1164
unsigned int BOOL
Definition: gctypes.h:51
static INLINE HRESULT D3D10SetExceptionMode(D3D10Device device, UINT raise_flags)
Definition: d3d10_common.h:602
static INLINE HRESULT D3D10MapTexture1D(D3D10Texture1D texture1d, UINT subresource, D3D10_MAP map_type, UINT map_flags, void **data)
Definition: d3d10_common.h:90
Definition: d3d10.h:1642
static INLINE BOOL D3D10GetBreakOnSeverity(D3D10InfoQueue info_queue, D3D10_MESSAGE_SEVERITY severity)
Definition: d3d10_common.h:1001
static INLINE void D3D10ClearRetrievalFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:942
static INLINE void D3D10GetShaderResourceViewResource(D3D10ShaderResourceView shader_resource_view, D3D10Resource *resource)
Definition: d3d10_common.h:147
uint32_t UINT32
Definition: coretypes.h:10
static INLINE void D3D10SetVShaderResources(D3D10Device device, UINT start_slot, UINT num_views, D3D10ShaderResourceView *const shader_resource_views)
Definition: d3d10_common.h:337
static INLINE BOOL D3D10GetMultithreadProtected(D3D10Multithread multithread)
Definition: d3d10_common.h:819
static INLINE HRESULT D3D10CreateDepthStencilView(D3D10Device device, D3D10Resource resource, D3D10_DEPTH_STENCIL_VIEW_DESC *desc, D3D10DepthStencilView *depth_stencil_view)
Definition: d3d10_common.h:660
Definition: video_driver.h:686
static INLINE void D3D10SetState(D3D10Device device, D3D10RasterizerState rasterizer_state)
Definition: d3d10_common.h:392
float v
Definition: d3d10_common.h:1092
static INLINE void D3D10SetGShaderConstantBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *const constant_buffers)
Definition: d3d10_common.h:324
ID3D10Texture1D * D3D10Texture1D
Definition: d3d10_common.h:40
static INLINE void D3D10SetVertexBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *const vertex_buffers, UINT *strides, UINT *offsets)
Definition: d3d10_common.h:263
D3D10BlendState blend_pipeline
Definition: d3d10_common.h:1144
#define ALIGN(x)
Definition: d3d10_common.h:1106
static INLINE void D3D10GetInputLayout(D3D10Device device, D3D10InputLayout *input_layout)
Definition: d3d10_common.h:498
GLuint color
Definition: glext.h:6883
interface ID3D10Texture3D ID3D10Texture3D
Definition: d3d10.h:105
float position[2]
Definition: d3d10_common.h:1068
static INLINE void D3D10SetTexture2DEvictionPriority(D3D10Texture2D texture2d, UINT eviction_priority)
Definition: d3d10_common.h:100
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
D3D_PRIMITIVE_TOPOLOGY
Definition: d3dcommon.h:108
D3D10BlendState blend_disable
Definition: d3d10_common.h:1143
static INLINE UINT D3D10GetTexture3DEvictionPriority(D3D10Texture3D texture3d)
Definition: d3d10_common.h:126
ID3D10Debug * D3D10Debug
Definition: d3d10_common.h:53
const GLuint * textures
Definition: glext.h:9001
ID3D10SwitchToRef * D3D10SwitchToRef
Definition: d3d10_common.h:54
static INLINE UINT D3D10GetStorageFilterStackSize(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:928
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7672
static INLINE UINT D3D10GetCreationFlags(D3D10Device device)
Definition: d3d10_common.h:789
ID3D10View * D3D10View
Definition: d3d10_common.h:43
Definition: d3d10_common.h:1124
GLint GLint GLsizei width
Definition: glext.h:6293
float y
Definition: d3d10_common.h:1088
static INLINE UINT64 D3D10GetNumMessagesAllowedByStorageFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:873
interface ID3D10Asynchronous ID3D10Asynchronous
Definition: d3d10.h:175
Definition: glslang_tab.cpp:135
Definition: slang_process.h:74
interface ID3D10Multithread ID3D10Multithread
Definition: d3d10.h:210
static INLINE void D3D10SetGShaderResources(D3D10Device device, UINT start_slot, UINT num_views, D3D10ShaderResourceView *const shader_resource_views)
Definition: d3d10_common.h:355
Definition: d3d10.h:2390
static INLINE void D3D10GetGShaderConstantBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *constant_buffers)
Definition: d3d10_common.h:518
static INLINE void D3D10SetIndexBuffer(D3D10Device device, D3D10Buffer index_buffer, DXGI_FORMAT format, UINT offset)
Definition: d3d10_common.h:297
d3d10_shader_t shader_font
Definition: d3d10_common.h:1162
D3D10_VIEWPORT viewport
Definition: d3d10_common.h:1148
static INLINE void D3D10Draw(D3D10Device device, UINT vertex_count, UINT start_vertex_location)
Definition: d3d10_common.h:250
Definition: glslang_tab.cpp:136
static INLINE void D3D10UnmapTexture1D(D3D10Texture1D texture1d, UINT subresource)
Definition: d3d10_common.h:95
interface ID3D10RenderTargetView ID3D10RenderTargetView
Definition: d3d10.h:126
Definition: d3d10.h:1331
interface ID3D10Query ID3D10Query
Definition: d3d10.h:182
Definition: query.c:81
Definition: d3d10.h:2146
float scaling
Definition: d3d10_common.h:1097
static INLINE BOOL D3D10GetMuteDebugOutput(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:1013
static INLINE HRESULT D3D10PushRetrievalFilter(D3D10InfoQueue info_queue, D3D10_INFO_QUEUE_FILTER *filter)
Definition: d3d10_common.h:955
static INLINE BOOL D3D10GetUseRef(D3D10SwitchToRef switch_to_ref)
Definition: d3d10_common.h:852
interface ID3D10Texture1D ID3D10Texture1D
Definition: d3d10.h:91
static INLINE HRESULT D3D10CreateDepthStencilState(D3D10Device device, D3D10_DEPTH_STENCIL_DESC *depth_stencil_desc, D3D10DepthStencilState *depth_stencil_state)
Definition: d3d10_common.h:724
static INLINE void D3D10SetVShaderSamplers(D3D10Device device, UINT start_slot, UINT num_samplers, D3D10SamplerState *const samplers)
Definition: d3d10_common.h:345
Definition: d3d10.h:1860
static INLINE UINT64 D3D10GetNumStoredMessagesAllowedByRetrievalFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:885
interface ID3D10BlendState ID3D10BlendState
Definition: d3d10.h:63
static INLINE UINT D3D10GetCounterDataSize(D3D10Counter counter)
Definition: d3d10_common.h:214
static INLINE void D3D10GetVShaderConstantBuffers(D3D10Device device, UINT start_slot, UINT num_buffers, D3D10Buffer *constant_buffers)
Definition: d3d10_common.h:467
#define GFX_MAX_SHADERS
Definition: video_shader_parse.h:30
Definition: metal_common.m:516
static INLINE HRESULT DXGIGetSwapChainBufferD3D10(DXGISwapChain swap_chain, UINT buffer, D3D10Texture2D *out)
Definition: d3d10_common.h:1021
static INLINE void D3D10GetGShader(D3D10Device device, D3D10GeometryShader *geometry_shader)
Definition: d3d10_common.h:523
Definition: d3d10_common.h:1084
interface ID3D10InfoQueue ID3D10InfoQueue
Definition: d3d10sdklayers.h:63
static INLINE void D3D10SetPShaderConstantBuffer(D3D10Device device_context, UINT slot, D3D10Buffer const constant_buffer)
Definition: d3d10_common.h:290
GLsizei const GLuint const GLintptr const GLsizei * strides
Definition: glsym_gl.h:638
static INLINE void D3D10CheckCounterInfo(D3D10Device device, D3D10_COUNTER_INFO *counter_info)
Definition: d3d10_common.h:769
ID3D10Counter * D3D10Counter
Definition: d3d10_common.h:50
GLsizei stride
Definition: glext.h:6488
static INLINE void D3D10SetViewports(D3D10Device device, UINT num_viewports, D3D10_VIEWPORT *viewports)
Definition: d3d10_common.h:397
static INLINE void D3D10EndPredicate(D3D10Predicate predicate)
Definition: d3d10_common.h:194
bool fullscreen
Definition: d3d10_common.h:1185
static INLINE UINT D3D10GetPresentPerRenderOpDelay(D3D10Debug debug)
Definition: d3d10_common.h:835
static INLINE void D3D10UpdateSubresource(D3D10Device device, D3D10Resource dst_resource, UINT dst_subresource, D3D10_BOX *dst_box, void *src_data, UINT src_row_pitch, UINT src_depth_pitch)
Definition: d3d10_common.h:425
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
Definition: d3d10.h:683
static INLINE HRESULT D3D10MapTexture3D(D3D10Texture3D texture3d, UINT subresource, D3D10_MAP map_type, UINT map_flags, D3D10_MAPPED_TEXTURE3D *mapped_tex3d)
Definition: d3d10_common.h:130
float4_t size_data
Definition: d3d10_common.h:1081
static INLINE HRESULT D3D10SetBreakOnID(D3D10InfoQueue info_queue, D3D10_MESSAGE_ID id, BOOL enable)
Definition: d3d10_common.h:991
static INLINE void D3D10GetPShaderResources(D3D10Device device, UINT start_slot, UINT num_views, D3D10ShaderResourceView *shader_resource_views)
Definition: d3d10_common.h:472
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
D3D10Texture2D staging
Definition: d3d10_common.h:1076
static INLINE UINT D3D10GetRetrievalFilterStackSize(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:963
Definition: d3d10.h:4650
D3D10_COUNTER_TYPE
Definition: d3d10.h:4641
Definition: d3d10.h:3014
D3D10GeometryShader gs
Definition: d3d10_common.h:1128
ID3D10RenderTargetView * D3D10RenderTargetView
Definition: d3d10_common.h:45
Definition: video4linux2.c:51
GLintptr offset
Definition: glext.h:6560
ID3D10Texture3D * D3D10Texture3D
Definition: d3d10_common.h:42
static INLINE void D3D10SOSetTargets(D3D10Device device, UINT num_buffers, D3D10Buffer *const sotargets, UINT *offsets)
Definition: d3d10_common.h:387
static INLINE void D3D10GetPShader(D3D10Device device, D3D10PixelShader *pixel_shader)
Definition: d3d10_common.h:480
D3D10_TEXTURE2D_DESC desc
Definition: d3d10_common.h:1077
static bool format_support(const drmModePlanePtr ovr, uint32_t fmt)
Definition: drm_gfx.c:393
ID3D10DepthStencilView * D3D10DepthStencilView
Definition: d3d10_common.h:46
Definition: d3d10.h:2344
static INLINE UINT D3D10GetPredicateDataSize(D3D10Predicate predicate)
Definition: d3d10_common.h:203
bool init_history
Definition: d3d10_common.h:1156
static INLINE void D3D10SetVShader(D3D10Device device, D3D10VertexShader vertex_shader)
Definition: d3d10_common.h:240
Definition: d3d10.h:4270
Definition: d3d10.h:2095
static INLINE void D3D10BeginCounter(D3D10Counter counter)
Definition: d3d10_common.h:207
struct nk_device device
Definition: nk_common.c:44
D3D10Device device
Definition: d3d10_common.h:1136
IDXGISwapChain3 * DXGISwapChain
Definition: dxgi_common.h:282
D3D10SamplerStateRef sampler
Definition: d3d10_common.h:1080
d3d10_shader_t shader
Definition: d3d10_common.h:1161
unsigned int uint32_t
Definition: stdint.h:126
static INLINE void d3d10_set_shader(D3D10Device ctx, d3d10_shader_t *shader)
Definition: d3d10_common.h:1261
ID3D10Multithread * D3D10Multithread
Definition: d3d10_common.h:52
bool keep_aspect
Definition: d3d10_common.h:1153
static INLINE void D3D10SetVShaderConstantBuffer(D3D10Device device_context, UINT slot, D3D10Buffer const constant_buffer)
Definition: d3d10_common.h:284
interface ID3D10DepthStencilState ID3D10DepthStencilState
Definition: d3d10.h:56
ID3D10Device * D3D10Device
Definition: d3d10_common.h:51
static INLINE HRESULT D3D10PushCopyOfStorageFilter(D3D10InfoQueue info_queue)
Definition: d3d10_common.h:915
static INLINE HRESULT D3D10CreateTexture2D(D3D10Device device, D3D10_TEXTURE2D_DESC *desc, D3D10_SUBRESOURCE_DATA *initial_data, D3D10Texture2D *texture2d)
Definition: d3d10_common.h:628
float4_t output_size
Definition: d3d10_common.h:1193
static INLINE void D3D10UnmapTexture2D(D3D10Texture2D texture2d, UINT subresource)
Definition: d3d10_common.h:117
Definition: d3d10sdklayers.h:880
DXGISwapChain swapChain
Definition: d3d10_common.h:1135
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
static INLINE HRESULT D3D10CreatePixelShader(D3D10Device device, void *shader_bytecode, SIZE_T bytecode_length, D3D10PixelShader *pixel_shader)
Definition: d3d10_common.h:711
static INLINE HRESULT D3D10CreateQuery(D3D10Device device, D3D10_QUERY_DESC *query_desc, D3D10Query *query)
Definition: d3d10_common.h:744
static INLINE UINT D3D10GetAsynchronousDataSize(D3D10Asynchronous asynchronous)
Definition: d3d10_common.h:175
static INLINE void d3d10_set_texture_and_sampler(D3D10Device ctx, UINT slot, d3d10_texture_t *texture)
Definition: d3d10_common.h:1271
static INLINE void D3D10SetTexture3DEvictionPriority(D3D10Texture3D texture3d, UINT eviction_priority)
Definition: d3d10_common.h:122
static INLINE HRESULT D3D10CreatePredicate(D3D10Device device, D3D10_QUERY_DESC *predicate_desc, D3D10Predicate *predicate)
Definition: d3d10_common.h:748
math_matrix_4x4 mvp_no_rot
Definition: d3d10_common.h:1146
uint8_t UINT8
Definition: coretypes.h:12
void d3d10_update_texture(D3D10Device ctx, int width, int height, int pitch, DXGI_FORMAT format, const void *data, d3d10_texture_t *texture)
Definition: d3d10_common.c:135