Mesa (master): turnip: use nir_opt_copy_prop_vars
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 26 21:38:08 UTC 2019
Module: Mesa
Branch: master
Commit: ee4fa15a86f0bb4d80261f149fa51ccbaddb6cb1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee4fa15a86f0bb4d80261f149fa51ccbaddb6cb1
Author: Jonathan Marek <jonathan at marek.ca>
Date: Thu Sep 26 00:30:22 2019 -0400
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 <jonathan at marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Acked-by: Eric Anholt <eric at anholt.net>
---
src/freedreno/vulkan/tu_shader.c | 2 ++
1 file changed, 2 insertions(+)
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);
More information about the mesa-commit
mailing list