nir: remove info.fs.needs_all_helper_invocations

Use info.uses_wide_subgroup_intrinsics instead.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
This commit is contained in:
Daniel Schürmann 2023-11-02 15:38:46 +01:00
parent f39ed0063b
commit 1179d83a89
6 changed files with 3 additions and 14 deletions

View file

@ -3091,7 +3091,7 @@ agx_compile_shader_nir(nir_shader *nir, struct agx_shader_key *key,
nir->info.outputs_written & (VARYING_BIT_LAYER | VARYING_BIT_VIEWPORT);
} else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
out->disable_tri_merging = nir->info.fs.needs_all_helper_invocations ||
out->disable_tri_merging = nir->info.uses_wide_subgroup_intrinsics ||
nir->info.fs.needs_quad_helper_invocations ||
nir->info.writes_memory;

View file

@ -758,9 +758,6 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader,
case nir_intrinsic_shuffle_up:
case nir_intrinsic_shuffle_down:
case nir_intrinsic_write_invocation_amd:
if (shader->info.stage == MESA_SHADER_FRAGMENT)
shader->info.fs.needs_all_helper_invocations = true;
shader->info.uses_wide_subgroup_intrinsics = true;
break;
@ -974,7 +971,6 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
shader->info.fs.color_is_dual_source = false;
shader->info.fs.uses_fbfetch_output = false;
shader->info.fs.needs_quad_helper_invocations = false;
shader->info.fs.needs_all_helper_invocations = false;
}
if (shader->info.stage == MESA_SHADER_TESS_CTRL) {
shader->info.tess.tcs_cross_invocation_inputs_read = 0;

View file

@ -158,7 +158,7 @@ nir_lower_discard_or_demote(nir_shader *shader,
NULL);
shader->info.fs.uses_demote = true;
} else if (!shader->info.fs.needs_quad_helper_invocations &&
!shader->info.fs.needs_all_helper_invocations &&
!shader->info.uses_wide_subgroup_intrinsics &&
shader->info.fs.uses_demote) {
/* If we don't need any helper invocations, convert demote to discard. */
progress = nir_shader_intrinsics_pass(shader, lower_demote_to_discard,

View file

@ -2536,7 +2536,6 @@ print_shader_info(const struct shader_info *info, FILE *fp)
print_nz_bool(fp, "color_is_dual_source", info->fs.color_is_dual_source);
print_nz_bool(fp, "needs_quad_helper_invocations", info->fs.needs_quad_helper_invocations);
print_nz_bool(fp, "needs_all_helper_invocations", info->fs.needs_all_helper_invocations);
print_nz_bool(fp, "uses_sample_qualifier", info->fs.uses_sample_qualifier);
print_nz_bool(fp, "uses_sample_shading", info->fs.uses_sample_shading);
print_nz_bool(fp, "early_fragment_tests", info->fs.early_fragment_tests);

View file

@ -422,12 +422,6 @@ typedef struct shader_info {
*/
bool needs_quad_helper_invocations:1;
/**
* True if this fragment shader requires helper invocations for
* all subgroup operations, not just quad ops and derivatives.
*/
bool needs_all_helper_invocations:1;
/**
* Whether any inputs are declared with the "sample" qualifier.
*/

View file

@ -7867,7 +7867,7 @@ brw_nir_populate_wm_prog_data(nir_shader *shader,
*/
prog_data->uses_vmask = devinfo->verx10 < 125 ||
shader->info.fs.needs_quad_helper_invocations ||
shader->info.fs.needs_all_helper_invocations ||
shader->info.uses_wide_subgroup_intrinsics ||
prog_data->coarse_pixel_dispatch != BRW_NEVER;
prog_data->uses_src_w =