venus: use more common vk_queue related implementations
This change uses common impl for below: - GetDeviceQueue2 - DeviceWaitIdle Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25262>
This commit is contained in:
@@ -650,22 +650,6 @@ vn_GetDeviceGroupPeerMemoryFeatures(
|
||||
pPeerMemoryFeatures);
|
||||
}
|
||||
|
||||
VkResult
|
||||
vn_DeviceWaitIdle(VkDevice device)
|
||||
{
|
||||
VN_TRACE_FUNC();
|
||||
struct vn_device *dev = vn_device_from_handle(device);
|
||||
|
||||
for (uint32_t i = 0; i < dev->queue_count; i++) {
|
||||
struct vn_queue *queue = &dev->queues[i];
|
||||
VkResult result = vn_QueueWaitIdle(vn_queue_to_handle(queue));
|
||||
if (result != VK_SUCCESS)
|
||||
return vn_error(dev->instance, result);
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult
|
||||
vn_GetCalibratedTimestampsEXT(
|
||||
VkDevice device,
|
||||
|
||||
@@ -25,25 +25,6 @@
|
||||
|
||||
/* queue commands */
|
||||
|
||||
void
|
||||
vn_GetDeviceQueue2(VkDevice device,
|
||||
const VkDeviceQueueInfo2 *pQueueInfo,
|
||||
VkQueue *pQueue)
|
||||
{
|
||||
struct vn_device *dev = vn_device_from_handle(device);
|
||||
|
||||
for (uint32_t i = 0; i < dev->queue_count; i++) {
|
||||
struct vn_queue *queue = &dev->queues[i];
|
||||
if (queue->family == pQueueInfo->queueFamilyIndex &&
|
||||
queue->index == pQueueInfo->queueIndex &&
|
||||
queue->flags == pQueueInfo->flags) {
|
||||
*pQueue = vn_queue_to_handle(queue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
unreachable("bad queue family/index");
|
||||
}
|
||||
|
||||
static bool
|
||||
vn_semaphore_wait_external(struct vn_device *dev, struct vn_semaphore *sem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user