anv/device: assert that commands submitted to a queue are not bogus
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 9 Mar 2017 09:44:13 +0000 (10:44 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 16 Mar 2017 10:40:05 +0000 (11:40 +0100)
Any errors that may have happened during the command buffer recording are
reported by vkEndCommandBuffer() and it is the application's reponsibility
to not submit broken commands to a queue.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/vulkan/anv_device.c

index 253cd39d7fb644b10749e38aadef8ee5a1f19c09..014b2f7d9ccf9be47d1a3fd445d596aba5025d95 100644 (file)
@@ -1306,6 +1306,7 @@ VkResult anv_QueueSubmit(
          ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer,
                          pSubmits[i].pCommandBuffers[j]);
          assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
+         assert(!anv_batch_has_error(&cmd_buffer->batch));
 
          result = anv_cmd_buffer_execbuf(device, cmd_buffer);
          if (result != VK_SUCCESS)