<div dir="ltr">On 20 December 2013 06:39, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Unit tests comparing generated blorp programs to known good need<br>
to have the dump in designated file instead of in default<br>
standard output. The comparison also expects the jump counters<br>
of if-else-instructions to be correctly set and hence the dump<br>
needs to be taken _after_ 'patch_IF_ELSE()' is run (the default<br>
dump of the fs_generator does this before).<br>
<br>
Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_fs.h | 7 +++++--<br>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 15 +++++++++------<br>
2 files changed, 14 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h<br>
index 9bef07c..d40d0a8 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_fs.h<br>
+++ b/src/mesa/drivers/dri/i965/brw_fs.h<br>
@@ -510,10 +510,13 @@ public:<br>
<br>
const unsigned *generate_assembly(exec_list *simd8_instructions,<br>
exec_list *simd16_instructions,<br>
- unsigned *assembly_size);<br>
+ unsigned *assembly_size,<br>
+ bool dump_enabled = false,<br>
+ FILE *dump_file = stdout);<br></blockquote><div><br></div><div>Nit pick: rather than add 2 args, wouldn't it be easier to just add the dump_file arg, with a default value of NULL, and only dump instructions if it is non-NULL?<br>
<br></div><div>Either way, the patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div></div></div></div>