vk: Fix stale error handling in vkQueueSubmit
authorKristian Høgsberg <kristian.h.kristensen@intel.com>
Tue, 12 May 2015 21:38:58 +0000 (14:38 -0700)
committerKristian Høgsberg <kristian.h.kristensen@intel.com>
Tue, 12 May 2015 21:38:58 +0000 (14:38 -0700)
src/vulkan/device.c

index dcd0c380f6cc70b815a64bfa5732227c3e1f2275..45a2615160465df28dbf902d9f43f98fcad340cd 100644 (file)
@@ -579,7 +579,7 @@ VkResult VKAPI vkQueueSubmit(
       if (!device->no_hw) {
          ret = anv_gem_execbuffer(device, &cmd_buffer->execbuf);
          if (ret != 0)
-            goto fail;
+            return vk_error(VK_ERROR_UNKNOWN);
 
          for (uint32_t i = 0; i < cmd_buffer->bo_count; i++)
             cmd_buffer->exec2_bos[i]->offset = cmd_buffer->exec2_objects[i].offset;
@@ -589,11 +589,6 @@ VkResult VKAPI vkQueueSubmit(
    }
 
    return VK_SUCCESS;
-
- fail:
-   pthread_mutex_unlock(&device->mutex);
-
-   return vk_error(VK_ERROR_UNKNOWN);
 }
 
 VkResult VKAPI vkQueueAddMemReferences(