Mesa (master): freedreno/ir3: add debug flag to disable cp
Rob Clark
robclark at kemper.freedesktop.org
Tue Oct 21 13:39:04 UTC 2014
Module: Mesa
Branch: master
Commit: 4f17e026bb99c173444ff5ca7d0b782ed89ee604
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f17e026bb99c173444ff5ca7d0b782ed89ee604
Author: Rob Clark <robclark at freedesktop.org>
Date: Sun Oct 19 14:55:32 2014 -0400
freedreno/ir3: add debug flag to disable cp
FD_MESA_DEBUG=nocp will disable copy propagation pass.
Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
src/gallium/drivers/freedreno/freedreno_screen.c | 1 +
src/gallium/drivers/freedreno/freedreno_util.h | 1 +
src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 7 +++++++
src/gallium/drivers/freedreno/ir3/ir3_compiler.c | 2 +-
4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index bc6ff78..ddc7302 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -70,6 +70,7 @@ static const struct debug_named_value debug_options[] = {
{"optmsgs", FD_DBG_OPTMSGS,"Enable optimizater debug messages"},
{"optdump", FD_DBG_OPTDUMP,"Dump shader DAG to .dot files"},
{"glsl130", FD_DBG_GLSL130,"Temporary flag to enable GLSL 130 on a3xx+"},
+ {"nocp", FD_DBG_NOCP, "Disable copy-propagation"},
DEBUG_NAMED_VALUE_END
};
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index f1a1e6e..36a5995 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -66,6 +66,7 @@ enum adreno_stencil_op fd_stencil_op(unsigned op);
#define FD_DBG_OPTMSGS 0x0400
#define FD_DBG_OPTDUMP 0x0800
#define FD_DBG_GLSL130 0x1000
+#define FD_DBG_NOCP 0x2000
extern int fd_mesa_debug;
extern bool fd_binning_enabled;
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
index 86239b4..652ec16 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
@@ -133,6 +133,7 @@ static void print_usage(void)
printf(" --saturate-s MASK - bitmask of samplers to saturate S coord\n");
printf(" --saturate-t MASK - bitmask of samplers to saturate T coord\n");
printf(" --saturate-r MASK - bitmask of samplers to saturate R coord\n");
+ printf(" --nocp - disable copy propagation\n");
printf(" --help - show this message\n");
}
@@ -199,6 +200,12 @@ int main(int argc, char **argv)
continue;
}
+ if (!strcmp(argv[n], "--nocp")) {
+ fd_mesa_debug |= FD_DBG_NOCP;
+ n++;
+ continue;
+ }
+
if (!strcmp(argv[n], "--help")) {
print_usage();
return 0;
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
index dc4f985..233f174 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler.c
@@ -3175,7 +3175,7 @@ ir3_compile_shader(struct ir3_shader_variant *so,
ir3_dump_instr_list(block->head);
}
- if (cp)
+ if (cp && !(fd_mesa_debug & FD_DBG_NOCP))
ir3_block_cp(block);
if (fd_mesa_debug & FD_DBG_OPTDUMP)
More information about the mesa-commit
mailing list