diff --git a/src/imagination/rogue/passes/rogue_schedule_instr_groups.c b/src/imagination/rogue/passes/rogue_schedule_instr_groups.c index 200542ce394..fe06b5bb9d5 100644 --- a/src/imagination/rogue/passes/rogue_schedule_instr_groups.c +++ b/src/imagination/rogue/passes/rogue_schedule_instr_groups.c @@ -146,7 +146,7 @@ static void rogue_lower_instr_group_io(rogue_instr *instr, break; default: - unreachable("Invalid instruction group type."); + unreachable("Unsupported instruction group type."); } } @@ -350,7 +350,7 @@ static void rogue_calc_srcs_size(rogue_instr_group *group, bool upper_srcs) break; default: - unreachable("IS0 set to invalid value."); + unreachable("IS0 set to unsupported value."); } } } @@ -438,7 +438,7 @@ static void rogue_calc_alu_instrs_size(rogue_instr_group *group, break; default: - unreachable("Invalid alu op."); + unreachable("Unsupported alu op."); } } #undef OM @@ -466,7 +466,7 @@ static void rogue_calc_backend_instrs_size(rogue_instr_group *group, break; default: - unreachable("Invalid backend op."); + unreachable("Unsupported backend op."); } } @@ -484,7 +484,7 @@ static void rogue_calc_ctrl_instrs_size(rogue_instr_group *group, break; default: - unreachable("Invalid ctrl op."); + unreachable("Unsupported ctrl op."); } } @@ -509,7 +509,7 @@ static void rogue_calc_instrs_size(rogue_instr_group *group) break; default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } group->size.total += group->size.instrs[p]; @@ -619,7 +619,7 @@ bool rogue_schedule_instr_groups(rogue_shader *shader, bool multi_instr_groups) break; default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } rogue_instr_group *group = rogue_instr_group_create(block, group_alu); diff --git a/src/imagination/rogue/rogue.c b/src/imagination/rogue/rogue.c index 7d062baf724..ddb8f88040f 100644 --- a/src/imagination/rogue/rogue.c +++ b/src/imagination/rogue/rogue.c @@ -659,7 +659,7 @@ void rogue_link_instr_write(rogue_instr *instr) rogue_regarray *regarray = alu->dst[i].ref.regarray; rogue_link_instr_write_regarray(instr, writearray, regarray, 0); } else { - unreachable("Invalid destination reference type."); + unreachable("Unsupported destination reference type."); } } @@ -680,7 +680,7 @@ void rogue_link_instr_write(rogue_instr *instr) rogue_regarray *regarray = backend->dst[i].ref.regarray; rogue_link_instr_write_regarray(instr, writearray, regarray, i); } else { - unreachable("Invalid destination reference type."); + unreachable("Unsupported destination reference type."); } } @@ -701,7 +701,7 @@ void rogue_link_instr_write(rogue_instr *instr) rogue_regarray *regarray = ctrl->dst[i].ref.regarray; rogue_link_instr_write_regarray(instr, writearray, regarray, i); } else { - unreachable("Invalid destination reference type."); + unreachable("Unsupported destination reference type."); } } @@ -709,7 +709,7 @@ void rogue_link_instr_write(rogue_instr *instr) } default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } } @@ -803,7 +803,7 @@ void rogue_link_instr_use(rogue_instr *instr) } default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } } @@ -829,7 +829,7 @@ void rogue_unlink_instr_write(rogue_instr *instr) struct util_dynarray **writearray = &alu->dst_write[i].regarray; rogue_unlink_instr_write_regarray(instr, writearray); } else { - unreachable("Invalid destination reference type."); + unreachable("Unsupported destination reference type."); } } @@ -848,7 +848,7 @@ void rogue_unlink_instr_write(rogue_instr *instr) struct util_dynarray **writearray = &backend->dst_write[i].regarray; rogue_unlink_instr_write_regarray(instr, writearray); } else { - unreachable("Invalid destination reference type."); + unreachable("Unsupported destination reference type."); } } @@ -867,7 +867,7 @@ void rogue_unlink_instr_write(rogue_instr *instr) struct util_dynarray **writearray = &ctrl->dst_write[i].regarray; rogue_unlink_instr_write_regarray(instr, writearray); } else { - unreachable("Invalid destination reference type."); + unreachable("Unsupported destination reference type."); } } @@ -875,7 +875,7 @@ void rogue_unlink_instr_write(rogue_instr *instr) } default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } } @@ -959,7 +959,7 @@ void rogue_unlink_instr_use(rogue_instr *instr) } default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } } diff --git a/src/imagination/rogue/rogue.h b/src/imagination/rogue/rogue.h index f3ca828fea5..5ca20420111 100644 --- a/src/imagination/rogue/rogue.h +++ b/src/imagination/rogue/rogue.h @@ -30,8 +30,6 @@ * \brief Main header. */ -/* TODO NEXT: In "unreachable"s, replace "invalid" with "unsupported". */ - #include "compiler/nir/nir.h" #include "compiler/shader_enums.h" #include "compiler/spirv/nir_spirv.h" @@ -1565,7 +1563,7 @@ rogue_instr_group_io_sel_ref(rogue_instr_group_io_sel *map, enum rogue_io io) return &map->dsts[io - ROGUE_IO_W0]; else if (rogue_io_is_iss(io)) return &map->iss[io - ROGUE_IO_IS0]; - unreachable("Invalid io."); + unreachable("Unsupported io."); } /** Rogue instruction group. */ @@ -2249,7 +2247,7 @@ static inline unsigned rogue_instr_supported_phases(const rogue_instr *instr) } default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } return supported_phases; diff --git a/src/imagination/rogue/rogue_build_data.c b/src/imagination/rogue/rogue_build_data.c index ae403472ae4..c615f77967a 100644 --- a/src/imagination/rogue/rogue_build_data.c +++ b/src/imagination/rogue/rogue_build_data.c @@ -337,7 +337,7 @@ static void collect_io_data_vs(struct rogue_common_build_data *common_data, /* Process outputs. */ /* We should always have at least a position variable. */ - assert(num_outputs > 0 && "Invalid number of vertex shader outputs."); + assert(num_outputs > 0 && "Unsupported number of vertex shader outputs."); nir_foreach_shader_out_variable (var, nir) { unsigned components = glsl_get_components(var->type); diff --git a/src/imagination/rogue/rogue_encode.c b/src/imagination/rogue/rogue_encode.c index 17f781a87b0..383d0911dbb 100644 --- a/src/imagination/rogue/rogue_encode.c +++ b/src/imagination/rogue/rogue_encode.c @@ -64,7 +64,7 @@ static unsigned rogue_calc_da(const rogue_instr_group *group) } } else { - unreachable("Invalid instruction group ALU."); + unreachable("Unsupported instruction group ALU."); } return da; @@ -107,7 +107,7 @@ static void rogue_encode_instr_group_header(rogue_instr_group *group, break; default: - unreachable("Invalid condition code."); + unreachable("Unsupported condition code."); } h.cc = cc.cc; @@ -159,12 +159,12 @@ static void rogue_encode_instr_group_header(rogue_instr_group *group, break; default: - unreachable("Invalid ctrl op."); + unreachable("Unsupported ctrl op."); } break; default: - unreachable("Invalid instruction group ALU."); + unreachable("Unsupported instruction group ALU."); } if (group->header.alu != ROGUE_ALU_CONTROL) { @@ -256,7 +256,7 @@ static void rogue_encode_alu_instr(const rogue_alu_instr *alu, break; default: - unreachable("Invalid alu op."); + unreachable("Unsupported alu op."); } } #undef OM @@ -313,7 +313,7 @@ static void rogue_encode_backend_instr(const rogue_backend_instr *backend, break; default: - unreachable("Invalid backend op."); + unreachable("Unsupported backend op."); } } #undef OM @@ -329,7 +329,7 @@ static void rogue_encode_ctrl_instr(const rogue_ctrl_instr *ctrl, break; default: - unreachable("Invalid ctrl op."); + unreachable("Unsupported ctrl op."); } } @@ -367,7 +367,7 @@ static void rogue_encode_instr_group_instrs(rogue_instr_group *group, break; default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } util_dynarray_append_mem(binary, group->size.instrs[p], &instr_encoding); @@ -410,7 +410,7 @@ static void rogue_encode_source_map(const rogue_instr_group *group, break; default: - unreachable("IS0 set to invalid value."); + unreachable("IS0 set to unsupported value."); } } @@ -466,7 +466,7 @@ static void rogue_encode_source_map(const rogue_instr_group *group, break; default: - unreachable("Invalid source/bytes combination."); + unreachable("Unsupported source/bytes combination."); } break; @@ -507,7 +507,7 @@ static void rogue_encode_source_map(const rogue_instr_group *group, break; default: - unreachable("Invalid source/bytes combination."); + unreachable("Unsupported source/bytes combination."); } break; @@ -560,12 +560,12 @@ static void rogue_encode_source_map(const rogue_instr_group *group, break; default: - unreachable("Invalid source/bytes combination."); + unreachable("Unsupported source/bytes combination."); } break; default: - unreachable("Invalid source/bytes combination."); + unreachable("Unsupported source/bytes combination."); } } @@ -604,7 +604,7 @@ static void rogue_encode_dest_map(const rogue_instr_group *group, break; default: - unreachable("Invalid dest/bytes combination."); + unreachable("Unsupported dest/bytes combination."); } break; } @@ -642,12 +642,12 @@ static void rogue_encode_dest_map(const rogue_instr_group *group, break; default: - unreachable("Invalid dest/bytes combination."); + unreachable("Unsupported dest/bytes combination."); } } break; default: - unreachable("Invalid dest/bytes combination."); + unreachable("Unsupported dest/bytes combination."); } } @@ -666,7 +666,7 @@ static void rogue_encode_iss_map(const rogue_instr_group *group, break; default: - unreachable("Invalid setting for IS1."); + unreachable("Unsupported setting for IS1."); } if (rogue_ref_is_io(&io_sel->iss[2])) @@ -679,7 +679,7 @@ static void rogue_encode_iss_map(const rogue_instr_group *group, break; default: - unreachable("Invalid setting for IS2."); + unreachable("Unsupported setting for IS2."); } if (rogue_ref_is_io(&io_sel->iss[3])) @@ -698,7 +698,7 @@ static void rogue_encode_iss_map(const rogue_instr_group *group, break; default: - unreachable("Invalid setting for IS3."); + unreachable("Unsupported setting for IS3."); } if (rogue_ref_is_io(&io_sel->iss[4])) @@ -717,7 +717,7 @@ static void rogue_encode_iss_map(const rogue_instr_group *group, break; default: - unreachable("Invalid setting for IS4."); + unreachable("Unsupported setting for IS4."); } if (rogue_ref_is_io(&io_sel->iss[5])) @@ -736,7 +736,7 @@ static void rogue_encode_iss_map(const rogue_instr_group *group, break; default: - unreachable("Invalid setting for IS5."); + unreachable("Unsupported setting for IS5."); } } diff --git a/src/imagination/rogue/rogue_print.c b/src/imagination/rogue/rogue_print.c index 4624cae9935..975e99cd9e4 100644 --- a/src/imagination/rogue/rogue_print.c +++ b/src/imagination/rogue/rogue_print.c @@ -203,7 +203,7 @@ static inline void rogue_print_ref(FILE *fp, const rogue_ref *ref) break; default: - unreachable("Invalid ref type."); + unreachable("Unsupported ref type."); } } @@ -399,7 +399,7 @@ void rogue_print_instr(FILE *fp, const rogue_instr *instr) break; default: - unreachable("Invalid instruction type."); + unreachable("Unsupported instruction type."); } RESET(fp); @@ -444,7 +444,7 @@ rogue_print_instr_group_io_sel(FILE *fp, const rogue_instr_group_io_sel *io_sel) else if (rogue_ref_is_io(&io_sel->srcs[i])) rogue_print_io(fp, io_sel->srcs[i].io); else - unreachable("Invalid src map."); + unreachable("Unsupported src map."); } if (present) fputs(" ", fp); @@ -470,7 +470,7 @@ rogue_print_instr_group_io_sel(FILE *fp, const rogue_instr_group_io_sel *io_sel) else if (rogue_ref_is_io(&io_sel->iss[i])) rogue_print_io(fp, io_sel->iss[i].io); else - unreachable("Invalid iss map."); + unreachable("Unsupported iss map."); } if (present) fputs(" ", fp); @@ -494,7 +494,7 @@ rogue_print_instr_group_io_sel(FILE *fp, const rogue_instr_group_io_sel *io_sel) else if (rogue_ref_is_io(&io_sel->dsts[i])) rogue_print_io(fp, io_sel->dsts[i].io); else - unreachable("Invalid dst map."); + unreachable("Unsupported dst map."); } if (present) fputs(" ", fp); @@ -524,7 +524,7 @@ rogue_print_instr_group_header(FILE *fp, const rogue_instr_group *group) break; default: - unreachable("Invalid instruction group ALU."); + unreachable("Unsupported instruction group ALU."); } if (group->header.end) diff --git a/src/imagination/rogue/tools/vk_compiler.c b/src/imagination/rogue/tools/vk_compiler.c index 5bd5f936942..73c0723bd1a 100644 --- a/src/imagination/rogue/tools/vk_compiler.c +++ b/src/imagination/rogue/tools/vk_compiler.c @@ -122,7 +122,7 @@ static bool parse_cmdline(int argc, char *argv[], struct compiler_opts *opts) else if (!strcmp(optarg, "vert") || !strcmp(optarg, "v")) opts->stage = MESA_SHADER_VERTEX; else { - fprintf(stderr, "Invalid stage \"%s\".\n", optarg); + fprintf(stderr, "Unsupported stage \"%s\".\n", optarg); usage(argv[0]); return false; }