intel/compiler: Pass shader_stats for each SIMD mode
Passing shader_stats to the fs_generator constructor means that the SIMD8 shader stats from the visitor (such as the scheduler mode) will be reported out for the SIMD16/SIMD32 versions as well. As you can see, we are now passing 'shader_stats' and 'stats' to generate_code(), which is obviously odd looking. Ian rebased and committed an old patch of mine which added the shader_stats struct on July 30 in commitdabb5d4bee(i965/fs: Add a shader_stats struct.) and shortly after on August 12 Jason added the brw_compile_stats struct in commit134607760a(intel/compiler: Fill a compiler statistics struct). I'd like to combine the two, but I'm not sure how. shader_stats is an input to generate_code() while brw_compile_stats is an output and is only used by the Vulkan driver. Leave it as is for now... Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4093>
This commit is contained in:
@@ -186,14 +186,12 @@ 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,
|
||||
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),
|
||||
shader_stats(shader_stats),
|
||||
runtime_check_aads_emit(runtime_check_aads_emit), debug_flag(false),
|
||||
stage(stage), mem_ctx(mem_ctx)
|
||||
{
|
||||
@@ -1698,6 +1696,7 @@ fs_generator::enable_debug(const char *shader_name)
|
||||
|
||||
int
|
||||
fs_generator::generate_code(const cfg_t *cfg, int dispatch_width,
|
||||
struct shader_stats shader_stats,
|
||||
struct brw_compile_stats *stats)
|
||||
{
|
||||
/* align to 64 byte boundary. */
|
||||
|
||||
Reference in New Issue
Block a user