summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r--src/compiler/nir/nir_lower_io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index bf8296f5b12..b36836f6f76 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -340,6 +340,10 @@ lower_interpolate_at(nir_intrinsic_instr *intrin, struct lower_io_state *state,
assert(var->data.mode == nir_var_shader_in);
+ /* Ignore interpolateAt() for flat variables - flat is flat. */
+ if (var->data.interpolation == INTERP_MODE_FLAT)
+ return lower_load(intrin, state, NULL, offset);
+
nir_intrinsic_op bary_op;
switch (intrin->intrinsic) {
case nir_intrinsic_interp_var_at_centroid: