st/mesa: call nir_opt_access only once
authorMarek Olšák <marek.olsak@amd.com>
Fri, 25 Oct 2019 04:06:34 +0000 (00:06 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 4 Nov 2019 21:49:42 +0000 (16:49 -0500)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_program.c

index d0ca8b0877b270f746ebe50d61f8df2d0bb0eeb1..e7b5060cfa9d0530a37045b2cecea1df591f7b70 100644 (file)
@@ -309,8 +309,6 @@ st_nir_opts(nir_shader *nir)
          lower_flrp = 0;
       }
 
-      NIR_PASS(progress, nir, nir_opt_access);
-
       NIR_PASS(progress, nir, nir_opt_undef);
       NIR_PASS(progress, nir, nir_opt_conditional_discard);
       if (nir->options->max_unroll_iterations) {
index 6beb1ced7852288b6ce443ba4119e9e07cfdbd6b..1856ba8a43b39ccd463c6ebed78179949cb2ae9c 100644 (file)
@@ -390,6 +390,8 @@ st_release_common_variants(struct st_context *st, struct st_common_program *p)
 void
 st_finalize_nir_before_variants(struct nir_shader *nir)
 {
+   NIR_PASS_V(nir, nir_opt_access);
+
    NIR_PASS_V(nir, nir_split_var_copies);
    NIR_PASS_V(nir, nir_lower_var_copies);
    if (nir->options->lower_all_io_to_temps ||