diff options
author | Jerome Glisse <[email protected]> | 2010-12-03 11:34:47 -0500 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-12-03 11:35:36 -0500 |
commit | 833f3a488a7ba0fa59e25f1e518f6b4616270143 (patch) | |
tree | b5f2e36be637e276a8a24f1e260ffa676cdb19c8 /src/gallium/drivers/r600/r600_asm.c | |
parent | 6d13ec7dc082aea9a8ce04dd8e045e77e5921d8a (diff) |
r600g: dump raw shader output for debugging
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_asm.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index edadedff25f..73daa000809 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -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"); +} |