[Mesa-dev] [PATCH 13/16] anv/cmd_buffer: skip vkCmdDraw*() on broken command buffers
Iago Toral Quiroga
itoral at igalia.com
Tue Mar 7 07:15:58 UTC 2017
---
src/intel/vulkan/genX_cmd_buffer.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index cbad144..c78855b 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -1664,6 +1664,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 (cmd_buffer->error_status != VK_SUCCESS)
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
if (vs_prog_data->uses_basevertex || vs_prog_data->uses_baseinstance)
@@ -1694,6 +1697,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 (cmd_buffer->error_status != VK_SUCCESS)
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
if (vs_prog_data->uses_basevertex || vs_prog_data->uses_baseinstance)
@@ -1734,6 +1740,9 @@ void genX(CmdDrawIndirect)(
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
+ if (cmd_buffer->error_status != VK_SUCCESS)
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
if (vs_prog_data->uses_basevertex || vs_prog_data->uses_baseinstance)
@@ -1768,6 +1777,9 @@ void genX(CmdDrawIndexedIndirect)(
struct anv_bo *bo = buffer->bo;
uint32_t bo_offset = buffer->offset + offset;
+ if (cmd_buffer->error_status != VK_SUCCESS)
+ return;
+
genX(cmd_buffer_flush_state)(cmd_buffer);
/* TODO: We need to stomp base vertex to 0 somehow */
--
2.7.4
More information about the mesa-dev
mailing list