r300: Demote a compiler assert(0) to a compile failure.

This triggers in shader-db and doesn't have an obvious fix.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14938>
This commit is contained in:
Emma Anholt 2022-02-05 22:45:06 -08:00
parent 97d13b2deb
commit 4968f8c066
1 changed files with 3 additions and 2 deletions

View File

@ -753,6 +753,7 @@ static void presub_nop(struct rc_instruction * emitted) {
}
static void rgb_to_alpha_remap (
struct schedule_state * s,
struct rc_instruction * inst,
struct rc_pair_instruction_arg * arg,
rc_register_file old_file,
@ -772,7 +773,7 @@ static void rgb_to_alpha_remap (
/* This conversion is not possible, we must have made a mistake in
* is_rgb_to_alpha_possible. */
if (new_src_index < 0) {
assert(0);
rc_error(s->C, "rgb_to_alpha_remap failed to allocate src.\n");
return;
}
@ -965,7 +966,7 @@ static int convert_rgb_to_alpha(
for(i = 0; i < sched_inst->GlobalReaders.ReaderCount; i++) {
struct rc_reader reader = sched_inst->GlobalReaders.Readers[i];
rgb_to_alpha_remap(reader.Inst, reader.U.P.Arg,
rgb_to_alpha_remap(s, reader.Inst, reader.U.P.Arg,
RC_FILE_TEMPORARY, old_swz, new_index);
}
return 1;