radv: handle queue present directly to winsys
authorDave Airlie <airlied@redhat.com>
Fri, 23 Dec 2016 06:24:21 +0000 (06:24 +0000)
committerDave Airlie <airlied@redhat.com>
Mon, 26 Dec 2016 22:20:35 +0000 (22:20 +0000)
Don't call the QueueSubmit interface, just call direct to the
winsys, so we can pass the wait semaphores.

Noticed while debugging doom, doesn't fix anything.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_wsi.c

index 1f1ab1c800ba53d51073e42c519e1d7e7f4d2440..2eb8e458c782b9233cd62fcddbce22a10166e9de 100644 (file)
@@ -362,7 +362,15 @@ VkResult radv_QueuePresentKHR(
                                         1, &swapchain->fences[0]);
                }
 
-               radv_QueueSubmit(_queue, 0, NULL, swapchain->fences[0]);
+               RADV_FROM_HANDLE(radv_fence, fence, swapchain->fences[0]);
+               struct radeon_winsys_fence *base_fence = fence->fence;
+               struct radeon_winsys_ctx *ctx = queue->device->hw_ctx;
+               queue->device->ws->cs_submit(ctx, queue->queue_idx,
+                                            &queue->device->empty_cs[queue->queue_family_index],
+                                            1,
+                                            (struct radeon_winsys_sem **)pPresentInfo->pWaitSemaphores,
+                                            pPresentInfo->waitSemaphoreCount, NULL, 0, false, base_fence);
+               fence->submitted = true;
 
                result = swapchain->queue_present(swapchain,
                                                  pPresentInfo->pImageIndices[i]);