diff options
author | Rob Clark <[email protected]> | 2014-10-19 14:55:32 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-10-20 21:42:44 -0400 |
commit | 4f17e026bb99c173444ff5ca7d0b782ed89ee604 (patch) | |
tree | f2c1edf5f5b9e159c4c8ba4b7b5477fc08379225 /src/gallium/drivers/freedreno/ir3 | |
parent | f0ca26725e48e6d85a9e2749caaf122e7bb8d6e6 (diff) |
freedreno/ir3: add debug flag to disable cp
FD_MESA_DEBUG=nocp will disable copy propagation pass.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cmdline.c | 7 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c index 86239b45465..652ec163f80 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 dc4f985f4b7..233f1748b05 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) |