zink: proper advertise keep_weak_ffma for fp16

Zink never sets the fp16 screen cap, but the caps also are initialized
after zink_screen_init_compiler. So just replicate the check to be safe
here.

Fixes: 2146e09962 ("zink: keep ffma_weak and use GLSLstd450Fma for it")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41722>
This commit is contained in:
Karol Herbst 2026-05-21 12:21:13 +02:00 committed by Marge Bot
parent b1c72223af
commit 48ec237bf9

View file

@ -1323,7 +1323,8 @@ zink_screen_init_compiler(struct zink_screen *screen)
screen->nir_options.float_mul_add64 |= nir_float_muladd_support_keep_weak_ffma;
}
if (screen->base.caps.fp16)
if (screen->info.feats12.shaderFloat16 ||
(screen->info.have_KHR_shader_float16_int8 && screen->info.shader_float16_int8_feats.shaderFloat16))
screen->nir_options.float_mul_add16 |= nir_float_muladd_support_keep_weak_ffma;
/* XXX: do any drivers need different estimates? */