Mesa (master): anv/batch_chain: Handle another OOM in cmd_buffer_execbuf

Jason Ekstrand jekstrand at kemper.freedesktop.org
Wed Mar 29 16:39:54 UTC 2017


Module: Mesa
Branch: master
Commit: 9aba81b1609c6f7b61125ca915291c83a511d5bd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9aba81b1609c6f7b61125ca915291c83a511d5bd

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Tue Mar 28 17:33:06 2017 -0700

anv/batch_chain: Handle another OOM in cmd_buffer_execbuf

Found by inspection while rebasing other patches.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

---

 src/intel/vulkan/anv_batch_chain.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 5d7abc68b3..5a6c0ba1a9 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -1277,8 +1277,10 @@ anv_cmd_buffer_execbuf(struct anv_device *device,
       adjust_relocations_to_state_pool(ss_pool, &(*bbo)->bo, &(*bbo)->relocs,
                                        cmd_buffer->last_ss_pool_center);
 
-      anv_execbuf_add_bo(&execbuf, &(*bbo)->bo, &(*bbo)->relocs,
-                         &cmd_buffer->pool->alloc);
+      result = anv_execbuf_add_bo(&execbuf, &(*bbo)->bo, &(*bbo)->relocs,
+                                  &cmd_buffer->pool->alloc);
+      if (result != VK_SUCCESS)
+         return result;
    }
 
    /* Now that we've adjusted all of the surface state relocations, we need to




More information about the mesa-commit mailing list