Fixes:
dEQP-VK.api.out_of_host_memory.cmd_execute_commands
---
 src/intel/vulkan/anv_batch_chain.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_batch_chain.c 
b/src/intel/vulkan/anv_batch_chain.c
index 162ef2e..d0a1b03 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -227,8 +227,11 @@ anv_batch_emit_batch(struct anv_batch *batch, struct 
anv_batch *other)
    size = other->next - other->start;
    assert(size % 4 == 0);
 
-   if (batch->next + size > batch->end)
-      batch->extend_cb(batch, batch->user_data);
+   if (batch->next + size > batch->end) {
+      VkResult result = batch->extend_cb(batch, batch->user_data);
+      if (result != VK_SUCCESS)
+         return;
+   }
 
    assert(batch->next + size <= batch->end);
 
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to