diff options
author | Iago Toral Quiroga <[email protected]> | 2017-03-03 10:56:33 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2017-03-16 11:40:05 +0100 |
commit | 31f5049ff1c851d1b8652c7cb42740a6a7db58de (patch) | |
tree | 5c13a0bb26709ffa9748d523b6f1a67bb46c697d /src/intel/vulkan | |
parent | 9e69409fcf16d8af58e2ba732e3cd78240a65317 (diff) |
anv: handle allocation failure in anv_batch_emit_dwords()
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_batch_chain.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 40fc2f4f899..c304d6dc6a5 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -195,8 +195,13 @@ anv_reloc_list_append(struct anv_reloc_list *list, void * anv_batch_emit_dwords(struct anv_batch *batch, int num_dwords) { - if (batch->next + num_dwords * 4 > batch->end) - batch->extend_cb(batch, batch->user_data); + if (batch->next + num_dwords * 4 > batch->end) { + VkResult result = batch->extend_cb(batch, batch->user_data); + if (result != VK_SUCCESS) { + anv_batch_set_error(batch, result); + return NULL; + } + } void *p = batch->next; |