mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
r600g: dump raw shader output for debugging
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
This commit is contained in:
parent
6d13ec7dc0
commit
833f3a488a
3 changed files with 27 additions and 0 deletions
|
|
@ -947,3 +947,28 @@ void r600_bc_clear(struct r600_bc *bc)
|
|||
|
||||
LIST_INITHEAD(&cf->list);
|
||||
}
|
||||
|
||||
void r600_bc_dump(struct r600_bc *bc)
|
||||
{
|
||||
unsigned i;
|
||||
char chip = '6';
|
||||
|
||||
switch (bc->chiprev) {
|
||||
case 1:
|
||||
chip = '7';
|
||||
break;
|
||||
case 2:
|
||||
chip = 'E';
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
chip = '6';
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, "bytecode %d dw -----------------------\n", bc->ndw);
|
||||
fprintf(stderr, " %c\n", chip);
|
||||
for (i = 0; i < bc->ndw; i++) {
|
||||
fprintf(stderr, "0x%08X\n", bc->bytecode[i]);
|
||||
}
|
||||
fprintf(stderr, "--------------------------------------\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ int r600_bc_add_output(struct r600_bc *bc, const struct r600_bc_output *output);
|
|||
int r600_bc_build(struct r600_bc *bc);
|
||||
int r600_bc_add_cfinst(struct r600_bc *bc, int inst);
|
||||
int r600_bc_add_alu_type(struct r600_bc *bc, const struct r600_bc_alu *alu, int type);
|
||||
void r600_bc_dump(struct r600_bc *bc);
|
||||
|
||||
/* r700_asm.c */
|
||||
int r700_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsigned id);
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ int r600_pipe_shader_create(struct pipe_context *ctx, struct r600_pipe_shader *s
|
|||
return r;
|
||||
}
|
||||
}
|
||||
//r600_bc_dump(&shader->shader.bc);
|
||||
//fprintf(stderr, "______________________________________________________________\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue