diff options
author | Jason Ekstrand <[email protected]> | 2019-04-23 23:19:56 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-08-12 22:56:07 +0000 |
commit | 134607760ac20f795cbc034eb4071bade8058958 (patch) | |
tree | 412c8fe7b836ca84cb0e63a70d2f96c0b16a21dd /src/intel/compiler/brw_compiler.h | |
parent | 2720ad5fd9d858f5bb72046017ba55f63345268b (diff) |
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 <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_compiler.h')
-rw-r--r-- | src/intel/compiler/brw_compiler.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index 614410e3fb7..b1d7fefa7d3 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -1240,6 +1240,15 @@ DEFINE_PROG_DATA_DOWNCAST(clip) DEFINE_PROG_DATA_DOWNCAST(sf) #undef DEFINE_PROG_DATA_DOWNCAST +struct brw_compile_stats { + uint32_t dispatch_width; /**< 0 for vec4 */ + uint32_t instructions; + uint32_t loops; + uint32_t cycles; + uint32_t spills; + uint32_t fills; +}; + /** @} */ struct brw_compiler * @@ -1278,6 +1287,7 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data, struct brw_vs_prog_data *prog_data, struct nir_shader *shader, int shader_time_index, + struct brw_compile_stats *stats, char **error_str); /** @@ -1293,6 +1303,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, struct brw_tcs_prog_data *prog_data, struct nir_shader *nir, int shader_time_index, + struct brw_compile_stats *stats, char **error_str); /** @@ -1309,6 +1320,7 @@ brw_compile_tes(const struct brw_compiler *compiler, void *log_data, struct nir_shader *shader, struct gl_program *prog, int shader_time_index, + struct brw_compile_stats *stats, char **error_str); /** @@ -1324,6 +1336,7 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data, struct nir_shader *shader, struct gl_program *prog, int shader_time_index, + struct brw_compile_stats *stats, char **error_str); /** @@ -1375,6 +1388,7 @@ brw_compile_fs(const struct brw_compiler *compiler, void *log_data, int shader_time_index32, bool allow_spilling, bool use_rep_send, struct brw_vue_map *vue_map, + struct brw_compile_stats *stats, /**< Array of three stats */ char **error_str); /** @@ -1389,6 +1403,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data, struct brw_cs_prog_data *prog_data, const struct nir_shader *shader, int shader_time_index, + struct brw_compile_stats *stats, char **error_str); void brw_debug_key_recompile(const struct brw_compiler *c, void *log, |