radeonsi: don't include the PARAM_GEN input in si_shader_info

It's only produced by lowering point smoothing.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
This commit is contained in:
Marek Olšák 2023-11-25 15:32:48 -05:00 committed by Marge Bot
parent 197af03698
commit 1d4402b02a
2 changed files with 7 additions and 1 deletions

View file

@ -637,7 +637,9 @@ static bool lower_intrinsic(nir_builder *b, nir_instr *instr, struct lower_abi_s
/* Load point coordinates (x, y) which are written by the hw after the interpolated inputs */
replacement = nir_load_interpolated_input(b, 2, 32, interp_param, nir_imm_int(b, 0),
.base = si_get_ps_num_interp(shader),
.component = 2);
.component = 2,
/* This tells si_nir_scan_shader that it's PARAM_GEN */
.io_semantics.no_varying = 1);
break;
}
case nir_intrinsic_load_poly_line_smooth_enabled:

View file

@ -260,6 +260,10 @@ static void scan_io_usage(const nir_shader *nir, struct si_shader_info *info,
semantic = nir_intrinsic_io_semantics(intr).location;
if (nir->info.stage == MESA_SHADER_FRAGMENT && is_input) {
/* The PARAM_GEN input shouldn't be scanned. */
if (nir_intrinsic_io_semantics(intr).no_varying)
return;
/* Gather color PS inputs. We can only get here after lowering colors in monolithic
* shaders. This must match what we do for nir_intrinsic_load_color0/1.
*/