radv: check the return values of radv_signal_fence()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 21 Jun 2018 12:39:29 +0000 (14:39 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 22 Jun 2018 15:47:09 +0000 (17:47 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c

index 3c63d8c86d6e5107ec3faa09a95a0fd201cfa13f..681d8a12c75a9d061f5178ced47599e85e5dd7e7 100644 (file)
@@ -2615,7 +2615,9 @@ VkResult radv_QueueSubmit(
 
        if (fence) {
                if (!fence_emitted) {
-                       radv_signal_fence(queue, fence);
+                       result = radv_signal_fence(queue, fence);
+                       if (result != VK_SUCCESS)
+                               return result;
                }
                fence->submitted = true;
        }
@@ -3172,6 +3174,7 @@ radv_sparse_image_opaque_bind_memory(struct radv_device *device,
        RADV_FROM_HANDLE(radv_queue, queue, _queue);
        struct radeon_winsys_fence *base_fence = fence ? fence->fence : NULL;
        bool fence_emitted = false;
+       VkResult result;
 
        for (uint32_t i = 0; i < bindInfoCount; ++i) {
                struct radv_winsys_sem_info sem_info;
@@ -3213,7 +3216,9 @@ radv_sparse_image_opaque_bind_memory(struct radv_device *device,
 
        if (fence) {
                if (!fence_emitted) {
-                       radv_signal_fence(queue, fence);
+                       result = radv_signal_fence(queue, fence);
+                       if (result != VK_SUCCESS)
+                               return result;
                }
                fence->submitted = true;
        }