mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 17:20:10 +01:00
intel/brw: Dump errors when brw_assemble() fails EU validation
This will allow executor to show proper inline errors. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32490>
This commit is contained in:
parent
9052ad449b
commit
638802d68f
1 changed files with 7 additions and 5 deletions
|
|
@ -121,10 +121,15 @@ brw_assemble(void *mem_ctx, const struct intel_device_info *devinfo,
|
|||
goto end;
|
||||
}
|
||||
|
||||
/* Add "inst groups" so validation errors can be recorded. */
|
||||
for (int i = 0; i <= p->next_insn_offset; i += 16)
|
||||
disasm_new_inst_group(disasm_info, i);
|
||||
|
||||
if (!brw_validate_instructions(p->isa, p->store, 0,
|
||||
p->next_insn_offset, disasm_info)) {
|
||||
dump_assembly(p->store, 0, p->next_insn_offset, disasm_info, NULL);
|
||||
ralloc_free(disasm_info);
|
||||
fprintf(stderr, "Invalid instructions\n");
|
||||
fprintf(stderr, "Invalid instructions.\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
@ -145,11 +150,8 @@ brw_assemble(void *mem_ctx, const struct intel_device_info *devinfo,
|
|||
result.bin_size -= compacted * 8;
|
||||
}
|
||||
|
||||
if ((flags & BRW_ASSEMBLE_DUMP) != 0) {
|
||||
disasm_new_inst_group(disasm_info, 0);
|
||||
disasm_new_inst_group(disasm_info, p->next_insn_offset);
|
||||
if ((flags & BRW_ASSEMBLE_DUMP) != 0)
|
||||
dump_assembly(p->store, 0, p->next_insn_offset, disasm_info, NULL);
|
||||
}
|
||||
|
||||
ralloc_free(disasm_info);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue