summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-05-02 13:40:36 +1000
committerEmil Velikov <[email protected]>2017-05-10 11:25:33 +0100
commit9105e36765baaf242836da95d2e44bdc3ef04233 (patch)
tree1b453807e09a54391918fc56692567117bf597a8 /src
parente1678159b162fcb28b6611dade44b75b528197a2 (diff)
radv/wsi: report presentation error per image request
This ports 0fcb92c17dee681bd39c08ddf0abc358a27337c7 anv: wsi: report presentation error per image request This fixes: dEQP-VK.wsi.xlib.incremental_present.scale_none.* Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 09034aab64c7a6022a2c508658fead1442f08576)
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_wsi.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
index b8999f4eb02..3a8617fd8fa 100644
--- a/src/amd/vulkan/radv_wsi.c
+++ b/src/amd/vulkan/radv_wsi.c
@@ -460,16 +460,20 @@ VkResult radv_QueuePresentKHR(
RADV_FROM_HANDLE(wsi_swapchain, swapchain, pPresentInfo->pSwapchains[i]);
struct radeon_winsys_cs *cs;
const VkPresentRegionKHR *region = NULL;
+ VkResult item_result;
assert(radv_device_from_handle(swapchain->device) == queue->device);
if (swapchain->fences[0] == VK_NULL_HANDLE) {
- result = radv_CreateFence(radv_device_to_handle(queue->device),
+ item_result = radv_CreateFence(radv_device_to_handle(queue->device),
&(VkFenceCreateInfo) {
.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO,
.flags = 0,
}, &swapchain->alloc, &swapchain->fences[0]);
- if (result != VK_SUCCESS)
- return result;
+ if (pPresentInfo->pResults != NULL)
+ pPresentInfo->pResults[i] = item_result;
+ result = result == VK_SUCCESS ? item_result : result;
+ if (item_result != VK_SUCCESS)
+ continue;
} else {
radv_ResetFences(radv_device_to_handle(queue->device),
1, &swapchain->fences[0]);
@@ -493,12 +497,15 @@ VkResult radv_QueuePresentKHR(
if (regions && regions->pRegions)
region = &regions->pRegions[i];
- result = swapchain->queue_present(swapchain,
+ item_result = swapchain->queue_present(swapchain,
pPresentInfo->pImageIndices[i],
region);
/* TODO: What if one of them returns OUT_OF_DATE? */
- if (result != VK_SUCCESS)
- return result;
+ if (pPresentInfo->pResults != NULL)
+ pPresentInfo->pResults[i] = item_result;
+ result = result == VK_SUCCESS ? item_result : result;
+ if (item_result != VK_SUCCESS)
+ continue;
VkFence last = swapchain->fences[2];
swapchain->fences[2] = swapchain->fences[1];