From: Marek Olšák Date: Fri, 26 Jun 2020 11:16:41 +0000 (-0400) Subject: glsl: flatten a tautological conditional in lower_precision X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=977b84652a1f5785d08e65723d676a94020f6ff6;p=mesa.git glsl: flatten a tautological conditional in lower_precision Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/compiler/glsl/lower_precision.cpp b/src/compiler/glsl/lower_precision.cpp index ff5e5104c3f..b2d8330a44d 100644 --- a/src/compiler/glsl/lower_precision.cpp +++ b/src/compiler/glsl/lower_precision.cpp @@ -378,14 +378,11 @@ find_lowerable_rvalues_visitor::visit_enter(ir_texture *ir) { ir_hierarchical_visitor::visit_enter(ir); - if (stack.back().state == UNKNOWN) { - /* The precision of the sample value depends on the precision of the - * sampler. - */ - stack.back().state = handle_precision(ir->type, - ir->sampler->precision()); - } - + /* The precision of the sample value depends on the precision of the + * sampler. + */ + stack.back().state = handle_precision(ir->type, + ir->sampler->precision()); return visit_continue; }