diff options
author | Iago Toral Quiroga <[email protected]> | 2017-03-03 11:17:03 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2017-03-16 11:40:05 +0100 |
commit | 9e69409fcf16d8af58e2ba732e3cd78240a65317 (patch) | |
tree | 8479c633daa3aac247e273223e4b42e4277f2a91 /src/intel/vulkan | |
parent | a8ce8e35420e57b6921dfce8462a7caa512b797a (diff) |
anv: handle allocation failure in anv_batch_emit_batch()
v2:
- Call the error handler (Topi)
Fixes:
dEQP-VK.api.out_of_host_memory.cmd_execute_commands
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 3f6039e816b..40fc2f4f899 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -222,8 +222,13 @@ 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) { + anv_batch_set_error(batch, result); + return; + } + } assert(batch->next + size <= batch->end); |