From: Jonathan Marek Date: Thu, 26 Sep 2019 04:30:22 +0000 (-0400) Subject: turnip: use nir_opt_copy_prop_vars X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee4fa15a86f0bb4d80261f149fa51ccbaddb6cb1;p=mesa.git 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 --- 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);