radeonsi: write wave information into GPU hang reports
UMR is our new debugging tool. It must have +s set for Mesa to use it without root privileges: sudo chmod +s .../umr Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -468,6 +468,21 @@ static void si_dump_descriptors(struct si_context *sctx,
|
|||||||
num_elements[i], f);
|
num_elements[i], f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void si_dump_command(const char *title, const char *command, FILE *f)
|
||||||
|
{
|
||||||
|
char line[2000];
|
||||||
|
|
||||||
|
FILE *p = popen(command, "r");
|
||||||
|
if (!p)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fprintf(f, COLOR_YELLOW "%s: " COLOR_RESET "\n", title);
|
||||||
|
while (fgets(line, sizeof(line), p))
|
||||||
|
fputs(line, f);
|
||||||
|
fprintf(f, "\n\n");
|
||||||
|
pclose(p);
|
||||||
|
}
|
||||||
|
|
||||||
static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
|
static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
|
||||||
unsigned flags)
|
unsigned flags)
|
||||||
{
|
{
|
||||||
@@ -486,6 +501,11 @@ static void si_dump_debug_state(struct pipe_context *ctx, FILE *f,
|
|||||||
si_dump_shader(sctx->screen, &sctx->gs_shader, f);
|
si_dump_shader(sctx->screen, &sctx->gs_shader, f);
|
||||||
si_dump_shader(sctx->screen, &sctx->ps_shader, f);
|
si_dump_shader(sctx->screen, &sctx->ps_shader, f);
|
||||||
|
|
||||||
|
if (flags & PIPE_DUMP_DEVICE_STATUS_REGISTERS) {
|
||||||
|
si_dump_command("Active waves", "umr -wa | column -t", f);
|
||||||
|
si_dump_command("Wave information", "umr -O bits -wa", f);
|
||||||
|
}
|
||||||
|
|
||||||
si_dump_descriptor_list(&sctx->descriptors[SI_DESCS_RW_BUFFERS],
|
si_dump_descriptor_list(&sctx->descriptors[SI_DESCS_RW_BUFFERS],
|
||||||
"", "RW buffers", SI_NUM_RW_BUFFERS, f);
|
"", "RW buffers", SI_NUM_RW_BUFFERS, f);
|
||||||
si_dump_descriptors(sctx, &sctx->vs_shader, f);
|
si_dump_descriptors(sctx, &sctx->vs_shader, f);
|
||||||
|
Reference in New Issue
Block a user