intel/compiler: Fill a compiler statistics struct

This commit is all annoying plumbing work which just adds support for a
new brw_compile_stats struct.  This struct provides a binary driver
readable form of the same statistics we dump out to stderr when we
INTEL_DEBUG is set with a shader stage.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2019-04-23 23:19:56 -05:00
parent 2720ad5fd9
commit 134607760a
19 changed files with 89 additions and 40 deletions

View File

@@ -329,6 +329,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
struct brw_tcs_prog_data *prog_data,
nir_shader *nir,
int shader_time_index,
struct brw_compile_stats *stats,
char **error_str)
{
const struct gen_device_info *devinfo = compiler->devinfo;
@@ -446,7 +447,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
nir->info.name));
}
g.generate_code(v.cfg, 8);
g.generate_code(v.cfg, 8, stats);
assembly = g.get_assembly();
} else {
@@ -463,7 +464,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
assembly = brw_vec4_generate_assembly(compiler, log_data, mem_ctx, nir,
&prog_data->base, v.cfg);
&prog_data->base, v.cfg, stats);
}
return assembly;