From 47e52d84ea3d4c1830bf942a41151aaabbf320d3 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 21 Aug 2020 18:46:33 +0200 Subject: [PATCH] nir: fix nir_variable_create for kernels We ended up with INTERP_MODE_SMOOTH but we really just want to have NONE. Signed-off-by: Karol Herbst Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 693bd332a66..a94ccf09be1 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -144,7 +144,8 @@ nir_variable_create(nir_shader *shader, nir_variable_mode mode, var->data.how_declared = nir_var_declared_normally; if ((mode == nir_var_shader_in && - shader->info.stage != MESA_SHADER_VERTEX) || + shader->info.stage != MESA_SHADER_VERTEX && + shader->info.stage != MESA_SHADER_KERNEL) || (mode == nir_var_shader_out && shader->info.stage != MESA_SHADER_FRAGMENT)) var->data.interpolation = INTERP_MODE_SMOOTH; -- 2.30.2