diff options
author | Rob Clark <[email protected]> | 2016-04-23 09:03:28 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-04-25 16:16:21 -0400 |
commit | 4610e5ef28e4f209617c3cabf5a2dd699e52cc33 (patch) | |
tree | c6e4fa97c4ce6b1b712b03da7e55d67f9ac8ee02 /src/gallium/drivers/freedreno/ir3/ir3_nir.c | |
parent | 21b4bcdd05eabe94feb1a17bbb96f55d26eabe6e (diff) |
freedreno/ir3: fix sin/cos
We seem to need range reduction to get sane results. Fixes glmark2
jellyfish bench, and a whole bunch of
dEQP-GLES3.functional.shaders.builtin_functions.precision.{sin,cos,tan}.*
v2: squashed in android build fixes from Rob Herring
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3_nir.c')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_nir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index 897b3b963be..d3ee2a7f74b 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c @@ -120,6 +120,11 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s, if (key->color_two_side) { OPT_V(s, nir_lower_two_sided_color); } + } else { + /* only want to do this the first time (when key is null) + * and not again on any potential 2nd variant lowering pass: + */ + OPT_V(s, ir3_nir_apply_trig_workarounds); } OPT_V(s, nir_lower_tex, &tex_options); |