r600/sb: fall back to unoptimized shader if RA fails

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17755>
This commit is contained in:
Gert Wollny 2022-07-26 12:18:07 +02:00 committed by Marge Bot
parent 1c06565026
commit bbe8400949
2 changed files with 8 additions and 6 deletions

View File

@ -273,7 +273,7 @@ void coalescer::build_constraint_queue() {
} }
} }
void coalescer::color_chunks() { int coalescer::color_chunks() {
for (chunk_queue::iterator I = chunks.begin(), E = chunks.end(); for (chunk_queue::iterator I = chunks.begin(), E = chunks.end();
I != E; ++I) { I != E; ++I) {
@ -333,9 +333,13 @@ void coalescer::color_chunks() {
++pass; ++pass;
} }
assert(color); if (!color) {
fprintf(stderr, "r600/SB: unable to color registers\n");
return -1;
}
color_chunk(c, color); color_chunk(c, color);
} }
return 0;
} }
void coalescer::init_reg_bitset(sb_bitset &bs, val_set &vs) { void coalescer::init_reg_bitset(sb_bitset &bs, val_set &vs) {
@ -431,9 +435,7 @@ int coalescer::run() {
return r; return r;
build_chunk_queue(); build_chunk_queue();
color_chunks(); return color_chunks();
return 0;
} }
void coalescer::color_phi_constraint(ra_constraint* c) { void coalescer::color_phi_constraint(ra_constraint* c) {

View File

@ -209,7 +209,7 @@ public:
void build_constraint_queue(); void build_constraint_queue();
void build_chunk_queue(); void build_chunk_queue();
int color_constraints(); int color_constraints();
void color_chunks(); int color_chunks();
ra_constraint* create_constraint(constraint_kind kind); ra_constraint* create_constraint(constraint_kind kind);