nak: Enable NIR fuse_ffmaN

This improves vkpeak perf by 40-50% on the Ada GPU in my laptop.  There
are probably more optimal things we can be doing (Intel's pass is pretty
clever) but this is already an improvement.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27157>
This commit is contained in:
Faith Ekstrand 2024-01-18 15:56:16 -06:00 committed by Marge Bot
parent 4dbf9181cd
commit 7f332f4087

View file

@ -81,6 +81,9 @@ fn nir_options(dev: &nv_device_info) -> nir_shader_compiler_options {
let mut op: nir_shader_compiler_options = unsafe { std::mem::zeroed() };
op.lower_fdiv = true;
op.fuse_ffma16 = true;
op.fuse_ffma32 = true;
op.fuse_ffma64 = true;
op.lower_flrp16 = true;
op.lower_flrp32 = true;
op.lower_flrp64 = true;