mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 00:20:11 +01:00
pco/ra: abort if spilling fails
In release builds, the assertion checking whether spilling failed isn't evaluated, which can result in shader compilation continuing despite this. Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37872>
This commit is contained in:
parent
681c734804
commit
7b222d532b
1 changed files with 6 additions and 1 deletions
|
|
@ -28,6 +28,8 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/** Live range of an SSA variable. */
|
||||
struct live_range {
|
||||
|
|
@ -811,7 +813,10 @@ static bool pco_ra_func(pco_func *func, pco_ra_ctx *ctx)
|
|||
ra_set_node_spill_cost(ra_graph, u, (float)uses[u]);
|
||||
|
||||
unsigned spill_index = ra_get_best_spill_node(ra_graph);
|
||||
assert(spill_index != ~0 && "Failed to get best spill node.");
|
||||
if (spill_index == ~0) {
|
||||
fprintf(stderr, "FATAL: Failed to get best spill node.\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
spill(spill_index, func, ctx);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue