intel/compiler: Run extra fp64 lowering pass on devices that don't support int64.
In some cases nir_lower_int64 will emit fp64 operations which aren't natively supported on any Intel hardware (e.g. ftrunc, frem). An extra pass of nir_opt_algebraic (for frem) and nir_lower_doubles is required in order to take care of them. This fixes several int64 test-cases on MTL hardware. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19390>
This commit is contained in:

committed by
Marge Bot

parent
e14f85366e
commit
5d4df3ac23
@@ -951,7 +951,10 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir,
|
|||||||
brw_nir_optimize(nir, compiler, is_scalar, true);
|
brw_nir_optimize(nir, compiler, is_scalar, true);
|
||||||
|
|
||||||
OPT(nir_lower_doubles, softfp64, nir->options->lower_doubles_options);
|
OPT(nir_lower_doubles, softfp64, nir->options->lower_doubles_options);
|
||||||
OPT(nir_lower_int64);
|
if (OPT(nir_lower_int64)) {
|
||||||
|
OPT(nir_opt_algebraic);
|
||||||
|
OPT(nir_lower_doubles, softfp64, nir->options->lower_doubles_options);
|
||||||
|
}
|
||||||
|
|
||||||
OPT(nir_lower_bit_size, lower_bit_size_callback, (void *)compiler);
|
OPT(nir_lower_bit_size, lower_bit_size_callback, (void *)compiler);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user