mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
libs/vkd3d: Export a function to get the Vulkan format from a DXGI format.
This commit is contained in:
parent
b760b52859
commit
6babf11214
@ -45,6 +45,7 @@ HRESULT vkd3d_create_device(const struct vkd3d_device_create_info *create_info,
|
||||
HRESULT vkd3d_create_image_resource(ID3D12Device *device, const D3D12_RESOURCE_DESC *desc,
|
||||
VkImage vk_image, ID3D12Resource **resource);
|
||||
VkDevice vkd3d_get_vk_device(ID3D12Device *device);
|
||||
VkFormat vkd3d_get_vk_format(DXGI_FORMAT format);
|
||||
VkInstance vkd3d_get_vk_instance(ID3D12Device *device);
|
||||
VkPhysicalDevice vkd3d_get_vk_physical_device(ID3D12Device *device);
|
||||
VkQueue vkd3d_get_vk_queue(ID3D12CommandQueue *queue);
|
||||
|
@ -47,6 +47,16 @@ const struct vkd3d_format *vkd3d_get_format(DXGI_FORMAT dxgi_format)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VkFormat vkd3d_get_vk_format(DXGI_FORMAT format)
|
||||
{
|
||||
const struct vkd3d_format *vkd3d_format;
|
||||
|
||||
if (!(vkd3d_format = vkd3d_get_format(format)))
|
||||
return VK_FORMAT_UNDEFINED;
|
||||
|
||||
return vkd3d_format->vk_format;
|
||||
}
|
||||
|
||||
bool vkd3d_array_reserve(void **elements, size_t *capacity, size_t element_count, size_t element_size)
|
||||
{
|
||||
size_t new_capacity, max_capacity;
|
||||
|
Loading…
Reference in New Issue
Block a user