From ee4fa15a86f0bb4d80261f149fa51ccbaddb6cb1 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Thu, 26 Sep 2019 00:30:22 -0400 Subject: turnip: use nir_opt_copy_prop_vars Avoids getting a "load_output" in a case like this: gl_Position = ubuf.MVP * ubuf.position[gl_VertexIndex]; frag_pos = gl_Position.xyz; Signed-off-by: Jonathan Marek Reviewed-by: Kristian H. Kristensen Acked-by: Eric Anholt --- src/freedreno/vulkan/tu_shader.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/freedreno') diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 37edf82642b..2b68aeafffb 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -302,6 +302,8 @@ tu_shader_create(struct tu_device *dev, nir_assign_var_locations(&nir->uniforms, &nir->num_uniforms, ir3_glsl_type_size); + NIR_PASS_V(nir, nir_opt_copy_prop_vars); + NIR_PASS_V(nir, nir_lower_system_values); NIR_PASS_V(nir, nir_lower_frexp); -- cgit v1.2.3