diff options
author | Marek Olšák <[email protected]> | 2020-06-26 07:16:41 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2020-07-07 22:02:06 -0400 |
commit | 977b84652a1f5785d08e65723d676a94020f6ff6 (patch) | |
tree | 9c6748e1b62a1e1d2be301c3a32d4a1cd0c0bd93 /src | |
parent | 9fccae80bef923cb959baad5d97b58b4b44c837e (diff) |
glsl: flatten a tautological conditional in lower_precision
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/lower_precision.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
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; } |