nir: Conditionalize the POW reconstruction on shader compiler options.
authorEric Anholt <eric@anholt.net>
Wed, 28 Jan 2015 00:22:54 +0000 (16:22 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 18 Feb 2015 22:47:50 +0000 (14:47 -0800)
commit8e9dbfff17f29533ad03f3afd25ada8cb6bf1e2b
tree77317f985f96a014dc89a2554fa1baeb7c5b5fc2
parent955a6bb57d6ca5a679021bcfe43c7cae1863f299
nir: Conditionalize the POW reconstruction on shader compiler options.

Mesa has a shader compiler struct flagging whether GLSL IR's opt_algebraic
and other passes should try and generate certain types of opcodes or
patterns.  Extend that to NIR by defining our own struct, which is
automatically generated from the Mesa struct in glsl_to_nir and provided
directly by the driver in TGSI-to-NIR.

v2: Split out the previous two prep patches.
v3: Rebase to master (no TGSI->NIR present)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v2)
src/glsl/nir/glsl_to_nir.cpp
src/glsl/nir/nir.h
src/glsl/nir/nir_opt_algebraic.py