Mesa (master): nir: fix nir_variable_create for kernels

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 21 22:24:18 UTC 2020


Module: Mesa
Branch: master
Commit: 47e52d84ea3d4c1830bf942a41151aaabbf320d3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=47e52d84ea3d4c1830bf942a41151aaabbf320d3

Author: Karol Herbst <kherbst at redhat.com>
Date:   Fri Aug 21 18:46:33 2020 +0200

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 <kherbst at redhat.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891>

---

 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;



More information about the mesa-commit mailing list