[Mesa-dev] [PATCH 38/42] i965/fs: allow unit tests to dump the final patched assembly

Paul Berry stereotype441 at gmail.com
Mon Jan 20 19:58:08 PST 2014


On 20 December 2013 06:39, Topi Pohjolainen <topi.pohjolainen at intel.com>wrote:

> Unit tests comparing generated blorp programs to known good need
> to have the dump in designated file instead of in default
> standard output. The comparison also expects the jump counters
> of if-else-instructions to be correctly set and hence the dump
> needs to be taken _after_ 'patch_IF_ELSE()' is run (the default
> dump of the fs_generator does this before).
>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_fs.h             |  7 +++++--
>  src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 15 +++++++++------
>  2 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h
> b/src/mesa/drivers/dri/i965/brw_fs.h
> index 9bef07c..d40d0a8 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h
> @@ -510,10 +510,13 @@ public:
>
>     const unsigned *generate_assembly(exec_list *simd8_instructions,
>                                       exec_list *simd16_instructions,
> -                                     unsigned *assembly_size);
> +                                     unsigned *assembly_size,
> +                                     bool dump_enabled = false,
> +                                     FILE *dump_file = stdout);
>

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?

Either way, the patch is:

Reviewed-by: Paul Berry <stereotype441 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140120/91a8c516/attachment.html>


More information about the mesa-dev mailing list