diff options
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_nir.c | 12 | ||||
-rw-r--r-- | src/intel/compiler/brw_compiler.c | 14 |
2 files changed, 10 insertions, 16 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index afc8d5f3b78..febd0e49a2c 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -816,9 +816,9 @@ si_nir_opts(struct nir_shader *nir) { bool progress; unsigned lower_flrp = - (sel->nir->options->lower_flrp16 ? 16 : 0) | - (sel->nir->options->lower_flrp32 ? 32 : 0) | - (sel->nir->options->lower_flrp64 ? 64 : 0); + (nir->options->lower_flrp16 ? 16 : 0) | + (nir->options->lower_flrp32 ? 32 : 0) | + (nir->options->lower_flrp64 ? 64 : 0); do { progress = false; @@ -852,12 +852,12 @@ si_nir_opts(struct nir_shader *nir) if (lower_flrp != 0) { bool lower_flrp_progress; - NIR_PASS(lower_flrp_progress, sel->nir, nir_lower_flrp, + NIR_PASS(lower_flrp_progress, nir, nir_lower_flrp, lower_flrp, false /* always_precise */, - sel->nir->options->lower_ffma); + nir->options->lower_ffma); if (lower_flrp_progress) { - NIR_PASS(progress, sel->nir, + NIR_PASS(progress, nir, nir_opt_constant_folding); progress = true; } diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c index b119a758768..626ff4bb16a 100644 --- a/src/intel/compiler/brw_compiler.c +++ b/src/intel/compiler/brw_compiler.c @@ -170,21 +170,15 @@ brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo) rzalloc(compiler, struct nir_shader_compiler_options); if (is_scalar) { *nir_options = scalar_nir_options; - - if (devinfo->gen >= 11) { - nir_options->lower_flrp32 = true; - } } else { *nir_options = vector_nir_options; - - if (devinfo->gen < 6) { - /* Prior to Gen6, there are no three source operations. */ - nir_options->lower_flrp32 = true; - } } - /* Prior to Gen6, there are no three source operations. */ + /* Prior to Gen6, there are no three source operations, and Gen11 loses + * LRP. + */ nir_options->lower_ffma = devinfo->gen < 6; + nir_options->lower_flrp32 = devinfo->gen < 6 || devinfo->gen >= 11; nir_options->lower_int64_options = int64_options; nir_options->lower_doubles_options = fp64_options; |