RetroArch
d3d12_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 <d3d12.h>
22 
24 
25 /* auto-generated */
26 
51 
52 static INLINE ULONG D3D12Release(void* object)
53 {
54  return ((ID3D12Object*)object)->lpVtbl->Release((ID3D12Object*)object);
55 }
57 {
58  return device_child->lpVtbl->Release(device_child);
59 }
61 {
62  return root_signature->lpVtbl->Release(root_signature);
63 }
64 static INLINE ULONG
66 {
67  return root_signature_deserializer->lpVtbl->Release(root_signature_deserializer);
68 }
71 {
72  return root_signature_deserializer->lpVtbl->GetRootSignatureDesc(root_signature_deserializer);
73 }
75  D3D12VersionedRootSignatureDeserializer versioned_root_signature_deserializer)
76 {
77  return versioned_root_signature_deserializer->lpVtbl->Release(
78  versioned_root_signature_deserializer);
79 }
81  D3D12VersionedRootSignatureDeserializer versioned_root_signature_deserializer,
82  D3D_ROOT_SIGNATURE_VERSION convert_to_version,
84 {
85  return versioned_root_signature_deserializer->lpVtbl->GetRootSignatureDescAtVersion(
86  versioned_root_signature_deserializer, convert_to_version, desc);
87 }
89  D3D12VersionedRootSignatureDeserializer versioned_root_signature_deserializer)
90 {
91  return versioned_root_signature_deserializer->lpVtbl->GetUnconvertedRootSignatureDesc(
92  versioned_root_signature_deserializer);
93 }
95 {
96  return pageable->lpVtbl->Release(pageable);
97 }
98 static INLINE ULONG D3D12ReleaseHeap(D3D12Heap heap) { return heap->lpVtbl->Release(heap); }
99 static INLINE ULONG D3D12ReleaseResource(void* resource)
100 {
101  return ((ID3D12Resource*)resource)->lpVtbl->Release((ID3D12Resource*)resource);
102 }
103 static INLINE HRESULT
104 D3D12Map(void* resource, UINT subresource, D3D12_RANGE* read_range, void** data)
105 {
106  return ((ID3D12Resource*)resource)
107  ->lpVtbl->Map((ID3D12Resource*)resource, subresource, read_range, data);
108 }
109 static INLINE void D3D12Unmap(void* resource, UINT subresource, D3D12_RANGE* written_range)
110 {
111  ((ID3D12Resource*)resource)
112  ->lpVtbl->Unmap((ID3D12Resource*)resource, subresource, written_range);
113 }
115 {
116  return ((ID3D12Resource*)resource)->lpVtbl->GetGPUVirtualAddress((ID3D12Resource*)resource);
117 }
119  void* resource,
120  UINT dst_subresource,
121  D3D12_BOX* dst_box,
122  void* src_data,
123  UINT src_row_pitch,
124  UINT src_depth_pitch)
125 {
126  return ((ID3D12Resource*)resource)
127  ->lpVtbl->WriteToSubresource(
128  (ID3D12Resource*)resource, dst_subresource, dst_box, src_data, src_row_pitch,
129  src_depth_pitch);
130 }
132  void* resource,
133  void* dst_data,
134  UINT dst_row_pitch,
135  UINT dst_depth_pitch,
136  UINT src_subresource,
137  D3D12_BOX* src_box)
138 {
139  return ((ID3D12Resource*)resource)
140  ->lpVtbl->ReadFromSubresource(
141  (ID3D12Resource*)resource, dst_data, dst_row_pitch, dst_depth_pitch, src_subresource,
142  src_box);
143 }
145  void* resource, D3D12_HEAP_PROPERTIES* heap_properties, D3D12_HEAP_FLAGS* heap_flags)
146 {
147  return ((ID3D12Resource*)resource)
148  ->lpVtbl->GetHeapProperties((ID3D12Resource*)resource, heap_properties, heap_flags);
149 }
151 {
152  return command_allocator->lpVtbl->Release(command_allocator);
153 }
155 {
156  return command_allocator->lpVtbl->Reset(command_allocator);
157 }
158 static INLINE ULONG D3D12ReleaseFence(D3D12Fence fence) { return fence->lpVtbl->Release(fence); }
160 {
161  return fence->lpVtbl->GetCompletedValue(fence);
162 }
164 {
165  return fence->lpVtbl->SetEventOnCompletion(fence, value, h_event);
166 }
168 {
169  return fence->lpVtbl->Signal(fence, value);
170 }
172 {
173  return pipeline_state->lpVtbl->Release(pipeline_state);
174 }
176 {
177  return pipeline_state->lpVtbl->GetCachedBlob(pipeline_state, blob);
178 }
180 {
181  return descriptor_heap->lpVtbl->Release(descriptor_heap);
182 }
184 {
185  return query_heap->lpVtbl->Release(query_heap);
186 }
188 {
189  return command_signature->lpVtbl->Release(command_signature);
190 }
192 {
193  return command_list->lpVtbl->Release(command_list);
194 }
196 {
197  return graphics_command_list->lpVtbl->Release(graphics_command_list);
198 }
200 {
201  return graphics_command_list->lpVtbl->Close(graphics_command_list);
202 }
204  D3D12GraphicsCommandList graphics_command_list,
205  D3D12CommandAllocator allocator,
206  D3D12PipelineState initial_state)
207 {
208  return graphics_command_list->lpVtbl->Reset(graphics_command_list, allocator, initial_state);
209 }
210 static INLINE void
211 D3D12ClearState(D3D12GraphicsCommandList graphics_command_list, D3D12PipelineState pipeline_state)
212 {
213  graphics_command_list->lpVtbl->ClearState(graphics_command_list, pipeline_state);
214 }
216  D3D12GraphicsCommandList graphics_command_list,
217  UINT vertex_count_per_instance,
218  UINT instance_count,
219  UINT start_vertex_location,
220  UINT start_instance_location)
221 {
222  graphics_command_list->lpVtbl->DrawInstanced(
223  graphics_command_list, vertex_count_per_instance, instance_count, start_vertex_location,
224  start_instance_location);
225 }
227  D3D12GraphicsCommandList graphics_command_list,
228  UINT index_count_per_instance,
229  UINT instance_count,
230  UINT start_index_location,
231  INT base_vertex_location,
232  UINT start_instance_location)
233 {
234  graphics_command_list->lpVtbl->DrawIndexedInstanced(
235  graphics_command_list, index_count_per_instance, instance_count, start_index_location,
236  base_vertex_location, start_instance_location);
237 }
238 static INLINE void D3D12Dispatch(
239  D3D12GraphicsCommandList graphics_command_list,
240  UINT thread_group_count_x,
241  UINT thread_group_count_y,
242  UINT thread_group_count_z)
243 {
244  graphics_command_list->lpVtbl->Dispatch(
245  graphics_command_list, thread_group_count_x, thread_group_count_y, thread_group_count_z);
246 }
248  D3D12GraphicsCommandList graphics_command_list,
249  D3D12Resource dst_buffer,
250  UINT64 dst_offset,
251  D3D12Resource src_buffer,
252  UINT64 src_offset,
253  UINT64 num_bytes)
254 {
255  graphics_command_list->lpVtbl->CopyBufferRegion(
256  graphics_command_list, dst_buffer, dst_offset, (ID3D12Resource*)src_buffer, src_offset,
257  num_bytes);
258 }
260  D3D12GraphicsCommandList graphics_command_list,
262  UINT dst_x,
263  UINT dst_y,
264  UINT dst_z,
266  D3D12_BOX* src_box)
267 {
268  graphics_command_list->lpVtbl->CopyTextureRegion(
269  graphics_command_list, dst, dst_x, dst_y, dst_z, src, src_box);
270 }
272  D3D12GraphicsCommandList graphics_command_list, void* dst_resource, void* src_resource)
273 {
274  graphics_command_list->lpVtbl->CopyResource(
275  graphics_command_list, (ID3D12Resource*)dst_resource, (ID3D12Resource*)src_resource);
276 }
277 static INLINE void D3D12CopyTiles(
278  D3D12GraphicsCommandList graphics_command_list,
279  void* tiled_resource,
280  D3D12_TILED_RESOURCE_COORDINATE* tile_region_start_coordinate,
281  D3D12_TILE_REGION_SIZE* tile_region_size,
282  void* buffer,
283  UINT64 buffer_start_offset_in_bytes,
285 {
286  graphics_command_list->lpVtbl->CopyTiles(
287  graphics_command_list, (ID3D12Resource*)tiled_resource, tile_region_start_coordinate,
288  tile_region_size, (ID3D12Resource*)buffer, buffer_start_offset_in_bytes, flags);
289 }
291  D3D12GraphicsCommandList graphics_command_list,
292  void* dst_resource,
293  UINT dst_subresource,
294  void* src_resource,
295  UINT src_subresource,
297 {
298  graphics_command_list->lpVtbl->ResolveSubresource(
299  graphics_command_list, (ID3D12Resource*)dst_resource, dst_subresource,
300  (ID3D12Resource*)src_resource, src_subresource, format);
301 }
303  D3D12GraphicsCommandList graphics_command_list, D3D12_PRIMITIVE_TOPOLOGY primitive_topology)
304 {
305  graphics_command_list->lpVtbl->IASetPrimitiveTopology(graphics_command_list, primitive_topology);
306 }
308  D3D12GraphicsCommandList graphics_command_list, UINT num_viewports, D3D12_VIEWPORT* viewports)
309 {
310  graphics_command_list->lpVtbl->RSSetViewports(graphics_command_list, num_viewports, viewports);
311 }
313  D3D12GraphicsCommandList graphics_command_list, UINT num_rects, D3D12_RECT* rects)
314 {
315  graphics_command_list->lpVtbl->RSSetScissorRects(graphics_command_list, num_rects, rects);
316 }
317 static INLINE void
318 D3D12OMSetStencilRef(D3D12GraphicsCommandList graphics_command_list, UINT stencil_ref)
319 {
320  graphics_command_list->lpVtbl->OMSetStencilRef(graphics_command_list, stencil_ref);
321 }
323  D3D12GraphicsCommandList graphics_command_list, D3D12PipelineStateRef pipeline_state)
324 {
325  graphics_command_list->lpVtbl->SetPipelineState(graphics_command_list, (D3D12PipelineState)pipeline_state);
326 }
328  D3D12GraphicsCommandList graphics_command_list,
329  UINT num_barriers,
330  D3D12_RESOURCE_BARRIER* barriers)
331 {
332  graphics_command_list->lpVtbl->ResourceBarrier(graphics_command_list, num_barriers, barriers);
333 }
335  D3D12GraphicsCommandList graphics_command_list, D3D12GraphicsCommandList command_list)
336 {
337  graphics_command_list->lpVtbl->ExecuteBundle(graphics_command_list, command_list);
338 }
340  D3D12GraphicsCommandList graphics_command_list, D3D12RootSignature root_signature)
341 {
342  graphics_command_list->lpVtbl->SetComputeRootSignature(graphics_command_list, root_signature);
343 }
345  D3D12GraphicsCommandList graphics_command_list, D3D12RootSignature root_signature)
346 {
347  graphics_command_list->lpVtbl->SetGraphicsRootSignature(graphics_command_list, root_signature);
348 }
350  D3D12GraphicsCommandList graphics_command_list,
351  UINT root_parameter_index,
352  D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
353 {
354  graphics_command_list->lpVtbl->SetComputeRootDescriptorTable(
355  graphics_command_list, root_parameter_index, base_descriptor);
356 }
358  D3D12GraphicsCommandList graphics_command_list,
359  UINT root_parameter_index,
360  D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
361 {
362  graphics_command_list->lpVtbl->SetGraphicsRootDescriptorTable(
363  graphics_command_list, root_parameter_index, base_descriptor);
364 }
366  D3D12GraphicsCommandList graphics_command_list,
367  UINT root_parameter_index,
368  UINT src_data,
369  UINT dest_offset_in32_bit_values)
370 {
371  graphics_command_list->lpVtbl->SetComputeRoot32BitConstant(
372  graphics_command_list, root_parameter_index, src_data, dest_offset_in32_bit_values);
373 }
375  D3D12GraphicsCommandList graphics_command_list,
376  UINT root_parameter_index,
377  UINT src_data,
378  UINT dest_offset_in32_bit_values)
379 {
380  graphics_command_list->lpVtbl->SetGraphicsRoot32BitConstant(
381  graphics_command_list, root_parameter_index, src_data, dest_offset_in32_bit_values);
382 }
384  D3D12GraphicsCommandList graphics_command_list,
385  UINT root_parameter_index,
386  UINT num32_bit_values_to_set,
387  void* src_data,
388  UINT dest_offset_in32_bit_values)
389 {
390  graphics_command_list->lpVtbl->SetComputeRoot32BitConstants(
391  graphics_command_list, root_parameter_index, num32_bit_values_to_set, src_data,
392  dest_offset_in32_bit_values);
393 }
395  D3D12GraphicsCommandList graphics_command_list,
396  UINT root_parameter_index,
397  UINT num32_bit_values_to_set,
398  void* src_data,
399  UINT dest_offset_in32_bit_values)
400 {
401  graphics_command_list->lpVtbl->SetGraphicsRoot32BitConstants(
402  graphics_command_list, root_parameter_index, num32_bit_values_to_set, src_data,
403  dest_offset_in32_bit_values);
404 }
406  D3D12GraphicsCommandList graphics_command_list,
407  UINT root_parameter_index,
408  D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
409 {
410  graphics_command_list->lpVtbl->SetComputeRootConstantBufferView(
411  graphics_command_list, root_parameter_index, buffer_location);
412 }
414  D3D12GraphicsCommandList graphics_command_list,
415  UINT root_parameter_index,
416  D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
417 {
418  graphics_command_list->lpVtbl->SetGraphicsRootConstantBufferView(
419  graphics_command_list, root_parameter_index, buffer_location);
420 }
422  D3D12GraphicsCommandList graphics_command_list,
423  UINT root_parameter_index,
424  D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
425 {
426  graphics_command_list->lpVtbl->SetComputeRootShaderResourceView(
427  graphics_command_list, root_parameter_index, buffer_location);
428 }
430  D3D12GraphicsCommandList graphics_command_list,
431  UINT root_parameter_index,
432  D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
433 {
434  graphics_command_list->lpVtbl->SetGraphicsRootShaderResourceView(
435  graphics_command_list, root_parameter_index, buffer_location);
436 }
438  D3D12GraphicsCommandList graphics_command_list,
439  UINT root_parameter_index,
440  D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
441 {
442  graphics_command_list->lpVtbl->SetComputeRootUnorderedAccessView(
443  graphics_command_list, root_parameter_index, buffer_location);
444 }
446  D3D12GraphicsCommandList graphics_command_list,
447  UINT root_parameter_index,
448  D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
449 {
450  graphics_command_list->lpVtbl->SetGraphicsRootUnorderedAccessView(
451  graphics_command_list, root_parameter_index, buffer_location);
452 }
453 static INLINE void
455 {
456  graphics_command_list->lpVtbl->IASetIndexBuffer(graphics_command_list, view);
457 }
459  D3D12GraphicsCommandList graphics_command_list,
460  UINT start_slot,
461  UINT num_views,
463 {
464  graphics_command_list->lpVtbl->IASetVertexBuffers(
465  graphics_command_list, start_slot, num_views, views);
466 }
468  D3D12GraphicsCommandList graphics_command_list,
469  UINT start_slot,
470  UINT num_views,
472 {
473  graphics_command_list->lpVtbl->SOSetTargets(graphics_command_list, start_slot, num_views, views);
474 }
476  D3D12GraphicsCommandList graphics_command_list,
477  UINT num_render_target_descriptors,
478  D3D12_CPU_DESCRIPTOR_HANDLE* render_target_descriptors,
479  BOOL r_ts_single_handle_to_descriptor_range,
480  D3D12_CPU_DESCRIPTOR_HANDLE* depth_stencil_descriptor)
481 {
482  graphics_command_list->lpVtbl->OMSetRenderTargets(
483  graphics_command_list, num_render_target_descriptors, render_target_descriptors,
484  r_ts_single_handle_to_descriptor_range, depth_stencil_descriptor);
485 }
487  D3D12GraphicsCommandList graphics_command_list,
488  D3D12_CPU_DESCRIPTOR_HANDLE depth_stencil_view,
489  D3D12_CLEAR_FLAGS clear_flags,
490  FLOAT depth,
491  UINT8 stencil,
492  UINT num_rects,
493  D3D12_RECT* rects)
494 {
495  graphics_command_list->lpVtbl->ClearDepthStencilView(
496  graphics_command_list, depth_stencil_view, clear_flags, depth, stencil, num_rects, rects);
497 }
499  D3D12GraphicsCommandList graphics_command_list, void* resource, D3D12_DISCARD_REGION* region)
500 {
501  graphics_command_list->lpVtbl->DiscardResource(
502  graphics_command_list, (ID3D12Resource*)resource, region);
503 }
505  D3D12GraphicsCommandList graphics_command_list,
506  D3D12QueryHeap query_heap,
508  UINT index)
509 {
510  graphics_command_list->lpVtbl->BeginQuery(graphics_command_list, query_heap, type, index);
511 }
512 static INLINE void D3D12EndQuery(
513  D3D12GraphicsCommandList graphics_command_list,
514  D3D12QueryHeap query_heap,
516  UINT index)
517 {
518  graphics_command_list->lpVtbl->EndQuery(graphics_command_list, query_heap, type, index);
519 }
521  D3D12GraphicsCommandList graphics_command_list,
522  D3D12QueryHeap query_heap,
524  UINT start_index,
525  UINT num_queries,
526  void* destination_buffer,
527  UINT64 aligned_destination_buffer_offset)
528 {
529  graphics_command_list->lpVtbl->ResolveQueryData(
530  graphics_command_list, query_heap, type, start_index, num_queries,
531  (ID3D12Resource*)destination_buffer, aligned_destination_buffer_offset);
532 }
534  D3D12GraphicsCommandList graphics_command_list,
535  void* buffer,
536  UINT64 aligned_buffer_offset,
537  D3D12_PREDICATION_OP operation)
538 {
539  graphics_command_list->lpVtbl->SetPredication(
540  graphics_command_list, (ID3D12Resource*)buffer, aligned_buffer_offset, operation);
541 }
543  D3D12GraphicsCommandList graphics_command_list, UINT metadata, void* data, UINT size)
544 {
545  graphics_command_list->lpVtbl->SetMarker(graphics_command_list, metadata, data, size);
546 }
548  D3D12GraphicsCommandList graphics_command_list, UINT metadata, void* data, UINT size)
549 {
550  graphics_command_list->lpVtbl->BeginEvent(graphics_command_list, metadata, data, size);
551 }
553 {
554  graphics_command_list->lpVtbl->EndEvent(graphics_command_list);
555 }
557  D3D12GraphicsCommandList graphics_command_list,
558  D3D12CommandSignature command_signature,
559  UINT max_command_count,
560  void* argument_buffer,
561  UINT64 argument_buffer_offset,
562  void* count_buffer,
563  UINT64 count_buffer_offset)
564 {
565  graphics_command_list->lpVtbl->ExecuteIndirect(
566  graphics_command_list, command_signature, max_command_count,
567  (ID3D12Resource*)argument_buffer, argument_buffer_offset, (ID3D12Resource*)count_buffer,
568  count_buffer_offset);
569 }
571 {
572  return command_queue->lpVtbl->Release(command_queue);
573 }
575  D3D12CommandQueue command_queue,
576  void* resource,
577  UINT num_resource_regions,
578  D3D12_TILED_RESOURCE_COORDINATE* resource_region_start_coordinates,
579  D3D12_TILE_REGION_SIZE* resource_region_sizes,
580  D3D12Heap heap,
581  UINT num_ranges,
582  D3D12_TILE_RANGE_FLAGS* range_flags,
583  UINT* heap_range_start_offsets,
584  UINT* range_tile_counts,
586 {
587  command_queue->lpVtbl->UpdateTileMappings(
588  command_queue, (ID3D12Resource*)resource, num_resource_regions,
589  resource_region_start_coordinates, resource_region_sizes, heap, num_ranges, range_flags,
590  heap_range_start_offsets, range_tile_counts, flags);
591 }
593  D3D12CommandQueue command_queue,
594  void* dst_resource,
595  D3D12_TILED_RESOURCE_COORDINATE* dst_region_start_coordinate,
596  void* src_resource,
597  D3D12_TILED_RESOURCE_COORDINATE* src_region_start_coordinate,
598  D3D12_TILE_REGION_SIZE* region_size,
600 {
601  command_queue->lpVtbl->CopyTileMappings(
602  command_queue, (ID3D12Resource*)dst_resource, dst_region_start_coordinate,
603  (ID3D12Resource*)src_resource, src_region_start_coordinate, region_size, flags);
604 }
605 static INLINE void
607 {
608  command_queue->lpVtbl->SetMarker(command_queue, metadata, data, size);
609 }
610 static INLINE void
612 {
613  command_queue->lpVtbl->BeginEvent(command_queue, metadata, data, size);
614 }
616 {
617  command_queue->lpVtbl->EndEvent(command_queue);
618 }
619 static INLINE HRESULT
621 {
622  return command_queue->lpVtbl->Signal(command_queue, fence, value);
623 }
625 {
626  return command_queue->lpVtbl->Wait(command_queue, fence, value);
627 }
629 {
630  return command_queue->lpVtbl->GetTimestampFrequency(command_queue, frequency);
631 }
633  D3D12CommandQueue command_queue, UINT64* gpu_timestamp, UINT64* cpu_timestamp)
634 {
635  return command_queue->lpVtbl->GetClockCalibration(command_queue, gpu_timestamp, cpu_timestamp);
636 }
638 {
639  return device->lpVtbl->Release(device);
640 }
642 {
643  return device->lpVtbl->GetNodeCount(device);
644 }
647 {
648  return device->lpVtbl->CreateCommandQueue(device, desc, uuidof(ID3D12CommandQueue), (void**)out);
649 }
652 {
653  return device->lpVtbl->CreateCommandAllocator(
655 }
658 {
659  return device->lpVtbl->CreateGraphicsPipelineState(
660  device, desc, uuidof(ID3D12PipelineState), (void**)out);
661 }
664 {
665  return device->lpVtbl->CreateComputePipelineState(
666  device, desc, uuidof(ID3D12PipelineState), (void**)out);
667 }
670  UINT node_mask,
672  D3D12CommandAllocator command_allocator,
673  D3D12PipelineState initial_state,
675 {
676  return device->lpVtbl->CreateCommandList(
677  device, node_mask, type, command_allocator, initial_state, uuidof(ID3D12CommandList),
678  (void**)out);
679 }
682  D3D12_FEATURE feature,
683  void* feature_support_data,
684  UINT feature_support_data_size)
685 {
686  return device->lpVtbl->CheckFeatureSupport(
687  device, feature, feature_support_data, feature_support_data_size);
688 }
691  D3D12_DESCRIPTOR_HEAP_DESC* descriptor_heap_desc,
693 {
694  return device->lpVtbl->CreateDescriptorHeap(
695  device, descriptor_heap_desc, uuidof(ID3D12DescriptorHeap), (void**)out);
696 }
698  D3D12Device device, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
699 {
700  return device->lpVtbl->GetDescriptorHandleIncrementSize(device, descriptor_heap_type);
701 }
704  UINT node_mask,
705  void* blob_with_root_signature,
706  SIZE_T blob_length_in_bytes,
708 {
709  return device->lpVtbl->CreateRootSignature(
710  device, node_mask, blob_with_root_signature, blob_length_in_bytes,
711  uuidof(ID3D12RootSignature), (void**)out);
712 }
716  D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
717 {
718  device->lpVtbl->CreateConstantBufferView(device, desc, dest_descriptor);
719 }
722  D3D12Resource resource,
724  D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
725 {
726  device->lpVtbl->CreateShaderResourceView(device, resource, desc, dest_descriptor);
727 }
730  void* resource,
731  void* counter_resource,
733  D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
734 {
735  device->lpVtbl->CreateUnorderedAccessView(
736  device, (ID3D12Resource*)resource, (ID3D12Resource*)counter_resource, desc,
737  dest_descriptor);
738 }
741  void* resource,
743  D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
744 {
745  device->lpVtbl->CreateRenderTargetView(device, (ID3D12Resource*)resource, desc, dest_descriptor);
746 }
749  void* resource,
751  D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
752 {
753  device->lpVtbl->CreateDepthStencilView(device, (ID3D12Resource*)resource, desc, dest_descriptor);
754 }
757 {
758  device->lpVtbl->CreateSampler(device, desc, dest_descriptor);
759 }
762  UINT num_dest_descriptor_ranges,
763  D3D12_CPU_DESCRIPTOR_HANDLE* dest_descriptor_range_starts,
764  UINT* dest_descriptor_range_sizes,
765  UINT num_src_descriptor_ranges,
766  D3D12_CPU_DESCRIPTOR_HANDLE* src_descriptor_range_starts,
767  UINT* src_descriptor_range_sizes,
768  D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heaps_type)
769 {
770  device->lpVtbl->CopyDescriptors(
771  device, num_dest_descriptor_ranges, dest_descriptor_range_starts,
772  dest_descriptor_range_sizes, num_src_descriptor_ranges, src_descriptor_range_starts,
773  src_descriptor_range_sizes, descriptor_heaps_type);
774 }
777  UINT num_descriptors,
778  D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor_range_start,
779  D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_start,
780  D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heaps_type)
781 {
782  device->lpVtbl->CopyDescriptorsSimple(
783  device, num_descriptors, dest_descriptor_range_start, src_descriptor_range_start,
784  descriptor_heaps_type);
785 }
788  UINT visible_mask,
789  UINT num_resource_descs,
790  D3D12_RESOURCE_DESC* resource_descs)
791 {
792  return device->lpVtbl->GetResourceAllocationInfo(
793  device, visible_mask, num_resource_descs, resource_descs);
794 }
797 {
798  return device->lpVtbl->GetCustomHeapProperties(device, node_mask, heap_type);
799 }
802  D3D12_HEAP_PROPERTIES* heap_properties,
803  D3D12_HEAP_FLAGS heap_flags,
804  D3D12_RESOURCE_DESC* desc,
805  D3D12_RESOURCE_STATES initial_resource_state,
806  D3D12_CLEAR_VALUE* optimized_clear_value,
808 {
809  return device->lpVtbl->CreateCommittedResource(
810  device, heap_properties, heap_flags, desc, initial_resource_state, optimized_clear_value,
811  uuidof(ID3D12Resource), (void**)out);
812 }
814 {
815  return device->lpVtbl->CreateHeap(device, desc, uuidof(ID3D12Heap), (void**)out);
816 }
819  D3D12Heap heap,
820  UINT64 heap_offset,
821  D3D12_RESOURCE_DESC* desc,
822  D3D12_RESOURCE_STATES initial_state,
823  D3D12_CLEAR_VALUE* optimized_clear_value,
825 {
826  return device->lpVtbl->CreatePlacedResource(
827  device, heap, heap_offset, desc, initial_state, optimized_clear_value,
828  uuidof(ID3D12Resource), (void**)out);
829 }
832  D3D12_RESOURCE_DESC* desc,
833  D3D12_RESOURCE_STATES initial_state,
834  D3D12_CLEAR_VALUE* optimized_clear_value,
836 {
837  return device->lpVtbl->CreateReservedResource(
838  device, desc, initial_state, optimized_clear_value, uuidof(ID3D12Resource), (void**)out);
839 }
842 {
843  return device->lpVtbl->CreateFence(
844  device, initial_value, flags, uuidof(ID3D12Fence), (void**)out);
845 }
847 {
848  return device->lpVtbl->GetDeviceRemovedReason(device);
849 }
852  D3D12_RESOURCE_DESC* resource_desc,
853  UINT first_subresource,
854  UINT num_subresources,
855  UINT64 base_offset,
857  UINT* num_rows,
858  UINT64* row_size_in_bytes,
859  UINT64* total_bytes)
860 {
861  device->lpVtbl->GetCopyableFootprints(
862  device, resource_desc, first_subresource, num_subresources, base_offset, layouts, num_rows,
863  row_size_in_bytes, total_bytes);
864 }
865 static INLINE HRESULT
867 {
868  return device->lpVtbl->CreateQueryHeap(device, desc, uuidof(ID3D12Heap), (void**)out);
869 }
871 {
872  return device->lpVtbl->SetStablePowerState(device, enable);
873 }
877  D3D12RootSignature root_signature,
879 {
880  return device->lpVtbl->CreateCommandSignature(
881  device, desc, root_signature, uuidof(ID3D12CommandSignature), (void**)out);
882 }
885  void* tiled_resource,
886  UINT* num_tiles_for_entire_resource,
887  D3D12_PACKED_MIP_INFO* packed_mip_desc,
888  D3D12_TILE_SHAPE* standard_tile_shape_for_non_packed_mips,
889  UINT* num_subresource_tilings,
890  UINT first_subresource_tiling_to_get,
891  D3D12_SUBRESOURCE_TILING* subresource_tilings_for_non_packed_mips)
892 {
893  device->lpVtbl->GetResourceTiling(
894  device, (ID3D12Resource*)tiled_resource, num_tiles_for_entire_resource, packed_mip_desc,
895  standard_tile_shape_for_non_packed_mips, num_subresource_tilings,
896  first_subresource_tiling_to_get, subresource_tilings_for_non_packed_mips);
897 }
899 {
900  return device->lpVtbl->GetAdapterLuid(device);
901 }
903 {
904  return pipeline_library->lpVtbl->Release(pipeline_library);
905 }
906 static INLINE HRESULT
908 {
909  return pipeline_library->lpVtbl->StorePipeline(pipeline_library, name, pipeline);
910 }
912  D3D12PipelineLibrary pipeline_library,
913  LPCWSTR name,
916 {
917  return pipeline_library->lpVtbl->LoadGraphicsPipeline(
918  pipeline_library, name, desc, uuidof(ID3D12PipelineState), (void**)out);
919 }
921  D3D12PipelineLibrary pipeline_library,
922  LPCWSTR name,
925 {
926  return pipeline_library->lpVtbl->LoadComputePipeline(
927  pipeline_library, name, desc, uuidof(ID3D12PipelineState), (void**)out);
928 }
929 static INLINE SIZE_T D3D12GetSerializedSize(D3D12PipelineLibrary pipeline_library)
930 {
931  return pipeline_library->lpVtbl->GetSerializedSize(pipeline_library);
932 }
933 static INLINE HRESULT
934 D3D12Serialize(D3D12PipelineLibrary pipeline_library, void* data, SIZE_T data_size_in_bytes)
935 {
936  return pipeline_library->lpVtbl->Serialize(pipeline_library, data, data_size_in_bytes);
937 }
938 static INLINE ULONG D3D12ReleaseDebug(D3D12Debug debug) { return debug->lpVtbl->Release(debug); }
940 {
941  debug->lpVtbl->EnableDebugLayer(debug);
942 }
944 {
945  return debug_device->lpVtbl->Release(debug_device);
946 }
947 static INLINE HRESULT
949 {
950  return debug_device->lpVtbl->SetFeatureMask(debug_device, mask);
951 }
953 {
954  return debug_device->lpVtbl->GetFeatureMask(debug_device);
955 }
956 static INLINE HRESULT
958 {
959  return debug_device->lpVtbl->ReportLiveDeviceObjects(debug_device, flags);
960 }
962 {
963  return debug_command_queue->lpVtbl->Release(debug_command_queue);
964 }
966  D3D12DebugCommandQueue debug_command_queue, void* resource, UINT subresource, UINT state)
967 {
968  return debug_command_queue->lpVtbl->AssertResourceState(
969  debug_command_queue, (ID3D12Resource*)resource, subresource, state);
970 }
972 {
973  return debug_command_list->lpVtbl->Release(debug_command_list);
974 }
976  D3D12DebugCommandList debug_command_list, void* resource, UINT subresource, UINT state)
977 {
978  return debug_command_list->lpVtbl->AssertResourceState(
979  debug_command_list, (ID3D12Resource*)resource, subresource, state);
980 }
982  D3D12DebugCommandList debug_command_list, D3D12_DEBUG_FEATURE mask)
983 {
984  return debug_command_list->lpVtbl->SetFeatureMask(debug_command_list, mask);
985 }
988 {
989  return debug_command_list->lpVtbl->GetFeatureMask(debug_command_list);
990 }
992 {
993  return info_queue->lpVtbl->Release(info_queue);
994 }
995 static INLINE HRESULT
996 D3D12SetMessageCountLimit(D3D12InfoQueue info_queue, UINT64 message_count_limit)
997 {
998  return info_queue->lpVtbl->SetMessageCountLimit(info_queue, message_count_limit);
999 }
1001 {
1002  info_queue->lpVtbl->ClearStoredMessages(info_queue);
1003 }
1004 #ifndef __WINRT__
1006  D3D12InfoQueue info_queue,
1007  UINT64 message_index,
1009  SIZE_T* message_byte_length)
1010 {
1011  return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length);
1012 }
1013 #endif
1015 {
1016  return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue);
1017 }
1019 {
1020  return info_queue->lpVtbl->GetNumMessagesDeniedByStorageFilter(info_queue);
1021 }
1023 {
1024  return info_queue->lpVtbl->GetNumStoredMessages(info_queue);
1025 }
1027 {
1028  return info_queue->lpVtbl->GetNumStoredMessagesAllowedByRetrievalFilter(info_queue);
1029 }
1031 {
1032  return info_queue->lpVtbl->GetNumMessagesDiscardedByMessageCountLimit(info_queue);
1033 }
1035 {
1036  return info_queue->lpVtbl->GetMessageCountLimit(info_queue);
1037 }
1038 static INLINE HRESULT
1040 {
1041  return info_queue->lpVtbl->AddStorageFilterEntries(info_queue, filter);
1042 }
1044  D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER* filter, SIZE_T* filter_byte_length)
1045 {
1046  return info_queue->lpVtbl->GetStorageFilter(info_queue, filter, filter_byte_length);
1047 }
1049 {
1050  info_queue->lpVtbl->ClearStorageFilter(info_queue);
1051 }
1053 {
1054  return info_queue->lpVtbl->PushEmptyStorageFilter(info_queue);
1055 }
1057 {
1058  return info_queue->lpVtbl->PushCopyOfStorageFilter(info_queue);
1059 }
1060 static INLINE HRESULT
1062 {
1063  return info_queue->lpVtbl->PushStorageFilter(info_queue, filter);
1064 }
1066 {
1067  info_queue->lpVtbl->PopStorageFilter(info_queue);
1068 }
1070 {
1071  return info_queue->lpVtbl->GetStorageFilterStackSize(info_queue);
1072 }
1073 static INLINE HRESULT
1075 {
1076  return info_queue->lpVtbl->AddRetrievalFilterEntries(info_queue, filter);
1077 }
1079  D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER* filter, SIZE_T* filter_byte_length)
1080 {
1081  return info_queue->lpVtbl->GetRetrievalFilter(info_queue, filter, filter_byte_length);
1082 }
1084 {
1085  info_queue->lpVtbl->ClearRetrievalFilter(info_queue);
1086 }
1088 {
1089  return info_queue->lpVtbl->PushEmptyRetrievalFilter(info_queue);
1090 }
1092 {
1093  return info_queue->lpVtbl->PushCopyOfRetrievalFilter(info_queue);
1094 }
1095 static INLINE HRESULT
1097 {
1098  return info_queue->lpVtbl->PushRetrievalFilter(info_queue, filter);
1099 }
1101 {
1102  info_queue->lpVtbl->PopRetrievalFilter(info_queue);
1103 }
1105 {
1106  return info_queue->lpVtbl->GetRetrievalFilterStackSize(info_queue);
1107 }
1109  D3D12InfoQueue info_queue,
1110  D3D12_MESSAGE_CATEGORY category,
1112  D3D12_MESSAGE_ID i_d,
1113  LPCSTR description)
1114 {
1115  return info_queue->lpVtbl->AddMessage(info_queue, category, severity, i_d, description);
1116 }
1119 {
1120  return info_queue->lpVtbl->AddApplicationMessage(info_queue, severity, description);
1121 }
1122 static INLINE HRESULT
1124 {
1125  return info_queue->lpVtbl->SetBreakOnCategory(info_queue, category, b_enable);
1126 }
1127 static INLINE HRESULT
1129 {
1130  return info_queue->lpVtbl->SetBreakOnSeverity(info_queue, severity, b_enable);
1131 }
1132 static INLINE HRESULT
1134 {
1135  return info_queue->lpVtbl->SetBreakOnID(info_queue, i_d, b_enable);
1136 }
1137 static INLINE BOOL
1139 {
1140  return info_queue->lpVtbl->GetBreakOnCategory(info_queue, category);
1141 }
1142 static INLINE BOOL
1144 {
1145  return info_queue->lpVtbl->GetBreakOnSeverity(info_queue, severity);
1146 }
1148 {
1149  return info_queue->lpVtbl->GetBreakOnID(info_queue, i_d);
1150 }
1151 static INLINE void D3D12SetMuteDebugOutput(D3D12InfoQueue info_queue, BOOL b_mute)
1152 {
1153  info_queue->lpVtbl->SetMuteDebugOutput(info_queue, b_mute);
1154 }
1156 {
1157  return info_queue->lpVtbl->GetMuteDebugOutput(info_queue);
1158 }
1159 
1160 /* end of auto-generated */
1161 
1163 {
1164  return D3D12GetDebugInterface(uuidof(ID3D12Debug), (void**)out);
1165 }
1166 
1167 static INLINE HRESULT
1169 {
1170  return D3D12CreateDevice(
1171  (IUnknown*)adapter, MinimumFeatureLevel, uuidof(ID3D12Device), (void**)out);
1172 }
1173 
1176  UINT node_mask,
1178  D3D12CommandAllocator command_allocator,
1179  D3D12PipelineState initial_state,
1181 {
1182  return device->lpVtbl->CreateCommandList(
1183  device, node_mask, type, command_allocator, initial_state,
1185 }
1186 
1188  D3D12GraphicsCommandList command_list,
1189  D3D12_CPU_DESCRIPTOR_HANDLE render_target_view,
1190  const FLOAT colorRGBA[4],
1191  UINT num_rects,
1192  const D3D12_RECT* rects)
1193 {
1194  command_list->lpVtbl->ClearRenderTargetView(
1195  command_list, render_target_view, colorRGBA, num_rects, rects);
1196 }
1197 
1199  D3D12CommandQueue command_queue,
1200  UINT num_command_lists,
1201  const D3D12CommandList* command_lists)
1202 {
1203  command_queue->lpVtbl->ExecuteCommandLists(command_queue, num_command_lists, command_lists);
1204 }
1206  D3D12CommandQueue command_queue,
1207  UINT num_command_lists,
1208  const D3D12GraphicsCommandList* command_lists)
1209 {
1210  command_queue->lpVtbl->ExecuteCommandLists(
1211  command_queue, num_command_lists, (ID3D12CommandList* const*)command_lists);
1212 }
1213 
1214 static INLINE HRESULT
1216 {
1217  return swapchain->lpVtbl->GetBuffer(swapchain, buffer, uuidof(ID3D12Resource), (void**)surface);
1218 }
1220  D3D12GraphicsCommandList command_list,
1221  UINT num_descriptor_heaps,
1222  const D3D12DescriptorHeap* descriptor_heaps)
1223 {
1224  command_list->lpVtbl->SetDescriptorHeaps(command_list, num_descriptor_heaps, descriptor_heaps);
1225 }
1226 #if 0 /* function prototype is wrong ... */
1228  D3D12DescriptorHeap descriptor_heap)
1229 {
1230  return descriptor_heap->lpVtbl->GetCPUDescriptorHandleForHeapStart(descriptor_heap);
1231 }
1233  D3D12DescriptorHeap descriptor_heap)
1234 {
1235  return descriptor_heap->lpVtbl->GetGPUDescriptorHandleForHeapStart(descriptor_heap);
1236 }
1237 #else
1240 {
1242  ((void(STDMETHODCALLTYPE*)(ID3D12DescriptorHeap*, D3D12_CPU_DESCRIPTOR_HANDLE*))
1243  descriptor_heap->lpVtbl->GetCPUDescriptorHandleForHeapStart)(descriptor_heap, &out);
1244  return out;
1245 }
1248 {
1250  ((void(STDMETHODCALLTYPE*)(ID3D12DescriptorHeap*, D3D12_GPU_DESCRIPTOR_HANDLE*))
1251  descriptor_heap->lpVtbl->GetGPUDescriptorHandleForHeapStart)(descriptor_heap, &out);
1252  return out;
1253 }
1254 #endif
1255 
1256  /* internal */
1257 
1258 #include <retro_math.h>
1259 #include <retro_common_api.h>
1260 #include <gfx/math/matrix_4x4.h>
1261 
1262 #include "../common/d3dcompiler_common.h"
1263 #include "../video_driver.h"
1264 #include "../drivers_shader/slang_process.h"
1265 
1266 typedef struct d3d12_vertex_t
1267 {
1268  float position[2];
1269  float texcoord[2];
1270  float color[4];
1271 } d3d12_vertex_t;
1272 
1273 typedef struct
1274 {
1275  struct
1276  {
1277  float x, y, w, h;
1278  } pos;
1279  struct
1280  {
1281  float u, v, w, h;
1282  } coords;
1283  UINT32 colors[4];
1284  struct
1285  {
1286  float scaling;
1287  float rotation;
1288  } params;
1289 } d3d12_sprite_t;
1290 
1291 typedef struct
1292 {
1293  D3D12DescriptorHeap handle; /* descriptor pool */
1298  bool* map;
1299  int start;
1301 
1302 typedef struct
1303 {
1307  /* the first view is srv, the rest are mip levels uavs */
1317  bool dirty;
1319 } d3d12_texture_t;
1320 
1321 #ifndef ALIGN
1322 #ifdef _MSC_VER
1323 #define ALIGN(x) __declspec(align(x))
1324 #else
1325 #define ALIGN(x) __attribute__((aligned(x)))
1326 #endif
1327 #endif
1328 
1329 typedef struct ALIGN(16)
1330 {
1331  math_matrix_4x4 mvp;
1332  struct
1333  {
1334  float width;
1335  float height;
1336  } OutputSize;
1337  float time;
1339 
1340 static_assert(
1341  (!(sizeof(d3d12_uniform_t) & 0xF)), "sizeof(d3d12_uniform_t) must be a multiple of 16");
1342 
1343 typedef struct
1344 {
1345  unsigned cur_mon_id;
1346 #ifdef __WINRT__
1347  DXGIFactory2 factory;
1348 #else
1350 #endif
1353 
1354  struct
1355  {
1360  HANDLE fenceEvent;
1362  } queue;
1363 
1364  struct
1365  {
1366  D3D12RootSignature cs_rootSignature; /* descriptor layout */
1367  D3D12RootSignature sl_rootSignature; /* descriptor layout */
1368  D3D12RootSignature rootSignature; /* descriptor layout */
1369  d3d12_descriptor_heap_t srv_heap; /* ShaderResouceView descritor heap */
1370  d3d12_descriptor_heap_t rtv_heap; /* RenderTargetView descritor heap */
1372  } desc;
1373 
1374  struct
1375  {
1377  D3D12Resource renderTargets[2];
1381  float clearcolor[4];
1383  bool vsync;
1384  } chain;
1385 
1386  struct
1387  {
1393  D3D12_VIEWPORT viewport;
1394  D3D12_RECT scissorRect;
1397  } frame;
1398 
1399  struct
1400  {
1401  D3D12Resource vbo;
1402  D3D12_VERTEX_BUFFER_VIEW vbo_view;
1404 
1405  float alpha;
1406  bool enabled;
1408  } menu;
1409 
1410  struct
1411  {
1416  D3D12Resource vbo;
1417  D3D12_VERTEX_BUFFER_VIEW vbo_view;
1418  int offset;
1420  bool enabled;
1421  } sprites;
1422 
1423 #ifdef HAVE_OVERLAY
1424  struct
1425  {
1426  D3D12Resource vbo;
1427  D3D12_VERTEX_BUFFER_VIEW vbo_view;
1429  bool enabled;
1430  bool fullscreen;
1431  int count;
1432  } overlays;
1433 #endif
1434 
1435  struct
1436  {
1443  D3D12_VIEWPORT viewport;
1444  D3D12_RECT scissorRect;
1449  } pass[GFX_MAX_SHADERS];
1450 
1453 
1457  D3D12Resource ubo;
1462  struct video_viewport vp;
1470 
1471 #ifdef DEBUG
1472  D3D12Debug debugController;
1473 #endif
1474 } d3d12_video_t;
1475 
1476 typedef enum {
1483 
1484 typedef enum {
1490 
1492 
1494 
1495 bool d3d12_init_base(d3d12_video_t* d3d12);
1496 
1498 void d3d12_init_samplers(d3d12_video_t* d3d12);
1499 
1500 bool d3d12_init_pipeline(
1502  D3DBlob vs_code,
1503  D3DBlob ps_code,
1504  D3DBlob gs_code,
1507 
1508 bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, void *corewindow);
1509 
1510 bool d3d12_init_queue(d3d12_video_t* d3d12);
1511 
1514 
1517 
1519  int width,
1520  int height,
1521  int pitch,
1523  const void* data,
1525 
1527  d3d12_texture_t* texture, void *userdata);
1528 
1531 
1533 
1534 #if !defined(__cplusplus) || defined(CINTERFACE)
1537  D3D12Resource resource,
1538  D3D12_RESOURCE_STATES state_before,
1539  D3D12_RESOURCE_STATES state_after)
1540 {
1544  barrier.Transition.pResource = resource;
1545  barrier.Transition.StateBefore = state_before;
1546  barrier.Transition.StateAfter = state_after;
1547  barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
1549 }
1550 
1552 {
1554 }
1555 
1556 static INLINE void
1558 {
1560 }
1561 
1562 static INLINE void
1564 {
1567 }
1568 
1569 #endif
1570 
#define GFX_MAX_FRAME_HISTORY
Definition: video_shader_parse.h:46
DXGISwapChain handle
Definition: d3d12_common.h:1376
static INLINE ULONG D3D12ReleaseDebugCommandQueue(D3D12DebugCommandQueue debug_command_queue)
Definition: d3d12_common.h:961
const GLuint * buffers
Definition: glext.h:6556
Definition: d3d12_common.h:1485
static INLINE void D3D12CopyTiles(D3D12GraphicsCommandList graphics_command_list, void *tiled_resource, D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate, D3D12_TILE_REGION_SIZE *tile_region_size, void *buffer, UINT64 buffer_start_offset_in_bytes, D3D12_TILE_COPY_FLAGS flags)
Definition: d3d12_common.h:277
static INLINE D3D12_HEAP_PROPERTIES D3D12GetCustomHeapProperties(D3D12Device device, UINT node_mask, D3D12_HEAP_TYPE heap_type)
Definition: d3d12_common.h:796
static INLINE SIZE_T D3D12GetSerializedSize(D3D12PipelineLibrary pipeline_library)
Definition: d3d12_common.h:929
GLuint const GLchar * name
Definition: glext.h:6671
D3D12PipelineStateRef pipe
Definition: d3d12_common.h:1412
d3d12_descriptor_heap_t rtv_heap
Definition: d3d12_common.h:1370
float texcoord[2]
Definition: d3d12_common.h:1269
D3D12_GPU_VIRTUAL_ADDRESS d3d12_create_buffer(D3D12Device device, UINT size_in_bytes, D3D12Resource *buffer)
Definition: d3d12_common.c:605
ID3D12Device * D3D12Device
Definition: d3d12_common.h:44
const ID3D12PipelineState * D3D12PipelineStateRef
Definition: d3d12_common.h:23
D3D12_FENCE_FLAGS
Definition: d3d12.h:2967
D3D12_VERTEX_BUFFER_VIEW vbo_view
Definition: d3d12_common.h:1392
Definition: matrix_4x4.h:40
static INLINE void D3D12CreateShaderResourceView(D3D12Device device, D3D12Resource resource, D3D12_SHADER_RESOURCE_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
Definition: d3d12_common.h:720
D3D12_RESOURCE_DESC desc
Definition: d3d12_common.h:1306
interface ID3D12PipelineLibrary ID3D12PipelineLibrary
Definition: d3d12.h:195
static INLINE HRESULT D3D12AddRetrievalFilterEntries(D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER *filter)
Definition: d3d12_common.h:1074
ID3D12DeviceChild * D3D12DeviceChild
Definition: d3d12_common.h:28
void d3d12_init_samplers(d3d12_video_t *d3d12)
Definition: d3d12_common.c:496
static INLINE void D3D12ClearState(D3D12GraphicsCommandList graphics_command_list, D3D12PipelineState pipeline_state)
Definition: d3d12_common.h:211
static INLINE HRESULT D3D12ReportLiveDeviceObjects(D3D12DebugDevice debug_device, D3D12_RLDO_FLAGS flags)
Definition: d3d12_common.h:957
struct d3d12_vertex_t d3d12_vertex_t
static INLINE HRESULT D3D12Wait(D3D12CommandQueue command_queue, D3D12Fence fence, UINT64 value)
Definition: d3d12_common.h:624
interface ID3D12Resource ID3D12Resource
Definition: d3d12.h:97
#define INLINE
Definition: retro_inline.h:35
root_signature_parameter_index_t
Definition: d3d12_common.h:1476
ID3DBlob * D3DBlob
Definition: d3dcompiler_common.h:27
D3D_FEATURE_LEVEL
Definition: d3dcommon.h:79
static INLINE void D3D12ResourceBarrier(D3D12GraphicsCommandList graphics_command_list, UINT num_barriers, D3D12_RESOURCE_BARRIER *barriers)
Definition: d3d12_common.h:327
D3D12_DESCRIPTOR_HEAP_TYPE
Definition: d3d12.h:2977
D3D12_MESSAGE_CATEGORY
Definition: d3d12sdklayers.h:1099
static INLINE HRESULT D3D12SetBreakOnID(D3D12InfoQueue info_queue, D3D12_MESSAGE_ID i_d, BOOL b_enable)
Definition: d3d12_common.h:1133
static INLINE HRESULT D3D12SetEventOnCompletion(D3D12Fence fence, UINT64 value, HANDLE h_event)
Definition: d3d12_common.h:163
D3D12Resource upload_buffer
Definition: d3d12_common.h:1305
Definition: d3d12_common.h:1479
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
static INLINE void D3D12CopyTextureRegion(D3D12GraphicsCommandList graphics_command_list, D3D12_TEXTURE_COPY_LOCATION *dst, UINT dst_x, UINT dst_y, UINT dst_z, D3D12_TEXTURE_COPY_LOCATION *src, D3D12_BOX *src_box)
Definition: d3d12_common.h:259
static INLINE void D3D12SetComputeRootUnorderedAccessView(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
Definition: d3d12_common.h:437
Definition: glslang_tab.cpp:129
interface ID3D12VersionedRootSignatureDeserializer ID3D12VersionedRootSignatureDeserializer
Definition: d3d12.h:76
static INLINE HRESULT D3D12PushEmptyRetrievalFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1087
static INLINE UINT64 D3D12GetMessageCountLimit(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1034
D3D12Fence fence
Definition: d3d12_common.h:1359
static INLINE D3D12_DEBUG_FEATURE D3D12GetDebugCommandListFeatureMask(D3D12DebugCommandList debug_command_list)
Definition: d3d12_common.h:987
static INLINE void D3D12BeginQuery(D3D12GraphicsCommandList graphics_command_list, D3D12QueryHeap query_heap, D3D12_QUERY_TYPE type, UINT index)
Definition: d3d12_common.h:504
static INLINE BOOL D3D12GetBreakOnCategory(D3D12InfoQueue info_queue, D3D12_MESSAGE_CATEGORY category)
Definition: d3d12_common.h:1138
Definition: d3d12_common.h:1488
static INLINE ULONG D3D12ReleaseGraphicsCommandList(D3D12GraphicsCommandList graphics_command_list)
Definition: d3d12_common.h:195
D3D12PipelineState pipe
Definition: d3d12_common.h:1437
GLenum const GLfloat * params
Definition: glext.h:6297
static INLINE void D3D12SetComputeRootDescriptorTable(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
Definition: d3d12_common.h:349
Definition: dxgi_common.h:798
Definition: d3d12_common.h:1273
static INLINE void D3D12CreateRenderTargetView(D3D12Device device, void *resource, D3D12_RENDER_TARGET_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
Definition: d3d12_common.h:739
bool keep_aspect
Definition: d3d12_common.h:1464
int start
Definition: d3d12_common.h:1299
Definition: d3d12.h:2250
static INLINE const D3D12_ROOT_SIGNATURE_DESC * D3D12GetRootSignatureDesc(D3D12RootSignatureDeserializer root_signature_deserializer)
Definition: d3d12_common.h:70
Definition: d3d12.h:1041
Definition: d3d12sdklayers.h:2261
static INLINE void D3D12IASetVertexBuffers(D3D12GraphicsCommandList graphics_command_list, UINT start_slot, UINT num_views, D3D12_VERTEX_BUFFER_VIEW *views)
Definition: d3d12_common.h:458
Definition: ffmpeg_core.c:151
bool d3d12_init_base(d3d12_video_t *d3d12)
Definition: d3d12_common.c:154
bool d3d12_init_queue(d3d12_video_t *d3d12)
Definition: d3d12_common.c:191
Definition: d3d12.h:3416
bool resize_render_targets
Definition: d3d12_common.h:1466
static INLINE void D3D12CopyTileMappings(D3D12CommandQueue command_queue, void *dst_resource, D3D12_TILED_RESOURCE_COORDINATE *dst_region_start_coordinate, void *src_resource, D3D12_TILED_RESOURCE_COORDINATE *src_region_start_coordinate, D3D12_TILE_REGION_SIZE *region_size, D3D12_TILE_MAPPING_FLAGS flags)
Definition: d3d12_common.h:592
static INLINE ULONG D3D12ReleasePipelineState(D3D12PipelineState pipeline_state)
Definition: d3d12_common.h:171
interface ID3D12Heap ID3D12Heap
Definition: d3d12.h:90
static INLINE void d3d12_resource_transition(D3D12GraphicsCommandList cmd, D3D12Resource resource, D3D12_RESOURCE_STATES state_before, D3D12_RESOURCE_STATES state_after)
Definition: d3d12_common.h:1535
static INLINE void D3D12SOSetTargets(D3D12GraphicsCommandList graphics_command_list, UINT start_slot, UINT num_views, D3D12_STREAM_OUTPUT_BUFFER_VIEW *views)
Definition: d3d12_common.h:467
D3D12_MESSAGE_ID
Definition: d3d12sdklayers.h:1125
static INLINE void D3D12ResolveQueryData(D3D12GraphicsCommandList graphics_command_list, D3D12QueryHeap query_heap, D3D12_QUERY_TYPE type, UINT start_index, UINT num_queries, void *destination_buffer, UINT64 aligned_destination_buffer_offset)
Definition: d3d12_common.h:520
void d3d12_upload_texture(D3D12GraphicsCommandList cmd, d3d12_texture_t *texture, void *userdata)
Definition: d3d12_common.c:781
static INLINE void D3D12CopyDescriptorsSimple(D3D12Device device, UINT num_descriptors, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor_range_start, D3D12_CPU_DESCRIPTOR_HANDLE src_descriptor_range_start, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heaps_type)
Definition: d3d12_common.h:775
bool resize_chain
Definition: d3d12_common.h:1463
d3d12_descriptor_heap_t * srv_heap
Definition: d3d12_common.h:1316
D3D12_GPU_DESCRIPTOR_HANDLE gpu
Definition: d3d12_common.h:1296
#define uuidof(type)
Definition: dxgi_common.h:246
static INLINE void D3D12ClearRetrievalFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1083
static INLINE void D3D12CopyResource(D3D12GraphicsCommandList graphics_command_list, void *dst_resource, void *src_resource)
Definition: d3d12_common.h:271
interface ID3D12DebugCommandList ID3D12DebugCommandList
Definition: d3d12sdklayers.h:97
static INLINE HRESULT D3D12CreateRootSignature(D3D12Device device, UINT node_mask, void *blob_with_root_signature, SIZE_T blob_length_in_bytes, ID3D12RootSignature **out)
Definition: d3d12_common.h:702
D3D12_HEAP_FLAGS
Definition: d3d12.h:2127
bool * map
Definition: d3d12_common.h:1298
d3d12_uniform_t ubo_values
Definition: d3d12_common.h:1456
static INLINE void D3D12SetPredication(D3D12GraphicsCommandList graphics_command_list, void *buffer, UINT64 aligned_buffer_offset, D3D12_PREDICATION_OP operation)
Definition: d3d12_common.h:533
uint64_t UINT64
Definition: coretypes.h:8
static INLINE void D3D12SetComputeRoot32BitConstant(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, UINT src_data, UINT dest_offset_in32_bit_values)
Definition: d3d12_common.h:365
float4_t output_size
Definition: d3d12_common.h:1395
D3D12Resource handle
Definition: d3d12_common.h:1304
static INLINE void D3D12DiscardResource(D3D12GraphicsCommandList graphics_command_list, void *resource, D3D12_DISCARD_REGION *region)
Definition: d3d12_common.h:498
static INLINE void d3d12_set_texture(D3D12GraphicsCommandList cmd, const d3d12_texture_t *texture)
Definition: d3d12_common.h:1551
interface ID3D12Device ID3D12Device
Definition: d3d12.h:188
GLsizeiptr size
Definition: glext.h:6559
static INLINE void D3D12RSSetScissorRects(D3D12GraphicsCommandList graphics_command_list, UINT num_rects, D3D12_RECT *rects)
Definition: d3d12_common.h:312
static INLINE void D3D12ExecuteBundle(D3D12GraphicsCommandList graphics_command_list, D3D12GraphicsCommandList command_list)
Definition: d3d12_common.h:334
interface ID3D12DebugCommandQueue ID3D12DebugCommandQueue
Definition: d3d12sdklayers.h:83
#define GFX_MAX_TEXTURES
Definition: video_shader_parse.h:34
static INLINE void D3D12IASetIndexBuffer(D3D12GraphicsCommandList graphics_command_list, D3D12_INDEX_BUFFER_VIEW *view)
Definition: d3d12_common.h:454
static INLINE UINT D3D12GetDescriptorHandleIncrementSize(D3D12Device device, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heap_type)
Definition: d3d12_common.h:697
static INLINE HRESULT D3D12GetMessageA(D3D12InfoQueue info_queue, UINT64 message_index, D3D12_MESSAGE *message, SIZE_T *message_byte_length)
Definition: d3d12_common.h:1005
GLboolean enable
Definition: glext.h:12027
static INLINE void D3D12SetGraphicsRootUnorderedAccessView(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
Definition: d3d12_common.h:445
ID3D12Pageable * D3D12Pageable
Definition: d3d12_common.h:32
Definition: video_shader_parse.h:72
float position[2]
Definition: d3d12_common.h:1268
Definition: d3d12.h:2009
D3D12DescriptorHeap handle
Definition: d3d12_common.h:1293
uint32_t frame_count
Definition: d3d12_common.h:1446
ID3D12PipelineLibrary * D3D12PipelineLibrary
Definition: d3d12_common.h:45
static INLINE HRESULT D3D12SetStablePowerState(D3D12Device device, BOOL enable)
Definition: d3d12_common.h:870
bool init_history
Definition: d3d12_common.h:1467
int rotation
Definition: d3d12_common.h:1396
struct passwd out
Definition: missing_libc_functions.c:51
static INLINE ULONG D3D12ReleaseDebugDevice(D3D12DebugDevice debug_device)
Definition: d3d12_common.h:943
static INLINE void D3D12RSSetViewports(D3D12GraphicsCommandList graphics_command_list, UINT num_viewports, D3D12_VIEWPORT *viewports)
Definition: d3d12_common.h:307
static INLINE void D3D12SetComputeRootConstantBufferView(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
Definition: d3d12_common.h:405
ID3D12VersionedRootSignatureDeserializer * D3D12VersionedRootSignatureDeserializer
Definition: d3d12_common.h:31
static const bool fullscreen
Definition: config.def.h:108
static INLINE void D3D12PopRetrievalFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1100
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
static INLINE void D3D12PopStorageFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1065
D3D12_COMMAND_LIST_TYPE
Definition: d3d12.h:1014
static INLINE void D3D12OMSetStencilRef(D3D12GraphicsCommandList graphics_command_list, UINT stencil_ref)
Definition: d3d12_common.h:318
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
static INLINE ULONG D3D12ReleaseDebug(D3D12Debug debug)
Definition: d3d12_common.h:938
static INLINE void D3D12ExecuteGraphicsCommandLists(D3D12CommandQueue command_queue, UINT num_command_lists, const D3D12GraphicsCommandList *command_lists)
Definition: d3d12_common.h:1205
Definition: d3d12_common.h:1266
static INLINE HRESULT D3D12GetRootSignatureDescAtVersion(D3D12VersionedRootSignatureDeserializer versioned_root_signature_deserializer, D3D_ROOT_SIGNATURE_VERSION convert_to_version, const D3D12_VERSIONED_ROOT_SIGNATURE_DESC **desc)
Definition: d3d12_common.h:80
float4_t size_data
Definition: d3d12_common.h:1318
bool fullscreen
Definition: d3d12_common.h:1407
static INLINE void D3D12SetGraphicsRootShaderResourceView(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
Definition: d3d12_common.h:429
static INLINE ULONG D3D12ReleaseRootSignature(D3D12RootSignature root_signature)
Definition: d3d12_common.h:60
static INLINE void D3D12SetComputeRootShaderResourceView(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
Definition: d3d12_common.h:421
static INLINE UINT D3D12GetNodeCount(D3D12Device device)
Definition: d3d12_common.h:641
static INLINE void D3D12ClearStoredMessages(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1000
Definition: ibxm.h:9
static INLINE void D3D12DrawIndexedInstanced(D3D12GraphicsCommandList graphics_command_list, UINT index_count_per_instance, UINT instance_count, UINT start_index_location, INT base_vertex_location, UINT start_instance_location)
Definition: d3d12_common.h:226
float alpha
Definition: d3d12_common.h:1405
static INLINE ULONG D3D12ReleaseQueryHeap(D3D12QueryHeap query_heap)
Definition: d3d12_common.h:183
interface ID3D12CommandQueue ID3D12CommandQueue
Definition: d3d12.h:181
static INLINE D3D12_GPU_DESCRIPTOR_HANDLE D3D12GetGPUDescriptorHandleForHeapStart(D3D12DescriptorHeap descriptor_heap)
Definition: d3d12_common.h:1247
D3D12_CLEAR_FLAGS
Definition: d3d12.h:2959
D3D12Device device
Definition: d3d12_common.h:1352
GLuint GLuint GLsizei count
Definition: glext.h:6292
Definition: d3d12_common.h:1478
d3d12_uniform_t
Definition: d3d12_common.h:1338
Definition: video_shader_parse.h:143
interface ID3D12Pageable ID3D12Pageable
Definition: d3d12.h:83
ID3D12CommandList * D3D12CommandList
Definition: d3d12_common.h:41
interface ID3D12DeviceChild ID3D12DeviceChild
Definition: d3d12.h:55
Definition: d3d12.h:2395
ID3D12DebugDevice * D3D12DebugDevice
Definition: d3d12_common.h:47
Definition: d3d12.h:3527
static INLINE UINT64 D3D12GetNumMessagesDeniedByStorageFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1018
interface ID3D12QueryHeap ID3D12QueryHeap
Definition: d3d12.h:139
static INLINE UINT D3D12GetStorageFilterStackSize(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1069
interface ID3D12CommandList ID3D12CommandList
Definition: d3d12.h:153
interface ID3D12InfoQueue ID3D12InfoQueue
Definition: d3d12sdklayers.h:111
D3D12GraphicsCommandList cmd
Definition: d3d12_common.h:1358
static INLINE ULONG D3D12ReleaseInfoQueue(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:991
static INLINE ULONG D3D12Release(void *object)
Definition: d3d12_common.h:52
static INLINE HRESULT D3D12CreateCommittedResource(D3D12Device device, D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags, D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_resource_state, D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12Resource **out)
Definition: d3d12_common.h:800
static INLINE void D3D12UpdateTileMappings(D3D12CommandQueue command_queue, void *resource, UINT num_resource_regions, D3D12_TILED_RESOURCE_COORDINATE *resource_region_start_coordinates, D3D12_TILE_REGION_SIZE *resource_region_sizes, D3D12Heap heap, UINT num_ranges, D3D12_TILE_RANGE_FLAGS *range_flags, UINT *heap_range_start_offsets, UINT *range_tile_counts, D3D12_TILE_MAPPING_FLAGS flags)
Definition: d3d12_common.h:574
ID3D12InfoQueue * D3D12InfoQueue
Definition: d3d12_common.h:50
GLenum GLuint GLenum severity
Definition: glext.h:6233
static INLINE void D3D12CreateDepthStencilView(D3D12Device device, void *resource, D3D12_DEPTH_STENCIL_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
Definition: d3d12_common.h:747
interface ID3D12Fence ID3D12Fence
Definition: d3d12.h:111
ID3D12CommandAllocator * D3D12CommandAllocator
Definition: d3d12_common.h:35
GLuint coords
Definition: glext.h:8035
ID3D12QueryHeap * D3D12QueryHeap
Definition: d3d12_common.h:39
static INLINE HRESULT D3D12Map(void *resource, UINT subresource, D3D12_RANGE *read_range, void **data)
Definition: d3d12_common.h:104
static INLINE HRESULT D3D12SetMessageCountLimit(D3D12InfoQueue info_queue, UINT64 message_count_limit)
Definition: d3d12_common.h:996
GLenum GLuint texture
Definition: glext.h:6935
ID3D12CommandQueue * D3D12CommandQueue
Definition: d3d12_common.h:43
bool resize_viewport
Definition: d3d12_common.h:1465
ID3D12RootSignature * D3D12RootSignature
Definition: d3d12_common.h:29
GLenum type
Definition: glext.h:6233
static INLINE HRESULT D3D12ResetCommandAllocator(D3D12CommandAllocator command_allocator)
Definition: d3d12_common.h:154
static INLINE ULONG D3D12ReleaseCommandSignature(D3D12CommandSignature command_signature)
Definition: d3d12_common.h:187
ID3D12DebugCommandQueue * D3D12DebugCommandQueue
Definition: d3d12_common.h:48
static INLINE HRESULT D3D12CreateCommandList(D3D12Device device, UINT node_mask, D3D12_COMMAND_LIST_TYPE type, D3D12CommandAllocator command_allocator, D3D12PipelineState initial_state, ID3D12CommandList **out)
Definition: d3d12_common.h:668
Definition: d3d12.h:2276
DXGI_FORMAT
Definition: dxgiformat.h:10
static INLINE BOOL D3D12GetMuteDebugOutput(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1155
static INLINE HRESULT D3D12CreateCommandSignature(D3D12Device device, D3D12_COMMAND_SIGNATURE_DESC *desc, D3D12RootSignature root_signature, ID3D12CommandSignature **out)
Definition: d3d12_common.h:874
D3D12_VIEWPORT viewport
Definition: d3d12_common.h:1379
Definition: d3d12.h:3428
ID3D12Heap * D3D12Heap
Definition: d3d12_common.h:33
ubyte cmd
Definition: wiiuse_internal.h:319
Definition: d3d12.h:2146
static INLINE void D3D12EndQuery(D3D12GraphicsCommandList graphics_command_list, D3D12QueryHeap query_heap, D3D12_QUERY_TYPE type, UINT index)
Definition: d3d12_common.h:512
static INLINE HRESULT D3D12CreateQueryHeap(D3D12Device device, D3D12_QUERY_HEAP_DESC *desc, ID3D12Heap **out)
Definition: d3d12_common.h:866
Definition: d3d12.h:2242
Definition: video_shader_parse.h:83
D3D12_VERTEX_BUFFER_VIEW menu_pipeline_vbo_view
Definition: d3d12_common.h:1469
GLuint * samplers
Definition: glext.h:7947
Definition: d3d12_common.h:1480
d3d12_descriptor_heap_t sampler_heap
Definition: d3d12_common.h:1371
static INLINE HRESULT D3D12PushCopyOfStorageFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1056
static INLINE ULONG D3D12ReleaseCommandList(D3D12CommandList command_list)
Definition: d3d12_common.h:191
D3D12_QUERY_TYPE
Definition: d3d12.h:3454
Definition: d3d12_common.h:1343
static INLINE ULONG D3D12ReleaseDescriptorHeap(D3D12DescriptorHeap descriptor_heap)
Definition: d3d12_common.h:179
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:8417
static INLINE void D3D12SetGraphicsRootConstantBufferView(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS buffer_location)
Definition: d3d12_common.h:413
d3d12_descriptor_heap_t srv_heap
Definition: d3d12_common.h:1369
static INLINE HRESULT D3D12CreateDescriptorHeap(D3D12Device device, D3D12_DESCRIPTOR_HEAP_DESC *descriptor_heap_desc, D3D12DescriptorHeap *out)
Definition: d3d12_common.h:689
IDXGIFactory1 * DXGIFactory
Definition: dxgi_common.h:272
static INLINE void D3D12GetResourceTiling(D3D12Device device, void *tiled_resource, UINT *num_tiles_for_entire_resource, D3D12_PACKED_MIP_INFO *packed_mip_desc, D3D12_TILE_SHAPE *standard_tile_shape_for_non_packed_mips, UINT *num_subresource_tilings, UINT first_subresource_tiling_to_get, D3D12_SUBRESOURCE_TILING *subresource_tilings_for_non_packed_mips)
Definition: d3d12_common.h:883
d3d12_texture_t rt
Definition: d3d12_common.h:1441
static INLINE ULONG D3D12ReleaseDebugCommandList(D3D12DebugCommandList debug_command_list)
Definition: d3d12_common.h:971
compute_root_index_t
Definition: d3d12_common.h:1484
static INLINE BOOL D3D12AssertDebugCommandQueueResourceState(D3D12DebugCommandQueue debug_command_queue, void *resource, UINT subresource, UINT state)
Definition: d3d12_common.h:965
static INLINE HRESULT DXGIGetSwapChainBuffer(DXGISwapChain swapchain, UINT buffer, D3D12Resource *surface)
Definition: d3d12_common.h:1215
static INLINE HRESULT D3D12CreateFence(D3D12Device device, UINT64 initial_value, D3D12_FENCE_FLAGS flags, ID3D12Fence **out)
Definition: d3d12_common.h:840
static INLINE void D3D12Dispatch(D3D12GraphicsCommandList graphics_command_list, UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z)
Definition: d3d12_common.h:238
float scaling
Definition: d3d12_common.h:1286
static INLINE void D3D12IASetPrimitiveTopology(D3D12GraphicsCommandList graphics_command_list, D3D12_PRIMITIVE_TOPOLOGY primitive_topology)
Definition: d3d12_common.h:302
static INLINE D3D12_DEBUG_FEATURE D3D12GetDebugDeviceFeatureMask(D3D12DebugDevice debug_device)
Definition: d3d12_common.h:952
static INLINE void D3D12ClearRenderTargetView(D3D12GraphicsCommandList command_list, D3D12_CPU_DESCRIPTOR_HANDLE render_target_view, const FLOAT colorRGBA[4], UINT num_rects, const D3D12_RECT *rects)
Definition: d3d12_common.h:1187
D3D12_RESOURCE_STATES
Definition: d3d12.h:2309
Definition: d3d12_common.h:1487
ID3D12Fence * D3D12Fence
Definition: d3d12_common.h:36
Definition: d3d12.h:2374
static INLINE void D3D12ExecuteCommandLists(D3D12CommandQueue command_queue, UINT num_command_lists, const D3D12CommandList *command_lists)
Definition: d3d12_common.h:1198
D3D12RootSignature rootSignature
Definition: d3d12_common.h:1368
static INLINE void D3D12OMSetRenderTargets(D3D12GraphicsCommandList graphics_command_list, UINT num_render_target_descriptors, D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors, BOOL r_ts_single_handle_to_descriptor_range, D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor)
Definition: d3d12_common.h:475
DXGIAdapter adapter
Definition: d3d12_common.h:1351
ID3D12CommandSignature * D3D12CommandSignature
Definition: d3d12_common.h:40
math_matrix_4x4 mvp_no_rot
Definition: d3d12_common.h:1461
static INLINE void D3D12SetCommandQueueMarker(D3D12CommandQueue command_queue, UINT metadata, void *data, UINT size)
Definition: d3d12_common.h:606
Definition: d3d12.h:2217
DXGI_FORMAT d3d12_get_closest_match(D3D12Device device, D3D12_FEATURE_DATA_FORMAT_SUPPORT *desired)
Definition: d3d12_common.c:882
Definition: d3d12.h:2715
static INLINE HRESULT D3D12CreateDevice_(DXGIAdapter adapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, D3D12Device *out)
Definition: d3d12_common.h:1168
static INLINE HRESULT D3D12LoadGraphicsPipeline(D3D12PipelineLibrary pipeline_library, LPCWSTR name, D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc, ID3D12PipelineState **out)
Definition: d3d12_common.h:911
static INLINE ULONG D3D12ReleaseFence(D3D12Fence fence)
Definition: d3d12_common.h:158
static INLINE void D3D12CreateConstantBufferView(D3D12Device device, D3D12_CONSTANT_BUFFER_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
Definition: d3d12_common.h:713
ID3D12Debug * D3D12Debug
Definition: d3d12_common.h:46
static INLINE HRESULT D3D12PushRetrievalFilter(D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER *filter)
Definition: d3d12_common.h:1096
D3D12RootSignature sl_rootSignature
Definition: d3d12_common.h:1367
Definition: d3d12.h:1118
interface ID3D12GraphicsCommandList ID3D12GraphicsCommandList
Definition: d3d12.h:160
D3D12_RECT scissorRect
Definition: d3d12_common.h:1380
D3D12RootSignature cs_rootSignature
Definition: d3d12_common.h:1366
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
D3D12_DEBUG_FEATURE
Definition: d3d12sdklayers.h:427
Definition: d3d12.h:2943
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:6233
D3D_ROOT_SIGNATURE_VERSION
Definition: d3d12.h:1959
GLint GLfloat GLint stencil
Definition: glext.h:6900
time_t time(time_t *timer)
static INLINE void D3D12EndCommandQueueEvent(D3D12CommandQueue command_queue)
Definition: d3d12_common.h:615
Definition: chd_stream.c:62
interface ID3D12Object ID3D12Object
Definition: d3d12.h:48
Definition: d3d12.h:2576
D3D12CommandQueue handle
Definition: d3d12_common.h:1356
static INLINE HRESULT D3D12CreateComputePipelineState(D3D12Device device, D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, ID3D12PipelineState **out)
Definition: d3d12_common.h:662
Definition: d3d12.h:2268
#define D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES
Definition: d3d12.h:868
static INLINE void D3D12EnableDebugLayer(D3D12Debug debug)
Definition: d3d12_common.h:939
GLenum src
Definition: glext.h:6980
Definition: d3d12.h:2368
static INLINE void D3D12SetGraphicsCommandListMarker(D3D12GraphicsCommandList graphics_command_list, UINT metadata, void *data, UINT size)
Definition: d3d12_common.h:542
Definition: d3d12.h:3421
GLenum GLint GLuint mask
Definition: glext.h:6668
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
interface ID3D12CommandSignature ID3D12CommandSignature
Definition: d3d12.h:146
Definition: d3d12_common.h:1481
static INLINE const D3D12_VERSIONED_ROOT_SIGNATURE_DESC * D3D12GetUnconvertedRootSignatureDesc(D3D12VersionedRootSignatureDeserializer versioned_root_signature_deserializer)
Definition: d3d12_common.h:88
Definition: d3d12sdklayers.h:2242
D3D12PipelineState pipe_font
Definition: d3d12_common.h:1415
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glext.h:6293
UINT64 total_bytes
Definition: d3d12_common.h:1315
description
Definition: setup.py:7
HRESULT WINAPI D3D12GetDebugInterface(_In_ REFIID riid, _COM_Outptr_opt_ void **ppvDebug)
static INLINE void D3D12DrawInstanced(D3D12GraphicsCommandList graphics_command_list, UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
Definition: d3d12_common.h:215
static INLINE UINT64 D3D12GetNumStoredMessagesAllowedByRetrievalFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1026
interface ID3D12CommandAllocator ID3D12CommandAllocator
Definition: d3d12.h:104
static INLINE HRESULT D3D12PushCopyOfRetrievalFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1091
D3D12_GPU_DESCRIPTOR_HANDLE textures
Definition: d3d12_common.h:1447
void d3d12_init_texture(D3D12Device device, d3d12_texture_t *tex)
Definition: d3d12_common.c:643
static INLINE BOOL D3D12AssertDebugCommandListResourceState(D3D12DebugCommandList debug_command_list, void *resource, UINT subresource, UINT state)
Definition: d3d12_common.h:975
static INLINE void D3D12Unmap(void *resource, UINT subresource, D3D12_RANGE *written_range)
Definition: d3d12_common.h:109
struct video_shader * shader_preset
Definition: d3d12_common.h:1451
static INLINE HRESULT D3D12GetCachedBlob(D3D12PipelineState pipeline_state, ID3DBlob **blob)
Definition: d3d12_common.h:175
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
bool vsync
Definition: d3d12_common.h:1383
D3D12_PLACED_SUBRESOURCE_FOOTPRINT layout
Definition: d3d12_common.h:1312
D3D12_CONSTANT_BUFFER_VIEW_DESC ubo_view
Definition: d3d12_common.h:1390
static INLINE void D3D12SetPipelineState(D3D12GraphicsCommandList graphics_command_list, D3D12PipelineStateRef pipeline_state)
Definition: d3d12_common.h:322
static INLINE HRESULT D3D12StorePipeline(D3D12PipelineLibrary pipeline_library, LPCWSTR name, D3D12PipelineState pipeline)
Definition: d3d12_common.h:907
Definition: slang_reflection.h:85
float rotation
Definition: d3d12_common.h:1287
UINT stride
Definition: d3d12_common.h:1297
bool enabled
Definition: d3d12_common.h:1406
ID3D10Blob ID3DBlob
Definition: d3dcommon.h:448
static INLINE HRESULT D3D12ReadFromSubresource(void *resource, void *dst_data, UINT dst_row_pitch, UINT dst_depth_pitch, UINT src_subresource, D3D12_BOX *src_box)
Definition: d3d12_common.h:131
static INLINE void D3D12EndGraphicsCommandListEvent(D3D12GraphicsCommandList graphics_command_list)
Definition: d3d12_common.h:552
static INLINE D3D12_RESOURCE_ALLOCATION_INFO D3D12GetResourceAllocationInfo(D3D12Device device, UINT visible_mask, UINT num_resource_descs, D3D12_RESOURCE_DESC *resource_descs)
Definition: d3d12_common.h:786
Definition: d3d12.h:3496
Definition: d3d12.h:2995
GLuint index
Definition: glext.h:6671
ID3D12Object * D3D12Object
Definition: d3d12_common.h:27
unsigned luts
Definition: video_shader_parse.h:156
Definition: d3d12.h:2596
static INLINE LUID D3D12GetAdapterLuid(D3D12Device device)
Definition: d3d12_common.h:898
Definition: d3d12.h:2283
ID3D12RootSignatureDeserializer * D3D12RootSignatureDeserializer
Definition: d3d12_common.h:30
static INLINE UINT64 D3D12GetNumMessagesAllowedByStorageFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1014
Definition: d3d12.h:1106
static INLINE HRESULT D3D12CloseGraphicsCommandList(D3D12GraphicsCommandList graphics_command_list)
Definition: d3d12_common.h:199
D3D12PipelineState pipe_blend
Definition: d3d12_common.h:1413
Definition: d3d12.h:3447
static INLINE HRESULT D3D12CreateHeap(D3D12Device device, D3D12_HEAP_DESC *desc, ID3D12Heap **out)
Definition: d3d12_common.h:813
static INLINE D3D12_GPU_VIRTUAL_ADDRESS D3D12GetGPUVirtualAddress(void *resource)
Definition: d3d12_common.h:114
static INLINE void D3D12GetCopyableFootprints(D3D12Device device, D3D12_RESOURCE_DESC *resource_desc, UINT first_subresource, UINT num_subresources, UINT64 base_offset, D3D12_PLACED_SUBRESOURCE_FOOTPRINT *layouts, UINT *num_rows, UINT64 *row_size_in_bytes, UINT64 *total_bytes)
Definition: d3d12_common.h:850
static INLINE ULONG D3D12ReleaseCommandAllocator(D3D12CommandAllocator command_allocator)
Definition: d3d12_common.h:150
static INLINE HRESULT D3D12WriteToSubresource(void *resource, UINT dst_subresource, D3D12_BOX *dst_box, void *src_data, UINT src_row_pitch, UINT src_depth_pitch)
Definition: d3d12_common.h:118
static INLINE ULONG D3D12ReleasePageable(D3D12Pageable pageable)
Definition: d3d12_common.h:94
static INLINE void D3D12SetGraphicsRoot32BitConstant(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, UINT src_data, UINT dest_offset_in32_bit_values)
Definition: d3d12_common.h:374
ID3D12DescriptorHeap * D3D12DescriptorHeap
Definition: d3d12_common.h:38
unsigned int BOOL
Definition: gctypes.h:51
static INLINE HRESULT D3D12SetDebugDeviceFeatureMask(D3D12DebugDevice debug_device, D3D12_DEBUG_FEATURE mask)
Definition: d3d12_common.h:948
D3D12Resource ubo
Definition: d3d12_common.h:1389
static INLINE HRESULT D3D12SignalFence(D3D12Fence fence, UINT64 value)
Definition: d3d12_common.h:167
interface ID3D12RootSignatureDeserializer ID3D12RootSignatureDeserializer
Definition: d3d12.h:69
static INLINE HRESULT D3D12PushStorageFilter(D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER *filter)
Definition: d3d12_common.h:1061
static INLINE UINT64 D3D12GetCompletedValue(D3D12Fence fence)
Definition: d3d12_common.h:159
static INLINE void D3D12SetGraphicsRoot32BitConstants(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, UINT num32_bit_values_to_set, void *src_data, UINT dest_offset_in32_bit_values)
Definition: d3d12_common.h:394
D3D12_TILE_MAPPING_FLAGS
Definition: d3d12.h:2291
uint32_t UINT32
Definition: coretypes.h:10
interface ID3D12RootSignature ID3D12RootSignature
Definition: d3d12.h:62
D3D12_GPU_DESCRIPTOR_HANDLE sampler
Definition: d3d12_common.h:1310
static INLINE HRESULT D3D12AddApplicationMessage(D3D12InfoQueue info_queue, D3D12_MESSAGE_SEVERITY severity, LPCSTR description)
Definition: d3d12_common.h:1117
static INLINE HRESULT D3D12GetDebugInterface_(D3D12Debug *out)
Definition: d3d12_common.h:1162
D3D12_DESCRIPTOR_HEAP_DESC desc
Definition: d3d12_common.h:1294
static INLINE HRESULT D3D12ResetGraphicsCommandList(D3D12GraphicsCommandList graphics_command_list, D3D12CommandAllocator allocator, D3D12PipelineState initial_state)
Definition: d3d12_common.h:203
Definition: video_driver.h:686
static INLINE HRESULT D3D12Serialize(D3D12PipelineLibrary pipeline_library, void *data, SIZE_T data_size_in_bytes)
Definition: d3d12_common.h:934
Definition: d3d12.h:2118
int frame_index
Definition: d3d12_common.h:1382
DXGI_FORMAT format
Definition: d3d12_common.h:1459
GLuint color
Definition: glext.h:6883
Definition: d3d12.h:3112
RETRO_BEGIN_DECLS D3D12_RENDER_TARGET_BLEND_DESC d3d12_blend_enable_desc
Definition: d3d12_common.c:539
bool dirty
Definition: d3d12_common.h:1317
float v
Definition: d3d12_common.h:1281
static INLINE HRESULT D3D12SignalCommandQueue(D3D12CommandQueue command_queue, D3D12Fence fence, UINT64 value)
Definition: d3d12_common.h:620
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
D3D_PRIMITIVE_TOPOLOGY
Definition: d3dcommon.h:108
Definition: d3d12.h:2791
static INLINE void D3D12SetComputeRootSignature(D3D12GraphicsCommandList graphics_command_list, D3D12RootSignature root_signature)
Definition: d3d12_common.h:339
Definition: d3d12.h:2408
static INLINE ULONG D3D12ReleaseRootSignatureDeserializer(D3D12RootSignatureDeserializer root_signature_deserializer)
Definition: d3d12_common.h:65
const GLuint * textures
Definition: glext.h:9001
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7672
static INLINE void D3D12ClearDepthStencilView(D3D12GraphicsCommandList graphics_command_list, D3D12_CPU_DESCRIPTOR_HANDLE depth_stencil_view, D3D12_CLEAR_FLAGS clear_flags, FLOAT depth, UINT8 stencil, UINT num_rects, D3D12_RECT *rects)
Definition: d3d12_common.h:486
Definition: d3d12_common.h:1302
interface ID3D12Debug ID3D12Debug
Definition: d3d12sdklayers.h:48
Definition: d3d12.h:3534
void d3d12_release_texture(d3d12_texture_t *texture)
Definition: d3d12_common.c:625
GLint GLint GLsizei width
Definition: glext.h:6293
static INLINE void D3D12SetMuteDebugOutput(D3D12InfoQueue info_queue, BOOL b_mute)
Definition: d3d12_common.h:1151
static INLINE ULONG D3D12ReleaseDeviceChild(D3D12DeviceChild device_child)
Definition: d3d12_common.h:56
static INLINE void D3D12ClearStorageFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1048
static INLINE HRESULT D3D12AddMessage(D3D12InfoQueue info_queue, D3D12_MESSAGE_CATEGORY category, D3D12_MESSAGE_SEVERITY severity, D3D12_MESSAGE_ID i_d, LPCSTR description)
Definition: d3d12_common.h:1108
static INLINE HRESULT D3D12CheckFeatureSupport(D3D12Device device, D3D12_FEATURE feature, void *feature_support_data, UINT feature_support_data_size)
Definition: d3d12_common.h:680
static INLINE HRESULT D3D12GetClockCalibration(D3D12CommandQueue command_queue, UINT64 *gpu_timestamp, UINT64 *cpu_timestamp)
Definition: d3d12_common.h:632
static INLINE void d3d12_set_sampler(D3D12GraphicsCommandList cmd, D3D12_GPU_DESCRIPTOR_HANDLE sampler)
Definition: d3d12_common.h:1557
static INLINE void D3D12BeginCommandQueueEvent(D3D12CommandQueue command_queue, UINT metadata, void *data, UINT size)
Definition: d3d12_common.h:611
Definition: glslang_tab.cpp:135
Definition: d3d12.h:1257
Definition: slang_process.h:74
#define D3D12_MAX_TEXTURE_DIMENSION_2_TO_EXP
Definition: d3d12.h:740
d3d12_texture_t feedback
Definition: d3d12_common.h:1442
bool d3d12_init_descriptors(d3d12_video_t *d3d12)
Definition: d3d12_common.c:361
static INLINE HRESULT D3D12PushEmptyStorageFilter(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1052
bool d3d12_init_swapchain(d3d12_video_t *d3d12, int width, int height, void *corewindow)
Definition: d3d12_common.c:218
Definition: glslang_tab.cpp:136
static INLINE ULONG D3D12ReleasePipelineLibrary(D3D12PipelineLibrary pipeline_library)
Definition: d3d12_common.h:902
D3D12_FEATURE
Definition: d3d12.h:1773
void d3d12_create_fullscreen_quad_vbo(D3D12Device device, D3D12_VERTEX_BUFFER_VIEW *view, D3D12Resource *vbo)
Definition: d3d12_common.c:858
D3D12_PREDICATION_OP
Definition: d3d12.h:3468
static INLINE HRESULT D3D12SetBreakOnCategory(D3D12InfoQueue info_queue, D3D12_MESSAGE_CATEGORY category, BOOL b_enable)
Definition: d3d12_common.h:1123
D3D12_GPU_DESCRIPTOR_HANDLE sampler
Definition: d3d12_common.h:1438
static INLINE HRESULT D3D12CreatePlacedResource(D3D12Device device, D3D12Heap heap, UINT64 heap_offset, D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12Resource **out)
Definition: d3d12_common.h:817
static INLINE void D3D12CopyBufferRegion(D3D12GraphicsCommandList graphics_command_list, D3D12Resource dst_buffer, UINT64 dst_offset, D3D12Resource src_buffer, UINT64 src_offset, UINT64 num_bytes)
Definition: d3d12_common.h:247
UINT64 row_size_in_bytes
Definition: d3d12_common.h:1314
IDXGIAdapter1 * DXGIAdapter
Definition: dxgi_common.h:276
static INLINE HRESULT D3D12CreateCommandQueue(D3D12Device device, D3D12_COMMAND_QUEUE_DESC *desc, ID3D12CommandQueue **out)
Definition: d3d12_common.h:645
static INLINE void D3D12ExecuteIndirect(D3D12GraphicsCommandList graphics_command_list, D3D12CommandSignature command_signature, UINT max_command_count, void *argument_buffer, UINT64 argument_buffer_offset, void *count_buffer, UINT64 count_buffer_offset)
Definition: d3d12_common.h:556
#define GFX_MAX_SHADERS
Definition: video_shader_parse.h:30
GLsizei const GLfloat * value
Definition: glext.h:6709
Definition: metal_common.m:516
Definition: d3d12.h:1724
static INLINE void D3D12SetGraphicsRootSignature(D3D12GraphicsCommandList graphics_command_list, D3D12RootSignature root_signature)
Definition: d3d12_common.h:344
Definition: d3d12.h:3585
static INLINE HRESULT D3D12CreateGraphicsPipelineState(D3D12Device device, D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc, ID3D12PipelineState **out)
Definition: d3d12_common.h:656
static INLINE HRESULT D3D12GetTimestampFrequency(D3D12CommandQueue command_queue, UINT64 *frequency)
Definition: d3d12_common.h:628
static INLINE UINT64 D3D12GetNumStoredMessages(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1022
D3D12_GPU_DESCRIPTOR_HANDLE samplers
Definition: d3d12_common.h:1448
static INLINE HRESULT D3D12SetBreakOnSeverity(D3D12InfoQueue info_queue, D3D12_MESSAGE_SEVERITY severity, BOOL b_enable)
Definition: d3d12_common.h:1128
static INLINE HRESULT D3D12CreateGraphicsCommandList(D3D12Device device, UINT node_mask, D3D12_COMMAND_LIST_TYPE type, D3D12CommandAllocator command_allocator, D3D12PipelineState initial_state, D3D12GraphicsCommandList *out)
Definition: d3d12_common.h:1174
D3D12_RLDO_FLAGS
Definition: d3d12sdklayers.h:409
static INLINE ULONG D3D12ReleaseResource(void *resource)
Definition: d3d12_common.h:99
Definition: d3d12.h:2187
static INLINE void D3D12BeginGraphicsCommandListEvent(D3D12GraphicsCommandList graphics_command_list, UINT metadata, void *data, UINT size)
Definition: d3d12_common.h:547
HRESULT WINAPI D3D12CreateDevice(_In_opt_ IUnknown *pAdapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, _In_ REFIID riid, _COM_Outptr_opt_ void **ppDevice)
UINT64 fenceValue
Definition: d3d12_common.h:1361
static INLINE void D3D12CreateSampler(D3D12Device device, D3D12_SAMPLER_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
Definition: d3d12_common.h:755
HANDLE fenceEvent
Definition: d3d12_common.h:1360
GLenum GLenum dst
Definition: glext.h:6980
bool d3d12_init_pipeline(D3D12Device device, D3DBlob vs_code, D3DBlob ps_code, D3DBlob gs_code, D3D12_GRAPHICS_PIPELINE_STATE_DESC *desc, D3D12PipelineState *out)
Definition: d3d12_common.c:552
static INLINE void D3D12ResolveSubresource(D3D12GraphicsCommandList graphics_command_list, void *dst_resource, UINT dst_subresource, void *src_resource, UINT src_subresource, DXGI_FORMAT format)
Definition: d3d12_common.h:290
static INLINE HRESULT D3D12CreateReservedResource(D3D12Device device, D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_STATES initial_state, D3D12_CLEAR_VALUE *optimized_clear_value, ID3D12Resource **out)
Definition: d3d12_common.h:830
static INLINE UINT D3D12GetRetrievalFilterStackSize(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1104
static INLINE ULONG D3D12ReleaseHeap(D3D12Heap heap)
Definition: d3d12_common.h:98
Definition: d3d12.h:2086
D3D12_TILE_RANGE_FLAGS
Definition: d3d12.h:2259
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6742
ID3D12Resource * D3D12Resource
Definition: d3d12_common.h:34
static INLINE HRESULT D3D12GetDeviceRemovedReason(D3D12Device device)
Definition: d3d12_common.h:846
#define ALIGN(x)
Definition: d3d12_common.h:1325
#define barrier()
Definition: internal_interface.hpp:494
interface ID3D12DebugDevice ID3D12DebugDevice
Definition: d3d12sdklayers.h:76
D3D12Resource vbo
Definition: d3d12_common.h:1391
static INLINE HRESULT D3D12GetRetrievalFilter(D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER *filter, SIZE_T *filter_byte_length)
Definition: d3d12_common.h:1078
ID3D12PipelineState * D3D12PipelineState
Definition: d3d12_common.h:37
static INLINE BOOL D3D12GetBreakOnID(D3D12InfoQueue info_queue, D3D12_MESSAGE_ID i_d)
Definition: d3d12_common.h:1147
static INLINE D3D12_CPU_DESCRIPTOR_HANDLE D3D12GetCPUDescriptorHandleForHeapStart(D3D12DescriptorHeap descriptor_heap)
Definition: d3d12_common.h:1239
static INLINE ULONG D3D12ReleaseDevice(D3D12Device device)
Definition: d3d12_common.h:637
int capacity
Definition: d3d12_common.h:1419
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:8390
Definition: d3d12_common.h:1291
static INLINE void D3D12SetDescriptorHeaps(D3D12GraphicsCommandList command_list, UINT num_descriptor_heaps, const D3D12DescriptorHeap *descriptor_heaps)
Definition: d3d12_common.h:1219
GLuint sampler
Definition: glext.h:7950
static INLINE UINT64 D3D12GetNumMessagesDiscardedByMessageCountLimit(D3D12InfoQueue info_queue)
Definition: d3d12_common.h:1030
Definition: video4linux2.c:51
D3D12_MESSAGE_SEVERITY
Definition: d3d12sdklayers.h:1115
interface ID3D12PipelineState ID3D12PipelineState
Definition: d3d12.h:125
D3D12PipelineState pipe_noblend
Definition: d3d12_common.h:1414
GLbitfield flags
Definition: glext.h:7828
D3D12_HEAP_TYPE
Definition: d3d12.h:2092
void d3d12_update_texture(int width, int height, int pitch, DXGI_FORMAT format, const void *data, d3d12_texture_t *texture)
Definition: d3d12_common.c:757
static INLINE void D3D12CreateUnorderedAccessView(D3D12Device device, void *resource, void *counter_resource, D3D12_UNORDERED_ACCESS_VIEW_DESC *desc, D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor)
Definition: d3d12_common.h:728
static INLINE HRESULT D3D12LoadComputePipeline(D3D12PipelineLibrary pipeline_library, LPCWSTR name, D3D12_COMPUTE_PIPELINE_STATE_DESC *desc, ID3D12PipelineState **out)
Definition: d3d12_common.h:920
D3D12_CPU_DESCRIPTOR_HANDLE rt_view
Definition: d3d12_common.h:1311
UINT64 D3D12_GPU_VIRTUAL_ADDRESS
Definition: d3d12.h:1012
static INLINE void D3D12CopyDescriptors(D3D12Device device, UINT num_dest_descriptor_ranges, D3D12_CPU_DESCRIPTOR_HANDLE *dest_descriptor_range_starts, UINT *dest_descriptor_range_sizes, UINT num_src_descriptor_ranges, D3D12_CPU_DESCRIPTOR_HANDLE *src_descriptor_range_starts, UINT *src_descriptor_range_sizes, D3D12_DESCRIPTOR_HEAP_TYPE descriptor_heaps_type)
Definition: d3d12_common.h:760
static INLINE void d3d12_set_texture_and_sampler(D3D12GraphicsCommandList cmd, const d3d12_texture_t *texture)
Definition: d3d12_common.h:1563
static INLINE ULONG D3D12ReleaseVersionedRootSignatureDeserializer(D3D12VersionedRootSignatureDeserializer versioned_root_signature_deserializer)
Definition: d3d12_common.h:74
DXGIFactory factory
Definition: d3d12_common.h:1349
ID3D12DebugCommandList * D3D12DebugCommandList
Definition: d3d12_common.h:49
unsigned cur_mon_id
Definition: d3d12_common.h:1345
RECT D3D12_RECT
Definition: d3d12.h:1116
UINT num_rows
Definition: d3d12_common.h:1313
static INLINE void D3D12SetComputeRoot32BitConstants(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, UINT num32_bit_values_to_set, void *src_data, UINT dest_offset_in32_bit_values)
Definition: d3d12_common.h:383
Definition: d3d12.h:2870
struct nk_device device
Definition: nk_common.c:44
IDXGISwapChain3 * DXGISwapChain
Definition: dxgi_common.h:282
pass_semantics_t semantics
Definition: d3d12_common.h:1445
Definition: d3d12_common.h:1477
unsigned int uint32_t
Definition: stdint.h:126
Definition: d3d12.h:3186
static INLINE BOOL D3D12GetBreakOnSeverity(D3D12InfoQueue info_queue, D3D12_MESSAGE_SEVERITY severity)
Definition: d3d12_common.h:1143
ID3D12GraphicsCommandList * D3D12GraphicsCommandList
Definition: d3d12_common.h:42
D3D12Resource menu_pipeline_vbo
Definition: d3d12_common.h:1468
static INLINE HRESULT D3D12GetHeapProperties(void *resource, D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS *heap_flags)
Definition: d3d12_common.h:144
static INLINE HRESULT D3D12CreateCommandAllocator(D3D12Device device, D3D12_COMMAND_LIST_TYPE type, ID3D12CommandAllocator **out)
Definition: d3d12_common.h:650
Definition: d3d12.h:2207
Definition: d3d12.h:1699
interface ID3D12DescriptorHeap ID3D12DescriptorHeap
Definition: d3d12.h:132
float y
Definition: d3d12_common.h:1277
static INLINE HRESULT D3D12SetDebugCommandListFeatureMask(D3D12DebugCommandList debug_command_list, D3D12_DEBUG_FEATURE mask)
Definition: d3d12_common.h:981
int offset
Definition: d3d12_common.h:1418
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
D3D12_TILE_COPY_FLAGS
Definition: d3d12.h:2299
D3D12_CPU_DESCRIPTOR_HANDLE cpu
Definition: d3d12_common.h:1295
static INLINE void D3D12SetGraphicsRootDescriptorTable(D3D12GraphicsCommandList graphics_command_list, UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
Definition: d3d12_common.h:357
Definition: d3d12_common.h:1486
D3D12CommandAllocator allocator
Definition: d3d12_common.h:1357
D3D12PipelineState mipmapgen_pipe
Definition: d3d12_common.h:1455
static INLINE HRESULT D3D12GetStorageFilter(D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER *filter, SIZE_T *filter_byte_length)
Definition: d3d12_common.h:1043
static INLINE ULONG D3D12ReleaseCommandQueue(D3D12CommandQueue command_queue)
Definition: d3d12_common.h:570
static INLINE HRESULT D3D12AddStorageFilterEntries(D3D12InfoQueue info_queue, D3D12_INFO_QUEUE_FILTER *filter)
Definition: d3d12_common.h:1039
uint8_t UINT8
Definition: coretypes.h:12