intel/brw: Fix commas when dumping instructions
Some commas were being skipped, according to history as an attempt to elide BAD_FILEs, but we still print them, so be consistent. Also for instructions without any sources, the trailing comma was always being printed. Fix that too. Example of instruction output before the change halt_target(8) (null):UD, send(8) (mlen: 1) (EOT) (null):UD, 0u, 0u, g126:UD(null):UD NoMask and after it halt_target(8) (null):UD send(8) (mlen: 1) (EOT) (null):UD, 0u, 0u, g126:UD, (null):UD NoMask Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29114>
This commit is contained in:
@@ -2565,9 +2565,11 @@ fs_visitor::dump_instruction_to_file(const fs_inst *inst, FILE *file) const
|
||||
|
||||
if (inst->dst.stride != 1)
|
||||
fprintf(file, "<%u>", inst->dst.stride);
|
||||
fprintf(file, ":%s, ", brw_reg_type_to_letters(inst->dst.type));
|
||||
fprintf(file, ":%s", brw_reg_type_to_letters(inst->dst.type));
|
||||
|
||||
for (int i = 0; i < inst->sources; i++) {
|
||||
fprintf(file, ", ");
|
||||
|
||||
if (inst->src[i].negate)
|
||||
fprintf(file, "-");
|
||||
if (inst->src[i].abs)
|
||||
@@ -2687,9 +2689,6 @@ fs_visitor::dump_instruction_to_file(const fs_inst *inst, FILE *file) const
|
||||
|
||||
fprintf(file, ":%s", brw_reg_type_to_letters(inst->src[i].type));
|
||||
}
|
||||
|
||||
if (i < inst->sources - 1 && inst->src[i + 1].file != BAD_FILE)
|
||||
fprintf(file, ", ");
|
||||
}
|
||||
|
||||
fprintf(file, " ");
|
||||
|
Reference in New Issue
Block a user