<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 6, 2017 at 11:16 PM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 src/intel/vulkan/genX_cmd_<wbr>buffer.c | 7 +++++--<br>
 1 file changed, 5 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
index 8b752c4..23d7493 100644<br>
--- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
+++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
@@ -1112,7 +1112,7 @@ emit_binding_table(struct anv_cmd_buffer *cmd_buffer,<br>
    uint32_t *bt_map = bt_state->map;<br>
<br>
    if (bt_state->map == NULL)<br>
-      return VK_ERROR_OUT_OF_DEVICE_MEMORY;<br>
+      return cmd_buffer->error_status = VK_ERROR_OUT_OF_DEVICE_MEMORY;<br>
<br>
    if (stage == MESA_SHADER_COMPUTE &&<br>
        get_cs_prog_data(cmd_buffer-><wbr>state.compute_pipeline)->uses_<wbr>num_work_groups) {<br>
@@ -1295,7 +1295,7 @@ emit_samplers(struct anv_cmd_buffer *cmd_buffer,<br>
    *state = anv_cmd_buffer_alloc_dynamic_<wbr>state(cmd_buffer, size, 32);<br>
<br>
    if (state->map == NULL)<br>
-      return VK_ERROR_OUT_OF_DEVICE_MEMORY;<br>
+      return cmd_buffer->error_status = VK_ERROR_OUT_OF_DEVICE_MEMORY;<br>
<br>
    for (uint32_t s = 0; s < map->sampler_count; s++) {<br>
       struct anv_pipeline_binding *binding = &map->sampler_to_descriptor[s]<wbr>;<br>
@@ -1345,6 +1345,7 @@ flush_descriptor_sets(struct anv_cmd_buffer *cmd_buffer)<br>
    if (result != VK_SUCCESS) {<br>
       assert(result == VK_ERROR_OUT_OF_DEVICE_MEMORY)<wbr>;<br>
<br>
+      cmd_buffer->error_status = VK_SUCCESS;<br></blockquote><div><br></div><div>This doesn't seem right.  If we're setting it back to success in anywhere other than cmd_buffer_reset, we're doing our error handling wrong.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
       result = anv_cmd_buffer_new_binding_<wbr>table_block(cmd_buffer);<br>
       assert(result == VK_SUCCESS);<br>
<br>
@@ -1817,6 +1818,8 @@ flush_compute_descriptor_set(<wbr>struct anv_cmd_buffer *cmd_buffer)<br>
    result = emit_binding_table(cmd_buffer, MESA_SHADER_COMPUTE, &surfaces);<br>
    if (result != VK_SUCCESS) {<br>
       assert(result == VK_ERROR_OUT_OF_DEVICE_MEMORY)<wbr>;<br>
+<br>
+      cmd_buffer->error_status = VK_SUCCESS;<br>
       result = anv_cmd_buffer_new_binding_<wbr>table_block(cmd_buffer);<br>
       assert(result == VK_SUCCESS);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.7.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>