turnip: fix array/matrix varyings
authorJonathan Marek <jonathan@marek.ca>
Sun, 15 Dec 2019 23:56:47 +0000 (18:56 -0500)
committerJonathan Marek <jonathan@marek.ca>
Wed, 22 Jan 2020 01:36:08 +0000 (20:36 -0500)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3109>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3109>

src/freedreno/vulkan/tu_shader.c

index 13481b8d2145accc6832c76cfc0da84f78b52395..67374ac22cc8f44d98bea3ca46f9f67749674753 100644 (file)
@@ -447,6 +447,8 @@ tu_shader_create(struct tu_device *dev,
    /* ir3 doesn't support indirect input/output */
    NIR_PASS_V(nir, nir_lower_indirect_derefs, nir_var_shader_in | nir_var_shader_out);
 
+   NIR_PASS_V(nir, nir_lower_io_arrays_to_elements_no_indirects, false);
+
    nir_assign_io_var_locations(&nir->inputs, &nir->num_inputs, stage);
    nir_assign_io_var_locations(&nir->outputs, &nir->num_outputs, stage);
 
@@ -470,8 +472,6 @@ tu_shader_create(struct tu_device *dev,
       NIR_PASS_V(nir, ir3_nir_move_varying_inputs);
    }
 
-   NIR_PASS_V(nir, nir_lower_io_arrays_to_elements_no_indirects, false);
-
    nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
 
    /* num_uniforms only used by ir3 for size of ubo 0 (push constants) */