virgl: advertise new muladd options

The "old" nir_to_tgsi_compiler_options enabled fusing for 32 and 64 bit,
and virglrenderer implements TGSI's MAD as an mul+add. But because virgl
also lowered it for 32 bits, we just enable fmad for 64 bit.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
Karol Herbst 2026-05-13 17:20:47 +02:00 committed by Marge Bot
parent 323a3716a6
commit eb817b1f63

View file

@ -1056,6 +1056,9 @@ virgl_create_screen(struct virgl_winsys *vws, const struct pipe_screen_config *c
*/
screen->compiler_options.lower_ffloor = true;
screen->compiler_options.lower_fneg = true;
/* We implement TGSI's MAD as fmul + fadd in virglrenderer */
screen->compiler_options.float_mul_add64 = nir_float_muladd_support_has_fmad |
nir_float_muladd_support_fuse;
}
screen->compiler_options.no_integers = screen->caps.caps.v1.glsl_level < 130;
screen->compiler_options.lower_ffma32 = true;