From 48ec237bf90cb512b9c9b6d84a8e2866ace3c92b Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 21 May 2026 12:21:13 +0200 Subject: [PATCH] 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: 2146e09962a ("zink: keep ffma_weak and use GLSLstd450Fma for it") Reviewed-by: Georg Lehmann Part-of: --- src/gallium/drivers/zink/zink_compiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 397dce7ea23..22ca7ecf1b1 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -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? */