diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c index 6a574ec29be..187098cafe9 100644 --- a/src/compiler/nir/nir_linking_helpers.c +++ b/src/compiler/nir/nir_linking_helpers.c @@ -1391,8 +1391,10 @@ nir_link_opt_varyings(nir_shader *producer, nir_shader *consumer) /* The varying is loaded from same uniform, so no need to do any * interpolation. Mark it as flat explicitly. */ - if (in_var && in_var->data.interpolation <= INTERP_MODE_NOPERSPECTIVE) + if (in_var && in_var->data.interpolation <= INTERP_MODE_NOPERSPECTIVE) { in_var->data.interpolation = INTERP_MODE_FLAT; + out_var->data.interpolation = INTERP_MODE_FLAT; + } } }