summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/glsl_to_nir.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-01-27 16:22:54 -0800
committerEric Anholt <[email protected]>2015-02-18 14:47:50 -0800
commit8e9dbfff17f29533ad03f3afd25ada8cb6bf1e2b (patch)
tree77317f985f96a014dc89a2554fa1baeb7c5b5fc2 /src/glsl/nir/glsl_to_nir.cpp
parent955a6bb57d6ca5a679021bcfe43c7cae1863f299 (diff)
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 <[email protected]> (v2)
Diffstat (limited to 'src/glsl/nir/glsl_to_nir.cpp')
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index bc43a7563dc..544d0d93282 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -142,6 +142,9 @@ glsl_to_nir(exec_list *ir, _mesa_glsl_parse_state *state,
nir_shader_compiler_options *new_options =
rzalloc(ctx, nir_shader_compiler_options);
options = gl_options->NirOptions = new_options;
+
+ if (gl_options->EmitNoPow)
+ new_options->lower_fpow = true;
} else {
options = gl_options->NirOptions;
}