aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_asm.c
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2013-05-03 12:01:20 +0400
committerVadim Girlin <[email protected]>2013-05-03 16:53:41 +0400
commit4ca67dbf0cc4cd509c225c5feb5e45387739a48b (patch)
treed95c7c86da5a7419b2ffba4f5e6bed0882d58e0c /src/gallium/drivers/r600/r600_asm.c
parentb4b3041132e5b73b263217b7c25ebec3f3d879ce (diff)
r600g: use old shader disassembler by default
New disassembler is not completely isolated yet from further processing in r600g/sb that is not required for printing the dump, so it has higher probability to fail in case of any unexpected features in the bytecode. This patch adds "sbdisasm" flag for R600_DEBUG that allows to use new disassembler in r600g/sb for shader dumps when shader optimization is not enabled. If shader optimization is enabled, new disassembler is used by default. Signed-off-by: Vadim Girlin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_asm.c')
-rw-r--r--src/gallium/drivers/r600/r600_asm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 81b84ec5fd3..df0376ad11e 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -2281,6 +2281,7 @@ void *r600_create_vertex_fetch_shader(struct pipe_context *ctx,
uint32_t *bytecode;
int i, j, r, fs_size;
struct r600_fetch_shader *shader;
+ unsigned sb_disasm = rctx->screen->debug_flags & (DBG_SB_DISASM | DBG_SB);
assert(count < 32);
@@ -2387,13 +2388,13 @@ void *r600_create_vertex_fetch_shader(struct pipe_context *ctx,
fprintf(stderr, "\n");
}
-#if 0
- r600_bytecode_disasm(&bc);
+ if (!sb_disasm) {
+ r600_bytecode_disasm(&bc);
- fprintf(stderr, "______________________________________________________________\n");
-#else
- r600_sb_bytecode_process(rctx, &bc, NULL, 1 /*dump*/, 0 /*optimize*/);
-#endif
+ fprintf(stderr, "______________________________________________________________\n");
+ } else {
+ r600_sb_bytecode_process(rctx, &bc, NULL, 1 /*dump*/, 0 /*optimize*/);
+ }
}
fs_size = bc.ndw*4;