mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Export a function to get the Vulkan queue family index from a d3d12 command queue.
This commit is contained in:
parent
f34b9f9347
commit
c79584ed92
@ -47,6 +47,7 @@ HRESULT vkd3d_create_image_resource(ID3D12Device *device, const D3D12_RESOURCE_D
|
|||||||
VkDevice vkd3d_get_vk_device(ID3D12Device *device);
|
VkDevice vkd3d_get_vk_device(ID3D12Device *device);
|
||||||
VkInstance vkd3d_get_vk_instance(ID3D12Device *device);
|
VkInstance vkd3d_get_vk_instance(ID3D12Device *device);
|
||||||
VkQueue vkd3d_get_vk_queue(ID3D12CommandQueue *queue);
|
VkQueue vkd3d_get_vk_queue(ID3D12CommandQueue *queue);
|
||||||
|
uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -2783,6 +2783,7 @@ static HRESULT d3d12_command_queue_init(struct d3d12_command_queue *queue,
|
|||||||
|
|
||||||
/* FIXME: Access to VkQueue must be externally synchronized. */
|
/* FIXME: Access to VkQueue must be externally synchronized. */
|
||||||
VK_CALL(vkGetDeviceQueue(device->vk_device, queue_family_index, 0, &queue->vk_queue));
|
VK_CALL(vkGetDeviceQueue(device->vk_device, queue_family_index, 0, &queue->vk_queue));
|
||||||
|
queue->vk_queue_family_index = queue_family_index;
|
||||||
|
|
||||||
queue->device = device;
|
queue->device = device;
|
||||||
ID3D12Device_AddRef(&device->ID3D12Device_iface);
|
ID3D12Device_AddRef(&device->ID3D12Device_iface);
|
||||||
@ -2818,3 +2819,10 @@ VkQueue vkd3d_get_vk_queue(ID3D12CommandQueue *queue)
|
|||||||
|
|
||||||
return d3d12_queue->vk_queue;
|
return d3d12_queue->vk_queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t vkd3d_get_vk_queue_family_index(ID3D12CommandQueue *queue)
|
||||||
|
{
|
||||||
|
struct d3d12_command_queue *d3d12_queue = impl_from_ID3D12CommandQueue(queue);
|
||||||
|
|
||||||
|
return d3d12_queue->vk_queue_family_index;
|
||||||
|
}
|
||||||
|
@ -328,6 +328,7 @@ struct d3d12_command_queue
|
|||||||
D3D12_COMMAND_QUEUE_DESC desc;
|
D3D12_COMMAND_QUEUE_DESC desc;
|
||||||
|
|
||||||
VkQueue vk_queue;
|
VkQueue vk_queue;
|
||||||
|
uint32_t vk_queue_family_index;
|
||||||
|
|
||||||
struct d3d12_device *device;
|
struct d3d12_device *device;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user