mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
elk: only lower flrp once
No shader-db changes on any Intel platform. Both Iris and Crocus use st_nir_opts, which calls nir_lower_flrp before brw_nir_optimize. The call still needs to exist for hasvk, but I don't collect fossil-db data for hasvk. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12526>
This commit is contained in:
parent
e4b8b758b1
commit
d64ce23b08
1 changed files with 7 additions and 13 deletions
|
|
@ -668,10 +668,6 @@ elk_nir_optimize(nir_shader *nir, bool is_scalar,
|
|||
const struct intel_device_info *devinfo)
|
||||
{
|
||||
bool progress;
|
||||
unsigned lower_flrp =
|
||||
(nir->options->lower_flrp16 ? 16 : 0) |
|
||||
(nir->options->lower_flrp32 ? 32 : 0) |
|
||||
(nir->options->lower_flrp64 ? 64 : 0);
|
||||
|
||||
do {
|
||||
progress = false;
|
||||
|
|
@ -753,15 +749,6 @@ elk_nir_optimize(nir_shader *nir, bool is_scalar,
|
|||
OPT(nir_lower_constant_convert_alu_types);
|
||||
OPT(nir_opt_constant_folding);
|
||||
|
||||
if (lower_flrp != 0) {
|
||||
OPT(nir_lower_flrp, lower_flrp, false /* always_precise */);
|
||||
|
||||
/* Nothing should rematerialize any flrps, so we only need to do this
|
||||
* lowering once.
|
||||
*/
|
||||
lower_flrp = 0;
|
||||
}
|
||||
|
||||
OPT(nir_opt_dead_cf);
|
||||
if (OPT(nir_opt_loop)) {
|
||||
/* If nir_opt_loop makes progress, then we need to clean
|
||||
|
|
@ -1042,6 +1029,13 @@ elk_preprocess_nir(const struct elk_compiler *compiler, nir_shader *nir,
|
|||
|
||||
elk_nir_optimize(nir, is_scalar, devinfo);
|
||||
|
||||
const unsigned lower_flrp =
|
||||
(nir->options->lower_flrp16 ? 16 : 0) |
|
||||
(nir->options->lower_flrp32 ? 32 : 0) |
|
||||
(nir->options->lower_flrp64 ? 64 : 0);
|
||||
|
||||
OPT(nir_lower_flrp, lower_flrp, false /* always_precise */);
|
||||
|
||||
OPT(nir_lower_doubles, opts->softfp64, nir->options->lower_doubles_options);
|
||||
if (OPT(nir_lower_int64_float_conversions)) {
|
||||
OPT(nir_opt_algebraic);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue