turnip: use nir_opt_copy_prop_vars
authorJonathan Marek <jonathan@marek.ca>
Thu, 26 Sep 2019 04:30:22 +0000 (00:30 -0400)
committerJonathan Marek <jonathan@marek.ca>
Thu, 26 Sep 2019 21:18:13 +0000 (17:18 -0400)
commitee4fa15a86f0bb4d80261f149fa51ccbaddb6cb1
tree4f7db1586ca2fc0fec81d2ff04561ad002d1255b
parentb54f9e9e9e0c2c34fd2e9d3e939320da12a48cb9
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@marek.ca>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
src/freedreno/vulkan/tu_shader.c