aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schürmann <daniel@schuermann.dev>2019-07-20 17:21:14 (GMT)
committerDaniel Schürmann <daniel@schuermann.dev>2019-07-22 06:12:18 (GMT)
commit64b7386ee8ebc16e5980d6952148663b46a5298a (patch)
tree8d3b98378a1302eeff2da28b139ac6fec4dd53f0
parentdacaf7ec06f2b9f4c57e0aff842b8337eb78e8c5 (diff)
downloadexternal_mesa3d-64b7386ee8ebc16e5980d6952148663b46a5298a.zip
external_mesa3d-64b7386ee8ebc16e5980d6952148663b46a5298a.tar.gz
external_mesa3d-64b7386ee8ebc16e5980d6952148663b46a5298a.tar.bz2
radv: move nir_opt_conditional_discard out of optimization loop
This late optimization pass is only affected by nir_opt_if() and handles all cases in a single pass. It's enough to call it once after the optimization loop. No changes on vkpipeline-db. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
-rw-r--r--src/amd/vulkan/radv_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 4262dae..3adaf52 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -194,12 +194,12 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively,
}
NIR_PASS(progress, shader, nir_opt_undef);
- NIR_PASS(progress, shader, nir_opt_conditional_discard);
if (shader->options->max_unroll_iterations) {
NIR_PASS(progress, shader, nir_opt_loop_unroll, 0);
}
} while (progress && !optimize_conservatively);
+ NIR_PASS(progress, shader, nir_opt_conditional_discard);
NIR_PASS(progress, shader, nir_opt_shrink_load);
NIR_PASS(progress, shader, nir_opt_move_load_ubo);
}