[Mesa-dev] [PATCH v2] nir: add a comparison simplification
Timothy Arceri
tarceri at itsqueeze.com
Fri Mar 16 07:25:46 UTC 2018
On 16/03/18 17:24, Jason Ekstrand wrote:
> Assuming the thing I typed in my phone actually works, r-b. :-). I'm a
> bit surprised we didn't already have that one. It seems so obvious in
> hindsight.
Yeah it worked :) and picked up one more combo I missed. The previous
patch only impacted Tomb Raider and nothing else in shader-db so I guess
that's why nobody has noticed before.
>
>
> On March 15, 2018 22:48:24 Timothy Arceri <tarceri at itsqueeze.com> wrote:
>
>> These can be found in the Tomb Raider shaders, eliminating them
>> helps unroll more loops.
>> ---
>> src/compiler/nir/nir_opt_algebraic.py | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/src/compiler/nir/nir_opt_algebraic.py
>> b/src/compiler/nir/nir_opt_algebraic.py
>> index c9575e6be4..2148bc121b 100644
>> --- a/src/compiler/nir/nir_opt_algebraic.py
>> +++ b/src/compiler/nir/nir_opt_algebraic.py
>> @@ -152,6 +152,7 @@ optimizations = [
>> (('inot', ('ige', a, b)), ('ilt', a, b)),
>> (('inot', ('ieq', a, b)), ('ine', a, b)),
>> (('inot', ('ine', a, b)), ('ieq', a, b)),
>> + (('ine', ('b2i', 'a at bool'), 0), 'a'),
>>
>> # 0.0 >= b2f(a)
>> # b2f(a) <= 0.0
>> --
>> 2.14.3
>>
>
>
More information about the mesa-dev
mailing list