This indicates that only quad operations use helper invocations.
Also handle quad_swizzle_amd.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7586>
case nir_intrinsic_quad_swap_horizontal:
case nir_intrinsic_quad_swap_vertical:
case nir_intrinsic_quad_swap_diagonal:
+ case nir_intrinsic_quad_swizzle_amd:
if (shader->info.stage == MESA_SHADER_FRAGMENT)
- shader->info.fs.needs_helper_invocations = true;
+ shader->info.fs.needs_quad_helper_invocations = true;
break;
case nir_intrinsic_end_primitive:
{
if (shader->info.stage == MESA_SHADER_FRAGMENT &&
nir_tex_instr_has_implicit_derivative(instr))
- shader->info.fs.needs_helper_invocations = true;
+ shader->info.fs.needs_quad_helper_invocations = true;
switch (instr->op) {
case nir_texop_tg4:
case nir_op_fddx_coarse:
case nir_op_fddy_coarse:
if (shader->info.stage == MESA_SHADER_FRAGMENT)
- shader->info.fs.needs_helper_invocations = true;
+ shader->info.fs.needs_quad_helper_invocations = true;
break;
default:
break;
shader->info.fs.uses_demote = false;
shader->info.fs.color_is_dual_source = false;
shader->info.fs.uses_fbfetch_output = false;
- shader->info.fs.needs_helper_invocations = false;
+ shader->info.fs.needs_quad_helper_invocations = false;
}
if (shader->info.stage == MESA_SHADER_TESS_CTRL) {
shader->info.tess.tcs_cross_invocation_inputs_read = 0;
* instructions which do implicit derivatives, and the use of quad
* subgroup operations.
*/
- bool needs_helper_invocations:1;
+ bool needs_quad_helper_invocations:1;
/**
* Whether any inputs are declared with the "sample" qualifier.
collect_tex_prefetches(ctx, ir);
if (so->type == MESA_SHADER_FRAGMENT &&
- ctx->s->info.fs.needs_helper_invocations)
+ ctx->s->info.fs.needs_quad_helper_invocations)
so->need_pixlod = true;
out:
nir_ssa_def *bar = nir_fddy(b, sij);
if (b->shader->info.stage == MESA_SHADER_FRAGMENT)
- b->shader->info.fs.needs_helper_invocations = true;
+ b->shader->info.fs.needs_quad_helper_invocations = true;
nir_ssa_def *x, *y, *z, *i, *j;
}
state->can_discard = s->info.fs.uses_discard;
- state->helper_invocations = s->info.fs.needs_helper_invocations;
+ state->helper_invocations = s->info.fs.needs_quad_helper_invocations;
state->stack_size = program->tls_size;
state->reads_frag_coord = (s->info.inputs_read & (1 << VARYING_SLOT_POS)) ||
key->ps_prolog.num_input_sgprs = shader->info.num_input_sgprs;
key->ps_prolog.num_input_vgprs = shader->info.num_input_vgprs;
key->ps_prolog.wqm =
- info->base.fs.needs_helper_invocations &&
+ info->base.fs.needs_quad_helper_invocations &&
(key->ps_prolog.colors_read || key->ps_prolog.states.force_persp_sample_interp ||
key->ps_prolog.states.force_linear_sample_interp ||
key->ps_prolog.states.force_persp_center_interp ||
if (si_get_wave_size(sel->screen, sel->info.stage, ngg, es, false, false) == 32)
shader_variant_flags |= 1 << 2;
if (sel->info.stage == MESA_SHADER_FRAGMENT &&
- /* Derivatives imply helper invocations so check for needs_helper_invocations. */
- sel->info.base.fs.needs_helper_invocations &&
+ /* Derivatives imply helper invocations so check for needs_quad_helper_invocations. */
+ sel->info.base.fs.needs_quad_helper_invocations &&
sel->info.base.fs.uses_discard &&
sel->screen->debug_flags & DBG(FS_CORRECT_DERIVS_AFTER_KILL))
shader_variant_flags |= 1 << 3;
bi_terminate_discarded_threads(bi_context *ctx)
{
if (ctx->stage == MESA_SHADER_FRAGMENT)
- return !ctx->nir->info.fs.needs_helper_invocations;
+ return !ctx->nir->info.fs.needs_quad_helper_invocations;
else
return false;
}