summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_cmd_buffer.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2017-03-06 11:12:31 +0100
committerIago Toral Quiroga <[email protected]>2017-03-16 11:40:05 +0100
commit18ec3fa2a996de8fcdbe3fbad717d8ba0b2e95f9 (patch)
tree8777b4e23dabba25b77cf3403af4c05ae3da156f /src/intel/vulkan/genX_cmd_buffer.c
parentfb9d563fb9b6e63a79dc4b8aa1faee58faec4f5a (diff)
anv/cmd_buffer: skip vkCmdDraw*() on broken command buffers
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 518c09313cf..2439591722a 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -1696,6 +1696,9 @@ void genX(CmdDraw)(
struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
const struct brw_vs_prog_data *vs_prog_data = get_vs_prog_data(pipeline);
+ if (anv_batch_has_error(&cmd_buffer->batch))
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
if (vs_prog_data->uses_basevertex || vs_prog_data->uses_baseinstance)
@@ -1726,6 +1729,9 @@ void genX(CmdDrawIndexed)(
struct anv_pipeline *pipeline = cmd_buffer->state.pipeline;
const struct brw_vs_prog_data *vs_prog_data = get_vs_prog_data(pipeline);
+ if (anv_batch_has_error(&cmd_buffer->batch))
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
if (vs_prog_data->uses_basevertex || vs_prog_data->uses_baseinstance)
@@ -1766,6 +1772,9 @@ void genX(CmdDrawIndirect)(
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
+ if (anv_batch_has_error(&cmd_buffer->batch))
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
if (vs_prog_data->uses_basevertex || vs_prog_data->uses_baseinstance)
@@ -1800,6 +1809,9 @@ void genX(CmdDrawIndexedIndirect)(
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
+ if (anv_batch_has_error(&cmd_buffer->batch))
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
/* TODO: We need to stomp base vertex to 0 somehow */