summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-09-26 00:30:22 -0400
committerJonathan Marek <[email protected]>2019-09-26 17:18:13 -0400
commitee4fa15a86f0bb4d80261f149fa51ccbaddb6cb1 (patch)
tree4f7db1586ca2fc0fec81d2ff04561ad002d1255b /src
parentb54f9e9e9e0c2c34fd2e9d3e939320da12a48cb9 (diff)
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 <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/vulkan/tu_shader.c2
1 files changed, 2 insertions, 0 deletions
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);