diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 8d27adc7a15..7e09020c5b3 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -7503,8 +7503,8 @@ brw_compile_fs(const struct brw_compiler *compiler, float throughput = 0; bool has_spilled = false; - v8 = std::make_unique(compiler, ¶ms->base, &key->base, - &prog_data->base, nir, 8, + v8 = std::make_unique(compiler, ¶ms->base, key, + prog_data, nir, 8, 1, params->base.stats != NULL, debug_enabled); if (!v8->run_fs(allow_spilling, false /* do_rep_send */)) { @@ -7549,8 +7549,8 @@ brw_compile_fs(const struct brw_compiler *compiler, v8->max_dispatch_width >= 16 && (INTEL_SIMD(FS, 16) || params->use_rep_send)) { /* Try a SIMD16 compile */ - v16 = std::make_unique(compiler, ¶ms->base, &key->base, - &prog_data->base, nir, 16, + v16 = std::make_unique(compiler, ¶ms->base, key, + prog_data, nir, 16, 1, params->base.stats != NULL, debug_enabled); v16->import_uniforms(v8.get()); @@ -7580,8 +7580,8 @@ brw_compile_fs(const struct brw_compiler *compiler, devinfo->ver >= 6 && !simd16_failed && INTEL_SIMD(FS, 32)) { /* Try a SIMD32 compile */ - v32 = std::make_unique(compiler, ¶ms->base, &key->base, - &prog_data->base, nir, 32, + v32 = std::make_unique(compiler, ¶ms->base, key, + prog_data, nir, 32, 1, params->base.stats != NULL, debug_enabled); v32->import_uniforms(v8.get()); diff --git a/src/intel/compiler/brw_fs.h b/src/intel/compiler/brw_fs.h index 50fb1064c08..b480dacbe8e 100644 --- a/src/intel/compiler/brw_fs.h +++ b/src/intel/compiler/brw_fs.h @@ -190,6 +190,15 @@ public: unsigned dispatch_width, bool needs_register_pressure, bool debug_enabled); + fs_visitor(const struct brw_compiler *compiler, + const struct brw_compile_params *params, + const brw_wm_prog_key *key, + struct brw_wm_prog_data *prog_data, + const nir_shader *shader, + unsigned dispatch_width, + unsigned num_polygons, + bool needs_register_pressure, + bool debug_enabled); fs_visitor(const struct brw_compiler *compiler, const struct brw_compile_params *params, struct brw_gs_compile *gs_compile, @@ -426,6 +435,7 @@ public: bool needs_register_pressure; const unsigned dispatch_width; /**< 8, 16 or 32 */ + const unsigned max_polygons; unsigned max_dispatch_width; /* The API selected subgroup size */ diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index a5d058e7b42..fb90df28338 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -1141,6 +1141,28 @@ fs_visitor::fs_visitor(const struct brw_compiler *compiler, performance_analysis(this), needs_register_pressure(needs_register_pressure), dispatch_width(dispatch_width), + max_polygons(0), + api_subgroup_size(brw_nir_api_subgroup_size(shader, dispatch_width)) +{ + init(); +} + +fs_visitor::fs_visitor(const struct brw_compiler *compiler, + const struct brw_compile_params *params, + const brw_wm_prog_key *key, + struct brw_wm_prog_data *prog_data, + const nir_shader *shader, + unsigned dispatch_width, unsigned max_polygons, + bool needs_register_pressure, + bool debug_enabled) + : backend_shader(compiler, params, shader, &prog_data->base, + debug_enabled), + key(&key->base), gs_compile(NULL), prog_data(&prog_data->base), + live_analysis(this), regpressure_analysis(this), + performance_analysis(this), + needs_register_pressure(needs_register_pressure), + dispatch_width(dispatch_width), + max_polygons(max_polygons), api_subgroup_size(brw_nir_api_subgroup_size(shader, dispatch_width)) { init(); @@ -1165,6 +1187,7 @@ fs_visitor::fs_visitor(const struct brw_compiler *compiler, performance_analysis(this), needs_register_pressure(needs_register_pressure), dispatch_width(8), + max_polygons(0), api_subgroup_size(brw_nir_api_subgroup_size(shader, dispatch_width)) { init();