|
ReactOS 0.4.17-dev-923-g4c9a150
|


Go to the source code of this file.
Classes | |
| struct | vkd3d_instance_create_info |
| struct | vkd3d_optional_instance_extensions_info |
| struct | vkd3d_application_info |
| struct | vkd3d_host_time_domain_info |
| struct | vkd3d_device_create_info |
| struct | vkd3d_optional_device_extensions_info |
| struct | vkd3d_image_resource_create_info |
Macros | |
| #define | VKD3D_RESOURCE_INITIAL_STATE_TRANSITION 0x00000001 |
| #define | VKD3D_RESOURCE_PRESENT_STATE_TRANSITION 0x00000002 |
| #define | VKD3D_API VKD3D_IMPORT |
This file contains definitions for the vkd3d library.
The vkd3d library is a 3D graphics library built on top of Vulkan. It has an API very similar, but not identical, to Direct3D 12.
Definition in file vkd3d.h.
| #define VKD3D_API VKD3D_IMPORT |
| #define VKD3D_RESOURCE_INITIAL_STATE_TRANSITION 0x00000001 |
When specified as a flag of vkd3d_image_resource_create_info, it means that vkd3d will do the initial transition operation on the image from VK_IMAGE_LAYOUT_UNDEFINED to its appropriate Vulkan layout (depending on its D3D12 resource state). If this flag is not specified the caller is responsible for transitioning the Vulkan image to the appropriate layout.
| #define VKD3D_RESOURCE_PRESENT_STATE_TRANSITION 0x00000002 |
When specified as a flag of vkd3d_image_resource_create_info, it means that field present_state is honored.
| typedef VkQueue(* PFN_vkd3d_acquire_vk_queue) (ID3D12CommandQueue *queue) |
| typedef HRESULT(* PFN_vkd3d_create_image_resource) (ID3D12Device *device, const struct vkd3d_image_resource_create_info *create_info, ID3D12Resource **resource) |
| typedef HRESULT(* PFN_vkd3d_create_instance) (const struct vkd3d_instance_create_info *create_info, struct vkd3d_instance **instance) |
| typedef void *(* PFN_vkd3d_create_thread) (PFN_vkd3d_thread thread_main, void *data) |
| typedef IUnknown *(* PFN_vkd3d_get_device_parent) (ID3D12Device *device) |
| typedef DXGI_FORMAT(* PFN_vkd3d_get_dxgi_format) (VkFormat format) |
| typedef VkDevice(* PFN_vkd3d_get_vk_device) (ID3D12Device *device) |
| typedef VkFormat(* PFN_vkd3d_get_vk_format) (DXGI_FORMAT format) |
| typedef VkPhysicalDevice(* PFN_vkd3d_get_vk_physical_device) (ID3D12Device *device) |
| typedef ULONG(* PFN_vkd3d_instance_decref) (struct vkd3d_instance *instance) |
| typedef struct vkd3d_instance *(* PFN_vkd3d_instance_from_device) (ID3D12Device *device) |
| typedef VkInstance(* PFN_vkd3d_instance_get_vk_instance) (struct vkd3d_instance *instance) |
| typedef ULONG(* PFN_vkd3d_instance_incref) (struct vkd3d_instance *instance) |
| typedef ULONG(* PFN_vkd3d_resource_decref) (ID3D12Resource *resource) |
| typedef ULONG(* PFN_vkd3d_resource_incref) (ID3D12Resource *resource) |
| typedef HRESULT(* PFN_vkd3d_serialize_root_signature) (const D3D12_ROOT_SIGNATURE_DESC *desc, D3D_ROOT_SIGNATURE_VERSION version, ID3DBlob **blob, ID3DBlob **error_blob) |
| typedef void(* PFN_vkd3d_set_log_callback) (PFN_vkd3d_log callback) |
The type of a chained structure.
| Enumerator | |
|---|---|
| VKD3D_STRUCTURE_TYPE_INSTANCE_CREATE_INFO | The structure is a vkd3d_instance_create_info structure. |
| VKD3D_STRUCTURE_TYPE_DEVICE_CREATE_INFO | The structure is a vkd3d_device_create_info structure. |
| VKD3D_STRUCTURE_TYPE_IMAGE_RESOURCE_CREATE_INFO | The structure is a vkd3d_image_resource_create_info structure. |
| VKD3D_STRUCTURE_TYPE_OPTIONAL_INSTANCE_EXTENSIONS_INFO | The structure is a vkd3d_optional_instance_extensions_info structure.
|
| VKD3D_STRUCTURE_TYPE_OPTIONAL_DEVICE_EXTENSIONS_INFO | The structure is a vkd3d_optional_device_extensions_info structure.
|
| VKD3D_STRUCTURE_TYPE_APPLICATION_INFO | The structure is a vkd3d_application_info structure.
|
| VKD3D_STRUCTURE_TYPE_HOST_TIME_DOMAIN_INFO | The structure is a vkd3d_host_time_domain_info structure.
|
| VKD3D_FORCE_32_BIT_ENUM | |
Definition at line 50 of file vkd3d.h.
| VKD3D_API VkQueue vkd3d_acquire_vk_queue | ( | ID3D12CommandQueue * | queue | ) |
Acquire the Vulkan queue backing a command queue.
While a queue is acquired by the client, it is locked so that neither the vkd3d library nor other threads can submit work to it. For that reason it should be released as soon as possible with vkd3d_release_vk_queue(). The lock is not reentrant, so the same queue must not be acquired more than once by the same thread.
Work submitted through the Direct3D 12 API exposed by vkd3d is not always immediately submitted to the Vulkan queue; sometimes it is kept in another internal queue, which might not necessarily be empty at the time vkd3d_acquire_vk_queue() is called. For this reason, work submitted directly to the Vulkan queue might appear to the Vulkan driver as being submitted before other work submitted though the Direct3D 12 API. If this is not desired, it is recommended to synchronize work submission using an ID3D12Fence object, by submitting to the queue a signal operation after all the Direct3D 12 work is submitted and waiting for it before calling vkd3d_acquire_vk_queue().
Definition at line 7493 of file command.c.
Referenced by d3d12_swapchain_destroy_vulkan_resources(), and d3d12_swapchain_queue_present().
| VKD3D_API HRESULT vkd3d_create_device | ( | const struct vkd3d_device_create_info * | create_info, |
| REFIID | iid, | ||
| void ** | device | ||
| ) |
Definition at line 23 of file vkd3d_main.c.
Referenced by D3D12CreateDevice().
| VKD3D_API HRESULT vkd3d_create_image_resource | ( | ID3D12Device * | device, |
| const struct vkd3d_image_resource_create_info * | create_info, | ||
| ID3D12Resource ** | resource | ||
| ) |
Definition at line 2264 of file resource.c.
Referenced by d3d12_swapchain_create_image_resources().
| VKD3D_API HRESULT vkd3d_create_instance | ( | const struct vkd3d_instance_create_info * | create_info, |
| struct vkd3d_instance ** | instance | ||
| ) |
Definition at line 734 of file device.c.
Referenced by D3D12CreateDevice(), and vkd3d_create_device().
| VKD3D_API HRESULT vkd3d_create_root_signature_deserializer | ( | const void * | data, |
| SIZE_T | data_size, | ||
| REFIID | iid, | ||
| void ** | deserializer | ||
| ) |
Definition at line 218 of file vkd3d_main.c.
Referenced by D3D12CreateRootSignatureDeserializer().
| VKD3D_API HRESULT vkd3d_create_versioned_root_signature_deserializer | ( | const void * | data, |
| SIZE_T | data_size, | ||
| REFIID | iid, | ||
| void ** | deserializer | ||
| ) |
Definition at line 402 of file vkd3d_main.c.
Referenced by D3D12CreateVersionedRootSignatureDeserializer().
| VKD3D_API IUnknown * vkd3d_get_device_parent | ( | ID3D12Device * | device | ) |
Definition at line 5694 of file device.c.
Referenced by d3d12_swapchain_GetContainingOutput().
| VKD3D_API DXGI_FORMAT vkd3d_get_dxgi_format | ( | VkFormat | format | ) |
Definition at line 530 of file utils.c.
| VKD3D_API VkDevice vkd3d_get_vk_device | ( | ID3D12Device * | device | ) |
| VKD3D_API VkFormat vkd3d_get_vk_format | ( | DXGI_FORMAT | format | ) |
Definition at line 520 of file utils.c.
Referenced by d3d12_swapchain_create_d3d12_resources(), select_vk_format(), and vkd3d_init_format_compatibility_lists().
| VKD3D_API VkPhysicalDevice vkd3d_get_vk_physical_device | ( | ID3D12Device * | device | ) |
Definition at line 7486 of file command.c.
Referenced by d3d12_swapchain_create_command_buffers(), and d3d12_swapchain_init().
| VKD3D_API ULONG vkd3d_instance_decref | ( | struct vkd3d_instance * | instance | ) |
Definition at line 791 of file device.c.
Referenced by d3d12_device_init(), d3d12_device_Release(), D3D12CreateDevice(), and vkd3d_create_device().
| VKD3D_API struct vkd3d_instance * vkd3d_instance_from_device | ( | ID3D12Device * | device | ) |
| VKD3D_API VkInstance vkd3d_instance_get_vk_instance | ( | struct vkd3d_instance * | instance | ) |
Definition at line 803 of file device.c.
Referenced by d3d12_get_vk_physical_device(), and d3d12_swapchain_init().
| VKD3D_API ULONG vkd3d_instance_incref | ( | struct vkd3d_instance * | instance | ) |
Definition at line 782 of file device.c.
Referenced by d3d12_device_init(), and vkd3d_create_device().
Release the Vulkan queue backing a command queue.
This must be paired to an earlier corresponding vkd3d_acquire_vk_queue(). After this function is called, the Vulkan queue returned by vkd3d_acquire_vk_queue() must not be used any more.
Definition at line 7506 of file command.c.
Referenced by d3d12_swapchain_destroy_vulkan_resources(), and d3d12_swapchain_queue_present().
| VKD3D_API ULONG vkd3d_resource_decref | ( | ID3D12Resource * | resource | ) |
Definition at line 2323 of file resource.c.
Referenced by d3d12_swapchain_destroy_d3d12_resources().
| VKD3D_API ULONG vkd3d_resource_incref | ( | ID3D12Resource * | resource | ) |
Definition at line 2317 of file resource.c.
Referenced by d3d12_swapchain_create_image_resources().
| VKD3D_API HRESULT vkd3d_serialize_root_signature | ( | const D3D12_ROOT_SIGNATURE_DESC * | desc, |
| D3D_ROOT_SIGNATURE_VERSION | version, | ||
| ID3DBlob ** | blob, | ||
| ID3DBlob ** | error_blob | ||
| ) |
Definition at line 426 of file vkd3d_main.c.
Referenced by D3D12SerializeRootSignature().
| VKD3D_API HRESULT vkd3d_serialize_versioned_root_signature | ( | const D3D12_VERSIONED_ROOT_SIGNATURE_DESC * | desc, |
| ID3DBlob ** | blob, | ||
| ID3DBlob ** | error_blob | ||
| ) |
Definition at line 473 of file vkd3d_main.c.
Referenced by D3D12SerializeVersionedRootSignature().
| VKD3D_API void vkd3d_set_log_callback | ( | PFN_vkd3d_log | callback | ) |
Set a callback to be called when vkd3d outputs debug logging.
If NULL, or if this function has not been called, libvkd3d will print all enabled log output to stderr.
Calling this function will also set the log callback for libvkd3d-shader.
| callback | Callback function to set. |
Definition at line 513 of file vkd3d_main.c.
Referenced by wined3d_dll_init().