anv/device: assert that commands submitted to a queue are not bogus

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>
This commit is contained in:
Iago Toral Quiroga
2017-03-09 10:44:13 +01:00
parent a752c4ecda
commit a578b06d7b

View 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)