mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
anv: handle allocation failure in anv_batch_emit_dwords()
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
parent
9e69409fcf
commit
31f5049ff1
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue