pan/bi: Mark whole flat variables

Otherwise, we'll only mark the first location for matrix and array
variables.  Ideally, someone would split these before we get here but we
should at least be correct.

Cc: mesa-stable
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39274>
This commit is contained in:
Faith Ekstrand 2026-01-14 15:15:42 -05:00 committed by Marge Bot
parent 020b1005c8
commit 871875d0ce

View file

@ -6107,8 +6107,10 @@ bi_fp32_varying_mask(nir_shader *nir)
assert(nir->info.stage == MESA_SHADER_FRAGMENT);
nir_foreach_shader_in_variable(var, nir) {
if (var->data.interpolation == INTERP_MODE_FLAT)
mask |= BITFIELD64_BIT(var->data.location);
if (var->data.interpolation == INTERP_MODE_FLAT) {
unsigned slots = glsl_count_attribute_slots(var->type, false);
mask |= BITFIELD64_RANGE(var->data.location, slots);
}
}
nir_shader_instructions_pass(nir, bi_gather_texcoords, nir_metadata_all,