[Mesa-dev] [PATCH 2/4] glsl: add new IR lower pass for sqrt(abs()) and inversesqrt(abs())

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Mar 17 00:19:50 UTC 2017



On 03/17/2017 01:17 AM, Kenneth Graunke wrote:
> On Thursday, March 16, 2017 5:06:55 PM PDT Samuel Pitoiset wrote:
>> Looks easier to do that at lowering time and mostly because
>> builtin_builder is a singleton class without access to any
>> states/constants.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>  src/compiler/Makefile.sources       |  1 +
>>  src/compiler/glsl/ir_optimization.h |  2 +
>>  src/compiler/glsl/lower_sqrt.cpp    | 77 +++++++++++++++++++++++++++++++++++++
>>  src/compiler/glsl/test_optpass.cpp  |  2 +
>>  4 files changed, 82 insertions(+)
>>  create mode 100644 src/compiler/glsl/lower_sqrt.cpp
>
> Why not put this in lower_instructions.cpp?  That's sort of the
> catch-all pass for tiny bits of expression lowering.

Because it looked hacky at first look, but I can do that yes.

>


More information about the mesa-dev mailing list