From 8dd6a51e8010a0a5b33e1a4c7a7a3251ddaa8e50 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 6 Apr 2020 11:47:18 +0100 Subject: [PATCH] aco: remove divergence check in sanitize_if() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We also need to do this if a side ends in a divergent break. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Tested-by: Marge Bot Part-of: --- src/amd/compiler/aco_instruction_selection_setup.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index ac7df920100..dcaf40f421d 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -154,8 +154,7 @@ unsigned get_interp_input(nir_intrinsic_op intrin, enum glsl_interp_mode interp) bool sanitize_if(nir_function_impl *impl, bool *divergent, nir_if *nif) { - if (!divergent[nif->condition.ssa->index]) - return false; + //TODO: skip this if the condition is uniform and there are no divergent breaks/continues? nir_block *then_block = nir_if_last_then_block(nif); nir_block *else_block = nir_if_last_else_block(nif); -- 2.30.2