panfrost: Use nir_foreach_variable_with_modes in pan_compile
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 21 Jul 2020 23:13:34 +0000 (18:13 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jul 2020 17:38:58 +0000 (17:38 +0000)
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5966>

src/gallium/drivers/panfrost/pan_assemble.c

index 64e67ae463d02f67ff5b0850d73009c0d311e8fc..4a3bf793913f3e5791e33a3292eab055d1eadc54 100644 (file)
@@ -274,10 +274,10 @@ panfrost_shader_compile(struct panfrost_context *ctx,
 
         /* Record the varying mapping for the command stream's bookkeeping */
 
-        struct exec_list *l_varyings =
-                        stage == MESA_SHADER_VERTEX ? &s->outputs : &s->inputs;
+        nir_variable_mode varying_mode =
+                        stage == MESA_SHADER_VERTEX ? nir_var_shader_out : nir_var_shader_in;
 
-        nir_foreach_variable(var, l_varyings) {
+        nir_foreach_variable_with_modes(var, s, varying_mode) {
                 unsigned loc = var->data.driver_location;
                 unsigned sz = glsl_count_attribute_slots(var->type, FALSE);