diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2017-03-09 11:49:01 +0100 |
---|---|---|
committer | Iago Toral Quiroga <itoral@igalia.com> | 2017-03-16 11:40:05 +0100 |
commit | be52f9693acb6055f62548e838348c584bbd08d7 (patch) | |
tree | 88f9d3cd3bd1039d52b137435a5e7f9d2a6264b7 /src/intel/vulkan/genX_blorp_exec.c | |
parent | a578b06d7bd6d1bb075bc9b8b04af97118bee18f (diff) |
anv/blorp: make anv_cmd_buffer_alloc_blorp_binding_table() return a VkResult
Instead of asserting inside the function, and then use use that information
to return early from its callers upon failure.
v2:
- Make sure that clear_color_attachment() and
clear_depth_stencil_attachment() get the VkResult as well so they
avoid executing the batch if an error happened. (Topi)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/intel/vulkan/genX_blorp_exec.c')
-rw-r--r-- | src/intel/vulkan/genX_blorp_exec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_blorp_exec.c b/src/intel/vulkan/genX_blorp_exec.c index ba834d4c55f..86730e07def 100644 --- a/src/intel/vulkan/genX_blorp_exec.c +++ b/src/intel/vulkan/genX_blorp_exec.c @@ -89,9 +89,13 @@ blorp_alloc_binding_table(struct blorp_batch *batch, unsigned num_entries, struct anv_cmd_buffer *cmd_buffer = batch->driver_batch; uint32_t state_offset; - struct anv_state bt_state = + struct anv_state bt_state; + + VkResult result = anv_cmd_buffer_alloc_blorp_binding_table(cmd_buffer, num_entries, - &state_offset); + &state_offset, &bt_state); + if (result != VK_SUCCESS) + return; uint32_t *bt_map = bt_state.map; *bt_offset = bt_state.offset; |