anv/trtt: check the return value of anv_trtt_init_context_state()

I haven't seen this happening anywhere, but let's have it for
correctness.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30252>
This commit is contained in:
Paulo Zanoni 2024-06-26 15:04:09 -07:00
parent fb9d94f4ed
commit abbb4b20f3

View file

@ -626,9 +626,11 @@ anv_sparse_bind_trtt(struct anv_device *device,
/* If the TRTT L3 table was never set, initialize it as part of this
* submission.
*/
if (!trtt->l3_addr)
anv_trtt_init_context_state(device, &submit->base);
if (!trtt->l3_addr) {
result = anv_trtt_init_context_state(device, &submit->base);
if (result != VK_SUCCESS)
goto error_add_bind;
}
assert(trtt->l3_addr);
/* These capacities are conservative estimations. For L1 binds the