anv/cmd_buffer: skip vkCmdDispatch() on broken command buffers
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 6 Mar 2017 11:15:06 +0000 (12:15 +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 2439591722ae9254fdf31803730862de437735b1..89aeff2c9d6751163f7fd11ee0c1aa429c74d7fa 100644 (file)
@@ -1961,6 +1961,9 @@ void genX(CmdDispatch)(
    struct anv_pipeline *pipeline = cmd_buffer->state.compute_pipeline;
    const struct brw_cs_prog_data *prog_data = get_cs_prog_data(pipeline);
 
+   if (anv_batch_has_error(&cmd_buffer->batch))
+      return;
+
    if (prog_data->uses_num_work_groups) {
       struct anv_state state =
          anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, 12, 4);