anv/cmd_buffer: report tracked errors in vkEndCommandBuffer()
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 8 Mar 2017 12:16:16 +0000 (13:16 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 16 Mar 2017 10:40:05 +0000 (11:40 +0100)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/vulkan/genX_cmd_buffer.c

index 0e24000a5af35efb701d5280395d1a156331bfc0..1f4fe773a1123cd8df3e2acb75214b06faceb42d 100644 (file)
@@ -620,6 +620,9 @@ genX(EndCommandBuffer)(
 {
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
 
+   if (anv_batch_has_error(&cmd_buffer->batch))
+      return cmd_buffer->batch.status;
+
    /* We want every command buffer to start with the PMA fix in a known state,
     * so we disable it at the end of the command buffer.
     */