turnip: use nir_assign_io_var_locations instead of nir_assign_var_locations
authorJonathan Marek <jonathan@marek.ca>
Mon, 7 Oct 2019 02:26:49 +0000 (22:26 -0400)
committerJonathan Marek <jonathan@marek.ca>
Tue, 15 Oct 2019 11:56:20 +0000 (07:56 -0400)
Variables with same location should use the same driver_location.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/vulkan/tu_shader.c

index 755cde4def6e3ae3cefb6d3cec8294383bd4d145..7a05a115269f8e2641d6eba864cdc1a6fd54ff56 100644 (file)
@@ -378,12 +378,8 @@ tu_shader_create(struct tu_device *dev,
       break;
    }
 
-   nir_assign_var_locations(&nir->inputs, &nir->num_inputs,
-                            ir3_glsl_type_size);
-   nir_assign_var_locations(&nir->outputs, &nir->num_outputs,
-                            ir3_glsl_type_size);
-   nir_assign_var_locations(&nir->uniforms, &nir->num_uniforms,
-                            ir3_glsl_type_size);
+   nir_assign_io_var_locations(&nir->inputs, &nir->num_inputs, stage);
+   nir_assign_io_var_locations(&nir->outputs, &nir->num_outputs, stage);
 
    NIR_PASS_V(nir, nir_lower_system_values);
    NIR_PASS_V(nir, nir_lower_frexp);