zink: manually ignore centroid with sample shading

Unlowering doesn't handle this for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39542>
This commit is contained in:
Utku Iseri 2026-01-26 10:02:35 +01:00 committed by Marge Bot
parent a9271023fa
commit 08e72147ba

View file

@ -3957,6 +3957,9 @@ zink_shader_compile(struct zink_screen *screen, bool can_shobj, struct zink_shad
if (nir->info.stage == MESA_SHADER_FRAGMENT && (zink_fs_key_base(key)->force_persample_interp || zink_fs_key_base(key)->fbfetch_ms)) {
nir->info.fs.uses_sample_shading = true;
NIR_PASS(_, nir, nir_lower_sample_shading);
nir_foreach_shader_in_variable(var, nir) {
var->data.centroid = false;
}
}
NIR_PASS(_, nir, add_derefs);