nir: replace lower_sincos with algebraic opt

This version has less ops for the same precision.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Jonathan Marek
2019-05-08 10:26:49 -04:00
parent 5a4e71c082
commit bc3b6168ba
6 changed files with 13 additions and 144 deletions

View File

@@ -2505,6 +2505,7 @@ typedef struct nir_shader_compiler_options {
bool lower_fpow;
bool lower_fsat;
bool lower_fsqrt;
bool lower_sincos;
bool lower_fmod;
/** Lowers ibitfield_extract/ubitfield_extract to ibfe/ubfe. */
bool lower_bitfield_extract;
@@ -3976,8 +3977,6 @@ uint64_t nir_get_single_slot_attribs_mask(uint64_t attribs, uint64_t dual_slot);
nir_intrinsic_op nir_intrinsic_from_system_value(gl_system_value val);
gl_system_value nir_system_value_from_intrinsic(nir_intrinsic_op intrin);
bool nir_lower_sincos(nir_shader *shader);
static inline bool
nir_variable_is_in_ubo(const nir_variable *var)
{