i965/fs: Add a shader_stats struct.
It'll grow further, and we'd like to avoid adding an additional parameter to fs_generator() for each new piece of data. v2 (idr): Rebase on 17 months. Track a visitor instead of a cfg. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:

committed by
Ian Romanick

parent
11a49f289d
commit
dabb5d4bee
@@ -183,14 +183,14 @@ brw_reg_from_fs_reg(const struct gen_device_info *devinfo, fs_inst *inst,
|
||||
fs_generator::fs_generator(const struct brw_compiler *compiler, void *log_data,
|
||||
void *mem_ctx,
|
||||
struct brw_stage_prog_data *prog_data,
|
||||
unsigned promoted_constants,
|
||||
struct shader_stats shader_stats,
|
||||
bool runtime_check_aads_emit,
|
||||
gl_shader_stage stage)
|
||||
|
||||
: compiler(compiler), log_data(log_data),
|
||||
devinfo(compiler->devinfo),
|
||||
prog_data(prog_data),
|
||||
promoted_constants(promoted_constants),
|
||||
shader_stats(shader_stats),
|
||||
runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(false),
|
||||
stage(stage), mem_ctx(mem_ctx)
|
||||
{
|
||||
@@ -2253,7 +2253,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
|
||||
"SIMD%d shader: %d instructions. %d loops. %u cycles. %d:%d spills:fills. Promoted %u constants. Compacted %d to %d"
|
||||
" bytes (%.0f%%)\n",
|
||||
shader_name, dispatch_width, before_size / 16, loop_count, cfg->cycle_count,
|
||||
spill_count, fill_count, promoted_constants, before_size, after_size,
|
||||
spill_count, fill_count, shader_stats.promoted_constants, before_size, after_size,
|
||||
100.0f * (before_size - after_size) / before_size);
|
||||
|
||||
dump_assembly(p->store, disasm_info);
|
||||
@@ -2268,7 +2268,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
|
||||
_mesa_shader_stage_to_abbrev(stage),
|
||||
dispatch_width, before_size / 16,
|
||||
loop_count, cfg->cycle_count, spill_count,
|
||||
fill_count, promoted_constants, before_size,
|
||||
fill_count, shader_stats.promoted_constants, before_size,
|
||||
after_size);
|
||||
|
||||
return start_offset;
|
||||
|
Reference in New Issue
Block a user