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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user