On 06/01/2018 10:17 AM, Eric Anholt wrote: > Samuel Pitoiset <samuel.pitoi...@gmail.com> writes: > >> On 06/01/2018 02:17 AM, Ian Romanick wrote: >>> On 05/30/2018 10:06 AM, Samuel Pitoiset wrote: >>>> Similar for max(). >>>> >>>> Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> >>>> --- >>>> src/compiler/nir/nir.h | 3 +++ >>>> src/compiler/nir/nir_opt_algebraic.py | 8 ++++++++ >>>> 2 files changed, 11 insertions(+) >>>> >>>> diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h >>>> index f6086bd6c0..04991b7d04 100644 >>>> --- a/src/compiler/nir/nir.h >>>> +++ b/src/compiler/nir/nir.h >>>> @@ -1897,6 +1897,9 @@ typedef struct nir_shader_compiler_options { >>>> /* lower b2f to iand */ >>>> bool lower_b2f; >>>> >>>> + /* lower min(min(a, b), c) to min3(a, b, c) (same for max()). */ >>>> + bool lower_minmax3; >>> >>> The way this variable is named and the way it is used is confusing. >>> Every other lower_foo means "convert foo to something else." This one >>> means "make some foo." >> >> Yes, the name is not that good. Any suggestions? > > We use !options->lower_fsat to decide if we should turn min(max()) > patterns into fsat, so we could go with that model again. You'd just > need to be sure to update other NIR drivers to flag lower_minmax3 so > they don't start seeing unexpected minmax3s.
Sounds good to me.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev