blorp: handle binding table & surface state allocation failures

The embedding driver could be failing the allocation for whatever
reason, in which case we should skip the surface state writes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25955>
This commit is contained in:
Lionel Landwerlin
2023-10-18 13:39:20 +03:00
committed by Marge Bot
parent 1cc26e8b66
commit f9753488ec
5 changed files with 19 additions and 9 deletions

View File

@@ -150,7 +150,7 @@ blorp_alloc_general_state(struct blorp_batch *blorp_batch,
return blorp_alloc_dynamic_state(blorp_batch, size, alignment, offset);
}
static void
static bool
blorp_alloc_binding_table(struct blorp_batch *blorp_batch,
unsigned num_entries,
unsigned state_size,
@@ -181,6 +181,8 @@ blorp_alloc_binding_table(struct blorp_batch *blorp_batch,
iris_use_pinned_bo(batch, binder->bo, false, IRIS_DOMAIN_NONE);
batch->screen->vtbl.update_binder_address(batch, binder);
return true;
}
static uint32_t