Module: Mesa Branch: main Commit: 470b8567a52f4581510e19643e8c26d8b7458bc3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=470b8567a52f4581510e19643e8c26d8b7458bc3
Author: Alejandro PiƱeiro <[email protected]> Date: Wed May 24 10:32:59 2023 +0200 broadcom/compiler: return NULL if we fail to register allocate Right now if we fail to register allocate, we return the qpu_insts that we had at that point, even if the driver can't really use it. Also v3dv_pipeline was already assuming that it would return NULL on failure, returning VK_ERROR_UNKNOWN on that case. This allows CTS tests with a lot of pressure, that regress now and then to not being able to allocate, to finish with an error, instead of blocking forever. For example: dEQP-VK.graphicsfuzz.spv-stable-maze-flatten-copy-composite Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23203> --- src/broadcom/compiler/vir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/broadcom/compiler/vir.c b/src/broadcom/compiler/vir.c index 5355645085d..0452cf4a8ad 100644 --- a/src/broadcom/compiler/vir.c +++ b/src/broadcom/compiler/vir.c @@ -1914,6 +1914,9 @@ uint64_t *v3d_compile(const struct v3d_compiler *compiler, fprintf(stderr, "Failed to compile %s prog %d/%d " "with any strategy.\n", vir_get_stage_name(c), c->program_id, c->variant_id); + + vir_compile_destroy(c); + return NULL; } struct v3d_prog_data *prog_data;
